Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

9. As a user, I want to mark an item on my shopping list as purchased so the app can learn how often I buy different items. #8

Open
4 tasks
stacietaylorcima opened this issue Dec 18, 2023 · 0 comments

Comments

@stacietaylorcima
Copy link
Contributor

stacietaylorcima commented Dec 18, 2023

Summary

Users need a UI that allows them to mark the their items as purchased, so they can track what on their list they do and do not need to buy.

Acceptance criteria

  • The ListItem component renders a checkbox with a semantic <label>.
  • Checking off the item in the UI also updates the dateLastPurchased and totalPurchases properties on the corresponding Firestore document
  • The item is 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). After 24 hours, the item unchecks itself so the user can buy it again.
  • The updateItem function in firebase.js has been filled out, and sends updates to the firestore database when an item is checked

Notes:

  • While you will need to update multiple parts of the Firestore document for this feature, do not worry about dateNextPurchased yet. That will be addressed in a future issue.
  • You can use the Firestore console to test that this feature is working correctly, e.g., by manipulating the value of dateLastPurchased
@jeremiahfallin jeremiahfallin changed the title 8. As a user, I want to mark an item on my shopping list as purchased so the app can learn how often I buy different items. 9. As a user, I want to mark an item on my shopping list as purchased so the app can learn how often I buy different items. Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant