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

Possibilities for quantity-tailoring #33

Open
lascellesabercrombie opened this issue Jun 16, 2022 · 1 comment
Open

Possibilities for quantity-tailoring #33

lascellesabercrombie opened this issue Jun 16, 2022 · 1 comment

Comments

@lascellesabercrombie
Copy link

As with my previous issue, not really an issue. But I quite liked this bit in some code George and Minju wrote:

            <input
              type="number"
              id="quantity"
              name="quantity"
              min="1"
              max={productData.stock}
              value={quantity}
              onChange={(event) => setQuantity(event.target.value)}
            />

Here, the maximum in't an arbitrary number but is tied to a column in the database, so a customer can never attempt to order more of a thing than you have in stock. Then again, I'm not sure whether traders in emotions need to consider scarcity.

@joe-dev-public
Copy link
Contributor

Yeah, that constraining by stock is a great (and realistic :) idea!

It's true, we hadn't really considered stock levels yet -- the assumption was they're infinite ;)

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

No branches or pull requests

2 participants