WIP(teams): display assigned tasks on user's personal board

This commit is contained in:
SabreCat
2022-06-13 16:53:29 -05:00
parent 9fec111c4d
commit a0177fa44d
12 changed files with 106 additions and 136 deletions

View File

@@ -355,10 +355,10 @@ api.taskNeedsWork = {
if (['daily', 'todo'].indexOf(task.type) === -1) {
throw new BadRequest('Cannot roll back use of Habits or Rewards.');
}
if (!task.group.assignedUsers || !task.group.assignedUsers[assignedUserId]) {
if (!task.group.assignedUsersDetail || !task.group.assignedUsersDetail[assignedUserId]) {
throw new BadRequest('User not assigned to this task.');
}
if (!task.group.assignedUsers[assignedUserId].completed) {
if (!task.group.assignedUsersDetail[assignedUserId].completed) {
throw new BadRequest('Task not completed by this user.');
}