/
[Tech Doc] Depart Functionality Vendor Portal
Use Case 1 : New buckets and logics for Bucket
change the logic in the vehicle request bucket → updated logic
Assigned would contain the departed trips, while the scheduled buckets will contain scheduled only.
vehicle_requests_assigned: {
_all: {
where: '(trip.status = \'assigned\''
}
},
vehicle_requests_scheduled: {
_all: {
where: '(trip.status = \'created\' AND scheduledvehicle.vehicle_number IS NOT NULL)'
}
},Use Case 2 : Introduction of Vendor Trip Depart option on Vendor Portal
Use the same API vehicle/assign to depart with is_scheduled: false.
Three new events are to be added in the market place and a webhook is to be triggered for the same.
trip_assign_to_vehicle
trip_schedule_worker
trip_schedule_vehicle
Depart is same as assign in our case.
Single time depart is allowed. → BE will already give the error