diff options
author | Sebastian <sebasjm@gmail.com> | 2024-05-09 18:02:19 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-05-09 18:02:19 -0300 |
commit | 2375c1c1c8095b4d38dd2afa878705ad3bb216e1 (patch) | |
tree | 0580af464796aee06b90b76b864af3aa5e293c33 /packages/aml-backoffice-ui/src/pages | |
parent | 5ec065a90be3a0bd4a85ca4fdb949fb5f643db96 (diff) | |
download | wallet-core-2375c1c1c8095b4d38dd2afa878705ad3bb216e1.tar.xz |
documentation updated: change some types
Diffstat (limited to 'packages/aml-backoffice-ui/src/pages')
-rw-r--r-- | packages/aml-backoffice-ui/src/pages/CaseUpdate.tsx | 1 | ||||
-rw-r--r-- | packages/aml-backoffice-ui/src/pages/ShowConsolidated.tsx | 75 |
2 files changed, 34 insertions, 42 deletions
diff --git a/packages/aml-backoffice-ui/src/pages/CaseUpdate.tsx b/packages/aml-backoffice-ui/src/pages/CaseUpdate.tsx index 712a1fed9..7801625d0 100644 --- a/packages/aml-backoffice-ui/src/pages/CaseUpdate.tsx +++ b/packages/aml-backoffice-ui/src/pages/CaseUpdate.tsx @@ -145,7 +145,6 @@ export function CaseUpdate({ const validatedForm = state.status !== "ok" ? undefined : state.result; - console.log(state.errors); const submitHandler = validatedForm === undefined ? undefined diff --git a/packages/aml-backoffice-ui/src/pages/ShowConsolidated.tsx b/packages/aml-backoffice-ui/src/pages/ShowConsolidated.tsx index 3c0301e9f..cdc5d0bc1 100644 --- a/packages/aml-backoffice-ui/src/pages/ShowConsolidated.tsx +++ b/packages/aml-backoffice-ui/src/pages/ShowConsolidated.tsx @@ -21,11 +21,10 @@ import { } from "@gnu-taler/taler-util"; import { DefaultForm, - FlexibleForm, - UIFormField, - UIFormFieldConfig, + FormConfiguration, + UIFormElementConfig, UIHandlerId, - useTranslationContext, + useTranslationContext } from "@gnu-taler/web-util/browser"; import { format } from "date-fns"; import { Fragment, VNode, h } from "preact"; @@ -42,7 +41,7 @@ export function ShowConsolidated({ const cons = getConsolidated(history, until); - const form: FlexibleForm = { + const form: FormConfiguration = { type: "double-column", design: [ { @@ -50,34 +49,30 @@ export function ShowConsolidated({ fields: [ { type: "amount", - properties: { - id: ".aml.threshold" as UIHandlerId, - currency: "NETZBON", - label: i18n.str`Threshold`, - name: "aml.threshold", - }, + id: ".aml.threshold" as UIHandlerId, + currency: "NETZBON", + label: i18n.str`Threshold`, + name: "aml.threshold", }, { type: "choiceHorizontal", - properties: { - label: i18n.str`State`, - name: "aml.state", - id: ".aml.state" as UIHandlerId, - choices: [ - { - label: i18n.str`Frozen`, - value: "frozen", - }, - { - label: i18n.str`Pending`, - value: "pending", - }, - { - label: i18n.str`Normal`, - value: "normal", - }, - ], - }, + label: i18n.str`State`, + name: "aml.state", + id: ".aml.state" as UIHandlerId, + choices: [ + { + label: i18n.str`Frozen`, + value: "frozen", + }, + { + label: i18n.str`Pending`, + value: "pending", + }, + { + label: i18n.str`Normal`, + value: "normal", + }, + ], }, ], }, @@ -85,18 +80,16 @@ export function ShowConsolidated({ ? { title: i18n.str`KYC`, fields: Object.entries(cons.kyc).map(([key, field]) => { - const result: UIFormFieldConfig = { + const result: UIFormElementConfig = { 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" - ? "never" - : format(field.since.t_ms, "dd/MM/yyyy") - }` as TranslatedString, - }, + label: key as TranslatedString, + id: `kyc.${key}.value` as UIHandlerId, + name: `kyc.${key}.value`, + help: `${field.provider} since ${ + field.since.t_ms === "never" + ? "never" + : format(field.since.t_ms, "dd/MM/yyyy") + }` as TranslatedString, }; return result; }), |