mirror of
https://github.com/BreizhHardware/projet-web-cipa4.git
synced 2026-05-09 00:07:27 +02:00
[PR #8] [MERGED] Feat/my account #7
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
BreizhHardware/projet-web-cipa4#7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/BreizhHardware/projet-web-cipa4/pull/8
Author: @BreizhHardware
Created: 2/11/2026
Status: ✅ Merged
Merged: 2/11/2026
Merged by: @BreizhHardware
Base:
feat/home← Head:feat/my-account📝 Commits (3)
4df307bfeat(user): implement user profile update and trips retrieval; remove vehicle management0725ca9feat(trip): update trip creation flow and redirect to profile on successcc0a62fMerge branch 'feat/home' into feat/my-account📊 Changes
16 files changed (+496 additions, -237 deletions)
View changed files
📝
README.MD(+0 -5)➖
bruno/Vehicles/Add Vehicle.bru(+0 -22)➕
css/profile.css(+97 -0)📝
index.php(+8 -4)➕
js/profile.js(+155 -0)📝
php/controllers/TripController.php(+39 -0)📝
php/controllers/UserController.php(+72 -4)➖
php/controllers/VehicleController.php(+0 -53)📝
php/models/Booking.php(+2 -1)📝
php/models/Trip.php(+11 -0)📝
php/models/User.php(+30 -1)➖
php/models/Vehicle.php(+0 -34)📝
php/utils/init_db.php(+1 -10)➕
php/utils/migrations/2026_02_03_17_51_49_remove_vehicles.php(+14 -0)📝
views/trip/create.html(+4 -4)📝
views/user/profile.html(+63 -99)📄 Description
This pull request introduces a significant refactor of how vehicle information is managed for users, as well as major improvements to the user profile and trips management features. The most important changes include removing the separate vehicles system in favor of a single
vehiclefield on theuserstable, adding endpoints and logic for updating user profiles and retrieving user-specific trips, and enhancing the frontend profile page with new styling and interactivity.Backend data model and API changes:
vehiclestable and all related code, replacing it with a singlevehiclefield on theuserstable. This simplifies vehicle management by storing vehicle info directly with the user, and removes the need for theVehiclemodel, controller, and related endpoints. [1] [2] [3] [4] [5] [6]/api/user/updateendpoint and implemented the corresponding controller logic. [1] [2] [3]/api/user/tripsendpoint and logic to fetch all trips associated with the user, both as driver and passenger, merging and sorting them by date. [1] [2] [3]Frontend and UI improvements:
profile.jsto handle profile data fetching, updating, CSRF token management, and dynamic display of user trips (upcoming and past), as well as user ratings.profile.cssfile for improved layout and responsive design of the profile page, including clear separation of personal info and trips sections, and enhanced form styling.Security improvements:
These changes collectively streamline user and vehicle management, improve the user experience on the profile page, and enhance security for new frontend features.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.