fix(teams): allow ticking team checklists

This commit is contained in:
Sabe Jones
2021-08-13 16:46:44 -05:00
committed by SabreCat
parent 029e41472f
commit 63e0875f32
2 changed files with 4 additions and 4 deletions

View File

@@ -209,7 +209,7 @@
v-if="!task.collapseChecklist" v-if="!task.collapseChecklist"
:key="item.id" :key="item.id"
class="custom-control custom-checkbox checklist-item" class="custom-control custom-checkbox checklist-item"
:class="{'checklist-item-done': item.completed, 'cursor-auto': !isUser}" :class="{'checklist-item-done': item.completed, 'cursor-auto': showTaskLockIcon}"
> >
<!-- eslint-enable vue/no-use-v-if-with-v-for --> <!-- eslint-enable vue/no-use-v-if-with-v-for -->
<input <input
@@ -218,7 +218,7 @@
tabindex="0" tabindex="0"
type="checkbox" type="checkbox"
:checked="item.completed" :checked="item.completed"
:disabled="castingSpell || !isUser" :disabled="castingSpell || showTaskLockIcon"
@change="toggleChecklistItem(item)" @change="toggleChecklistItem(item)"
@keypress.enter="toggleChecklistItem(item)" @keypress.enter="toggleChecklistItem(item)"
> >

View File

@@ -966,9 +966,9 @@ api.scoreCheckListItem = {
if (validationErrors) throw validationErrors; if (validationErrors) throw validationErrors;
const { taskId } = req.params; const { taskId } = req.params;
const task = await Tasks.Task.findByIdOrAlias(taskId, user._id, { userId: user._id }); const task = await Tasks.Task.findById(taskId);
if (!task) throw new NotFound(res.t('messageTaskNotFound')); if (!task || (!task.id && !task.group.id)) throw new NotFound(res.t('taskNotFound'));
if (task.type !== 'daily' && task.type !== 'todo') throw new BadRequest(res.t('checklistOnlyDailyTodo')); if (task.type !== 'daily' && task.type !== 'todo') throw new BadRequest(res.t('checklistOnlyDailyTodo'));
const item = _.find(task.checklist, { id: req.params.itemId }); const item = _.find(task.checklist, { id: req.params.itemId });