1
0

fix: directly set arrays, objects and delete directly

Not needed since vue3 uses proxies
This commit is contained in:
Dominik Pschenitschni
2021-08-19 21:35:38 +02:00
parent 2b20f328cb
commit db49b9b532
33 changed files with 104 additions and 113 deletions

View File

@ -232,7 +232,7 @@ export default {
this.teamService
.get(this.team)
.then((response) => {
this.$set(this, 'team', response)
this.team = response
this.title = this.$t('team.edit.title', {team: this.team.name})
this.setTitle(this.title)
})
@ -305,7 +305,7 @@ export default {
.then((r) => {
for (const tm in this.team.members) {
if (this.team.members[tm].id === member.id) {
this.$set(this.team.members[tm], 'admin', r.admin)
this.team.members[tm].admin = r.admin
break
}
}
@ -321,21 +321,21 @@ export default {
},
findUser(query) {
if (query === '') {
this.$set(this, 'foundUsers', [])
this.clearAll()
return
}
this.userService
.getAll({}, {s: query})
.then((response) => {
this.$set(this, 'foundUsers', response)
this.foundUsers = response
})
.catch((e) => {
this.$message.error(e)
})
},
clearAll() {
this.$set(this, 'foundUsers', [])
this.foundUsers = []
},
},
}

View File

@ -46,7 +46,7 @@ export default {
loadTeams() {
this.teamService.getAll()
.then(response => {
this.$set(this, 'teams', response)
this.teams = response
})
.catch(e => {
this.$message.error(e)