tasks and teams overview subheader refactor

This commit is contained in:
Filip Kaluža committed 2023-01-12 18:22:48 +01:00
1 parent c542ea7760
commit a05d69eedc
4 files changed
+68 -32

No files matched your search

+5 -5
View File
@@ -1,6 +1,6 @@
<template>
<div>
<A-team-filter :unscheduledTime="unscheduledTime" @dayChanged="getDayData" />
<A-team-filter :unscheduledTime="unscheduledTime" @dataChanged="getTimelineData" />
<W-loadable :content="timelineData" class="w-loadable" empty-message="Nepodarilo sa nacitat data!">
<Z-timeline :calData="timelineData" :calConfig="config" :splits="splitDays" @eventMoved="onEventMoved" @completeTask="completeTask" @deleteTask="deleteTask" />
@@ -37,13 +37,13 @@ export default {
},
methods: {
async getDayData(date) {
this.config.date = date
async getTimelineData(data) {
this.config.date = data.date
try {
this.timelineData = await this.$axios.get_auth_data('v1/overview/teams')
this.timelineData = await this.$axios.get_auth_data('v1/overview/teams', {date: data.date, team: data.teamId})
this.generateEmployees()
this.formatTimelineDataToTimelineFormat()
this.generateNonWorkingHours(date)
this.generateNonWorkingHours(data.date)
} catch(error) {
this.timelineData = {error: error || 'Nepodarilo sa nacitat data!'}
console.error(error)