Changes between Version 1 and Version 2 of UseCase14
- Timestamp:
- 05/17/26 20:01:01 (8 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UseCase14
v1 v2 1 == Use-case 0014 - Cancel a PendingBooking1 == Use-case 0014 - Cancel an Active Booking 2 2 3 3 '''Initiating actor:''' Pet Owner … … 6 6 7 7 '''Description:''' 8 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.8 An owner decides they no longer need a sitter and cancels an active (Pending or Confirmed) booking request before the job takes place. 9 9 10 10 '''Scenario:''' 11 11 1. Pet Owner navigates to their "My Bookings" page. 12 2. System fetches the owner's current pendingbookings:12 2. System fetches the owner's current active bookings: 13 13 {{{ 14 14 #!sql … … 16 16 FROM bookings 17 17 WHERE owner_id = (SELECT user_id FROM users WHERE username = 'owner_bojan') 18 AND status = 'PENDING';18 AND status IN ('Pending', 'Confirmed'); 19 19 }}} 20 3. Owner clicks the "Cancel Request" button.20 3. Owner clicks the "Cancel Booking" button. 21 21 4. System updates the booking status: 22 22 {{{ 23 23 #!sql 24 24 UPDATE bookings 25 SET status = 'CANCELLED' 26 WHERE booking_id = ( 27 SELECT booking_id FROM bookings 28 WHERE status = 'PENDING' 29 AND owner_id = (SELECT user_id FROM users WHERE username = 'owner_bojan') 30 LIMIT 1 31 ); 25 SET status = 'Canceled' 26 WHERE booking_id = 'specific-booking-uuid-here'; 32 27 }}}
