- {getProgressStatus(
- style,
- row,
- t(
- `content.admin.registration-requests.${items.FAILED ? 'buttonerror' : 'buttonprogress'}`
- )
- )}
+ if (application.applicationStatus === ApplicationRequestStatus.SUBMITTED) {
+ const style = {
+ border: items.FAILED ? '#d91e18' : '#EAF1FE',
+ color: items.FAILED ? '#d91e18' : '#000',
+ }
+ return (
+
+ {getProgressStatus(
+ style,
+ application,
+ t(
+ `content.admin.registration-requests.${items.FAILED ? 'buttonerror' : 'buttonprogress'}`
+ )
+ )}
+ {type && (
{
e.stopPropagation()
- onConfirmationCancel?.(row.applicationId, row.companyName)
+ onConfirmationCancel?.(
+ application.applicationId,
+ application.companyName
+ )
}}
>
{t('content.admin.registration-requests.cancel')}
-
- )
- } else if (
- row.applicationStatus === ApplicationRequestStatus.DECLINED ||
- row.applicationStatus === ApplicationRequestStatus.CANCELLED_BY_CUSTOMER
- ) {
- const style = {
- border: '#d91e18',
- color: '#d91e18',
- background: '#fee7e2',
- }
- return getProgressStatus(
- style,
- row,
- t('content.admin.registration-requests.buttonrejected')
- )
- } else if (row.applicationStatus === ApplicationRequestStatus.CONFIRMED) {
- const style = {
- border: '#00AA55',
- color: '#00AA55',
- background: '#e2f6c7',
- }
- return getProgressStatus(
- style,
- row,
- t('content.admin.registration-requests.buttoncompleted')
- )
+ )}
+
+ )
+ } else if (
+ application.applicationStatus === ApplicationRequestStatus.DECLINED ||
+ application.applicationStatus ===
+ ApplicationRequestStatus.CANCELLED_BY_CUSTOMER
+ ) {
+ const style = {
+ border: '#d91e18',
+ color: '#d91e18',
+ background: '#fee7e2',
}
+ return getProgressStatus(
+ style,
+ application,
+ t('content.admin.registration-requests.buttonrejected')
+ )
+ } else if (
+ application.applicationStatus === ApplicationRequestStatus.CONFIRMED
+ ) {
+ const style = {
+ border: '#00AA55',
+ color: '#00AA55',
+ background: '#e2f6c7',
+ }
+ return getProgressStatus(
+ style,
+ application,
+ t('content.admin.registration-requests.buttoncompleted')
+ )
}
+}
+// Columns definitions of Registration Request page Data Grid
+export const RegistrationRequestsTableColumns = (
+ t: typeof i18next.t,
+ showConfirmOverlay?: (applicationId: string) => void,
+ onConfirmationCancel?: (applicationId: string, name: string) => void
+): Array