302 Commits

Author SHA1 Message Date
Felipe Cardoso
678e1db0a3 Update max additional guests logic and refine guest counts display
All checks were successful
Build and Push Docker Images / changes (push) Successful in 5s
Build and Push Docker Images / build-backend (push) Has been skipped
Build and Push Docker Images / build-frontend (push) Successful in 1m15s
Set default max additional guests to 10 and renamed related labels for clarity. Improved guest count calculation by adding total confirmed guests and refining additional guest computations. Updated the UI to reflect these changes concisely and consistently.
2025-03-20 18:33:02 +01:00
Felipe Cardoso
a2c3f16dc7 Update guests-list to use RSVP data for dietary and notes
All checks were successful
Build and Push Docker Images / changes (push) Successful in 11s
Build and Push Docker Images / build-backend (push) Has been skipped
Build and Push Docker Images / build-frontend (push) Successful in 1m49s
Replaced `guest.dietary_restrictions` and `guest.notes` with `guest.rsvp.dietary_requirements` and `guest.rsvp.response_message`. This ensures the data reflects RSVP-specific fields and improves code consistency with the RSVP model.
2025-03-19 20:49:29 +01:00
Felipe Cardoso
44e6b2a6dc Refactor guest schema and add RSVP field to GuestBase.
Reorganized imports for better readability and compliance with standards. Added an optional `rsvp` field to the `GuestBase` model to include RSVP details. This enhances the schema's flexibility and supports additional guest-related data.
2025-03-19 20:47:12 +01:00
Felipe Cardoso
42508af610 Add optional RSVP field to guest schema
This commit introduces an optional `rsvp` field to the guest-related types and schemas. The field is nullable and references the `RSVPSchema`, allowing better handling of RSVP data in the application.
2025-03-19 20:47:07 +01:00
Felipe Cardoso
2a1f13a5f0 Add functionality to display gift reservations per guest
All checks were successful
Build and Push Docker Images / changes (push) Successful in 4s
Build and Push Docker Images / build-backend (push) Has been skipped
Build and Push Docker Images / build-frontend (push) Successful in 1m10s
Implemented fetching and grouping of guests' gift reservations for events. Added a popover UI to display reservation details, including guest names and quantities, with a loading state for pending data. This enhances the gift dashboard's interactivity and usability.
2025-03-19 19:56:23 +01:00
Felipe Cardoso
c81e27c602 Add event-specific guest gift reservations endpoint
Introduced a function `get_event_guest_gift_reservations` in the CRUD layer to fetch gift reservations filtered by event ID. Updated the API endpoint to optionally accept an `event_id` query parameter for retrieving reservations specific to an event.
2025-03-19 19:56:10 +01:00
Felipe Cardoso
9fe5e60907 Rename gift purchases API to reservations and update types
Refactor types and API references to replace "gift purchases" with "gift reservations" for improved clarity. Updates include type definitions, query keys, options, and endpoint URLs, with the addition of an optional event ID filter. This ensures better alignment with the intended functionality.
2025-03-19 19:55:56 +01:00
Felipe Cardoso
62ce98c80e Add support for fetching all guest gift reservations
All checks were successful
Build and Push Docker Images / changes (push) Successful in 4s
Build and Push Docker Images / build-backend (push) Has been skipped
Build and Push Docker Images / build-frontend (push) Successful in 1m12s
Introduce new types, query functions, and SDK methods to enable retrieving all guest gift purchases via the `/api/v1/events/gifts/purchases/guest/all` endpoint. This addition integrates with React Query and ensures type safety throughout the client.
2025-03-19 10:17:43 +01:00
Felipe Cardoso
fe3f2b0894 Add API endpoint to retrieve all guest gift reservations
Introduced a new route to fetch all guest gift reservations, ensuring API compatibility with GiftPurchase objects. Refactored CRUD functions to optimize data fetching and avoid N+1 queries. Added validation to restrict access to non-public event-related reservations.
2025-03-19 10:16:55 +01:00
Felipe Cardoso
79f08a1208 Add quantity column to GuestGifts table and update references
Introduced a `quantity` field to track the number of reserved gifts in the many-to-many GuestGifts table. Updated all related CRUD operations, models, and imports to reflect the added column. Replaced `guest_gifts` with `GuestGifts` for consistency in naming conventions.
2025-03-19 09:56:30 +01:00
Felipe Cardoso
2c73ee4d7e Add purchase link and reservation details to gift list
Enhanced the gift list by showing a clickable purchase link icon and added conditional reservation details for reserved or received items using a popover. Simplified and cleaned up related code for better readability and maintainability.
2025-03-19 09:43:58 +01:00
Felipe Cardoso
392dd6f0d2 Add columns for dietary restrictions and notes to guest list
Enhanced the guest list table by adding new columns for dietary restrictions and notes. These columns display content using interactive popovers when data is available, improving data accessibility and user experience. Updated existing table structure to accommodate these enhancements.
2025-03-19 09:07:51 +01:00
Felipe Cardoso
1f1192fb62 Trigger data refetch on mount for events and themes pages
Added `useEffect` hooks to automatically refetch guests data in the Event Detail Page and themes data in the Event Themes Page upon component mount. This ensures the displayed data is always up-to-date when the user navigates to these pages.
2025-03-19 09:02:57 +01:00
Felipe Cardoso
31c6ae3f5c Add refetch methods to event context and integrate in layout
Introduce `refetchUpcomingEvents`, `refetchPublicEvents`, and `refetchUserEvents` to the event context for improved data management. These methods are now invoked in the dashboard layout to ensure events data is refreshed upon user authentication.
2025-03-19 09:00:26 +01:00
Felipe Cardoso
678c55a1e2 Integrate RSVP context and enhance form responsiveness
Added RSVP context to manage current guest and RSVP data, ensuring dynamic updates based on state changes. Adjusted styling to improve button responsiveness and removed redundant borders for a cleaner UI. These updates enhance functionality and provide a more seamless user experience.
2025-03-19 08:40:47 +01:00
Felipe Cardoso
d61e518697 Add event_id and guest_id to RSVPSchema and RSVPSchemaCreate
event_id and guest_id fields were added to both RSVPSchema and RSVPSchemaCreate to ensure these properties are included in the API schema. This change also updates the required fields list, improving completeness and validation for RSVP-related actions.
2025-03-19 08:40:37 +01:00
Felipe Cardoso
cd22418786 Add event_id and guest_id fields to RSVPSchemaBase
All checks were successful
Build and Push Docker Images / changes (push) Successful in 4s
Build and Push Docker Images / build-backend (push) Successful in 47s
Build and Push Docker Images / build-frontend (push) Has been skipped
This update introduces event_id and guest_id fields to the RSVPSchemaBase model, ensuring better tracking of RSVP details. These additions enhance data association and model usability.
2025-03-19 08:38:22 +01:00
Felipe Cardoso
472a0b7834 Add delete functionality for gifts in the dashboard
Introduced `handleDeleteGift` to delete a gift and refetch items after deletion. Connected the delete action to the dropdown menu, enabling users to remove gifts from the UI seamlessly. This enhances gift management capabilities on the dashboard.
2025-03-19 08:23:26 +01:00
Felipe Cardoso
1441843a55 Add cascading delete to Gift and Guest relationships
All checks were successful
Build and Push Docker Images / changes (push) Successful in 5s
Build and Push Docker Images / build-backend (push) Successful in 49s
Build and Push Docker Images / build-frontend (push) Has been skipped
Updated the `ondelete="CASCADE"` behavior for foreign key constraints in Alembic migrations and added cascading rules to related models in SQLAlchemy. These changes ensure proper cleanup of dependent records when a parent record is deleted.
2025-03-19 08:16:38 +01:00
Felipe Cardoso
7d8eacad7a Update gift cancellation to include received status
All checks were successful
Build and Push Docker Images / changes (push) Successful in 5s
Build and Push Docker Images / build-backend (push) Successful in 49s
Build and Push Docker Images / build-frontend (push) Has been skipped
Allow cancellation of gifts with a status of either RESERVED or RECEIVED. This ensures consistency in handling gift statuses during reservation management across the application.
2025-03-19 07:32:09 +01:00
Felipe Cardoso
0410d148d3 Refactor RSVP form to improve guest input usability
All checks were successful
Build and Push Docker Images / changes (push) Successful in 5s
Build and Push Docker Images / build-backend (push) Has been skipped
Build and Push Docker Images / build-frontend (push) Successful in 1m10s
Added buttons to increment and decrement the number of guests for better user experience, particularly on mobile devices. Introduced direct numeric input handling to ensure valid input. Updated theme settings and adjusted styles for improved visual consistency.
2025-03-17 18:42:19 +01:00
Felipe Cardoso
479cb7ade8 Switch backend to production API and adjust headers for auth
All checks were successful
Build and Push Docker Images / changes (push) Successful in 4s
Build and Push Docker Images / build-backend (push) Has been skipped
Build and Push Docker Images / build-frontend (push) Successful in 1m12s
Updated the backend API URL to production across configurations and removed unused bearer security schemes in SDK. Introduced optional `authorization` headers in type definitions to handle authentication dynamically.
2025-03-17 12:33:08 +01:00
Felipe Cardoso
ebfa57abc9 Set default URLs for backend and app environments
All checks were successful
Build and Push Docker Images / changes (push) Successful in 4s
Build and Push Docker Images / build-backend (push) Has been skipped
Build and Push Docker Images / build-frontend (push) Successful in 1m13s
Added fallback default URLs for BACKEND_API_URL and APP_URL when environment variables are not defined. This ensures the application functions correctly in environments without explicit configuration.
2025-03-17 12:25:55 +01:00
Felipe Cardoso
7d0319462e Fix cors
All checks were successful
Build and Push Docker Images / changes (push) Successful in 6s
Build and Push Docker Images / build-backend (push) Successful in 49s
Build and Push Docker Images / build-frontend (push) Has been skipped
2025-03-17 12:19:37 +01:00
Felipe Cardoso
1946484fd6 Update gitignore 2025-03-17 08:27:09 +01:00
Felipe Cardoso
d4074cf01e Fix build problems
All checks were successful
Build and Push Docker Images / changes (push) Successful in 5s
Build and Push Docker Images / build-backend (push) Has been skipped
Build and Push Docker Images / build-frontend (push) Successful in 1m10s
2025-03-17 08:23:48 +01:00
Felipe Cardoso
3d24f287af Populate the deploy compose
All checks were successful
Build and Push Docker Images / changes (push) Successful in 5s
Build and Push Docker Images / build-backend (push) Has been skipped
Build and Push Docker Images / build-frontend (push) Has been skipped
2025-03-17 08:16:28 +01:00
Felipe Cardoso
7ef605b468 Translate invite page rsvp components to italian 2025-03-17 08:16:15 +01:00
Felipe Cardoso
8e0c5355de Translate invite page to italian 2025-03-17 08:13:54 +01:00
Felipe Cardoso
8dc74c743f Translate invite page to italian 2025-03-17 08:07:17 +01:00
Felipe Cardoso
514ca7742e fix guest rsvp additional guests 2025-03-16 21:16:24 +01:00
Felipe Cardoso
fce2f32ffb fix guest rsvp additional guests
All checks were successful
Build and Push Docker Images / changes (push) Successful in 4s
Build and Push Docker Images / build-backend (push) Successful in 52s
Build and Push Docker Images / build-frontend (push) Has been skipped
2025-03-16 21:13:48 +01:00
Felipe Cardoso
d56a0d3baa fix reserve gifts endpoint 2025-03-16 21:07:56 +01:00
Felipe Cardoso
0a642581e8 fix available gifts filter 2025-03-16 21:07:05 +01:00
Felipe Cardoso
b55ef5387b Add gift registry page
Some checks failed
Build and Push Docker Images / changes (push) Successful in 4s
Build and Push Docker Images / build-backend (push) Has been skipped
Build and Push Docker Images / build-frontend (push) Failing after 52s
2025-03-16 20:24:12 +01:00
Felipe Cardoso
2f1fe8dd75 Add alert component 2025-03-16 20:24:01 +01:00
Felipe Cardoso
1a18347e93 Fix several problems with gift registry api 2025-03-16 20:23:52 +01:00
Felipe Cardoso
54fbed2816 Fix crud query for guests reservations 2025-03-16 20:13:51 +01:00
Felipe Cardoso
878d2e8c45 Fix auth dependencies 2025-03-16 19:54:58 +01:00
Felipe Cardoso
5971dfb405 Update gifts table in dashboard
Some checks failed
Build and Push Docker Images / changes (push) Successful in 4s
Build and Push Docker Images / build-backend (push) Has been skipped
Build and Push Docker Images / build-frontend (push) Failing after 52s
2025-03-16 18:20:45 +01:00
Felipe Cardoso
bf21fadf00 Update gift modal 2025-03-16 18:20:23 +01:00
Felipe Cardoso
e10e43fb8b Add gift modal 2025-03-16 17:56:14 +01:00
Felipe Cardoso
e2c6c64fe7 Fix minor bugs in gift-context.tsx 2025-03-16 17:47:56 +01:00
Felipe Cardoso
97a9e1588f Add category-modal.tsx to gifts page 2025-03-16 17:37:08 +01:00
Felipe Cardoso
371ef4c45f Add additional ui deps 2025-03-16 17:36:42 +01:00
Felipe Cardoso
16b6269d05 Add default categories to init_db.py 2025-03-16 17:36:16 +01:00
Felipe Cardoso
1dcad21bed Remove unnecessary parameter from RSVP usage 2025-03-16 17:19:33 +01:00
Felipe Cardoso
ac800e6356 Add draft implementation of gifts page
Some checks failed
Build and Push Docker Images / changes (push) Successful in 5s
Build and Push Docker Images / build-backend (push) Has been skipped
Build and Push Docker Images / build-frontend (push) Failing after 53s
2025-03-16 17:10:29 +01:00
Felipe Cardoso
df1256996b Refactor of dashboard page with breadcrumbs and cleaner component 2025-03-16 17:10:05 +01:00
Felipe Cardoso
b9bff35122 Add gift registry page 2025-03-16 16:56:30 +01:00