From 3bb822d785c7205d19635653cbad011bcf95c5da Mon Sep 17 00:00:00 2001 From: jgallego Date: Thu, 9 Jan 2025 08:43:47 +0100 Subject: [PATCH 01/44] feat: refs #7937 add import claim button to ClaimAction component --- src/pages/Claim/Card/ClaimAction.vue | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/pages/Claim/Card/ClaimAction.vue b/src/pages/Claim/Card/ClaimAction.vue index 2e890dba8..334805140 100644 --- a/src/pages/Claim/Card/ClaimAction.vue +++ b/src/pages/Claim/Card/ClaimAction.vue @@ -368,6 +368,17 @@ async function post(query, params) { From 4f63307c7ee514c4ed6a9ed7fd19bf465d75c99d Mon Sep 17 00:00:00 2001 From: provira Date: Fri, 14 Feb 2025 10:01:46 +0100 Subject: [PATCH 02/44] fix: refs #8593 fixed parking e2e tests --- .../integration/parking/parkingBasicData.spec.js | 10 +++++----- test/cypress/integration/parking/parkingList.spec.js | 6 ++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/test/cypress/integration/parking/parkingBasicData.spec.js b/test/cypress/integration/parking/parkingBasicData.spec.js index f64f23ec8..1ad06a4f6 100644 --- a/test/cypress/integration/parking/parkingBasicData.spec.js +++ b/test/cypress/integration/parking/parkingBasicData.spec.js @@ -9,15 +9,15 @@ describe('ParkingBasicData', () => { }); it('should edit the code and sector', () => { - cy.get(sectorSelect).type('Second'); + cy.get(sectorSelect).type('First'); cy.get(sectorOpt).click(); cy.get(codeInput).eq(0).clear(); - cy.get(codeInput).eq(0).type('900-001'); + cy.get(codeInput).eq(0).type('900-002'); cy.saveCard(); - - cy.get(sectorSelect).should('have.value', 'Second sector'); - cy.get(codeInput).should('have.value', '900-001'); + cy.get('.q-notification__message').should('have.text', 'Data saved'); + cy.get(sectorSelect).should('have.value', 'First sector'); + cy.get(codeInput).should('have.value', '900-002'); }); }); diff --git a/test/cypress/integration/parking/parkingList.spec.js b/test/cypress/integration/parking/parkingList.spec.js index 8b7152ca4..a4f2146c0 100644 --- a/test/cypress/integration/parking/parkingList.spec.js +++ b/test/cypress/integration/parking/parkingList.spec.js @@ -30,4 +30,10 @@ describe('ParkingList', () => { cy.get(firstDetailBtn).click(); cy.get(summaryHeader).contains('Basic data'); }); + + it('should filter and redirect to summary if only one result', () => { + cy.dataCy('Code_input').type('A{enter}'); + cy.dataCy('Sector_select').type('First Sector{enter}'); + cy.url().should('match', /\/shelving\/parking\/\d+\/summary/); + }); }); From c49a72e5e541ac95da301a05920ea6306f136368 Mon Sep 17 00:00:00 2001 From: provira Date: Tue, 18 Feb 2025 11:59:20 +0100 Subject: [PATCH 03/44] feat: refs #8593 changed parking to VnTable and modified e2e tests --- .../Shelving/Parking/Card/ParkingSummary.vue | 2 - src/pages/Shelving/Parking/ParkingList.vue | 95 ++++++++++--------- .../parking/parkingBasicData.spec.js | 4 +- .../integration/parking/parkingList.spec.js | 21 ++-- 4 files changed, 61 insertions(+), 61 deletions(-) diff --git a/src/pages/Shelving/Parking/Card/ParkingSummary.vue b/src/pages/Shelving/Parking/Card/ParkingSummary.vue index 95620ebfd..7188ebeb6 100644 --- a/src/pages/Shelving/Parking/Card/ParkingSummary.vue +++ b/src/pages/Shelving/Parking/Card/ParkingSummary.vue @@ -45,8 +45,6 @@ const filter = { :label="t('parking.sector')" :value="entity.sector?.description" /> - - diff --git a/src/pages/Shelving/Parking/ParkingList.vue b/src/pages/Shelving/Parking/ParkingList.vue index fe6c93ba5..0f56d54c0 100644 --- a/src/pages/Shelving/Parking/ParkingList.vue +++ b/src/pages/Shelving/Parking/ParkingList.vue @@ -1,19 +1,17 @@ + diff --git a/test/cypress/integration/parking/parkingBasicData.spec.js b/test/cypress/integration/parking/parkingBasicData.spec.js index 1ad06a4f6..b26c23215 100644 --- a/test/cypress/integration/parking/parkingBasicData.spec.js +++ b/test/cypress/integration/parking/parkingBasicData.spec.js @@ -14,10 +14,12 @@ describe('ParkingBasicData', () => { cy.get(codeInput).eq(0).clear(); cy.get(codeInput).eq(0).type('900-002'); + cy.dataCy('Picking order_input').clear().type(80230); cy.saveCard(); cy.get('.q-notification__message').should('have.text', 'Data saved'); - cy.get(sectorSelect).should('have.value', 'First sector'); + cy.get(sectorSelect).should('have.value', 'Second sector'); cy.get(codeInput).should('have.value', '900-002'); + cy.dataCy('Picking order_input').should('have.value', 80230); }); }); diff --git a/test/cypress/integration/parking/parkingList.spec.js b/test/cypress/integration/parking/parkingList.spec.js index a4f2146c0..840974744 100644 --- a/test/cypress/integration/parking/parkingList.spec.js +++ b/test/cypress/integration/parking/parkingList.spec.js @@ -1,11 +1,7 @@ /// describe('ParkingList', () => { const searchbar = '#searchbar input'; - const firstCard = '.q-card:nth-child(1)'; - const firstChipId = - ':nth-child(1) > :nth-child(1) > .justify-between > .flex > .q-chip > .q-chip__content'; - const firstDetailBtn = - ':nth-child(1) > :nth-child(1) > .card-list-body > .actions > .q-btn'; + const firstCard = ':nth-child(1) > .q-card > .no-margin > .q-py-none'; const summaryHeader = '.summaryBody .header'; beforeEach(() => { @@ -16,18 +12,13 @@ describe('ParkingList', () => { it('should redirect on clicking a parking', () => { cy.get(searchbar).type('{enter}'); - cy.get(firstChipId) - .invoke('text') - .then((content) => { - const id = content.substring(4); - cy.get(firstCard).click(); - cy.url().should('include', `/parking/${id}/summary`); - }); + cy.get(firstCard).click(); + cy.get(summaryHeader).contains('Basic data'); }); - it('should open the details', () => { - cy.get(searchbar).type('{enter}'); - cy.get(firstDetailBtn).click(); + it('should filter and redirect if there is only one result', () => { + cy.dataCy('Code_input').type('01{enter}'); + cy.dataCy('Sector_select').type('First{enter}'); cy.get(summaryHeader).contains('Basic data'); }); From 99f8d5ccd80866ebbb7a3e633dcd1d4104d092e6 Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 18 Feb 2025 16:23:05 +0100 Subject: [PATCH 04/44] feat: refs #7937 add shelving selection to claim actions with data fetching --- src/pages/Claim/Card/ClaimAction.vue | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/pages/Claim/Card/ClaimAction.vue b/src/pages/Claim/Card/ClaimAction.vue index 404e42fc8..baa36710c 100644 --- a/src/pages/Claim/Card/ClaimAction.vue +++ b/src/pages/Claim/Card/ClaimAction.vue @@ -27,6 +27,7 @@ const claimActionsForm = ref(); const rows = ref([]); const selectedRows = ref([]); const destinationTypes = ref([]); +const shelvings = ref([]); const totalClaimed = ref(null); const DEFAULT_MAX_RESPONSABILITY = 5; const DEFAULT_MIN_RESPONSABILITY = 1; @@ -56,6 +57,12 @@ const columns = computed(() => [ field: (row) => row.claimDestinationFk, align: 'left', }, + { + name: 'shelving', + label: t('shelvings.shelving'), + field: (row) => row.shelvingFk, + align: 'left', + }, { name: 'Landed', label: t('Landed'), @@ -125,6 +132,10 @@ async function updateDestination(claimDestinationFk, row, options = {}) { options.reload && claimActionsForm.value.reload(); } } +async function updateShelving(shelvingFk, row) { + await axios.patch(`ClaimEnds/${row.id}`, { shelvingFk }); + claimActionsForm.value.reload(); +} async function regularizeClaim() { await post(`Claims/${claimId}/regularizeClaim`); @@ -200,6 +211,7 @@ async function post(query, params) { auto-load @on-fetch="(data) => (destinationTypes = data)" /> + + + diff --git a/src/pages/Worker/Card/WorkerDescriptor.vue b/src/pages/Worker/Card/WorkerDescriptor.vue index de3f634e2..0e946f1dd 100644 --- a/src/pages/Worker/Card/WorkerDescriptor.vue +++ b/src/pages/Worker/Card/WorkerDescriptor.vue @@ -111,6 +111,7 @@ const handlePhotoUpdated = (evt = false) => {