* delete action

feature: #6
This commit is contained in:
2023-01-11 20:36:20 +01:00
parent a3f98a1757
commit 15ab49ad7f
7 changed files with 140 additions and 11 deletions

View File

@@ -61,7 +61,7 @@ import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
v-if="isVerwaltung"
class="bg-red-500 text-white active:bg-red-600 font-bold uppercase text-xs px-4 py-2 rounded shadow hover:shadow-md outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150"
type="button"
@click="openDeleteDialog()">
@click="deleteContract(contract.id)">
Delete
</button>
<button
@@ -103,8 +103,9 @@ export default {
},
methods: {
...mapActions(['fetchContracts', 'openModal']),
openDeleteDialog() {
console.log('Prepare to delete')
async deleteContract(selectedId) {
await this.$store.commit('setSelectedContract', selectedId)
this.openModal('deleteModal')
}
}
}