-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
user-storyUser StoryUser Story
Description
User Story
- As a driver
- 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/acceptRequestwith 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.tsis 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.tsappears. - 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/completeRideRequestto 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, andtrip-complete-card.ts), reflecting the progression through the trip stages.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
user-storyUser StoryUser Story