From 6c646e64bb148dde61b5d3ad309a0c9adcd9daa7 Mon Sep 17 00:00:00 2001 From: benji-bitfly Date: Fri, 25 Oct 2024 14:59:07 +0200 Subject: [PATCH] refactore(NotificationsOverview): add `reset hours` for `email limit` Show remaining hours until the account's email limit resets for the user See: BEDS-870 --- frontend/components/notifications/NotificationsOverview.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/components/notifications/NotificationsOverview.vue b/frontend/components/notifications/NotificationsOverview.vue index b30b8161f..a9b30838c 100644 --- a/frontend/components/notifications/NotificationsOverview.vue +++ b/frontend/components/notifications/NotificationsOverview.vue @@ -27,8 +27,7 @@ const notificationsTotal = computed(() => { const { user } = useUserStore() const mailLimit = computed(() => user.value?.premium_perks.email_notifications_per_day ?? 0) -// TODO: replace with actual hours value when we get the endpoint. -const resetHours = ref(12) +const resetHours = computed(() => overview.value?.next_email_count_reset_timestamp ?? 0) const tooltipEmail = computed(() => { return $t('notifications.overview.email_tooltip', { hours: resetHours.value,