[quill editor, detail modals, ongoing & unscheduled modals, review, download files]

This commit is contained in:
romankko2 committed 2023-01-24 23:01:12 +01:00
1 parent 33dfb2bd6f
commit 65adc7e3cf
16 files changed
+567 -242

No files matched your search

@@ -10,30 +10,34 @@
</thead>
<tbody>
<tr v-for="task in tasks" :key="task.id">
<tr class="cursor-pointer" v-for="task in tasks" :key="task.id" @click.stop="editTask(task, false)">
<td>{{ task.project_code }}</td>
<td>{{ task.title }}</td>
<td>{{ (task.duration / 1000 / 60 / 60).toFixed(2) }} h</td>
<td class="task-action">
<div class="d-flex justify-start">
<img class="pencil-icon" :src="require('@/plugins/tm@overview/_img/pencil-icon.svg')" alt="pencil-icon" :style="{opacity: 0.3}">
<img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" @click.stop="showDeleteModal = { task }">
<!-- Kravarik: Aj tento modal prerob novym sposobom -->
<Z-delete-task-modal v-if="showDeleteModal" :visible="showDeleteModal ? true : false" :task="showDeleteModal.task" @close="showDeleteModal = null" />
<img class="pencil-icon" :src="require('@/plugins/tm@overview/_img/pencil-icon.svg')" alt="pencil-icon" @click.stop="editTask(task, true)">
<img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" @click.stop="deleteTask(task)">
</div>
</td>
</tr>
</tbody>
<Z-sub-task-modal ref="z-sub-task-modal" />
<Z-delete-task-modal ref="z-delete-task-modal" @deleted="onTaskDeleted"/>
</v-table>
</template>
<script>
import ZDeleteTaskModal from '@/plugins/tm@modal/task/z-delete-task-modal.vue'
import ZSubTaskModal from '@/plugins/tm@modal/sub-task/z-sub-task-modal.vue'
export default {
emits: ['refresh'],
components: {
ZDeleteTaskModal
ZDeleteTaskModal,
ZSubTaskModal
},
props: {
@@ -43,9 +47,17 @@ export default {
}
},
data() {
return {
showDeleteModal: null
methods: {
deleteTask(task) {
this.$refs['z-delete-task-modal'].delete(task)
},
onTaskDeleted() {
this.$emit('refresh')
},
editTask(task, editMode) {
this.$refs['z-sub-task-modal'].create(task, editMode)
}
}
}
@@ -65,4 +77,8 @@ v-table, th, td
border-radius: 50%
margin: 6px
padding: 6px
tbody
tr:hover
background: rgba(0,0,0,.1)
</style>