feat: Implement worker authentication and device validation in backend

- Added login route with JWT token generation and device validation for non-manager roles.
- Implemented clocking functionality with geofence validation and distance calculation.
- Created routes for managing workers, including password change and device registration.
- Added security status and app blacklist retrieval endpoints.

feat: Develop Geofence Management component

- Created a Vue component for managing geofences with map integration using Leaflet.
- Implemented functionality to draw, save, activate/deactivate, and delete geofences.
- Added UI for displaying existing geofences in a table format.

feat: Introduce Kill Switch Management component

- Developed a calendar-based UI for managing enabled/disabled dates.
- Implemented functionality to apply or discard changes to the work schedule.
- Added visual indicators for pending changes in the calendar.

feat: Create Warning Reporting component

- Implemented a reporting interface for failed clock records with search and filter options.
- Added detail modal for viewing specific failed record details.
- Implemented sorting functionality for the records table.
This commit is contained in:
sudomarcma
2025-07-16 17:57:25 +08:00
parent 46f508c1ae
commit 14d412544e
20 changed files with 2152 additions and 2594 deletions
+46 -8
View File
@@ -15,12 +15,12 @@
"bcrypt": "^6.0.0",
"body-parser": "^2.2.0",
"cors": "^2.8.5",
"dotenv": "^16.5.0",
"dotenv": "^16.6.1",
"express": "^5.1.0",
"html5-qrcode": "^2.3.8",
"json2csv": "^6.0.0-alpha.2",
"jsonwebtoken": "^9.0.2",
"mysql2": "^3.14.1",
"mysql2": "^3.14.2",
"primevue": "^4.3.5",
"qrcode": "^1.5.4",
"uuid": "^11.1.0",
@@ -31,6 +31,8 @@
"devDependencies": {
"@eslint/js": "^9.22.0",
"@tailwindcss/vite": "^4.1.10",
"@types/leaflet": "^1.9.20",
"@types/leaflet-draw": "^1.0.12",
"@vitejs/plugin-vue": "^5.2.3",
"@vue/eslint-config-prettier": "^10.2.0",
"autoprefixer": "^10.4.21",
@@ -38,6 +40,8 @@
"eslint": "^9.22.0",
"eslint-plugin-vue": "~10.0.0",
"globals": "^16.0.0",
"leaflet": "^1.9.4",
"leaflet-draw": "^1.0.4",
"postcss": "^8.5.6",
"prettier": "3.5.3",
"tailwindcss": "^4.1.10",
@@ -4458,6 +4462,26 @@
"dev": true,
"license": "MIT"
},
"node_modules/@types/leaflet": {
"version": "1.9.20",
"resolved": "https://registry.npmjs.org/@types/leaflet/-/leaflet-1.9.20.tgz",
"integrity": "sha512-rooalPMlk61LCaLOvBF2VIf9M47HgMQqi5xQ9QRi7c8PkdIe0WrIi5IxXUXQjAdL0c+vcQ01mYWbthzmp9GHWw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/geojson": "*"
}
},
"node_modules/@types/leaflet-draw": {
"version": "1.0.12",
"resolved": "https://registry.npmjs.org/@types/leaflet-draw/-/leaflet-draw-1.0.12.tgz",
"integrity": "sha512-ayjGxelc3pp7532852Qn/LYHs/CHOcUqM9iDVsXuIXbIGfM2h3OtsHO/sQzFO6GAz2IvslPupgJaYocsY8NH+g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/leaflet": "*"
}
},
"node_modules/@types/node": {
"version": "24.0.4",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.4.tgz",
@@ -5505,9 +5529,9 @@
"license": "MIT"
},
"node_modules/dotenv": {
"version": "16.5.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.5.0.tgz",
"integrity": "sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==",
"version": "16.6.1",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz",
"integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==",
"license": "BSD-2-Clause",
"engines": {
"node": ">=12"
@@ -7039,6 +7063,20 @@
"dev": true,
"license": "MIT"
},
"node_modules/leaflet": {
"version": "1.9.4",
"resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz",
"integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==",
"dev": true,
"license": "BSD-2-Clause"
},
"node_modules/leaflet-draw": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/leaflet-draw/-/leaflet-draw-1.0.4.tgz",
"integrity": "sha512-rsQ6saQO5ST5Aj6XRFylr5zvarWgzWnrg46zQ1MEOEIHsppdC/8hnN8qMoFvACsPvTioAuysya/TVtog15tyAQ==",
"dev": true,
"license": "MIT"
},
"node_modules/levn": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
@@ -7550,9 +7588,9 @@
"license": "MIT"
},
"node_modules/mysql2": {
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.14.1.tgz",
"integrity": "sha512-7ytuPQJjQB8TNAYX/H2yhL+iQOnIBjAMam361R7UAL0lOVXWjtdrmoL9HYKqKoLp/8UUTRcvo1QPvK9KL7wA8w==",
"version": "3.14.2",
"resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.14.2.tgz",
"integrity": "sha512-YD6mZMeoypmheHT6b2BrVmQFvouEpRICuvPIREulx2OvP1xAxxeqkMQqZSTBefv0PiOBKGYFa2zQtY+gf/4eQw==",
"license": "MIT",
"dependencies": {
"aws-ssl-profiles": "^1.1.1",