forked from verdnatura/salix-front
refactor: exclusionCreate function and translations
This commit is contained in:
parent
61d0d71538
commit
6263481a3e
|
@ -124,8 +124,7 @@ const columns = computed(() => [
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
en:
|
es:
|
||||||
Search suppliers: Search suppliers
|
|
||||||
es:
|
|
||||||
Search suppliers: Buscar proveedores
|
Search suppliers: Buscar proveedores
|
||||||
|
Create Supplier: Crear proveedor
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -67,12 +67,12 @@ const exclusionGeoCreate = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const exclusionCreate = async () => {
|
const exclusionCreate = async () => {
|
||||||
if (isNew.value || props.event?.type)
|
const url = `Zones/${route.params.id}/exclusions`;
|
||||||
await axios.post(`Zones/${route.params.id}/exclusions`, [{ dated: dated }]);
|
const body = {
|
||||||
else
|
dated,
|
||||||
await axios.put(`Zones/${route.params.id}/exclusions/${props.event?.id}`, {
|
};
|
||||||
dated: dated,
|
if (isNew.value || props.event?.type) await axios.post(`${url}`, [body]);
|
||||||
});
|
else await axios.put(`${url}/${props.event?.id}`, body);
|
||||||
await refetchEvents();
|
await refetchEvents();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,8 @@ eventsPanel:
|
||||||
events: Events
|
events: Events
|
||||||
everyday: Everyday
|
everyday: Everyday
|
||||||
delete: Delete
|
delete: Delete
|
||||||
|
deleteTitle: This item will be deleted
|
||||||
|
deleteSubtitle: Are you sure you want to continue?
|
||||||
eventsExclusionForm:
|
eventsExclusionForm:
|
||||||
addExclusion: Add exclusion
|
addExclusion: Add exclusion
|
||||||
editExclusion: Edit exclusion
|
editExclusion: Edit exclusion
|
||||||
|
|
|
@ -61,6 +61,8 @@ eventsPanel:
|
||||||
events: Eventos
|
events: Eventos
|
||||||
everyday: Todos los días
|
everyday: Todos los días
|
||||||
delete: Eliminar
|
delete: Eliminar
|
||||||
|
deleteTitle: Eliminar evento
|
||||||
|
deleteSubtitle: ¿Seguro que quieres eliminar este evento?
|
||||||
eventsExclusionForm:
|
eventsExclusionForm:
|
||||||
addExclusion: Añadir exclusión
|
addExclusion: Añadir exclusión
|
||||||
editExclusion: Editar exclusión
|
editExclusion: Editar exclusión
|
||||||
|
|
Loading…
Reference in New Issue