Müll-Erinnerung erst 3 Tage vorher statt 7 Tage anzeigen
This commit is contained in:
parent
778cb94b3a
commit
a35fa1ddda
@ -3258,6 +3258,8 @@
|
|||||||
const today = stripTime(new Date());
|
const today = stripTime(new Date());
|
||||||
const weekAhead = new Date(today);
|
const weekAhead = new Date(today);
|
||||||
weekAhead.setDate(weekAhead.getDate() + 7);
|
weekAhead.setDate(weekAhead.getDate() + 7);
|
||||||
|
const trashAhead = new Date(today);
|
||||||
|
trashAhead.setDate(trashAhead.getDate() + 3);
|
||||||
|
|
||||||
if (lastCockpitData && lastCockpitData.myRent && lastCockpitData.myRent.status !== 'GREEN') {
|
if (lastCockpitData && lastCockpitData.myRent && lastCockpitData.myRent.status !== 'GREEN') {
|
||||||
items.push({
|
items.push({
|
||||||
@ -3281,7 +3283,7 @@
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const from = today.toISOString().slice(0, 10);
|
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}`);
|
const data = await apiFetch(`/trash-schedule?from=${from}&to=${to}`);
|
||||||
data.entries.filter(e => !e.completedAt).forEach(e => {
|
data.entries.filter(e => !e.completedAt).forEach(e => {
|
||||||
items.push({
|
items.push({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user