From 60c8041830a40dc2737b5bb242cec6c9af463f24 Mon Sep 17 00:00:00 2001 From: Tony Date: Sun, 17 Sep 2023 18:24:48 +0300 Subject: [PATCH] updated validationSchema --- src/components/common/person/PersonForm.tsx | 4 ++++ src/gql/person.d.ts | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/common/person/PersonForm.tsx b/src/components/common/person/PersonForm.tsx index e5d6880c3..b3b32a69a 100644 --- a/src/components/common/person/PersonForm.tsx +++ b/src/components/common/person/PersonForm.tsx @@ -22,6 +22,10 @@ const validationSchema: yup.SchemaOf = yup.object().defined().sh companyNumber: yup.string(), legalPersonName: name, address: yup.string(), + // Roles + isBeneficiary: yup.bool().notRequired(), + isCoordinator: yup.bool().notRequired(), + isOrganizer: yup.bool().notRequired(), }) const defaults: PersonFormData = { diff --git a/src/gql/person.d.ts b/src/gql/person.d.ts index 0a4bd0664..cbe0e5628 100644 --- a/src/gql/person.d.ts +++ b/src/gql/person.d.ts @@ -38,9 +38,9 @@ export type PersonFormData = { companyNumber?: string legalPersonName?: string address?: string - isBeneficiary: boolean - isCoordinator: boolean - isOrganizer: boolean + isBeneficiary?: boolean + isCoordinator?: boolean + isOrganizer?: boolean } export type CreateBeneficiaryInput = {