mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[Blockers] Added blockers in tasks view
This commit is contained in:
1 parent
04c42c2762
commit
6654c32da7
9 files changed
+260
-97
No files matched your search
@@ -43,7 +43,7 @@ export default {
|
||||
if (!workingHours[task.split])
|
||||
workingHours[task.split] = 0
|
||||
|
||||
if (task.nonWorking || task.subtask.is_finished)
|
||||
if (task.type == 'non-working-hours' || task.subtask?.is_finished || task.blocker?.is_finished)
|
||||
return
|
||||
|
||||
workingHours[task.split] += timelineUtils._getDifferenceInHours(task.end, task.start)
|
||||
@@ -88,9 +88,17 @@ export default {
|
||||
this.onFilterChanged(this.filter)
|
||||
})
|
||||
|
||||
this.$events.on('on-blocker-edited', () => {
|
||||
this.onFilterChanged(this.filter)
|
||||
})
|
||||
|
||||
this.$events.on('on-subtask-deleted', () => {
|
||||
this.onFilterChanged(this.filter)
|
||||
})
|
||||
|
||||
this.$events.on('on-blocker-deleted', () => {
|
||||
this.onFilterChanged(this.filter)
|
||||
})
|
||||
},
|
||||
|
||||
unmounted() {
|
||||
@@ -110,10 +118,10 @@ export default {
|
||||
const queryParameters = new URLSearchParams(urlQueryObject).toString()
|
||||
|
||||
try {
|
||||
const { subtasks } = await this.$axios.get_auth(`v1/subtasks?${queryParameters}`)
|
||||
this.config.scrollHour = this.filter?.employee.work_start - 1
|
||||
this.config.date = this.filter.start
|
||||
this.subtasks = subtasks
|
||||
const { subtasks, blockers } = await this.$axios.get_auth(`v1/subtasks?${queryParameters}`)
|
||||
this.config.scrollHour = this.filter?.employee.work_start - 1
|
||||
this.config.date = this.filter.start
|
||||
this.subtasks = [...subtasks, ...blockers.map(blocker => ({...blocker, type: 'blocker'}))]
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
this.$toast.error('Nepodarilo sa nacitat data!')
|
||||
|
||||
Reference in new issue
Block a user