mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 22:39:34 +00:00
bloker-modal, master-task-modal, date-picker
This commit is contained in:
1 parent
46572a61f5
commit
e6198ea89f
18 files changed
+591
-257
No files matched your search
@@ -19,9 +19,9 @@
|
||||
<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" />
|
||||
<img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" @click.stop="showDeleteModal = true" />
|
||||
<img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" @click.stop="showDeleteModal = { task }" />
|
||||
|
||||
<A-delete-task-modal :show="showDeleteModal" :task="task" @delete-task="deleteTask" @close-modal="showDeleteModal = false" />
|
||||
<A-delete-task-modal v-if="showDeleteModal" :show="showDeleteModal" :task="showDeleteModal.task" @delete-task="deleteTask(showDeleteModal.task.id)" @close-modal="(showDeleteModal = null)" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -46,7 +46,7 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
showDeleteModal: false
|
||||
showDeleteModal: null
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
<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">
|
||||
<img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" @click.stop="showDeleteModal = true">
|
||||
<img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" @click.stop="showDeleteModal = { task }">
|
||||
|
||||
<A-delete-task-modal :show="showDeleteModal" :task="task" @delete-task="deleteTask" @close-modal="showDeleteModal = false" />
|
||||
<A-delete-task-modal v-if="showDeleteModal" :show="showDeleteModal" :task="showDeleteModal.task" @delete-task="deleteTask(showDeleteModal.task.id)" @close-modal="(showDeleteModal = null)" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -44,7 +44,7 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
showDeleteModal: false
|
||||
showDeleteModal: null
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -1,37 +1,39 @@
|
||||
<template>
|
||||
<v-table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-left">Názov</th>
|
||||
<th class="text-left">Akcia</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<div>
|
||||
<v-table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-left">Názov</th>
|
||||
<th class="text-left">Akcia</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr v-for="team in teams" :key="team.id">
|
||||
<td>{{ team.name }}</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" @click.stop="showEditModal = true" />
|
||||
<img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" @click.stop="showDeleteModal = true" />
|
||||
<tbody>
|
||||
<tr v-for="team in teams" :key="team.id">
|
||||
<td>{{ team.name }}</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" @click.stop="editModal = { team }" />
|
||||
<img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" @click.stop="deleteModal = { team }" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</v-table>
|
||||
|
||||
<A-edit-team-modal :show="showEditModal" :team="team" @close-modal="showEditModal = false" />
|
||||
<A-delete-team-modal :show="showDeleteModal" :team="team" @delete-team="deleteTeam" @close-modal="showDeleteModal = false" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</v-table>
|
||||
<A-team-form-modal v-if="editModal" :show="editModal" :teamId="editModal.team.id" @close-modal="(editModal = null)" />
|
||||
<A-delete-team-modal v-if="deleteModal" :show="deleteModal" :team="deleteModal.team" @delete-team="deleteTeam" @close-modal="(deleteModal = null)" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ADeleteTeamModal from '@/plugins/app/_components/a-delete-team-modal.vue'
|
||||
import AEditTeamModal from '@/plugins/app/_components/a-edit-team-modal.vue'
|
||||
import ATeamFormModal from '@/plugins/app/_components/a-team-form-modal.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ADeleteTeamModal,
|
||||
AEditTeamModal
|
||||
ATeamFormModal
|
||||
},
|
||||
|
||||
props: {
|
||||
@@ -43,8 +45,8 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
showDeleteModal: false,
|
||||
showEditModal: false
|
||||
editModal: null,
|
||||
deleteModal: null
|
||||
}
|
||||
},
|
||||
|
||||
@@ -52,7 +54,7 @@ export default {
|
||||
async deleteTeam(id) {
|
||||
try {
|
||||
await this.$axios.delete(`v1/teams/${id}`)
|
||||
this.showDeleteModal = false
|
||||
this.deleteModal = null
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user