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

Inventory item quantities per location #28

Open
git-wil opened this issue Sep 20, 2024 · 5 comments
Open

Inventory item quantities per location #28

git-wil opened this issue Sep 20, 2024 · 5 comments
Assignees
Labels
1 A high priority issue backend A backend feature request frontend A frontend feature request

Comments

@git-wil
Copy link
Contributor

git-wil commented Sep 20, 2024

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"
}
]
}

@git-wil git-wil added enhancement 1 A high priority issue frontend A frontend feature request backend A backend feature request labels Sep 20, 2024
@git-wil git-wil mentioned this issue Sep 25, 2024
26 tasks
@jp-walker jp-walker self-assigned this Sep 27, 2024
@jp-walker
Copy link
Collaborator

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

@jp-walker jp-walker reopened this Sep 27, 2024
@git-wil git-wil self-assigned this Sep 27, 2024
@git-wil
Copy link
Contributor Author

git-wil commented Oct 4, 2024

  • Update db schema
  • Update inventory item json
  • Update all calls to get quantity to stop
  • Create an "add to checked out quantity" API route
    • When checking out an item, call route
  • Update frontend

@jp-walker
Copy link
Collaborator

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...

@jp-walker
Copy link
Collaborator

Change update quantity routinely instead of during checkout (to minimize desync of inventory)

@jp-walker
Copy link
Collaborator

jp-walker commented Oct 28, 2024

  • can't check back in

  • view of each quantity per location

  • for checkouts, only care about total quantity

  • checkout item row

    • location: quantity, location: quantity, total: (quantity_total - quantity_checked_out)/quantity_total
    • OR
    • total: (quantity_total - quantity_checked_out)/quantity_total
      location: quantity
      location: quantity
  • will mock up both ideas

  • not throw error when too many checked out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 A high priority issue backend A backend feature request frontend A frontend feature request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants