"Reset daily report counts to 0 when no departments are selected"

- Added logic to set all daily report count values (transactions, products sold, earnings, washes, water usage) to 0 when no department is selected.
This commit is contained in:
Jeppe Bundgaard
2025-10-06 16:29:56 +02:00
parent 75d27137a8
commit 79b721e79c
@@ -64,6 +64,12 @@ const updateCountTransactions = async () => {
: (parseInt(selected_department_id.value) > 0 ? [parseInt(selected_department_id.value)] : []);
if (ids.length === 0) {
// If no departments are selected, set the count to 0
count_transactions.value = 0;
count_products_sold.value = 0;
count_earnings.value = 0;
count_washes.value = 0;
count_water_usage.value = 0;
return;
}