project-icp / bee-pollinator-app

The web application front end for the ICP Pollinator Decision Support Tool 🐝
Apache License 2.0
6 stars 1 forks source link

Create and show April surveys via form #408

Closed fungjj92 closed 5 years ago

fungjj92 commented 5 years ago

Overview

This PR adds a functional April survey form that displays completed and submits new April surveys.

TODO's:

Connects #379

Demo

screen shot 2019-01-07 at 5 08 20 pm screen shot 2019-01-08 at 9 41 27 am

Basic error handling:

screen shot 2019-01-07 at 5 09 57 pm

completed-change

Notes

Things I'm thinking.

It would be awesome to have a custom component that all the monthly surveys inherit from, since their functionality will be the same I think. The only tricky thing is the forms are custom, and that puts a damper in reusability. --> Timebox explore in #380

~As discussed on slack #react, I wasn't sure how to handle the requests to the survey endpoints. It doesn't make sense to me to invoke Redux since survey data is very much only used in the scope of the modal being open. This is what I have that is working, for now. Open to discussion!~ Decided on making requests from component.

Testing Instructions

In utils change the startYear (line 192) in getAprilSurveys to 2018. Visit http://localhost:8000/survey/?beekeepers and click one of the April (APRIL) surveys. Fill out the survey if it doesn't exist, else see the results display.

Other survey listings should open an empty popup which will be subbed in with their survey form components when they exist.

rajadain commented 5 years ago

Just merged #406. This will need to be rebased atop develop to resolve the merge conflicts.

fungjj92 commented 5 years ago

Updated, pretty straightforward rebase onto #406 whoo hoo communication 🎉

fungjj92 commented 5 years ago

Thanks for reviewing! Will wait for Jenkins before merging.