fix(teams): update single select style and correct create/edit issue

This commit is contained in:
Sabe Jones
2021-04-20 16:04:29 -05:00
committed by SabreCat
parent ae0528e5cd
commit a88f97831a
2 changed files with 61 additions and 30 deletions

View File

@@ -1491,25 +1491,20 @@ export default {
this.$emit('cancel');
},
async toggleAssignment (memberId) {
if (this.purpose !== 'create') {
if (this.assignedMember === null) {
await this.$store.dispatch('tasks:unassignTask', {
taskId: this.task._id,
userId: memberId,
});
} else {
if (this.purpose === 'edit') {
if (this.assignedMember && this.assignedMember !== memberId) {
await this.$store.dispatch('tasks:unassignTask', {
taskId: this.task._id,
userId: this.assignedMember,
});
}
if (memberId) {
await this.$store.dispatch('tasks:assignTask', {
taskId: this.task._id,
userId: memberId,
});
}
}
this.assignedMember = memberId;
},
focusInput () {