diff --git a/src/components/ui/VnConfirm.vue b/src/components/ui/VnConfirm.vue index d6b1ac0a3..081812093 100644 --- a/src/components/ui/VnConfirm.vue +++ b/src/components/ui/VnConfirm.vue @@ -35,6 +35,7 @@ defineExpose({ show: () => dialogRef.value.show(), hide: () => dialogRef.value.h const { dialogRef, onDialogHide, onDialogOK, onDialogCancel } = useDialogPluginComponent(); +defineExpose({ show: () => dialogRef.value.show(), hide: () => dialogRef.value.hide() }); const title = props.title || t('Confirm'); const message = 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/Entry/EntryBuysTableDialog.vue b/src/pages/Entry/EntryBuysTableDialog.vue index 0f9be6298..23a6a0021 100644 --- a/src/pages/Entry/EntryBuysTableDialog.vue +++ b/src/pages/Entry/EntryBuysTableDialog.vue @@ -121,7 +121,7 @@ const entriesTableColumns = computed(() => [ :loading="isLoading" @click=" openReport( - `Entries/${props.row.id}/buy-label` + `Entries/${props.row.id}/buy-label-supplier` ) " unelevated diff --git a/src/pages/Item/ItemList.vue b/src/pages/Item/ItemList.vue index a6873d10c..a480cfff6 100644 --- a/src/pages/Item/ItemList.vue +++ b/src/pages/Item/ItemList.vue @@ -215,7 +215,7 @@ const columns = computed(() => [ columnFilter: { name: 'workerFk', attrs: { - url: 'VnUsers/preview', + url: 'TicketRequests/getItemTypeWorker', optionValue: 'id', optionLabel: 'nickname', }, diff --git a/src/pages/Item/ItemRequest.vue b/src/pages/Item/ItemRequest.vue index 36da0368b..61156640e 100644 --- a/src/pages/Item/ItemRequest.vue +++ b/src/pages/Item/ItemRequest.vue @@ -104,7 +104,7 @@ const columns = computed(() => [ columnFilter: { name: 'attenderFk', attrs: { - url: 'VnUsers/preview', + url: 'TicketRequests/getItemTypeWorker', optionValue: 'id', optionLabel: 'nickname', }, 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({}); + } +} +