chingu-voyages / v8-geckos-team-07

Habit-Tracker | Voyage-8 | https://chingu.io/
https://habit-tracker-gecko.herokuapp.com/
4 stars 4 forks source link

Backend Work for Checkin Submission #67

Closed patricktownley closed 5 years ago

patricktownley commented 5 years ago

Habit model now contains an array of "Checkin" objects which can be updated each time the user submits.

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:

image

image

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.

pjconnolly12 commented 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.

paulywill commented 5 years ago

@patricktownley if you would like to do the honors and click "Squash and merge" button.