Skip to end of banner
Go to start of banner

[Tech Doc] Depart Functionality Vendor Portal

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current Restore this Version View Version History

Version 1 Current »

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

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.