mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
63 lines
1.5 KiB
Vue
63 lines
1.5 KiB
Vue
<template>
|
|
<div>
|
|
<h1 class="px-3 py-3">Teams</h1>
|
|
<v-table>
|
|
<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="editTeam(team)" />
|
|
<img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" @click.stop="deleteTeam(team)" />
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</v-table>
|
|
|
|
<Z-team-modal ref="z-team-modal" />
|
|
<!-- Kravarik: Aj tento modal prerob novym sposobom -->
|
|
<!-- <Z-delete-team-modal v-if="deleteModal" :visible="deleteModal ? true : false" :team="deleteModal.team" @close="(deleteModal = null)" /> -->
|
|
<Z-delete-team-modal ref="z-delete-team-modal" />
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import ZDeleteTeamModal from '@/plugins/tm@modal/team/z-delete-team-modal.vue'
|
|
import ZTeamModal from '@/plugins/tm@modal/team/z-team-modal.vue'
|
|
|
|
export default {
|
|
components: {
|
|
ZDeleteTeamModal,
|
|
ZTeamModal
|
|
},
|
|
|
|
props: {
|
|
teams: {
|
|
type: Array,
|
|
required: true
|
|
}
|
|
},
|
|
|
|
data() {
|
|
return {
|
|
deleteModal: null
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
editTeam(team) {
|
|
this.$refs['z-team-modal'].create(team)
|
|
},
|
|
|
|
deleteTeam(team) {
|
|
this.$refs['z-delete-team-modal'].delete(team)
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="sass" scoped>
|
|
v-table, th, td
|
|
border: thin solid rgba(var(--v-border-color), var(--v-border-opacity))
|
|
</style> |