Enhancement Needed - Lookups in Inventory Response #166
Labels
good first issue
Good for newcomers
help wanted
Extra attention is needed
idea/enhancement
New feature or request
We have a few times when the server response doesn't quite contain all the information we need. An example from now is that the vending machine response with cheese names and quantities but we also need the identifier for convertible_intake. Currently we've hardcoded cheese names with their IDs
mh-helper-extension/src/scripts/main.js
Line 462 in f96df6f
In this case we'd have to look up the inventory entry by cheese name and we can get the id that way. Below is a snippet for an entry in the inventory part of the response. We have the name from the vending response, we need the item_id. This would let us dynamically get the cheeses so future changes would be picked up automatically.
The enhancement is to add two library functions - one to get item details by name and one to get item details by code. A third to get item details by id would also be welcome. There are other areas in the extension this functionality is used.
The text was updated successfully, but these errors were encountered: