WIP(teams): show open tasks on user view

This commit is contained in:
SabreCat
2022-06-16 13:25:09 -05:00
parent 4ac1a3e717
commit 8b084e627e
5 changed files with 66 additions and 24 deletions

View File

@@ -294,7 +294,7 @@ export default function scoreTask (options = {}, req = {}, analytics) {
if (direction === 'up') {
if (task.group.id) {
if (!task.group.assignedUsers) {
if (!task.group.assignedUsers || task.group.assignedUsers.length === 0) {
task.group.completedBy = {
userId: user._id,
date: new Date(),
@@ -365,7 +365,7 @@ export default function scoreTask (options = {}, req = {}, analytics) {
} else {
if (direction === 'up') {
if (task.group.id) {
if (!task.group.assignedUsers) {
if (!task.group.assignedUsers || task.group.assignedUsers.length === 0) {
task.group.completedBy = {
userId: user._id,
date: new Date(),