@finema/finework-layer 0.2.76 → 0.2.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.77](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.76...0.2.77) (2025-12-04)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* implement notification display component and related management composables and types. ([80f14a6](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/80f14a683bc508f1b40fadf8151a1e5dfa3aabe4))
|
|
8
|
+
* introduce Notifications slideover component for displaying and managing user notifications. ([cf79e03](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/cf79e03385ba2ff30df53998ca81344452a63cdd))
|
|
9
|
+
|
|
3
10
|
## [0.2.76](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.75...0.2.76) (2025-12-04)
|
|
4
11
|
|
|
5
12
|
### Features
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
}"
|
|
9
9
|
:modal="false"
|
|
10
10
|
title="Notifications"
|
|
11
|
+
@update:open="onOpenTrigger"
|
|
11
12
|
>
|
|
12
13
|
<Chip
|
|
13
14
|
inset
|
|
14
15
|
color="success"
|
|
15
16
|
:show="Number(unreadCount.data?.count) > 0"
|
|
16
|
-
@click="markAllRead.run()"
|
|
17
17
|
>
|
|
18
18
|
<Icon
|
|
19
19
|
name="ph:bell"
|
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
|
|
72
72
|
<p
|
|
73
73
|
class="text-sm text-neutral-500"
|
|
74
|
-
:title="item
|
|
74
|
+
:title="getMessage(item)"
|
|
75
75
|
>
|
|
76
|
-
{{ item
|
|
76
|
+
{{ getMessage(item) }}
|
|
77
77
|
</p>
|
|
78
78
|
</div>
|
|
79
79
|
</NuxtLink>
|
|
@@ -94,9 +94,9 @@ defineProps<{
|
|
|
94
94
|
const notification = useNotificationLoader()
|
|
95
95
|
const unreadCount = useNotificationUnreadCount()
|
|
96
96
|
const markAllRead = useNotificationMarkAllRead()
|
|
97
|
+
const route = useRoute()
|
|
97
98
|
|
|
98
99
|
onMounted(() => {
|
|
99
|
-
notification.fetchPage()
|
|
100
100
|
unreadCount.run()
|
|
101
101
|
})
|
|
102
102
|
|
|
@@ -141,7 +141,22 @@ const getNotificationColor = (item: INotificationItem): string => {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
+
const getMessage = (item: INotificationItem): string => {
|
|
145
|
+
return item.message
|
|
146
|
+
}
|
|
147
|
+
|
|
144
148
|
useWatchTrue(() => markAllRead.status.value.isSuccess, () => {
|
|
145
149
|
unreadCount.run()
|
|
146
150
|
})
|
|
151
|
+
|
|
152
|
+
useWatchChange(() => route.path, () => {
|
|
153
|
+
unreadCount.run()
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
const onOpenTrigger = (isOpen: boolean) => {
|
|
157
|
+
if (isOpen) {
|
|
158
|
+
markAllRead.run()
|
|
159
|
+
notification.fetchPage()
|
|
160
|
+
}
|
|
161
|
+
}
|
|
147
162
|
</script>
|
|
@@ -12,6 +12,17 @@ export const NotificationType = {
|
|
|
12
12
|
SYSTEM: 'SYSTEM',
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
export const NotificationPMOActionType = {
|
|
16
|
+
PROJECT_CREATE: 'PROJECT_CREATE',
|
|
17
|
+
PROJECT_STATUS_CHANGED: 'PROJECT_STATUS_CHANGED',
|
|
18
|
+
PROJECT_OWNER_CHANGED: 'PROJECT_OWNER_CHANGED',
|
|
19
|
+
PROJECT_UPDATE: 'PROJECT_UPDATE',
|
|
20
|
+
|
|
21
|
+
COLLABORATOR_ADD: 'COLLABORATOR_ADD',
|
|
22
|
+
COLLABORATOR_UPDATE: 'COLLABORATOR_UPDATE',
|
|
23
|
+
COLLABORATOR_REMOVE: 'COLLABORATOR_REMOVE',
|
|
24
|
+
}
|
|
25
|
+
|
|
15
26
|
export interface INotificationItem {
|
|
16
27
|
id: string
|
|
17
28
|
created_at: string
|
|
@@ -24,6 +35,7 @@ export interface INotificationItem {
|
|
|
24
35
|
source_type?: 'PMO_PROJECT' | string
|
|
25
36
|
source_id?: string
|
|
26
37
|
actor_id?: string
|
|
38
|
+
action_type?: typeof NotificationPMOActionType[keyof typeof NotificationPMOActionType] & string
|
|
27
39
|
is_read: boolean
|
|
28
40
|
read_at: string
|
|
29
41
|
channels: string[]
|