You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to manage ride request notifications, respond to the request, and complete the trip in stages
So that I can efficiently navigate through the ride process, from accepting a request to finalizing payment
Acceptance Criteria
The driver receives a ride request notification (displayed via ride-request-card.ts) and can either:
Ignore the notification, which will make it disappear from the driver’s view.
Accept the notification by clicking on "Accept," triggering a server request to /drivers/acceptRequest with the request ID.
The server request uses authentication middleware to obtain the driver's ID from the context.
If the ride request status is not pending, an error is sent back to the driver as feedback.
If the request is accepted, the system responds with the rider’s name and ride request details.
Upon accepting, the trip-start-card.ts is displayed, showing the route from the driver’s current location to the pickup point and the final destination.
When the driver clicks "Start," the route updates from the driver’s current location to the final destination.
The driver can choose to navigate using Google Maps or Waze for directions to the destination.
When the driver is within 1 km of the rider, the trip-complete-card.ts appears.
When the driver clicks "Complete Trip," the final trip price is displayed, and the driver confirms the completion of the trip.
The completion triggers a backend request to /drivers/completeRideRequest to mark the ride request as completed.
After completion, the driver is redirected to the main screen.
Additional Notes
Ensure smooth transitions between each card (ride-request-card.ts, trip-start-card.ts, and trip-complete-card.ts), reflecting the progression through the trip stages.
User Story
Acceptance Criteria
ride-request-card.ts) and can either:/drivers/acceptRequestwith the request ID.trip-start-card.tsis displayed, showing the route from the driver’s current location to the pickup point and the final destination.trip-complete-card.tsappears./drivers/completeRideRequestto mark the ride request as completed.Additional Notes
ride-request-card.ts,trip-start-card.ts, andtrip-complete-card.ts), reflecting the progression through the trip stages.