feat: Media-Requests im Dashboard mit Neu/Gesehen-Unterscheidung statt nur Favoriten-Zaehler

This commit is contained in:
2026-07-15 01:19:16 +02:00
parent 747111fef4
commit 7e6ea9b010
4 changed files with 31 additions and 8 deletions

View File

@@ -768,7 +768,15 @@ function FavoritenKalender({ onOpenModal }) {
api('/tools/media/favorites/all').catch(() => null),
]).then(([mine, all]) => {
setFavs(mine);
if (all) { setAllFavs(all); setIsAdmin(true); }
if (all) {
setAllFavs(all);
setIsAdmin(true);
// Admin hat die offenen Requests jetzt gesehen — nimmt ihnen das
// "neu"-Label im Dashboard, bis sie tatsächlich quittiert werden
api('/tools/media/favorites/mark-seen', { method:'POST', body:{} })
.then(() => window.dispatchEvent(new CustomEvent('favorites-seen')))
.catch(() => {});
}
}).catch(e => setError(e.message)).finally(() => setLoading(false));
}, []);