Skip to content

Commit dcba805

Browse files
aetchegopl-buiquang
authored andcommitted
fix(harmonisation visuelle): corrections - Ref gestion-de-projet#2873… (#1088)
fix(harmonisation visuelle): corrections - Ref gestion-de-projet#2873 (#1087)
1 parent 7d8d0ec commit dcba805

File tree

7 files changed

+44
-28
lines changed

7 files changed

+44
-28
lines changed

src/components/CreationCohort/DiagramView/components/LogicalOperator/components/CriteriaRightPanel/Cim10Form/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ const Cim10Form = (props: CriteriaDrawerComponentProps) => {
192192
value={currentCriteria.code}
193193
references={cim10References}
194194
onSelect={(value) => setCurrentCriteria({ ...currentCriteria, code: value })}
195-
placeholder="Sélectionner les codes Cim10"
195+
placeholder="Sélectionner les codes CIM10"
196196
/>
197197
</Grid>
198198
<Autocomplete

src/components/Hierarchy/styles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Grid, styled } from '@mui/material'
22

33
type RowContainerProps = {
4-
color: string
4+
color?: string
55
}
66

77
type RowWrapperProps = {
@@ -14,7 +14,7 @@ type CellWrapperProps = {
1414
fontWeight?: number
1515
}
1616

17-
export const RowContainerWrapper = styled(Grid)<RowContainerProps>(({ color }) => ({
17+
export const RowContainerWrapper = styled(Grid)<RowContainerProps>(({ color = '#fff' }) => ({
1818
backgroundColor: color,
1919
borderBottom: '1px solid rgba(224, 224, 224, 1)',
2020
padding: '0 8px'

src/components/SearchValueSet/ValueSetField.tsx

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ type ValueSetFieldProps = {
1818
onSelect: (selectedItems: Hierarchy<FhirItem>[]) => void
1919
}
2020

21+
const PANEL_WIDTH = '900px'
22+
2123
const ValueSetField = ({ value, references, placeholder, disabled = false, onSelect }: ValueSetFieldProps) => {
2224
const [openCodeResearch, setOpenCodeResearch] = useState(false)
2325
const [isExtended, setIsExtended] = useState(false)
@@ -28,6 +30,11 @@ const ValueSetField = ({ value, references, placeholder, disabled = false, onSel
2830
onSelect(newCodes)
2931
}
3032

33+
const handleOpen = () => {
34+
setOpenCodeResearch(true)
35+
setIsExtended(false)
36+
}
37+
3138
return (
3239
<>
3340
<Grid
@@ -37,7 +44,16 @@ const ValueSetField = ({ value, references, placeholder, disabled = false, onSel
3744
borderRadius="4px"
3845
padding="9px 3px 9px 12px"
3946
>
40-
<Grid container alignItems="center" item xs={10}>
47+
<Grid
48+
container
49+
alignItems="center"
50+
item
51+
xs={10}
52+
role="button"
53+
tabIndex={0}
54+
style={{ cursor: 'pointer' }}
55+
onClick={handleOpen}
56+
>
4157
<CodesWithSystems disabled={disabled} codes={value} isExtended={isExtended} onDelete={handleDelete} />
4258
{!value.length && <FormLabel component="legend">{placeholder}</FormLabel>}
4359
</Grid>
@@ -52,20 +68,13 @@ const ValueSetField = ({ value, references, placeholder, disabled = false, onSel
5268
<MoreHorizIcon />
5369
</IconButton>
5470
)}
55-
<IconButton
56-
sx={{ color: '#5BC5F2' }}
57-
size="small"
58-
onClick={() => {
59-
setOpenCodeResearch(true)
60-
setIsExtended(false)
61-
}}
62-
disabled={disabled}
63-
>
71+
<IconButton sx={{ color: '#5BC5F2' }} size="small" onClick={handleOpen} disabled={disabled}>
6472
<SearchOutlined />
6573
</IconButton>
6674
</Grid>
6775
</Grid>
6876
<Panel
77+
size={PANEL_WIDTH}
6978
mandatory={isEqual(sortBy(confirmedValueSets), sortBy(value))}
7079
onConfirm={() => {
7180
onSelect(confirmedValueSets)

src/components/SearchValueSet/ValueSetTable.tsx

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ import {
66
Grid,
77
Table,
88
TableBody,
9-
TableCell,
109
TableContainer,
11-
TableRow,
10+
TableHead,
1211
Typography
1312
} from '@mui/material'
1413
import { LoadingStatus, SelectedStatus } from 'types'
@@ -155,14 +154,17 @@ const ValueSetTable = ({
155154
<Grid container item flexGrow={1}>
156155
<TableContainer style={{ background: 'white' }}>
157156
<Table>
158-
<TableBody>
157+
<TableHead>
159158
{loading.list === LoadingStatus.SUCCESS && !isHierarchy && (
160-
<TableRow>
161-
<TableCell colSpan={6}>
162-
<Grid container alignItems="center" justifyContent="space-between">
159+
<RowContainerWrapper container>
160+
<RowWrapper container alignItems="center" justifyContent="space-between" style={{ paddingRight: 10 }}>
161+
<CellWrapper item xs={1} />
162+
<CellWrapper item xs={10}>
163163
<Typography color={hierarchy.count ? 'primary' : '#4f4f4f'} fontWeight={600}>
164164
{hierarchy.count ? `${hierarchy.count} résultat(s)` : `Aucun résultat à afficher`}
165165
</Typography>
166+
</CellWrapper>
167+
<CellWrapper item xs={1} container>
166168
{hierarchy.count > 0 && (
167169
<Checkbox
168170
disabled={
@@ -176,11 +178,13 @@ const ValueSetTable = ({
176178
style={{ paddingRight: 16 }}
177179
/>
178180
)}
179-
</Grid>
180-
</TableCell>
181-
</TableRow>
181+
</CellWrapper>
182+
</RowWrapper>
183+
</RowContainerWrapper>
182184
)}
183-
{loading.list === LoadingStatus.SUCCESS && (
185+
</TableHead>
186+
{loading.list === LoadingStatus.SUCCESS && (
187+
<TableBody>
184188
<div style={{ maxHeight: '20vh' }}>
185189
{hierarchy.tree.map((item) =>
186190
item ? (
@@ -200,8 +204,8 @@ const ValueSetTable = ({
200204
)
201205
)}
202206
</div>
203-
)}
204-
</TableBody>
207+
</TableBody>
208+
)}
205209
</Table>
206210
{loading.list === LoadingStatus.FETCHING && (
207211
<Grid container justifyContent="center" alignContent="center" height={500}>

src/components/ui/Panel/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ type RightPanelProps = {
99
children: ReactNode
1010
cancelText?: string
1111
confirmText?: string
12+
size?: string
1213
onConfirm?: () => void
1314
onClose?: () => void
1415
}
@@ -19,6 +20,7 @@ const Panel = ({
1920
anchor = 'right',
2021
mandatory = false,
2122
children,
23+
size = '650px',
2224
cancelText = 'Annuler',
2325
confirmText = 'Confirmer',
2426
onConfirm,
@@ -28,11 +30,11 @@ const Panel = ({
2830
<Drawer
2931
anchor={anchor}
3032
open={open}
31-
PaperProps={{ style: { width: '650px' } }}
33+
PaperProps={{ style: { width: size } }}
3234
onClose={onClose}
3335
sx={{ zIndex: 1300, overflowY: 'unset' }}
3436
>
35-
<Grid container direction="column" maxWidth="650px" height="100%" flexWrap="nowrap">
37+
<Grid container direction="column" maxWidth={size} height="100%" flexWrap="nowrap">
3638
<Grid item container flexDirection="column" flexWrap="nowrap" overflow="auto">
3739
<Paper>
3840
<Grid container justifyContent="center" width="100%">

src/components/ui/Tabs/styles.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export const TabWrapper = styled(Tab)<TabCustomProps>(({ width, variant }) => ({
1919
padding: '0px 6px',
2020
fontSize: 13,
2121
width: width,
22+
maxWidth: '100%',
2223
'&.MuiButtonBase-root.MuiTab-root': {
2324
minHeight: 40
2425
},

src/types/valueSet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export enum ReferencesLabel {
1818
LOINC = 'LOINC',
1919
ANABIO = 'ANABIO',
2020
GHM = 'GHM',
21-
CIM10 = 'CIIM10',
21+
CIM10 = 'CIM10',
2222
CCAM = 'CCAM'
2323
}
2424

0 commit comments

Comments
 (0)