Skip to content

(W5) Monica and Mike (Add mark for item already on list)

Michael Ramirez edited this page Jan 23, 2020 · 7 revisions

9. As a user, I want to mark an item already on my shopping list as purchased #31

AC:

  • 9.1 User is able to tap a checkbox or similar UI element to mark an item in the list as purchased
  • 9.2 Item should be shown as checked for 24 hours after the purchase is made (i.e. we assume the user does not need to buy the item again for at least 1 day)

Andrew sync with Team 1/19/2019

Notes

  • Not currently storing date items was last purchased
  • We need to modify how we add an item so that we know when we added item (what date it was added)
  • We need a check mark component
  • Add a new data point "Last date when it's purchased". And go to the DB to edit items to last time it was "bought/added"
  • Give a component
  • Mapping out items and list item. its that point where you compare that certain point to the recent state?4

Ideas

  • Add render time?
  • Find a library does figures out a moment in time?
  • Create a component that marks an item

What know right now

  1. We need a library that keeps track of time. Like a time stamp
  2. How to add "last date when it's purchased" data point to firebase
  3. Create a component that adds a check box next to an item
  4. ?? We should ask Andrew: Create a function that check a certain state to firebase to compare what items has been there more than 24 hours
  5. Answer if the item is there more than 24hrs the check mark goes away

Next Steps (Ground Rules

  1. Figure out how many times we want to meet
    • Monday, Wed for sure. Possibly Friday and Saturday Mid Day, Sunday before the sync
  2. set small goals for every sync
    • Share Deliverables
    • What are the issues we are stuck on
    • What are the wins since last sync
    • What are next steps and small goals for next sync
    • Pair Program
  3. On non sync hours what each team member will work on
    • Have your goal/deliverable done by next sync
  4. Set expectation
    • To meet 1hr min session (if we need to go over we are perfect with that)

Next Steps for 1/20/19

  1. Research on Tasks 1, 2, and 3. Write down how you would try to solve it?

  2. We need a library that keeps track of time. Like a time stamp (What's that library framework- find library)

  3. How to add "last date when it's purchased" data point to firebase (Psuedocode how you would add "last purchased"

  4. Create a component that adds a check box next to an item (Psuedocode or find examples on how to do this)

  5. 4pm Next sync 2hr block ten min break


Sync Monday 1/20

What we did today:

Small Win

  • We added input checkbox next to item

What we still need to accomplish

  • Need to find a framework to time stamp
  • Need to figure out our 'lastPurchased' data point

Next Steps

  • T1. Find that framework
  • T2. Firebase Datapoint
  • Next Tuesday: 6pm PST/9pm EST

Sync Tuesday 1/21

PreSync Notes

  • Tip for saving the purchase date: start by looking at the Firestore docs to see what format the database is expecting to have sent to it.

  • As far as rendering the checkmark (not checkbox, for now) or not, what I’d recommend is something like the following (off the top of my head, not tested, pseudocode): In List.js where we currently have this:

{shoppingList.map((item, index) => ( <li key={index}>{item.name}</li> ))} Change it to something more like this:

{shoppingList.map((item, index) => ( <li key={index}> {isLessThan24hrs(item.last_purchase_date) ? <Checkmark/> : null} {item.name} </li> ))}

The above implies you’ll need to write the isLessThan24hrs function and a new Checkmark component.


Sync Tuesday 1/21

Notes

  • We have dayJS to convert time useable for firebase
  • Figure out how to append time to the item

NextStep

  • Adding that time in firebase
  • To compare nowTime to previous. if its <= 24hrs then return this state (uncheck the box)

Sync Wed 2/21

Questions/Steps

  1. create function that compares lastPurchase date =< 24hrs. If > 24 then uncheckbox
  • What values are we comparing is it time only or time + date
  • How to uncheck the box

Notes

NextStep