Changes between Initial Version and Version 1 of UseCase10


Ignore:
Timestamp:
05/08/26 03:16:23 (4 hours ago)
Author:
181201
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UseCase10

    v1 v1  
     1== Use-case 0010 - Reject a Booking
     2
     3'''Initiating actor:''' Pet Sitter
     4
     5'''Other actors:''' None
     6
     7'''Description:'''
     8A Pet Sitter logs in, views their pending booking requests, and they don't want to or cannot accept the booking. The sitter declines the request, and the system updates the booking status to Rejected.
     9
     10'''Scenario:'''
     11 1. Pet Sitter goes to their "Pending Requests" dashboard.
     12 2. System fetches all bookings assigned to them that are still pending:
     13{{{
     14#!sql
     15SELECT booking_id, date_from, date_to, address
     16FROM bookings
     17WHERE sitter_id = (SELECT user_id FROM users WHERE username = 'sitter_filip')
     18  AND status = 'PENDING';
     19}}}
     20 3. Sitter clicks the "Reject Booking" button on a specific request.
     21 4. System updates the status of the booking in the database:
     22{{{
     23#!sql
     24UPDATE bookings
     25SET status = 'REJECTED'
     26WHERE booking_id = (
     27    SELECT booking_id FROM bookings
     28    WHERE status = 'PENDING'
     29      AND sitter_id = (SELECT user_id FROM users WHERE username = 'sitter_filip')
     30    LIMIT 1
     31);
     32}}}