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

Items that are filtered out which previously had a quantity selected can still be added to cart #178

Open
AndrewLester opened this issue Jul 26, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@AndrewLester
Copy link
Member

AndrewLester commented Jul 26, 2021

Before adding cartItems to the JSON body that is sent when adding items to your cart, make sure they exist in the refinedItems variable. Here's where they are added to the JSON body:
https://github.com/apc-gmhs/mustang-mug/blob/3e3973ffb904f6e00af51a636d0a364c49e45456/src/routes/_menu.js#L15-L23
This method should take in another parameter (availableItems or similar) with the items that are currently displayed to the user (refinedItems in the Menu component). The Menu component must also export its refinedItems property so that it may be accessed in the index.svelte (menu) route.

@AndrewLester AndrewLester added the bug Something isn't working label Jul 26, 2021
@JonathanOppenheimer JonathanOppenheimer added this to the Fourth Meeting milestone Jul 27, 2021
@AndrewLester
Copy link
Member Author

AndrewLester commented Jul 31, 2021

The intended behavior of this must be discussed further before implementing a solution.

Also, filtering out an item and bringing it back removes a previously selected quantity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants