Skip to content

Commit

Permalink
style: changed import of classes - Ref gestion-de-projet#2096
Browse files Browse the repository at this point in the history
  • Loading branch information
ManelleG committed May 24, 2023
1 parent f30e997 commit 19660f2
Show file tree
Hide file tree
Showing 131 changed files with 152 additions and 152 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const ControlPanel: React.FC<{
onUndo?: () => void
onRedo?: () => void
}> = ({ onExecute, onUndo, onRedo }) => {
const classes = useStyle()
const { classes } = useStyle()
const dispatch = useAppDispatch()
const [openModal, onSetOpenModal] = useState<'executeCohortConfirmation' | null>(null)
const [oldCount, setOldCount] = useState<any | null>(null)
Expand Down
2 changes: 1 addition & 1 deletion src/components/CreationCohort/DiagramView/DiagramView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const DiagramView: React.FC = () => {

const maintenanceIsActive = meState?.maintenance?.active

const classes = useStyles()
const { classes } = useStyles()

return (
<Grid container className={classes.root}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { fetchRequests as fetchRequestsList } from 'state/request'
import useStyles from './styles'

const CohortCreationBreadcrumbs: React.FC = () => {
const classes = useStyles()
const { classes } = useStyles()
const dispatch = useAppDispatch()

const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type CriteriaCardProps = {
}

const CriteriaCard: React.FC<CriteriaCardProps> = ({ itemId, duplicateCriteria, editCriteria, deleteCriteria }) => {
const classes = useStyles()
const { classes } = useStyles()

const { meState } = useAppSelector<{ meState: MeState }>((state) => ({ meState: state.me }))
const maintenanceIsActive = meState?.maintenance?.active
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ const CriteriaCardContent: React.FC<CriteriaCardContentProps> = ({ currentCriter
return content
}

const classes = useStyles()
const { classes } = useStyles()

const criteria = useAppSelector((state) => state.cohortCreation.criteria)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const OperatorItem: React.FC<OperatorItemProps> = ({
duplicateCriteria,
editCriteria
}) => {
const classes = useStyles()
const { classes } = useStyles()

const { request } = useAppSelector((state) => state.cohortCreation || {})
const { loading = false, criteriaGroup = [], selectedCriteria = [] } = request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type OccurrenceInputsProps = {
const OccurrenceInputs: React.FC<OccurrenceInputsProps> = (props) => {
const { form, selectedCriteria, onChangeValue } = props

const classes = useStyles()
const { classes } = useStyles()

return (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type VisitInputsProps = {
const VisitInputs: React.FC<VisitInputsProps> = (props) => {
const { selectedCriteria, onChangeValue } = props

const classes = useStyles()
const { classes } = useStyles()

return (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type BiologySearchListItemProps = {
const BiologySearchListItem: React.FC<BiologySearchListItemProps> = (props) => {
const { label, biologyItem, selectedItems, handleClick } = props

const classes = useStyles()
const { classes } = useStyles()

const isSelected = selectedItems
? selectedItems.find((item) => item.target[0].code === biologyItem.target[0].code)
Expand Down Expand Up @@ -94,7 +94,7 @@ type BiologySearchProps = {

const BiologySearch: React.FC<BiologySearchProps> = (props) => {
const { isEdition, criteria, goBack, onChangeSelectedCriteria, onConfirm, selectedCriteria } = props
const classes = useStyles()
const { classes } = useStyles()

const [selectedTab, setSelectedTab] = useState<'anabio' | 'loinc'>('anabio')
const [searchInput, setSearchInput] = useState<string>('')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type BiologyFormProps = {
const BiologyForm: React.FC<BiologyFormProps> = (props) => {
const { isOpen, isEdition, criteria, selectedCriteria, onChangeValue, onChangeSelectedCriteria, goBack } = props

const classes = useStyles()
const { classes } = useStyles()
const dispatch = useAppDispatch()
const initialState: HierarchyTree | null = useAppSelector((state) => state.syncHierarchyTable)
const currentState = { ...selectedCriteria, ...initialState }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const BiologyListItem: React.FC<BiologyListItemProps> = (props) => {
const { biologyItem, selectedItems, handleClick } = props
const { id, label, subItems } = biologyItem

const classes = useStyles()
const { classes } = useStyles()
const dispatch = useAppDispatch()

const biologyHierarchy = useAppSelector((state) => state.biology.list || {})
Expand Down Expand Up @@ -153,7 +153,7 @@ type BiologyHierarchyProps = {

const BiologyHierarchy: React.FC<BiologyHierarchyProps> = (props) => {
const { isOpen = false, selectedCriteria, onChangeSelectedHierarchy, onConfirm, goBack, isEdition } = props
const classes = useStyles()
const { classes } = useStyles()

const initialState: HierarchyTree | null = useAppSelector((state) => state.syncHierarchyTable)
const isLoadingSyncHierarchyTable = initialState?.loading ?? 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const defaultBiology = {
const Index = (props: any) => {
const { criteria, selectedCriteria, onChangeSelectedCriteria, goBack } = props

const classes = useStyles()
const { classes } = useStyles()
const [selectedTab, setSelectedTab] = useState<'form' | 'hierarchy' | 'search'>(
selectedCriteria ? 'form' : 'hierarchy'
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type CcamFormProps = {
const CcamForm: React.FC<CcamFormProps> = (props) => {
const { isOpen, isEdition, criteria, selectedCriteria, onChangeValue, onChangeSelectedCriteria, goBack } = props

const classes = useStyles()
const { classes } = useStyles()
const dispatch = useAppDispatch()
const initialState: HierarchyTree | null = useAppSelector((state) => state.syncHierarchyTable)
const currentState = { ...selectedCriteria, ...initialState }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const ProcedureListItem: React.FC<ProcedureListItemProps> = (props) => {
const { procedureItem, selectedItems, handleClick } = props
const { id, label, subItems } = procedureItem

const classes = useStyles()
const { classes } = useStyles()
const dispatch = useAppDispatch()

const procedureHierarchy = useAppSelector((state) => state.pmsi.procedure.list || {})
Expand Down Expand Up @@ -161,7 +161,7 @@ type ProcedureHierarchyProps = {
const ProcedureHierarchy: React.FC<ProcedureHierarchyProps> = (props) => {
const { isOpen = false, selectedCriteria, onChangeSelectedHierarchy, onConfirm, goBack, isEdition } = props

const classes = useStyles()
const { classes } = useStyles()
const initialState: HierarchyTree | null = useAppSelector((state) => state.syncHierarchyTable)
const isLoadingSyncHierarchyTable = initialState?.loading ?? 0
const isLoadingPmsi = useAppSelector((state) => state.pmsi.syncLoading || 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const Index = (props: any) => {
const isEdition = selectedCriteria !== null
const dispatch = useAppDispatch()
const ccamHierarchy = useAppSelector((state) => state.pmsi.procedure.list || {})
const classes = useStyles()
const { classes } = useStyles()

const _onChangeSelectedHierarchy = (
newSelectedItems: PmsiListType[] | null | undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type Cim10FormProps = {
const Cim10Form: React.FC<Cim10FormProps> = (props) => {
const { isOpen, isEdition, criteria, selectedCriteria, onChangeValue, onChangeSelectedCriteria, goBack } = props

const classes = useStyles()
const { classes } = useStyles()
const dispatch = useAppDispatch()
const initialState: HierarchyTree | null = useAppSelector((state) => state.syncHierarchyTable)
const currentState = { ...selectedCriteria, ...initialState }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const CimListItem: React.FC<CimListItemProps> = (props) => {
const { cim10Item, selectedItems, handleClick } = props
const { id, label, subItems } = cim10Item

const classes = useStyles()
const { classes } = useStyles()
const dispatch = useAppDispatch()

const cim10Hierarchy = useAppSelector((state) => state.pmsi.condition.list || {})
Expand Down Expand Up @@ -153,7 +153,7 @@ type Cim10HierarchyProps = {
const Cim10Hierarchy: React.FC<Cim10HierarchyProps> = (props) => {
const { isOpen = false, selectedCriteria, onChangeSelectedHierarchy, onConfirm, goBack, isEdition } = props

const classes = useStyles()
const { classes } = useStyles()
const initialState: HierarchyTree | null = useAppSelector((state) => state.syncHierarchyTable)
const isLoadingSyncHierarchyTable = initialState?.loading ?? 0
const isLoadingPmsi = useAppSelector((state) => state.pmsi.syncLoading || 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const Index = (props: any) => {
const dispatch = useAppDispatch()
const cim10Hierarchy = useAppSelector((state) => state.pmsi.condition.list || {})

const classes = useStyles()
const { classes } = useStyles()
const _onChangeSelectedHierarchy = (
newSelectedItems: PmsiListType[] | null | undefined,
newHierarchy?: PmsiListType[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const CriteriaListItem: React.FC<CriteriaListItemProps> = (props) => {
const { criteriaItem, handleClick } = props
const { color, title, components, subItems, disabled } = criteriaItem

const classes = useStyles()
const { classes } = useStyles()
const [open, setOpen] = useState(true)

const cursor = disabled ? 'not-allowed' : components ? 'pointer' : 'default'
Expand Down Expand Up @@ -70,7 +70,7 @@ type CriteriaRightPanelProps = {
const CriteriaRightPanel: React.FC<CriteriaRightPanelProps> = (props) => {
const { open, onClose, parentId, criteria, selectedCriteria, onChangeSelectedCriteria } = props

const classes = useStyles()
const { classes } = useStyles()
const [action, setAction] = useState<CriteriaItemType | null>(null)

const DrawerComponent = action ? action.components : null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const DemographicForm: React.FC<DemographicFormProps> = (props) => {
const { criteria, selectedCriteria, onChangeSelectedCriteria, goBack } = props
const [defaultValues, setDefaultValues] = useState(selectedCriteria || defaultDemographic)

const classes = useStyles()
const { classes } = useStyles()

const [error, setError] = useState(false)
const [ageError, setAgeError] = useState(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const defaultComposition: DocumentDataType = {
const CompositionForm: React.FC<TestGeneratedFormProps> = (props) => {
const { criteria, selectedCriteria, onChangeSelectedCriteria, goBack } = props

const classes = useStyles()
const { classes } = useStyles()

const [error, setError] = useState(false)
const [defaultValues, setDefaultValues] = useState(selectedCriteria || defaultComposition)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type GHMFormProps = {
const GhmForm: React.FC<GHMFormProps> = (props) => {
const { isOpen, isEdition, criteria, selectedCriteria, onChangeValue, onChangeSelectedCriteria, goBack } = props

const classes = useStyles()
const { classes } = useStyles()
const dispatch = useAppDispatch()
const initialState: HierarchyTree | null = useAppSelector((state) => state.syncHierarchyTable)
const currentState = { ...selectedCriteria, ...initialState }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const GhmListItem: React.FC<GhmListItemProps> = (props) => {
const { ghmItem, selectedItems, handleClick } = props
const { id, label, subItems } = ghmItem

const classes = useStyles()
const { classes } = useStyles()
const dispatch = useAppDispatch()

const ghmHierarchy = useAppSelector((state) => state.pmsi.claim.list || {})
Expand Down Expand Up @@ -143,7 +143,7 @@ type GhmHierarchyProps = {
const GhmHierarchy: React.FC<GhmHierarchyProps> = (props) => {
const { isOpen = false, selectedCriteria, onChangeSelectedHierarchy, onConfirm, goBack, isEdition } = props

const classes = useStyles()
const { classes } = useStyles()
const initialState: HierarchyTree | null = useAppSelector((state) => state.syncHierarchyTable)
const isLoadingSyncHierarchyTable = initialState?.loading ?? 0
const isLoadingPmsi = useAppSelector((state) => state.pmsi.syncLoading || 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const Index = (props: any) => {
const ghmState = useAppSelector((state) => state.pmsi.claim || {})
const ghmHierarchy = ghmState.list

const classes = useStyles()
const { classes } = useStyles()

const _onChangeSelectedHierarchy = (
newSelectedItems: PmsiListType[] | null | undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const defaultIPPList: IPPListDataType = {
const IPPForm: React.FC<IPPFormProps> = (props) => {
const { selectedCriteria, goBack, onChangeSelectedCriteria } = props

const classes = useStyles()
const { classes } = useStyles()

const [error, setError] = useState(false)
const [defaultValues, setDefaultValues] = useState(selectedCriteria || defaultIPPList)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type MedicationFormProps = {
const MedicationForm: React.FC<MedicationFormProps> = (props) => {
const { isOpen, isEdition, criteria, selectedCriteria, onChangeValue, onChangeSelectedCriteria, goBack } = props

const classes = useStyles()
const { classes } = useStyles()
const dispatch = useAppDispatch()

const initialState: HierarchyTree | null = useAppSelector((state) => state.syncHierarchyTable)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const MedicationListItem: React.FC<MedicationListItemProps> = (props) => {
const { medicationItem, selectedItems, handleClick, setLoading } = props
const { id, label, subItems } = medicationItem

const classes = useStyles()
const { classes } = useStyles()
const dispatch = useAppDispatch()

const medicationHierarchy = useAppSelector((state) => state.medication.list || {})
Expand Down Expand Up @@ -165,7 +165,7 @@ type MedicationHierarchyProps = {
const MedicationHierarchy: React.FC<MedicationHierarchyProps> = (props) => {
const { isOpen = false, selectedCriteria, onChangeSelectedHierarchy, onConfirm, goBack, isEdition } = props

const classes = useStyles()
const { classes } = useStyles()
const initialState: HierarchyTree | null = useAppSelector((state) => state.syncHierarchyTable)
const isLoadingSyncHierarchyTable: number = initialState?.loading ?? 0
const isLoadingMedication: number = useAppSelector((state) => state.medication.syncLoading || 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const Index = (props: any) => {
const dispatch = useAppDispatch()
const medicationHierarchy = useAppSelector((state) => state.medication.list || {})

const classes = useStyles()
const { classes } = useStyles()

const _onChangeSelectedHierarchy = (newSelectedItems: any, newHierarchy?: PmsiListType[]) => {
_onChangeFormValue('code', newSelectedItems, newHierarchy)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type RequestFormProps = {
}

const RequestForm: React.FC<RequestFormProps> = ({ parentId, goBack }) => {
const classes = useStyles()
const { classes } = useStyles()
const dispatch = useAppDispatch()

const { projectState, requestState } = useAppSelector((state) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const SupportedForm: React.FC<SupportedFormProps> = (props) => {

const [defaultValues, setDefaultValues] = useState(selectedCriteria || defaultEncounter)

const classes = useStyles()
const { classes } = useStyles()

const [error, setError] = useState(false)
const [sliderError, setSliderError] = useState(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type AdmissionInputsProps = {
}

const AdmissionInputs: React.FC<AdmissionInputsProps> = ({ criteria, selectedCriteria, onChangeValue }) => {
const classes = useStyles()
const { classes } = useStyles()
const [checked, setCheck] = useState(true)

const defaultValuesAdmissionModes = selectedCriteria.admissionMode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type EntryExitInputsProps = {
}

const EntryExitInputs: React.FC<EntryExitInputsProps> = ({ criteria, selectedCriteria, onChangeValue }) => {
const classes = useStyles()
const { classes } = useStyles()
const [checked, setCheck] = useState(true)

const defaultValuesEntryModes = selectedCriteria.entryMode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type AdmissionInputsProps = {
}

const ProvenanceDestinationInputs: React.FC<AdmissionInputsProps> = ({ criteria, selectedCriteria, onChangeValue }) => {
const classes = useStyles()
const { classes } = useStyles()
const [checked, setCheck] = useState(true)

const defaultValuesPriseEnChargeType = selectedCriteria.priseEnChargeType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type AdmissionInputsProps = {
}

const ProvenanceDestinationInputs: React.FC<AdmissionInputsProps> = ({ criteria, selectedCriteria, onChangeValue }) => {
const classes = useStyles()
const { classes } = useStyles()
const [checked, setCheck] = useState(true)

const defaultValuesDestination = selectedCriteria.destination
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type LogicalOperatorItemProps = {
}

const LogicalOperatorItem: React.FC<LogicalOperatorItemProps> = ({ itemId }) => {
const classes = useStyles()
const { classes } = useStyles()
const dispatch = useAppDispatch()

let timeout: any = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { getSelectedScopes, filterScopeTree } from 'utils/scopeTree'
import useStyles from './styles'

const PopulationCard: React.FC = () => {
const classes = useStyles()
const { classes } = useStyles()
const dispatch = useAppDispatch()
const isRendered = useRef<boolean>(false)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type PopulationRightPanelProps = {
const PopulationRightPanel: React.FC<PopulationRightPanelProps> = (props) => {
const { open, onConfirm, onClose } = props

const classes = useStyles()
const { classes } = useStyles()

const { selectedPopulation = [] } = useAppSelector((state) => state.cohortCreation.request || {})
const [_selectedPopulation, onChangeSelectedPopulation] = useState<ScopeTreeRow[]>([])
Expand Down
Loading

0 comments on commit 19660f2

Please sign in to comment.