diff --git a/src/pages/Supplier/SupplierList.vue b/src/pages/Supplier/SupplierList.vue index 69f826201..a54012b34 100644 --- a/src/pages/Supplier/SupplierList.vue +++ b/src/pages/Supplier/SupplierList.vue @@ -124,8 +124,7 @@ const columns = computed(() => [ -en: - Search suppliers: Search suppliers -es: + es: Search suppliers: Buscar proveedores + Create Supplier: Crear proveedor diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue index 9aa591766..5bda60cba 100644 --- a/src/pages/Ticket/Card/TicketSummary.vue +++ b/src/pages/Ticket/Card/TicketSummary.vue @@ -257,7 +257,7 @@ function toTicketUrl(section) { -import { ref, computed, onMounted } from 'vue'; +import { ref, computed, onMounted, reactive } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRoute } from 'vue-router'; @@ -43,7 +43,7 @@ const { t } = useI18n(); const { openConfirmationModal } = useVnConfirm(); const isNew = computed(() => props.isNewMode); -const dated = ref(props.date); +const dated = reactive(props.date); const tickedNodes = ref(); const _excludeType = ref('all'); @@ -67,12 +67,12 @@ const exclusionGeoCreate = async () => { }; const exclusionCreate = async () => { - if (isNew.value) - await axios.post(`Zones/${route.params.id}/exclusions`, [{ dated: dated.value }]); - else - await axios.post(`Zones/${route.params.id}/exclusions`, { - dated: dated.value, - }); + 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(); }; @@ -83,7 +83,8 @@ const onSubmit = async () => { const deleteEvent = async () => { if (!props.event) return; - await axios.delete(`Zones/${route.params.id}/exclusions`); + const exclusionId = props.event?.zoneExclusionFk || props.event?.id; + await axios.delete(`Zones/${route.params.id}/exclusions/${exclusionId}`); await refetchEvents(); }; @@ -118,11 +119,7 @@ onMounted(() => { >