Refactoring & Feature: edit/delete controls of tasks (#11357)

* 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
This commit is contained in:
Aleksey
2019-09-20 18:24:05 +03:00
committed by Matteo Pagliazzi
parent c6281b6f17
commit 70b6501135
7 changed files with 109 additions and 24 deletions

View File

@@ -57,7 +57,7 @@
:type="column",
:key="column",
:taskListOverride='tasksByType[column]',
:showOptions="showOptions",
:challenge="challenge"
@editTask="editTask",
@taskDestroyed="taskDestroyed",
v-if='tasksByType[column].length > 0')
@@ -252,9 +252,6 @@ export default {
canJoin () {
return !this.isMember;
},
showOptions () {
return this.isLeader;
},
},
mounted () {
if (!this.searchId) this.searchId = this.challengeId;