fix(refill): stabilize stock and amount package semantics

This commit is contained in:
Daniel Volz
2026-05-08 11:03:25 +02:00
parent b838f0e8ea
commit 277fc3e686
23 changed files with 1696 additions and 335 deletions
+2 -2
View File
@@ -293,8 +293,8 @@ export function getStockStatus(
thresholds: StockThresholds,
packageType?: PackageType
): StockStatus {
// Out of stock or completely depleted = danger (red)
if (medsLeft <= 0 || daysLeft === 0) {
// Only a real zero-or-below stock count is out of stock.
if (medsLeft <= 0) {
return { level: "out-of-stock", className: "danger", label: "status.outOfStock" };
}