Skip to content

Commit

Permalink
[SDESK-4714] Always open preview when clicking in-app Assignment noti…
Browse files Browse the repository at this point in the history
…fication
  • Loading branch information
MarkLark86 committed Nov 4, 2019
1 parent 052badc commit d6ece66
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion client/services/PlanningStoreService.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,17 @@ export class PlanningStoreService {
onNotificationClick(event, data) {
// If the notification has an assignment related to it, open that item
if (get(data, 'notification.data.assignment_id')) {
this.$location.path('/workspace/assignments').search('assignment', data.notification.data.assignment_id);
if (this.$location.path().startsWith('/workspace/assignments') && !isNil(this.store)) {
this.store.dispatch(
actions.assignments.ui.preview(
{_id: data.notification.data.assignment_id}
)
);
} else {
this.$location
.path('/workspace/assignments')
.search('assignment', data.notification.data.assignment_id);
}
}
}

Expand Down

0 comments on commit d6ece66

Please sign in to comment.