mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +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 Event from './event.vue'
|
||||||
import tmUtils from '@/plugins/tm@_utils/tm.utils'
|
import tmUtils from '@/plugins/tm@_utils/tm.utils'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
inject: ['vuecal', 'utils', 'modules', 'view', 'domEvents'],
|
inject: ['vuecal', 'utils', 'modules', 'view', 'domEvents'],
|
||||||
@@ -265,7 +266,8 @@ export default {
|
|||||||
|
|
||||||
this.$events.emit('show-menu-modal', {
|
this.$events.emit('show-menu-modal', {
|
||||||
time: time,
|
time: time,
|
||||||
date: tmUtils.formatDateTimeForBackend(dateFrom)
|
date: tmUtils.formatDateTimeForBackend(dateFrom),
|
||||||
|
employee: this.user.id
|
||||||
})
|
})
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -308,6 +310,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapGetters("auth", ["user"]),
|
||||||
// Drag & drop module.
|
// Drag & drop module.
|
||||||
dnd () {
|
dnd () {
|
||||||
return this.modules.dnd
|
return this.modules.dnd
|
||||||
|
|||||||
@@ -64,7 +64,8 @@ export default {
|
|||||||
blocker: null,
|
blocker: null,
|
||||||
datepicker: null,
|
datepicker: null,
|
||||||
starts_at_time: null,
|
starts_at_time: null,
|
||||||
ends_at_time: null
|
ends_at_time: null,
|
||||||
|
employee: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -112,9 +113,10 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.blocker = {start: null }
|
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.datepicker = blocker.datepicker
|
||||||
this.starts_at_time = blocker.starts_at_time
|
this.starts_at_time = blocker.starts_at_time
|
||||||
|
this.blocker.employee_id = blocker.employee_id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export default {
|
|||||||
this.$events.emit('show-subtask-modal', {
|
this.$events.emit('show-subtask-modal', {
|
||||||
subtask: {
|
subtask: {
|
||||||
deadline: this.localData.date,
|
deadline: this.localData.date,
|
||||||
_deadline_time: this.localData.time,
|
_deadline_time: this.localData.time
|
||||||
},
|
},
|
||||||
onTaskCreated: () => {
|
onTaskCreated: () => {
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
@@ -70,6 +70,7 @@ export default {
|
|||||||
blocker: {
|
blocker: {
|
||||||
starts_at_time: this.localData.time,
|
starts_at_time: this.localData.time,
|
||||||
datepicker: this.localData.date,
|
datepicker: this.localData.date,
|
||||||
|
employee_id: this.localData.employee
|
||||||
},
|
},
|
||||||
onBlockerCreated: () => {
|
onBlockerCreated: () => {
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
|
|||||||
@@ -15,6 +15,11 @@
|
|||||||
{{ employee.name.charAt(0) + employee.surname.charAt(0) }}
|
{{ employee.name.charAt(0) + employee.surname.charAt(0) }}
|
||||||
</p>
|
</p>
|
||||||
<p class="ml-2" v-html="`${employee.name} ${employee.surname}`" />
|
<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-sheet>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th class="text-left">Kód projektu</th>
|
<th class="text-left">Kód projektu</th>
|
||||||
<th class="text-left">Názov</th>
|
<th class="text-left">Názov</th>
|
||||||
|
<th class="text-left">Deadline</th>
|
||||||
<th class="text-left">Trvanie</th>
|
<th class="text-left">Trvanie</th>
|
||||||
<th class="text-left">Akcia</th>
|
<th class="text-left">Akcia</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -14,6 +15,8 @@
|
|||||||
|
|
||||||
<td>{{ subtask.project_code }}</td>
|
<td>{{ subtask.project_code }}</td>
|
||||||
<td>{{ subtask.title ?? subtask.master_task?.name ?? subtask.master_task }}</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>{{ subtask.spent_time }} h</td>
|
||||||
<td class="task-action">
|
<td class="task-action">
|
||||||
<div class="d-flex justify-start">
|
<div class="d-flex justify-start">
|
||||||
@@ -28,6 +31,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import moment from 'moment'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
subtasks: {
|
subtasks: {
|
||||||
@@ -43,6 +48,10 @@ export default {
|
|||||||
|
|
||||||
deleteTask(subtask) {
|
deleteTask(subtask) {
|
||||||
this.$events.emit('show-delete-task-modal', {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