From be331dc0301452720f266c5293bbf14d3b3ad4fa Mon Sep 17 00:00:00 2001 From: Loup Theron Date: Thu, 9 May 2024 17:25:46 +0200 Subject: [PATCH] Fix types --- .../ControlUnitDialog/ControlUnitContactList/constants.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/ControlUnit/components/ControlUnitDialog/ControlUnitContactList/constants.ts b/frontend/src/features/ControlUnit/components/ControlUnitDialog/ControlUnitContactList/constants.ts index 25700d37b0..b9689362da 100644 --- a/frontend/src/features/ControlUnit/components/ControlUnitDialog/ControlUnitContactList/constants.ts +++ b/frontend/src/features/ControlUnit/components/ControlUnitDialog/ControlUnitContactList/constants.ts @@ -7,12 +7,12 @@ export const CONTROL_UNIT_CONTACT_FORM_SCHEMA = object().shape( { email: string().when('phone', { is: phone => !phone, - then: shema => shema.required('Veuillez entrer un téléphone ou un email.') + then: schema => schema.required('Veuillez entrer un téléphone ou un email.') }), name: string().required('Veuillez choisir un nom.'), phone: string().when('email', { is: email => !email, - then: shema => shema.required('Veuillez entrer un téléphone ou un email.') + then: schema => schema.required('Veuillez entrer un téléphone ou un email.') }) }, [['email', 'phone']] @@ -21,6 +21,8 @@ export const CONTROL_UNIT_CONTACT_FORM_SCHEMA = object().shape( export const INITIAL_CONTROL_UNIT_CONTACT_FORM_VALUES: ControlUnitContactFormValues = { controlUnitId: undefined, email: undefined, + isEmailSubscriptionContact: undefined, + isSmsSubscriptionContact: undefined, name: undefined, phone: undefined }