File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
src/apps/wallet-admin/src
lib/components/payment-edit Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -267,19 +267,14 @@ const ListView: FC<ListViewProps> = (props: ListViewProps) => {
267267 } , [ fetchWinnings ] )
268268
269269 const onPaymentEditCallback = useCallback ( ( payment : Winning ) => {
270- let status = payment . status
271-
272270 setConfirmFlow ( {
273271 action : 'Save' ,
274272 callback : async ( ) => {
275273 updatePayment ( payment . id )
276274 } ,
277275 content : (
278276 < PaymentEditForm
279- payment = { {
280- ...payment ,
281- status,
282- } }
277+ payment = { payment }
283278 canSave = { setIsConfirmFormValid }
284279 onValueUpdated = { handleValueUpdated }
285280 />
Original file line number Diff line number Diff line change @@ -179,9 +179,14 @@ const PaymentEdit: React.FC<PaymentEditFormProps> = (props: PaymentEditFormProps
179179
180180 const options = useCallback ( ( ) => {
181181 if ( props . payment . status . toUpperCase ( ) !== 'PAID' ) {
182- const isMemberHold = [ 'On Hold (Member)' , 'On Hold (Tax Form)' , 'On Hold (Payment Provider)' ] . indexOf ( props . payment . status ) !== - 1 ;
182+ const isMemberHold = [
183+ 'On Hold (Member)' ,
184+ 'On Hold (Tax Form)' ,
185+ 'On Hold (Payment Provider)' ,
186+ ] . includes ( props . payment . status )
187+
183188 return [
184- ...( isMemberHold ? [ { label : props . payment . status , value : props . payment . status } ] : [ ] ) ,
189+ ...( isMemberHold ? [ { label : props . payment . status , value : props . payment . status } ] : [ ] ) ,
185190 { label : 'Owed' , value : 'Owed' } ,
186191 { label : 'On Hold (Admin)' , value : 'On Hold (Admin)' } ,
187192 { label : 'Cancel' , value : 'Cancel' } ,
You can’t perform that action at this time.
0 commit comments