mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 22:39:34 +00:00
Merge branch 'main' of bitbucket.org:studiotem/jandl-taskmanager-app
This commit is contained in:
commit
2141a4da7c
39 files changed
+14490
-807
No files matched your search
@@ -33,7 +33,7 @@ export default {
|
||||
try {
|
||||
this.employees = await this.$axios.get_auth_data('v1/employees')
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
this.$toast(error)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -49,7 +49,7 @@ export default {
|
||||
return `${employee.name} ${employee.surname}`
|
||||
})
|
||||
return employees
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
<img class="pencil-icon" :src="require('@/plugins/tm@overview/_img/pencil-icon.svg')" alt="pencil-icon" :style="{opacity: 0.3}"/>
|
||||
<img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" @click.stop="showDeleteModal = { task }" />
|
||||
|
||||
<!-- Kravarik: Aj tento modal prerob novym sposobom -->
|
||||
<Z-delete-task-modal v-if="showDeleteModal" :visible="showDeleteModal ? true : false" :task="showDeleteModal.task" @close="showDeleteModal = null" />
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<Z-tasks-search @queryChange="filterOngoingTasks" />
|
||||
|
||||
<W-loadable :content="ongoingTasks">
|
||||
<Z-tasks-search @queryChange="onSearch" />
|
||||
|
||||
<W-loadable :content="filteredOngoingTasks" :emptyMessage="searchQuery.length ? 'Neboli nájdené žiadne úlohy' : 'Nenašli sa žiadne záznamy'">
|
||||
<A-ongoing-table :tasks="filteredOngoingTasks" />
|
||||
<h6
|
||||
v-if="filteredOngoingTasks && !filteredOngoingTasks.length"
|
||||
class="px-4"
|
||||
>
|
||||
Aktuálnemu hľadaniu nevyhovujú žiadne prebiehajúce úlohy
|
||||
</h6>
|
||||
</W-loadable>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -28,29 +22,38 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
ongoingTasks: null,
|
||||
filteredOngoingTasks: []
|
||||
searchQuery: '',
|
||||
ongoingTasks: null
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
filteredOngoingTasks() {
|
||||
if (!this.ongoingTasks)
|
||||
return null
|
||||
|
||||
if (!this.searchQuery)
|
||||
return this.ongoingTasks
|
||||
|
||||
return this.ongoingTasks.filter((task) => {
|
||||
return this.filterParams(this.searchQuery, task.title) || this.filterParams(this.searchQuery, task.project_code)
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
async created() {
|
||||
try {
|
||||
this.ongoingTasks = await this.$axios.get_auth_data('v1/overview/ongoing-tasks')
|
||||
this.filterOngoingTasks()
|
||||
} catch (error) {
|
||||
this.ongoingTasks = error
|
||||
this.$toast.error(error)
|
||||
this.ongoingTasks = {error}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
filterOngoingTasks(searchQuery) {
|
||||
if(!searchQuery) return this.filteredOngoingTasks = this.ongoingTasks
|
||||
this.filteredOngoingTasks = this.ongoingTasks.filter((task) => {
|
||||
return this.filterParams(searchQuery, task.title) || this.filterParams(searchQuery, task.project_code)
|
||||
})
|
||||
onSearch(searchQuery) {
|
||||
this.searchQuery = searchQuery
|
||||
},
|
||||
|
||||
|
||||
filterParams(searchQuery, row) {
|
||||
return row.toLowerCase().includes(searchQuery.toLowerCase())
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<img class="pencil-icon" :src="require('@/plugins/tm@overview/_img/pencil-icon.svg')" alt="pencil-icon" :style="{opacity: 0.3}">
|
||||
<img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" @click.stop="showDeleteModal = { task }">
|
||||
|
||||
<!-- Kravarik: Aj tento modal prerob novym sposobom -->
|
||||
<Z-delete-task-modal v-if="showDeleteModal" :visible="showDeleteModal ? true : false" :task="showDeleteModal.task" @close="showDeleteModal = null" />
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<Z-tasks-search @queryChange="filterUnscheduledTasks" />
|
||||
<Z-tasks-search @queryChange="onSearch" />
|
||||
|
||||
<W-loadable :content="unscheduledTasks">
|
||||
<W-loadable :content="filteredUnscheduledTasks" :emptyMessage="searchQuery.length ? 'Neboli nájdené žiadne úlohy' : 'Nenašli sa žiadne záznamy'">
|
||||
<A-unscheduled-table :tasks="filteredUnscheduledTasks" />
|
||||
<h6
|
||||
v-if="filteredUnscheduledTasks && !filteredUnscheduledTasks.length"
|
||||
@@ -28,29 +28,38 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
unscheduledTasks: null,
|
||||
filteredUnscheduledTasks: []
|
||||
searchQuery: '',
|
||||
unscheduledTasks: null
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
filteredUnscheduledTasks() {
|
||||
if (!this.unscheduledTasks)
|
||||
return null
|
||||
|
||||
if (!this.searchQuery)
|
||||
return this.unscheduledTasks
|
||||
|
||||
return this.unscheduledTasks.filter((task) => {
|
||||
return this.filterParams(this.searchQuery, task.title) || this.filterParams(this.searchQuery, task.project_code)
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
async created() {
|
||||
try {
|
||||
this.unscheduledTasks = await this.$axios.get_auth_data('v1/overview/unscheduled-tasks')
|
||||
this.filterUnscheduledTasks()
|
||||
} catch (error) {
|
||||
this.unscheduledTasks = error
|
||||
this.$toast.error(error)
|
||||
this.unscheduledTasks = {error}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
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)
|
||||
})
|
||||
},
|
||||
|
||||
onSearch(searchQuery) {
|
||||
this.searchQuery = searchQuery
|
||||
},
|
||||
|
||||
filterParams(searchQuery, row) {
|
||||
return row.toLowerCase().includes(searchQuery.toLowerCase())
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
</v-table>
|
||||
|
||||
<Z-team-modal ref="z-team-modal" />
|
||||
<!-- Kravarik: Aj tento modal prerob novym sposobom -->
|
||||
<Z-delete-team-modal v-if="deleteModal" :visible="deleteModal ? true : false" :team="deleteModal.team" @close="(deleteModal = null)" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -22,8 +22,7 @@ export default {
|
||||
try {
|
||||
this.teams = await this.$axios.get_auth_data('http://127.0.0.1:8000/api/v1/teams')
|
||||
} catch (error) {
|
||||
this.teams = {error: error.data.error}
|
||||
this.$toast.error(error.data.error)
|
||||
this.teams = {error}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user