mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 22:39:34 +00:00
[Master task modal] Improved performance
This commit is contained in:
1 parent
1e86dbbbb3
commit
b72e26a006
1 file changed
+10
-9
@@ -61,7 +61,7 @@
|
||||
<v-btn class="button primary" @click="save()">Ukončiť mastertask</v-btn>
|
||||
</div>
|
||||
|
||||
<A-tasks-table :tasks="masterTask.subtasks" :employees="employees" />
|
||||
<A-tasks-table :tasks="masterTask.subtasks" :employees="enrichedEmployees" />
|
||||
|
||||
<div class="d-flex align-center ">
|
||||
<v-btn class="subtask-btn w-100" @click="addTask()" ><v-icon class="mx-1" icon="mdi-plus" />Pridať task</v-btn>
|
||||
@@ -90,6 +90,7 @@ import '@vueup/vue-quill/dist/vue-quill.snow.css'
|
||||
import SelectsMixin from './_mixins/selects.mixin'
|
||||
import ATasksTable from './_components/a-tasks-table.vue'
|
||||
import AMastertaskDescription from './_components/a-mastertask-description.vue'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
// MIXINS
|
||||
@@ -115,15 +116,20 @@ export default {
|
||||
visible: false,
|
||||
errorUtils,
|
||||
v$: useVuelidate(),
|
||||
teams: null,
|
||||
projects: null,
|
||||
employees: null,
|
||||
masterTask: null,
|
||||
showAddEmployeeInput: false,
|
||||
date: null,
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters('tm', [
|
||||
'teams',
|
||||
'projects',
|
||||
'enrichedEmployees'
|
||||
])
|
||||
},
|
||||
|
||||
validations() {
|
||||
return {
|
||||
masterTask: {
|
||||
@@ -170,11 +176,6 @@ export default {
|
||||
this.masterTask = null
|
||||
|
||||
try {
|
||||
this.teams = await this.$axios.get_auth_data('v1/teams')
|
||||
this.projects = await this.$axios.get_auth_data('v1/projects')
|
||||
const employees = await this.$axios.get_auth_data('v1/employees')
|
||||
this.employees = tmUtils.enrichEmployeesByFullName(employees)
|
||||
|
||||
if (masterTask?.id) {
|
||||
this.masterTask = await this.$axios.get_auth_data(`v1/mastertasks/${masterTask.id}`)
|
||||
|
||||
|
||||
Reference in new issue
Block a user