From 2779f04c937f30ce663d33f27db1766f17438ecc Mon Sep 17 00:00:00 2001 From: Omri Levy <61207713+Omri-Levy@users.noreply.github.com> Date: Thu, 16 May 2024 12:09:37 +0300 Subject: [PATCH] Demo environment (#2384) * feat(*): checkpoint * revert(workflows-service): reverted error log change * fix(backoffice-v2): associated companies fixes --- .../useUpdateDocumentByIdMutation.tsx | 5 +++++ .../useCaseBlocksLogic/utils/get-tabs-block-map.tsx | 1 - .../components/NoAlerts/NoAlerts.tsx | 2 +- pnpm-lock.yaml | 11 ++++++++--- services/workflows-service/package.json | 2 ++ services/workflows-service/prisma/data-migrations | 2 +- .../src/common/utils/winston-logger/winston-logger.ts | 2 +- services/workflows-service/src/types.ts | 4 ++++ .../src/workflow/hook-callback-handler.service.ts | 2 +- 9 files changed, 23 insertions(+), 8 deletions(-) diff --git a/apps/backoffice-v2/src/domains/workflows/hooks/mutations/useUpdateDocumentByIdMutation/useUpdateDocumentByIdMutation.tsx b/apps/backoffice-v2/src/domains/workflows/hooks/mutations/useUpdateDocumentByIdMutation/useUpdateDocumentByIdMutation.tsx index 70a9be4ee1..fa671ae335 100644 --- a/apps/backoffice-v2/src/domains/workflows/hooks/mutations/useUpdateDocumentByIdMutation/useUpdateDocumentByIdMutation.tsx +++ b/apps/backoffice-v2/src/domains/workflows/hooks/mutations/useUpdateDocumentByIdMutation/useUpdateDocumentByIdMutation.tsx @@ -41,6 +41,10 @@ export const useUpdateDocumentByIdMutation = ({ const previousWorkflow = queryClient.getQueryData(workflowById.queryKey); queryClient.setQueryData(workflowById.queryKey, (oldWorkflow: TWorkflowById) => { + if (!oldWorkflow) { + return; + } + return { ...oldWorkflow, context: { @@ -49,6 +53,7 @@ export const useUpdateDocumentByIdMutation = ({ if (doc.id === documentId) { return document; } + return doc; }), }, diff --git a/apps/backoffice-v2/src/lib/blocks/variants/DefaultBlocks/hooks/useCaseBlocksLogic/utils/get-tabs-block-map.tsx b/apps/backoffice-v2/src/lib/blocks/variants/DefaultBlocks/hooks/useCaseBlocksLogic/utils/get-tabs-block-map.tsx index 4450a1d0ff..d4b6766066 100644 --- a/apps/backoffice-v2/src/lib/blocks/variants/DefaultBlocks/hooks/useCaseBlocksLogic/utils/get-tabs-block-map.tsx +++ b/apps/backoffice-v2/src/lib/blocks/variants/DefaultBlocks/hooks/useCaseBlocksLogic/utils/get-tabs-block-map.tsx @@ -68,7 +68,6 @@ export const getTabsToBlocksMap = ( associated_companies: [ ...associatedCompaniesBlock, ...associatedCompaniesInformationBlock, - ...createKycBlocks(workflow as TWorkflowById), ...createAssociatedCompanyDocumentBlocks(workflow, blocksCreationParams), ], directors: [ diff --git a/apps/backoffice-v2/src/pages/TransactionMonitoringAlerts/components/NoAlerts/NoAlerts.tsx b/apps/backoffice-v2/src/pages/TransactionMonitoringAlerts/components/NoAlerts/NoAlerts.tsx index f1134ae17a..44f052f64e 100644 --- a/apps/backoffice-v2/src/pages/TransactionMonitoringAlerts/components/NoAlerts/NoAlerts.tsx +++ b/apps/backoffice-v2/src/pages/TransactionMonitoringAlerts/components/NoAlerts/NoAlerts.tsx @@ -3,7 +3,7 @@ import { FunctionComponent } from 'react'; export const NoAlerts: FunctionComponent = () => { return ( -