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

[JH] Display next purchased date for each item #38

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

hsiangj
Copy link
Collaborator

@hsiangj hsiangj commented Mar 19, 2024

Description

This code displays next purchased date for each item in a shopping list. For brevity, next purchased date is currently shown as "Buy Next." The Firestore timestamp is first converted to a JavaScript date object, then formatted to a more user-friendly version of the "date next purchased" using a combination of string and array methods.

Related Issue

Closes #33
Sub-issue of #14

Acceptance Criteria

  • When an item is shown on the page, a date is displayed using the dateNextPurchased property.

Type of Changes

Use one or more labels to help your team understand the nature of the change(s) you’re proposing. E.g., bug fix or enhancement are common ones.

Updates

Before

Screen Shot 2024-03-19 at 1 49 36 PM

After

Screen Shot 2024-03-19 at 1 48 42 PM

Testing Steps / QA Criteria

After sign-in, navigate to a list with items. Each item should have a "Buy Next" date displayed below it.

@hsiangj hsiangj added enhancement New feature or request suggestion a suggestion for a new issue design sprint design sprint from issue 14 labels Mar 19, 2024
@hsiangj hsiangj self-assigned this Mar 19, 2024
Copy link

Visit the preview URL for this PR (updated for commit 5ff9a57):

https://tcl-69-smart-shopping-list--pr38-jh-display-date-for-ryq0ssal.web.app

(expires Tue, 26 Mar 2024 22:56:13 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 93172cc46147b7d365c2b1b8239b61e2efb07a80

@hsiangj
Copy link
Collaborator Author

hsiangj commented Mar 19, 2024

I played around with displaying date last purchased as well but it looked cluttered and I'm not sure if it's as pertinent as date next purchased at this point. I did see how some of the past cohorts incorporated an additional information button for each item to display dates and number of purchases - inspo if we decide to expand on the info shown.

Copy link
Collaborator

@krsnamara krsnamara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

Copy link
Collaborator

@piecanoe piecanoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job!

@hsiangj hsiangj merged commit faff243 into main Mar 21, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design sprint design sprint from issue 14 enhancement New feature or request suggestion a suggestion for a new issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

As a user, I want to be able to see the date info for each item in a list.
3 participants