mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 06:20:21 +00:00
[blocker] employee prefill, [unscheduled] deadline
This commit is contained in:
1 parent
4163580fd6
commit
a2fb04d3b2
5 files changed
+24
-4
No files matched your search
@@ -65,6 +65,7 @@ transition-group.vuecal__cell(
|
||||
import Event from './event.vue'
|
||||
import tmUtils from '@/plugins/tm@_utils/tm.utils'
|
||||
import moment from 'moment'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
inject: ['vuecal', 'utils', 'modules', 'view', 'domEvents'],
|
||||
@@ -265,7 +266,8 @@ export default {
|
||||
|
||||
this.$events.emit('show-menu-modal', {
|
||||
time: time,
|
||||
date: tmUtils.formatDateTimeForBackend(dateFrom)
|
||||
date: tmUtils.formatDateTimeForBackend(dateFrom),
|
||||
employee: this.user.id
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
@@ -308,6 +310,7 @@ export default {
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters("auth", ["user"]),
|
||||
// Drag & drop module.
|
||||
dnd () {
|
||||
return this.modules.dnd
|
||||
|
||||
@@ -64,7 +64,8 @@ export default {
|
||||
blocker: null,
|
||||
datepicker: null,
|
||||
starts_at_time: null,
|
||||
ends_at_time: null
|
||||
ends_at_time: null,
|
||||
employee: null
|
||||
}
|
||||
},
|
||||
|
||||
@@ -112,9 +113,10 @@ export default {
|
||||
} else {
|
||||
this.blocker = {start: null }
|
||||
|
||||
if (blocker.starts_at_time && blocker.datepicker) {
|
||||
if (blocker.starts_at_time && blocker.datepicker && blocker.employee_id) {
|
||||
this.datepicker = blocker.datepicker
|
||||
this.starts_at_time = blocker.starts_at_time
|
||||
this.blocker.employee_id = blocker.employee_id
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
@@ -57,7 +57,7 @@ export default {
|
||||
this.$events.emit('show-subtask-modal', {
|
||||
subtask: {
|
||||
deadline: this.localData.date,
|
||||
_deadline_time: this.localData.time,
|
||||
_deadline_time: this.localData.time
|
||||
},
|
||||
onTaskCreated: () => {
|
||||
this.closeModal()
|
||||
@@ -70,6 +70,7 @@ export default {
|
||||
blocker: {
|
||||
starts_at_time: this.localData.time,
|
||||
datepicker: this.localData.date,
|
||||
employee_id: this.localData.employee
|
||||
},
|
||||
onBlockerCreated: () => {
|
||||
this.closeModal()
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
{{ employee.name.charAt(0) + employee.surname.charAt(0) }}
|
||||
</p>
|
||||
<p class="ml-2" v-html="`${employee.name} ${employee.surname}`" />
|
||||
<!-- <v-tooltip text="Vymazať priradeného zamestnanca" location="top">
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-icon v-bind="props" class="ml-2 cursor-pointer" icon="mdi-close" />
|
||||
</template>
|
||||
</v-tooltip> -->
|
||||
</v-sheet>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<tr>
|
||||
<th class="text-left">Kód projektu</th>
|
||||
<th class="text-left">Názov</th>
|
||||
<th class="text-left">Deadline</th>
|
||||
<th class="text-left">Trvanie</th>
|
||||
<th class="text-left">Akcia</th>
|
||||
</tr>
|
||||
@@ -14,6 +15,8 @@
|
||||
|
||||
<td>{{ subtask.project_code }}</td>
|
||||
<td>{{ subtask.title ?? subtask.master_task?.name ?? subtask.master_task }}</td>
|
||||
<td v-if="subtask.deadline">{{ subtaskDeadline(subtask?.deadline) }}</td>
|
||||
<td v-else></td>
|
||||
<td>{{ subtask.spent_time }} h</td>
|
||||
<td class="task-action">
|
||||
<div class="d-flex justify-start">
|
||||
@@ -28,6 +31,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
subtasks: {
|
||||
@@ -43,6 +48,10 @@ export default {
|
||||
|
||||
deleteTask(subtask) {
|
||||
this.$events.emit('show-delete-task-modal', {subtask})
|
||||
},
|
||||
|
||||
subtaskDeadline(value) {
|
||||
return moment(value).format('DD.MM.yyyy')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user