read comment notification working
This commit is contained in:
parent
9222069ef5
commit
246d21f85a
17 changed files with 86 additions and 111 deletions
|
|
@ -115,15 +115,15 @@ import { useProjectStore } from "../stores/project";
|
|||
|
||||
const route = useRoute();
|
||||
const isExpanded = ref(true);
|
||||
const { user } = storeToRefs(useUserStore());
|
||||
const { user, notifications } = storeToRefs(useUserStore());
|
||||
const { currentProjects, archivedProjects } = storeToRefs(useProjectsStore());
|
||||
const { isEmptyBrief } = useProjectStore();
|
||||
const { page } = storeToRefs(usePageStore());
|
||||
|
||||
const unreadNotificationsCount = computed(() => {
|
||||
if (!user.value) return undefined;
|
||||
const count = user.value.notifications.filter(
|
||||
(notification) => notification.isread != "true"
|
||||
const count = notifications.value.filter(
|
||||
(notification) => !notification.isRead
|
||||
).length;
|
||||
if (count === 0) return undefined;
|
||||
return count;
|
||||
|
|
@ -168,7 +168,7 @@ function isCurrent(navItem) {
|
|||
|
||||
function hasUnreadNotification(project) {
|
||||
if (!user.value) return false;
|
||||
return user.value.notifications.some((notification) => {
|
||||
return notifications.value.some((notification) => {
|
||||
return (
|
||||
notification.isread != "true" &&
|
||||
project.uri.includes(notification.location.project.uri)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue