mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
feat(timeline): add scheduled time display and calculation across components. Fixed refresh for mastertask, after subtask was updated
This commit is contained in:
1 parent
6a550006d9
commit
4917993390
5 files changed
+43
-14
No files matched your search
@@ -248,22 +248,11 @@ export default {
|
||||
this.$events.emit('show-delete-team-member-modal', { member, team })
|
||||
},
|
||||
|
||||
async showModal({ mastertask, editMode = false }) {
|
||||
this.isSaving = false
|
||||
this.editMode = null
|
||||
this.visible = true
|
||||
this.mastertask = null
|
||||
this.$nextTick(() => {
|
||||
this.setFocusEvent()
|
||||
this.v$.$reset()
|
||||
})
|
||||
|
||||
async loadMastertask(id) {
|
||||
try {
|
||||
if (mastertask?.id) {
|
||||
this.mastertask = await this.$axios.get_auth_data(`v1/mastertasks/${mastertask.id}`)
|
||||
this.mastertask = await this.$axios.get_auth_data(`v1/mastertasks/${id}`)
|
||||
|
||||
// TODO zmazat ked zacne prichadzat project_id a team_id
|
||||
console.log('1', this.mastertask)
|
||||
const project = this.projects.find((project) => project.code == this.mastertask.project_code)
|
||||
this.mastertask.project_id = project?.id || null
|
||||
this.mastertask.team_id = this.mastertask.team?.id || null
|
||||
@@ -281,6 +270,24 @@ export default {
|
||||
return employee
|
||||
})
|
||||
.filter((employee) => employee !== null)
|
||||
} catch (error) {
|
||||
this.$toast.error(error.message || error)
|
||||
}
|
||||
},
|
||||
|
||||
async showModal({ mastertask, editMode = false }) {
|
||||
this.isSaving = false
|
||||
this.editMode = null
|
||||
this.visible = true
|
||||
this.mastertask = null
|
||||
this.$nextTick(() => {
|
||||
this.setFocusEvent()
|
||||
this.v$.$reset()
|
||||
})
|
||||
|
||||
try {
|
||||
if (mastertask?.id) {
|
||||
await this.loadMastertask(mastertask.id)
|
||||
|
||||
// this.mastertask.project_code = project.code
|
||||
} else {
|
||||
@@ -437,7 +444,15 @@ export default {
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
'$route.query': {
|
||||
handler(_, oldValue) {
|
||||
if (oldValue?.subtask?.length) {
|
||||
this.loadMastertask(this.mastertask.id);
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user