diff --git a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/BiologyForm/components/Form/BiologyForm.tsx b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/BiologyForm/components/Form/BiologyForm.tsx index 7a54d3ba1..80ac7484f 100644 --- a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/BiologyForm/components/Form/BiologyForm.tsx +++ b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/BiologyForm/components/Form/BiologyForm.tsx @@ -248,7 +248,7 @@ const BiologyForm: React.FC = (props) => { id="criteria-value" variant="outlined" value={currentState.valueMin} - onChange={(e) => onChangeValue('valueMin', parseInt(e.target.value))} + onChange={(e) => onChangeValue('valueMin', parseFloat(e.target.value))} placeholder={currentState.valueComparator === Comparators.BETWEEN ? 'Valeur minimale' : '0'} disabled={!allowSearchByValue} /> @@ -262,7 +262,7 @@ const BiologyForm: React.FC = (props) => { id="criteria-value" variant="outlined" value={currentState.valueMax} - onChange={(e) => onChangeValue('valueMax', parseInt(e.target.value))} + onChange={(e) => onChangeValue('valueMax', parseFloat(e.target.value))} placeholder="Valeur maximale" disabled={!allowSearchByValue} /> diff --git a/src/components/CreationCohort/Modals/ModalCreateNewRequest/ModalCreateNewRequest.tsx b/src/components/CreationCohort/Modals/ModalCreateNewRequest/ModalCreateNewRequest.tsx index 4caca4c68..4186ded8d 100644 --- a/src/components/CreationCohort/Modals/ModalCreateNewRequest/ModalCreateNewRequest.tsx +++ b/src/components/CreationCohort/Modals/ModalCreateNewRequest/ModalCreateNewRequest.tsx @@ -37,7 +37,7 @@ const ModalCreateNewRequest: React.FC<{ }> = ({ onClose }) => { const navigate = useNavigate() const dispatch = useAppDispatch() - + const url = window.location.href && window.location.href.includes('/cohort/new') ? true : false const requestState = useAppSelector((state) => state.request) const _projectsList = useAppSelector((state) => state.project.projectsList) @@ -214,10 +214,12 @@ const ModalCreateNewRequest: React.FC<{ - ) : ( + ) : url ? ( + ) : ( + <> )} diff --git a/src/services/aphp/serviceCohorts.ts b/src/services/aphp/serviceCohorts.ts index 921bbf664..655a14a3c 100644 --- a/src/services/aphp/serviceCohorts.ts +++ b/src/services/aphp/serviceCohorts.ts @@ -620,7 +620,8 @@ const servicesCohorts: IServiceCohorts = { try { const ids = cohorts .map((cohort) => cohort.fhir_group_id) - .filter((id) => id !== '' || id !== undefined) as string[] + .filter((id) => id !== undefined || id !== '') + .filter((i) => i !== '') as string[] if (ids.length === 0) return [] const rightsResponse = await fetchCohortAccesses(ids) return cohorts.map((cohort) => {