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