mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 06:20:21 +00:00
[mastertask] ukoncovanie, [teams overview] spravne zobrazovanie kapacit jednotlivych zamestnancov
This commit is contained in:
1 parent
04d91c93ff
commit
721b29a3ef
5 files changed
+67
-16
No files matched your search
@@ -13,6 +13,7 @@
|
||||
<Z-delete-blocker-modal ref="z-delete-blocker-modal" @on-blocker-deleted="onBlockerDeleted" />
|
||||
<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-master-task-modal ref="z-complete-master-task-modal" @master-task-edited="onMasterTaskEdited" />
|
||||
<Z-task-add-time-modal ref="z-task-add-time-modal" />
|
||||
<Z-blocker-modal ref="z-blocker-modal" />
|
||||
|
||||
@@ -28,6 +29,7 @@ import ZDeleteTaskModal from '@/plugins/tm@modal/task/z-delete-task-modal.vue'
|
||||
import ZTaskModal from '@/plugins/tm@modal/task/z-task-modal.vue'
|
||||
import ZDeleteBlockerModal from '@/plugins/tm@modal/blocker/z-delete-blocker-modal.vue'
|
||||
import ZCompleteTaskModal from '@/plugins/tm@modal/task/z-complete-task-modal.vue'
|
||||
import ZCompleteMasterTaskModal from '@/plugins/tm@modal/master-task/z-complete-master-task-modal.vue'
|
||||
import ZTaskAddTimeModal from '@/plugins/tm@modal/task/z-task-add-time-modal.vue'
|
||||
import ZBlockerModal from '@/plugins/tm@modal/blocker/z-blocker-modal.vue'
|
||||
import ZDeleteMasterTaskModal from '@/plugins/tm@modal/master-task/z-delete-master-task-modal.vue'
|
||||
@@ -48,7 +50,8 @@ export default {
|
||||
ZBlockerModal,
|
||||
ZDeleteMasterTaskModal,
|
||||
ZDeleteTeamMemberModal,
|
||||
ZShowMenuModal
|
||||
ZShowMenuModal,
|
||||
ZCompleteMasterTaskModal
|
||||
},
|
||||
|
||||
mounted() {
|
||||
@@ -100,6 +103,10 @@ export default {
|
||||
this.$refs['z-complete-task-modal'].showModal({ subtask })
|
||||
})
|
||||
|
||||
this.$events.on('show-complete-master-task-modal', ({ mastertask }) => {
|
||||
this.$refs['z-complete-master-task-modal'].showModal({ mastertask })
|
||||
})
|
||||
|
||||
this.$events.on('show-blocker-modal', ({blocker = {}}) => {
|
||||
this.$refs['z-blocker-modal'].showModal({blocker})
|
||||
})
|
||||
|
||||
@@ -85,7 +85,7 @@ export default {
|
||||
nonWorkingHours.push({
|
||||
title: "Non working hours",
|
||||
start: dayStart,
|
||||
end: this._setMinutesToDate(employee.work_start * 60),
|
||||
end: this._setMinutesToDate((employee.work_start + 1.3) * 60),
|
||||
split: index + 1,
|
||||
type: 'non-working-hours',
|
||||
draggable: false
|
||||
@@ -93,7 +93,7 @@ export default {
|
||||
|
||||
nonWorkingHours.push({
|
||||
title: "Non working hours",
|
||||
start: this._setMinutesToDate(employee.work_end * 60),
|
||||
start: this._setMinutesToDate((employee.work_end + 1.3) * 60),
|
||||
end: dayEnd,
|
||||
split: index + 1,
|
||||
type: 'non-working-hours',
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<template>
|
||||
<v-dialog v-model="visible" max-width="750" persistent>
|
||||
<v-card>
|
||||
<div class="d-flex justify-space-between align-center">
|
||||
<h1>Ste si istý, že chcete {{ mastertask.is_finished ? 'znovu otvoriť' : 'dokončiť' }} <b>{{ mastertask?.name }}</b>?</h1>
|
||||
<v-icon
|
||||
@click.stop="visible = false"
|
||||
icon="mdi-close"
|
||||
size="large"
|
||||
></v-icon>
|
||||
</div>
|
||||
<v-card-actions class="mt-10 d-flex justify-start align-center mobile-view">
|
||||
<v-btn class="button primary half" variant="flat" @click="complete()">ÁNO</v-btn>
|
||||
<v-btn class="button primary half outline" @click.stop="visible = false">ZRUŠIŤ</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
mixins: [ modalMixin ],
|
||||
emits: ['close', 'on-master-task-edited'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
mastertask: null
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
async showModal({ mastertask }) {
|
||||
this.mastertask = mastertask
|
||||
this.visible = true
|
||||
},
|
||||
|
||||
async complete() {
|
||||
try {
|
||||
const tempMastertask = {...this.mastertask, is_finished: this.mastertask.is_finished ? 0 : 1, duration: this.mastertask.duration }
|
||||
const { mastertask } = await this.$axios.put_auth(`v1/mastertasks/${tempMastertask.id}`, tempMastertask)
|
||||
|
||||
this.visible = false
|
||||
this.$emit('on-master-task-edited', mastertask)
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -70,7 +70,7 @@
|
||||
<A-mastertask-description :mastertask="mastertask" />
|
||||
|
||||
<div class="d-flex justify-start align-center mt-8">
|
||||
<v-btn class="button primary" @click="toggleIsFinished()">{{ mastertask.is_finished ? 'Otvoriť mastertask' : 'Ukončiť mastertask' }}</v-btn>
|
||||
<v-btn class="button primary" @click="toggleIsFinished(mastertask)">{{ mastertask.is_finished ? 'Otvoriť mastertask' : 'Ukončiť mastertask' }}</v-btn>
|
||||
</div>
|
||||
|
||||
<A-tasks-table :subtasks="mastertask.subtasks" />
|
||||
@@ -264,17 +264,8 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
async toggleIsFinished() {
|
||||
this.mastertask.is_finished = this.mastertask.is_finished == 0 ? 1 : 0
|
||||
this.save()
|
||||
// try {
|
||||
// const toggleMastertask = { ...this.mastertask, is_finished: this.mastertask.is_finished ? 0 : 1, duration: this.mastertask.duration }
|
||||
// const { mastertask } = await this.$axios.put_auth(`v1/mastertasks/${toggleMastertask.id}`, toggleMastertask)
|
||||
|
||||
// this.$emit('on-mastertask-edited', mastertask)
|
||||
// } catch (error) {
|
||||
// this.$toast.error(error)
|
||||
// }
|
||||
async toggleIsFinished(mastertask) {
|
||||
this.$events.emit('show-complete-master-task-modal', { mastertask })
|
||||
},
|
||||
|
||||
async save() {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<td>{{ subtask.project_code }}</td>
|
||||
<td>{{ subtask.title ?? subtask.master_task?.name ?? subtask.master_task }}</td>
|
||||
<td v-if="subtask.deadline">{{ getDeadline(subtask) }}</td>
|
||||
<td v-if="subtask?.deadline">{{ getDeadline(subtask) }}</td>
|
||||
<v-tooltip text="Deadline z Mastertasku" location="end">
|
||||
<template v-slot:activator="{ props }">
|
||||
<td v-if="!subtask.deadline" v-bind="props">{{ getDeadline(subtask) }}*</td>
|
||||
|
||||
Reference in new issue
Block a user