Skip to content

Commit a6516e2

Browse files
committed
Fixed the column alignment.
1 parent 6fd71c8 commit a6516e2

File tree

2 files changed

+64
-49
lines changed

2 files changed

+64
-49
lines changed

web-ui/src/components/reports-section/checkin-report/TeamMemberMap.jsx

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -85,21 +85,27 @@ const TeamMemberMap = ({ members, closed, planned, reportDate }) => {
8585

8686
return (
8787
<Box className="team-member-map">
88-
<Box display="flex">
89-
<Box flex={2} onClick={() => { setSortBy(SortOption.BY_MEMBER); }}
90-
style={{ cursor: 'pointer' }}>
91-
<Typography variant="h5">Member</Typography>
92-
</Box>
93-
<Box flex={1} onClick={() => { setSortBy(SortOption.BY_PDL); }}
94-
style={{ cursor: 'pointer' }}>
95-
<Typography variant="h5">PDL</Typography>
96-
</Box>
97-
<Box flex={1}
98-
sx={{ display: { xs: 'none', sm: 'none', md: 'grid' } }}>
99-
<Typography variant="h5">Check-In Date</Typography>
100-
</Box>
101-
<Box flex={1}>
102-
<Typography variant="h5">Status</Typography>
88+
{/* This header row mimics the configuration of the individual member
89+
rows so that each header lines up exactly with the columns. */}
90+
<Box className="team-member-map-row">
91+
<Box className="team-member-map-row-summary">
92+
<Box onClick={() => { setSortBy(SortOption.BY_MEMBER); }}
93+
style={{ cursor: 'pointer' }}>
94+
<Typography variant="h5">Member</Typography>
95+
</Box>
96+
<div className="team-member-map-summmary-content">
97+
<hgroup>{/* This forces the PDL header over. */}</hgroup>
98+
<Box onClick={() => { setSortBy(SortOption.BY_PDL); }}
99+
style={{ cursor: 'pointer' }}>
100+
<Typography variant="h5">PDL</Typography>
101+
</Box>
102+
<Box sx={{ display: { xs: 'none', sm: 'none', md: 'grid' } }}>
103+
<Typography variant="h5">Check-In Date</Typography>
104+
</Box>
105+
<Box>
106+
<Typography variant="h5">Status</Typography>
107+
</Box>
108+
</div>
103109
</Box>
104110
</Box>
105111
{

web-ui/src/pages/__snapshots__/CheckinsReportPage.test.jsx.snap

Lines changed: 43 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -115,45 +115,54 @@ exports[`renders correctly 1`] = `
115115
class="team-member-map MuiBox-root css-0"
116116
>
117117
<div
118-
class="MuiBox-root css-k008qs"
118+
class="team-member-map-row MuiBox-root css-0"
119119
>
120120
<div
121-
class="MuiBox-root css-kzfr2u"
122-
style="cursor: pointer;"
121+
class="team-member-map-row-summary MuiBox-root css-0"
123122
>
124-
<h5
125-
class="MuiTypography-root MuiTypography-h5 css-ag7rrr-MuiTypography-root"
123+
<div
124+
class="MuiBox-root css-0"
125+
style="cursor: pointer;"
126126
>
127-
Member
128-
</h5>
129-
</div>
130-
<div
131-
class="MuiBox-root css-1rr4qq7"
132-
style="cursor: pointer;"
133-
>
134-
<h5
135-
class="MuiTypography-root MuiTypography-h5 css-ag7rrr-MuiTypography-root"
136-
>
137-
PDL
138-
</h5>
139-
</div>
140-
<div
141-
class="MuiBox-root css-1guejwj"
142-
>
143-
<h5
144-
class="MuiTypography-root MuiTypography-h5 css-ag7rrr-MuiTypography-root"
145-
>
146-
Check-In Date
147-
</h5>
148-
</div>
149-
<div
150-
class="MuiBox-root css-1rr4qq7"
151-
>
152-
<h5
153-
class="MuiTypography-root MuiTypography-h5 css-ag7rrr-MuiTypography-root"
127+
<h5
128+
class="MuiTypography-root MuiTypography-h5 css-ag7rrr-MuiTypography-root"
129+
>
130+
Member
131+
</h5>
132+
</div>
133+
<div
134+
class="team-member-map-summmary-content"
154135
>
155-
Status
156-
</h5>
136+
<hgroup />
137+
<div
138+
class="MuiBox-root css-0"
139+
style="cursor: pointer;"
140+
>
141+
<h5
142+
class="MuiTypography-root MuiTypography-h5 css-ag7rrr-MuiTypography-root"
143+
>
144+
PDL
145+
</h5>
146+
</div>
147+
<div
148+
class="MuiBox-root css-1mvoz6j"
149+
>
150+
<h5
151+
class="MuiTypography-root MuiTypography-h5 css-ag7rrr-MuiTypography-root"
152+
>
153+
Check-In Date
154+
</h5>
155+
</div>
156+
<div
157+
class="MuiBox-root css-0"
158+
>
159+
<h5
160+
class="MuiTypography-root MuiTypography-h5 css-ag7rrr-MuiTypography-root"
161+
>
162+
Status
163+
</h5>
164+
</div>
165+
</div>
157166
</div>
158167
</div>
159168
</div>

0 commit comments

Comments
 (0)