Changes between Version 1 and Version 2 of ManageTripUseCase
- Timestamp:
- 01/12/25 22:51:52 (3 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ManageTripUseCase
v1 v2 8 8 4. The transport organizer selects the ‘To destination’ and enters a location. 9 9 5. (Optional) The transport organizer selects a date range in which their trips were completed. By default, all trips with an **UPCOMING** status are displayed. 10 11 {{{#!sql 12 SELECT lf.name, lt.name, trip.free_seats, trip.date, t_o.company_name, stop_time 13 FROM trip 14 JOIN transport_organizer as t_o ON trip.transport_organizer_id = t_o.transport_organizer_id 15 JOIN route as r ON trip.route_id = r.route_id 16 JOIN location as lf on r.from_location_id = lf.location_id 17 JOIN location as lt on r.to_location_id = lt.location_id 18 JOIN trip_stops as stop on lf.location_id = stop.location_id 19 WHERE status = 'NOT_STARTED' 20 ORDER BY date, stop_time; 21 }}} 22 23 {{{#!sql 24 SELECT lf.name, lt.name, trip.free_seats, trip.date, t_o.company_name, stop_time 25 FROM trip 26 JOIN transport_organizer as t_o ON trip.transport_organizer_id = t_o.transport_organizer_id 27 JOIN route as r ON trip.route_id = r.route_id 28 JOIN location as lf on r.from_location_id = lf.location_id 29 JOIN location as lt on r.to_location_id = lt.location_id 30 JOIN trip_stops as stop on lf.location_id = stop.location_id 31 WHERE status = 'NOT_STARTED' AND date > {date_after} AND date < {date_before} 32 ORDER BY date, stop_time; 33 }}} 10 34 6. The transport organizer clicks on the ‘Search’ button. 11 35 7. The transport organizer selects the trip they wish to modify. 12 36 8. The system displays a form with information related to the trip’s stops and their timestamps. 37 38 {{{#!sql 39 DELETE 40 FROM trip_stops as ts 41 WHERE ts.trip_stop_id = {trip_stop_selected}; 42 43 INSERT INTO 44 trip_stops(trip_id, location_id, stop_time) 45 VALUES({selected_trip_id}, {selected_location_id}, {entered_time}); 46 47 UPDATE trip_stops 48 SET {field} = {new_value} 49 WHERE trip_stops = {selected_trip_stop_id}; 50 }}} 51 13 52 9. The transport organizer clicks on the ‘Save changes’ button.