+
-
-
-
-
-
- {{ t('Remove row') }}
-
-
+
+
+
+
+ {{ row.warehouse?.name }}
+
+
+ deleteWarehouse(row, rows, rowIndex)
+ )
+ "
+ >
+
+ {{ t('warehouses.delete') }}
+
+
+
+
-
+
+
+
+
+
+
+ {{ t('warehouses.add') }}
+
+
-
-
- es:
- Remove row: Eliminar fila
-
diff --git a/src/pages/Zone/ZoneClosingTable.vue b/src/pages/Zone/ZoneClosingTable.vue
new file mode 100644
index 000000000..ce0c91af7
--- /dev/null
+++ b/src/pages/Zone/ZoneClosingTable.vue
@@ -0,0 +1,112 @@
+
+
+
+
+
+
redirectToZoneSummary(row.id)"
+ style="max-height: 400px"
+ >
+
+
+
+
+ {{ t('zoneClosingTable.preview') }}
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Zone/ZoneDeliveryCalendar.vue b/src/pages/Zone/ZoneDeliveryCalendar.vue
new file mode 100644
index 000000000..96a62086e
--- /dev/null
+++ b/src/pages/Zone/ZoneDeliveryCalendar.vue
@@ -0,0 +1,192 @@
+
+
+
+
+
+ {{
+ calendarHeaderTitle
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Zone/ZoneDeliveryDays.vue b/src/pages/Zone/ZoneDeliveryDays.vue
index 485500dba..d6ce70f6d 100644
--- a/src/pages/Zone/ZoneDeliveryDays.vue
+++ b/src/pages/Zone/ZoneDeliveryDays.vue
@@ -1 +1,257 @@
-
Zone Delivery days
+
+
+
+
+
+
+
+
+ {{ t('globals.collapseMenu') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Zone/ZoneDeliveryPanel.vue b/src/pages/Zone/ZoneDeliveryPanel.vue
new file mode 100644
index 000000000..c754d484f
--- /dev/null
+++ b/src/pages/Zone/ZoneDeliveryPanel.vue
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ opt.code }}
+ {{ opt.town?.province?.name }},
+ {{ opt.town?.province?.country?.country }}
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Zone/locale/en.yml b/src/pages/Zone/locale/en.yml
index d037e60bb..bae89fda9 100644
--- a/src/pages/Zone/locale/en.yml
+++ b/src/pages/Zone/locale/en.yml
@@ -3,8 +3,10 @@ zone:
zones: Zone
zonesList: Zones
zoneCreate: Create zone
- deliveryList: Delivery days
+ locations: Locations
+ deliveryDays: Delivery days
upcomingDeliveries: Upcoming deliveries
+ warehouses: Warehouses
list:
clone: Clone
id: Id
@@ -40,6 +42,28 @@ summary:
filterPanel:
name: Name
agencyModeFk: Agency
+deliveryPanel:
+ pickup: Pick up
+ delivery: Delivery
+ postcode: Postcode
+ agency: Agency
+ warehouse: Warehouse
+ query: Query
+ noEventsWarning: No service for the specified zone
+zoneClosingTable:
+ id: Id
+ name: Name
+ agency: Agency
+ closing: Closing
+ price: Price
+ preview: Preview
+ zones: Zones
+warehouses:
+ delete: Delete
+ deleteTitle: This item will be deleted
+ deleteSubtitle: Are you sure you want to continue?
+ warehouse: Warehouse
+ add: Add
upcomingDeliveries:
province: Province
closing: Closing
diff --git a/src/pages/Zone/locale/es.yml b/src/pages/Zone/locale/es.yml
index 917ad2635..d74238a6e 100644
--- a/src/pages/Zone/locale/es.yml
+++ b/src/pages/Zone/locale/es.yml
@@ -3,8 +3,10 @@ zone:
zones: Zonas
zonesList: Zonas
zoneCreate: Nueva zona
- deliveryList: Días de entrega
+ locations: Localizaciones
+ deliveryDays: Días de entrega
upcomingDeliveries: Próximos repartos
+ warehouses: Almacenes
list:
clone: Clonar
id: Id
@@ -40,6 +42,30 @@ summary:
filterPanel:
name: Nombre
agencyModeFk: Agencia
+deliveryPanel:
+ pickup: Recogida
+ delivery: Entrega
+ postcode: Código postal
+ agency: Agencia
+ warehouse: Almacén
+ query: Consultar
+ noEventsWarning: No hay servicio para la zona especificada
+zoneClosingTable:
+ id: Id
+ name: Nombre
+ agency: Agencia
+ closing: Cierre
+ preview: Vista previa
+ price: Precio
+ zones: Zonas
+Search zones: Buscar zonas
+You can search by zone reference: Puedes buscar por referencia de la zona
+warehouses:
+ delete: Eliminar
+ deleteTitle: Este elemento será eliminado
+ deleteSubtitle: ¿Seguro que quieres continuar?
+ warehouse: Almacén
+ add: Añadir
upcomingDeliveries:
province: Provincia
closing: Cierre
diff --git a/src/router/modules/zone.js b/src/router/modules/zone.js
index c22a6663b..c355856b1 100644
--- a/src/router/modules/zone.js
+++ b/src/router/modules/zone.js
@@ -11,8 +11,8 @@ export default {
component: RouterView,
redirect: { name: 'ZoneMain' },
menus: {
- main: ['ZoneList', 'ZoneDeliveryList', 'ZoneUpcomingDeliveries'],
- card: ['ZoneBasicData', 'ZoneHistory', 'ZoneLocations'],
+ main: ['ZoneList', 'ZoneDeliveryDays', 'ZoneUpcomingDeliveries'],
+ card: ['ZoneBasicData', 'ZoneWarehouses', 'ZoneHistory', 'ZoneLocations'],
},
children: [
{
@@ -30,6 +30,15 @@ export default {
},
component: () => import('src/pages/Zone/ZoneList.vue'),
},
+ {
+ path: 'delivery-days',
+ name: 'ZoneDeliveryDays',
+ meta: {
+ title: 'deliveryDays',
+ icon: 'vn:calendar',
+ },
+ component: () => import('src/pages/Zone/ZoneDeliveryDays.vue'),
+ },
{
path: 'create',
name: 'ZoneCreate',
@@ -83,6 +92,15 @@ export default {
},
component: () => import('src/pages/Zone/Card/ZoneSummary.vue'),
},
+ {
+ name: 'ZoneBasicData',
+ path: 'basic-data',
+ meta: {
+ title: 'basicData',
+ icon: 'vn:settings',
+ },
+ component: () => import('src/pages/Zone/Card/ZoneBasicData.vue'),
+ },
{
name: 'ZoneLocations',
path: 'location',
@@ -93,13 +111,13 @@ export default {
component: () => import('src/pages/Zone/Card/ZoneLocations.vue'),
},
{
- name: 'ZoneBasicData',
- path: 'basic-data',
+ name: 'ZoneWarehouses',
+ path: 'warehouses',
meta: {
- title: 'basicData',
- icon: 'vn:settings',
+ title: 'warehouses',
+ icon: 'home',
},
- component: () => import('src/pages/Zone/Card/ZoneBasicData.vue'),
+ component: () => import('src/pages/Zone/Card/ZoneWarehouses.vue'),
},
{
name: 'ZoneHistory',
@@ -110,83 +128,6 @@ export default {
},
component: () => import('src/pages/Zone/Card/ZoneLog.vue'),
},
-
- // {
- // path: '/zone/delivery',
- // name: 'ZoneDeliveryMain',
- // component: () => import('src/pages/Zone/ZoneMain.vue'),
- // redirect: { name: 'ZoneDeliveryList' },
- // children: [
- // {
- // path: 'list',
- // name: 'ZoneDeliveryList',
- // meta: {
- // title: 'deliveryList',
- // icon: 'today',
- // },
- // component: () =>
- // import('src/pages/Zone/Delivery/ZoneDeliveryList.vue'),
- // },
- // {
- // path: 'create',
- // name: 'ZoneDeliveryCreate',
- // meta: {
- // title: 'deliveryCreate',
- // icon: 'create',
- // },
- // component: () =>
- // import('src/pages/Zone/Delivery/ZoneDeliveryCreate.vue'),
- // },
- // {
- // path: ':id/edit',
- // name: 'ZoneDeliveryEdit',
- // meta: {
- // title: 'deliveryEdit',
- // icon: 'edit',
- // },
- // component: () =>
- // import('src/pages/Zone/Delivery/ZoneDeliveryCreate.vue'),
- // },
- // ],
- // },
- // {
- // path: '/zone/upcoming',
- // name: 'ZoneUpcomingMain',
- // component: () => import('src/pages/Zone/ZoneMain.vue'),
- // redirect: { name: 'ZoneUpcomingList' },
- // children: [
- // {
- // path: 'list',
- // name: 'ZoneUpcomingList',
- // meta: {
- // title: 'upcomingList',
- // icon: 'today',
- // },
- // component: () =>
- // import('src/pages/Zone/Upcoming/ZoneUpcomingList.vue'),
- // },
- // {
- // path: 'create',
- // name: 'ZoneUpcomingCreate',
- // meta: {
- // title: 'upcomingCreate',
- // icon: 'create',
- // },
- // component: () =>
- // import('src/pages/Zone/Upcoming/ZoneUpcomingCreate.vue'),
- // },
- // {
- // path: ':id/edit',
- // name: 'ZoneUpcomingEdit',
- // meta: {
- // title: 'upcomingEdit',
- // icon: 'edit',
- // },
- // component: () =>
- // import('src/pages/Zone/Upcoming/ZoneUpcomingCreate.vue'),
- // },
- // ],
- // },
],
},
],
diff --git a/src/stores/useWeekdayStore.js b/src/stores/useWeekdayStore.js
index a7b0496c6..ac17356ae 100644
--- a/src/stores/useWeekdayStore.js
+++ b/src/stores/useWeekdayStore.js
@@ -85,6 +85,27 @@ export const useWeekdayStore = defineStore('weekdayStore', () => {
return locales;
});
+ /**
+ * Transforms weekday set into an array whose indexes are weekday index
+ * with selected days set to %true.
+ *
+ * @param {String} weekDays Weekday codes separated by commas
+ * @return {Array
} Array with selected days set to %true
+ */
+ const fromSet = (_weekDays) => {
+ let wdays = [];
+
+ if (_weekDays) {
+ let codes = _weekDays.split(',');
+ for (let code of codes) {
+ let data = weekdaysMap[code];
+ if (data) wdays[data.index] = true;
+ }
+ }
+
+ return wdays;
+ };
+
return {
initStore,
weekdaysMap,
@@ -93,5 +114,6 @@ export const useWeekdayStore = defineStore('weekdayStore', () => {
weekdays,
monthCodes,
getLocaleMonths,
+ fromSet,
};
});
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');
+ });
+});