diff --git a/app/src/plugins/tm@dashboard/projects/projects.vue b/app/src/plugins/tm@dashboard/projects/projects.vue index a0fd745..91ee69d 100644 --- a/app/src/plugins/tm@dashboard/projects/projects.vue +++ b/app/src/plugins/tm@dashboard/projects/projects.vue @@ -30,27 +30,30 @@ export default { filteredEvents: [] } }, - async created() { - try { - const events = await this.$axios.get_auth_data('v1/overview/projects') - this.events = events.map((item) => ({ - id: item.id, - title: `${item.project_code} - ${item.name}`, - title_html: `${item.project_code} - ${item.name}`, - start: item.starts_at, - end: item.deadline, - is_finished: item.is_finished, - project_code: item.project_code, - backgroundColor: item.color, - borderColor: item.color - })) - this.filteredEvents = this.events.filter((item) => !item.is_finished) - } catch (error) { - this.$toast.error(error) - } + created() { + this._getData() }, methods: { - // Kravarik: TODO prepojit filtrovanie na BE + async _getData() { + try { + const events = await this.$axios.get_auth_data('v1/overview/projects') + this.events = events.map((item) => ({ + id: item.id, + title: `${item.project_code} - ${item.name}`, + title_html: `${item.project_code} - ${item.name}`, + start: item.starts_at, + end: item.deadline, + is_finished: item.is_finished, + project_code: item.project_code, + backgroundColor: item.color, + borderColor: item.color + })) + this.filteredEvents = this.events.filter((item) => !item.is_finished) + } catch (error) { + this.$toast.error(error) + } + }, + onFilterChanged(filterValues) { this.filter = filterValues this.filteredEvents = this.events.filter((item) => this.filter.showFinishedTasks || item.is_finished == false) diff --git a/app/src/plugins/tm@dashboard/tasks/_components/a-tasks-filter.vue b/app/src/plugins/tm@dashboard/tasks/_components/a-tasks-filter.vue index 82c7c23..07a0e32 100644 --- a/app/src/plugins/tm@dashboard/tasks/_components/a-tasks-filter.vue +++ b/app/src/plugins/tm@dashboard/tasks/_components/a-tasks-filter.vue @@ -48,7 +48,6 @@ export default { employees: [], selectedDate: "", - // Kaluza: Napojit funkcnost selectedEmployee: '', date: new Date() } diff --git a/app/src/plugins/tm@dashboard/teams/_components/a-team-filter.vue b/app/src/plugins/tm@dashboard/teams/_components/a-team-filter.vue index 5f9a204..aa20e13 100644 --- a/app/src/plugins/tm@dashboard/teams/_components/a-team-filter.vue +++ b/app/src/plugins/tm@dashboard/teams/_components/a-team-filter.vue @@ -46,7 +46,6 @@ export default { return { teams: [], - // Kaluza: Napojit funkcionalitu selectedTeam: null, selectedDate: new Date(),