bloker-modal, master-task-modal, date-picker

This commit is contained in:
romankko2 committed 2022-12-05 18:46:01 +01:00
1 parent 46572a61f5
commit e6198ea89f
18 files changed
+591 -257

No files matched your search

@@ -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)
}