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
[x] The driver receives a ride request notification (displayed via ride-request-card.ts) and can either:
[x] Ignore the notification, which will make it disappear from the driver’s view.
[x] Accept the notification by clicking on "Accept," triggering a server request to /drivers/acceptRequest with the request ID.
[x] The server request uses authentication middleware to obtain the driver's ID from the context.
[x] 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.
[x] 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.
[x] 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.
[x] When the driver clicks "Complete Trip," the final trip price is displayed, and the driver confirms the completion of the trip.
[x] 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/acceptRequest
with the request ID.trip-start-card.ts
is displayed, showing the route from the driver’s current location to the pickup point and the final destination.trip-complete-card.ts
appears./drivers/completeRideRequest
to 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.