feat: refs #7119 implement async delete functionality for vehicle items
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
2e4610847d
commit
d40b6fb06b
|
@ -1,11 +1,25 @@
|
|||
<script setup>
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||
import axios from 'axios';
|
||||
</script>
|
||||
<template>
|
||||
<CardDescriptor module="Vehicle" data-key="Vehicle" title="numberPlate">
|
||||
<template #menu="{ entity }">
|
||||
<QItem v-ripple clickable @click="axios.delete(`Vehicles/${entity.id}`)">
|
||||
<QItem
|
||||
v-ripple
|
||||
clickable
|
||||
@click="
|
||||
async () => {
|
||||
try {
|
||||
await axios.delete(`Vehicles/${entity.id}`);
|
||||
$router.push({ name: 'VehicleList' });
|
||||
} catch (e) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
"
|
||||
>
|
||||
<QItemSection>
|
||||
{{ $t('vehicle.delete') }}
|
||||
</QItemSection>
|
||||
|
|
Loading…
Reference in New Issue