commit da3a1145c0f437cb47d2153da1006c987aab6f2c
parent 0ccedd20315d534426a3fa1a1001c1a1396d89d1
Author: Florian Dold <florian@dold.me>
Date: Fri, 9 May 2025 00:23:03 +0200
do not mix personal/company identification doc
Diffstat:
1 file changed, 27 insertions(+), 17 deletions(-)
diff --git a/packages/web-util/src/forms/gana/VQF_902_1_customer.ts b/packages/web-util/src/forms/gana/VQF_902_1_customer.ts
@@ -14,6 +14,7 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
+import { TalerFormAttributes } from "@gnu-taler/taler-util";
import { isFuture, parse } from "date-fns";
import {
DoubleColumnFormDesign,
@@ -21,7 +22,6 @@ import {
UIFormElementConfig,
} from "../../index.browser.js";
import { countryNationalityList } from "../../utils/select-ui-lists.js";
-import { TalerFormAttributes } from "@gnu-taler/taler-util";
const Descr = {
CUSTOMER_INFO_TYPE: (
@@ -38,17 +38,6 @@ export const form_vqf_902_1_customer = (i18n: InternationalizationAPI) => ({
config: design_VQF_902_1_customer(i18n),
});
-const fieldPersonalId = (
- i18n: InternationalizationAPI,
-): UIFormElementConfig => ({
- id: TalerFormAttributes.PERSONAL_IDENTIFICATION_DOCUMENT_COPY,
- label: i18n.str`Copy of identification document`,
- type: "file",
- accept: "application/pdf",
- tooltip: i18n.str`Only official government IDs (incl. passports) are accepted. Please scan both sides if applicable.`,
- required: true,
-});
-
const fieldCorrespondenceLanguage = (
i18n: InternationalizationAPI,
): UIFormElementConfig => ({
@@ -164,7 +153,14 @@ export function design_VQF_902_1_customer(
preferredChoiceVals: ["CH"],
required: true,
},
- fieldPersonalId(i18n),
+ {
+ id: TalerFormAttributes.PERSONAL_IDENTIFICATION_DOCUMENT_COPY,
+ label: i18n.str`Copy of identification document`,
+ type: "file",
+ accept: "application/pdf",
+ tooltip: i18n.str`Only official government IDs (incl. passports) are accepted. Please scan both sides if applicable.`,
+ required: true,
+ },
{
id: TalerFormAttributes.CUSTOMER_IS_SOLE_PROPRIETOR,
label: i18n.str`Sole proprietor`,
@@ -199,7 +195,7 @@ export function design_VQF_902_1_customer(
id: TalerFormAttributes.LEGAL_ENTITY_IDENTIFICATION_DOCUMENT_COPY,
label: i18n.str`Company identification document`,
type: "file",
- required: false,
+ required: true,
accept: "application/pdf",
},
],
@@ -241,7 +237,13 @@ export function design_VQF_902_1_customer(
type: "text",
required: false,
},
- fieldPersonalId(i18n),
+ {
+ id: TalerFormAttributes.LEGAL_ENTITY_IDENTIFICATION_DOCUMENT_COPY,
+ label: i18n.str`Copy of identification document (not older than 12 months)`,
+ type: "file",
+ accept: "application/pdf",
+ required: true,
+ },
],
},
{
@@ -302,10 +304,18 @@ export function design_VQF_902_1_customer(
preferredChoiceVals: ["CH"],
required: true,
},
- fieldPersonalId(i18n),
+ {
+ id: TalerFormAttributes.PERSONAL_IDENTIFICATION_DOCUMENT_COPY,
+ label: i18n.str`Copy of identification document`,
+ type: "file",
+ accept: "application/pdf",
+ tooltip: i18n.str`Only official government IDs (incl. passports) are accepted. Please scan both sides if applicable.`,
+ required: true,
+ },
{
id: TalerFormAttributes.SIGNING_AUTHORITY_TYPE,
- label: i18n.str`Signing authority of the person`,
+ tooltip: i18n.str`Signing authority of the person`,
+ label: i18n.str`Power of attorney arrangements`,
type: "choiceStacked",
required: true,
choices: [