Human Essentials is an inventory management system for diaper, incontinence, and period-supply banks. It supports them in distributing to partners, tracking inventory, and reporting stats and analytics.
When adding items in a new kit, the JS for barcode lookup doesn't seem to be working.
When I enter a nonexistent barcode and press enter, no modal pops up to add that barcode item.
And I see this error in the console:
When I enter an existing barcode and press enter, no empty new item is added at the bottom.
And I see this error in the console:
Expected Behavior
I expect to see a modal to add a new barcode item if it doesn't exist yet. (like how it works for creating a new distribution for example).
I expect to have a new empty item added to the bottom if the item does exist.
Basically I expect it to work the same as when adding items elsewhere in the application, such as for purchases or distributions.
Steps To Reproduce
Log in as an org admin.
Go to Inventory => Kits tab.
Click "New kit".
Enter a nonexistent barcode number and hit enter.
Note that no modal pops up to add that item. (issue 1)
Enter an existing barcode number and hit enter.
Note that item name and quanity are filled, but a new empty item is not added. (issue 2)
Environment
No response
Criteria for Completion
No response
Anything else?
Attaching a PR to fix this issue.
Code of Conduct
[X] I've read the Code of Conduct and understand my responsibilities as a member of the Ruby for Good community
Is there an existing issue for this?
Current Behavior
When adding items in a new kit, the JS for barcode lookup doesn't seem to be working. When I enter a nonexistent barcode and press enter, no modal pops up to add that barcode item. And I see this error in the console: When I enter an existing barcode and press enter, no empty new item is added at the bottom. And I see this error in the console:
Expected Behavior
I expect to see a modal to add a new barcode item if it doesn't exist yet. (like how it works for creating a new distribution for example). I expect to have a new empty item added to the bottom if the item does exist.
Basically I expect it to work the same as when adding items elsewhere in the application, such as for purchases or distributions.
Steps To Reproduce
Environment
No response
Criteria for Completion
No response
Anything else?
Attaching a PR to fix this issue.
Code of Conduct