amount card hide when empty data

This commit is contained in:
Adrian Zürcher
2026-02-12 16:25:44 +01:00
parent d2d7c83684
commit 35fcd31a20

View File

@@ -165,6 +165,8 @@ function loadSettings() {
} }
} }
function applyDateChoice() { function applyDateChoice() {
amounts.value = [];
loading.value = true; loading.value = true;
dropdownRef.value.hide(); dropdownRef.value.hide();
@@ -213,6 +215,7 @@ function applyDateChoice() {
'Sunday', 'Sunday',
'total', 'total',
]; ];
amounts.value = days amounts.value = days
.filter((day) => data.data[day]) // Only include days that exist in the response .filter((day) => data.data[day]) // Only include days that exist in the response
.map((day) => ({ .map((day) => ({