From 67ae00384f7e979221ed2c6634c2376eb0e582e6 Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Tue, 30 Jun 2026 17:23:43 +0700 Subject: [PATCH] refactor: streamline NotificationBell component markup for improved readability and maintainability --- resources/js/components/NotificationBell.vue | 52 ++++++-------------- 1 file changed, 16 insertions(+), 36 deletions(-) diff --git a/resources/js/components/NotificationBell.vue b/resources/js/components/NotificationBell.vue index 5fd339c..a38805c 100644 --- a/resources/js/components/NotificationBell.vue +++ b/resources/js/components/NotificationBell.vue @@ -79,6 +79,7 @@ function openNotification(notification: NotificationItem): void { if (!notification.is_read) { void markAsRead(notification); } + if (notification.url) { isOpen.value = false; router.visit(notification.url); @@ -180,11 +181,8 @@ onUnmounted(() => { @@ -199,8 +197,7 @@ onUnmounted(() => { @@ -210,8 +207,7 @@ onUnmounted(() => { @@ -222,36 +218,23 @@ onUnmounted(() => {
-
+
Tidak ada notifikasi
-
+ :class="{ 'bg-primary/5': !notification.is_read }"> -
+
-
+

{{ notification.title }}

-

+

{{ notification.body }}

@@ -261,14 +244,12 @@ onUnmounted(() => {

+ class="flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100"> @@ -278,8 +259,7 @@ onUnmounted(() => {