summaryrefslogtreecommitdiff
path: root/packages/aml-backoffice-ui/src/forms/902_1e.ts
blob: 2287db3698869bf845b3f194d66d11a38726202a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
import type { AbsoluteTime, TranslatedString } from "@gnu-taler/taler-util";
import type { FlexibleForm, FormState, InternationalizationAPI } from "@gnu-taler/web-util/browser";
import { BaseForm, uiForms } from "./declaration.js";
import { resolutionSection } from "./simplest.js";

export const v1 = (i18n: InternationalizationAPI) => (current: BaseForm): FlexibleForm<Form902_1.Form> => ({
  design: [
    {
      title: i18n.str`Information on customer`,
      description:
        i18n.str`The customer is the person with whom the member concludes the contract with regard to the financial service provided (civil law). Does the member act as director of a domiciliary company, this domiciliary company is the customer.`,
      fields: [
        {
          type: "choiceStacked",
          props: {
            name: "customerType",
            label: i18n.str`Type of customer`,
            required: true,
            choices: [
              {
                label: i18n.str`Natural person`,
                value: "natural",
              },
              {
                label: i18n.str`Legal entity`,
                value: "legal",
              },
            ],
          },
        },
        {
          type: "text",
          props: {
            name: "naturalCustomer.fullName",
            label: i18n.str`Full name`,
            required: true,
          },
        },
        {
          type: "text",
          props: {
            name: "naturalCustomer.address",
            label: i18n.str`Residential address`,
            required: true,
          },
        },
        {
          type: "integer",
          props: {
            name: "naturalCustomer.telephone",
            label: i18n.str`Telephone`,
          },
        },
        {
          type: "text",
          props: {
            name: "naturalCustomer.email",
            label: i18n.str`E-mail`,
          },
        },
        {
          type: "absoluteTime",
          props: {
            name: "naturalCustomer.dateOfBirth",
            label: i18n.str`Date of birth`,
            required: true,
            // help: i18n.str`format 'dd/MM/yyyy'`,
          },
        },
        {
          type: "text",
          props: {
            name: "naturalCustomer.nationality",
            label: i18n.str`Nationality`,
            required: true,
          },
        },
        {
          type: "text",
          props: {
            name: "naturalCustomer.document",
            label: i18n.str`Identification document`,
            required: true,
          },
        },
        {
          type: "file",
          props: {
            name: "naturalCustomer.documentAttachment",
            label: i18n.str`Document attachment`,
            required: true,
            maxBites: 2 * 1024 * 1024,
            accept: ".png",
            help: i18n.str`Max size of 2 mega bytes`,
          },
        },
        {
          type: "text",
          props: {
            name: "naturalCustomer.companyName",
            label: i18n.str`Company name`,
          },
        },
        {
          type: "text",
          props: {
            name: "naturalCustomer.office",
            label: i18n.str`Registered office`,
          },
        },
        {
          type: "text",
          props: {
            name: "naturalCustomer.companyDocument",
            label: i18n.str`Company identification document`,
          },
        },
        {
          type: "file",
          props: {
            name: "naturalCustomer.companyDocumentAttachment",
            label: i18n.str`Document attachment`,
            required: true,
            maxBites: 2 * 1024 * 1024,
            accept: ".png",
            help: i18n.str`Max size of 2 mega bytes`,
          },
        },
        {
          type: "text",
          props: {
            name: "legalCustomer.companyName",
            label: i18n.str`Company name`,
            required: true,
          },
        },
        {
          type: "text",
          props: {
            name: "legalCustomer.domicile",
            label: i18n.str`Domicile`,
            required: true,
          },
        },
        {
          type: "text",
          props: {
            name: "legalCustomer.contactPerson",
            label: i18n.str`Contact person`,
          },
        },
        {
          type: "text",
          props: {
            name: "legalCustomer.telephone",
            label: i18n.str`Telephone`,
          },
        },
        {
          type: "text",
          props: {
            name: "legalCustomer.email",
            label: i18n.str`E-mail`,
          },
        },
        {
          type: "text",
          props: {
            name: "legalCustomer.document",
            label: i18n.str`Identification document`,
            help: i18n.str`Not older than 12 month`,
          },
        },
        {
          type: "file",
          props: {
            name: "legalCustomer.documentAttachment",
            label: i18n.str`Document attachment`,
            required: true,
            maxBites: 2 * 1024 * 1024,
            accept: ".png",
            help: i18n.str`Max size of 2 mega bytes`,
          },
        },
      ],
    },
    {
      title:
        i18n.str`Information on the natural persons who establish the business relationship for legal entities and partnerships`,
      description:
        i18n.str`For legal entities and partnerships the identity of the natural persons who establish the business relationship must be verified.`,
      fields: [
        {
          type: "array",
          props: {
            name: "businessEstablisher",
            label: i18n.str`Persons`,
            required: true,
            placeholder: i18n.str`this is the placeholder`,
            fields: [
              {
                type: "text",
                props: {
                  name: "fullName",
                  label: i18n.str`Full name`,
                  required: true,
                },
              },
              {
                type: "text",
                props: {
                  name: "address",
                  label: i18n.str`Residential address`,
                  required: true,
                },
              },
              {
                type: "absoluteTime",
                props: {
                  name: "dateOfBirth",
                  label: i18n.str`Date of birth`,
                  required: true,
                  // help: i18n.str`format 'dd/MM/yyyy'`,
                },
              },
              {
                type: "text",
                props: {
                  name: "nationality",
                  label: i18n.str`Nationality`,
                  required: true,
                },
              },
              {
                type: "text",
                props: {
                  name: "typeOfAuthorization",
                  label:
                    i18n.str`Type of authorization (signatory of representation)`,
                  required: true,
                },
              },
              {
                type: "file",
                props: {
                  name: "documentAttachment",
                  label:
                    i18n.str`Identification document attachment`,
                  required: true,
                  maxBites: 2 * 1024 * 1024,
                  accept: ".png",
                  help: i18n.str`Max size of 2 mega bytes`,
                },
              },
              {
                type: "choiceStacked",
                props: {
                  name: "powerOfAttorneyArrangements",
                  label: i18n.str`Power of attorney arrangements`,
                  required: true,
                  choices: [
                    {
                      label: i18n.str`CR extract`,
                      value: "cr",
                    },
                    {
                      label: i18n.str`Mandate`,
                      value: "mandate",
                    },
                    {
                      label: i18n.str`Other`,
                      value: "other",
                    },
                  ],
                },
              },
              {
                type: "text",
                props: {
                  name: "powerOfAttorneyArrangementsOther",
                  label: i18n.str`Power of attorney arrangements`,
                  required: true,
                },
              },
            ],
            labelField: "fullName",
          },
        },
      ],
    },
    {
      title: i18n.str`Acceptance of business relationship`,
      fields: [
        {
          type: "absoluteTime",
          props: {
            name: "acceptance.when",
            pattern: "dd/MM/yyyy",
            label: i18n.str`Date (conclusion of contract)`,
            // help: i18n.str`format 'dd/MM/yyyy'`,
          },
        },
        {
          type: "choiceStacked",
          props: {
            name: "acceptance.acceptedBy",
            label: i18n.str`Accepted by`,
            required: true,
            choices: [
              {
                label: i18n.str`Face-to-face meeting with customer`,
                value: "face-to-face",
              },
              {
                label:
                  i18n.str`Correspondence: authenticated copy of identification document obtained`,
                value: "correspondence-document",
              },
              {
                label:
                  i18n.str`Correspondence: residential address validated`,
                value: "correspondence-address",
              },
            ],
          },
        },
        {
          type: "choiceStacked",
          props: {
            name: "acceptance.typeOfCorrespondence",
            label: i18n.str`Type of correspondence service`,
            choices: [
              {
                label: i18n.str`to the customer`,
                value: "customer",
              },
              {
                label: i18n.str`hold at bank`,
                value: "bank",
              },
              {
                label: i18n.str`to the member`,
                value: "member",
              },
              {
                label: i18n.str`to a third party`,
                value: "third-party",
              },
            ],
          },
        },
        {
          type: "text",
          props: {
            name: "acceptance.thirdPartyFullName",
            label: i18n.str`Third party full name`,
            required: true,
          },
        },
        {
          type: "text",
          props: {
            name: "acceptance.thirdPartyAddress",
            label: i18n.str`Third party  address`,
            required: true,
          },
        },
        {
          type: "selectMultiple",
          props: {
            name: "acceptance.language",
            label: i18n.str`Languages`,
            choices: uiForms.currencies(i18n),
            unique: true,
          },
        },
        {
          type: "textArea",
          props: {
            name: "acceptance.furtherInformation",
            label: i18n.str`Further information`,
          },
        },
      ],
    },
    {
      title:
        i18n.str`Information on the beneficial owner of the assets and/or controlling person`,
      description:
        i18n.str`Establishment of the beneficial owner of the assets and/or controlling person`,
      fields: [
        {
          type: "choiceStacked",
          props: {
            name: "establishment",
            label: i18n.str`The customer is`,
            required: true,
            choices: [
              {
                label:
                  i18n.str`a natural person and there are no doubts that this person is the sole beneficial owner of the assets`,
                value: "natural",
              },
              {
                label:
                  i18n.str`a foundation (or a similar construct; incl. underlying companies)`,
                value: "foundation",
              },
              {
                label:
                  i18n.str`a trust (incl. underlying companies)`,
                value: "trust",
              },
              {
                label:
                  i18n.str`a life insurance policy with separately managed accounts/securities accounts`,
                value: "insurance-wrapper",
              },
              {
                label: i18n.str`all other cases`,
                value: "other",
              },
            ],
          },
        },
      ],
    },
    {
      title:
        i18n.str`Evaluation with regard to embargo procedures/terrorism lists on establishing the business relationship`,
      description:
        i18n.str`Verification whether the customer, beneficial owners of the assets, controlling persons, authorized representatives or other involved persons are listed on an embargo/terrorism list (date of verification/result)`,
      fields: [
        {
          type: "textArea",
          props: {
            name: "embargoEvaluation",
            help: i18n.str`The evaluation must be made at the beginning of the business relationship and has to be repeated in the case of permanent business relationship every time the according lists are updated.`,
            label: i18n.str`Evaluation`,
          },
        },
      ],
    },
    {
      title:
        i18n.str`In the case of cash transactions/occasional customers: Information on type and purpose of business relationship`,
      description:
        i18n.str`These details are only necessary for occasional customers, i.e. money exchange, money and asset transfer or other cash transactions provided that no customer profile (VQF doc. No. 902.5) is created`,
      fields: [
        {
          type: "choiceStacked",
          props: {
            name: "cashTransactions.typeOfBusiness",
            label: i18n.str`Type of business relationship`,
            choices: [
              {
                label: i18n.str`Money exchange`,
                value: "money-exchange",
              },
              {
                label: i18n.str`Money and asset transfer`,
                value: "money-and-asset-transfer",
              },
              {
                label:
                  i18n.str`Other cash transactions. Specify below`,
                value: "other",
              },
            ],
          },
        },
        {
          type: "text",
          props: {
            name: "cashTransactions.otherTypeOfBusiness",
            required: true,
            label: i18n.str`Specify other cash transactions:`,
          },
        },
        {
          type: "textArea",
          props: {
            name: "cashTransactions.purpose",
            label:
              i18n.str`Purpose of the business relationship (purpose of service requested)`,
          },
        },
      ],
    },
    resolutionSection(current, i18n),
  ],
  behavior: function formBehavior(
    v: Partial<Form902_1.Form>,
  ): FormState<Form902_1.Form> {
    return {
      fullName: {
        disabled: true,
      },
      businessEstablisher: {
        elements: (v.businessEstablisher ?? []).map((be) => {
          return {
            powerOfAttorneyArrangementsOther: {
              hidden: be.powerOfAttorneyArrangements !== "other",
            },
          };
        }),
      },
      acceptance: {
        thirdPartyFullName: {
          hidden: v.acceptance?.typeOfCorrespondence !== "third-party",
        },
        thirdPartyAddress: {
          hidden: v.acceptance?.typeOfCorrespondence !== "third-party",
        },
      },
      cashTransactions: {
        otherTypeOfBusiness: {
          hidden: v.cashTransactions?.typeOfBusiness !== "other",
        },
      },
      naturalCustomer: {
        fullName: {
          hidden: v.customerType !== "natural",
        },
        address: {
          hidden: v.customerType !== "natural",
        },
        telephone: {
          hidden: v.customerType !== "natural",
        },
        email: {
          hidden: v.customerType !== "natural",
        },
        dateOfBirth: {
          hidden: v.customerType !== "natural",
        },
        nationality: {
          hidden: v.customerType !== "natural",
        },
        document: {
          hidden: v.customerType !== "natural",
        },
        companyName: {
          hidden: v.customerType !== "natural",
        },
        office: {
          hidden: v.customerType !== "natural",
        },
        companyDocument: {
          hidden: v.customerType !== "natural",
        },
        companyDocumentAttachment: {
          hidden: v.customerType !== "natural",
        },
        documentAttachment: {
          hidden: v.customerType !== "natural",
        },
      },
      legalCustomer: {
        companyName: {
          hidden: v.customerType !== "legal",
        },
        contactPerson: {
          hidden: v.customerType !== "legal",
        },
        document: {
          hidden: v.customerType !== "legal",
        },
        domicile: {
          hidden: v.customerType !== "legal",
        },
        email: {
          hidden: v.customerType !== "legal",
        },
        telephone: {
          hidden: v.customerType !== "legal",
        },
        documentAttachment: {
          hidden: v.customerType !== "legal",
        },
      },
    };
  },
});

