feat: Media-Requests im Dashboard mit Neu/Gesehen-Unterscheidung statt nur Favoriten-Zaehler
This commit is contained in:
@@ -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));
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user