Initial repository setup with listing information and reservation request accept functionality#258
Initial repository setup with listing information and reservation request accept functionality#258
Conversation
…in listing-information component
…tatus - Update action buttons to match status requirements: - Pending → Accept / Reject - Accepted → Close / Message - Rejected → Delete / Archive - Expired → Archive - Closed → Message - Cancelled → Delete - Implement handleAction function with switch statement for each action - Add Expired status to filter options and status tag styling - Update Storybook stories to demonstrate all status variants - Reorganize getActionButtons helper for clarity with inline comments Co-authored-by: dani-vaibhav <182140623+dani-vaibhav@users.noreply.github.com>
|
Implemented dynamic action buttons based on reservation request status in commit 815cd1f. Changes made: Status → Actions mapping:
Implementation details:
The UI now dynamically displays the appropriate action buttons based on the current status of each reservation request. The |
|
@copilot |
- Create accept.ts application service for accepting reservation requests - Add acceptReservationRequest GraphQL mutation with input type - Implement mutation resolver with authentication check - Add GraphQL mutation to requests-table.container.graphql - Integrate useMutation hook in RequestsTableContainer - Implement handleAction 'accept' case with mutation call and refetch - Add loading state for accept action - Export accept service from reservation-request index - Pass biome linting checks Co-authored-by: dani-vaibhav <182140623+dani-vaibhav@users.noreply.github.com>
Implemented Implementation details: 1. Application Service Layer (
2. GraphQL Layer:
3. UI Layer (
The accept button now fully functions - when clicked on a Pending request, it accepts the reservation and updates the status to Accepted in real-time. |
…p and improved data handling
…gs and error handling
…nd improve image handling in reservation requests
|
@copilot |
I don't have the ability to deploy branches or trigger deployment pipelines. Deployment typically requires access to CI/CD systems, cloud infrastructure, and production credentials that I don't have. To deploy this branch, you'll need to:
If you need help with code changes, configuration files, or deployment scripts that I can assist with, please let me know the specific changes needed. |
Fixes TypeScript build error TS6133: 'useNavigate' is declared but its value is never read. The import was added but not used in the component, causing the strict TypeScript build to fail in CI/CD.
jasonmorais
left a comment
There was a problem hiding this comment.
Small comments for the most part
.../sthrift/application-services/src/contexts/reservation-request/reservation-request/update.ts
Outdated
Show resolved
Hide resolved
apps/ui-sharethrift/src/components/layouts/home/my-listings/components/requests-table.tsx
Outdated
Show resolved
Hide resolved
apps/ui-sharethrift/src/components/layouts/home/my-listings/components/requests-table.tsx
Outdated
Show resolved
Hide resolved
...-sharethrift/src/components/layouts/home/my-listings/components/requests-table.container.tsx
Outdated
Show resolved
Hide resolved
...-sharethrift/src/components/layouts/home/my-listings/components/requests-table.container.tsx
Outdated
Show resolved
Hide resolved
apps/ui-sharethrift/src/components/layouts/home/my-listings/components/requests-card.tsx
Outdated
Show resolved
Hide resolved
apps/ui-sharethrift/src/components/layouts/home/my-listings/components/all-listings-table.tsx
Fixed
Show fixed
Hide fixed
apps/ui-sharethrift/src/components/layouts/home/my-listings/components/all-listings-table.tsx
Show resolved
Hide resolved
…d action handling
There was a problem hiding this comment.
Dont want a single component that exports multiple versions of the component, goes against our practices. Also the file names here arent following our naming conventions with dashes.
There was a problem hiding this comment.
Same idea here as the above comment
There was a problem hiding this comment.
Same thing here with file name
| let displayRequests = transformedAllRequests; | ||
|
|
||
| // Apply sorting (keep existing behavior) | ||
| if (sorter.field && sorter.order) { |
There was a problem hiding this comment.
typically sorting and filtering and pagination we do on the backend
| const allRequests = data?.myListingsRequests ?? []; | ||
|
|
||
| // Transform domain fields to UI format (no client-side search/status filtering in this container) | ||
| const transformedAllRequests = allRequests.map((request) => { |
There was a problem hiding this comment.
Some of the handling here seems strange, like checking for type personaluser. I would determine if this is all needed or is an issue with just the interface mapping, as in we should adjust that rather than remap fully.
| onPageChange, | ||
| onAction, | ||
| onAccept, | ||
| onReject: _onReject, |
There was a problem hiding this comment.
Why underscores for the actual function names? It isnt the field itself so from what i understand it isnt making it optional. if it serves no actual purpose i would name them normally
getActionButtonshelper to show correct actions per statushandleActionfunction with separate handler functions per actionupdate.tsapplication service (replaces separate accept.ts)💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Summary by Sourcery
Add authenticated reservation request acceptance and overlapping request auto-rejection, expose it via GraphQL and wire it into the My Listings UI, while standardizing request states and improving data hydration and testing across layers.
New Features:
Bug Fixes:
Enhancements:
CI:
Documentation:
Tests: