feat: refs #7119 add notification for successful vehicle removal and update locale files
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
d40b6fb06b
commit
d86548f70e
|
@ -2,6 +2,9 @@
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
import useNotify from 'src/composables/useNotify.js';
|
||||||
|
|
||||||
|
const { notify } = useNotify();
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor module="Vehicle" data-key="Vehicle" title="numberPlate">
|
<CardDescriptor module="Vehicle" data-key="Vehicle" title="numberPlate">
|
||||||
|
@ -13,6 +16,7 @@ import axios from 'axios';
|
||||||
async () => {
|
async () => {
|
||||||
try {
|
try {
|
||||||
await axios.delete(`Vehicles/${entity.id}`);
|
await axios.delete(`Vehicles/${entity.id}`);
|
||||||
|
notify('vehicle.remove', 'positive');
|
||||||
$router.push({ name: 'VehicleList' });
|
$router.push({ name: 'VehicleList' });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw e;
|
throw e;
|
||||||
|
@ -33,3 +37,7 @@ import axios from 'axios';
|
||||||
</template>
|
</template>
|
||||||
</CardDescriptor>
|
</CardDescriptor>
|
||||||
</template>
|
</template>
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Vehicle removed: Vehículo eliminado
|
||||||
|
</i18n>
|
||||||
|
|
|
@ -12,6 +12,7 @@ vehicle:
|
||||||
nLeasing: Nº Leasing
|
nLeasing: Nº Leasing
|
||||||
create: Create Vehicle
|
create: Create Vehicle
|
||||||
amountCooler: Amount cooler
|
amountCooler: Amount cooler
|
||||||
|
remove: Vehicle removed
|
||||||
searchbar:
|
searchbar:
|
||||||
label: Search Vehicle
|
label: Search Vehicle
|
||||||
info: Search by id or number plate
|
info: Search by id or number plate
|
||||||
|
|
|
@ -12,6 +12,7 @@ vehicle:
|
||||||
amountCooler: Importe frío
|
amountCooler: Importe frío
|
||||||
isActive: Activo
|
isActive: Activo
|
||||||
nLeasing: Nº leasing
|
nLeasing: Nº leasing
|
||||||
|
remove: Vehículo eliminado
|
||||||
searchbar:
|
searchbar:
|
||||||
label: Buscar Vehículo
|
label: Buscar Vehículo
|
||||||
info: Buscar por id o matrícula
|
info: Buscar por id o matrícula
|
||||||
|
|
Loading…
Reference in New Issue