diff --git a/app/src/plugins/app/_config/App.vue b/app/src/plugins/app/_config/App.vue
index 5921711..4a31901 100644
--- a/app/src/plugins/app/_config/App.vue
+++ b/app/src/plugins/app/_config/App.vue
@@ -8,10 +8,10 @@
-
+
-
+
@@ -42,21 +42,7 @@ export default {
ZDeleteMasterTaskModal
},
- data() {
- return {
- loader: null
- }
- },
-
-
- async created() {
- await this.$store.dispatch('tm/initialize')
- this.loader?.hide()
- },
-
mounted() {
- this.loader = this.$loading.show()
-
this.$events.on('show-delete-team-modal', ({team}) => {
this.$refs['z-delete-team-modal'].showModal(team)
})
@@ -89,16 +75,16 @@ export default {
this.$refs['z-master-task-modal'].showModal(masterTask, editMode)
})
- this.$events.on('show-complete-task-modal', ({task}) => {
- this.$refs['z-complete-task-modal'].showModal(task)
+ this.$events.on('show-complete-task-modal', ({ subtask }) => {
+ this.$refs['z-complete-task-modal'].showModal({ subtask })
})
this.$events.on('show-blocker-modal', ({blocker}) => {
this.$refs['z-blocker-modal'].showModal(blocker)
})
- this.$events.on('show-task-add-time-modal', ({task}) => {
- this.$refs['z-task-add-time-modal'].showModal(task)
+ this.$events.on('show-task-add-time-modal', ({subtask}) => {
+ this.$refs['z-task-add-time-modal'].showModal({ subtask })
})
},
@@ -111,12 +97,8 @@ export default {
this.$events.emit('on-task-deleted', task)
},
- onTaskCompleted(task) {
- this.$events.emit('on-task-completed', task)
- },
-
onTaskEdited(task) {
- this.$events.emit('on-task-edited', task)
+ this.$events.emit('on-subtask-edited', task)
},
onMasterTaskDeleted(masterTask){
diff --git a/app/src/plugins/app/_layout/app/app.layout.vue b/app/src/plugins/app/_layout/app/app.layout.vue
index ed15c39..69e1f37 100644
--- a/app/src/plugins/app/_layout/app/app.layout.vue
+++ b/app/src/plugins/app/_layout/app/app.layout.vue
@@ -20,6 +20,24 @@ export default {
components: {
ASidemenu,
AHeader
+ },
+
+ data() {
+ return {
+ loader: null
+ }
+ },
+
+ async mounted() {
+ this.loader = this.$loading.show()
+
+ try {
+ await this.$store.dispatch('tm/initialize')
+ } catch (error) {
+ this.$toast.error(error)
+ } finally {
+ this.loader?.hide()
+ }
}
}
diff --git a/app/src/plugins/app/_theme/global.sass b/app/src/plugins/app/_theme/global.sass
index fdb8f17..2a61e5f 100644
--- a/app/src/plugins/app/_theme/global.sass
+++ b/app/src/plugins/app/_theme/global.sass
@@ -86,4 +86,7 @@ input[type="time"]::-webkit-calendar-picker-indicator
.v-toast,
.v-toast__item
- z-index: 10000 !important
\ No newline at end of file
+ z-index: 10000 !important
+
+.vld-overlay .vld-background
+ opacity: 1
\ No newline at end of file
diff --git a/app/src/plugins/tm@_store/store/index.ts b/app/src/plugins/tm@_store/store/index.ts
index 2ecefbd..5cec7a4 100644
--- a/app/src/plugins/tm@_store/store/index.ts
+++ b/app/src/plugins/tm@_store/store/index.ts
@@ -60,7 +60,7 @@ export default {
state.unscheduledSubtasks = state.unscheduledSubtasks.map(st => st.id == subtask.id ? subtask : st)
state.ongoingSubtasks = state.ongoingSubtasks.map(st => st.id == subtask.id ? subtask : st)
state.mastertasks = state.mastertasks.map(mastertask => {
- mastertask.subtasks = mastertask.subtasks.map(st => st.id == subtask.id ? subtask : st)
+ mastertask.subtasks = mastertask.subtasks.map(st => st.id == subtask.id ? subtask : st)
return mastertask
})
},
diff --git a/app/src/plugins/tm@dashboard/_components/z-timeline.vue b/app/src/plugins/tm@dashboard/_components/z-timeline.vue
index 63bc559..2aca2a3 100644
--- a/app/src/plugins/tm@dashboard/_components/z-timeline.vue
+++ b/app/src/plugins/tm@dashboard/_components/z-timeline.vue
@@ -37,9 +37,9 @@
{{ split.date.toLocaleDateString('en-EN', { weekday: 'long' }) }}
-
+
-
{{split.initials}}
+
{{ split.initials }}
{{split.name}}
@@ -57,21 +57,22 @@
+ {{ event }}
-
{{ event.project_code }}
-
{{ event.title }}
+
{{ event.subtask.project_code }}
+
{{ event.subtask.master_task?.name || event.subtask.master_task }}
{{ getUserInitials(event) }}
-
{{ new Date(event.starts_at).toLocaleDateString('sk-SK') }}
+
{{ event.start.toLocaleDateString('sk-SK') }}
@@ -89,6 +90,9 @@
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 15b24df..24ea68e 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
@@ -146,7 +146,7 @@ export default {
this.masterTask.subtasks = this.masterTask.subtasks.filter((subtask) => subtask.id != task.id)
})
- this.$events.on('on-task-edited', (task) => {
+ this.$events.on('on-subtask-edited', (task) => {
if (!this.masterTask?.subtasks) return
if (this.masterTask.subtasks.find(subtask => subtask.id == task.id)) {
@@ -160,7 +160,7 @@ export default {
beforeUnmount() {
this.$events.off('on-master-task-deleted')
this.$events.off('on-task-deleted')
- this.$events.off('on-task-edited')
+ this.$events.off('on-subtask-edited')
},
methods: {
diff --git a/app/src/plugins/tm@modal/task/_components/_components/a-task-spent-time.vue b/app/src/plugins/tm@modal/task/_components/_components/a-task-spent-time.vue
index 19a0dff..699e121 100644
--- a/app/src/plugins/tm@modal/task/_components/_components/a-task-spent-time.vue
+++ b/app/src/plugins/tm@modal/task/_components/_components/a-task-spent-time.vue
@@ -119,7 +119,7 @@ export default {
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${task.id}`, task)
this.closeModal()
- this.$events.emit('on-task-edited', subtask)
+ this.$events.emit('on-subtask-edited', subtask)
} catch (error) {
this.$toast.error(error.message || error)
}
diff --git a/app/src/plugins/tm@modal/task/_components/_components/a-task-timeblocks.vue b/app/src/plugins/tm@modal/task/_components/_components/a-task-timeblocks.vue
index c07eb11..7e475c8 100644
--- a/app/src/plugins/tm@modal/task/_components/_components/a-task-timeblocks.vue
+++ b/app/src/plugins/tm@modal/task/_components/_components/a-task-timeblocks.vue
@@ -125,7 +125,7 @@ export default {
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${task.id}`, task)
this.closeModal()
- this.$events.emit('on-task-edited', subtask)
+ this.$events.emit('on-subtask-edited', subtask)
} catch (error) {
this.$toast.error(error.message || error)
}
diff --git a/app/src/plugins/tm@modal/task/z-complete-task-modal.vue b/app/src/plugins/tm@modal/task/z-complete-task-modal.vue
index 8bf898c..cc80786 100644
--- a/app/src/plugins/tm@modal/task/z-complete-task-modal.vue
+++ b/app/src/plugins/tm@modal/task/z-complete-task-modal.vue
@@ -2,7 +2,7 @@
-
Ste si istý, že chcete {{ this.task?.id ? 'ukončiť' : 'obnoviť' }} task, z masterTasku {{ task.master_task }}?
+
Ste si istý, že chcete {{ this.subtask.is_finished ? 'dokončiť' : 'otvoriť' }} task, z masterTasku {{ subtask?.master_task }}?
export default {
- emits: ['close', 'task-completed'],
+ emits: ['close', 'on-subtask-edited'],
data() {
return {
visible: false,
- task: null
+ subtask: null
}
},
methods: {
- async showModal(task) {
- this.task = task
+ async showModal({ subtask }) {
+ this.subtask = subtask
this.visible = true
},
async complete() {
try {
- const task = {...this.task, is_finished: true}
- await this.$axios.patch_auth(`v1/subtasks/${this.task.id}`, task)
+ const tempSubtask = {...this.subtask, is_finished: !this.subtask.is_finished}
+ const { subtask } = await this.$axios.put_auth(`v1/subtasks/${tempSubtask.id}`, tempSubtask)
+
this.visible = false
- this.$emit('task-completed', task)
+
+ this.$store.commit('tm/update_subtask', subtask)
+ this.$emit('on-subtask-edited', subtask)
} catch (error) {
this.$toast.error(error)
}
diff --git a/app/src/plugins/tm@modal/task/z-task-add-time-modal.vue b/app/src/plugins/tm@modal/task/z-task-add-time-modal.vue
index 226a6f9..19ac174 100644
--- a/app/src/plugins/tm@modal/task/z-task-add-time-modal.vue
+++ b/app/src/plugins/tm@modal/task/z-task-add-time-modal.vue
@@ -1,73 +1,77 @@
-
+
-
Prosím zadajte odpracovaný čas
+ Pridať odpracovaný čas
-
+
-
+
- Potvrdiť
+ Potvrdiť
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/src/plugins/tm@modal/task/z-task-modal.vue b/app/src/plugins/tm@modal/task/z-task-modal.vue
index 2f7a152..8470820 100644
--- a/app/src/plugins/tm@modal/task/z-task-modal.vue
+++ b/app/src/plugins/tm@modal/task/z-task-modal.vue
@@ -125,7 +125,7 @@ export default {
},
mounted() {
- this.$events.on("on-task-edited", (task) => {
+ this.$events.on("on-subtask-edited", (task) => {
if (task?.id == this.task?.id)
this.task = this._enrichTask(task)
@@ -179,7 +179,7 @@ export default {
this.$store.commit('tm/update_subtask', subtask)
}
- this.$events.emit("on-task-edited", this.task)
+ this.$events.emit("on-subtask-edited", this.task)
this.closeModal()
} catch (error) {
this.$toast.error(error)
diff --git a/app/src/plugins/tm@overview/tasks-unscheduled/tasks-unscheduled.vue b/app/src/plugins/tm@overview/tasks-unscheduled/tasks-unscheduled.vue
index 902246b..3628a3b 100644
--- a/app/src/plugins/tm@overview/tasks-unscheduled/tasks-unscheduled.vue
+++ b/app/src/plugins/tm@overview/tasks-unscheduled/tasks-unscheduled.vue
@@ -12,8 +12,9 @@