wiki:UseCase10

Use-case 0010 - Reject a Booking

Initiating actor: Pet Sitter

Other actors: None

Description: A 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.

Scenario:

  1. Pet Sitter goes to their "Pending Requests" dashboard.
  2. System fetches all bookings assigned to them that are still pending:
    SELECT booking_id, date_from, date_to, address 
    FROM bookings 
    WHERE sitter_id = (SELECT user_id FROM users WHERE username = 'sitter_filip')
      AND status = 'PENDING';
    
  3. Sitter clicks the "Reject Booking" button on a specific request.
  4. System updates the status of the booking in the database:
    UPDATE bookings
    SET status = 'REJECTED'
    WHERE booking_id = (
        SELECT booking_id FROM bookings 
        WHERE status = 'PENDING' 
          AND sitter_id = (SELECT user_id FROM users WHERE username = 'sitter_filip') 
        LIMIT 1
    );
    
Last modified 2 hours ago Last modified on 05/08/26 03:16:23
Note: See TracWiki for help on using the wiki.