feat: dynamic glow on next-week button until first order (v1.4.21)

This commit is contained in:
Kantine Wrapper
2026-02-25 14:59:59 +01:00
parent ff48befb8a
commit 122c1078cf
3 changed files with 14 additions and 6 deletions

View File

@@ -1,3 +1,6 @@
## v1.4.21
-**UX**: Der Glow-Effekt des „Nächste Woche"-Buttons bleibt nun aktiv, solange Menüdaten vorhanden aber noch keine Bestellungen getätigt wurden. Verschwindet automatisch nach der ersten Bestellung.
## v1.4.20 ## v1.4.20
- 🐛 **Bugfix**: Der Badge-Counter im „Nächste Woche"-Tab wird jetzt sofort nach einer Bestellung oder Stornierung aktualisiert. - 🐛 **Bugfix**: Der Badge-Counter im „Nächste Woche"-Tab wird jetzt sofort nach einer Bestellung oder Stornierung aktualisiert.

View File

@@ -1647,12 +1647,17 @@
badge.classList.add('has-highlights'); badge.classList.add('has-highlights');
} }
// FR-092: Highlight Next Week Button when new data arrives // FR-092: Glow Next Week button while data exists but no orders placed
const storageKey = `kantine_notified_nextweek_${nextYear}_${nextWeek}`; if (daysWithOrders === 0) {
if (!localStorage.getItem(storageKey)) {
localStorage.setItem(storageKey, 'true');
btnNextWeek.classList.add('new-week-available'); btnNextWeek.classList.add('new-week-available');
showToast('Neue Menüdaten für nächste Woche verfügbar!', 'info'); // One-time toast notification when new data first arrives
const storageKey = `kantine_notified_nextweek_${nextYear}_${nextWeek}`;
if (!localStorage.getItem(storageKey)) {
localStorage.setItem(storageKey, 'true');
showToast('Neue Menüdaten für nächste Woche verfügbar!', 'info');
}
} else {
btnNextWeek.classList.remove('new-week-available');
} }
} else if (badge) { } else if (badge) {

View File

@@ -1 +1 @@
v1.4.20 v1.4.21