Müll-Erinnerung erst 3 Tage vorher statt 7 Tage anzeigen

This commit is contained in:
Giuseppe Lombardo 2026-08-13 13:36:59 +00:00
parent 778cb94b3a
commit a35fa1ddda

View File

@ -3258,6 +3258,8 @@
const today = stripTime(new Date());
const weekAhead = new Date(today);
weekAhead.setDate(weekAhead.getDate() + 7);
const trashAhead = new Date(today);
trashAhead.setDate(trashAhead.getDate() + 3);
if (lastCockpitData && lastCockpitData.myRent && lastCockpitData.myRent.status !== 'GREEN') {
items.push({
@ -3281,7 +3283,7 @@
try {
const from = today.toISOString().slice(0, 10);
const to = weekAhead.toISOString().slice(0, 10);
const to = trashAhead.toISOString().slice(0, 10);
const data = await apiFetch(`/trash-schedule?from=${from}&to=${to}`);
data.entries.filter(e => !e.completedAt).forEach(e => {
items.push({