From 134ddf80807501a8035e907a2b02dfa7c5f5dcc9 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 18 Dec 2024 11:59:54 +0100 Subject: [PATCH 1/2] Client - mark notification as read on click --- .../src/components/Comment/Comment.vue | 1 + .../src/components/Comment/CommentForUser.vue | 1 + .../src/components/Common/StaticMap.vue | 1 + .../Notifications/NotificationDetail.vue | 10 +++++++ .../Notifications/RelationshipDetail.vue | 7 +++-- .../Notifications/ReportNotification.vue | 12 +++++++- .../src/components/Workout/WorkoutCard.vue | 29 +++++++++++++------ .../src/components/Workout/WorkoutForUser.vue | 1 + 8 files changed, 50 insertions(+), 12 deletions(-) diff --git a/fittrackee_client/src/components/Comment/Comment.vue b/fittrackee_client/src/components/Comment/Comment.vue index ab29a3eda..dcf8c7492 100644 --- a/fittrackee_client/src/components/Comment/Comment.vue +++ b/fittrackee_client/src/components/Comment/Comment.vue @@ -17,6 +17,7 @@ displayOptions.dateFormat ) " + @click="$emit('commentLinkClicked')" > {{ formatDistance(new Date(comment.created_at), new Date(), { diff --git a/fittrackee_client/src/components/Comment/CommentForUser.vue b/fittrackee_client/src/components/Comment/CommentForUser.vue index 0775fbd25..a9d3848c1 100644 --- a/fittrackee_client/src/components/Comment/CommentForUser.vue +++ b/fittrackee_client/src/components/Comment/CommentForUser.vue @@ -11,6 +11,7 @@ comments-loading="null" :for-notification="true" :action="action" + @commentLinkClicked="$emit('commentLinkClicked')" /> diff --git a/fittrackee_client/src/components/Common/StaticMap.vue b/fittrackee_client/src/components/Common/StaticMap.vue index b761bcd8f..48971beef 100644 --- a/fittrackee_client/src/components/Common/StaticMap.vue +++ b/fittrackee_client/src/components/Common/StaticMap.vue @@ -16,6 +16,7 @@ backgroundImage: `url(${imageUrl})`, }" :aria-label="$t('workouts.WORKOUT_MAP')" + @click="$emit('workoutLinkClicked')" />