diff --git a/src/pages/Entry/EntryStockBought.vue b/src/pages/Entry/EntryStockBought.vue new file mode 100644 index 000000000..0e8013586 --- /dev/null +++ b/src/pages/Entry/EntryStockBought.vue @@ -0,0 +1,300 @@ + + + + + es: + Edit travel: Editar envío + Travel: Envíos + Booked trucks: Camiones reservados + Buyer: Comprador + Reserve: Reservado + Bought: Comprado + Date: Fecha + View more details: Ver más detalles + Reserve some space: Reservar espacio + This buyer has already made a reservation for this date: Este comprador ya ha hecho una reserva para esta fecha + diff --git a/src/pages/Entry/EntryStockBoughtDetail.vue b/src/pages/Entry/EntryStockBoughtDetail.vue new file mode 100644 index 000000000..0fd775ee6 --- /dev/null +++ b/src/pages/Entry/EntryStockBoughtDetail.vue @@ -0,0 +1,126 @@ + + + + + es: + Buyer: Comprador + Reserve: Reservado + Bought: Comprado + More: Más + Date: Fecha + Entry: Entrada + Item: Artículo + Name: Nombre + Volume: Volumen + Packaging: Embalage + diff --git a/src/pages/Entry/EntryStockBoughtFilter.vue b/src/pages/Entry/EntryStockBoughtFilter.vue new file mode 100644 index 000000000..7694cfe6c --- /dev/null +++ b/src/pages/Entry/EntryStockBoughtFilter.vue @@ -0,0 +1,63 @@ + + + + + en: + params: + dated: Date + workerFk: Worker + es: + Date: Fecha + params: + dated: Date + workerFk: Trabajador + diff --git a/src/router/modules/entry.js b/src/router/modules/entry.js index d66ea0e0c..4750a4301 100644 --- a/src/router/modules/entry.js +++ b/src/router/modules/entry.js @@ -58,6 +58,15 @@ export default { }, component: () => import('src/pages/Entry/EntryLatestBuys.vue'), }, + { + path: 'stock-Bought', + name: 'EntryStockBought', + meta: { + title: 'reserves', + icon: 'deployed_code_history', + }, + component: () => import('src/pages/Entry/EntryStockBought.vue'), + }, ], }, { diff --git a/test/cypress/integration/entry/stockBought.spec.js b/test/cypress/integration/entry/stockBought.spec.js new file mode 100644 index 000000000..66e06b79e --- /dev/null +++ b/test/cypress/integration/entry/stockBought.spec.js @@ -0,0 +1,39 @@ +describe('EntryStockBought', () => { + beforeEach(() => { + cy.viewport(1920, 1080); + cy.login('buyer'); + cy.visit(`/#/entry/stock-Bought`); + }); + it('Should edit the reserved space', () => { + cy.get('.q-field__native.q-placeholder').should('have.value', '01/01/2001'); + cy.get('input[name="reserve"]').type('10{enter}'); + cy.get('button[title="Save"]').click(); + cy.get('.q-notification__message').should('have.text', 'Data saved'); + }); + it('Should add a new reserved space for buyerBoss', () => { + cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click(); + cy.get('input[aria-label="Reserve"]').type('1'); + cy.get('input[aria-label="Date"]').eq(1).clear(); + cy.get('input[aria-label="Date"]').eq(1).type('01-01'); + cy.get('input[aria-label="Buyer"]').type('buyerboss{downarrow}{enter}'); + cy.get('.q-notification__message').should('have.text', 'Data created'); + }); + it('Should check detail for the buyer', () => { + cy.get(':nth-child(1) > .sticky > .q-btn > .q-btn__content > .q-icon').click(); + cy.get('tBody > tr').eq(1).its('length').should('eq', 1); + }); + it('Should check detail for the buyerBoss and had no content', () => { + cy.get(':nth-child(2) > .sticky > .q-btn > .q-btn__content > .q-icon').click(); + cy.get('.q-table__bottom.row.items-center.q-table__bottom--nodata').should( + 'have.text', + 'warningNo data available' + ); + }); + it('Should edit travel m3 and refresh', () => { + cy.get('.vn-row > div > .q-btn > .q-btn__content > .q-icon').click(); + cy.get('input[aria-label="m3"]').clear(); + cy.get('input[aria-label="m3"]').type('60'); + cy.get('.q-mt-lg > .q-btn--standard > .q-btn__content > .block').click(); + cy.get('.vn-row > div > :nth-child(2)').should('have.text', '60'); + }); +});