Filter dailies by due/not due in group plan and challenge page (#10582)

* sort by isDue works but only on refresh

* update isDue for new tasks

* apply correct filter to challenge page
This commit is contained in:
Isabelle Lavandero
2018-08-17 05:58:43 -04:00
committed by Matteo Pagliazzi
parent b977d42402
commit cce9b33844
2 changed files with 8 additions and 5 deletions

View File

@@ -923,17 +923,18 @@ export default {
if (this.purpose === 'create') {
if (this.challengeId) {
this.$store.dispatch('tasks:createChallengeTasks', {
const response = await this.$store.dispatch('tasks:createChallengeTasks', {
challengeId: this.challengeId,
tasks: [this.task],
});
Object.assign(this.task, response);
this.$emit('taskCreated', this.task);
} else if (this.groupId) {
await this.$store.dispatch('tasks:createGroupTasks', {
const response = await this.$store.dispatch('tasks:createGroupTasks', {
groupId: this.groupId,
tasks: [this.task],
});
Object.assign(this.task, response);
let promises = this.assignedMembers.map(memberId => {
return this.$store.dispatch('tasks:assignTask', {
taskId: this.task._id,