From f3f86261f4f6fa4c5094849eff181e2cdb538e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Glasn=C3=A1k?= Date: Tue, 21 Mar 2023 20:43:03 +0100 Subject: [PATCH] [Blockers] Added blockers in tasks view --- app/src/plugins/tm@dashboard/teams/teams.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/plugins/tm@dashboard/teams/teams.vue b/app/src/plugins/tm@dashboard/teams/teams.vue index fcb0811..1066695 100644 --- a/app/src/plugins/tm@dashboard/teams/teams.vue +++ b/app/src/plugins/tm@dashboard/teams/teams.vue @@ -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!') }