Version 3 (modified by 2 days ago) ( diff ) | ,
---|
Actors
- Transport Organizer
Steps
- The transport organizer logs into the system.
- The transport organizer selects the ‘Our Trips’ tab.
- The transport organizer selects the ‘From destination’ and enters a location.
- The transport organizer selects the ‘To destination’ and enters a location.
- (Optional) The transport organizer selects a date range in which their trips were completed. By default, all trips with an UPCOMING status are displayed.
SELECT lf.name, lt.name, trip.free_seats, trip.date, t_o.company_name, stop_time FROM trip JOIN transport_organizer as t_o ON trip.transport_organizer_id = t_o.transport_organizer_id JOIN route as r ON trip.route_id = r.route_id JOIN location as lf on r.from_location_id = lf.location_id JOIN location as lt on r.to_location_id = lt.location_id JOIN trip_stops as stop on lf.location_id = stop.location_id WHERE status = 'NOT_STARTED' ORDER BY date, stop_time;
SELECT lf.name, lt.name, trip.free_seats, trip.date, t_o.company_name, stop_time FROM trip JOIN transport_organizer as t_o ON trip.transport_organizer_id = t_o.transport_organizer_id JOIN route as r ON trip.route_id = r.route_id JOIN location as lf on r.from_location_id = lf.location_id JOIN location as lt on r.to_location_id = lt.location_id JOIN trip_stops as stop on lf.location_id = stop.location_id WHERE status = 'NOT_STARTED' AND date > {date_after} AND date < {date_before} -- Optional ORDER BY date, stop_time;
- The transport organizer clicks on the ‘Search’ button.
- The transport organizer selects the trip they wish to modify.
- The system displays a form with information related to the trip’s stops and their timestamps.
DELETE FROM trip_stops as ts WHERE ts.trip_stop_id = {trip_stop_selected}; INSERT INTO trip_stops(trip_id, location_id, stop_time) VALUES({selected_trip_id}, {selected_location_id}, {entered_time}); UPDATE trip_stops SET {field} = {new_value} WHERE trip_stops = {selected_trip_stop_id};
- The transport organizer clicks on the ‘Save changes’ button.
Note:
See TracWiki
for help on using the wiki.