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 });
-}
@@ -126,7 +122,11 @@ function ticketFilter(order) {
color="primary"
:to="{
name: 'TicketList',
- query: { table: ticketFilter(entity) },
+ query: {
+ table: JSON.stringify({
+ orderFk: entity.id,
+ }),
+ },
}"
>
{{ t('order.summary.orderTicketList') }}
diff --git a/src/pages/Order/Card/OrderDescriptorMenu.vue b/src/pages/Order/Card/OrderDescriptorMenu.vue
index 2695da4e5..461efa22f 100644
--- a/src/pages/Order/Card/OrderDescriptorMenu.vue
+++ b/src/pages/Order/Card/OrderDescriptorMenu.vue
@@ -23,8 +23,8 @@ function confirmRemove() {
.dialog({
component: VnConfirm,
componentProps: {
- title: t('globals.confirmDeletion'),
- message: t('confirmDeletionMessage'),
+ title: t('You are going to delete this order'),
+ message: t('Continue anyway?'),
promise: remove,
},
})
@@ -57,5 +57,6 @@ en:
es:
deleteOrder: Eliminar pedido
confirmDeletionMessage: Seguro que quieres eliminar este pedido?
-
+ You are going to delete this order: El pedido se eliminará
+ Continue anyway?: ¿Continuar de todos modos?
diff --git a/src/pages/Order/Card/OrderLines.vue b/src/pages/Order/Card/OrderLines.vue
index 5aec976fa..58c5c9551 100644
--- a/src/pages/Order/Card/OrderLines.vue
+++ b/src/pages/Order/Card/OrderLines.vue
@@ -6,6 +6,7 @@ import { useQuasar } from 'quasar';
import axios from 'axios';
import { useStateStore } from 'stores/useStateStore';
import { useArrayData } from 'composables/useArrayData';
+import { confirm } from 'src/pages/Order/composables/confirmOrder';
import { toCurrency, toDate } from 'src/filters';
import VnConfirm from 'components/ui/VnConfirm.vue';
@@ -31,7 +32,6 @@ const orderSummary = ref({
});
const getTotalRef = ref();
const getVATRef = ref();
-
const lineFilter = ref({
include: [
{
@@ -168,7 +168,7 @@ const columns = computed(() => [
name: 'tableActions',
actions: [
{
- title: t('Delete'),
+ title: t('Remove item'),
icon: 'delete',
show: (row) => !row.order.isConfirmed,
action: (row) => confirmRemove(row),
@@ -204,20 +204,21 @@ async function remove(item) {
getVATRef.value.fetch();
}
-async function confirmOrder() {
- await axios.post(`Orders/${route.params.id}/confirm`);
- quasar.notify({
- message: t('globals.confirm'),
- type: 'positive',
- });
- router.push({
- name: 'TicketList',
- query: {
- table: JSON.stringify({ clientFk: descriptorData.store.data.clientFk }),
- },
- });
+async function handleConfirm() {
+ const result = await confirm(route.params.id);
+ if (result) {
+ quasar.notify({
+ message: t('globals.dataSaved'),
+ type: 'positive',
+ });
+ router.push({
+ name: 'TicketList',
+ query: {
+ table: JSON.stringify({ clientFk: descriptorData.store.data.clientFk }),
+ },
+ });
+ }
}
-
watch(
() => router.currentRoute.value.params.id,
() => {
@@ -314,7 +315,7 @@ watch(
-
+
{{ 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({});
+ }
+}
@@ -62,6 +80,17 @@ const detailsColumns = ref([
{{ t('order.summary.basket') }} #{{ entity?.id }} -
{{ entity?.client?.name }} ({{ entity?.clientFk }})
+
+
+ {{ t('order.summary.confirmLines') }}
+
+