mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
Merge branch 'main' of bitbucket.org:studiotem/jandl-taskmanager-app
This commit is contained in:
commit
cc6e37c959
9 files changed
+42
-21
No files matched your search
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<Z-task-modal ref="z-task-modal" @on-subtask-edited="onTaskEdited" />
|
<Z-task-modal ref="z-task-modal" @on-subtask-edited="onTaskEdited" />
|
||||||
<Z-delete-task-modal ref="z-delete-task-modal" @on-task-deleted="onTaskDeleted" />
|
<Z-delete-task-modal ref="z-delete-task-modal" @on-task-deleted="onTaskDeleted" />
|
||||||
<Z-delete-master-task-modal ref="z-delete-master-task-modal" @on-master-task-deleted="onMasterTaskDeleted" />
|
<Z-delete-master-task-modal ref="z-delete-master-task-modal" @on-mastertask-deleted="onMasterTaskDeleted" />
|
||||||
<Z-complete-task-modal ref="z-complete-task-modal" @on-subtask-edited="onTaskEdited" />
|
<Z-complete-task-modal ref="z-complete-task-modal" @on-subtask-edited="onTaskEdited" />
|
||||||
<Z-task-add-time-modal ref="z-task-add-time-modal" />
|
<Z-task-add-time-modal ref="z-task-add-time-modal" />
|
||||||
<Z-blocker-modal ref="z-blocker-modal" />
|
<Z-blocker-modal ref="z-blocker-modal" />
|
||||||
@@ -114,7 +114,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onMasterTaskDeleted(mastertask){
|
onMasterTaskDeleted(mastertask){
|
||||||
this.$events.emit('on-master-task-deleted', mastertask)
|
this.$events.emit('on-mastertask-deleted', mastertask)
|
||||||
},
|
},
|
||||||
|
|
||||||
onMasterTaskEdited(mastertask){
|
onMasterTaskEdited(mastertask){
|
||||||
@@ -124,9 +124,9 @@ export default {
|
|||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
'$route'() {
|
'$route'() {
|
||||||
if (this.$route.query['master-task']) {
|
// if (this.$route.query['master-task']) {
|
||||||
this.$events.emit('show-master-task-modal', { mastertask: { id: this.$route.query['master-task'] }, editMode: false })
|
// this.$events.emit('show-master-task-modal', { mastertask: { id: this.$route.query['master-task'] }, editMode: false })
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,10 +22,11 @@ export default {
|
|||||||
return {
|
return {
|
||||||
errorUtils,
|
errorUtils,
|
||||||
v$: useVuelidate(),
|
v$: useVuelidate(),
|
||||||
form: {
|
form: {},
|
||||||
email: 'zachariah.vonrueden@jandl.sk',
|
// form: {
|
||||||
password: 'testpassword'
|
// email: 'zachariah.vonrueden@jandl.sk',
|
||||||
},
|
// password: 'testpassword'
|
||||||
|
// },
|
||||||
showPassword: false
|
showPassword: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,6 +46,16 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.$events.on('on-mastertask-edited', () => this.onFilterChanged(this.filter))
|
||||||
|
this.$events.on('on-mastertask-deleted', () => this.onFilterChanged(this.filter))
|
||||||
|
},
|
||||||
|
|
||||||
|
unmounted() {
|
||||||
|
this.$events.off('on-mastertask-edited')
|
||||||
|
this.$events.off('on-mastertask-deleted')
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
async onFilterChanged(filter) {
|
async onFilterChanged(filter) {
|
||||||
this.mastertasks = null
|
this.mastertasks = null
|
||||||
|
|||||||
@@ -21,12 +21,22 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
employee: {
|
employeeId: {
|
||||||
type: [Object, Number],
|
type: [Number],
|
||||||
required: false
|
required: false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
...mapGetters('tm', ['enrichedEmployees']),
|
||||||
|
|
||||||
|
employee() {
|
||||||
|
return this.enrichedEmployees.find(employee => employee.id == this.employeeId)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<Z-status :status="mastertask.is_finished" />
|
<Z-status :status="mastertask.is_finished" />
|
||||||
<Z-deadline :deadline="mastertask.deadline" />
|
<Z-deadline :deadline="mastertask.deadline" />
|
||||||
<Z-created-by :employee="mastertask.created_by" />
|
<Z-created-by :employee-id="mastertask.created_by" />
|
||||||
<Z-team :team="mastertask.team" :employees="mastertask.employees" />
|
<Z-team :team="mastertask.team" :employees="mastertask.employees" />
|
||||||
<Z-planned-time :hours="mastertask.duration" />
|
<Z-planned-time :hours="mastertask.duration" />
|
||||||
<Z-remaining-time :hours="mastertask.duration - mastertask.time_worked" />
|
<Z-remaining-time :hours="mastertask.duration - mastertask.time_worked" />
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
'mastertask.team_id'(value, oldValue) {
|
'mastertask.team_id'(value) {
|
||||||
if (!value || !oldValue) return
|
if (!value) return
|
||||||
|
|
||||||
this.mastertask.team = this.teams.find(team => team.id == value)
|
this.mastertask.team = this.teams.find(team => team.id == value)
|
||||||
this.mastertask.employees = this.mastertask.team.employees
|
this.mastertask.employees = this.mastertask.team.employees
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
emits: ['on-master-task-deleted'],
|
emits: ['on-mastertask-deleted'],
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -43,7 +43,7 @@ export default {
|
|||||||
async deleteMasterTask() {
|
async deleteMasterTask() {
|
||||||
try {
|
try {
|
||||||
await this.$axios.delete_auth(`v1/mastertasks/${this.mastertask.id}`)
|
await this.$axios.delete_auth(`v1/mastertasks/${this.mastertask.id}`)
|
||||||
this.$emit('on-master-task-deleted', this.mastertask)
|
this.$emit('on-mastertask-deleted', this.mastertask)
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(error)
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$events.on('on-master-task-deleted', (mastertask) => {
|
this.$events.on('on-mastertask-deleted', (mastertask) => {
|
||||||
if (mastertask?.id == this.mastertask?.id) this.closeModal()
|
if (mastertask?.id == this.mastertask?.id) this.closeModal()
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
this.$events.off('on-master-task-deleted')
|
this.$events.off('on-mastertask-deleted')
|
||||||
this.$events.off('on-task-deleted')
|
this.$events.off('on-task-deleted')
|
||||||
this.$events.off('on-subtask-edited')
|
this.$events.off('on-subtask-edited')
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<A-mastertask-name :name="task.master_task?.name || task.master_task" :id="task.master_task.id" :color="task.master_task.color" @close-modal="$emit('close-modal')" />
|
<A-mastertask-name :name="task.master_task?.name || task.master_task" :id="task.master_task.id" :color="task.master_task.color" @close-modal="$emit('close-modal')" />
|
||||||
<A-mastertask-status :status="task.is_finished" />
|
<A-mastertask-status :status="task.is_finished" />
|
||||||
<A-task-timeblocks :timeblocks="task.timeblocks" :task="task" />
|
<A-task-timeblocks :timeblocks="task.timeblocks" :task="task" />
|
||||||
<A-task-assigned-by :employee="task._created_by" v-if="task._created_by" />
|
<Z-created-by :employee-id="task.created_by" />
|
||||||
<A-task-assigned-employee :employee="task.employee" />
|
<A-task-assigned-employee :employee="task.employee" />
|
||||||
<A-task-planned-time :hours="task.duration" />
|
<A-task-planned-time :hours="task.duration" />
|
||||||
<A-task-remaining-time :hours="task.duration - task.spent_time" />
|
<A-task-remaining-time :hours="task.duration - task.spent_time" />
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
import AMastertaskName from './_components/a-mastertask-name.vue'
|
import AMastertaskName from './_components/a-mastertask-name.vue'
|
||||||
import AMastertaskStatus from './_components/a-mastertask-status.vue'
|
import AMastertaskStatus from './_components/a-mastertask-status.vue'
|
||||||
import ATaskTimeblocks from './_components/a-task-timeblocks.vue'
|
import ATaskTimeblocks from './_components/a-task-timeblocks.vue'
|
||||||
import ATaskAssignedBy from './_components/a-task-assigned-by.vue'
|
import ZCreatedBy from '../../_components/read-only/z-created-by.vue'
|
||||||
import ATaskAssignedEmployee from './_components/a-task-assigned-employee.vue'
|
import ATaskAssignedEmployee from './_components/a-task-assigned-employee.vue'
|
||||||
import ATaskPlannedTime from './_components/a-task-planned-time.vue'
|
import ATaskPlannedTime from './_components/a-task-planned-time.vue'
|
||||||
import ATaskSpentTime from './_components/a-task-spent-time.vue'
|
import ATaskSpentTime from './_components/a-task-spent-time.vue'
|
||||||
@@ -31,7 +31,7 @@ export default {
|
|||||||
AMastertaskName,
|
AMastertaskName,
|
||||||
AMastertaskStatus,
|
AMastertaskStatus,
|
||||||
ATaskTimeblocks,
|
ATaskTimeblocks,
|
||||||
ATaskAssignedBy,
|
ZCreatedBy,
|
||||||
ATaskAssignedEmployee,
|
ATaskAssignedEmployee,
|
||||||
ATaskPlannedTime,
|
ATaskPlannedTime,
|
||||||
ATaskSpentTime,
|
ATaskSpentTime,
|
||||||
|
|||||||
Reference in new issue
Block a user