diff options
Diffstat (limited to 'packages/aml-backoffice-ui/src/pages/ShowConsolidated.tsx')
-rw-r--r-- | packages/aml-backoffice-ui/src/pages/ShowConsolidated.tsx | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/packages/aml-backoffice-ui/src/pages/ShowConsolidated.tsx b/packages/aml-backoffice-ui/src/pages/ShowConsolidated.tsx index 0978d8bcc..3c0301e9f 100644 --- a/packages/aml-backoffice-ui/src/pages/ShowConsolidated.tsx +++ b/packages/aml-backoffice-ui/src/pages/ShowConsolidated.tsx @@ -23,6 +23,8 @@ import { DefaultForm, FlexibleForm, UIFormField, + UIFormFieldConfig, + UIHandlerId, useTranslationContext, } from "@gnu-taler/web-util/browser"; import { format } from "date-fns"; @@ -40,22 +42,8 @@ export function ShowConsolidated({ const cons = getConsolidated(history, until); - const form: FlexibleForm<Consolidated> = { - behavior: (form) => { - return { - aml: { - threshold: { - hidden: !form.aml, - }, - since: { - hidden: !form.aml, - }, - state: { - hidden: !form.aml, - }, - }, - }; - }, + const form: FlexibleForm = { + type: "double-column", design: [ { title: i18n.str`AML`, @@ -63,6 +51,8 @@ export function ShowConsolidated({ { type: "amount", properties: { + id: ".aml.threshold" as UIHandlerId, + currency: "NETZBON", label: i18n.str`Threshold`, name: "aml.threshold", }, @@ -72,7 +62,7 @@ export function ShowConsolidated({ properties: { label: i18n.str`State`, name: "aml.state", - + id: ".aml.state" as UIHandlerId, choices: [ { label: i18n.str`Frozen`, @@ -95,10 +85,11 @@ export function ShowConsolidated({ ? { title: i18n.str`KYC`, fields: Object.entries(cons.kyc).map(([key, field]) => { - const result: UIFormField = { + const result: UIFormFieldConfig = { type: "text", properties: { label: key as TranslatedString, + id: `kyc.${key}.value` as UIHandlerId, name: `kyc.${key}.value`, help: `${field.provider} since ${ field.since.t_ms === "never" @@ -110,7 +101,7 @@ export function ShowConsolidated({ return result; }), } - : undefined, + : undefined!, ], }; return ( @@ -123,7 +114,7 @@ export function ShowConsolidated({ </h1> <DefaultForm key={`${String(Date.now())}`} - form={form} + form={form as any} initial={cons} readOnly onUpdate={() => {}} |