diff --git a/public/site/templates/projects.json.php b/public/site/templates/projects.json.php index c87efaa..fe80916 100644 --- a/public/site/templates/projects.json.php +++ b/public/site/templates/projects.json.php @@ -10,7 +10,8 @@ function getProjectData($project) { "logo" => $project->client()->toPage() ? $project->client()->toPage()->logo()->toFile()->url() : "", "steps" => $project->getSteps(), "notifications" => Yaml::decode($project->notifications()->value), - "uuid" => (string) $project->uuid() + "uuid" => (string) $project->uuid(), + "slug" => (string) $project->slug(), ]; } diff --git a/src/components/notifications/Comment.vue b/src/components/notifications/Comment.vue index 1b874f5..19193f0 100644 --- a/src/components/notifications/Comment.vue +++ b/src/components/notifications/Comment.vue @@ -2,7 +2,7 @@

@@ -47,4 +47,8 @@ const { formatDate } = useNotificationsStore(); const { getProjectByUuid } = useProjectsStore(); const project = getProjectByUuid(notification.location.project.uuid); +const targetUri = notification.location.dialoguri.replace( + /\/projects\/([a-z0-9\-]+)/, + "/projects/" + notification.target.slug +); diff --git a/src/stores/user.js b/src/stores/user.js index c503dd9..cee874d 100644 --- a/src/stores/user.js +++ b/src/stores/user.js @@ -14,9 +14,10 @@ export const useUserStore = defineStore("user", () => { const projectNotifications = project.notifications.map( (notification) => ({ ...notification, - project: { - id: project.id, - name: project.title, + target: { + uuid: project.uuid, + title: project.title, + slug: project.slug, }, isRead: notification.author.uuid === user.value.uuid ||