Skip to content

Commit 0cb5e51

Browse files
committed
timezone management
1 parent 5276c76 commit 0cb5e51

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1733
-359
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ node_modules
99
**/node_modules
1010

1111
webapp/target
12+
webapp/TODO.md
1213

1314
webapp/src/main/frontend/build
1415
webapp/src/main/frontend/package-lock.json

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.9.3]
9+
10+
## Added
11+
- Timezone management: Users can now select a specific timezone for each event and view the calendar in a different timezone. The default timezone is set to "Europe/Rome," but it can be customized in the user preferences page.
12+
- Added user preferences
13+
14+
## Improvements
15+
- Updated all frontend dependencies to use Node.js version 24, ensuring improved performance and compatibility
16+
- Enhanced the design and usability of the event popup for a better user experience.
817

918
## [0.9.2]
1019

webapp/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM tomcat:jre21
2-
ADD https://github.com/SirChri/employee-shift-scheduler/releases/latest/download/ess-v0.9.2.war /tmp/ess.war
2+
ADD ./ess.war /tmp/ess.war
33
RUN apt-get update && apt-get install unzip
44
RUN unzip /tmp/ess.war -d /usr/local/tomcat/webapps/ess
55

webapp/nb-configuration.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ That way multiple projects can share the same settings (useful for formatting ru
1414
Any value defined here will override the pom.xml file value but is only applicable to the current project.
1515
-->
1616
<netbeans.hint.license>mit</netbeans.hint.license>
17+
<netbeans.hint.jdkPlatform>JDK_17__System_</netbeans.hint.jdkPlatform>
1718
</properties>
1819
</project-shared-configuration>

webapp/nbactions.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<actions>
3+
<action>
4+
<actionName>debug</actionName>
5+
<packagings>
6+
<packaging>war</packaging>
7+
<packaging>ear</packaging>
8+
<packaging>ejb</packaging>
9+
</packagings>
10+
<goals>
11+
<goal>spring-boot:run</goal>
12+
</goals>
13+
<properties>
14+
<run.jvmArguments>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address}</run.jvmArguments>
15+
<jpda.listen>true</jpda.listen>
16+
17+
</properties>
18+
</action>
19+
<action>
20+
<actionName>run</actionName>
21+
<packagings>
22+
<packaging>war</packaging>
23+
<packaging>ear</packaging>
24+
<packaging>ejb</packaging>
25+
</packagings>
26+
<goals>
27+
<goal>spring-boot:run</goal>
28+
</goals>
29+
</action>
30+
</actions>

webapp/pom.xml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
<properties>
2121
<java.version>17</java.version>
2222
<frontend-src-dir>${project.basedir}/src/main/frontend</frontend-src-dir>
23-
<node.version>v16.14.2</node.version>
24-
<npm.version>9.8.0</npm.version>
23+
<node.version>v24.4.1</node.version>
24+
<npm.version>11.4.2</npm.version>
2525
<frontend-maven-plugin.version>1.14.2</frontend-maven-plugin.version>
2626
</properties>
2727
<dependencies>
@@ -33,6 +33,11 @@
3333
<groupId>org.springframework.boot</groupId>
3434
<artifactId>spring-boot-starter-data-jpa</artifactId>
3535
</dependency>
36+
<dependency>
37+
<groupId>org.springframework.boot</groupId>
38+
<artifactId>spring-boot-starter-tomcat</artifactId>
39+
<scope>provided</scope>
40+
</dependency>
3641
<dependency>
3742
<groupId>org.springframework.session</groupId>
3843
<artifactId>spring-session-jdbc</artifactId>
@@ -45,6 +50,9 @@
4550
<dependency>
4651
<groupId>org.projectlombok</groupId>
4752
<artifactId>lombok</artifactId>
53+
<scope>provided</scope>
54+
<version>1.18.38</version>
55+
4856
</dependency>
4957
<dependency>
5058
<groupId>org.flywaydb</groupId>

webapp/src/main/frontend/package.json

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,41 @@
33
"version": "0.9.2",
44
"private": true,
55
"dependencies": {
6-
"@fullcalendar/core": "^6.1.11",
7-
"@fullcalendar/daygrid": "^6.1.11",
8-
"@fullcalendar/interaction": "^6.1.11",
9-
"@fullcalendar/react": "^6.1.11",
10-
"@fullcalendar/rrule": "^6.1.11",
11-
"@fullcalendar/timegrid": "^6.1.11",
12-
"@mui/material": "^5.15.15",
13-
"@testing-library/jest-dom": "^6.4.2",
14-
"@testing-library/react": "^15.0.2",
15-
"@testing-library/user-event": "^14.5.2",
16-
"dotenv": "^16.4.5",
17-
"moment": "^2.30.1",
18-
"ra-data-simple-rest": "^4.16.16",
19-
"react": "^18.2.0",
20-
"react-admin": "^4.16.16",
21-
"react-calendar": "^4.8.0",
22-
"react-dom": "^18.2.0",
23-
"react-hook-form": "7.51.3",
24-
"react-progressbar": "^15.4.1",
25-
"typescript": "^4.9.5",
26-
"web-vitals": "^3.5.2",
27-
"xss": "^1.0.15"
6+
"@fullcalendar/core": "6.1.18",
7+
"@fullcalendar/daygrid": "6.1.18",
8+
"@fullcalendar/interaction": "6.1.18",
9+
"@fullcalendar/react": "6.1.18",
10+
"@fullcalendar/rrule": "6.1.18",
11+
"@fullcalendar/timegrid": "6.1.18",
12+
"@mui/icons-material": "^7.2.0",
13+
"@mui/material": "^7.2.0",
14+
"@testing-library/jest-dom": "6.6.3",
15+
"@testing-library/react": "16.3.0",
16+
"@testing-library/user-event": "14.6.1",
17+
"dotenv": "17.2.0",
18+
"moment": "2.30.1",
19+
"ra-data-simple-rest": "5.9.2",
20+
"react": "19.1.0",
21+
"react-admin": "5.9.2",
22+
"react-calendar": "6.0.0",
23+
"react-dom": "^19.1.0",
24+
"react-progressbar": "15.4.1",
25+
"typescript": "4.9.5",
26+
"web-vitals": "5.0.3",
27+
"xss": "1.0.15"
2828
},
2929
"devDependencies": {
30-
"@types/jsonexport": "^3.0.5",
31-
"@types/node": "^20.12.7",
32-
"@types/react-calendar": "^3.9.0",
33-
"@types/react-color": "^3.0.12",
34-
"@types/react-datepicker": "^6.2.0",
35-
"ra-i18n-polyglot": "^4.16.16",
36-
"ra-jsonapi-client": "^0.10.0",
37-
"ra-language-english": "^4.16.16",
38-
"react-color": "^2.19.3",
39-
"react-scripts": "^4.0.3"
30+
"@types/jsonexport": "3.0.5",
31+
"@types/node": "24.0.15",
32+
"@types/react-calendar": "4.1.0",
33+
"@types/react-color": "3.0.13",
34+
"@types/react-datepicker": "7.0.0",
35+
"@types/react-dom": "^19.1.6",
36+
"ra-i18n-polyglot": "5.9.2",
37+
"ra-jsonapi-client": "0.10.0",
38+
"ra-language-english": "5.9.2",
39+
"react-color": "2.19.3",
40+
"react-scripts": "5.0.1"
4041
},
4142
"scripts": {
4243
"start": "react-scripts start",

webapp/src/main/frontend/src/App.test.tsx

Lines changed: 0 additions & 9 deletions
This file was deleted.

webapp/src/main/frontend/src/App.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ import Layout from './Layout';
1111
import { dataProvider } from './dataProvider';
1212
import { authProvider } from './authProvider';
1313

14-
import EmployeeSummaryList from './views/eventsummary';
15-
import CalendarView from './views/calendar';
14+
import EmployeeSummaryList from './views/EventSummary';
15+
import CalendarView from './views/Calendar';
1616

1717
import employees from './employees';
1818
import customers from './customers';
1919
import users from './users';
20+
import UserPreferences from './users/UserPreferences';
2021

2122
const i18nProvider = polyglotI18nProvider(locale => {
2223
if (locale === 'it') {
@@ -41,6 +42,7 @@ const App = () => (
4142
<CustomRoutes>
4243
<Route path="/calendar" element={<CalendarView />}/>
4344
<Route path="/summary" element={<EmployeeSummaryList />}/>
45+
<Route path="/user/preferences" element={<UserPreferences />} />
4446
</CustomRoutes>
4547

4648
</Admin>

webapp/src/main/frontend/src/Header.tsx

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import React from 'react';
2-
import { Tabs, Tab, Toolbar, AppBar, Box, Typography } from '@mui/material';
3-
import { Link, matchPath, useLocation } from 'react-router-dom';
4-
import { UserMenu, Logout, LoadingIndicator, useTranslate, usePermissions } from 'react-admin';
2+
import { Tabs, Tab, Toolbar, AppBar, Box, Typography, ListItemIcon, ListItemText, MenuItem } from '@mui/material';
3+
import { Link, matchPath, useLocation, useNavigate } from 'react-router-dom';
4+
import { UserMenu, Logout, LoadingIndicator, useTranslate, usePermissions, LogoutClasses } from 'react-admin';
55
import EventIcon from '@mui/icons-material/Event';
6+
import GroupAddIcon from '@mui/icons-material/GroupAdd';
7+
import ManageAccountsIcon from '@mui/icons-material/ManageAccounts';
68
import DescriptionIcon from '@mui/icons-material/Description';
79
import ApartmentIcon from '@mui/icons-material/Apartment';
810
import GroupsIcon from '@mui/icons-material/Groups';
@@ -13,6 +15,7 @@ const Header = () => {
1315
const location = useLocation();
1416
const translate = useTranslate();
1517
const { permissions } = usePermissions();
18+
const navigate = useNavigate();
1619

1720
let currentPath = '/';
1821
if (!!matchPath('/customer/*', location.pathname)) {
@@ -110,12 +113,32 @@ const Header = () => {
110113
/>
111114
<UserMenu>
112115
<Logout />
113-
{ permissions?.includes("ROLE_ADMIN") && <Tab
114-
label={'Users'}
115-
component={Link}
116-
to="/user"
117-
value="/user"
118-
/> }
116+
{ permissions?.includes("ROLE_ADMIN") && <MenuItem
117+
onClick={() => {
118+
navigate('/user')
119+
}}
120+
component={'li'}
121+
>
122+
<ListItemIcon>
123+
{<GroupAddIcon fontSize="small" />}
124+
</ListItemIcon>
125+
<ListItemText>
126+
{'Manage Users'}
127+
</ListItemText>
128+
</MenuItem> }
129+
<MenuItem
130+
onClick={() => {
131+
navigate('/user/preferences')
132+
}}
133+
component={'li'}
134+
>
135+
<ListItemIcon>
136+
{<ManageAccountsIcon fontSize="small" />}
137+
</ListItemIcon>
138+
<ListItemText>
139+
{translate("ess.users.preferences.title")}
140+
</ListItemText>
141+
</MenuItem>
119142
</UserMenu>
120143
</Box>
121144
</Box>

0 commit comments

Comments
 (0)