diff --git a/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue b/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue
index 2b895c7..13fa0fe 100644
--- a/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue
+++ b/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue
@@ -61,7 +61,7 @@
Ukončiť mastertask
-
+
Pridať task
@@ -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}`)