File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
src/apps/wallet-admin/src
lib/components/payments-table Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ function formatStatus(status: string): string {
3232 case 'PAID' :
3333 return 'Paid'
3434 case 'CANCELLED' :
35- return 'Cancelled '
35+ return 'Cancel '
3636 default :
3737 return status . replaceAll ( '_' , ' ' )
3838 }
@@ -116,6 +116,11 @@ const ListView: FC<ListViewProps> = (props: ListViewProps) => {
116116 formattedReleaseDate = formatIOSDateString ( payment . releaseDate )
117117 }
118118
119+ let status = formatStatus ( payment . details [ 0 ] . status )
120+ if ( status === 'Cancel' ) {
121+ status = 'Cancelled'
122+ }
123+
119124 return {
120125 createDate : formatIOSDateString ( payment . createdAt ) ,
121126 currency : payment . details [ 0 ] . currency ,
@@ -129,7 +134,7 @@ const ListView: FC<ListViewProps> = (props: ListViewProps) => {
129134 netPaymentNumber : parseFloat ( payment . details [ 0 ] . totalAmount ) ,
130135 releaseDate : formattedReleaseDate ,
131136 releaseDateObj : releaseDate ,
132- status : formatStatus ( payment . details [ 0 ] . status ) ,
137+ status,
133138 type : payment . category . replaceAll ( '_' , ' ' )
134139 . toLowerCase ( ) ,
135140 }
Original file line number Diff line number Diff line change 1+ /* eslint-disable max-len */
12/* eslint-disable react/jsx-no-bind */
23/* eslint-disable @typescript-eslint/explicit-function-return-type */
34import React , { useEffect , useState } from 'react'
@@ -59,7 +60,7 @@ const PaymentsTable: React.FC<PaymentTableProps> = (props: PaymentTableProps) =>
5960 < td > { payment . releaseDate } </ td >
6061 < td > { payment . datePaid } </ td >
6162 < td className = { styles . actionButtons } >
62- { props . canEdit && payment . status . toUpperCase ( ) !== 'PAID' && (
63+ { props . canEdit && payment . status . toUpperCase ( ) !== 'PAID' && payment . status . toUpperCase ( ) !== 'CANCELLED' && (
6364 < Button
6465 icon = { IconOutline . PencilIcon }
6566 size = 'sm'
You can’t perform that action at this time.
0 commit comments