From 9956ef1daa408d5ac1f8b42ec377c2438b7a776a Mon Sep 17 00:00:00 2001 From: Mehdi-BOUYAHIA <63298037+Mehdi-BOUYAHIA@users.noreply.github.com> Date: Mon, 4 Dec 2023 15:56:49 +0100 Subject: [PATCH] feat: added imaging viewing for a patient and imaging requestor - Ref gestion-de-projet#1151 gestion-de-projet#2100 * feat: added imaging viewing for a patient and imaging requestor - Ref gestion-de-projet#1151 gestion-de-projet#2100 * feat: finished adding imaging viewing - Ref gestion-de-projet#1151 * refactor: removed unused style - Ref gestion-de-projet#1151 * fix: changed imaging column name- Ref gestion-de-projet#1151 * feat: added imaging in requestor - Ref gestion-de-projet#2100 * fix: fixed imaging criteria calls - Ref gestion-de-projet#2100 * fix: fixed imaging criteria patient active - Ref gestion-de-projet#2100 --------- Co-authored-by: manelleg * fix: fix rebase main into imaging * fix: fixed imaging nda and encounter - Ref gestion-de-projet#1151 * fix: fixed imaging columns when deidentified - Ref gestion-de-projet#1151 * fix: fixed imaging requestor after rebase - Ref gestion-de-projet#2100 * feat: added advanced criterias to imaging - Ref gestion-de-projet#2100 * feat: added imaging icon- Ref gestion-de-projet#2100 * fix: tried to fix reset of demographic age criteria - Ref gestion-de-projet#2100 * fix: fixed modalities display - Ref gestion-de-projet#2100 * fix: fixed style of imaging criteria - Ref gestion-de-projet#2100 * feat: added error gestion in imaging criteria - Ref gestion-de-projet#2100 * feat: added imaging viewing for a patient and imaging requestor - Ref gestion-de-projet#1151 gestion-de-projet#2100 * feat: finished adding imaging viewing - Ref gestion-de-projet#1151 * refactor: removed unused style - Ref gestion-de-projet#1151 * fix: changed imaging column name- Ref gestion-de-projet#1151 * feat: added imaging in requestor - Ref gestion-de-projet#2100 * fix: fixed imaging criteria calls - Ref gestion-de-projet#2100 * fix: fixed imaging criteria patient active - Ref gestion-de-projet#2100 --------- Co-authored-by: manelleg * fix: fix rebase main into imaging * fix: fixed imaging nda and encounter - Ref gestion-de-projet#1151 * fix: fixed imaging columns when deidentified - Ref gestion-de-projet#1151 * fix: fixed imaging requestor after rebase - Ref gestion-de-projet#2100 * feat: added advanced criterias to imaging - Ref gestion-de-projet#2100 * feat: added imaging icon- Ref gestion-de-projet#2100 * fix: tried to fix reset of demographic age criteria - Ref gestion-de-projet#2100 * fix: fixed modalities display - Ref gestion-de-projet#2100 * fix: fixed style of imaging criteria - Ref gestion-de-projet#2100 * feat: added error gestion in imaging criteria - Ref gestion-de-projet#2100 * feat: added alerts in imaging criteria - Ref gestion-de-projet#2100 * fix: fixed display when no days of delays in imaging form - Ref gestion-de-projet#2100 * fix: fixed display of modalities - Ref gestion-de-projet#2100 * fix: fixed criteria title - Ref gestion-de-projet#2100 * fix: fixed criteria layout buttons - Ref gestion-de-projet#2100 * fix: fixed display of modalities - Ref gestion-de-projet#2100 * fix: fixed display of uid lists - Ref gestion-de-projet#2100 * fix: fixed display of series criteria - Ref gestion-de-projet#2100 * fix: fixed multi calls to search check - Ref gestion-de-projet#2100 * fix: fixed uid inputs- Ref gestion-de-projet#2100 * fix: fixed advanced criteria - Ref gestion-de-projet#2100 * fix: fixed modalities - Ref gestion-de-projet#2100 * fix: deleted double document search help - Ref gestion-de-projet#2100 * fix: fixed type in fetch modalities - Ref gestion-de-projet#2100 * fix: fixed type in fetch modalities - Ref gestion-de-projet#2100 --------- Co-authored-by: manelleg --- src/components/CohortsTable/styles.ts | 4 - .../CreationCohort/DataList_Criteria.tsx | 18 +- .../components/Breadcrumbs/Breadcrumbs.tsx | 8 +- .../components/Breadcrumbs/styles.ts | 10 - .../components/CriteriaCard/styles.ts | 10 - .../AdvancedInputs/AdvancedInputs.tsx | 13 +- .../OccurrencesDateInputs.tsx | 20 +- .../OccurrencesInputs/styles.ts | 43 -- .../VisitInputs/VisitInputs.tsx | 4 +- .../components/BiologySearch/styles.ts | 14 - .../CCAM/components/Form/CCAMForm.tsx | 2 +- .../CriteriaRightPanel/CriteriaRightPanel.tsx | 75 ++-- .../DocumentsForm/styles.ts | 5 - .../EncounterForm/styles.ts | 5 - .../CriteriaRightPanel/ImagingForm/index.tsx | 404 ++++++++++++++++++ .../CriteriaRightPanel/ImagingForm/styles.ts | 22 + .../CriteriaRightPanel/RequestForm/styles.ts | 4 - .../components/CriteriaRightPanel/styles.ts | 9 - .../PopulationCard/PopulationCard.tsx | 6 +- .../PopulationCard/components/styles.ts | 3 - .../components/PopulationCard/styles.ts | 4 - .../EventSequenceTable/EventSequenceTable.tsx | 28 +- .../components/EventSequenceTable/styles.ts | 3 - .../TemporalConstraintCard/styles.ts | 19 - .../ModalCohortTitle/ModalCohortTitle.tsx | 7 +- .../Modals/ModalCohortTitle/styles.ts | 9 - .../ModalCreateNewRequest.tsx | 11 +- .../components/RequestForm.tsx | 10 +- .../components/RequestList.tsx | 2 +- .../Modals/ModalCreateNewRequest/styles.ts | 3 - src/components/Dashboard/Preview/Preview.tsx | 36 +- src/components/Dashboard/Preview/styles.ts | 27 -- src/components/DataTable/DataTable.tsx | 16 +- .../DataTable/DataTableComposition.tsx | 82 ++-- src/components/DataTable/DataTableImaging.tsx | 183 ++++++++ .../DataTable/DataTableMedication.tsx | 72 ++-- .../DataTable/DataTableObservation.tsx | 53 +-- src/components/DataTable/DataTablePatient.tsx | 63 ++- src/components/DataTable/DataTablePmsi.tsx | 55 ++- src/components/DataTable/styles.ts | 48 --- .../Filters/MedicationFilters/index.tsx | 6 +- .../Filters/MedicationFilters/styles.ts | 6 - .../Filters/ModalityFilter/ModalityFilter.tsx | 40 ++ .../Filters/VitalStatusesFilter/index.tsx | 2 +- .../Patient/PatientBiology/styles.js | 27 +- .../Patient/PatientImaging/PatientImaging.tsx | 182 ++++++++ .../Patient/PatientMedication/styles.js | 47 +- src/components/Patient/PatientPMSI/styles.js | 47 +- .../FilterTimelineDialog/styles.js | 3 - .../DocumentTable/DocumentTable.tsx | 52 +-- .../HospitDialog/DocumentTable/styles.ts | 21 +- .../Patient/PatientTimeline/styles.ts | 5 - .../ModalEditCohort/ModalEditCohort.tsx | 2 +- .../Requests/Modals/ModalEditCohort/styles.ts | 3 - .../ModalShareRequest/ModalShareRequest.tsx | 10 +- .../components/RequestShareForm.tsx | 4 +- .../components/providersTable.tsx | 26 +- .../ModalShareRequest/components/styles.ts | 3 - .../Modals/ModalShareRequest/styles.ts | 9 - .../ProjectsTable/ProjectRow/index.tsx | 21 +- .../ProjectsTable/RequestRow/index.tsx | 23 +- .../ProjectsTable/VersionRow/index.tsx | 56 +-- .../Requests/ProjectsTable/index.tsx | 20 +- .../ScopeTreeTable/components/TableHead.jsx | 10 +- .../ScopeTree/ScopeTreeTable/index.jsx | 8 +- src/components/TopBar/TopBar.tsx | 20 +- src/components/TopBar/styles.js | 4 - src/components/ui/Collapse/index.tsx | 5 +- src/components/ui/Collapse/styles.tsx | 8 +- src/components/ui/CriteriaLayout/index.tsx | 103 +++++ src/components/ui/CriteriaLayout/styles.ts | 51 +++ .../ui/Helpers/DocumentSearchHelp/index.tsx | 333 +++++++-------- .../ui/Inputs/SearchbarWithCheck/index.tsx | 55 +++ .../ui/Inputs/SearchbarWithCheck/styles.ts | 10 + .../ui/Inputs/UidTextfield/index.tsx | 60 +++ src/components/ui/Layout/index.tsx | 9 +- src/components/ui/Searchbar/SearchInput.tsx | 135 +++--- src/components/ui/TableCell/styles.ts | 9 + src/constants.js | 10 + src/data/scope_type.json | 3 +- src/reducers/searchCriteriasReducer.ts | 17 + src/services/aphp/callApi.ts | 60 +++ src/services/aphp/serviceCohortCreation.ts | 8 +- src/services/aphp/servicePatients.ts | 81 +++- src/state/patient.ts | 125 +++++- src/types.ts | 20 +- src/types/requestCriterias.ts | 64 ++- src/types/searchCriterias.ts | 29 +- src/utils/cohortCreation.ts | 240 ++++++++++- src/utils/documentAttachment.ts | 19 + src/utils/filters.ts | 5 + src/utils/pmsi.ts | 3 +- src/utils/requestCriterias.tsx | 78 +++- src/utils/valueComparator.ts | 60 +++ src/views/Dashboard/styles.ts | 1 - src/views/Patient/Patient.tsx | 13 +- src/views/Scope/styles.js | 35 -- 97 files changed, 2531 insertions(+), 1185 deletions(-) delete mode 100644 src/components/CreationCohort/DiagramView/components/Breadcrumbs/styles.ts create mode 100644 src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/ImagingForm/index.tsx create mode 100644 src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/ImagingForm/styles.ts delete mode 100644 src/components/CreationCohort/Modals/ModalCohortTitle/styles.ts create mode 100644 src/components/DataTable/DataTableImaging.tsx create mode 100644 src/components/Filters/ModalityFilter/ModalityFilter.tsx create mode 100644 src/components/Patient/PatientImaging/PatientImaging.tsx delete mode 100644 src/components/Requests/Modals/ModalShareRequest/styles.ts create mode 100644 src/components/ui/CriteriaLayout/index.tsx create mode 100644 src/components/ui/CriteriaLayout/styles.ts create mode 100644 src/components/ui/Inputs/SearchbarWithCheck/index.tsx create mode 100644 src/components/ui/Inputs/SearchbarWithCheck/styles.ts create mode 100644 src/components/ui/Inputs/UidTextfield/index.tsx create mode 100644 src/components/ui/TableCell/styles.ts create mode 100644 src/utils/documentAttachment.ts create mode 100644 src/utils/valueComparator.ts diff --git a/src/components/CohortsTable/styles.ts b/src/components/CohortsTable/styles.ts index b1084886b..c9a34cc3c 100644 --- a/src/components/CohortsTable/styles.ts +++ b/src/components/CohortsTable/styles.ts @@ -15,10 +15,6 @@ const useStyles = makeStyles()(() => ({ color: '#0063AF', padding: '0 20px' }, - status: { - fontSize: '12px', - fontWeight: 'bold' - }, notAllow: { opacity: 0.7, cursor: 'not-allowed' diff --git a/src/components/CreationCohort/DataList_Criteria.tsx b/src/components/CreationCohort/DataList_Criteria.tsx index 3561a54b4..4cac77197 100644 --- a/src/components/CreationCohort/DataList_Criteria.tsx +++ b/src/components/CreationCohort/DataList_Criteria.tsx @@ -10,11 +10,12 @@ import Cim10Form from './DiagramView/components/LogicalOperator/components/Crite import GhmForm from './DiagramView/components/LogicalOperator/components/CriteriaRightPanel/GHM' import MedicationForm from './DiagramView/components/LogicalOperator/components/CriteriaRightPanel/MedicationForm' import BiologyForm from './DiagramView/components/LogicalOperator/components/CriteriaRightPanel/BiologyForm' +import DemographicForm from './DiagramView/components/LogicalOperator/components/CriteriaRightPanel/DemographicForm' +import ImagingForm from './DiagramView/components/LogicalOperator/components/CriteriaRightPanel/ImagingForm' import services from 'services/aphp' -import { ODD_BIOLOGY, ODD_MEDICATION } from '../../constants' -import DemographicForm from './DiagramView/components/LogicalOperator/components/CriteriaRightPanel/DemographicForm' +import { ODD_BIOLOGY, ODD_IMAGING, ODD_MEDICATION } from '../../constants' // ├── Mes requêtes // ├── Liste d'IPP @@ -30,6 +31,7 @@ import DemographicForm from './DiagramView/components/LogicalOperator/components // ├── Biologie/Microbiologie // │ ├── Biologie // │ ├── Microbiologie +// ├── Imagerie // ├── Physiologie const criteriaList: CriteriaItemType[] = [ @@ -202,6 +204,18 @@ const criteriaList: CriteriaItemType[] = [ } ] }, + { + id: 'ImagingStudy', + title: 'Imagerie', + color: ODD_IMAGING ? '#0063AF' : '#808080', + fontWeight: 'bold', + components: ODD_IMAGING ? ImagingForm : null, + disabled: !ODD_IMAGING ?? false, + data: { modalities: 'loading' }, + fetch: { + fetchModalities: services.cohortCreation.fetchModalities + } + }, { id: 'physiologie', title: 'Physiologie', diff --git a/src/components/CreationCohort/DiagramView/components/Breadcrumbs/Breadcrumbs.tsx b/src/components/CreationCohort/DiagramView/components/Breadcrumbs/Breadcrumbs.tsx index b9597c4f6..51a603e4d 100644 --- a/src/components/CreationCohort/DiagramView/components/Breadcrumbs/Breadcrumbs.tsx +++ b/src/components/CreationCohort/DiagramView/components/Breadcrumbs/Breadcrumbs.tsx @@ -1,15 +1,13 @@ import React, { useState, useEffect } from 'react' -import { Breadcrumbs, Grid, Typography } from '@mui/material' +import { Breadcrumbs, Grid, Typography, useTheme } from '@mui/material' import { useAppSelector, useAppDispatch } from 'state' import { fetchProjects as fetchProjectsList } from 'state/project' import { fetchRequests as fetchRequestsList } from 'state/request' -import useStyles from './styles' - const CohortCreationBreadcrumbs: React.FC = () => { - const { classes } = useStyles() + const theme = useTheme() const dispatch = useAppDispatch() const { @@ -49,7 +47,7 @@ const CohortCreationBreadcrumbs: React.FC = () => { }, [projects, requests]) return ( - + {projectName} {requestName} diff --git a/src/components/CreationCohort/DiagramView/components/Breadcrumbs/styles.ts b/src/components/CreationCohort/DiagramView/components/Breadcrumbs/styles.ts deleted file mode 100644 index 6eb6ceaef..000000000 --- a/src/components/CreationCohort/DiagramView/components/Breadcrumbs/styles.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { makeStyles } from 'tss-react/mui' -import { Theme } from '@mui/material/styles' - -const useStyles = makeStyles()((theme: Theme) => ({ - root: { - marginBottom: theme.spacing(2) - } -})) - -export default useStyles diff --git a/src/components/CreationCohort/DiagramView/components/CriteriaCard/styles.ts b/src/components/CreationCohort/DiagramView/components/CriteriaCard/styles.ts index 88704869a..67ff6ac38 100644 --- a/src/components/CreationCohort/DiagramView/components/CriteriaCard/styles.ts +++ b/src/components/CreationCohort/DiagramView/components/CriteriaCard/styles.ts @@ -18,20 +18,10 @@ const useStyles = makeStyles()((theme: Theme) => ({ marginLeft: -46 } }, - criteriaTitleAndChips: { - width: 'calc(100% - 80px)', - [theme.breakpoints.down('md')]: { - flexWrap: 'wrap' - } - }, title: { whiteSpace: 'nowrap', marginLeft: 4 }, - actionContainer: { - display: 'flex', - flexWrap: 'nowrap' - }, secondItem: { overflow: 'hidden', [theme.breakpoints.down('xl')]: { diff --git a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/AdvancedInputs/AdvancedInputs.tsx b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/AdvancedInputs/AdvancedInputs.tsx index 003ee703e..ba1606822 100644 --- a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/AdvancedInputs/AdvancedInputs.tsx +++ b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/AdvancedInputs/AdvancedInputs.tsx @@ -24,15 +24,14 @@ type AdvancedInputsProps = { const AdvancedInputs: React.FC = (props) => { const { form, selectedCriteria = {}, onChangeValue } = props const optionsIsUsed = - +selectedCriteria.occurrence !== 1 || - selectedCriteria.occurrenceComparator !== '>=' || - !!selectedCriteria.startOccurrence || - !!selectedCriteria.endOccurrence || - !!selectedCriteria.encounterStartDate || - !!selectedCriteria.encounterEndDate + selectedCriteria?.encounterService.length > 0 || + !!selectedCriteria?.startOccurrence || + !!selectedCriteria?.endOccurrence || + !!selectedCriteria?.encounterStartDate || + !!selectedCriteria?.encounterEndDate const [checked, setCheck] = useState(optionsIsUsed) - const label = 'Séléctionnez une unité exécutrice' + const label = 'Sélectionnez une unité exécutrice' const _onSubmitExecutiveUnits = (_selectedExecutiveUnits: ScopeTreeRow[] | undefined) => { onChangeValue('encounterService', _selectedExecutiveUnits) diff --git a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/AdvancedInputs/OccurrencesInputs/OccurrencesDateInputs.tsx b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/AdvancedInputs/OccurrencesInputs/OccurrencesDateInputs.tsx index 6caa3d558..13a05e45a 100644 --- a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/AdvancedInputs/OccurrencesInputs/OccurrencesDateInputs.tsx +++ b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/AdvancedInputs/OccurrencesInputs/OccurrencesDateInputs.tsx @@ -6,27 +6,13 @@ import ClearIcon from '@mui/icons-material/Clear' import useStyles from './styles' -const defaultOccurrenceInputs = { - code: [], - isLeaf: false, - valueMin: 0, - valueMax: 0, - valueComparator: '>=', - occurrence: 1, - occurrenceComparator: '>=', - startOccurrence: '', - endOccurrence: '', - isInclusive: true -} - type OccurrenceDateInputsProps = { selectedCriteria: any onChangeValue: (key: string, value: any) => void } const OccurrenceDateInputs: React.FC = (props) => { - const { onChangeValue } = props - const selectedCriteria = { ...defaultOccurrenceInputs, ...props.selectedCriteria } + const { onChangeValue, selectedCriteria } = props const { classes } = useStyles() @@ -44,7 +30,7 @@ const OccurrenceDateInputs: React.FC = (props) => { onChangeValue('startOccurrence', '')}> @@ -61,7 +47,7 @@ const OccurrenceDateInputs: React.FC = (props) => { onChangeValue('endOccurrence', '')}> diff --git a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/AdvancedInputs/OccurrencesInputs/styles.ts b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/AdvancedInputs/OccurrencesInputs/styles.ts index 4962c25a0..644dcceed 100644 --- a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/AdvancedInputs/OccurrencesInputs/styles.ts +++ b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/AdvancedInputs/OccurrencesInputs/styles.ts @@ -1,52 +1,9 @@ import { makeStyles } from 'tss-react/mui' const useStyles = makeStyles()(() => ({ - root: { - display: 'flex', - flexDirection: 'column', - flex: '1 1 auto' - }, - actionContainer: { - display: 'flex', - alignItems: 'center', - height: 72, - padding: 20, - backgroundColor: '#317EAA', - color: 'white', - // Not default - marginBottom: 48 - }, - backButton: { color: 'white' }, - divider: { background: 'white' }, - titleLabel: { marginLeft: '1em' }, - formContainer: { - overflow: 'auto', - maxHeight: 'calc(100vh - 183px)' - }, - inputContainer: { - padding: '1em', - display: 'flex', - flex: '1 1 0%', - flexDirection: 'column' - }, inputItem: { margin: '1em', width: 'calc(100% - 2em)' - }, - criteriaActionContainer: { - display: 'flex', - alignItems: 'center', - justifyContent: 'center', - flexWrap: 'wrap', - borderTop: '1px solid grey', - position: 'absolute', - width: '100%', - bottom: 0, - left: 0, - background: '#fff', - '& > button': { - margin: '12px 8px' - } } })) diff --git a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/AdvancedInputs/VisitInputs/VisitInputs.tsx b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/AdvancedInputs/VisitInputs/VisitInputs.tsx index b55e9a925..b672ab088 100644 --- a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/AdvancedInputs/VisitInputs/VisitInputs.tsx +++ b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/AdvancedInputs/VisitInputs/VisitInputs.tsx @@ -30,7 +30,7 @@ const VisitInputs: React.FC = (props) => { onChangeValue('encounterStartDate', '')}> @@ -47,7 +47,7 @@ const VisitInputs: React.FC = (props) => { onChangeValue('encounterEndDate', '')}> diff --git a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/BiologyForm/components/BiologySearch/styles.ts b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/BiologyForm/components/BiologySearch/styles.ts index f20cf4753..58b5500f3 100644 --- a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/BiologyForm/components/BiologySearch/styles.ts +++ b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/BiologyForm/components/BiologySearch/styles.ts @@ -21,11 +21,6 @@ const useStyles = makeStyles()((theme: Theme) => ({ backButton: { color: 'white' }, divider: { background: 'white' }, titleLabel: { marginLeft: '1em' }, - tabTitle: { - minWidth: 0, - color: 'rgba(0, 99, 175, 0.4)', - borderBottom: '#CFE4FD 2px inset' - }, indicator: { width: 20, height: 20, @@ -40,15 +35,6 @@ const useStyles = makeStyles()((theme: Theme) => ({ border: '2px solid currentColor', borderRadius: 10 }, - indeterminateIndicator: { - color: '#555 !important', - width: 20, - height: 20, - backgroundColor: 'currentColor', - boxShadow: 'inset 0 0 0 4px white', - border: '2px solid currentColor', - borderRadius: 10 - }, biologyItem: { padding: '4px 16px' }, diff --git a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/CCAM/components/Form/CCAMForm.tsx b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/CCAM/components/Form/CCAMForm.tsx index b0f385a9a..eb356af37 100644 --- a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/CCAM/components/Form/CCAMForm.tsx +++ b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/CCAM/components/Form/CCAMForm.tsx @@ -160,7 +160,7 @@ const CcamForm: React.FC = (props) => { - Les données PMSI d'Obris sont codées au quotidien par les médecins. Les données PMSI AREM sont validées, + Les données PMSI d'ORBIS sont codées au quotidien par les médecins. Les données PMSI AREM sont validées, remontées aux tutelles et disponibles dans le SNDS. diff --git a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/CriteriaRightPanel.tsx b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/CriteriaRightPanel.tsx index a8da9b49d..937c27ce1 100644 --- a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/CriteriaRightPanel.tsx +++ b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/CriteriaRightPanel.tsx @@ -22,6 +22,7 @@ import CoronavirusIcon from '@mui/icons-material/Coronavirus' import { CriteriaItemType } from 'types' import useStyles from './styles' import { RessourceType, SelectedCriteriaType } from 'types/requestCriterias' +import { PhotoCameraFront } from '@mui/icons-material' type CriteriaListItemProps = { criteriaItem: CriteriaItemType @@ -35,45 +36,51 @@ const CriteriaListItem: React.FC = (props) => { const { classes } = useStyles() const [open, setOpen] = useState(true) - const svgIcone = - id === RessourceType.REQUEST ? ( - - ) : id === RessourceType.IPP_LIST ? ( - - ) : id === RessourceType.PATIENT ? ( - - ) : id === RessourceType.ENCOUNTER ? ( - - ) : id === RessourceType.DOCUMENTS ? ( - - ) : id === RessourceType.PMSI ? ( - - ) : id === RessourceType.CONDITION ? ( - - ) : id === RessourceType.PROCEDURE ? ( - - ) : id === RessourceType.CLAIM ? ( - - ) : id === RessourceType.MEDICATION ? ( - - ) : id === RessourceType.BIO_MICRO ? ( - - ) : id === RessourceType.OBSERVATION ? ( - - ) : id === RessourceType.MICROBIOLOGIE ? ( - - ) : id === RessourceType.PHYSIOLOGIE ? ( - - ) : ( - <> - ) + const getCriteriaIcon = (id: string) => { + switch (id) { + case RessourceType.REQUEST: + return + case RessourceType.IPP_LIST: + return + case RessourceType.PATIENT: + return + case RessourceType.ENCOUNTER: + return + case RessourceType.DOCUMENTS: + return + case RessourceType.PMSI: + return + case RessourceType.CONDITION: + return + case RessourceType.PROCEDURE: + return + case RessourceType.CLAIM: + return + case RessourceType.MEDICATION: + return + case RessourceType.BIO_MICRO: + return + case RessourceType.OBSERVATION: + return + case RessourceType.MICROBIOLOGIE: + return + case RessourceType.PHYSIOLOGIE: + return + case RessourceType.IMAGING: + return + default: + return <> + } + } + + const svgIcon = getCriteriaIcon(id) const cursor = disabled ? 'not-allowed' : components ? 'pointer' : 'default' if (!subItems || (subItems && subItems.length === 0)) { return ( handleClick(criteriaItem)} className={classes.criteriaItem}> - {svgIcone} + {svgIcon} ) @@ -87,7 +94,7 @@ const CriteriaListItem: React.FC = (props) => { > - {svgIcone} + {svgIcon} ({ margin: '12px 8px' } }, - errorContainer: { - color: '#f44336', - width: '100%', - padding: '0 16px' - }, searchInput: { margin: '0px !important', '& > div': { diff --git a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/EncounterForm/styles.ts b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/EncounterForm/styles.ts index 44aa0a1ef..6aea19921 100644 --- a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/EncounterForm/styles.ts +++ b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/EncounterForm/styles.ts @@ -49,11 +49,6 @@ const useStyles = makeStyles()(() => ({ fontWeight: 600, fontSize: 12, paddingBottom: 10 - }, - textField: { - '& input': { - padding: '2px 4px 3px 0' - } } })) diff --git a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/ImagingForm/index.tsx b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/ImagingForm/index.tsx new file mode 100644 index 000000000..f5685a083 --- /dev/null +++ b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/ImagingForm/index.tsx @@ -0,0 +1,404 @@ +import React, { useState } from 'react' +import { Autocomplete, FormLabel, Grid, MenuItem, Select, TextField } from '@mui/material' +import { BlockWrapper } from 'components/ui/Layout' +import CalendarRange from 'components/ui/Inputs/CalendarRange' +import Collapse from 'components/ui/Collapse' +import { DurationUnitWrapper } from 'components/ui/Inputs/DurationRange/styles' +import { TextFieldWrapper } from 'components/ui/Inputs/DurationRange/styles' +import OccurenceInput from 'components/ui/Inputs/Occurences' +import CriteriaLayout from 'components/ui/CriteriaLayout' +import AdvancedInputs from '../AdvancedInputs/AdvancedInputs' + +import { CriteriaDrawerComponentProps, CriteriaName } from 'types' +import { CalendarRequestLabel } from 'types/dates' +import { Comparators, CriteriaDataKey, RessourceType, RessourceTypeLabels } from 'types/requestCriterias' +import { DocumentAttachmentMethod, DocumentAttachmentMethodLabel, LabelObject } from 'types/searchCriterias' +import useStyles from './styles' +import { mappingCriteria } from '../DemographicForm' +import SearchbarWithCheck from 'components/ui/Inputs/SearchbarWithCheck' +import UidTextfield from 'components/ui/Inputs/UidTextfield' + +enum Error { + INCOHERENT_AGE_ERROR, + SEARCHINPUT_ERROR, + UID_ERROR, + NO_ERROR +} + +export const withDocumentOptions = [ + { + id: DocumentAttachmentMethod.NONE, + label: DocumentAttachmentMethodLabel.NONE + }, + { + id: DocumentAttachmentMethod.ACCESS_NUMBER, + label: DocumentAttachmentMethodLabel.ACCESS_NUMBER + }, + { + id: DocumentAttachmentMethod.INFERENCE_TEMPOREL, + label: DocumentAttachmentMethodLabel.INFERENCE_TEMPOREL + } +] + +const ImagingForm: React.FC = (props) => { + const { classes } = useStyles() + + const { criteria, selectedCriteria, onChangeSelectedCriteria, goBack } = props + const isEdition = selectedCriteria !== null ? true : false + const [title, setTitle] = useState(selectedCriteria?.title || "Critère d'Imagerie") + const [occurrence, setOccurrence] = useState(selectedCriteria?.occurrence || 1) + const [occurrenceComparator, setOccurrenceComparator] = useState( + selectedCriteria?.occurrenceComparator || Comparators.GREATER_OR_EQUAL + ) + const [isInclusive, setIsInclusive] = useState(selectedCriteria?.isInclusive || true) + const [studyStartDate, setStudyStartDate] = useState(selectedCriteria?.studyStartDate || null) + const [studyEndDate, setStudyEndDate] = useState(selectedCriteria?.studyEndDate || null) + const [studyModalities, setStudyModalities] = useState( + mappingCriteria(selectedCriteria?.studyModalities, CriteriaDataKey.MODALITIES, criteria) || [] + ) + const [studyDescription, setStudyDescription] = useState(selectedCriteria?.studyDescription || '') + const [studyProcedure, setStudyProcedure] = useState(selectedCriteria?.studyProcedure || '') + const [numberOfSeries, setNumberOfSeries] = useState(selectedCriteria?.numberOfSeries || 1) + const [seriesComparator, setSeriesComparator] = useState( + selectedCriteria?.seriesComparator || Comparators.GREATER_OR_EQUAL + ) + const [numberOfIns, setNumberOfIns] = useState(selectedCriteria?.numberOfIns || 1) + const [instancesComparator, setInstancesComparator] = useState( + selectedCriteria?.instancesComparator || Comparators.GREATER_OR_EQUAL + ) + const [withDocument, setWithDocument] = useState( + selectedCriteria?.withDocument || DocumentAttachmentMethod.NONE + ) + const [daysOfDelay, setDaysOfDelay] = useState(selectedCriteria?.daysOfDelay || null) + const [studyUid, setStudyUid] = useState(selectedCriteria?.studyUid || '') + + const [seriesStartDate, setSeriesStartDate] = useState(selectedCriteria?.seriesStartDate || null) + const [seriesEndDate, setSeriesEndDate] = useState(selectedCriteria?.seriesEndDate || null) + const [seriesDescription, setSeriesDescription] = useState(selectedCriteria?.seriesDescription || '') + const [seriesProtocol, setSeriesProtocol] = useState(selectedCriteria?.seriesProtocol || '') + const [seriesModalities, setSeriesModalities] = useState( + mappingCriteria(selectedCriteria?.seriesModalities, CriteriaDataKey.MODALITIES, criteria) || [] + ) + const [bodySite, setBodySite] = useState(selectedCriteria?.bodySite || '') + const [seriesUid, setSeriesUid] = useState(selectedCriteria?.seriesUid || '') + const [encounterService, setEncounterService] = useState(selectedCriteria?.encounterService || []) + const [encounterStartDate, setEncounterStartDate] = useState(selectedCriteria?.encounterStartDate || null) + const [encounterEndDate, setEncounterEndDate] = useState(selectedCriteria?.encounterEndDate || null) + const [startOccurrence, setStartOccurence] = useState(selectedCriteria?.startOccurrence || null) + const [endOccurrence, setEndOccurence] = useState(selectedCriteria?.endOccurrence || null) + + const [error, setError] = useState(Error.NO_ERROR) + + const _onChangeValue = (key: string, value: any) => { + switch (key) { + case 'encounterService': + setEncounterService(value) + break + case 'encounterStartDate': + setEncounterStartDate(value) + break + case 'encounterEndDate': + setEncounterEndDate(value) + break + case 'startOccurrence': + setStartOccurence(value) + break + case 'endOccurrence': + setEndOccurence(value) + break + default: + break + } + } + + const onSubmit = () => { + onChangeSelectedCriteria({ + id: selectedCriteria?.id, + type: RessourceType.IMAGING, + title, + isInclusive, + occurrence, + occurrenceComparator, + studyStartDate, + studyEndDate, + studyModalities, + studyDescription, + studyProcedure, + numberOfSeries, + seriesComparator, + numberOfIns, + instancesComparator, + withDocument, + daysOfDelay, + studyUid, + seriesStartDate, + seriesEndDate, + seriesDescription, + seriesProtocol, + seriesModalities, + bodySite, + seriesUid, + encounterService, + encounterStartDate, + encounterEndDate, + startOccurrence, + endOccurrence + }) + } + + const isSeriesUsed = + !!seriesStartDate || + !!seriesEndDate || + !!seriesDescription || + !!seriesProtocol || + seriesModalities.length > 0 || + !!bodySite || + !!seriesUid + + return ( + + + + + Nombre d'occurrences + + + { + setOccurrence(newOccurence) + setOccurrenceComparator(newComparator) + }} + /> + + + {/* critères de study : */} + + + + + Date de l'étude + + { + setStudyStartDate(start) + setStudyEndDate(end) + }} + onError={(isError) => setError(isError ? Error.INCOHERENT_AGE_ERROR : Error.NO_ERROR)} + /> + + + option.label} + isOptionEqualToValue={(option, value) => option.id === value.id} + value={studyModalities} + onChange={(e, value) => setStudyModalities(value)} + renderInput={(params) => } + style={{ marginBottom: '1em' }} + /> + + + setError(isError ? Error.SEARCHINPUT_ERROR : Error.NO_ERROR)} + /> + + + + setError(isError ? Error.SEARCHINPUT_ERROR : Error.NO_ERROR)} + /> + + + + + Nombre de séries + + { + setNumberOfSeries(newOccurence) + setSeriesComparator(newComparator) + }} + /> + + + + + Nombre d'instances + + { + setNumberOfIns(newOccurence) + setInstancesComparator(newComparator) + }} + /> + + + + + Méthode de rattachement à un document + + + + + + {withDocument === DocumentAttachmentMethod.INFERENCE_TEMPOREL && ( + + + + Plage de + + + setDaysOfDelay(event.target.value)} + type="number" + InputProps={{ + inputProps: { + min: 0 + } + }} + /> + + + {CalendarRequestLabel.DAY} + + + + )} + + + + + Recherche par uid d'étude + + setError(isError ? Error.UID_ERROR : Error.NO_ERROR)} + /> + + + {/*critères de série : */} + + + + + Date de la série + + { + setSeriesStartDate(start) + setSeriesEndDate(end) + }} + onError={(isError) => setError(isError ? Error.INCOHERENT_AGE_ERROR : Error.NO_ERROR)} + /> + + + + setError(isError ? Error.SEARCHINPUT_ERROR : Error.NO_ERROR)} + /> + + + + setError(isError ? Error.SEARCHINPUT_ERROR : Error.NO_ERROR)} + /> + + + option.label} + isOptionEqualToValue={(option, value) => option.id === value.id} + value={seriesModalities} + onChange={(e, value) => setSeriesModalities(value)} + renderInput={(params) => } + style={{ marginBottom: '1em' }} + /> + + + setError(isError ? Error.SEARCHINPUT_ERROR : Error.NO_ERROR)} + /> + + + + Recherche par uid de série + + setError(isError ? Error.UID_ERROR : Error.NO_ERROR)} + /> + + + + + + + ) +} + +export default ImagingForm diff --git a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/ImagingForm/styles.ts b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/ImagingForm/styles.ts new file mode 100644 index 000000000..05e90277c --- /dev/null +++ b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/ImagingForm/styles.ts @@ -0,0 +1,22 @@ +import { makeStyles } from 'tss-react/mui' + +const useStyles = makeStyles()(() => ({ + durationLegend: { + color: '#153D8A', + fontWeight: 600, + fontSize: 12, + paddingBottom: 10 + }, + inputContainer: { + padding: '1em', + display: 'flex', + flex: '1 1 0%', + flexDirection: 'column' + }, + inputItem: { + margin: '1em', + width: 'calc(100% - 2em)' + } +})) + +export default useStyles diff --git a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/RequestForm/styles.ts b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/RequestForm/styles.ts index 9e7a8bf6b..4b3371f7d 100644 --- a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/RequestForm/styles.ts +++ b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/RequestForm/styles.ts @@ -27,10 +27,6 @@ const useStyles = makeStyles()(() => ({ flex: '1 1 0%', flexDirection: 'column' }, - inputItem: { - margin: '1em', - width: 'calc(100% - 2em)' - }, criteriaActionContainer: { display: 'flex', alignItems: 'center', diff --git a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/styles.ts b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/styles.ts index 51ac97a46..2f0bd597b 100644 --- a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/styles.ts +++ b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/styles.ts @@ -23,12 +23,6 @@ const useStyles = makeStyles()(() => ({ criteriaItem: { padding: '2px 16px' }, - indicator: { - width: 20, - height: 20, - border: '2px solid currentColor', - borderRadius: 10 - }, subItemsContainer: { position: 'relative', marginLeft: 12 @@ -48,9 +42,6 @@ const useStyles = makeStyles()(() => ({ height: 2, marginTop: 14.5, background: '#D0D7D8' - }, - criteriaName: { - fontWeight: 'bold' } })) diff --git a/src/components/CreationCohort/DiagramView/components/PopulationCard/PopulationCard.tsx b/src/components/CreationCohort/DiagramView/components/PopulationCard/PopulationCard.tsx index dfb8c3ada..3c49fd588 100644 --- a/src/components/CreationCohort/DiagramView/components/PopulationCard/PopulationCard.tsx +++ b/src/components/CreationCohort/DiagramView/components/PopulationCard/PopulationCard.tsx @@ -186,11 +186,7 @@ const PopulationCard: React.FC = (props) => { ) )} {selectionAndPopulationWithRightError && selectionAndPopulationWithRightError.length > 4 && ( - onExtend(true)} - > + onExtend(true)}> )} diff --git a/src/components/CreationCohort/DiagramView/components/PopulationCard/components/styles.ts b/src/components/CreationCohort/DiagramView/components/PopulationCard/components/styles.ts index 567c91a01..6f8ced786 100644 --- a/src/components/CreationCohort/DiagramView/components/PopulationCard/components/styles.ts +++ b/src/components/CreationCohort/DiagramView/components/PopulationCard/components/styles.ts @@ -35,9 +35,6 @@ const useStyles = makeStyles()(() => ({ '& > button': { margin: '12px 8px' } - }, - searchBar: { - marginBottom: '0px' } })) diff --git a/src/components/CreationCohort/DiagramView/components/PopulationCard/styles.ts b/src/components/CreationCohort/DiagramView/components/PopulationCard/styles.ts index 740ef827b..19ca3a91d 100644 --- a/src/components/CreationCohort/DiagramView/components/PopulationCard/styles.ts +++ b/src/components/CreationCohort/DiagramView/components/PopulationCard/styles.ts @@ -43,10 +43,6 @@ const useStyles = makeStyles()((theme: Theme, params) = fontSize: 11, fontWeight: 'bold' }, - populationLabel: { - color: '#19235A', - textDecoration: 'underline' - }, actionButton: { backgroundColor: '#19235A', color: '#FFFFFF', diff --git a/src/components/CreationCohort/DiagramView/components/TemporalConstraintCard/components/EventSequenceTable/EventSequenceTable.tsx b/src/components/CreationCohort/DiagramView/components/TemporalConstraintCard/components/EventSequenceTable/EventSequenceTable.tsx index 2027c16bd..c7eef5b3b 100644 --- a/src/components/CreationCohort/DiagramView/components/TemporalConstraintCard/components/EventSequenceTable/EventSequenceTable.tsx +++ b/src/components/CreationCohort/DiagramView/components/TemporalConstraintCard/components/EventSequenceTable/EventSequenceTable.tsx @@ -5,7 +5,6 @@ import { Paper, Table, TableBody, - TableCell, TableContainer, TableHead, TableRow, @@ -14,6 +13,7 @@ import { } from '@mui/material' import { AvatarWrapper } from 'components/ui/Avatar/styles' import DeleteIcon from '@mui/icons-material/Delete' +import { TableCellWrapper } from 'components/ui/TableCell/styles' import { useAppSelector } from 'state' @@ -125,9 +125,9 @@ const EventSequenceTable: React.FC<{ {columns.map((column, index: number) => ( - + {column.label} - + ))} @@ -137,11 +137,11 @@ const EventSequenceTable: React.FC<{ (constraints) => constraints.constraintType === TemporalConstraintsKind.DIRECT_CHRONOLOGICAL_ORDERING ).length === 0 ? ( - + Aucune séquence d'évènements à afficher - + ) : ( temporalConstraints.map((temporalConstraint: TemporalConstraintsType, index) => { @@ -152,18 +152,18 @@ const EventSequenceTable: React.FC<{ return ( temporalConstraint.constraintType === TemporalConstraintsKind.DIRECT_CHRONOLOGICAL_ORDERING && ( - + {temporalConstraint.idList[0]} - {criteriaTitle1} - - s'est produit avant - + + s'est produit avant + {temporalConstraint.idList[1]} - {criteriaTitle2} - - {`${minDuration.values ?? '-'} ${minDuration.keys ?? ''}`} - {`${maxDuration.values ?? '-'} ${maxDuration.keys ?? ''}`} - + + {`${minDuration.values ?? '-'} ${minDuration.keys ?? ''}`} + {`${maxDuration.values ?? '-'} ${maxDuration.keys ?? ''}`} + { @@ -174,7 +174,7 @@ const EventSequenceTable: React.FC<{ - + ) ) diff --git a/src/components/CreationCohort/DiagramView/components/TemporalConstraintCard/components/EventSequenceTable/styles.ts b/src/components/CreationCohort/DiagramView/components/TemporalConstraintCard/components/EventSequenceTable/styles.ts index 2b218b619..593ecba55 100644 --- a/src/components/CreationCohort/DiagramView/components/TemporalConstraintCard/components/EventSequenceTable/styles.ts +++ b/src/components/CreationCohort/DiagramView/components/TemporalConstraintCard/components/EventSequenceTable/styles.ts @@ -1,9 +1,6 @@ import { makeStyles } from 'tss-react/mui' const useStyles = makeStyles()(() => ({ - inputContainer: { - marginBottom: '24px' - }, table: { minWidth: 650 }, diff --git a/src/components/CreationCohort/DiagramView/components/TemporalConstraintCard/styles.ts b/src/components/CreationCohort/DiagramView/components/TemporalConstraintCard/styles.ts index 82d39f49e..1a5850c3e 100644 --- a/src/components/CreationCohort/DiagramView/components/TemporalConstraintCard/styles.ts +++ b/src/components/CreationCohort/DiagramView/components/TemporalConstraintCard/styles.ts @@ -10,25 +10,6 @@ const useStyles = makeStyles()((theme: Theme) => ({ [theme.breakpoints.down('lg')]: { alignSelf: 'flex-end' } - }, - temporalConstraintSelect: { - height: '25px', - marginTop: '4px', - marginRight: '2px', - fontSize: 11, - color: 'black', - '&::after': { - borderBottom: 'none' - }, - '&::before': { - borderBottom: 'none' - }, - '&:hover:not($disabled):not($focused):not($error):before': { - borderBottom: `none !important` - } - }, - selectIcon: { - color: 'black' } })) diff --git a/src/components/CreationCohort/Modals/ModalCohortTitle/ModalCohortTitle.tsx b/src/components/CreationCohort/Modals/ModalCohortTitle/ModalCohortTitle.tsx index f9ee1d86a..c45cd3110 100644 --- a/src/components/CreationCohort/Modals/ModalCohortTitle/ModalCohortTitle.tsx +++ b/src/components/CreationCohort/Modals/ModalCohortTitle/ModalCohortTitle.tsx @@ -14,7 +14,6 @@ import { Alert } from '@mui/material' -import useStyles from './styles' import { CohortCreationError } from 'types' const BLANK_REGEX = /^\s*$/ @@ -25,8 +24,6 @@ const ModalCohortTitle: React.FC<{ longCohort: boolean cohortLimit: number }> = ({ onExecute, onClose, longCohort, cohortLimit }) => { - const { classes } = useStyles() - const [title, onChangeTitle] = useState('') const [description, onChangeDescription] = useState('') const [globalCount, onCheckGlobalCount] = useState(false) @@ -61,7 +58,7 @@ const ModalCohortTitle: React.FC<{ Création de la cohorte - + Nom de la cohorte : - + Description : ({ - inputContainer: { - marginBottom: '24px' - } -})) - -export default useStyles diff --git a/src/components/CreationCohort/Modals/ModalCreateNewRequest/ModalCreateNewRequest.tsx b/src/components/CreationCohort/Modals/ModalCreateNewRequest/ModalCreateNewRequest.tsx index 478160a3d..979943e3b 100644 --- a/src/components/CreationCohort/Modals/ModalCreateNewRequest/ModalCreateNewRequest.tsx +++ b/src/components/CreationCohort/Modals/ModalCreateNewRequest/ModalCreateNewRequest.tsx @@ -23,8 +23,6 @@ import { ProjectState, fetchProjects } from 'state/project' import { RequestState, fetchRequests, addRequest, editRequest, deleteRequest } from 'state/request' import { fetchRequestCohortCreation } from 'state/cohortCreation' -import useStyles from './styles' - const ERROR_TITLE = 'error_title' const ERROR_PROJECT = 'error_project' const ERROR_PROJECT_NAME = 'error_project_name' @@ -37,7 +35,6 @@ const NEW_PROJECT_ID = 'new' const ModalCreateNewRequest: React.FC<{ onClose?: () => void }> = ({ onClose }) => { - const { classes } = useStyles() const navigate = useNavigate() const dispatch = useAppDispatch() const { projectState, requestState } = useAppSelector<{ @@ -193,13 +190,7 @@ const ModalCreateNewRequest: React.FC<{ )} {loading || currentRequest === null ? ( - + ) : tab === 'form' ? ( diff --git a/src/components/CreationCohort/Modals/ModalCreateNewRequest/components/RequestForm.tsx b/src/components/CreationCohort/Modals/ModalCreateNewRequest/components/RequestForm.tsx index a94c4e4b0..1220a25c9 100644 --- a/src/components/CreationCohort/Modals/ModalCreateNewRequest/components/RequestForm.tsx +++ b/src/components/CreationCohort/Modals/ModalCreateNewRequest/components/RequestForm.tsx @@ -2,8 +2,6 @@ import React from 'react' import { Grid, MenuItem, Select, TextField, Typography } from '@mui/material' -import useStyles from '../styles' - import { ProjectType, RequestType } from 'types' const ERROR_TITLE = 'error_title' @@ -30,11 +28,9 @@ const RequestForm: React.FC = ({ onChangeProjectName, projectList }) => { - const { classes } = useStyles() - return ( <> - + Nom de la requête : = ({ /> - + Projet :