From bee0c0b62bd02dfa897f5b32490144744d412db4 Mon Sep 17 00:00:00 2001 From: Salah-BOUYAHIA Date: Wed, 24 Apr 2024 17:41:56 +0200 Subject: [PATCH] fix: noOptionText form hospit and pregnancy --- .../CriteriaRightPanel/HospitForm/index.tsx | 30 +++++++++++++++++++ .../CriteriaRightPanel/PregnantForm/index.tsx | 7 +++++ 2 files changed, 37 insertions(+) diff --git a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/HospitForm/index.tsx b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/HospitForm/index.tsx index 3cc6047ec..fff005ebc 100644 --- a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/HospitForm/index.tsx +++ b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/HospitForm/index.tsx @@ -1,3 +1,4 @@ +/* eslint-disable max-statements */ import React, { useEffect, useState } from 'react' import { Autocomplete, FormLabel, TextField } from '@mui/material' @@ -334,6 +335,7 @@ const HospitForm = ({ option.label} @@ -350,6 +352,7 @@ const HospitForm = ({ option.label} @@ -366,6 +369,7 @@ const HospitForm = ({ option.label} @@ -382,6 +386,7 @@ const HospitForm = ({ option.label} @@ -397,6 +402,7 @@ const HospitForm = ({ option.label} @@ -416,6 +422,7 @@ const HospitForm = ({ option.label} @@ -432,6 +439,7 @@ const HospitForm = ({ option.label} @@ -450,6 +458,7 @@ const HospitForm = ({ option.label} @@ -466,6 +475,7 @@ const HospitForm = ({ option.label} @@ -482,6 +492,7 @@ const HospitForm = ({ option.label} @@ -498,6 +509,7 @@ const HospitForm = ({ option.label} @@ -514,6 +526,7 @@ const HospitForm = ({ option.label} @@ -530,6 +543,7 @@ const HospitForm = ({ option.label} @@ -546,6 +560,7 @@ const HospitForm = ({ option.label} @@ -564,6 +579,7 @@ const HospitForm = ({ option.label} @@ -580,6 +596,7 @@ const HospitForm = ({ option.label} @@ -601,6 +618,7 @@ const HospitForm = ({ option.label} @@ -663,6 +681,7 @@ const HospitForm = ({ option.label} @@ -680,6 +699,7 @@ const HospitForm = ({ option.label} @@ -697,6 +717,7 @@ const HospitForm = ({ option.label} @@ -715,6 +736,7 @@ const HospitForm = ({ option.label} @@ -844,6 +866,7 @@ const HospitForm = ({ option.label} @@ -861,6 +884,7 @@ const HospitForm = ({ option.label} @@ -878,6 +902,7 @@ const HospitForm = ({ option.label} @@ -894,6 +919,7 @@ const HospitForm = ({ option.label} @@ -914,6 +940,7 @@ const HospitForm = ({ option.label} @@ -929,6 +956,7 @@ const HospitForm = ({ option.label} @@ -948,6 +976,7 @@ const HospitForm = ({ option.label} @@ -963,6 +992,7 @@ const HospitForm = ({ option.label} diff --git a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/PregnantForm/index.tsx b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/PregnantForm/index.tsx index 8aa7d70f1..e41fcec6e 100644 --- a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/PregnantForm/index.tsx +++ b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/PregnantForm/index.tsx @@ -221,6 +221,7 @@ const PregnantForm = ({ multiple id="pregnancy-mode-autocomplete" options={criteriaData.data.pregnancyMode || []} + noOptionsText="Veuillez entrer un mode d'obtention de la grossesse" getOptionLabel={(option) => option.label} isOptionEqualToValue={(option, value) => option.id === value.id} value={pregnancyMode} @@ -266,6 +267,7 @@ const PregnantForm = ({ multiple id="maternal-risks-autocomplete" options={criteriaData.data.maternalRisks || []} + noOptionsText="Veuillez entrer un risques liés aux antécédents maternels" getOptionLabel={(option) => option.label} isOptionEqualToValue={(option, value) => option.id === value.id} value={maternalRisks} @@ -287,6 +289,7 @@ const PregnantForm = ({ multiple id="risks-related-to-obstetric-history-autocomplete" options={criteriaData.data.risksRelatedToObstetricHistory || []} + noOptionsText="Veuillez entrer un risques liés aux antécédents obstétricaux" getOptionLabel={(option) => option.label} isOptionEqualToValue={(option, value) => option.id === value.id} value={risksRelatedToObstetricHistory} @@ -314,6 +317,7 @@ const PregnantForm = ({ multiple id="ultrasound-monitoring-autocomplete" options={criteriaData.data.prenatalDiagnosis || []} + noOptionsText="Veuillez entrer 'oui' ou 'non'" getOptionLabel={(option) => option.label} isOptionEqualToValue={(option, value) => option.id === value.id} value={ultrasoundMonitoring} @@ -329,6 +333,7 @@ const PregnantForm = ({ multiple id="corticotherapie-autocomplete" options={criteriaData.data.prenatalDiagnosis || []} + noOptionsText="Veuillez entrer 'oui' ou 'non'" getOptionLabel={(option) => option.label} isOptionEqualToValue={(option, value) => option.id === value.id} value={corticotherapie} @@ -349,6 +354,7 @@ const PregnantForm = ({ multiple id="risks-or-complications-of-pregnancy-autocomplete" options={criteriaData.data.risksOrComplicationsOfPregnancy || []} + noOptionsText="Veuillez entrer un risques ou complications de la grossesse" getOptionLabel={(option) => option.label} isOptionEqualToValue={(option, value) => option.id === value.id} value={risksOrComplicationsOfPregnancy} @@ -375,6 +381,7 @@ const PregnantForm = ({ multiple id="prenatal-diagnosis-autocomplete" options={criteriaData.data.prenatalDiagnosis || []} + noOptionsText="Veuillez entrer 'oui' ou 'non'" getOptionLabel={(option) => option.label} isOptionEqualToValue={(option, value) => option.id === value.id} value={prenatalDiagnosis}