fix(groups): save group options on task create

Also, correct count of assigned members when viewing user is among 
assignments
This commit is contained in:
Sabe Jones
2018-07-06 10:28:47 -05:00
parent 1c8b0f92df
commit 0f8e7416f8
2 changed files with 7 additions and 10 deletions

View File

@@ -892,6 +892,12 @@ export default {
async submit () {
if (this.newChecklistItem) this.addChecklistItem();
if (this.groupId) {
this.task.group.assignedUsers = this.assignedMembers;
this.task.requiresApproval = this.requiresApproval;
this.task.group.approval.required = this.requiresApproval;
}
if (this.purpose === 'create') {
if (this.challengeId) {
this.$store.dispatch('tasks:createChallengeTasks', {
@@ -912,20 +918,11 @@ export default {
});
});
Promise.all(promises);
this.task.group.assignedUsers = this.assignedMembers;
this.$emit('taskCreated', this.task);
} else {
this.createTask(this.task);
}
} else {
if (this.groupId) {
this.task.group.assignedUsers = this.assignedMembers;
this.task.requiresApproval = this.requiresApproval;
this.task.group.approval.required = this.requiresApproval;
}
this.saveTask(this.task);
this.$emit('taskEdited', this.task);
}