-
Notifications
You must be signed in to change notification settings - Fork 0
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
Sm ar items in order issue 13 #30
base: main
Are you sure you want to change the base?
Conversation
…d out by category of soonness
Visit the preview URL for this PR (updated for commit 0d550c9): https://tcl-76-smart-shopping-list--pr30-sm-ar-items-in-order-y2d5p2a0.web.app (expires Thu, 26 Sep 2024 18:34:29 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 512b1a88be8ae05fd3e727b99332819df760271d |
}); | ||
|
||
sortedList.forEach((x) => { | ||
const dateNextPurchasedAsDate = x.dateNextPurchased?.toDate(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**nitpick: ** x
is not very descriptive in terms of a variable name. Suggestions: item
, listItem
or something along those lines
const dateNextPurchasedAsDateA = a.dateNextPurchased?.toDate(); | ||
const dateNextPurchasedAsDateB = b.dateNextPurchased?.toDate(); | ||
|
||
const daysUntilNextPurchaseA = getDaysBetweenDates( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like how getDaysBetwenDates
gets used again here!
Description
dateNextPurchased
value is).Related Issue
closes 13
Acceptance Criteria
api/firestore.js
exports a newcomparePurchaseUrgency
function with the following behaviorsA stretch goal
If you complete all of the previous acceptance criteria, consider what happens when an item’s dateNextPurchased has passed, but it isn’t yet inactive. Let’s call that item “overdue”.
Type of Changes
enhancement
feature
Updates
Before
After
Testing Steps / QA Criteria
sm-ar-items-in-order-issue-13
calculateEstimate
thinks you will buy that item every single day)dateLastPurchased
anddateNextPurchased
inputs in Firebase to reflect items being purchased over 60 days ago. (Set an item'sdateLastPurchased
to January 1,dateNextPurchased
to January 10, andtotalPurchases
to 4.)dateLastPurchased
anddateNextPurchased
inputs in Firebase to reflect items being purchased over 60 days ago. (Set an item'sdateLastPurchased
to January 1,dateNextPurchased
to December 10, andtotalPurchases
to 4.)