feat: dynamic glow on next-week button until first order (v1.4.21)
This commit is contained in:
@@ -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.
|
||||||
|
|
||||||
|
|||||||
15
kantine.js
15
kantine.js
@@ -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) {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
v1.4.20
|
v1.4.21
|
||||||
|
|||||||
Reference in New Issue
Block a user