Repository navigation
feat(booking): let lenders see and accept requests on their listing - #380
Draft
lucaschristiansson wants to merge 3 commits into
Draft
lucaschristiansson wants to merge 3 commits into
lucaschristiansson wants to merge 3 commits into
Conversation
Accepting confirms the request, takes its days off the listing and cancels the other requests for those days, in one batched write. The rules only confirm a request whose days the same write removes, so two requests sharing a day can never both be accepted. Part of #28.
Loads the bookings of one listing for its owner, waiting and accepted, with the renters' names, and accepts the request the owner chooses. Part of #28.
Adds a "Booking requests" button on the owner's listing, opening a screen with the requests waiting for an answer and those accepted. Accepting asks for confirmation first, saying which other requests it cancels. Part of #28.
|
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
Part of #28. The lender side of booking requests, end to end: a "Booking requests" button on your own listing opens a screen with the requests waiting for your answer and those you accepted, and you accept one after a confirmation. Stacked on #379 (view model), itself on #378 (backend): review those first; this PR's base moves to
mainas they merge.What
ReceivedRequestsScreen:BookingRequestsButtonfor the owner, styled like "Message lender", shown also while the listing is paused (requests made before the pause can still be accepted).received_requests/{listingId}(signed-in only), opened single-top; back usesdropUnlessResumed, as on the booking request, so a double tap does not also leave the listing.Why
Issue #28: a lender must see the requests on their listing and accept the ones they want. #378 and #379 provide the write and the state; this makes it usable.
Validation
./gradlew ktfmtCheck check compileDebugAndroidTestKotlin: passes.connectedChecknot run (no emulator).ReceivedRequestsScreenTest(8): loading, load error and Retry, empty, cards (names, days, accepted section without Accept), the dialog's text and confirm, cancelling the dialog, disabled buttons with an accept error, and one test with the real view model where accepting moves the request and removes the overlapping one.ListingDetailScreenTest(+2): the owner opens the requests even while paused; a renter does not see the button.AppNavHostTest(+1): the owner opens the requests from the Toolbox listing and comes back.AI use
Claude Code (Claude Opus 5.5) wrote the screen, the button, the navigation, the strings and the tests, and reviewed the diff against the team checklist (it caught and fixed the double-tap back). I reviewed and tested the result.