This commit is contained in:
Matej Glasnák committed 2023-01-12 14:45:18 +01:00
1 parent 79f563a82d
commit d46a9151fc
27 files changed
+279 -339

No files matched your search

@@ -38,19 +38,22 @@ export default {
this.unscheduledTasks = await this.$axios.get_auth_data('v1/overview/unscheduled-tasks')
this.filterUnscheduledTasks()
} catch (error) {
// Kravarik: ked to je takto ze idu data do w-loadable tak musis dat this.ongoingTasks = {error}
// Ten toast vyhod a to kde nastavujes error musis dat do {} ako v riadku hore lebo ono to pozera if (content.error)
this.unscheduledTasks = error
this.$toast.error(error)
}
},
methods: {
// Kravarik: Toto sprav cez computed. A bude tam ze if (!searchQuerry) return this.unscheduled tasks. Else to prefiltrujes
filterUnscheduledTasks(searchQuery) {
if(!searchQuery) return this.filteredUnscheduledTasks = this.unscheduledTasks
this.filteredUnscheduledTasks = this.unscheduledTasks.filter((task) => {
return this.filterParams(searchQuery, task.title) || this.filterParams(searchQuery, task.project_code)
})
},
filterParams(searchQuery, row) {
return row.toLowerCase().includes(searchQuery.toLowerCase())
}