mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[z-delete-masterTask-modal, spenTime formatted, addSubTask, style team in subTask detail]
This commit is contained in:
1 parent
5eea588984
commit
2c4299616d
8 files changed
+118
-71
No files matched your search
@@ -133,8 +133,8 @@
|
||||
<div class="d-flex justify-space-between align-center modal-header border-bottom pb-4">
|
||||
<h1>{{ masterTask.name }}</h1>
|
||||
<div class="d-flex justify-start">
|
||||
<img class="pencil-icon" :src="require('@/plugins/tm@overview/_img/pencil-icon.svg')" alt="pencil-icon" @click.stop="editMode = !editMode" />
|
||||
<img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" @click.stop="_delete()"/>
|
||||
<img class="icon" :src="require('@/plugins/tm@overview/_img/pencil-icon.svg')" alt="pencil-icon" @click.stop="editMode = !editMode" />
|
||||
<img class="icon trash" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" @click.stop="openDeleteMasterTaskModal(masterTask)" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -177,9 +177,9 @@
|
||||
</v-sheet>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row no-gutters class="align-center">
|
||||
<v-row no-gutters>
|
||||
<v-col cols="5">
|
||||
<v-sheet class="pa-2 ma-2">
|
||||
<v-sheet class="pa-2 ma-2 pt-0">
|
||||
<div class="d-flex align-center">
|
||||
<v-icon
|
||||
icon="mdi-account-multiple-outline"
|
||||
@@ -190,9 +190,9 @@
|
||||
</v-sheet>
|
||||
</v-col>
|
||||
<v-col cols="7">
|
||||
<v-sheet class="ma-2 d-flex scroll-employees">
|
||||
<p class="task-badge px-4 py-2 rounded-pill flex-shrink-0">{{ masterTask.team }}</p>
|
||||
<div class="d-flex align-center flex-shrink-0 mx-3" v-for="(employee, index) in masterTask.employees" :key="employee.id">
|
||||
<v-sheet class="d-flex flex-wrap flex-column">
|
||||
<p class="task-badge px-4 py-2 rounded-pill flex-shrink-0">Tu bude vypisany nazov Timu</p>
|
||||
<div class="d-flex align-center flex-shrink-0 mt-2 task-badge px-4 py-2 rounded-pill" v-for="(employee, index) in masterTask.employees" :key="employee.id">
|
||||
<p class="employee-selected-avatar d-flex justify-center align-center">
|
||||
{{ employee.name.charAt(0) + employee.surname.charAt(0) }}
|
||||
</p>
|
||||
@@ -273,14 +273,14 @@
|
||||
</div>
|
||||
<v-table class="mt-7 mb-5">
|
||||
<tbody class="px-5 py-5">
|
||||
<!-- Kravarik: natiahnut toto z masterTask.tasks -->
|
||||
<tr v-for="(employee, index) in masterTask.employees" :key="employee.id">
|
||||
<td class="w-25">{{ masterTask.name }}</td>
|
||||
<tr v-for="task in masterTask.subtasks" :key="task.id">
|
||||
<td class="w-25">{{ task.master_task }}</td>
|
||||
<td class="d-flex align-center">
|
||||
<p class="employee-selected-avatar d-flex justify-center align-center">
|
||||
{{ employee.name.charAt(0) + employee.surname.charAt(0) }}
|
||||
<!-- {{ task.name.charAt(0) + employee.surname.charAt(0) }} -->IN
|
||||
</p>
|
||||
<p class="ml-2" v-html="`${masterTask.employees[index].name} ${masterTask.employees[index].surname}`" />
|
||||
<!-- <p class="ml-2" v-html="`${masterTask.task[index].name} ${masterTask.task[index].surname}`" /> -->
|
||||
<p>Meno zamestnanca</p>
|
||||
</td>
|
||||
<td class="task-action">
|
||||
<div class="d-flex justify-start">
|
||||
@@ -293,7 +293,7 @@
|
||||
</tbody>
|
||||
</v-table>
|
||||
<div class="d-flex align-center ">
|
||||
<v-btn class="subtask-btn w-100"><v-icon class="mx-1" icon="mdi-plus" />Pridať Subtask</v-btn>
|
||||
<v-btn class="subtask-btn w-100" @click="addTask()" ><v-icon class="mx-1" icon="mdi-plus" />Pridať Subtask</v-btn>
|
||||
</div>
|
||||
</div>
|
||||
</v-card-actions>
|
||||
@@ -358,6 +358,12 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.$events.on('on-master-task-deleted', (masterTask) => {
|
||||
if (masterTask?.id == this.masterTask?.id) this.closeModal()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
itemSelected(x) {
|
||||
console.log(x)
|
||||
@@ -385,7 +391,6 @@ export default {
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
}
|
||||
console.log(this.masterTask)
|
||||
},
|
||||
|
||||
async save() {
|
||||
@@ -410,15 +415,8 @@ export default {
|
||||
this.$emit('close', this.masterTask)
|
||||
},
|
||||
|
||||
async _delete() {
|
||||
// Kravarik: Tu sa ma volat delete-master-task-modal, ak taka funkcionalita vlastne je
|
||||
|
||||
// try {
|
||||
// await this.$axios.delete(`v1/master-tasks/${this.masterTask.id}`)
|
||||
// this.closeModal()
|
||||
// } catch (error) {
|
||||
// this.$toast.error(error)
|
||||
// }
|
||||
openDeleteMasterTaskModal(masterTask) {
|
||||
this.$events.emit('show-delete-master-task-modal', { masterTask })
|
||||
},
|
||||
|
||||
employeeSelected(selectedOption) {
|
||||
@@ -429,7 +427,11 @@ export default {
|
||||
|
||||
filesUploaded(files) {
|
||||
this.masterTask.files = files
|
||||
}
|
||||
},
|
||||
|
||||
addTask() {
|
||||
this.$events.emit('show-task-modal', {})
|
||||
},
|
||||
},
|
||||
|
||||
computed: {
|
||||
@@ -502,9 +504,6 @@ export default {
|
||||
.scrolling
|
||||
overflow: hidden !important
|
||||
|
||||
.scroll-employees
|
||||
overflow-x: scroll
|
||||
|
||||
.border-bottom
|
||||
border-bottom: 1px solid rgba(0,0,0,.1)
|
||||
|
||||
|
||||
Reference in new issue
Block a user