mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[subtask] zmazanie employee pri create, [mastertask] prefill name & project_code pri vytvarani subtasku
This commit is contained in:
1 parent
561f8942b0
commit
24c2fdce91
2 files changed
+35
-3
No files matched your search
@@ -335,7 +335,12 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
addTask() {
|
addTask() {
|
||||||
this.$events.emit('show-subtask-modal', { subtask: null, editMode: false, mastertask: this.mastertask })
|
this.$events.emit('show-subtask-modal', {
|
||||||
|
subtask: {
|
||||||
|
master_task_id: this.mastertask.id,
|
||||||
|
project_code: this.mastertask.project_code
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onQuillEditorInput() {
|
onQuillEditorInput() {
|
||||||
|
|||||||
@@ -49,8 +49,13 @@
|
|||||||
|
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<!-- R: Subtask nemoze mat viacero employees ci? Vyhodit -->
|
<!-- R: Subtask nemoze mat viacero employees ci? Vyhodit -->
|
||||||
<div v-for="(employee, index) in subtask.employees" :key="`employee-${index}`" class="splitted-inputs">
|
<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"
|
||||||
|
@click.prevent="employee.id = null">
|
||||||
|
<path d="M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"></path>
|
||||||
|
<path d="M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"></path>
|
||||||
|
</svg>
|
||||||
<v-text-field v-model="employee.duration" class="modal-input right" variant="solo" type="number" label="Časový odhad" append-inner-icon="mdi-clock-outline" :class="{ error: employeeValidations[index]?.duration }" @focus="onInputFocus" @update:model-value="employeeValidations[index] ? (employeeValidations[index].duration = false) : null" />
|
<v-text-field v-model="employee.duration" class="modal-input right" variant="solo" type="number" label="Časový odhad" append-inner-icon="mdi-clock-outline" :class="{ error: employeeValidations[index]?.duration }" @focus="onInputFocus" @update:model-value="employeeValidations[index] ? (employeeValidations[index].duration = false) : null" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -220,6 +225,11 @@ export default {
|
|||||||
this.subtask.deadline = subtask.deadline
|
this.subtask.deadline = subtask.deadline
|
||||||
this.subtask._deadline_time = subtask._deadline_time
|
this.subtask._deadline_time = subtask._deadline_time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(subtask?.master_task_id && subtask?.project_code) {
|
||||||
|
this.subtask.master_task_id = subtask.master_task_id
|
||||||
|
this.subtask.project_code = subtask.project_code
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.editMode = editMode || !this.subtask.id
|
this.editMode = editMode || !this.subtask.id
|
||||||
@@ -269,6 +279,7 @@ export default {
|
|||||||
this.$events.emit('on-subtask-edited', this.subtask)
|
this.$events.emit('on-subtask-edited', this.subtask)
|
||||||
})
|
})
|
||||||
this.$events.emit('task-created')
|
this.$events.emit('task-created')
|
||||||
|
this.$events.emit('close-both-modals')
|
||||||
}
|
}
|
||||||
|
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
@@ -408,6 +419,22 @@ export default {
|
|||||||
height: 50px
|
height: 50px
|
||||||
width: 203px
|
width: 203px
|
||||||
|
|
||||||
|
.remove-employee
|
||||||
|
position: relative
|
||||||
|
width: 100%
|
||||||
|
|
||||||
|
svg
|
||||||
|
position: absolute
|
||||||
|
right: 205px
|
||||||
|
top: 28px
|
||||||
|
z-index: 5
|
||||||
|
opacity: .5
|
||||||
|
|
||||||
|
&.hide-arrow ::v-deep
|
||||||
|
.mdi-menu-down,
|
||||||
|
.mdi-menu-up
|
||||||
|
display: none
|
||||||
|
|
||||||
.employee-wrapper
|
.employee-wrapper
|
||||||
position: relative
|
position: relative
|
||||||
width: 100%
|
width: 100%
|
||||||
@@ -417,7 +444,7 @@ export default {
|
|||||||
right: 4px
|
right: 4px
|
||||||
top: 28px
|
top: 28px
|
||||||
z-index: 5
|
z-index: 5
|
||||||
opacity: 0.5
|
opacity: .5
|
||||||
|
|
||||||
&.hide-arrow ::v-deep
|
&.hide-arrow ::v-deep
|
||||||
.mdi-menu-down,
|
.mdi-menu-down,
|
||||||
|
|||||||
Reference in new issue
Block a user