Frontend profile UI - #168
Open
Zainu04 wants to merge 32 commits into
Open
Conversation
Added user stories for trip management, budgeting, packing, weather, and countdown features.
Updated project name, team members, and feature descriptions in README.
Updated checklist to reflect completed tasks and added reflections on group progress and challenges.
Expanded the entity relationship diagram with detailed table structures for Users, Trips, Destinations, Activities, Expenses, and Packing List.
Marked completed tasks in the milestone checklist.
… really a patch) and setting up the routes to call the /me user endpoints.Also did some maintenance in renaming some files to follow other codepath projects' convention, and removing some filler gitkeeps
…validation and to getCurrentUser(most important). Also added comments to help easily undestand whhich methods use what endpoints
User and Trips Seed/Routes/Endpoints for Ticket#1 and #2
…rs to verify input params, and a tripOwnership helper to further verify that a user can only see the trips and destinations they created. Reformatted how dates are handled so that it is auto formatted to year day month
Adding Destinations Endpoint
…ntain, as well as helper functions required
…le if they are packed, and delete. Implemented helper functions as well as an additional getOwnedPackingList helper to make sure code is similar to other features. Edited Packing List endpoint routes to differentiate between api/trips/tripId and just api/packing-list/:id. Currently debugging the generate function.
…to PackingList rather than PackingLists. Endpoints could not be changed as GET and POST requests depend on tripid to assign and retrieve from and to correct packinglist for trip.
PackingList endpoint routes and seed.
…ams is necessary in our case, as well as an alternative if we ever changed our mind in using it
…f extra comments or lines of code
Expenses endpoints and routes established, helper function getOwnedExpenses() added to helpers/
Adding activities endpoint
…t, add responsive layout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the Profile page frontend, consuming the Users endpoint from #1. Loads the current user via
GET /api/users/meand lets them updatedisplay_nameandhome_currencyviaPATCH /api/users/me, with loading/success/error states and client-side validation.New files
client/src/pages/Profile.jsx— page component: loads current user on mount, renders view mode and an inline edit formclient/src/pages/Profile.css— page styles (sand/beige palette)client/src/components/Sidebar.jsx— shared left nav shell matching the wireframes, reusable by future pagesclient/src/components/Sidebar.css— sidebar stylesclient/src/services/users.js— thin fetch wrapper aroundGET/PATCH /api/users/meclient/src/helpers/currencies.js— curated{code, label}list for the home-currency selectChanges to existing files
client/src/App.jsx— registered the/profilerouteclient/src/index.css— added shared sand/beige color palette as CSS variables (--sand-*), used byProfile.cssandSidebar.cssso future pages can matchAcceptance criteria
Dev Notes
/meas-is per T1 — nothing here assumes a real logged-in user.Sidebar.jsxlinks to routes for other pages (/dashboard,/trips,/itinerary,/budget,/packing-list) that don't exist yet — intentional, so nav is consistent once those pages land.Testing
/profile— confirmed seeded user (Jane Doe,USD) renders correctly