the-collab-lab / tcl-75-smart-shopping-list

2 stars 2 forks source link

Issue #5 | Add Item to Shopping List #30

Closed dilekbaykara closed 2 months ago

dilekbaykara commented 2 months ago

Description

This PR allows users to add items within a form to the database in order to track the future replenishment date of their items.

After adding an item in the input value, there are three options in the form:

Each of the above days assign a date to that item starting from the date the item was added to the database.

Related Issue

Closes #5

Acceptance Criteria

Data-related tasks:

Type of Changes

enhancement

Updates

Before

Screenshot 2024-08-23 at 9 19 46 AM

After

Screenshot 2024-08-23 at 9 37 21 AM Screenshot 2024-08-23 at 9 25 59 AM Screenshot 2024-08-23 at 9 52 21 AM Screenshot 2024-08-23 at 9 25 42 AM Screenshot 2024-08-23 at 9 34 58 AM

Testing Steps / QA Criteria

  1. Sign in
  2. Enter name of Item
  3. Select option for date
  4. Click Submit
  5. Check if item appears in database in firestore page
  6. Test alert if user does not input item name when submit button is clicked
  7. Test alert if user does not select date when submit button is clicked
github-actions[bot] commented 2 months ago

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

https://tcl-75-smart-shopping-list--pr30-nk-db-add-new-item-t-a5e657vs.web.app

(expires Fri, 30 Aug 2024 15:54:42 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 1f1fd53c369e1fa31e15c310aa075b4e8f4f8dde

kweeuhree commented 2 months ago

These changes look great, and the code is clear and concise. One note is that the user is able to add multiple of the same item. Do we want it to behave that way, or should we have another alert for when an item is duplicated? My preference would be to not allow duplicated items, but I'm open to other opinions!

Great point!

deeheber commented 2 months ago

These changes look great, and the code is clear and concise. One note is that the user is able to add multiple of the same item. Do we want it to behave that way, or should we have another alert for when an item is duplicated? My preference would be to not allow duplicated items, but I'm open to other opinions!

Great observation, though I don't think y'all need to take any action on this now since it will be addressed as part of issue #10 that will be assigned in later weeks.