0
0
Fork 0

refactor: exclusionCreate function and translations

This commit is contained in:
Jon Elias 2024-11-28 13:42:22 +01:00
parent 61d0d71538
commit 6263481a3e
4 changed files with 12 additions and 9 deletions

View File

@ -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>

View File

@ -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();
}; };

View File

@ -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

View File

@ -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