This commit is contained in:
romankko2 committed 2023-10-18 23:52:15 +02:00
commit 1b46201360
4 files changed
+9 -5

No files matched your search

+4 -1
View File
@@ -1,7 +1,7 @@
<template> <template>
<div ref="page"> <div ref="page">
<A-task-filter v-if="$store.getters['tm/isInitialized']" :split-days="timelineData ? splitDays : null" @filter-changed="onFilterChanged" ref="filter" /> <A-task-filter v-if="$store.getters['tm/isInitialized']" :split-days="timelineData ? splitDays : null" @filter-changed="onFilterChanged" ref="filter" />
<Z-timeline v-if="timelineData" :calData="timelineData" :calConfig="config" :splits="splitDays" /> <Z-timeline v-if="timelineData && !hideCal" :calData="timelineData" :calConfig="config" :splits="splitDays" />
</div> </div>
</template> </template>
@@ -24,6 +24,7 @@ export default {
data() { data() {
return { return {
hideCal: false,
filter: null, filter: null,
subtasks: null, subtasks: null,
config: { config: {
@@ -174,6 +175,8 @@ export default {
this.config.scrollHour = (this.filter?.employee.work_start) - 1 this.config.scrollHour = (this.filter?.employee.work_start) - 1
this.config.date = this.filter.start this.config.date = this.filter.start
this.subtasks = [...subtasks, ...blockers] this.subtasks = [...subtasks, ...blockers]
this.hideCal = true
setTimeout(() => { this.hideCal = false }, 0)
} catch (error) { } catch (error) {
this.$toast.error('Nepodarilo sa nacitat data!') this.$toast.error('Nepodarilo sa nacitat data!')
} }
+1 -1
View File
@@ -81,7 +81,7 @@ export default {
this.subtasks = subtasks this.subtasks = subtasks
this.blockers = blockers this.blockers = blockers
this.hideCal = true this.hideCal = true
setTimeout(() => { this.hideCal = false }, 0); setTimeout(() => { this.hideCal = false }, 0)
} catch (error) { } catch (error) {
this.$toast.error('Nepodarilo sa nacitat data!') this.$toast.error('Nepodarilo sa nacitat data!')
} }
@@ -57,7 +57,8 @@ 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,
employee_id: this.localData.employee
}, },
onTaskCreated: () => { onTaskCreated: () => {
this.closeModal() this.closeModal()
@@ -48,7 +48,6 @@
</template> </template>
<template v-else> <template v-else>
<!-- R: Subtask nemoze mat viacero employees ci? Vyhodit -->
<div v-for="(employee, index) in subtask.employees" :key="`employee-${index}`" class="splitted-inputs remove-employee" :class="{'hide-arrow': employee.id}"> <div v-for="(employee, index) in subtask.employees" :key="`employee-${index}`" class="splitted-inputs remove-employee" :class="{'hide-arrow': employee.id}">
<v-autocomplete :custom-filter="customFilter" :match-any="true" v-model="employee.id" label="Priradený" :items="enrichedEmployees" item-title="_fullName" item-value="id" variant="solo" class="modal-input left" :class="{ error: employeeValidations[index]?.employee }" @update:model-value="employeeValidations[index] ? (employeeValidations[index].employee = false) : null" /> <v-autocomplete :custom-filter="customFilter" :match-any="true" v-model="employee.id" label="Priradený" :items="enrichedEmployees" item-title="_fullName" item-value="id" variant="solo" class="modal-input left" :class="{ error: employeeValidations[index]?.employee }" @update:model-value="employeeValidations[index] ? (employeeValidations[index].employee = false) : null" />
<svg v-if="employee.id" version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" class="dp__icon dp__clear_icon dp__input_icons" data-test="clear-icon" <svg v-if="employee.id" version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" class="dp__icon dp__clear_icon dp__input_icons" data-test="clear-icon"
@@ -224,7 +223,8 @@ export default {
} else { } else {
this.subtask = { master_task: mastertask, employees: [{}], _deadline_time: '17:00' } this.subtask = { master_task: mastertask, employees: [{}], _deadline_time: '17:00' }
if (subtask?.deadline && subtask._deadline_time) { if (subtask?.deadline && subtask._deadline_time && subtask.employee_id) {
this.subtask.employee_id = subtask.employee_id
this.subtask.deadline = subtask.deadline this.subtask.deadline = subtask.deadline
this.subtask._deadline_time = subtask._deadline_time this.subtask._deadline_time = subtask._deadline_time
} }