mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
fix(teams): allow ticking team checklists
This commit is contained in:
@@ -209,7 +209,7 @@
|
||||
v-if="!task.collapseChecklist"
|
||||
:key="item.id"
|
||||
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 -->
|
||||
<input
|
||||
@@ -218,7 +218,7 @@
|
||||
tabindex="0"
|
||||
type="checkbox"
|
||||
:checked="item.completed"
|
||||
:disabled="castingSpell || !isUser"
|
||||
:disabled="castingSpell || showTaskLockIcon"
|
||||
@change="toggleChecklistItem(item)"
|
||||
@keypress.enter="toggleChecklistItem(item)"
|
||||
>
|
||||
|
||||
@@ -966,9 +966,9 @@ api.scoreCheckListItem = {
|
||||
if (validationErrors) throw validationErrors;
|
||||
|
||||
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'));
|
||||
|
||||
const item = _.find(task.checklist, { id: req.params.itemId });
|
||||
|
||||
Reference in New Issue
Block a user