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 });
-}
@@ -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') }}
+
+
diff --git a/test/cypress/integration/outLogin/logout.spec.js b/test/cypress/integration/outLogin/logout.spec.js
index 8d4e90aac..d6c33a65b 100644
--- a/test/cypress/integration/outLogin/logout.spec.js
+++ b/test/cypress/integration/outLogin/logout.spec.js
@@ -13,7 +13,7 @@ describe('Logout', () => {
});
describe('not user', () => {
beforeEach(() => {
- cy.intercept('GET', '**DefaultViewConfigs**', {
+ cy.intercept('GET', '**StarredModules**', {
statusCode: 401,
body: {
error: {
@@ -29,10 +29,7 @@ describe('Logout', () => {
it('when token not exists', () => {
cy.get('.q-list > [href="#/item"]').click();
- cy.get('.q-notification__message').should(
- 'have.text',
- 'Authorization Required'
- );
+ cy.checkNotification('Authorization Required');
});
});
});