Closed patricktownley closed 5 years ago
This looks great!
Hiding the ID should be easy, we can just store the ID in state and then grab it from there when making the POST request.
@patricktownley if you would like to do the honors and click "Squash and merge" button.
Habit model now contains an array of "Checkin" objects which can be updated each time the user submits.
Add API method to complete a checkin for a given habit
Currently finds by the habit's DB object id - not ideal but its a starting point.
Add functionality to checkin form …
@pjconnolly12 I'm looking at you for the DB side - I think this was the Schema.
@SaraSweetie I made a bunch of changes to your Check-in form a bit in order to test that it actually worked - hopefully it's alright.
The only really wacky thing is I added a Habit ID field to the form so i could try out the below:
Obviously we will need to find a way to have state field both populated automatically and not visible to the user, or use a different field to match on.
This is my first crack at the React side of things so any and all thoughts or suggestions very welcome.