namespace Form902_1 {
  interface LegalEntityCustomer {
    companyName: string;
    domicile: string;
    contactPerson: string;
    telephone: string;
    email: string;
    document: string;
    documentAttachment: string;
  }
  interface NaturalCustomer {
    fullName: string;
    address: string;
    telephone: string;
    email: string;
    dateOfBirth: AbsoluteTime;
    nationality: string;
    document: string;
    documentAttachment: string;
    companyName: string;
    office: string;
    companyDocument: string;
    companyDocumentAttachment: string;
  }

  interface Person {
    fullName: string;
    address: string;
    dateOfBirth: AbsoluteTime;
    nationality: string;
    typeOfAuthorization: string;
    document: string;
    documentAttachment: string;
    powerOfAttorneyArrangements: "cr" | "mandate" | "other";
    powerOfAttorneyArrangementsOther: string;
  }

  interface Acceptance {
    when: AbsoluteTime;
    acceptedBy: "face-to-face" | "authenticated-copy";
    typeOfCorrespondence: string;
    language: string[];
    furtherInformation: string;
    thirdPartyFullName: string;
    thirdPartyAddress: string;
  }

  interface BeneficialOwner {
    establishment:
    | "natural-person"
    | "foundation"
    | "trust"
    | "insurance-wrapper"
    | "other";
  }

  interface CashTransactions {
    typeOfBusiness: "money-exchange" | "money-and-asset-transfer" | "other";
    otherTypeOfBusiness: string;
    purpose: string;
  }

  export interface Form extends BaseForm {
    fullName: string;
    customerType: "natural" | "legal";
    naturalCustomer: NaturalCustomer;
    legalCustomer: LegalEntityCustomer;
    businessEstablisher: Array<Person>;
    acceptance: Acceptance;
    beneficialOwner: BeneficialOwner;
    embargoEvaluation: string;
    cashTransactions: CashTransactions;
    // enclosures: Enclosures;
  }
}