From 09c87cd763874edaef838f424ff404959ac785cc Mon Sep 17 00:00:00 2001 From: Tomer Shvadron Date: Wed, 1 May 2024 14:29:32 +0300 Subject: [PATCH 1/4] feat: added new columns in alerts table --- .../TextWithNAFallback/TextWithNAFallback.tsx | 1 + .../src/domains/alerts/fetchers.ts | 7 +++- .../components/AlertsTable/AlertsTable.tsx | 4 +- .../components/AlertsTable/columns.tsx | 37 ++++++++++++++++++- .../workflows-service/prisma/data-migrations | 2 +- .../src/alert/alert.controller.external.ts | 4 ++ services/workflows-service/src/alert/types.ts | 6 +-- 7 files changed, 53 insertions(+), 8 deletions(-) diff --git a/apps/backoffice-v2/src/common/components/atoms/TextWithNAFallback/TextWithNAFallback.tsx b/apps/backoffice-v2/src/common/components/atoms/TextWithNAFallback/TextWithNAFallback.tsx index 3bba3e2a0d..6a94efd0ce 100644 --- a/apps/backoffice-v2/src/common/components/atoms/TextWithNAFallback/TextWithNAFallback.tsx +++ b/apps/backoffice-v2/src/common/components/atoms/TextWithNAFallback/TextWithNAFallback.tsx @@ -34,5 +34,6 @@ export const TextWithNAFallback: TTextWithNAFallback = forwardRef( ); }, ); + // @ts-ignore TextWithNAFallback.displayName = 'TextWithNAFallback'; diff --git a/apps/backoffice-v2/src/domains/alerts/fetchers.ts b/apps/backoffice-v2/src/domains/alerts/fetchers.ts index 8ae7da4f9f..aff7fe898c 100644 --- a/apps/backoffice-v2/src/domains/alerts/fetchers.ts +++ b/apps/backoffice-v2/src/domains/alerts/fetchers.ts @@ -76,7 +76,12 @@ export const AlertsListSchema = z.array( ObjectWithIdSchema.extend({ dataTimestamp: z.string().datetime(), updatedAt: z.string().datetime(), - subject: ObjectWithIdSchema.extend({ name: z.string() }), + subject: ObjectWithIdSchema.extend({ + id: z.string(), + name: z.string(), + correlationId: z.string(), + type: z.enum(['business', 'counterparty']), + }), severity: z.enum(AlertSeverities), label: z.string(), alertDetails: z.string(), diff --git a/apps/backoffice-v2/src/pages/TransactionMonitoringAlerts/components/AlertsTable/AlertsTable.tsx b/apps/backoffice-v2/src/pages/TransactionMonitoringAlerts/components/AlertsTable/AlertsTable.tsx index 92a4da77c1..e19a671491 100644 --- a/apps/backoffice-v2/src/pages/TransactionMonitoringAlerts/components/AlertsTable/AlertsTable.tsx +++ b/apps/backoffice-v2/src/pages/TransactionMonitoringAlerts/components/AlertsTable/AlertsTable.tsx @@ -29,7 +29,7 @@ export const AlertsTable: FunctionComponent = ({ data }) => { {headers.map(header => ( {header.column.id === 'select' && ( @@ -38,7 +38,7 @@ export const AlertsTable: FunctionComponent = ({ data }) => { )} {header.column.id !== 'select' && (