[Blockers] Added blockers in tasks view

This commit is contained in:
Matej Glasnák committed 2023-03-21 20:43:03 +01:00
1 parent 6654c32da7
commit f3f86261f4
1 file changed
+5 -3
+5 -3
View File
@@ -85,9 +85,11 @@ export default {
_generateTasks() {
const tasks = []
const calendarDate = moment(this.filter.start).format('DD-MM-YYYY')
// const diffInDays = differenceInCalendarDays(date, new Date(timeblock.start))
this.subtasks.forEach(subtask => {
// TODO Implement blockers
if (subtask.type == 'blocker') return
let split = null
let employee = null
@@ -169,8 +171,8 @@ export default {
const queryParameters = new URLSearchParams(urlQueryObject).toString()
try {
const { subtasks } = await this.$axios.get_auth(`v1/subtasks?${queryParameters}`)
this.subtasks = subtasks
const { subtasks, blockers } = await this.$axios.get_auth(`v1/subtasks?${queryParameters}`)
this.subtasks = [...subtasks, ...blockers.map(blocker => ({...blocker, type: 'blocker'}))]
} catch (error) {
this.$toast.error('Nepodarilo sa nacitat data!')
}