Rider
Components
- RiderStartupServices
- RootView
- Home
- Payment
- PaymentConfirmation
- Confirm Ride
- CreditCard
- SuggestLocation
- SavedCards
- Ride Booked
- Receipt
- Settings
- History
- Sign Out
Rider Startup Services:
- Location:
The UI can be found under
js/components/rider/riderStartupServices
The actions can be found underjs/actions/rider/home
The reducer can be found underjs/reducer/rider/home
andjs/reducer/rider/appState
- Working:
Starts socket client. Connects client to server. Can be found under
socketRiderInit
inservices/ridersocket
Takes deviceId and sends it to backend. Used for push Notification Fetches initial location of user. This is because map requires initial region to display. Renders Map component.(RootView)once initial location is fetched Result: Initial services started. Map gets initial location to display Map loaded. Navigates to rootView.
Root View
Location: The UI can be found under
js/components/rider/rootView
The actions can be found underjs/actions/rider/home
The reducer spans multiple files.- Working: Loads MapView component. Handle all map related activities like when and how to display markers and show nearby drivers. This component is loaded during the entire application lifecycle. This is because rendering Map on each navigation is not good for performance. Whenever the screen has to change we use pageStatus to navigate load the component. All the components like confirmRide and rideBooked are loaded on top of rootView. If the user removes app from memory (swipes it from tasklist) the state of application is lost. To restore it we sync the data from backend. Based on that we reach the state of application which was there previously.
Result: Home screen is mounted on top of map by default App is ready for user interaction.
Home
Location: The UI can be found under
js/components/rider/home
The actions can be found underjs/actions/rider/home
The reducer can be found underjs/reducer/rider/home
andjs/reducer/rider/appState
- Working: Displays header which has menu navigation Button in middle which sets pickup location Footer view which can select taxi type(not integrated) User drags map and selects his pickup region.
Result: Pickup location set. Address fetched Page status changes to confirmRide Loads confirmRide component Note:- Goto pin not integrated
Confirm Ride
Location: The UI can be found under
js/components/rider/confirmRide
The actions can be found underjs/actions/rider/confirmRide
The reducer can be found underjs/reducer/rider/tripRequest
andjs/reducer/rider/appState
- Working: Request trip button. User can go back if he wishes to change pickup location Destination not integrated(for testing purposes)
Result: User clicks on request trip Spinner shown while a suitable driver is being searched Change page status to rideBooked if driver found else change page status to home if no nearby drivers.
Ride Booked
Location: The UI can be found under
js/components/rider/rideBooked
The actions can be found underjs/actions/rider/rideBooked
The reducer spans multiple files- Working: Based on the tripRequestUpdates of driver(check services/ridersocket) the store of rider is updated. Driver location is shown realtime Enroute, arriving and arrived status is shown on certain intervals based on driver location. If arrived driver starts trip on his end onTrip status is shown. Since destination is not integrated driver can end trip whenever he wishes. Rider can click on cancel button to cancel ride. In this case he is redirected to home page. Checks are in place to detect if the socket disconnects. In this case a message is shown that socket is disconected and user cannot perform any action.
Result: Once the trip is completed receipt page is generated.
Receipt
Location: The UI can be found under
js/components/rider/receipt
The actions can be found underjs/actions/rider/receipt
The reducer can be found underjs/reducer/rider/appState
andjs/reducer/rider/receipt
- Working: Generates the receipt. Time of journey along-with cost details Rider can give driver rating.
Result: User has completed trip. He goes back to home page and can start another trip.
Settings
Location: The UI can be found under
js/components/rider/settings
The actions can be found underjs/actions/rider/settings
The reducer can be found underjs/reducer/rider/user
Working: User can update its profile settings.
Payment
Location: The UI can be found under
js/components/rider/Payment
The actions can be found underjs/actions/payment/paymentMethod
The reducer can be found underjs/reducer/rider/paymentOption
Working: User can select payment mode Cash or Card.
PaymentConfirmation
Location: The UI can be found under
js/components/rider/paymentConfirmation
The actions can be found underjs/actions/payment/riderCardPayment
The reducer can be found underjs/reducer/rider/riderCardPayment
- Working:
User gets a notification that the transaction was sucessfull
CreditCard
- Location:
The UI can be found under
js/components/rider/creditCard
The actions can be found underjs/actions/payment/riderCardPayment
The reducer can be found underjs/reducer/rider/riderCardPayment
- Working
User inputs the card details which can be saved for later use.
SuggestLocation
- Location:
The UI can be found under
js/components/rider/suggestLocation
- Working:
We are using google api to autcomplete query when user enters his location.
SavedCards
- Location:
The UI can be found under
js/components/rider/savedCards
The actions can be found underjs/actions/payment/riderCardPayment
The reducer can be found underjs/reducer/rider/riderCardPayment
Working User can select from already saved cards to process the payment
History
Location: The UI can be found under
js/components/rider/history
The actions can be found underjs/actions/rider/history
The reducer can be found underjs/reducer/rider/history
Working: User can view his recent trips
SignOut
Location: The actions can be found under
js/actions/rider/home
The reducer can be found underjs/reducer/rider/user
andjs/reducer/rider/appState
- Working: Logs out user. Removes Token.