[PR #4] [MERGED] Dev #66

Closed
opened 2026-05-06 12:18:33 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/BreizhHardware/Site-comptage-heure/pull/4
Author: @BreizhHardware
Created: 10/17/2025
Status: Merged
Merged: 10/17/2025
Merged by: @BreizhHardware

Base: mainHead: dev


📝 Commits (3)

  • 4c454ad feat: add super admin creation, enhance date handling, and improve UI components
  • db76597 feat: implement password change functionality and improve UI for password management
  • 024e1de feat: add force delete functionality for users and improve deletion confirmation flow

📊 Changes

8 files changed (+300 additions, -35 deletions)

View changed files

📝 README.md (+15 -10)
📝 app/admin/page.tsx (+141 -8)
app/api/auth/change-password/route.ts (+41 -0)
📝 app/api/users/[id]/route.ts (+9 -1)
📝 app/dashboard/page.tsx (+88 -11)
📝 components/Header.tsx (+3 -5)
📝 docker-compose.yml (+1 -0)
📝 scripts/create-super-admin.js (+2 -0)

📄 Description

This pull request introduces several new features and usability improvements to the admin and dashboard pages, focusing on user management and password change functionality. The main changes include adding the ability for users (both members and admins) to change their passwords, enhancing the process for deleting users (including forced deletion that removes associated hours), improving form validation, and updating some UI elements for clarity and accessibility.

Key changes:

User Management & Deletion

  • Added support for forced user deletion: Admins can now force-delete a user even if the user has associated hours. If forced deletion is requested, all of the user's hours are deleted before removing the user. The UI now includes a checkbox and confirmation modal for this action. [1] [2] [3] app/api/users/[id]/route.tsR16-R17, app/api/users/[id]/route.tsL29-R43)
  • Improved the hour deletion process: When deleting an hour entry, it is now first rejected before deletion to ensure proper state management.
  • Updated UI labels for clarity, e.g., changing "Supprimer" to "Rejeter" for hour entries and adjusting heading levels for better accessibility. [1] [2]

Password Change Functionality

  • Implemented a new API route (/api/auth/change-password) that allows authenticated users to change their passwords securely, with validation for the current password.
  • Added password change forms to both the admin and dashboard pages, allowing users to update their passwords directly from the UI. Includes validation for password confirmation and user feedback via toast notifications. [1] [2] [3] [4] [5]

Form Validation & UI Improvements

  • Added min/max validation for hours and minutes input fields to prevent invalid time entries. [1] [2] [3] [4]
  • Switched the date input in the dashboard to use a DatePicker component for improved user experience and proper date formatting. [1] [2] [3]
  • Enhanced feedback to users via toast notifications for actions like adding hours or changing passwords. [1] [2]

Miscellaneous

  • Improved the appearance of select elements and card layouts for better accessibility and consistency in both light and dark modes. [1] [2]
  • Updated the README with clearer Docker usage instructions and steps for creating a super admin.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BreizhHardware/Site-comptage-heure/pull/4 **Author:** [@BreizhHardware](https://github.com/BreizhHardware) **Created:** 10/17/2025 **Status:** ✅ Merged **Merged:** 10/17/2025 **Merged by:** [@BreizhHardware](https://github.com/BreizhHardware) **Base:** `main` ← **Head:** `dev` --- ### 📝 Commits (3) - [`4c454ad`](https://github.com/BreizhHardware/Site-comptage-heure/commit/4c454ad5344bbd6f5243980af3f10a7e227d54fb) feat: add super admin creation, enhance date handling, and improve UI components - [`db76597`](https://github.com/BreizhHardware/Site-comptage-heure/commit/db76597b6e4407dbc40905a48f1652a042c9bae8) feat: implement password change functionality and improve UI for password management - [`024e1de`](https://github.com/BreizhHardware/Site-comptage-heure/commit/024e1de04b830c7d6e7dfebd1e70a2dbef2c9e21) feat: add force delete functionality for users and improve deletion confirmation flow ### 📊 Changes **8 files changed** (+300 additions, -35 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+15 -10) 📝 `app/admin/page.tsx` (+141 -8) ➕ `app/api/auth/change-password/route.ts` (+41 -0) 📝 `app/api/users/[id]/route.ts` (+9 -1) 📝 `app/dashboard/page.tsx` (+88 -11) 📝 `components/Header.tsx` (+3 -5) 📝 `docker-compose.yml` (+1 -0) 📝 `scripts/create-super-admin.js` (+2 -0) </details> ### 📄 Description This pull request introduces several new features and usability improvements to the admin and dashboard pages, focusing on user management and password change functionality. The main changes include adding the ability for users (both members and admins) to change their passwords, enhancing the process for deleting users (including forced deletion that removes associated hours), improving form validation, and updating some UI elements for clarity and accessibility. **Key changes:** ### User Management & Deletion - Added support for forced user deletion: Admins can now force-delete a user even if the user has associated hours. If forced deletion is requested, all of the user's hours are deleted before removing the user. The UI now includes a checkbox and confirmation modal for this action. [[1]](diffhunk://#diff-a7c2b21269eaaa6f291a758c44939732a9f1d9fe8e0d71a3a7822b813a196f43L229-R292) [[2]](diffhunk://#diff-a7c2b21269eaaa6f291a758c44939732a9f1d9fe8e0d71a3a7822b813a196f43R607-R615) [[3]](diffhunk://#diff-a7c2b21269eaaa6f291a758c44939732a9f1d9fe8e0d71a3a7822b813a196f43R626-R643) [app/api/users/[id]/route.tsR16-R17](diffhunk://#diff-58c29d349b599696e53810cc2f6a8f3e4056e0ba91deefd565776bbddc9bb358R16-R17), [app/api/users/[id]/route.tsL29-R43](diffhunk://#diff-58c29d349b599696e53810cc2f6a8f3e4056e0ba91deefd565776bbddc9bb358L29-R43)) - Improved the hour deletion process: When deleting an hour entry, it is now first rejected before deletion to ensure proper state management. - Updated UI labels for clarity, e.g., changing "Supprimer" to "Rejeter" for hour entries and adjusting heading levels for better accessibility. [[1]](diffhunk://#diff-a7c2b21269eaaa6f291a758c44939732a9f1d9fe8e0d71a3a7822b813a196f43L343-R410) [[2]](diffhunk://#diff-a7c2b21269eaaa6f291a758c44939732a9f1d9fe8e0d71a3a7822b813a196f43L362-R425) ### Password Change Functionality - Implemented a new API route (`/api/auth/change-password`) that allows authenticated users to change their passwords securely, with validation for the current password. - Added password change forms to both the admin and dashboard pages, allowing users to update their passwords directly from the UI. Includes validation for password confirmation and user feedback via toast notifications. [[1]](diffhunk://#diff-a7c2b21269eaaa6f291a758c44939732a9f1d9fe8e0d71a3a7822b813a196f43L229-R292) [[2]](diffhunk://#diff-a7c2b21269eaaa6f291a758c44939732a9f1d9fe8e0d71a3a7822b813a196f43R465-R506) [[3]](diffhunk://#diff-e16c1c1133d5d72341ada507f3e06fa37dd79de574403f158159ff934f9b5013L37-R47) [[4]](diffhunk://#diff-e16c1c1133d5d72341ada507f3e06fa37dd79de574403f158159ff934f9b5013R106-R127) [[5]](diffhunk://#diff-e16c1c1133d5d72341ada507f3e06fa37dd79de574403f158159ff934f9b5013R251-R294) ### Form Validation & UI Improvements - Added min/max validation for hours and minutes input fields to prevent invalid time entries. [[1]](diffhunk://#diff-a7c2b21269eaaa6f291a758c44939732a9f1d9fe8e0d71a3a7822b813a196f43R331) [[2]](diffhunk://#diff-a7c2b21269eaaa6f291a758c44939732a9f1d9fe8e0d71a3a7822b813a196f43R342-R343) [[3]](diffhunk://#diff-e16c1c1133d5d72341ada507f3e06fa37dd79de574403f158159ff934f9b5013R172) [[4]](diffhunk://#diff-e16c1c1133d5d72341ada507f3e06fa37dd79de574403f158159ff934f9b5013R183-R184) - Switched the date input in the dashboard to use a `DatePicker` component for improved user experience and proper date formatting. [[1]](diffhunk://#diff-e16c1c1133d5d72341ada507f3e06fa37dd79de574403f158159ff934f9b5013R23-R25) [[2]](diffhunk://#diff-e16c1c1133d5d72341ada507f3e06fa37dd79de574403f158159ff934f9b5013L126-R162) [[3]](diffhunk://#diff-e16c1c1133d5d72341ada507f3e06fa37dd79de574403f158159ff934f9b5013R75-R93) - Enhanced feedback to users via toast notifications for actions like adding hours or changing passwords. [[1]](diffhunk://#diff-e16c1c1133d5d72341ada507f3e06fa37dd79de574403f158159ff934f9b5013R75-R93) [[2]](diffhunk://#diff-e16c1c1133d5d72341ada507f3e06fa37dd79de574403f158159ff934f9b5013R106-R127) ### Miscellaneous - Improved the appearance of select elements and card layouts for better accessibility and consistency in both light and dark modes. [[1]](diffhunk://#diff-a7c2b21269eaaa6f291a758c44939732a9f1d9fe8e0d71a3a7822b813a196f43L452-R558) [[2]](diffhunk://#diff-e16c1c1133d5d72341ada507f3e06fa37dd79de574403f158159ff934f9b5013L170-R203) - Updated the README with clearer Docker usage instructions and steps for creating a super admin. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 12:18:33 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
BreizhHardware/Site-comptage-heure#66
No description provided.