This plugin helps you monitor the stock levels in two ways:
vendure-config.ts to expose a productVariantsWithLowStock query in the admin API.The "Low stock" widget is provided as a React Dashboard extension — no Admin UI compilation step is needed.
When you start the server and login, you can find Low stock under the dashboard's add widget button.
StockLocationStrategy because of performance reasons. Instead, it fetches the stock level for each variant from the database and calculates its absolute stock based on the stockOnHand and stockAllocated fields.StockMovementEvent will create a job that triggers a stock check: get saleable stock, compare with variant threshold, and emit event if variant dropped below threshold.StockDroppedBelowThresholdEvent fields from stockBeforeOrder/stockAfterOrder to stockBeforeAdjustment/stockAfterAdjustmentorder field from StockDroppedBelowThresholdEventtrackInventory query filter to use correct boolean string valueStockLevelBelowThresholdEvent.column "stockonhand" does not exist on PostgresreduceSum function call bugStockWidgetComponent standalone and removed StockWidgetSharedModule and StockWidgetModule