Group plan fixes (#9437)

* Prevented title editing on personal page

* Fixed claim/unlclaim from user task page

* Removed task from local on delete

* Immediately show unassigned bar

* Add move to group tasks

* Fixed group member count increase

* Added upgrade when group plan is canceled
This commit is contained in:
Keith Holliday
2017-11-14 16:54:11 -07:00
committed by GitHub
parent bddafd4392
commit eaa91b2a09
7 changed files with 68 additions and 20 deletions

View File

@@ -70,6 +70,7 @@
:groupId="groupId",
v-on:taskCreated='taskCreated',
v-on:taskEdited='taskEdited',
v-on:taskDestroyed='taskDestroyed'
)
.row
task-column.col-12.col-sm-6.col-3(
@@ -380,6 +381,7 @@ export default {
});
},
taskCreated (task) {
task.group.id = this.group._id;
this.tasksByType[task.type].push(task);
},
taskEdited (task) {
@@ -388,6 +390,12 @@ export default {
});
this.tasksByType[task.type].splice(index, 1, task);
},
taskDestroyed (task) {
let index = findIndex(this.tasksByType[task.type], (taskItem) => {
return taskItem._id === task._id;
});
this.tasksByType[task.type].splice(index, 1);
},
cancelTaskModal () {
this.editingTask = null;
this.creatingTask = null;