fix(teams): take user to relevant group from task assignment click

This commit is contained in:
SabreCat 2022-05-13 14:26:14 -05:00
parent ca1dbd2fc4
commit bf9a7ea7d9
2 changed files with 9 additions and 1 deletions

View file

@ -23,7 +23,14 @@ export default {
props: ['notification', 'canRemove'],
methods: {
action () {
this.$router.push({ name: 'tasks' });
if (this.notification.data.groupId) {
this.$router.push({
name: 'groupPlanDetailTaskInformation',
params: { groupId: this.notification.data.groupId },
});
} else {
this.$router.push({ name: 'tasks' });
}
},
},
};

View file

@ -236,6 +236,7 @@ api.assignTask = {
if (user._id !== userToAssign._id) {
userToAssign.addNotification('GROUP_TASK_ASSIGNED', {
message: res.t('youHaveBeenAssignedTask', { managerName: userName, taskText }),
groupId: group._id,
taskId: task._id,
});
}