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.
Add a method to validate current inventory against event sourced inventory.
Whenever an event is being created, validate it.
If a validation fails, add a yellow notice to the UI indicating the discrepancy.
Create an inventory_discrepancies table.
If there is a discrepancy between the event sourcing calculation of current inventory and the DB, add a log to to the table including the diff as well as the user e-mail, controller action and parameters which caused it.
We should audit this table at least once a week and figure out what to do with the discrepancies.
We should add a button to the superadmin UI to resync a single organization or all organizations.
We should update the logic to build inventory by only starting from the most recent SnapshotEvent.
Summary
inventory_discrepancies
table.Things to consider
No response
Criteria for Completion
No response