From 0b3767775b5b9034072cfe64de073af6c17d7df9 Mon Sep 17 00:00:00 2001 From: mourads <111437871+mouradsellam2@users.noreply.github.com> Date: Tue, 10 Oct 2023 10:39:18 +0200 Subject: [PATCH] feat: improve inderminate icons - Ref gestion-de-projet-#2272 (#874) --- .../CriteriaRightPanel/DocumentsForm/DocumentsForm.tsx | 2 ++ src/components/Filters/DocumentFilters/DocumentFilters.tsx | 2 ++ src/components/MyProjects/ProjectTable/ProjectTable.tsx | 2 ++ src/components/ScopeTree/ScopeTree.tsx | 3 +++ .../ScopeTree/ScopeTreeTable/components/TableHead.jsx | 4 ++-- 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/DocumentsForm/DocumentsForm.tsx b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/DocumentsForm/DocumentsForm.tsx index dd025df77..7b73abbc8 100644 --- a/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/DocumentsForm/DocumentsForm.tsx +++ b/src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/DocumentsForm/DocumentsForm.tsx @@ -40,6 +40,7 @@ import { import services from 'services/aphp' import { useDebounce } from 'utils/debounce' import OccurrencesNumberInputs from '../AdvancedInputs/OccurrencesInputs/OccurrenceNumberInputs' +import { IndeterminateCheckBoxOutlined } from '@mui/icons-material' const defaultComposition: DocumentDataType = { type: 'DocumentReference', @@ -256,6 +257,7 @@ const CompositionForm: React.FC = (props) => { } checked={currentDocTypeList.length === currentSelectedDocTypeList.length} onClick={onClick} + indeterminateIcon={} /> {docType.group} diff --git a/src/components/Filters/DocumentFilters/DocumentFilters.tsx b/src/components/Filters/DocumentFilters/DocumentFilters.tsx index aa66f6462..3e6e5e1cc 100644 --- a/src/components/Filters/DocumentFilters/DocumentFilters.tsx +++ b/src/components/Filters/DocumentFilters/DocumentFilters.tsx @@ -30,6 +30,7 @@ import { CriteriaName, DocumentFilters, ScopeTreeRow } from 'types' import useStyles from './styles' import PopulationCard from 'components/CreationCohort/DiagramView/components/PopulationCard/PopulationCard' +import { IndeterminateCheckBoxOutlined } from '@mui/icons-material' type DocumentFiltersProps = { open: boolean @@ -151,6 +152,7 @@ const ModalDocumentFilters: React.FC = ({ } checked={currentDocTypeList.length === currentSelectedDocTypeList.length} onClick={onClick} + indeterminateIcon={} /> {docType.group} diff --git a/src/components/MyProjects/ProjectTable/ProjectTable.tsx b/src/components/MyProjects/ProjectTable/ProjectTable.tsx index 4271bcc4e..3a883f418 100644 --- a/src/components/MyProjects/ProjectTable/ProjectTable.tsx +++ b/src/components/MyProjects/ProjectTable/ProjectTable.tsx @@ -23,6 +23,7 @@ import { RequestState } from 'state/request' import { CohortState } from 'state/cohort' import useStyles from './styles' +import { IndeterminateCheckBoxOutlined } from '@mui/icons-material' type ProjectTableProps = { searchInput?: string @@ -171,6 +172,7 @@ const ProjectTable: React.FC = ({ searchInput, setSelectedReq } }} color="secondary" + indeterminateIcon={} /> diff --git a/src/components/ScopeTree/ScopeTree.tsx b/src/components/ScopeTree/ScopeTree.tsx index a5c22624f..07b876d22 100644 --- a/src/components/ScopeTree/ScopeTree.tsx +++ b/src/components/ScopeTree/ScopeTree.tsx @@ -39,6 +39,7 @@ import { import servicesPerimeters, { loadingItem } from '../../services/aphp/servicePerimeters' import { findSelectedInListAndSubItems } from '../../utils/cohortCreation' import { _cancelPendingRequest } from 'utils/abortController' +import { IndeterminateCheckBoxOutlined } from '@mui/icons-material' type ScopeTreeListItemProps = { row: any @@ -111,6 +112,7 @@ const ScopeTreeListItem: React.FC = (props) => { indeterminate={isIndeterminated(row)} checked={isSelected(row, selectedItems, rootRows) ? true : false} inputProps={{ 'aria-labelledby': labelId }} + indeterminateIcon={} /> @@ -448,6 +450,7 @@ const ScopeTree: React.FC = ({ checked={isHeadChecked} indeterminate={isHeadIndetermined} onClick={_onSelectAll} + indeterminateIcon={} /> ) diff --git a/src/components/ScopeTree/ScopeTreeTable/components/TableHead.jsx b/src/components/ScopeTree/ScopeTreeTable/components/TableHead.jsx index c094356d5..e66a638c6 100644 --- a/src/components/ScopeTree/ScopeTreeTable/components/TableHead.jsx +++ b/src/components/ScopeTree/ScopeTreeTable/components/TableHead.jsx @@ -5,7 +5,7 @@ import TableHead from '@mui/material/TableHead' import TableRow from '@mui/material/TableRow' import TableSortLabel from '@mui/material/TableSortLabel' import Checkbox from '@mui/material/Checkbox' -import IndeterminateCheckBoxIcon from '@mui/icons-material/IndeterminateCheckBox' +import { IndeterminateCheckBoxOutlined } from '@mui/icons-material' function EnhancedTableHead(props) { const { classes, onSelectAllClick, order, orderBy, numSelected, rowCount, onRequestSort } = props @@ -22,10 +22,10 @@ function EnhancedTableHead(props) { 0 && numSelected < rowCount} - indeterminateIcon={} checked={rowCount > 0 && numSelected === rowCount} onChange={onSelectAllClick} inputProps={{ 'aria-label': 'select all desserts' }} + indeterminateIcon={} /> )}