From 79b721e79c83617f01526a6d896154af3ec403ea Mon Sep 17 00:00:00 2001 From: Jeppe Bundgaard Date: Mon, 6 Oct 2025 16:29:56 +0200 Subject: [PATCH] "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. --- .../modules/daily-report/DepartmentDailyReportObject.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/views/dashboards/departmentDashboard/modules/daily-report/DepartmentDailyReportObject.vue b/src/views/dashboards/departmentDashboard/modules/daily-report/DepartmentDailyReportObject.vue index 4ed039ac..7f473d31 100644 --- a/src/views/dashboards/departmentDashboard/modules/daily-report/DepartmentDailyReportObject.vue +++ b/src/views/dashboards/departmentDashboard/modules/daily-report/DepartmentDailyReportObject.vue @@ -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; }