-
Notifications
You must be signed in to change notification settings - Fork 0
(W5) Monica and Mike (Add mark for item already on list)
- 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)
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
- We need a library that keeps track of time. Like a time stamp
- How to add "last date when it's purchased" data point to firebase
- Create a component that adds a check box next to an item
- ?? 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
- Answer if the item is there more than 24hrs the check mark goes away
Next Steps (Ground Rules
- Figure out how many times we want to meet
- Monday, Wed for sure. Possibly Friday and Saturday Mid Day, Sunday before the sync
- 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
- On non sync hours what each team member will work on
- Have your goal/deliverable done by next sync
- Set expectation
- To meet 1hr min session (if we need to go over we are perfect with that)
Next Steps for 1/20/19
-
Research on Tasks 1, 2, and 3. Write down how you would try to solve it?
-
We need a library that keeps track of time. Like a time stamp (What's that library framework- find library)
-
How to add "last date when it's purchased" data point to firebase (Psuedocode how you would add "last purchased"
-
Create a component that adds a check box next to an item (Psuedocode or find examples on how to do this)
-
4pm Next sync 2hr block ten min break
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
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.
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)