From 2c17e98c336d96f955ec82ad0a1b164e3da90103 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 15 Feb 2024 17:18:59 -0300 Subject: fix last commit --- packages/aml-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx | 9 ++++----- packages/aml-backoffice-ui/src/pages/CaseDetails.tsx | 4 +++- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'packages/aml-backoffice-ui/src/pages') diff --git a/packages/aml-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx b/packages/aml-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx index 21faff058..bab672192 100644 --- a/packages/aml-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx +++ b/packages/aml-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx @@ -3,6 +3,8 @@ import { AmountJson, Amounts, Codec, + OperationFail, + OperationOk, OperationResult, buildCodecForObject, codecForNumber, @@ -49,7 +51,7 @@ export function AntiMoneyLaunderingForm({ {}} + onUpdate={() => { }} onSubmit={(formValue) => { if (formValue.state === undefined || formValue.threshold === undefined) return; @@ -113,10 +115,7 @@ type ParseJustificationFail = export function parseJustification( s: string, listOfAllKnownForms: FormMetadata[], -): OperationResult< - { justification: Justification; metadata: FormMetadata }, - ParseJustificationFail -> { +): OperationOk<{ justification: Justification; metadata: FormMetadata }> | OperationFail { try { const justification = JSON.parse(s); const info = codecForSimpleFormMetadata().decode(justification); diff --git a/packages/aml-backoffice-ui/src/pages/CaseDetails.tsx b/packages/aml-backoffice-ui/src/pages/CaseDetails.tsx index 3da3c21ea..0875f047b 100644 --- a/packages/aml-backoffice-ui/src/pages/CaseDetails.tsx +++ b/packages/aml-backoffice-ui/src/pages/CaseDetails.tsx @@ -67,8 +67,10 @@ function titleForJustification(op: ReturnType, i18n: case "id-not-found": return "error: justification form's id not found" as TranslatedString case "version-not-found": return "error: justification form's version not found" as TranslatedString case "form-not-found": return `error: justification form not found` as TranslatedString + default: { + assertUnreachable(op.case) + } } - assertUnreachable(op.case) } export function getEventsFromAmlHistory( -- cgit v1.2.3