aboutsummaryrefslogtreecommitdiff
path: root/packages/aml-backoffice-ui/src/forms
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-12-29 17:42:11 -0300
committerSebastian <sebasjm@gmail.com>2023-12-29 17:42:11 -0300
commita37abd2472ac2d521e81838632050963157f00af (patch)
treeef50fbaa71b3b7f8f911a608b17ecb858d291b75 /packages/aml-backoffice-ui/src/forms
parent4d4ef3f6d42ce743d3735d4b4088b38c4042805f (diff)
fine tune dynamic forms
Diffstat (limited to 'packages/aml-backoffice-ui/src/forms')
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_11e.ts4
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_12e.ts2
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_13e.ts2
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_15e.ts2
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_1e.ts3
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_4e.ts4
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_5e.ts3
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_9e.ts2
-rw-r--r--packages/aml-backoffice-ui/src/forms/index.ts6
-rw-r--r--packages/aml-backoffice-ui/src/forms/simplest.ts6
10 files changed, 15 insertions, 19 deletions
diff --git a/packages/aml-backoffice-ui/src/forms/902_11e.ts b/packages/aml-backoffice-ui/src/forms/902_11e.ts
index 7ed3ea42b..b2943a1d4 100644
--- a/packages/aml-backoffice-ui/src/forms/902_11e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_11e.ts
@@ -1,8 +1,8 @@
import { TranslatedString } from "@gnu-taler/taler-util";
import { FormState } from "../handlers/FormProvider.js";
import { BaseForm } from "../pages/AntiMoneyLaunderingForm.js";
-import { FlexibleForm } from "./index.js";
-import { Simplest, resolutionSection } from "./simplest.js";
+import { resolutionSection } from "./simplest.js";
+import { FlexibleForm } from "../handlers/forms.js";
export const v1 = (current: BaseForm): FlexibleForm<Form902_11.Form> => ({
design: [
diff --git a/packages/aml-backoffice-ui/src/forms/902_12e.ts b/packages/aml-backoffice-ui/src/forms/902_12e.ts
index 3cfe69f88..815d75c49 100644
--- a/packages/aml-backoffice-ui/src/forms/902_12e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_12e.ts
@@ -1,8 +1,8 @@
import { AbsoluteTime, TranslatedString } from "@gnu-taler/taler-util";
import { FormState } from "../handlers/FormProvider.js";
import { BaseForm } from "../pages/AntiMoneyLaunderingForm.js";
-import { FlexibleForm } from "./index.js";
import { resolutionSection } from "./simplest.js";
+import { FlexibleForm } from "../handlers/forms.js";
export const v1 = (current: BaseForm): FlexibleForm<Form902_12.Form> => ({
design: [
diff --git a/packages/aml-backoffice-ui/src/forms/902_13e.ts b/packages/aml-backoffice-ui/src/forms/902_13e.ts
index 045246fc6..7f5887de2 100644
--- a/packages/aml-backoffice-ui/src/forms/902_13e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_13e.ts
@@ -1,8 +1,8 @@
import { AbsoluteTime, TranslatedString } from "@gnu-taler/taler-util";
import { FormState } from "../handlers/FormProvider.js";
import { BaseForm, } from "../pages/AntiMoneyLaunderingForm.js";
-import { FlexibleForm } from "./index.js";
import { resolutionSection } from "./simplest.js";
+import { FlexibleForm } from "../handlers/forms.js";
export const v1 = (current: BaseForm): FlexibleForm<Form902_13.Form> => ({
design: [
diff --git a/packages/aml-backoffice-ui/src/forms/902_15e.ts b/packages/aml-backoffice-ui/src/forms/902_15e.ts
index 6689896ab..10a2533d4 100644
--- a/packages/aml-backoffice-ui/src/forms/902_15e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_15e.ts
@@ -1,7 +1,7 @@
import { AbsoluteTime, TranslatedString } from "@gnu-taler/taler-util";
import { BaseForm } from "../pages/AntiMoneyLaunderingForm.js";
-import { FlexibleForm } from "./index.js";
import { resolutionSection } from "./simplest.js";
+import { FlexibleForm } from "../handlers/forms.js";
export const v1 = (current: BaseForm): FlexibleForm<Form902_15.Form> => ({
design: [
diff --git a/packages/aml-backoffice-ui/src/forms/902_1e.ts b/packages/aml-backoffice-ui/src/forms/902_1e.ts
index 7fcabe829..e2faff63e 100644
--- a/packages/aml-backoffice-ui/src/forms/902_1e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_1e.ts
@@ -1,8 +1,9 @@
import { AbsoluteTime, TranslatedString } from "@gnu-taler/taler-util";
import { FormState } from "../handlers/FormProvider.js";
import { BaseForm } from "../pages/AntiMoneyLaunderingForm.js";
-import { FlexibleForm, languageList } from "./index.js";
+import { languageList } from "./index.js";
import { resolutionSection } from "./simplest.js";
+import { FlexibleForm } from "../handlers/forms.js";
export const v1 = (current: BaseForm): FlexibleForm<Form902_1.Form> => ({
design: [
diff --git a/packages/aml-backoffice-ui/src/forms/902_4e.ts b/packages/aml-backoffice-ui/src/forms/902_4e.ts
index 6f82302f3..540e05bf6 100644
--- a/packages/aml-backoffice-ui/src/forms/902_4e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_4e.ts
@@ -1,10 +1,10 @@
import { AbsoluteTime, TranslatedString } from "@gnu-taler/taler-util";
import { h as create } from "preact";
import { FormState } from "../handlers/FormProvider.js";
+import { FlexibleForm } from "../handlers/forms.js";
import { BaseForm } from "../pages/AntiMoneyLaunderingForm.js";
-import { FlexibleForm } from "./index.js";
-import { Simplest, resolutionSection } from "./simplest.js";
import { ArrowRightIcon, ChevronRightIcon } from "../pages/Cases.js";
+import { resolutionSection } from "./simplest.js";
export const v1 = (current: BaseForm): FlexibleForm<Form902_4.Form> => ({
design: [
diff --git a/packages/aml-backoffice-ui/src/forms/902_5e.ts b/packages/aml-backoffice-ui/src/forms/902_5e.ts
index d695c94b4..fe545481f 100644
--- a/packages/aml-backoffice-ui/src/forms/902_5e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_5e.ts
@@ -1,8 +1,9 @@
import { TranslatedString } from "@gnu-taler/taler-util";
import { FormState } from "../handlers/FormProvider.js";
import { BaseForm } from "../pages/AntiMoneyLaunderingForm.js";
-import { FlexibleForm, currencyList } from "./index.js";
+import { currencyList } from "./index.js";
import { resolutionSection } from "./simplest.js";
+import { FlexibleForm } from "../handlers/forms.js";
export const v1 = (current: BaseForm): FlexibleForm<Form902_5.Form> => ({
design: [
diff --git a/packages/aml-backoffice-ui/src/forms/902_9e.ts b/packages/aml-backoffice-ui/src/forms/902_9e.ts
index e52531bcb..d1604dab2 100644
--- a/packages/aml-backoffice-ui/src/forms/902_9e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_9e.ts
@@ -1,8 +1,8 @@
import { AbsoluteTime, TranslatedString } from "@gnu-taler/taler-util";
import { FormState } from "../handlers/FormProvider.js";
import { BaseForm } from "../pages/AntiMoneyLaunderingForm.js";
-import { FlexibleForm } from "./index.js";
import { resolutionSection } from "./simplest.js";
+import { FlexibleForm } from "../handlers/forms.js";
export const v1 = (current: BaseForm): FlexibleForm<Form902_9.Form> => ({
design: [
diff --git a/packages/aml-backoffice-ui/src/forms/index.ts b/packages/aml-backoffice-ui/src/forms/index.ts
index 74407ed82..32de4fbd3 100644
--- a/packages/aml-backoffice-ui/src/forms/index.ts
+++ b/packages/aml-backoffice-ui/src/forms/index.ts
@@ -1,11 +1,5 @@
import { TranslatedString } from "@gnu-taler/taler-util";
-import { FormState } from "../handlers/FormProvider.js";
-import { DoubleColumnForm } from "../handlers/forms.js";
-export interface FlexibleForm<T extends object> {
- design: DoubleColumnForm;
- behavior?: (form: Partial<T>) => FormState<T>;
-}
export const languageList = [
{
diff --git a/packages/aml-backoffice-ui/src/forms/simplest.ts b/packages/aml-backoffice-ui/src/forms/simplest.ts
index 778d20b75..5a8d370c9 100644
--- a/packages/aml-backoffice-ui/src/forms/simplest.ts
+++ b/packages/aml-backoffice-ui/src/forms/simplest.ts
@@ -5,11 +5,10 @@ import {
TranslatedString,
} from "@gnu-taler/taler-util";
import { FormState } from "../handlers/FormProvider.js";
-import { DoubleColumnFormSection } from "../handlers/forms.js";
+import { DoubleColumnFormSection, FlexibleForm } from "../handlers/forms.js";
import { BaseForm } from "../pages/AntiMoneyLaunderingForm.js";
import { AmlExchangeBackend } from "../types.js";
-import { FlexibleForm } from "./index.js";
import { amlStateConverter } from "../pages/ShowConsolidated.js";
export const v1 = (current: BaseForm): FlexibleForm<Simplest.Form> => ({
@@ -33,7 +32,8 @@ export const v1 = (current: BaseForm): FlexibleForm<Simplest.Form> => ({
): FormState<Simplest.Form> {
return {
comment: {
- help: ((v.comment?.length ?? 0) > 100 ? "keep it short" : "") as TranslatedString
+ help: ((v.comment?.length ?? 0) > 100 ? "keep it short" : "") as TranslatedString,
+
},
threshold: {
disabled: v.state === AmlExchangeBackend.AmlState.frozen,