-
-
-es:
- New price: Nuevo precio
-
diff --git a/src/pages/Ticket/Card/TicketNotes.vue b/src/pages/Ticket/Card/TicketNotes.vue
index feb88bf84..a3e25d63e 100644
--- a/src/pages/Ticket/Card/TicketNotes.vue
+++ b/src/pages/Ticket/Card/TicketNotes.vue
@@ -38,7 +38,9 @@ function handleDelete(row) {
ticketNotesCrudRef.value.remove([row]);
}
-async function handleSave() {
+async function handleSave(e) {
+ if (e.shiftKey && e.key === 'Enter') return;
+ e.preventDefault();
if (!isSaving.value) {
isSaving.value = true;
await ticketNotesCrudRef.value?.saveChanges();
@@ -70,7 +72,7 @@ async function handleSave() {
store.data?.ticketState?.state?.code);
const transfer = ref({
lastActiveTickets: [],
@@ -187,7 +187,7 @@ const getRowUpdateInputEvents = (sale) => {
};
const resetChanges = async () => {
- arrayData.fetch({ append: false });
+ await arrayData.fetch({ append: false });
tableRef.value.CrudModelRef.hasChanges = false;
await tableRef.value.reload();
@@ -308,14 +308,15 @@ const changePrice = async (sale) => {
if (newPrice != null && newPrice != sale.price) {
if (await isSalePrepared(sale)) {
await confirmUpdate(() => updatePrice(sale, newPrice));
- } else updatePrice(sale, newPrice);
+ } else await updatePrice(sale, newPrice);
}
};
const updatePrice = async (sale, newPrice) => {
try {
- await axios.post(`Sales/${sale.id}/updatePrice`, { newPrice });
- sale.price = newPrice;
- edit.value = { ...DEFAULT_EDIT };
+ await axios.post(`Sales/${sale.id}/updatePrice`, {
+ newPrice: newPrice,
+ componentId: componentId.value,
+ });
notify('globals.dataSaved', 'positive');
resetChanges();
} catch (e) {
@@ -327,28 +328,31 @@ const changeDiscount = async (sale) => {
const newDiscount = edit.value.discount;
if (newDiscount != null && newDiscount != sale.discount) {
if (await isSalePrepared(sale))
- await confirmUpdate(() => updateDiscount([sale], newDiscount));
- else await updateDiscount([sale], newDiscount);
+ await confirmUpdate(() =>
+ updateDiscount([sale], newDiscount, componentId.value),
+ );
+ else await updateDiscount([sale], newDiscount, componentId.value);
}
};
-const updateDiscounts = async (sales, newDiscount) => {
+const updateDiscounts = async (sales, newDiscount, componentId) => {
const salesTracking = await fetchSalesTracking();
const someSaleIsPrepared = salesTracking.some((sale) =>
matchSale(salesTracking, sale),
);
- if (someSaleIsPrepared) await confirmUpdate(() => updateDiscount(sales, newDiscount));
- else updateDiscount(sales, newDiscount);
+ if (someSaleIsPrepared)
+ await confirmUpdate(() => updateDiscount(sales, newDiscount, componentId));
+ else updateDiscount(sales, newDiscount, componentId);
};
-const updateDiscount = async (sales, newDiscount = 0) => {
+const updateDiscount = async (sales, newDiscount, componentId) => {
try {
const salesIds = sales.map(({ id }) => id);
const params = {
salesIds,
- newDiscount,
- manaCode: manaCode.value,
+ newDiscount: newDiscount ?? 0,
+ componentId,
};
await axios.post(`Tickets/${route.params.id}/updateDiscount`, params);
notify('globals.dataSaved', 'positive');
@@ -821,10 +825,11 @@ watch(
ref="editPriceProxyRef"
:sale="row"
:new-price="getNewPrice"
+ v-model:component-id="componentId"
@save="changePrice"
>
editManaProxyRef.save(row)"
+ @keyup.enter.stop="() => editPriceProxyRef.save(row)"
v-model.number="edit.price"
:label="t('basicData.price')"
type="number"
@@ -843,7 +848,7 @@ watch(
ref="editManaProxyRef"
:sale="row"
:new-price="getNewPrice"
- :mana-code="manaCode"
+ v-model:component-id="componentId"
@save="changeDiscount"
>
{
});
if (newDiscount.value != null && hasChanges)
- emit('updateDiscounts', props.sales, newDiscount.value);
+ emit('updateDiscounts', props.sales, newDiscount.value, componentId.value);
btnDropdownRef.value.hide();
};
@@ -206,6 +207,7 @@ const createRefund = async (withWarehouse) => {
ref="editManaProxyRef"
:sale="row"
@save="changeMultipleDiscount"
+ v-model:component-id="componentId"
>
{
:value="`${entity.address?.nickname} #${entity.address?.id}`"
/>
@@ -524,4 +525,7 @@ onMounted(async () => {
.grafana {
color: $primary-light;
}
+.white-space-normal :deep(.value span) {
+ white-space: normal;
+}
diff --git a/src/pages/Ticket/TicketAdvance.vue b/src/pages/Ticket/TicketAdvance.vue
index bf3593acd..ea6c76781 100644
--- a/src/pages/Ticket/TicketAdvance.vue
+++ b/src/pages/Ticket/TicketAdvance.vue
@@ -14,6 +14,8 @@ import { useState } from 'src/composables/useState';
import { toDateFormat } from 'src/filters/date.js';
import axios from 'axios';
import VnTable from 'src/components/VnTable/VnTable.vue';
+import { QTable } from 'quasar';
+import TicketProblems from 'src/components/TicketProblems.vue';
const state = useState();
const { t } = useI18n();
@@ -27,6 +29,16 @@ const selectedTickets = ref([]);
const vnTableRef = ref({});
const originElRef = ref(null);
const destinationElRef = ref(null);
+const actions = {
+ advance: {
+ title: t('advanceTickets.advanceTickets'),
+ cb: moveTicketsAdvance,
+ },
+ advanceWithoutNegative: {
+ title: t('advanceTickets.advanceTicketsWithoutNegatives'),
+ cb: splitTickets,
+ },
+};
let today = Date.vnNew().toISOString();
const tomorrow = new Date(today);
tomorrow.setDate(tomorrow.getDate() + 1);
@@ -78,6 +90,15 @@ const ticketColumns = computed(() => [
headerClass: 'horizontal-separator',
hidden: true,
},
+ {
+ label: t('globals.agency'),
+ name: 'agency',
+ field: 'agency',
+ align: 'left',
+ sortable: true,
+ headerClass: 'horizontal-separator',
+ columnFilter: false,
+ },
{
label: t('advanceTickets.preparation'),
name: 'preparation',
@@ -85,7 +106,6 @@ const ticketColumns = computed(() => [
align: 'left',
sortable: true,
headerClass: 'horizontal-separator',
- columnFilter: false,
},
{
align: 'left',
@@ -110,10 +130,17 @@ const ticketColumns = computed(() => [
},
{
align: 'left',
- label: t('advanceTickets.futureId'),
- name: 'futureId',
+ label: '',
+ name: 'problems',
headerClass: 'vertical-separator horizontal-separator',
columnClass: 'vertical-separator',
+ hidden: true,
+ },
+ {
+ align: 'left',
+ label: t('advanceTickets.futureId'),
+ name: 'futureId',
+ headerClass: 'horizontal-separator',
},
{
align: 'left',
@@ -242,7 +269,7 @@ const requestComponentUpdate = async (ticket, isWithoutNegatives) => {
return { query, params };
};
-const moveTicketsAdvance = async () => {
+async function moveTicketsAdvance() {
let ticketsToMove = [];
for (const ticket of selectedTickets.value) {
if (!ticket.id) {
@@ -267,7 +294,7 @@ const moveTicketsAdvance = async () => {
vnTableRef.value.reload();
selectedTickets.value = [];
if (ticketsToMove.length) notify(t('advanceTickets.moveTicketSuccess'), 'positive');
-};
+}
const progressLength = ref(0);
const progressPercentage = computed(() => {
@@ -290,7 +317,7 @@ const progressAdd = () => {
}
};
-const splitTickets = async () => {
+async function splitTickets() {
try {
showProgressDialog.value = true;
for (const ticket of selectedTickets.value) {
@@ -310,7 +337,7 @@ const splitTickets = async () => {
} finally {
vnTableRef.value.reload();
}
-};
+}
const resetProgressData = () => {
if (cancelProgress.value) cancelProgress.value = false;
@@ -326,6 +353,32 @@ const handleCloseProgressDialog = () => {
const handleCancelProgress = () => (cancelProgress.value = true);
+const confirmAction = (action) => {
+ openConfirmationModal(actions[action].title, false, actions[action].cb, null, {
+ component: QTable,
+ props: {
+ columns: [
+ {
+ align: 'left',
+ label: t('advanceTickets.destination'),
+ name: 'id',
+ field: (row) => row.id,
+ },
+ {
+ align: 'left',
+ label: t('advanceTickets.origin'),
+ name: 'futureId',
+ field: (row) => row.futureId,
+ },
+ ],
+ rows: selectedTickets.value,
+ class: 'full-width',
+ dense: true,
+ flat: true,
+ },
+ });
+};
+
watch(
() => vnTableRef.value.tableRef?.$el,
($el) => {
@@ -399,15 +452,7 @@ watch(
color="primary"
class="q-mr-sm"
:disable="!selectedTickets.length"
- @click.stop="
- openConfirmationModal(
- t('advanceTickets.advanceTicketTitle'),
- t(`advanceTickets.advanceTitleSubtitle`, {
- selectedTickets: selectedTickets.length,
- }),
- moveTicketsAdvance,
- )
- "
+ @click.stop="confirmAction('advance')"
>
{{ t('advanceTickets.advanceTickets') }}
@@ -417,15 +462,7 @@ watch(
icon="alt_route"
color="primary"
:disable="!selectedTickets.length"
- @click.stop="
- openConfirmationModal(
- t('advanceTickets.advanceWithoutNegativeTitle'),
- t(`advanceTickets.advanceWithoutNegativeSubtitle`, {
- selectedTickets: selectedTickets.length,
- }),
- splitTickets,
- )
- "
+ @click.stop="confirmAction('advanceWithoutNegative')"
>
{{ t('advanceTickets.advanceTicketsWithoutNegatives') }}
@@ -454,9 +491,9 @@ watch(
}"
v-model:selected="selectedTickets"
:pagination="{ rowsPerPage: 0 }"
- :no-data-label="t('globals.noResults')"
+ :no-data-label="$t('globals.noResults')"
:right-search="false"
- :order="['futureTotalWithVat ASC']"
+ :order="['futureTotalWithVat ASC']"
auto-load
:disable-option="{ card: true }"
>
@@ -522,6 +559,9 @@ watch(
{{ toCurrency(row.totalWithVat || 0) }}
+
+
+
{{ row.futureId }}
diff --git a/src/pages/Ticket/TicketAdvanceFilter.vue b/src/pages/Ticket/TicketAdvanceFilter.vue
index f065eaf2e..a88d06300 100644
--- a/src/pages/Ticket/TicketAdvanceFilter.vue
+++ b/src/pages/Ticket/TicketAdvanceFilter.vue
@@ -10,7 +10,7 @@ import VnInputDate from 'src/components/common/VnInputDate.vue';
import axios from 'axios';
import { onMounted } from 'vue';
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
-
+import VnCheckbox from 'src/components/common/VnCheckbox.vue';
const { t, te } = useI18n();
const props = defineProps({
dataKey: {
@@ -122,18 +122,20 @@ onMounted(async () => await getItemPackingTypes());
-
@@ -166,11 +168,12 @@ onMounted(async () => await getItemPackingTypes());
-
@@ -194,8 +197,8 @@ es:
Vertical: Vertical
iptInfo: Encajado
params:
- dateFuture: fecha origen
- dateToAdvance: Fecha destino
+ dateFuture: F. origen
+ dateToAdvance: F. destino
futureIpt: IPT Origen
ipt: IPT destino
isFullMovable: 100% movible
diff --git a/src/pages/Ticket/TicketFilter.vue b/src/pages/Ticket/TicketFilter.vue
index d84d1c082..43311007d 100644
--- a/src/pages/Ticket/TicketFilter.vue
+++ b/src/pages/Ticket/TicketFilter.vue
@@ -273,6 +273,7 @@ en:
orderFk: Order
from: From
shipped: Shipped
+ shippedDate: Shipped date
to: To
stateFk: State
groupedStates: Grouped State
@@ -300,6 +301,7 @@ es:
orderFk: Pedido
from: Desde
shipped: F. envío
+ shippedDate: F. envío
to: Hasta
stateFk: Estado
groupedStates: Estado agrupado
diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue
index 634b8e50a..3612cb24a 100644
--- a/src/pages/Ticket/TicketList.vue
+++ b/src/pages/Ticket/TicketList.vue
@@ -113,13 +113,13 @@ const columns = computed(() => [
},
{
align: 'left',
- name: 'shippedDate',
+ name: 'shipped',
cardVisible: true,
label: t('ticketList.shipped'),
columnFilter: {
component: 'date',
},
- format: ({ shippedDate }) => toDate(shippedDate),
+ format: ({ shipped }) => toDate(shipped),
},
{
align: 'left',
@@ -477,7 +477,7 @@ function setReference(data) {
prefix="card"
:array-data-props="{
url: 'Tickets/filter',
- order: ['shippedDate DESC', 'shippedHour ASC', 'zoneLanding ASC', 'id'],
+ order: ['shipped DESC', 'shippedHour ASC', 'zoneLanding ASC', 'id'],
exprBuilder,
}"
>
@@ -515,10 +515,10 @@ function setReference(data) {
-
+
- {{ toDate(row.shippedDate) }}
+ {{ toDate(row.shipped) }}
diff --git a/src/router/modules/ticket.js b/src/router/modules/ticket.js
index bfcb78787..d80997257 100644
--- a/src/router/modules/ticket.js
+++ b/src/router/modules/ticket.js
@@ -113,7 +113,7 @@ const ticketCard = {
name: 'TicketExpedition',
meta: {
title: 'expedition',
- icon: 'vn:package',
+ icon: 'view_in_ar',
},
component: () => import('src/pages/Ticket/Card/TicketExpedition.vue'),
},
@@ -168,7 +168,7 @@ const ticketCard = {
name: 'TicketBoxing',
meta: {
title: 'boxing',
- icon: 'view_in_ar',
+ icon: 'videocam',
},
component: () => import('src/pages/Ticket/Card/TicketBoxing.vue'),
},
diff --git a/test/cypress/integration/claim/claimAction.spec.js b/test/cypress/integration/claim/claimAction.spec.js
index 8f406ad2f..6e916451c 100644
--- a/test/cypress/integration/claim/claimAction.spec.js
+++ b/test/cypress/integration/claim/claimAction.spec.js
@@ -6,7 +6,6 @@ describe.skip('ClaimAction', () => {
const destinationRow = '.q-item__section > .q-field';
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/claim/${claimId}/action`);
});
diff --git a/test/cypress/integration/claim/claimDevelopment.spec.js b/test/cypress/integration/claim/claimDevelopment.spec.js
index 097d870df..1fb77fe20 100755
--- a/test/cypress/integration/claim/claimDevelopment.spec.js
+++ b/test/cypress/integration/claim/claimDevelopment.spec.js
@@ -7,7 +7,6 @@ describe.skip('ClaimDevelopment', () => {
const newReason = 'Calor';
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/claim/${claimId}/development`);
cy.waitForElement('tbody');
diff --git a/test/cypress/integration/entry/entryCard/entryBasicData.spec.js b/test/cypress/integration/entry/entryCard/entryBasicData.spec.js
index ba689b8c7..de8bc6bc9 100644
--- a/test/cypress/integration/entry/entryCard/entryBasicData.spec.js
+++ b/test/cypress/integration/entry/entryCard/entryBasicData.spec.js
@@ -2,7 +2,6 @@ import '../commands.js';
describe('EntryBasicData', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('buyer');
cy.visit(`/#/entry/list`);
});
diff --git a/test/cypress/integration/entry/entryCard/entryDescriptor.spec.js b/test/cypress/integration/entry/entryCard/entryDescriptor.spec.js
index 8185866db..d6f2b2543 100644
--- a/test/cypress/integration/entry/entryCard/entryDescriptor.spec.js
+++ b/test/cypress/integration/entry/entryCard/entryDescriptor.spec.js
@@ -1,7 +1,6 @@
import '../commands.js';
describe('EntryDescriptor', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('buyer');
cy.visit(`/#/entry/list`);
});
diff --git a/test/cypress/integration/entry/entryCard/entryDms.spec.js b/test/cypress/integration/entry/entryCard/entryDms.spec.js
index f3f0ef20b..640b70907 100644
--- a/test/cypress/integration/entry/entryCard/entryDms.spec.js
+++ b/test/cypress/integration/entry/entryCard/entryDms.spec.js
@@ -1,7 +1,6 @@
import '../commands.js';
describe('EntryDms', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('buyer');
cy.visit(`/#/entry/list`);
});
diff --git a/test/cypress/integration/entry/entryCard/entryLock.spec.js b/test/cypress/integration/entry/entryCard/entryLock.spec.js
index 6ba4392ae..957c67cc6 100644
--- a/test/cypress/integration/entry/entryCard/entryLock.spec.js
+++ b/test/cypress/integration/entry/entryCard/entryLock.spec.js
@@ -1,7 +1,6 @@
import '../commands.js';
describe('EntryLock', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('buyer');
cy.visit(`/#/entry/list`);
});
diff --git a/test/cypress/integration/entry/entryCard/entryNotes.spec.js b/test/cypress/integration/entry/entryCard/entryNotes.spec.js
index 544ac23b0..80c9fd38d 100644
--- a/test/cypress/integration/entry/entryCard/entryNotes.spec.js
+++ b/test/cypress/integration/entry/entryCard/entryNotes.spec.js
@@ -2,7 +2,6 @@ import '../commands.js';
describe('EntryNotes', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('buyer');
cy.visit(`/#/entry/list`);
});
diff --git a/test/cypress/integration/entry/entryList.spec.js b/test/cypress/integration/entry/entryList.spec.js
index bad47615f..fc76f6d87 100644
--- a/test/cypress/integration/entry/entryList.spec.js
+++ b/test/cypress/integration/entry/entryList.spec.js
@@ -2,7 +2,6 @@ import './commands';
describe('EntryList', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('buyer');
cy.visit(`/#/entry/list`);
});
diff --git a/test/cypress/integration/entry/entryStockBought.spec.js b/test/cypress/integration/entry/entryStockBought.spec.js
index 3fad44d91..60019c9f4 100644
--- a/test/cypress/integration/entry/entryStockBought.spec.js
+++ b/test/cypress/integration/entry/entryStockBought.spec.js
@@ -1,6 +1,5 @@
describe('EntryStockBought', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('buyer');
cy.visit(`/#/entry/stock-Bought`);
});
diff --git a/test/cypress/integration/entry/entrySupplier.spec.js b/test/cypress/integration/entry/entrySupplier.spec.js
index 83deecea5..df90d00d7 100644
--- a/test/cypress/integration/entry/entrySupplier.spec.js
+++ b/test/cypress/integration/entry/entrySupplier.spec.js
@@ -1,6 +1,5 @@
describe('EntrySupplier when is supplier', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('supplier');
cy.visit(`/#/entry/my`, {
onBeforeLoad(win) {
diff --git a/test/cypress/integration/entry/entryWasteRecalc.spec.js b/test/cypress/integration/entry/entryWasteRecalc.spec.js
index 1b358676c..bd50e9c19 100644
--- a/test/cypress/integration/entry/entryWasteRecalc.spec.js
+++ b/test/cypress/integration/entry/entryWasteRecalc.spec.js
@@ -1,7 +1,6 @@
import './commands';
describe('EntryDms', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('buyerBoss');
cy.visit(`/#/entry/waste-recalc`);
});
diff --git a/test/cypress/integration/invoiceOut/invoiceOutList.spec.js b/test/cypress/integration/invoiceOut/invoiceOutList.spec.js
index b8b42fa4b..ba6f3e122 100644
--- a/test/cypress/integration/invoiceOut/invoiceOutList.spec.js
+++ b/test/cypress/integration/invoiceOut/invoiceOutList.spec.js
@@ -28,7 +28,7 @@ describe('InvoiceOut list', () => {
cy.dataCy('InvoiceOutDownloadPdfBtn').click();
});
- it('should open the invoice descriptor from table icon', () => {
+ it.skip('should open the invoice descriptor from table icon', () => {
cy.get(firstSummaryIcon).click();
cy.get('.cardSummary').should('be.visible');
cy.get('.summaryHeader > div').should('include.text', 'A1111111');
diff --git a/test/cypress/integration/invoiceOut/invoiceOutMakeInvoice.spec.js b/test/cypress/integration/invoiceOut/invoiceOutMakeInvoice.spec.js
index e93326f1d..d58eb4a1f 100644
--- a/test/cypress/integration/invoiceOut/invoiceOutMakeInvoice.spec.js
+++ b/test/cypress/integration/invoiceOut/invoiceOutMakeInvoice.spec.js
@@ -1,7 +1,6 @@
///
describe.skip('InvoiceOut manual invoice', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/ticket/list`);
cy.get('#searchbar input').type('{enter}');
diff --git a/test/cypress/integration/invoiceOut/invoiceOutNegativeBases.spec.js b/test/cypress/integration/invoiceOut/invoiceOutNegativeBases.spec.js
index 9c6eef2ed..89f71e940 100644
--- a/test/cypress/integration/invoiceOut/invoiceOutNegativeBases.spec.js
+++ b/test/cypress/integration/invoiceOut/invoiceOutNegativeBases.spec.js
@@ -4,7 +4,6 @@ describe('InvoiceOut negative bases', () => {
`:nth-child(1) > [data-col-field="${opt}"] > .no-padding > .link`;
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/invoice-out/negative-bases`);
});
diff --git a/test/cypress/integration/invoiceOut/invoiceOutSummary.spec.js b/test/cypress/integration/invoiceOut/invoiceOutSummary.spec.js
index 49eed32c7..029165bb8 100644
--- a/test/cypress/integration/invoiceOut/invoiceOutSummary.spec.js
+++ b/test/cypress/integration/invoiceOut/invoiceOutSummary.spec.js
@@ -15,7 +15,7 @@ describe('InvoiceOut summary', () => {
cy.login('developer');
cy.visit(`/#/invoice-out/1/summary`);
});
- it('open the descriptors', () => {
+ it.skip('open the descriptors', () => {
cy.get(firstRowDescriptors(1)).click();
cy.get('.descriptor').should('be.visible');
cy.get('.q-item > .q-item__label').should('include.text', '1');
@@ -30,7 +30,7 @@ describe('InvoiceOut summary', () => {
cy.get('.q-item > .q-item__label').should('include.text', '1101');
});
- it('should open the ticket list', () => {
+ it.skip('should open the ticket list', () => {
cy.get(toTicketList).click();
cy.get('[data-col-field="stateFk"]').each(($el) => {
cy.wrap($el).contains('T1111111');
diff --git a/test/cypress/integration/invoiceOut/invvoiceOutGlobal.spec.js b/test/cypress/integration/invoiceOut/invvoiceOutGlobal.spec.js
index 06e132b39..0170970a5 100644
--- a/test/cypress/integration/invoiceOut/invvoiceOutGlobal.spec.js
+++ b/test/cypress/integration/invoiceOut/invvoiceOutGlobal.spec.js
@@ -1,7 +1,6 @@
///
describe('InvoiceOut global invoicing', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('administrative');
cy.visit(`/#/invoice-out/global-invoicing`);
});
@@ -17,7 +16,7 @@ describe('InvoiceOut global invoicing', () => {
cy.dataCy('InvoiceOutGlobalPrinterSelect').type('printer1');
cy.get('.q-menu .q-item').contains('printer1').click();
cy.get(
- '[label="Invoice date"] > .q-field > .q-field__inner > .q-field__control'
+ '[label="Invoice date"] > .q-field > .q-field__inner > .q-field__control',
).click();
cy.get(':nth-child(5) > div > .q-btn > .q-btn__content > .block').click();
cy.get('.q-date__years-content > :nth-child(2) > .q-btn').click();
diff --git a/test/cypress/integration/item/itemBarcodes.spec.js b/test/cypress/integration/item/itemBarcodes.spec.js
index 1f6698f9c..746cfa0f1 100644
--- a/test/cypress/integration/item/itemBarcodes.spec.js
+++ b/test/cypress/integration/item/itemBarcodes.spec.js
@@ -1,7 +1,6 @@
///
describe('ItemBarcodes', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/item/1/barcode`);
});
diff --git a/test/cypress/integration/item/itemBotanical.spec.js b/test/cypress/integration/item/itemBotanical.spec.js
index 6105ef179..420181b0d 100644
--- a/test/cypress/integration/item/itemBotanical.spec.js
+++ b/test/cypress/integration/item/itemBotanical.spec.js
@@ -1,7 +1,6 @@
///
describe('Item botanical', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/item/1/botanical`);
});
diff --git a/test/cypress/integration/item/itemList.spec.js b/test/cypress/integration/item/itemList.spec.js
index 10e388580..bd8108344 100644
--- a/test/cypress/integration/item/itemList.spec.js
+++ b/test/cypress/integration/item/itemList.spec.js
@@ -2,7 +2,6 @@
describe.skip('Item list', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/item/list`);
cy.typeSearchbar('{enter}');
diff --git a/test/cypress/integration/item/itemSummary.spec.js b/test/cypress/integration/item/itemSummary.spec.js
index 8d67c8e3c..65b4c8629 100644
--- a/test/cypress/integration/item/itemSummary.spec.js
+++ b/test/cypress/integration/item/itemSummary.spec.js
@@ -1,7 +1,6 @@
///
describe('Item summary', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/item/1/summary`);
});
diff --git a/test/cypress/integration/item/itemTag.spec.js b/test/cypress/integration/item/itemTag.spec.js
index 425eaffe6..65d339151 100644
--- a/test/cypress/integration/item/itemTag.spec.js
+++ b/test/cypress/integration/item/itemTag.spec.js
@@ -1,6 +1,5 @@
describe('Item tag', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/item/1/tags`);
cy.get('.q-page').should('be.visible');
diff --git a/test/cypress/integration/item/itemTax.spec.js b/test/cypress/integration/item/itemTax.spec.js
index 6ff147135..971e3a732 100644
--- a/test/cypress/integration/item/itemTax.spec.js
+++ b/test/cypress/integration/item/itemTax.spec.js
@@ -1,7 +1,6 @@
///
describe('Item tax', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/item/1/tax`);
});
diff --git a/test/cypress/integration/item/itemType.spec.js b/test/cypress/integration/item/itemType.spec.js
index 466a49708..180a12a0f 100644
--- a/test/cypress/integration/item/itemType.spec.js
+++ b/test/cypress/integration/item/itemType.spec.js
@@ -6,7 +6,6 @@ describe('Item type', () => {
const type = 'Flower';
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/item/item-type`);
});
diff --git a/test/cypress/integration/order/orderList.spec.js b/test/cypress/integration/order/orderList.spec.js
index ee011ea05..b77ef8fca 100644
--- a/test/cypress/integration/order/orderList.spec.js
+++ b/test/cypress/integration/order/orderList.spec.js
@@ -6,7 +6,6 @@ describe('OrderList', () => {
beforeEach(() => {
cy.login('developer');
- cy.viewport(1920, 1080);
cy.visit('/#/order/list');
});
diff --git a/test/cypress/integration/route/agency/agencyModes.spec.js b/test/cypress/integration/route/agency/agencyModes.spec.js
index 3f5784997..edf7f8819 100644
--- a/test/cypress/integration/route/agency/agencyModes.spec.js
+++ b/test/cypress/integration/route/agency/agencyModes.spec.js
@@ -2,7 +2,6 @@ describe('Agency modes', () => {
const name = 'inhouse pickup';
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/route/agency/1/modes`);
});
diff --git a/test/cypress/integration/route/agency/agencyWorkCenter.spec.js b/test/cypress/integration/route/agency/agencyWorkCenter.spec.js
index 79dcd6f70..d73ba1491 100644
--- a/test/cypress/integration/route/agency/agencyWorkCenter.spec.js
+++ b/test/cypress/integration/route/agency/agencyWorkCenter.spec.js
@@ -13,7 +13,6 @@ describe('AgencyWorkCenter', () => {
};
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/route/agency/11/workCenter`);
});
diff --git a/test/cypress/integration/route/cmr/cmrList.spec.js b/test/cypress/integration/route/cmr/cmrList.spec.js
index d33508e3a..a25a0c10a 100644
--- a/test/cypress/integration/route/cmr/cmrList.spec.js
+++ b/test/cypress/integration/route/cmr/cmrList.spec.js
@@ -24,7 +24,6 @@ describe('Cmr list', () => {
};
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit('/#/route/cmr');
cy.typeSearchbar('{enter}');
diff --git a/test/cypress/integration/route/roadMap/roadmapList.spec.js b/test/cypress/integration/route/roadMap/roadmapList.spec.js
index 35c0c2b02..bacf130a7 100644
--- a/test/cypress/integration/route/roadMap/roadmapList.spec.js
+++ b/test/cypress/integration/route/roadMap/roadmapList.spec.js
@@ -27,7 +27,6 @@ describe('RoadMap', () => {
const summaryUrl = '/summary';
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/route/roadmap`);
cy.typeSearchbar('{enter}');
diff --git a/test/cypress/integration/route/routeAutonomous.spec.js b/test/cypress/integration/route/routeAutonomous.spec.js
index d77584c04..6aaa2a85e 100644
--- a/test/cypress/integration/route/routeAutonomous.spec.js
+++ b/test/cypress/integration/route/routeAutonomous.spec.js
@@ -32,7 +32,6 @@ describe.skip('RouteAutonomous', () => {
const dataSaved = 'Data saved';
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/route/agency-term`);
cy.typeSearchbar('{enter}');
diff --git a/test/cypress/integration/route/routeExtendedList.spec.js b/test/cypress/integration/route/routeExtendedList.spec.js
index 96bece5cb..48045af2f 100644
--- a/test/cypress/integration/route/routeExtendedList.spec.js
+++ b/test/cypress/integration/route/routeExtendedList.spec.js
@@ -80,7 +80,6 @@ describe('Route extended list', () => {
}
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit('/#/route/extended-list');
cy.typeSearchbar('{enter}');
diff --git a/test/cypress/integration/route/routeList.spec.js b/test/cypress/integration/route/routeList.spec.js
index f08c267a4..309f8d023 100644
--- a/test/cypress/integration/route/routeList.spec.js
+++ b/test/cypress/integration/route/routeList.spec.js
@@ -26,8 +26,8 @@ describe('Route', () => {
const summaryUrl = '/summary';
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
+ cy.viewport(1920, 1080);
cy.visit(`/#/route/list`);
cy.typeSearchbar('{enter}');
});
diff --git a/test/cypress/integration/route/vehicle/vehicleDescriptor.spec.js b/test/cypress/integration/route/vehicle/vehicleDescriptor.spec.js
index 3e9c816c4..39332b2e0 100644
--- a/test/cypress/integration/route/vehicle/vehicleDescriptor.spec.js
+++ b/test/cypress/integration/route/vehicle/vehicleDescriptor.spec.js
@@ -1,6 +1,5 @@
describe('Vehicle', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('deliveryAssistant');
cy.visit(`/#/route/vehicle/7/summary`);
});
diff --git a/test/cypress/integration/route/vehicle/vehicleList.spec.js b/test/cypress/integration/route/vehicle/vehicleList.spec.js
index 143547e72..5a1e83e1e 100644
--- a/test/cypress/integration/route/vehicle/vehicleList.spec.js
+++ b/test/cypress/integration/route/vehicle/vehicleList.spec.js
@@ -21,7 +21,6 @@ describe('Vehicle list', () => {
const summaryUrlRegex = /vehicle\/\d+\/summary/;
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/route/vehicle/list`);
cy.typeSearchbar('{enter}');
diff --git a/test/cypress/integration/route/vehicle/vehicleNotes.spec.js b/test/cypress/integration/route/vehicle/vehicleNotes.spec.js
index cd92cc4af..17b870305 100644
--- a/test/cypress/integration/route/vehicle/vehicleNotes.spec.js
+++ b/test/cypress/integration/route/vehicle/vehicleNotes.spec.js
@@ -10,7 +10,6 @@ describe('Vehicle Notes', () => {
const newNoteText = 'probando';
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/route/vehicle/1/notes`);
});
diff --git a/test/cypress/integration/shelving/parking/parkingList.spec.js b/test/cypress/integration/shelving/parking/parkingList.spec.js
index 7372da164..44b5fd9bc 100644
--- a/test/cypress/integration/shelving/parking/parkingList.spec.js
+++ b/test/cypress/integration/shelving/parking/parkingList.spec.js
@@ -5,7 +5,6 @@ describe('ParkingList', () => {
const summaryHeader = '.header-link';
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/shelving/parking/list`);
});
diff --git a/test/cypress/integration/shelving/shelvingBasicData.spec.js b/test/cypress/integration/shelving/shelvingBasicData.spec.js
index d7b0dc692..e9ff7f696 100644
--- a/test/cypress/integration/shelving/shelvingBasicData.spec.js
+++ b/test/cypress/integration/shelving/shelvingBasicData.spec.js
@@ -3,7 +3,6 @@ describe('ShelvingList', () => {
const parking =
'.q-card > :nth-child(1) > .q-select > .q-field__inner > .q-field__control > .q-field__control-container';
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/shelving/1/basic-data`);
});
diff --git a/test/cypress/integration/shelving/shelvingList.spec.js b/test/cypress/integration/shelving/shelvingList.spec.js
index 20b72e419..7a878141a 100644
--- a/test/cypress/integration/shelving/shelvingList.spec.js
+++ b/test/cypress/integration/shelving/shelvingList.spec.js
@@ -1,7 +1,6 @@
///
describe('ShelvingList', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/shelving/list`);
});
diff --git a/test/cypress/integration/supplier/SupplierBalance.spec.js b/test/cypress/integration/supplier/SupplierBalance.spec.js
index e4a3ee65c..575624283 100644
--- a/test/cypress/integration/supplier/SupplierBalance.spec.js
+++ b/test/cypress/integration/supplier/SupplierBalance.spec.js
@@ -1,6 +1,5 @@
describe('Supplier Balance', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/supplier/1/balance`);
});
diff --git a/test/cypress/integration/ticket/ticketDescriptor.spec.js b/test/cypress/integration/ticket/ticketDescriptor.spec.js
index b5c95c463..6c3ad704e 100644
--- a/test/cypress/integration/ticket/ticketDescriptor.spec.js
+++ b/test/cypress/integration/ticket/ticketDescriptor.spec.js
@@ -9,7 +9,6 @@ describe('Ticket descriptor', () => {
const weightValue = '[data-cy="vnLvWeight"]';
beforeEach(() => {
cy.login('developer');
- cy.viewport(1920, 1080);
});
it('should clone the ticket without warehouse', () => {
diff --git a/test/cypress/integration/ticket/ticketExpedition.spec.js b/test/cypress/integration/ticket/ticketExpedition.spec.js
index 95ec330dc..c6b633de8 100644
--- a/test/cypress/integration/ticket/ticketExpedition.spec.js
+++ b/test/cypress/integration/ticket/ticketExpedition.spec.js
@@ -5,7 +5,6 @@ describe('Ticket expedtion', () => {
beforeEach(() => {
cy.login('developer');
- cy.viewport(1920, 1080);
});
it('should change the state', () => {
diff --git a/test/cypress/integration/ticket/ticketFilter.spec.js b/test/cypress/integration/ticket/ticketFilter.spec.js
index 2e5a3f3ce..60ad7f287 100644
--- a/test/cypress/integration/ticket/ticketFilter.spec.js
+++ b/test/cypress/integration/ticket/ticketFilter.spec.js
@@ -2,7 +2,6 @@
describe('TicketFilter', () => {
beforeEach(() => {
cy.login('developer');
- cy.viewport(1920, 1080);
cy.visit('/#/ticket/list');
});
diff --git a/test/cypress/integration/ticket/ticketList.spec.js b/test/cypress/integration/ticket/ticketList.spec.js
index e18025319..302707601 100644
--- a/test/cypress/integration/ticket/ticketList.spec.js
+++ b/test/cypress/integration/ticket/ticketList.spec.js
@@ -2,7 +2,6 @@
describe('TicketList', () => {
beforeEach(() => {
cy.login('developer');
- cy.viewport(1920, 1080);
cy.visit('/#/ticket/list', false);
});
diff --git a/test/cypress/integration/ticket/ticketNotes.spec.js b/test/cypress/integration/ticket/ticketNotes.spec.js
index df1ff9137..f1bd48f61 100644
--- a/test/cypress/integration/ticket/ticketNotes.spec.js
+++ b/test/cypress/integration/ticket/ticketNotes.spec.js
@@ -2,7 +2,6 @@
describe('TicketNotes', () => {
beforeEach(() => {
cy.login('developer');
- cy.viewport(1920, 1080);
cy.visit('/#/ticket/31/observation');
});
diff --git a/test/cypress/integration/ticket/ticketRequest.spec.js b/test/cypress/integration/ticket/ticketRequest.spec.js
index 3b237826e..dc408c3a1 100644
--- a/test/cypress/integration/ticket/ticketRequest.spec.js
+++ b/test/cypress/integration/ticket/ticketRequest.spec.js
@@ -2,7 +2,6 @@
describe('TicketRequest', () => {
beforeEach(() => {
cy.login('developer');
- cy.viewport(1920, 1080);
cy.visit('/#/ticket/31/request');
});
diff --git a/test/cypress/integration/ticket/ticketSale.spec.js b/test/cypress/integration/ticket/ticketSale.spec.js
index f433f0d11..0ae599e15 100644
--- a/test/cypress/integration/ticket/ticketSale.spec.js
+++ b/test/cypress/integration/ticket/ticketSale.spec.js
@@ -2,9 +2,9 @@
const firstRow = 'tbody > :nth-child(1)';
describe('TicketSale', () => {
- describe('#23', () => {
+ describe.skip('#23', () => {
beforeEach(() => {
- cy.login('salesBoss');
+ cy.login('claimManager');
cy.viewport(1920, 1080);
cy.visit('/#/ticket/23/sale');
});
@@ -15,6 +15,8 @@ describe('TicketSale', () => {
cy.get('[data-col-field="price"]').find('.q-btn').click();
cy.waitForElement('[data-cy="ticketEditManaProxy"]');
cy.dataCy('ticketEditManaProxy').should('exist');
+ cy.get('[data-cy="componentOption-37"]').click();
+
cy.waitForElement('[data-cy="Price_input"]');
cy.dataCy('Price_input').clear().type(price);
cy.intercept('POST', /\/api\/Sales\/\d+\/updatePrice/).as('updatePrice');
@@ -33,6 +35,7 @@ describe('TicketSale', () => {
cy.get('[data-col-field="discount"]').find('.q-btn').click();
cy.waitForElement('[data-cy="ticketEditManaProxy"]');
cy.dataCy('ticketEditManaProxy').should('exist');
+ cy.get('[data-cy="componentOption-37"]').click();
cy.waitForElement('[data-cy="Disc_input"]');
cy.dataCy('Disc_input').clear().type(discount);
cy.intercept('POST', /\/api\/Tickets\/\d+\/updateDiscount/).as(
@@ -83,8 +86,7 @@ describe('TicketSale', () => {
});
describe('#24 add claim', () => {
beforeEach(() => {
- cy.login('developer');
- cy.viewport(1920, 1080);
+ cy.login('salesPerson');
cy.visit('/#/ticket/24/sale');
});
@@ -102,8 +104,7 @@ describe('TicketSale', () => {
});
describe('#31 free ticket', () => {
beforeEach(() => {
- cy.login('developer');
- cy.viewport(1920, 1080);
+ cy.login('claimManager');
cy.visit('/#/ticket/31/sale');
});
@@ -139,14 +140,15 @@ describe('TicketSale', () => {
cy.dataCy('ticketSaleMoreActionsDropdown').should('be.disabled');
});
- it.only('should update discount when "Update discount" is clicked', () => {
+ it('should update discount when "Update discount" is clicked', () => {
const discount = Number((Math.random() * 99 + 1).toFixed(2));
selectFirstRow();
cy.dataCy('ticketSaleMoreActionsDropdown').click();
cy.waitForElement('[data-cy="updateDiscountItem"]');
- cy.dataCy('updateDiscountItem').should('exist');
cy.dataCy('updateDiscountItem').click();
+ cy.waitForElement('[data-cy="componentOption-37"]');
+ cy.get('[data-cy="componentOption-37"]').click();
cy.waitForElement('[data-cy="ticketSaleDiscountInput"]');
cy.dataCy('ticketSaleDiscountInput').find('input').focus();
cy.intercept('POST', /\/api\/Tickets\/\d+\/updateDiscount/).as(
@@ -191,8 +193,7 @@ describe('TicketSale', () => {
});
describe('#32 transfer', () => {
beforeEach(() => {
- cy.login('developer');
- cy.viewport(1920, 1080);
+ cy.login('salesPerson');
cy.visit('/#/ticket/32/sale');
});
it('transfer sale to a new ticket', () => {
diff --git a/test/cypress/integration/vnComponent/VnBreadcrumbs.spec.js b/test/cypress/integration/vnComponent/VnBreadcrumbs.spec.js
index 8e37d8c9c..347dae7df 100644
--- a/test/cypress/integration/vnComponent/VnBreadcrumbs.spec.js
+++ b/test/cypress/integration/vnComponent/VnBreadcrumbs.spec.js
@@ -2,7 +2,6 @@
describe('VnBreadcrumbs', () => {
const lastBreadcrumb = '.q-breadcrumbs--last > .q-breadcrumbs__el';
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit('/');
});
diff --git a/test/cypress/integration/wagon/wagonType/wagonTypeCreate.spec.js b/test/cypress/integration/wagon/wagonType/wagonTypeCreate.spec.js
index 915927a6d..3b5d05c6f 100644
--- a/test/cypress/integration/wagon/wagonType/wagonTypeCreate.spec.js
+++ b/test/cypress/integration/wagon/wagonType/wagonTypeCreate.spec.js
@@ -1,6 +1,5 @@
describe('WagonTypeCreate', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit('/#/wagon/type/list');
cy.waitForElement('.q-page', 6000);
diff --git a/test/cypress/integration/wagon/wagonType/wagonTypeEdit.spec.js b/test/cypress/integration/wagon/wagonType/wagonTypeEdit.spec.js
index 36dd83411..d82f9a10d 100644
--- a/test/cypress/integration/wagon/wagonType/wagonTypeEdit.spec.js
+++ b/test/cypress/integration/wagon/wagonType/wagonTypeEdit.spec.js
@@ -2,7 +2,6 @@ describe('WagonTypeEdit', () => {
const trayColorRow =
'.q-select > .q-field__inner > .q-field__control > .q-field__control-container';
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit('/#/wagon/type/1/edit');
});
diff --git a/test/cypress/integration/worker/workerPit.spec.js b/test/cypress/integration/worker/workerPit.spec.js
index 04f232648..cee4560dc 100644
--- a/test/cypress/integration/worker/workerPit.spec.js
+++ b/test/cypress/integration/worker/workerPit.spec.js
@@ -4,7 +4,6 @@ describe('WorkerPit', () => {
const savePIT = '#st-actions > .q-btn-group > .q-btn--standard';
beforeEach(() => {
- cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/worker/1107/pit`);
});
diff --git a/test/cypress/integration/zone/zoneDeliveryDays.spec.js b/test/cypress/integration/zone/zoneDeliveryDays.spec.js
index a89def12d..6d19edb77 100644
--- a/test/cypress/integration/zone/zoneDeliveryDays.spec.js
+++ b/test/cypress/integration/zone/zoneDeliveryDays.spec.js
@@ -4,7 +4,6 @@ describe('ZoneDeliveryDays', () => {
const submitForm = '.q-form > .q-btn > .q-btn__content';
beforeEach(() => {
cy.login('developer');
- cy.viewport(1920, 1080);
cy.visit(`/#/zone/delivery-days`);
});
diff --git a/test/cypress/integration/zone/zoneUpcomingDeliveries.spec.js b/test/cypress/integration/zone/zoneUpcomingDeliveries.spec.js
index 576b2ea70..1c28e732c 100644
--- a/test/cypress/integration/zone/zoneUpcomingDeliveries.spec.js
+++ b/test/cypress/integration/zone/zoneUpcomingDeliveries.spec.js
@@ -4,7 +4,6 @@ describe('ZoneUpcomingDeliveries', () => {
beforeEach(() => {
cy.login('developer');
- cy.viewport(1920, 1080);
cy.visit(`/#/zone/upcoming-deliveries`);
});