Changes between Version 1 and Version 2 of OrganizeTripUseCase


Ignore:
Timestamp:
01/12/25 22:36:07 (3 days ago)
Author:
222077
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OrganizeTripUseCase

    v1 v2  
    55 1. The transport organizer logs into the system.
    66 2. The transport organizer selects the ‘Our Routes’ tab.
    7  3. The transport organizer clicks on the ‘Add Trip’ button.
    8  4. The transport organizer fills out a form with the following details:
     7
     8{{{#!sql
     9SELECT r.route_id,
     10       l1.name AS from_location,
     11       l2.name AS to_location,
     12       tr.company_name AS organizer_name
     13FROM route r
     14JOIN location l1 ON r.from_location_id = l1.location_id
     15JOIN location l2 ON r.to_location_id = l2.location_id
     16JOIN transport_organizer tr ON r.transport_organizer_id = tr.transport_organizer_id
     17WHERE l1.name ILIKE '%from_location%'
     18  AND l2.name ILIKE '%to_location%'
     19}}}
     20
     21 3. The transport organizer selects a Route they want to add trip to.
     22 4. The transport organizer clicks on the ‘Add Trip’ button.
     23 5. The transport organizer fills out a form with the following details:
    924    * Time for the trip.
    1025    * Stop locations along the route, including estimated time of arrival (ETA) for each stop.
    11  5. The transport organizer submits the form.
    12  6. The transport organizer is redirected to the route page.
     26 6. The transport organizer submits the form.
     27
     28{{{#!sql
     29INSERT INTO trip (route_id, transport_organizer_id, free_seats, date, status)
     30VALUES (selected_route_id, logged_in_transport_organizer_id, total_seats, 'trip_date', 'NOT_STARTED')
     31RETURNING trip_id
     32}}}
     33
     34{{{#!sql
     35INSERT INTO trip_stops (trip_id, location_id, stop_time)
     36VALUES (returned_trip_id, stop_location_id, 'stop_time')
     37}}}
     38
     39 7. The transport organizer is redirected to the route page.