Open git-wil opened 1 month ago
inventory current: name, location, quantity, items stored in multiple locations only have one total quantity ideal: multiple locations, each location has a quantity, also has total quantity that's updating here's the thing: already exists: non stewards should not see back-stock against checking out items from location quantities shown should only be in locations shown -- as in not back-stock
invisible: backstock, outdoor storage, cage 5 possible its in multiple locations that are all visible
how to mix high medium low with a number ex: gallon ziplock bags (medium about, 1 box in each location)
fundamentally changing the inventory database
how to change the inventory page to show the different quantities
quantity under the name of the location
a. figure out data structure b. how to show to users (inventory main page) c. how to show in checkout kiosk d. inventory kiosk
note: could mock up renderings
move details and +- buttons to the left multiple quantities for different locations can be shown then total available checking out one from a "high" available item quantity checked out, each location has a quantity replace everywhere where "quantity_total" is used with computing quantity + quantity for each location. then compute available by taking quantity + quantity for each location - total_checked_out
calls create_new_checkout when checking out item
calls check_in_checkout when checking in item
updated both...
Change update quantity routinely instead of during checkout (to minimize desync of inventory)
can't check back in
view of each quantity per location
for checkouts, only care about total quantity
checkout item row
will mock up both ideas
not throw error when too many checked out
Modify inventory items to be stored with a quantity for each location it appears.
This would involve major modifications to the InventoryItem backend implementation to include a quantity for each location object. Further, each item would need to have a total quantity that is calculated based on the sum of all location quantities, and when checked out should modify a total quantity available metric.
This would also involve significant frontend changes to the inventory page and checkout kiosk (to show the locations and quantities where that item exists) and to the inventory editor (to add various quantities per location).
As a note, all items with quantities in multiple locations have the quantity location stored in all locations after the first, separated by a vertical bar in the location.specific string. As an example, an item might look like
{ name: "Super Glue", quantity: 5, // Quantity available in the first location listed ..., locations: [ { room: "Main", container: "Cabinet 5", specific: "Shelf 1" // At this location, there are 5 of this item }, { room: "Cage", container: "Shelf 5d", // here, the | distinguishes between the specific location ("Stack 7") /// and the quantity of this item in this location (-2 or medium) specific: "Stack 7|-2" } ] }