@@ -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')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user