voteamerica / voteamerica.github.io

Front end for the Carpool Vote website. Support every American's right to vote!
http://www.carpoolaction.org/
MIT License
38 stars 50 forks source link

Add riders component to operators page #386

Closed jkbits1 closed 5 years ago

jkbits1 commented 5 years ago

This PR adds a Riders component to the operators page. The component follows the pattern of the existing Drivers component.

The pattern is extended to respond to clicking on a rider table row by showing some details of that rider below the table. This is the first part of an extension to the pattern will be extended to highlight specific details and support actions for a specific rider or driver etc.

The new component makes use of the modular style of the operator page to use ReasonML as the development language (.js files are deployed as usual). This is for the same reason as TypeScript is used for the NodeJs backend, to add compile-time checks to the development process. Support for the use of ReasonML in the front-end is added as part of this PR.

For the Riders component, there are new associated actions, reducer and a new saga .

Generally, the code has been refactored to make new sagas and types easier to add by following a standard pattern and building on new generic functions to create new types and functions.