Skip to content

Commit 8734dc9

Browse files
authored
Merge branch 'develop' into release/0.8
2 parents 2f26159 + 661855b commit 8734dc9

File tree

3 files changed

+67
-43
lines changed

3 files changed

+67
-43
lines changed

server/src/main/resources/db/dev/R__Load_testing_data.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,12 +1291,12 @@ VALUES
12911291
INSERT INTO review_periods
12921292
(id, name, review_status, review_template_id, self_review_template_id, launch_date, self_review_close_date, close_date, period_start_date, period_end_date)
12931293
VALUES
1294-
('12345678-e29c-4cf4-9ea4-6baa09405c57', 'Review Period 1', 'PLANNING', 'd1e94b60-47c4-4945-87d1-4dc88f088e57', '926a37a4-4ded-4633-8900-715b0383aecc', '2024-09-01 06:00:00', '2024-09-02 06:00:00', '2024-09-03 06:00:00', '2024-01-01 06:00:00', '2024-08-31 06:00:00');
1294+
('12345678-e29c-4cf4-9ea4-6baa09405c57', 'Review Period 1', 'PLANNING', 'd1e94b60-47c4-4945-87d1-4dc88f088e57', '926a37a4-4ded-4633-8900-715b0383aecc', CURRENT_DATE + TIME '06:00:00', CURRENT_DATE + INTERVAL '1' DAY + TIME '06:00:00', CURRENT_DATE + INTERVAL '2' DAY + TIME '06:00:00', date_trunc('year', CURRENT_DATE) + TIME '06:00:00', CURRENT_DATE + INTERVAL '-1' DAY + TIME '06:00:00');
12951295

12961296
INSERT INTO review_periods
12971297
(id, name, review_status, review_template_id, self_review_template_id, launch_date, self_review_close_date, close_date, period_start_date, period_end_date)
12981298
VALUES
1299-
('12345678-e29c-4cf4-9ea4-6baa09405c58', 'Review Period 2', 'PLANNING', 'd1e94b60-47c4-4945-87d1-4dc88f088e57', '926a37a4-4ded-4633-8900-715b0383aecc', '2024-09-10 06:00:00', '2024-09-11 06:00:00', '2024-09-12 06:00:00', '2024-01-01 06:00:00', '2024-08-31 06:00:00');
1299+
('12345678-e29c-4cf4-9ea4-6baa09405c58', 'Review Period 2', 'PLANNING', 'd1e94b60-47c4-4945-87d1-4dc88f088e57', '926a37a4-4ded-4633-8900-715b0383aecc', CURRENT_DATE + TIME '06:00:00', CURRENT_DATE + INTERVAL '1' DAY + TIME '06:00:00', CURRENT_DATE + INTERVAL '2' DAY + TIME '06:00:00', date_trunc('year', CURRENT_DATE) + TIME '06:00:00', CURRENT_DATE + INTERVAL '-1' DAY + TIME '06:00:00');
13001300

13011301
INSERT INTO review_periods
13021302
(id, name, review_status, review_template_id, self_review_template_id, launch_date, self_review_close_date, close_date, period_start_date, period_end_date)

web-ui/src/pages/HomePage.jsx

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import MyBirthday from '../components/celebrations/MyBirthday';
99
import { AppContext } from '../context/AppContext';
1010
import { selectCsrfToken, selectCurrentUser } from '../context/selectors';
1111
import { sortAnniversaries, sortBirthdays } from '../context/util';
12-
import { Button } from '@mui/material';
12+
import { Button, Grid } from '@mui/material';
1313

1414
import './HomePage.css';
1515

@@ -76,6 +76,13 @@ export default function HomePage() {
7676
return document.cookie.indexOf("OJWT=") != -1;
7777
}
7878

