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

Submit and show November surveys #412

Closed fungjj92 closed 5 years ago

fungjj92 commented 5 years ago

Overview

This PR adds the next survey modal, November. It submits or displays November (November) surveys. The last, major remaining bit in this feature set is #381 which is underway.

There's a lot of duplicate code between the surveys. The correct way would be that they'd inherit from a base survey component, but since we're nearly done with the survey feature and we wouldn't see the speed returns from doing that work, I've skipped it.

I did make some reusability and readability improvements, however, in creating multiple choice inputs.

Connects #380

Demo

For good measure, here's a snippet of an existing November survey.

screen shot 2019-01-09 at 1 07 15 pm

Testing Instructions

Visit http://localhost:8000/survey/?beekeepers and log in, create 1+ apiaries. Play with November surveys -- they should submit and show fine!

I made changes to April survey form too, to match November. To get an April survey, you'll have to update the startYear in utils from 2019 to say 2018 or 2017.

rajadain commented 5 years ago

Taking another look

fungjj92 commented 5 years ago

Awesome, thanks for review. Onward to the last survey! Merging.