Skip to content

Commit 87c67d2

Browse files
committed
feat: refactor
1 parent 8cd0821 commit 87c67d2

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

apps/backoffice-v2/src/common/components/molecules/ProcessTracker/trackers/ubo-flows/hooks/useUBOFlowsTrackerItems/helpers/get-end-user-flow-status.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { endUserFlowStatusToIcon } from '@/common/components/molecules/ProcessTracker/constants';
22
import { TWorkflowById } from '@/domains/workflows/fetchers';
33

4-
export const getEndUserFlowStatus = (endUser: TWorkflowById['endUsers'][number]) => {
5-
const { status } = endUser.individualVerificationsChecks || {};
6-
4+
export const getEndUserFlowStatus = (
5+
status: NonNullable<TWorkflowById['endUsers'][number]['individualVerificationsChecks']>['status'],
6+
) => {
77
return (
88
endUserFlowStatusToIcon[status as keyof typeof endUserFlowStatusToIcon] ??
99
endUserFlowStatusToIcon.DEFAULT

apps/backoffice-v2/src/common/components/molecules/ProcessTracker/trackers/ubo-flows/hooks/useUBOFlowsTrackerItems/useUBOFlowsTrackerItems.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const useUBOFlowsTrackerItems = (endUsers: TWorkflowById['endUsers']) =>
99
endUsers?.map(endUser => {
1010
return {
1111
text: `${valueOrNA(endUser.firstName)} ${valueOrNA(endUser.lastName)}`,
12-
leftIcon: getEndUserFlowStatus(endUser),
12+
leftIcon: getEndUserFlowStatus(endUser.individualVerificationsChecks?.status),
1313
};
1414
}) || [],
1515
[endUsers],

apps/backoffice-v2/src/lib/blocks/hooks/useDocumentBlocks/hooks/useDocuments/useDocuments.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ export const useDocuments = (workflow: TWorkflowById) => {
3636
useUbosDocuments(workflow as TWorkflowById),
3737
];
3838

39-
console.log('ubo documents', ubosDocuments);
40-
4139
const businessDocumentsWithEntity = useMemo(
4240
() =>
4341
businessDocuments.map(document => ({

0 commit comments

Comments
 (0)