Skip to content

💡 Add item to shopping list with default quantity to 1 #368

@andry360

Description

@andry360

What's on your mind?

Hi,

I noticed a potential issue when adding items without specifying a quantity first.

Here there are the steps to reproduce it:

  1. Add an item in Kitshn without setting a quantity
  2. Open the shopping list in the Tandoor web UI

Expected behavior:
The item should appear in the shopping list (in the app and in the web UI).

Actual behavior:

  • The item does not appear in the web UI
  • The total item counter in the web UI increases (I attached a screenshot just to show the counter I mean)
  • Browser console (Chrome and Firefox) shows this error: TypeError: Cannot read properties of undefined (reading 'amount')

If I add a quantity, the item appears correctly in the web UI.

My suggestion is to assign a default quantity of 1 to every new item, since adding it usually implies at least one unit. This would also ensure consistency between the app and the web UI.

Thank you!

Image

tandoor.1775464544286.log

Relevant platforms

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions