diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 10186d92a..a6065e451 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -705,6 +705,8 @@ order: quantity: Quantity price: Price amount: Amount + confirm: Confirm + confirmLines: Confirm lines department: pageTitles: basicData: Basic data diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 66b5efd52..6f01f7dd1 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -681,13 +681,15 @@ order: vat: IVA state: Estado alias: Alias - items: Items + items: Artículos orderTicketList: Tickets del pedido details: Detalles item: Item quantity: Cantidad price: Precio amount: Monto + confirm: Confirmar + confirmLines: Confirmar lineas shelving: list: parking: Parking diff --git a/src/pages/Order/Card/OrderCatalog.vue b/src/pages/Order/Card/OrderCatalog.vue index b13e8661d..f9bcca94c 100644 --- a/src/pages/Order/Card/OrderCatalog.vue +++ b/src/pages/Order/Card/OrderCatalog.vue @@ -102,6 +102,7 @@ function extractValueTags(items) { :key="row.id" :item="row" is-catalog + class="fill-icon" /> diff --git a/src/pages/Order/Card/OrderDescriptor.vue b/src/pages/Order/Card/OrderDescriptor.vue index a035971b0..74c8d8bed 100644 --- a/src/pages/Order/Card/OrderDescriptor.vue +++ b/src/pages/Order/Card/OrderDescriptor.vue @@ -71,10 +71,6 @@ const getConfirmationValue = (isConfirmed) => { }; const total = ref(null); - -function ticketFilter(order) { - return JSON.stringify({ id: order.id }); -} - + {{ t('confirm') }} @@ -401,4 +402,5 @@ es: confirmDeletion: Confirmar eliminación, confirmDeletionMessage: Seguro que quieres eliminar este artículo? confirm: Confirmar + Remove item: Eliminar artículo diff --git a/src/pages/Order/Card/OrderSummary.vue b/src/pages/Order/Card/OrderSummary.vue index 60358f744..032af1993 100644 --- a/src/pages/Order/Card/OrderSummary.vue +++ b/src/pages/Order/Card/OrderSummary.vue @@ -2,7 +2,10 @@ import { computed, ref } from 'vue'; import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; +import { useQuasar } from 'quasar'; import { dashIfEmpty, toCurrency, toDateHourMinSec } from 'src/filters'; +import { useArrayData } from 'composables/useArrayData'; +import { confirm } from 'src/pages/Order/composables/confirmOrder'; import VnLv from 'components/ui/VnLv.vue'; import CardSummary from 'components/ui/CardSummary.vue'; import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue'; @@ -21,6 +24,9 @@ const $props = defineProps({ }); const entityId = computed(() => $props.id || route.params.id); +const summary = ref(); +const quasar = useQuasar(); +const descriptorData = useArrayData('orderData'); const detailsColumns = ref([ { name: 'item', @@ -49,6 +55,18 @@ const detailsColumns = ref([ field: (row) => toCurrency(row?.quantity * row?.price), }, ]); + +async function handleConfirm() { + const result = await confirm(route.params.id); + if (result) { + quasar.notify({ + message: t('globals.dataSaved'), + type: 'positive', + }); + summary.value.fetch({}); + descriptorData.fetch({}); + } +} +