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
.
New webhook to be added trip_vehicle_departed
in FLM_TRIP_V2, FLM_TRIP . New trip event needs to be created. in After commit of event webhook needs to be triggered. Create a new file for the event trip-vehicle-departed-event.js.
Send a new flag createDepartEvent
to assignOrScheduleTripToWorkerAndVehicle
. We will send this flag only if is_scheduled is false. Now use the same in assignTripToWorkerAndVehicle
to trigger tripEvents.TripVehicleDepart
Event.
Depart is same as assign check if some event is already triggered for it. why new event is required when we already had worker assigned for trip, vehicle assigned fo trip.?
UI actions and depart same or diff as notification also there
Single time depart is allowed. → BE will already give the error
Add Comment