[dyad] Updated low stock alerts threshold to less than 3 - wrote 2 file(s) + extra files edited outside of Dyad

This commit is contained in:
[dyad] 2025-09-23 16:32:40 +02:00
parent b4f8ac7fb4
commit 19ae6a9f6c
2 changed files with 2 additions and 2 deletions

View file

@ -69,7 +69,7 @@ export function useDashboardData() {
const itemValue = quantity * costPrice;
calculatedTotalStockValue += itemValue;
console.log(`Item ${index + 1}: ${item.name} - Qty: ${quantity}, Cost: ${costPrice}, Value: ${itemValue}`); // Debug log per item
if (quantity < 10) {
if (quantity < 3) { // Updated threshold to < 3
calculatedLowStockAlerts++;
}
});

View file

@ -57,7 +57,7 @@ const Index = () => {
<StatCard
title="Low Stock Alerts"
value={lowStockAlerts}
description="Items with quantity < 10."
description="Items with quantity < 3."
icon={<AlertTriangle className="h-4 w-4 text-muted-foreground" />}
/>
<StatCard