wiki:UseCase14

Version 1 (modified by 181201, 3 hours ago) ( diff )

--

Use-case 0014 - Cancel a Pending Booking

Initiating actor: Pet Owner

Other actors: None

Description: An owner decides they no longer need a sitter and cancels a pending booking request before the sitter accepts it or before payment is made.

Scenario:

  1. Pet Owner navigates to their "My Bookings" page.
  2. System fetches the owner's current pending bookings:
    SELECT booking_id, date_from, address, status 
    FROM bookings 
    WHERE owner_id = (SELECT user_id FROM users WHERE username = 'owner_bojan')
      AND status = 'PENDING';
    
  3. Owner clicks the "Cancel Request" button.
  4. System updates the booking status:
    UPDATE bookings
    SET status = 'CANCELLED'
    WHERE booking_id = (
        SELECT booking_id FROM bookings 
        WHERE status = 'PENDING' 
          AND owner_id = (SELECT user_id FROM users WHERE username = 'owner_bojan') 
        LIMIT 1
    );
    
Note: See TracWiki for help on using the wiki.