diff --git a/src/components/tasks/partials/editAssignees.vue b/src/components/tasks/partials/editAssignees.vue
index d2182597..57473fc8 100644
--- a/src/components/tasks/partials/editAssignees.vue
+++ b/src/components/tasks/partials/editAssignees.vue
@@ -65,13 +65,12 @@ export default {
type: Number,
required: true,
},
- initialAssignees: {
- type: Array,
- default: () => [],
- },
disabled: {
default: false,
},
+ value: {
+ type: Array,
+ },
},
data() {
return {
@@ -83,19 +82,22 @@ export default {
}
},
created() {
- this.assignees = this.initialAssignees
+ this.assignees = this.value
this.listUserService = new ListUserService()
this.newAssignee = new UserModel()
this.taskAssigneeService = new TaskAssigneeService()
},
watch: {
- initialAssignees(newVal) {
+ value(newVal) {
this.assignees = newVal
},
},
methods: {
addAssignee(user) {
this.$store.dispatch('tasks/addAssignee', {user: user, taskId: this.taskId})
+ .then(() => {
+ this.$emit('input', this.assignees)
+ })
.catch(e => {
this.error(e, this)
})
diff --git a/src/views/tasks/TaskDetailView.vue b/src/views/tasks/TaskDetailView.vue
index 765f9f46..59c12aea 100644
--- a/src/views/tasks/TaskDetailView.vue
+++ b/src/views/tasks/TaskDetailView.vue
@@ -32,10 +32,10 @@