diff --git a/src/pages/Zone/ZoneList.vue b/src/pages/Zone/ZoneList.vue
index 0272292f64..d160ea6b57 100644
--- a/src/pages/Zone/ZoneList.vue
+++ b/src/pages/Zone/ZoneList.vue
@@ -1,74 +1,120 @@
@@ -91,82 +138,72 @@ onMounted(() => (stateStore.rightDrawer = true));
-
+
-
-
-
-
-
-
-
-
-
- {{ t(col.label) }}
- {{
- col.tooltip
- }}
-
-
-
-
-
-
-
- {{ props.value }}
-
-
-
-
-
-
- {{ t('globals.clone') }}
-
-
- {{ t('Preview') }}
-
-
-
-
-
-
-
-
-
-
- {{ t('list.create') }}
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+es:
+ Search zone: Buscar zona
+ You can search zones by id or name: Puedes buscar zonas por id o nombre
+
diff --git a/src/pages/Zone/locale/en.yml b/src/pages/Zone/locale/en.yml
index 31eeb2b7f6..2608c071c3 100644
--- a/src/pages/Zone/locale/en.yml
+++ b/src/pages/Zone/locale/en.yml
@@ -18,9 +18,16 @@ list:
create: Create zone
openSummary: Details
searchZone: Search zones
+ searchLocation: Search locations
searchInfo: Search zone by id or name
confirmCloneTitle: All it's properties will be copied
confirmCloneSubtitle: Do you want to clone this zone?
+ travelingDays: Traveling days
+ warehouse: Warehouse
+ bonus: Bonus
+ isVolumetric: Volumetric
+ createZone: Create zone
+ zoneSummary: Summary
create:
name: Name
warehouse: Warehouse
@@ -30,6 +37,8 @@ create:
price: Price
bonus: Bonus
volumetric: Volumetric
+ itemMaxSize: Max m³
+ inflation: Inflation
summary:
agency: Agency
price: Price
diff --git a/src/pages/Zone/locale/es.yml b/src/pages/Zone/locale/es.yml
index c670c2c086..dd919a0c5d 100644
--- a/src/pages/Zone/locale/es.yml
+++ b/src/pages/Zone/locale/es.yml
@@ -18,9 +18,16 @@ list:
create: Crear zona
openSummary: Detalles
searchZone: Buscar zonas
+ searchLocation: Buscar localizaciones
searchInfo: Buscar zonas por identificador o nombre
confirmCloneTitle: Todas sus propiedades serán copiadas
confirmCloneSubtitle: ¿Seguro que quieres clonar esta zona?
+ travelingDays: Días de viaje
+ warehouse: Almacén
+ bonus: Bonus
+ isVolumetric: Volumétrico
+ createZone: Crear zona
+ zoneSummary: Resumen
create:
name: Nombre
warehouse: Almacén
@@ -30,6 +37,8 @@ create:
price: Precio
bonus: Bonificación
volumetric: Volumétrico
+ itemMaxSize: Medida máxima
+ inflation: Inflación
summary:
agency: Agencia
price: Precio
diff --git a/src/router/modules/route.js b/src/router/modules/route.js
index 3c5c860cf2..955fc9098a 100644
--- a/src/router/modules/route.js
+++ b/src/router/modules/route.js
@@ -7,6 +7,7 @@ export default {
title: 'routes',
icon: 'vn:delivery',
moduleName: 'Route',
+ keyBinding: 'r',
},
component: RouterView,
redirect: { name: 'RouteMain' },
diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js
index f80df5e060..2a523e7fe2 100644
--- a/src/router/modules/worker.js
+++ b/src/router/modules/worker.js
@@ -25,6 +25,7 @@ export default {
'WorkerLocker',
'WorkerBalance',
'WorkerFormation',
+ 'WorkerMedical',
],
},
children: [
@@ -196,6 +197,15 @@ export default {
},
component: () => import('src/pages/Worker/Card/WorkerFormation.vue'),
},
+ {
+ name: 'WorkerMedical',
+ path: 'medical',
+ meta: {
+ title: 'medical',
+ icon: 'medical_information',
+ },
+ component: () => import('src/pages/Worker/Card/WorkerMedical.vue'),
+ },
],
},
],
diff --git a/src/router/modules/zone.js b/src/router/modules/zone.js
index 889b474648..40358c58e3 100644
--- a/src/router/modules/zone.js
+++ b/src/router/modules/zone.js
@@ -50,33 +50,6 @@ export default {
},
component: () => import('src/pages/Zone/ZoneDeliveryDays.vue'),
},
- {
- path: 'create',
- name: 'ZoneCreate',
- meta: {
- title: 'zoneCreate',
- icon: 'create',
- },
- component: () => import('src/pages/Zone/ZoneCreate.vue'),
- },
- {
- path: ':id/edit',
- name: 'ZoneEdit',
- meta: {
- title: 'zoneEdit',
- icon: 'edit',
- },
- component: () => import('src/pages/Zone/ZoneCreate.vue'),
- },
- // {
- // path: 'counter',
- // name: 'ZoneCounter',
- // meta: {
- // title: 'zoneCounter',
- // icon: 'add_circle',
- // },
- // component: () => import('src/pages/Zone/ZoneCounter.vue'),
- // },
{
name: 'ZoneUpcomingDeliveries',
path: 'upcoming-deliveries',
diff --git a/test/cypress/integration/worker/workerLocker.spec.js b/test/cypress/integration/worker/workerLocker.spec.js
index 9a4066f54e..8a169dfb26 100644
--- a/test/cypress/integration/worker/workerLocker.spec.js
+++ b/test/cypress/integration/worker/workerLocker.spec.js
@@ -1,12 +1,12 @@
describe('WorkerLocker', () => {
- const workerId = 1109;
+ const productionId = 49;
const lockerCode = '2F';
const input = '.q-card input';
const thirdOpt = '[role="listbox"] .q-item:nth-child(1)';
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('productionBoss');
- cy.visit(`/#/worker/${workerId}/locker`);
+ cy.visit(`/#/worker/${productionId}/locker`);
});
it('should allocates a locker', () => {
diff --git a/test/cypress/integration/zone/zoneBasicData.spec.js b/test/cypress/integration/zone/zoneBasicData.spec.js
new file mode 100644
index 0000000000..c6151a49b6
--- /dev/null
+++ b/test/cypress/integration/zone/zoneBasicData.spec.js
@@ -0,0 +1,21 @@
+describe('ZoneBasicData', () => {
+ const notification = '.q-notification__message';
+
+ beforeEach(() => {
+ cy.viewport(1280, 720);
+ cy.login('developer');
+ cy.visit('/#/zone/4/basic-data');
+ });
+
+ it('should throw an error if the name is empty', () => {
+ cy.get('.q-card > :nth-child(1)').clear();
+ cy.get('.q-btn-group > .q-btn--standard').click();
+ cy.get(notification).should('contains.text', "can't be blank");
+ });
+
+ it("should edit the basicData's zone", () => {
+ cy.get('.q-card > :nth-child(1)').type(' modified');
+ cy.get('.q-btn-group > .q-btn--standard').click();
+ cy.get(notification).should('contains.text', 'Data saved');
+ });
+});
diff --git a/test/cypress/integration/zone/zoneCreate.spec.js b/test/cypress/integration/zone/zoneCreate.spec.js
new file mode 100644
index 0000000000..9618ea8461
--- /dev/null
+++ b/test/cypress/integration/zone/zoneCreate.spec.js
@@ -0,0 +1,38 @@
+describe('ZoneCreate', () => {
+ const notification = '.q-notification__message';
+
+ const data = {
+ Name: { val: 'Zone pickup D' },
+ Price: { val: '3' },
+ Bonus: { val: '0' },
+ 'Traveling days': { val: '0' },
+ Warehouse: { val: 'Algemesi', type: 'select' },
+ Volumetric: { val: 'true', type: 'checkbox' },
+ };
+
+ beforeEach(() => {
+ cy.viewport(1280, 720);
+ cy.login('developer');
+ cy.visit('/#/zone/list');
+ cy.get('.q-page-sticky > div > .q-btn').click();
+ });
+
+ it('should throw an error if an agency has not been selected', () => {
+ cy.fillInForm({
+ ...data,
+ });
+ cy.get('input[aria-label="Close"]').type('10:00');
+ cy.get('.q-mt-lg > .q-btn--standard').click();
+ cy.get(notification).should('contains.text', 'Agency cannot be blank');
+ });
+
+ it('should create a zone', () => {
+ cy.fillInForm({
+ ...data,
+ Agency: { val: 'inhouse pickup', type: 'select' },
+ });
+ cy.get('input[aria-label="Close"]').type('10:00');
+ cy.get('.q-mt-lg > .q-btn--standard').click();
+ cy.get(notification).should('contains.text', 'Data created');
+ });
+});
diff --git a/test/cypress/integration/zone/zoneList.spec.js b/test/cypress/integration/zone/zoneList.spec.js
index f35da7e5fa..92c77a2c64 100644
--- a/test/cypress/integration/zone/zoneList.spec.js
+++ b/test/cypress/integration/zone/zoneList.spec.js
@@ -1,15 +1,18 @@
describe('ZoneList', () => {
beforeEach(() => {
- cy.viewport(1920, 1080);
+ cy.viewport(1280, 720);
cy.login('developer');
- cy.visit(`/#/zone/list`);
+ cy.visit('/#/zone/list');
});
- it('should open the details', () => {
- cy.get(':nth-child(1) > .text-right > .material-symbols-outlined').click();
+ it('should filter by agency', () => {
+ cy.get(
+ ':nth-child(1) > .column > .q-field > .q-field__inner > .q-field__control > .q-field__control-container'
+ ).type('{downArrow}{enter}');
});
- it('should redirect to summary', () => {
- cy.waitForElement('.q-page');
- cy.get('tbody > :nth-child(1)').click();
+
+ it('should open the zone summary', () => {
+ cy.get('input[aria-label="Name"]').type('zone refund');
+ cy.get('.q-scrollarea__content > .q-btn--standard > .q-btn__content').click();
});
});
diff --git a/test/cypress/integration/zone/zoneWarehouse.spec.js b/test/cypress/integration/zone/zoneWarehouse.spec.js
new file mode 100644
index 0000000000..3ffa3f69d7
--- /dev/null
+++ b/test/cypress/integration/zone/zoneWarehouse.spec.js
@@ -0,0 +1,34 @@
+describe('ZoneWarehouse', () => {
+ const data = {
+ Warehouse: { val: 'Algemesi', type: 'select' },
+ };
+ const deviceProductionField =
+ '.vn-row > :nth-child(1) > .q-field > .q-field__inner > .q-field__control > .q-field__control-container';
+ const dataError = "ER_DUP_ENTRY: Duplicate entry '2-2' for key 'zoneFk'";
+
+ beforeEach(() => {
+ cy.viewport(1280, 720);
+ cy.login('developer');
+ cy.visit(`/#/zone/2/warehouses`);
+ });
+
+ it('should throw an error if the warehouse chosen is already put in the zone', () => {
+ cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click();
+ cy.get(deviceProductionField).click();
+ cy.get(deviceProductionField).type('{upArrow}{enter}');
+ cy.get('.q-notification__message').should('have.text', dataError);
+ });
+
+ it('should create a warehouse', () => {
+ cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click();
+ cy.get(deviceProductionField).click();
+ cy.fillInForm(data);
+ cy.get('.q-mt-lg > .q-btn--standard').click();
+ });
+
+ it('should delete a warehouse', () => {
+ cy.get('tbody > :nth-child(2) > :nth-child(2) > .q-icon').click();
+ cy.get('.q-card__actions > .q-btn--flat > .q-btn__content').click();
+ cy.reload();
+ });
+});
diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js
index 3cf909af57..a9a4053133 100755
--- a/test/cypress/support/commands.js
+++ b/test/cypress/support/commands.js
@@ -105,6 +105,12 @@ Cypress.Commands.add('fillInForm', (obj, form = '.q-form > .q-card') => {
case 'date':
cy.wrap(el).type(val.split('-').join(''));
break;
+ case 'time':
+ cy.wrap(el).click();
+ cy.get('.q-time .q-time__clock').contains(val.h).click();
+ cy.get('.q-time .q-time__clock').contains(val.m).click();
+ cy.get('.q-time .q-time__link').contains(val.x).click();
+ break;
default:
cy.wrap(el).type(val);
break;