mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
Refactoring & Fix: editing group and challenges from user dashboard (#11418)
* Refactoring & Feature: edit/delete group and challenge tasks - Remove showOption from tasks props - Pass all needed data to task for understand in mapGetter function which controls we should show - Improve current solution with edit and delete logic * Fix: this in template * Fix & Test: extend tests, fix can Edit/Delete functions * Fix: allow user edit challenge tasks on dashboard * Fix: test case after code change * fix import path * Fix: - Extend canEdit and canDelete functions with admin role - Clarify canEdit and canDelete conditions - Extend test cases
This commit is contained in:
committed by
Matteo Pagliazzi
parent
a859dbd646
commit
eaad244181
@@ -75,7 +75,6 @@
|
||||
class="col-12 col-md-3"
|
||||
:type="column"
|
||||
:task-list-override="tasksByType[column]"
|
||||
:show-options="showOptions"
|
||||
:group="group"
|
||||
:search-text="searchText"
|
||||
@editTask="editTask"
|
||||
@@ -199,9 +198,6 @@ export default {
|
||||
return (this.group.leader && this.group.leader._id === this.user._id)
|
||||
|| (this.group.managers && Boolean(this.group.managers[this.user._id]));
|
||||
},
|
||||
showOptions () {
|
||||
return this.canCreateTasks;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
// call again the method if the route changes (when this route is already active)
|
||||
|
||||
Reference in New Issue
Block a user