79+
// This width matches the birthdays-card and anniversaries-card style.
80+
// However, we do not want to set this width on the PublicKudos css as it is
81+
// used elsewhere and does not need to have it's width restricted. This only
82+
// applies if if we have birthdays or anniversaries to display on this page.
83+
const kudosStyle = birthdays.length == 0 &&
84+
anniversaries.length == 0 ? {} : { width: '450px' };
85+
7986
return (
8087
<div className="home-page">
8188
<div className="celebrations">
@@ -87,11 +94,19 @@ export default function HomePage() {
8794
myAnniversary={myAnniversaryData}
8895
/>
8996
) : (
90-
<>
91-
{ anniversaries.length > 0 && (<Anniversaries anniversaries={anniversaries} />) }
92-
{ birthdays.length > 0 && (<Birthdays birthdays={birthdays} />) }
93-
<PublicKudos />
94-
</>
97+
<Grid container spacing={2} style={{ padding: '0 20px 0 20px' }}>
98+
{ anniversaries.length > 0 && (
99+
<Grid item>
100+
<Anniversaries anniversaries={anniversaries} />
101+
</Grid>) }
102+
{ birthdays.length > 0 && (
103+
<Grid item>
104+
<Birthdays birthdays={birthdays} />
105+
</Grid>) }
106+
<Grid item style={kudosStyle}>
107+
<PublicKudos />
108+
</Grid>
109+
</Grid>
95110
)}
96111
</div>
97112
{checkForImpersonation() &&

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

Lines changed: 44 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,49 +9,58 @@ exports[`renders correctly 1`] = `
99
class="celebrations"
1010
>
1111
<div
12-
class="public-kudos"
12+
class="MuiGrid-root MuiGrid-container MuiGrid-spacing-xs-2 css-mhc70k-MuiGrid-root"
13+
style="padding: 0px 20px 0px 20px;"
1314
>
1415
<div
15-
class="kudos-title"
16+
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
1617
>
17-
<h1>
18-
Kudos
19-
</h1>
20-
<button
21-
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary kudos-dialog-open css-1e6y48t-MuiButtonBase-root-MuiButton-root"
22-
tabindex="0"
23-
type="button"
18+
<div
19+
class="public-kudos"
2420
>
25-
<span
26-
class="MuiButton-icon MuiButton-startIcon MuiButton-iconSizeMedium css-1d6wzja-MuiButton-startIcon"
21+
<div
22+
class="kudos-title"
2723
>
28-
<svg
29-
aria-hidden="true"
30-
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-i4bv87-MuiSvgIcon-root"
31-
data-testid="StarIcon"
32-
focusable="false"
33-
viewBox="0 0 24 24"
24+
<h1>
25+
Kudos
26+
</h1>
27+
<button
28+
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary kudos-dialog-open css-1e6y48t-MuiButtonBase-root-MuiButton-root"
29+
tabindex="0"
30+
type="button"
3431
>
35-
<path
36-
d="M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"
32+
<span
33+
class="MuiButton-icon MuiButton-startIcon MuiButton-iconSizeMedium css-1d6wzja-MuiButton-startIcon"
34+
>
35+
<svg
36+
aria-hidden="true"
37+
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-i4bv87-MuiSvgIcon-root"
38+
data-testid="StarIcon"
39+
focusable="false"
40+
viewBox="0 0 24 24"
41+
>
42+
<path
43+
d="M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"
44+
/>
45+
</svg>
46+
</span>
47+
Give Kudos
48+
<span
49+
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
3750
/>
38-
</svg>
39-
</span>
40-
Give Kudos
41-
<span
42-
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
43-
/>
44-
</button>
45-
</div>
46-
<div
47-
class="MuiGrid-root MuiGrid-container MuiGrid-spacing-xs-3 css-zow5z4-MuiGrid-root"
48-
>
49-
<div
50-
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
51-
>
51+
</button>
52+
</div>
5253
<div
53-
class="kudos-list"
54-
/>
54+
class="MuiGrid-root MuiGrid-container MuiGrid-spacing-xs-3 css-zow5z4-MuiGrid-root"
55+
>
56+
<div
57+
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
58+
>
59+
<div
60+
class="kudos-list"
61+
/>
62+
</div>
63+
</div>
5564
</div>
5665
</div>
5766
</div>

0 commit comments

Comments
 (0)