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

[Feature] Add "Quantity" as an addable option #8

Open
DoktorShift opened this issue Apr 22, 2024 · 1 comment
Open

[Feature] Add "Quantity" as an addable option #8

DoktorShift opened this issue Apr 22, 2024 · 1 comment

Comments

@DoktorShift
Copy link
Collaborator

DoktorShift commented Apr 22, 2024

Is your feature request related to a problem? Please describe.

Right now the extension behave options to trigger the device restricted by

  1. Opening time
  2. payable x times during the last 24 hours

Describe the solution you'd like

One more option to allow triggering by a quantity check would allow a few more usecases.

I would like it to be possible to specify the quantity of availability for each product/machine. That way, it can no longer be triggered if the product is sold out.

This would allow or improve the "misuse" of the extension, e.g. for the use of vending machines.

This is my solution

Add a "optional int" value field to specify the quantity during configuration/editing of the device.

quantity

Additional context

  1. If the field is empty do not consider this option.
  2. If value 0 give back sold out
  3. if value <1 allow create invoice
@DoktorShift DoktorShift changed the title Add quantity to possible addable option [Feature] Add quantity to possible addable option Apr 22, 2024
@DoktorShift DoktorShift changed the title [Feature] Add quantity to possible addable option [Feature] Add "Quantity" as an addable option Apr 22, 2024
@DoktorShift
Copy link
Collaborator Author

Thoughts

  1. Backend Update:

    • Implement a feature in the backend to track the product's quantity. When the quantity reaches 0, mark the product as "sold out" in the database. This would prevent the device from being triggered when a product is out of stock.
  2. UI Enhancement:

    • In the DeviceTimer configuration/editing form, add a visible field for the current product quantity.
    • When the quantity hits 0, display a prominent "Refill Needed" message with an option to manually restock the product. This would improve usability by enabling quick restocking directly through the UI.
  3. WebSocket or Webhook Reminder:

    • Integrate a WebSocket/Webhook connection to send a reminder when the product quantity reaches 0. This could trigger notifications or alerts for admins.

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

1 participant