mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 22:39:34 +00:00
Merge branch 'main' of bitbucket.org:studiotem/jandl-taskmanager-app
This commit is contained in:
commit
919b2eebbe
5 files changed
+13
-12
No files matched your search
@@ -86,6 +86,10 @@ export default {
|
||||
this.$events.on('show-task-add-time-modal', ({subtask}) => {
|
||||
this.$refs['z-task-add-time-modal'].showModal({ subtask })
|
||||
})
|
||||
|
||||
this.$events.on('on-subtask-edited', () => {
|
||||
this.$store.dispatch('tm/reloadSubtasks')
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
@@ -99,6 +99,15 @@ export default {
|
||||
]).then(() => commit('initialized'))
|
||||
},
|
||||
|
||||
reloadSubtasks({dispatch}: {dispatch: any}) {
|
||||
return Promise.all([
|
||||
dispatch('loadMastertasks'),
|
||||
dispatch('loadProjects'),
|
||||
dispatch('loadUnscheduledSubtasks'),
|
||||
dispatch('loadOngoingSubtasks')
|
||||
])
|
||||
},
|
||||
|
||||
loadMastertasks({commit}: {commit: any}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
axios.get_auth_data('v1/mastertasks')
|
||||
|
||||
@@ -123,12 +123,7 @@ export default {
|
||||
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${task.id}`, task)
|
||||
|
||||
this.closeModal()
|
||||
this.$store.commit('tm/update_subtask', subtask)
|
||||
this.$events.emit('on-subtask-edited', subtask)
|
||||
|
||||
this.$store.dispatch('tm/loadMastertasks')
|
||||
this.$store.dispatch('tm/loadUnscheduledSubtasks')
|
||||
this.$store.dispatch('tm/loadOngoingSubtasks')
|
||||
} catch (error) {
|
||||
this.$toast.error(error.message || error)
|
||||
}
|
||||
|
||||
@@ -126,10 +126,6 @@ export default {
|
||||
|
||||
this.closeModal()
|
||||
this.$events.emit('on-subtask-edited', subtask)
|
||||
|
||||
this.$store.dispatch('tm/loadMastertasks')
|
||||
this.$store.dispatch('tm/loadUnscheduledSubtasks')
|
||||
this.$store.dispatch('tm/loadOngoingSubtasks')
|
||||
} catch (error) {
|
||||
this.$toast.error(error.message || error)
|
||||
}
|
||||
|
||||
@@ -40,9 +40,6 @@ export default {
|
||||
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${tempSubtask.id}`, tempSubtask)
|
||||
|
||||
this.visible = false
|
||||
this.$store.dispatch('tm/loadMastertasks')
|
||||
this.$store.dispatch('tm/loadUnscheduledSubtasks')
|
||||
this.$store.dispatch('tm/loadOngoingSubtasks')
|
||||
this.$emit('on-subtask-edited', subtask)
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
|
||||
Reference in new issue
Block a user