fix(tasks): more lock icon revision, no error on manager uncheck

This commit is contained in:
Sabe Jones
2021-05-19 16:25:51 -05:00
committed by SabreCat
parent 99bf6349e1
commit 221dd7a81e
2 changed files with 17 additions and 19 deletions

View File

@@ -1046,17 +1046,17 @@ export default {
showTaskLockIcon () {
if (this.isUser) return false;
if (this.isGroupTask) {
if (this.isOpenTask) {
if (!this.task.completed) return false;
if (this.task.completed) {
if (this.task.group.completedBy === this.user._id) return false;
if (this.teamManagerAccess) return false;
return true;
}
if (this.isOpenTask) return false;
if (this.task.group.assignedUsers.indexOf(this.user._id) !== -1) return false;
if (
this.task.group.assignedUsers.length > 0
&& this.task.group.assignedUsers.indexOf(this.user._id) === -1
) return true;
if (this.teamManagerAccess) return false;
}
return true;
},