diff --git a/src/pages/Worker/Card/WorkerPda.vue b/src/pages/Worker/Card/WorkerPda.vue index 5e7c89326..976469476 100644 --- a/src/pages/Worker/Card/WorkerPda.vue +++ b/src/pages/Worker/Card/WorkerPda.vue @@ -1,140 +1,212 @@ - (deviceProductionsOptions = data)" - /> - setCurrentPDA(data[0])" - /> - - + (deviceProductions = data)" + auto-load + /> + setCurrentPDA(data)" > - - + - - - {{ currentPDA.description }} - - - - - - {{ t('worker.pda.removePDA') }} - - - - - - - - - - ID: {{ scope.opt?.id }} - - {{ scope.opt?.modelFk }}, - {{ scope.opt?.serialNumber }} - - - - - + + + + + + + Id: + + {{ row?.deviceProductionFk }} + + {{ t('Model') }}: + + {{ row?.deviceProduction?.modelFk }} + + {{ t('SIM serial number') }}: + + {{ + row?.deviceProduction?.serialNumber + }} + + + + + + + {{ row?.simSerialNumber }} + + + + + + deallocatePDA(row.deviceProductionFk) + ) + " + > + + {{ t('worker.pda.removePDA') }} + + + + + - + + + + + + + + + + + + ID: {{ scope.opt?.id }} + + {{ scope.opt?.modelFk }}, + {{ scope.opt?.serialNumber }} + + + + + + + + + + + + + {{ t('globals.new') }} + + - + es: + Remove PDA: Eliminar PDA + Do you want to remove this PDA?: ¿Desea eliminar este PDA? PDA deallocated: PDA desasignada + SIM serial number: Número de serie de la SIM + Model: Modelo + This PDA is already assigned to another user: Este PDA ya está asignado a otro usuario + Add new device: Añadir nuevo dispositivo diff --git a/test/cypress/integration/worker/workerPda.spec.js b/test/cypress/integration/worker/workerPda.spec.js new file mode 100644 index 000000000..9af994a70 --- /dev/null +++ b/test/cypress/integration/worker/workerPda.spec.js @@ -0,0 +1,24 @@ +describe('WorkerPda', () => { + const deviceProductionField = + '.vn-row > .q-field > .q-field__inner > .q-field__control > .q-field__control-container'; + beforeEach(() => { + cy.viewport(1920, 1080); + cy.login('developer'); + cy.visit(`/#/worker/1110/pda`); + }); + + it('assign pda', () => { + cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click(); + cy.get(deviceProductionField).type('{downArrow}{enter}'); + cy.get('.vn-row > #simSerialNumber').type('123{enter}'); + cy.get('.q-notification__message').should('have.text', 'Data created'); + }); + + it('delete pda', () => { + cy.get('.q-card > .q-item > .q-item__section--side > .q-icon').click(); + cy.get( + '.q-card__actions > .q-btn--unelevated > .q-btn__content > .block' + ).click(); + cy.get('.q-notification__message').should('have.text', 'PDA deallocated'); + }); +});