Skip to content

Commit 51d2188

Browse files
committed
PS-469 - update wallet admin ui to show the onhold admin dropdown
1 parent e12cfd9 commit 51d2188

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/apps/wallet-admin/src/home/tabs/payments/PaymentsTab.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ const ListView: FC<ListViewProps> = (props: ListViewProps) => {
217217
if (updateObj.paymentStatus !== undefined) {
218218
if (updateObj.paymentStatus === 'Owed') {
219219
paymentStatus = 'OWED'
220-
} else if (updateObj.paymentStatus === 'On Hold') {
220+
} else if (updateObj.paymentStatus === 'On Hold (Admin)') {
221221
paymentStatus = 'ON_HOLD_ADMIN'
222222
} else if (updateObj.paymentStatus === 'Cancel') {
223223
paymentStatus = 'CANCELLED'
@@ -268,11 +268,6 @@ const ListView: FC<ListViewProps> = (props: ListViewProps) => {
268268

269269
const onPaymentEditCallback = useCallback((payment: Winning) => {
270270
let status = payment.status
271-
if (status === 'On Hold (Admin)') {
272-
status = 'On Hold'
273-
} else if (['On Hold (Member)', 'On Hold (Tax Form)', 'On Hold (Payment Provider)'].indexOf(status) !== -1) {
274-
status = 'Owed'
275-
}
276271

277272
setConfirmFlow({
278273
action: 'Save',

src/apps/wallet-admin/src/lib/components/payment-edit/PaymentEdit.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,11 @@ 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;
182183
return [
184+
...(isMemberHold ? [{label: props.payment.status, value: props.payment.status}] : []),
183185
{ label: 'Owed', value: 'Owed' },
184-
{ label: 'On Hold', value: 'On Hold' },
186+
{ label: 'On Hold (Admin)', value: 'On Hold (Admin)' },
185187
{ label: 'Cancel', value: 'Cancel' },
186188
]
187189
}

0 commit comments

Comments
 (0)