Manage contributions validation + fix buger menu
==========================================================================
Manage contributions validation
Goals
Add status to contributions
breakdown:
- add status attribute to table contributions as an integer
- add enum to Contribution model with the following enabled values :
submitted
,accepted
,rejected
- initialize contribution status at creation on value
submitted
Add a validation & rejection system
breakdown:
- create a partial
contributions/_contributions_list.html.erb
to display for a compost the list of its contributions - render the partial in compost page
- create 2 methods
accept
andreject
in contributions controller - create buttons to those methods in the partial
- create routes for both methods (POST)
Tests
-
Open the compost page and the contributions list is displayed properly: PASSED -
Contribute to a compost and the new contribution appears on the list properly : PASSED -
When a new contribution is created, the status is "submitted" : PASSED -
When a new contribution is accepted, the status switches to "accepted" and the filling is incremented : PASSED -
When a contribution is rejected, the status switches to "rejected" and the filling is not incremented : PASSED
==========================================================================
Fix burger menu
Goals
Main goal 1
Burger button functionnal in navbar
Changes
-
app/assets/stylesheets/main.scss
edited
Tests
- when burger button is clicked, it opens, and links are still functionnal. Tested on different pages, and if logged in or not.
- failed test : when click away from the dropdown menu, it doesn't close anymore, we have to click on the burger to close it