aboutsummaryrefslogtreecommitdiff
path: root/packages/aml-backoffice-ui/src/forms
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-11-20 14:07:28 -0300
committerSebastian <sebasjm@gmail.com>2023-11-20 14:07:28 -0300
commitb1f29d764ac81ac17a20a9929c086ff2418c6eed (patch)
tree4b856a3d2b19dfb21cdbeea259163866bad26dfa /packages/aml-backoffice-ui/src/forms
parent6138846050563e0dca95b0b6d792776925e4c35f (diff)
merge ui props and state
Diffstat (limited to 'packages/aml-backoffice-ui/src/forms')
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_11e.ts16
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_12e.ts1
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_13e.ts1
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_15e.ts4
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_1e.ts1
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_4e.ts1
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_5e.ts1
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_9e.ts1
-rw-r--r--packages/aml-backoffice-ui/src/forms/index.ts1
-rw-r--r--packages/aml-backoffice-ui/src/forms/simplest.ts4
10 files changed, 11 insertions, 20 deletions
diff --git a/packages/aml-backoffice-ui/src/forms/902_11e.ts b/packages/aml-backoffice-ui/src/forms/902_11e.ts
index a604b560e..7ed3ea42b 100644
--- a/packages/aml-backoffice-ui/src/forms/902_11e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_11e.ts
@@ -5,7 +5,6 @@ import { FlexibleForm } from "./index.js";
import { Simplest, resolutionSection } from "./simplest.js";
export const v1 = (current: BaseForm): FlexibleForm<Form902_11.Form> => ({
- versionId: "2023-05-15",
design: [
{
title:
@@ -49,8 +48,8 @@ export const v1 = (current: BaseForm): FlexibleForm<Form902_11.Form> => ({
{
type: "array",
props: {
- name: "businessEstablisher",
- label: "Persons" as TranslatedString,
+ name: "people",
+ label: "People" as TranslatedString,
required: true,
placeholder: "this is the placeholder" as TranslatedString,
fields: [
@@ -111,13 +110,12 @@ export const v1 = (current: BaseForm): FlexibleForm<Form902_11.Form> => ({
v: Partial<Form902_11.Form>,
): FormState<Form902_11.Form> {
return {
- person: {
- hidden:
- v.declares !== "controlling-in-other-ways" &&
+ people: {
+ hidden: v.declares !== "controlling-in-other-ways" &&
v.declares !== "managing-director",
- },
+ }
};
- },
+ }
});
namespace Form902_11 {
@@ -129,7 +127,7 @@ namespace Form902_11 {
export interface Form extends BaseForm {
contractingPartner: string;
declares: "25-or-more" | "controlling-in-other-ways" | "managing-director";
- person: Person[];
+ people: Person[];
fiduciaryAssets: "no" | "yes";
signature: string;
}
diff --git a/packages/aml-backoffice-ui/src/forms/902_12e.ts b/packages/aml-backoffice-ui/src/forms/902_12e.ts
index 12e885e8f..3cfe69f88 100644
--- a/packages/aml-backoffice-ui/src/forms/902_12e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_12e.ts
@@ -5,7 +5,6 @@ import { FlexibleForm } from "./index.js";
import { resolutionSection } from "./simplest.js";
export const v1 = (current: BaseForm): FlexibleForm<Form902_12.Form> => ({
- versionId: "2023-05-15",
design: [
{
title: "Foundations" as TranslatedString,
diff --git a/packages/aml-backoffice-ui/src/forms/902_13e.ts b/packages/aml-backoffice-ui/src/forms/902_13e.ts
index f03364de0..045246fc6 100644
--- a/packages/aml-backoffice-ui/src/forms/902_13e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_13e.ts
@@ -5,7 +5,6 @@ import { FlexibleForm } from "./index.js";
import { resolutionSection } from "./simplest.js";
export const v1 = (current: BaseForm): FlexibleForm<Form902_13.Form> => ({
- versionId: "2023-05-15",
design: [
{
title: "Declaration for trusts" as TranslatedString,
diff --git a/packages/aml-backoffice-ui/src/forms/902_15e.ts b/packages/aml-backoffice-ui/src/forms/902_15e.ts
index b9796add8..0d90d82ee 100644
--- a/packages/aml-backoffice-ui/src/forms/902_15e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_15e.ts
@@ -5,7 +5,6 @@ import { FlexibleForm } from "./index.js";
import { Simplest, resolutionSection } from "./simplest.js";
export const v1 = (current: BaseForm): FlexibleForm<Form902_15.Form> => ({
- versionId: "2023-05-15",
design: [
{
title:
@@ -156,8 +155,7 @@ export const v1 = (current: BaseForm): FlexibleForm<Form902_15.Form> => ({
behavior: function formBehavior(
v: Partial<Form902_15.Form>,
): FormState<Form902_15.Form> {
- return {
- };
+ return {};
},
});
diff --git a/packages/aml-backoffice-ui/src/forms/902_1e.ts b/packages/aml-backoffice-ui/src/forms/902_1e.ts
index 2cd16b840..7fcabe829 100644
--- a/packages/aml-backoffice-ui/src/forms/902_1e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_1e.ts
@@ -5,7 +5,6 @@ import { FlexibleForm, languageList } from "./index.js";
import { resolutionSection } from "./simplest.js";
export const v1 = (current: BaseForm): FlexibleForm<Form902_1.Form> => ({
- versionId: "2023-05-15",
design: [
{
title: "Information on customer" as TranslatedString,
diff --git a/packages/aml-backoffice-ui/src/forms/902_4e.ts b/packages/aml-backoffice-ui/src/forms/902_4e.ts
index 041f08c98..6f82302f3 100644
--- a/packages/aml-backoffice-ui/src/forms/902_4e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_4e.ts
@@ -7,7 +7,6 @@ import { Simplest, resolutionSection } from "./simplest.js";
import { ArrowRightIcon, ChevronRightIcon } from "../pages/Cases.js";
export const v1 = (current: BaseForm): FlexibleForm<Form902_4.Form> => ({
- versionId: "2023-05-15",
design: [
{
title: "Risk Profile AMLA" as TranslatedString,
diff --git a/packages/aml-backoffice-ui/src/forms/902_5e.ts b/packages/aml-backoffice-ui/src/forms/902_5e.ts
index c3948e1c7..d695c94b4 100644
--- a/packages/aml-backoffice-ui/src/forms/902_5e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_5e.ts
@@ -5,7 +5,6 @@ import { FlexibleForm, currencyList } from "./index.js";
import { resolutionSection } from "./simplest.js";
export const v1 = (current: BaseForm): FlexibleForm<Form902_5.Form> => ({
- versionId: "2023-05-15",
design: [
{
title: "Customer Profile" as TranslatedString,
diff --git a/packages/aml-backoffice-ui/src/forms/902_9e.ts b/packages/aml-backoffice-ui/src/forms/902_9e.ts
index a5753d5d0..e52531bcb 100644
--- a/packages/aml-backoffice-ui/src/forms/902_9e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_9e.ts
@@ -5,7 +5,6 @@ import { FlexibleForm } from "./index.js";
import { resolutionSection } from "./simplest.js";
export const v1 = (current: BaseForm): FlexibleForm<Form902_9.Form> => ({
- versionId: "2023-05-15",
design: [
{
title:
diff --git a/packages/aml-backoffice-ui/src/forms/index.ts b/packages/aml-backoffice-ui/src/forms/index.ts
index c236bbaa3..8feef0c49 100644
--- a/packages/aml-backoffice-ui/src/forms/index.ts
+++ b/packages/aml-backoffice-ui/src/forms/index.ts
@@ -3,7 +3,6 @@ import { FormState } from "../handlers/FormProvider.js";
import { DoubleColumnForm } from "../handlers/forms.js";
export interface FlexibleForm<T extends object> {
- versionId: string;
design: DoubleColumnForm;
behavior: (form: Partial<T>) => FormState<T>;
}
diff --git a/packages/aml-backoffice-ui/src/forms/simplest.ts b/packages/aml-backoffice-ui/src/forms/simplest.ts
index 9b462e1c5..5acb58201 100644
--- a/packages/aml-backoffice-ui/src/forms/simplest.ts
+++ b/packages/aml-backoffice-ui/src/forms/simplest.ts
@@ -13,7 +13,6 @@ import { FlexibleForm } from "./index.js";
import { amlStateConverter } from "../pages/ShowConsolidated.js";
export const v1 = (current: BaseForm): FlexibleForm<Simplest.Form> => ({
- versionId: "2023-05-25",
design: [
{
title: "Simple form" as TranslatedString,
@@ -33,6 +32,9 @@ export const v1 = (current: BaseForm): FlexibleForm<Simplest.Form> => ({
v: Partial<Simplest.Form>,
): FormState<Simplest.Form> {
return {
+ comment: {
+ help: ((v.comment?.length ?? 0) > 10 ? "too long" : "") as TranslatedString
+ },
threshold: {
disabled: v.state === AmlExchangeBackend.AmlState.frozen,
},