@@ -13,6 +13,7 @@ import { FilterBar, formatIOSDateString, PaymentView } from '../../../lib'
1313import { ConfirmFlowData } from '../../../lib/models/ConfirmFlowData'
1414import { PaginationInfo } from '../../../lib/models/PaginationInfo'
1515import { TaxForm } from '../../../lib/models/TaxForm'
16+ import { PaymentProvider } from '../../../lib/models/PaymentProvider'
1617import PaymentEditForm from '../../../lib/components/payment-edit/PaymentEdit'
1718import PaymentsTable from '../../../lib/components/payments-table/PaymentTable'
1819
@@ -177,11 +178,11 @@ const ListView: FC<ListViewProps> = (props: ListViewProps) => {
177178 const missingPaymentProviders = await getPaymentMethods ( 100 , 0 , onHoldUserIds )
178179
179180 missingTaxForms . forms . forEach ( ( form : TaxForm ) => {
180- userHasTaxFormSetup . set ( form . userId , true )
181+ userHasTaxFormSetup . set ( form . userId , form . status === 'ACTIVE' )
181182 } )
182183
183- missingPaymentProviders . paymentMethods . forEach ( ( method : { userId : string } ) => {
184- userHasPaymentProvider . set ( method . userId , true )
184+ missingPaymentProviders . paymentMethods . forEach ( ( method : PaymentProvider ) => {
185+ userHasPaymentProvider . set ( method . userId , method . status === 'CONNECTED' )
185186 } )
186187 } catch ( err ) {
187188 // Ignore errors
@@ -272,6 +273,13 @@ const ListView: FC<ListViewProps> = (props: ListViewProps) => {
272273 } , [ fetchWinnings ] )
273274
274275 const onPaymentEditCallback = useCallback ( ( payment : Winning ) => {
276+ let status = payment . status
277+ if ( status === 'On Hold (Admin)' ) {
278+ status = 'On Hold'
279+ } else if ( [ 'On Hold (Member)' , 'On Hold (Tax Form)' , 'On Hold (Payment Provider)' ] . indexOf ( status ) !== - 1 ) {
280+ status = 'Owed'
281+ }
282+
275283 setConfirmFlow ( {
276284 action : 'Save' ,
277285 callback : async ( ) => {
@@ -281,7 +289,7 @@ const ListView: FC<ListViewProps> = (props: ListViewProps) => {
281289 < PaymentEditForm
282290 payment = { {
283291 ...payment ,
284- status : [ 'On Hold (Member)' , 'On Hold (Tax Form)' , 'On Hold (Payment Provider)' ] . indexOf ( payment . status ) !== - 1 ? 'Owed' : payment . status ,
292+ status,
285293 } }
286294 canSave = { setIsConfirmFormValid }
287295 onValueUpdated = { handleValueUpdated }
@@ -318,9 +326,13 @@ const ListView: FC<ListViewProps> = (props: ListViewProps) => {
318326 value : 'OWED' ,
319327 } ,
320328 {
321- label : 'On Hold' ,
329+ label : 'On Hold (Admin) ' ,
322330 value : 'ON_HOLD_ADMIN' ,
323331 } ,
332+ {
333+ label : 'On Hold (Member)' ,
334+ value : 'ON_HOLD' ,
335+ } ,
324336 {
325337 label : 'Paid' ,
326338 value : 'PAID' ,
0 commit comments