[subTask] v-select employee, [refactor], [masterTaskDetail] formattedDates

This commit is contained in:
romankko2 committed 2023-01-20 11:19:58 +01:00
1 parent e941534b5e
commit 0a842dcb32
41 files changed
+558 -965

No files matched your search

+13 -10
View File
@@ -116,28 +116,31 @@ export default {
this.close()
} catch (error) {
console.log(error)
this.$toast(error)
}
},
async create(team = null) {
if (team) {
this.team = team
async create(id = null) {
this.visible = true
this.team = null
if (id) {
await this._load()
} else {
this.team = {
const team = {
name: '',
employees: []
}
}
this.visible = true
setTimeout(() => {
this.team = team
})
}
},
close() {
this.visible = false
this.$emit('close', this.team)
this.team = null
},
async _create() {
@@ -156,9 +159,9 @@ export default {
}
},
async _load() {
async _load(id) {
try {
const team = await this.$axios.get_auth_data(`v1/teams/${this.team.id}`)
const team = await this.$axios.get_auth_data(`v1/teams/${id}`)
team.employees = this._enrichEmployeesByFullName(team.employees)
this.team = team