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

View item details #40

Merged
merged 5 commits into from
Sep 28, 2024
Merged

View item details #40

merged 5 commits into from
Sep 28, 2024

Conversation

sar-mko
Copy link
Collaborator

@sar-mko sar-mko commented Sep 24, 2024

Description

  • In ListItem created a div to hold item details
  • Passed in dateNextPurchased and totalPurchases from the item object
  • displayed the details in a list
  • created a toggle button to switch between open and closed states

Ideally, we can use this as a base for more stylistic choices coming up.

Related Issue

closes #37 (#21)

Acceptance Criteria

  • User has the option to view details on an item from their list
  • User can see dateLastPurchased, dateNextPurchase, and totalPurchases pertaining to a single item.
  • Data is accurate to the specific item

Type of Changes

enhancement

Updates

After

Screenshot 2024-09-24 at 11 51 50 AM Screenshot 2024-09-24 at 11 51 59 AM

Testing Steps / QA Criteria

  • View list of items on List and there should be a View Purchase Details button
  • Clicking button will open and should display details
  • Open Firebase to list info see if dateLastPurchased, dateNextPurchase, and totalPurchases are the same as whats displayed
  • Clicking button should toggle between displaying and hiding the div

Copy link

github-actions bot commented Sep 24, 2024

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

https://tcl-76-smart-shopping-list--pr40-sm-view-item-details-urkzd2dq.web.app

(expires Wed, 02 Oct 2024 18:37:00 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 512b1a88be8ae05fd3e727b99332819df760271d

Copy link
Collaborator

@arandel1 arandel1 left a comment

Choose a reason for hiding this comment

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

Functionality works great!

nit-pick/non-blocking: To set us up for adding CSS later, can we make the list items as <p> instead of <h2>? They just look a little big.

nit-pick/non-blocking: In the View Details section, can we add a space between the three stats? They currently look like this: "Last Purchase:Fri Sep 20 2024" and I'm wanting a space after the colon: "Last Purchase: Fri Sep 20 2024".

Copy link
Collaborator

@EmmaBin EmmaBin left a comment

Choose a reason for hiding this comment

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

I tested by adding a new item and making purchases, and all data was correctly reflected in the div.

@sar-mko
Copy link
Collaborator Author

sar-mko commented Sep 25, 2024

Functionality works great!

nit-pick/non-blocking: To set us up for adding CSS later, can we make the list items as <p> instead of <h2>? They just look a little big.

nit-pick/non-blocking: In the View Details section, can we add a space between the three stats? They currently look like this: "Last Purchase:Fri Sep 20 2024" and I'm wanting a space after the colon: "Last Purchase: Fri Sep 20 2024".

Hi, I added fontSize inline for now and added a span around the date to get the spacing.

Copy link
Collaborator

@MarcosPerez16 MarcosPerez16 left a comment

Choose a reason for hiding this comment

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

Tested and it everything is working on my end.

@sar-mko sar-mko merged commit ec4194d into main Sep 28, 2024
2 checks passed
@sar-mko sar-mko deleted the sm-view-item-details branch October 4, 2024 19:29
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

Successfully merging this pull request may close these issues.

21. As a user, I want to see my purchase history for each item
4 participants