File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
src/apps/wallet-admin/src
lib/components/payment-edit Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff 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' ,
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments