quick change

This commit is contained in:
Filip Kaluža committed 2023-01-20 16:16:06 +01:00
1 parent ceea2c5b01
commit 2166020941
3 files changed
+22 -21

No files matched your search

@@ -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} - <b>${item.name}</b>`,
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} - <b>${item.name}</b>`,
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)
@@ -48,7 +48,6 @@ export default {
employees: [],
selectedDate: "",
// Kaluza: Napojit funkcnost
selectedEmployee: '',
date: new Date()
}
@@ -46,7 +46,6 @@ export default {
return {
teams: [],
// Kaluza: Napojit funkcionalitu
selectedTeam: null,
selectedDate: new Date(),