From 532cb582cf8bd5eb1102069392f03f1ffb11d316 Mon Sep 17 00:00:00 2001 From: carlosjr Date: Wed, 3 Feb 2021 17:01:43 +0100 Subject: [PATCH 1/3] columns moved and no refresh on stateState changes --- modules/ticket/back/methods/ticket/filter.js | 1 + modules/ticket/front/index/index.html | 4 ++-- modules/ticket/front/main/index.html | 2 +- modules/ticket/front/summary/index.js | 12 ++++-------- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/modules/ticket/back/methods/ticket/filter.js b/modules/ticket/back/methods/ticket/filter.js index 5341de8d1..5c941ef84 100644 --- a/modules/ticket/back/methods/ticket/filter.js +++ b/modules/ticket/back/methods/ticket/filter.js @@ -197,6 +197,7 @@ module.exports = Self => { t.id, t.shipped, CAST(DATE(t.shipped) AS CHAR) AS shippedDate, + HOUR(t.shipped) AS shippedHour, t.nickname, t.refFk, t.routeFk, diff --git a/modules/ticket/front/index/index.html b/modules/ticket/front/index/index.html index d137d40be..4243ef1ab 100644 --- a/modules/ticket/front/index/index.html +++ b/modules/ticket/front/index/index.html @@ -18,12 +18,12 @@ Salesperson Date Hour + Closure Alias Province State Zone Warehouse - Closure Total @@ -86,6 +86,7 @@ {{::ticket.shipped | date: 'HH:mm'}} + {{::ticket.zoneLanding | date: 'HH:mm'}} {{::ticket.warehouse}} - {{::ticket.zoneLanding | date: 'HH:mm'}} {{::ticket.total | currency: 'EUR': 2}} diff --git a/modules/ticket/front/main/index.html b/modules/ticket/front/main/index.html index 953dc8a6b..09e1eeee6 100644 --- a/modules/ticket/front/main/index.html +++ b/modules/ticket/front/main/index.html @@ -2,7 +2,7 @@ vn-id="model" url="Tickets/filter" limit="20" - order="shipped DESC, zoneHour DESC, zoneMinute DESC, clientFk"> + order="shipped DESC, shippedHour ASC, zoneLanding ASC"> this.reload()) + .then(() => { + if ('id' in this.$params) this.reload(); + }) .then(() => { this.vnApp.showSuccess(this.$t('Data saved!')); }); From 073741607e8d9b77adc1d39d57c5aa1f918fe1e6 Mon Sep 17 00:00:00 2001 From: carlosjr Date: Wed, 3 Feb 2021 17:01:53 +0100 Subject: [PATCH 2/3] e2e updated --- e2e/helpers/selectors.js | 3 +++ e2e/paths/05-ticket/18_index_payout.spec.js | 13 +++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 3fdbb47f4..fe35dcfe3 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -392,12 +392,15 @@ export default { descriptorTicketId: 'vn-ticket-descriptor > vn-descriptor-content > div > div.body > div.top > div' }, ticketsIndex: { + anySearchResult: 'vn-ticket-index vn-tbody > a', openAdvancedSearchButton: 'vn-searchbar .append vn-icon[icon="arrow_drop_down"]', advancedSearchInvoiceOut: 'vn-ticket-search-panel vn-textfield[ng-model="filter.refFk"]', advancedSearchDaysOnward: 'vn-ticket-search-panel vn-input-number[ng-model="filter.scopeDays"]', + advancedSearchClient: 'vn-ticket-search-panel vn-textfield[ng-model="filter.clientFk"]', advancedSearchButton: 'vn-ticket-search-panel button[type=submit]', newTicketButton: 'vn-ticket-index a[ui-sref="ticket.create"]', searchResult: 'vn-ticket-index vn-card > vn-table > div > vn-tbody > a.vn-tr', + firstTicketCheckbox: 'vn-ticket-index vn-tbody > a:nth-child(1) > vn-td:nth-child(1) > vn-check', secondTicketCheckbox: 'vn-ticket-index vn-tbody > a:nth-child(2) > vn-td:nth-child(1) > vn-check', thirdTicketCheckbox: 'vn-ticket-index vn-tbody > a:nth-child(3) > vn-td:nth-child(1) > vn-check', sixthTicketCheckbox: 'vn-ticket-index vn-tbody > a:nth-child(6) > vn-td:nth-child(1) > vn-check', diff --git a/e2e/paths/05-ticket/18_index_payout.spec.js b/e2e/paths/05-ticket/18_index_payout.spec.js index 2292898b5..3d83e6fca 100644 --- a/e2e/paths/05-ticket/18_index_payout.spec.js +++ b/e2e/paths/05-ticket/18_index_payout.spec.js @@ -22,16 +22,21 @@ describe('Ticket index payout path', () => { it('should check the second ticket from a client and 1 of another', async() => { await page.waitToClick(selectors.globalItems.searchButton); await page.waitToClick(selectors.ticketsIndex.secondTicketCheckbox); - await page.waitToClick(selectors.ticketsIndex.sixthTicketCheckbox); + await page.waitToClick(selectors.ticketsIndex.thirdTicketCheckbox); await page.waitToClick(selectors.ticketsIndex.payoutButton); const message = await page.waitForSnackbar(); expect(message.text).toContain('You cannot make a payment on account from multiple clients'); }); - it('should uncheck the sixth ticket result and check the third which is from the same client then open the payout form', async() => { - await page.waitToClick(selectors.ticketsIndex.sixthTicketCheckbox); - await page.waitToClick(selectors.ticketsIndex.thirdTicketCheckbox); + it('should search for tickets of the same client then open the payout form', async() => { + await page.waitToClick(selectors.ticketsIndex.openAdvancedSearchButton); + await page.write(selectors.ticketsIndex.advancedSearchClient, '101'); + await page.keyboard.press('Enter'); + await page.waitForNumberOfElements(selectors.ticketsIndex.anySearchResult, 6); + await page.waitToClick(selectors.ticketsIndex.firstTicketCheckbox); + await page.waitToClick(selectors.ticketsIndex.secondTicketCheckbox); + await page.waitToClick(selectors.ticketsIndex.payoutButton); await page.waitForSelector(selectors.ticketsIndex.payoutCompany); From a9b0a5c2bdbf110c224bad649e8d20a79771f165 Mon Sep 17 00:00:00 2001 From: carlosjr Date: Thu, 4 Feb 2021 10:04:16 +0100 Subject: [PATCH 3/3] order fixed --- modules/ticket/front/main/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ticket/front/main/index.html b/modules/ticket/front/main/index.html index 09e1eeee6..8e9af1e12 100644 --- a/modules/ticket/front/main/index.html +++ b/modules/ticket/front/main/index.html @@ -2,7 +2,7 @@ vn-id="model" url="Tickets/filter" limit="20" - order="shipped DESC, shippedHour ASC, zoneLanding ASC"> + order="shippedDate DESC, shippedHour ASC, zoneLanding ASC">