@@ -181,7 +200,7 @@ watch([year, businessFk], () => refreshData());
-
+
{{ t('Autonomous worker') }}
diff --git a/src/pages/Worker/Card/WorkerCard.vue b/src/pages/Worker/Card/WorkerCard.vue
index e0047bf9ef..d76ef6f59e 100644
--- a/src/pages/Worker/Card/WorkerCard.vue
+++ b/src/pages/Worker/Card/WorkerCard.vue
@@ -1,15 +1,12 @@
{
});
const worker = ref();
-const filter = computed(() => {
- return { where: { id: entityId.value } };
-});
+const filter = {
+ include: [
+ {
+ relation: 'user',
+ scope: {
+ fields: ['email', 'name', 'nickname'],
+ },
+ },
+ {
+ relation: 'department',
+ scope: {
+ include: [
+ {
+ relation: 'department',
+ },
+ ],
+ },
+ },
+ {
+ relation: 'sip',
+ },
+ ],
+};
const sip = ref(null);
-
watch(
() => [worker.value?.sip?.extension, state.get('extension')],
([newWorkerSip, newStateExtension], [oldWorkerSip, oldStateExtension]) => {
@@ -62,7 +81,7 @@ const setData = (entity) => {
{
workerUrl.value = (await getUrl('')) + `worker/${entityId.value}/`;
});
-const filter = computed(() => {
- return { where: { id: entityId.value } };
-});
+const filter = {
+ include: [
+ {
+ relation: 'user',
+ scope: {
+ fields: ['email', 'name', 'nickname', 'roleFk'],
+ include: {
+ relation: 'role',
+ scope: {
+ fields: ['name'],
+ },
+ },
+ },
+ },
+ {
+ relation: 'department',
+ scope: {
+ include: {
+ relation: 'department',
+ scope: {
+ fields: ['name'],
+ },
+ },
+ },
+ },
+ {
+ relation: 'boss',
+ },
+ {
+ relation: 'client',
+ },
+ {
+ relation: 'sip',
+ },
+ ],
+};
-
+
{{ entity.id }} - {{ entity.firstName }} {{ entity.lastName }}
@@ -75,6 +103,12 @@ const filter = computed(() => {
+
+
+ {{ t('worker.summary.personalPhone') }}
+
+
+
diff --git a/src/pages/Zone/Card/ZoneBasicData.vue b/src/pages/Zone/Card/ZoneBasicData.vue
new file mode 100644
index 0000000000..5d57b920e6
--- /dev/null
+++ b/src/pages/Zone/Card/ZoneBasicData.vue
@@ -0,0 +1,103 @@
+
+
+
+ (agencyOptions = data)"
+ auto-load
+ url="agencies"
+ />
+ (zoneOptions = data)"
+ auto-load
+ url="zones"
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+es:
+ Name: Nombre
+ Agency: Agencia
+ Max m³: Medida máxima
+ Maximum m³: M³ maximo
+ Traveling days: Dias de viaje
+ Closing: Cierre
+ Price: Precio
+ Bonus: Bonificación
+ Inflation: Inflación
+ Volumetric: Volumétrico
+
diff --git a/src/pages/Zone/Card/ZoneCalendar.vue b/src/pages/Zone/Card/ZoneCalendar.vue
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/src/pages/Zone/Card/ZoneCard.vue b/src/pages/Zone/Card/ZoneCard.vue
new file mode 100644
index 0000000000..948636c55a
--- /dev/null
+++ b/src/pages/Zone/Card/ZoneCard.vue
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/src/pages/Zone/Card/ZoneDescriptor.vue b/src/pages/Zone/Card/ZoneDescriptor.vue
new file mode 100644
index 0000000000..93e951801b
--- /dev/null
+++ b/src/pages/Zone/Card/ZoneDescriptor.vue
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+ {{ t('Summary') }}
+
+
+
+
+
+ {{ console.log('entity', entity) }}
+
+
+
+
+
+
+
+
+
+
+es:
+ Summary: Detalles
+ The zone will be deleted: El envío será eliminado
+ Do you want to delete this zone?: ¿Quieres eliminar este envío?
+ All zones with current agency: Todos los envíos con la agencia actual
+ Agency: Agencia
+ Closing hour: Hora de cierre
+ zoneing days: Días de viaje
+ Price: Precio
+ Bonus: Bonificación
+
diff --git a/src/pages/Zone/Card/ZoneDescriptorMenuItems.vue b/src/pages/Zone/Card/ZoneDescriptorMenuItems.vue
new file mode 100644
index 0000000000..b6c7f28b39
--- /dev/null
+++ b/src/pages/Zone/Card/ZoneDescriptorMenuItems.vue
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+ {{ t('To clone zone') }}
+
+
+
+
+
+ {{ t('deleteOrder') }}
+
+
+
+
+en:
+ deleteOrder: Delete order
+ confirmDeletion: Confirm deletion
+ confirmDeletionMessage: Are you sure you want to delete this order?
+
+es:
+ To clone zone: Clonar zone
+ deleteOrder: Eliminar pedido
+ confirmDeletion: Confirmar eliminación
+ confirmDeletionMessage: Seguro que quieres eliminar este pedido?
+
+
diff --git a/src/pages/Zone/Card/ZoneDescriptorProxy.vue b/src/pages/Zone/Card/ZoneDescriptorProxy.vue
new file mode 100644
index 0000000000..15c5fb0e54
--- /dev/null
+++ b/src/pages/Zone/Card/ZoneDescriptorProxy.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
diff --git a/src/pages/Zone/Card/ZoneLocations.vue b/src/pages/Zone/Card/ZoneLocations.vue
new file mode 100644
index 0000000000..e4305c8983
--- /dev/null
+++ b/src/pages/Zone/Card/ZoneLocations.vue
@@ -0,0 +1 @@
+Zone Locations
diff --git a/src/pages/Zone/Card/ZoneLog.vue b/src/pages/Zone/Card/ZoneLog.vue
new file mode 100644
index 0000000000..373d210b57
--- /dev/null
+++ b/src/pages/Zone/Card/ZoneLog.vue
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/src/pages/Zone/Card/ZoneSummary.vue b/src/pages/Zone/Card/ZoneSummary.vue
new file mode 100644
index 0000000000..00df03cb01
--- /dev/null
+++ b/src/pages/Zone/Card/ZoneSummary.vue
@@ -0,0 +1,94 @@
+
+
+
+
+
+ {{ entity.id }} - {{ entity.firstName }} {{ entity.lastName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('zone.summary.phoneExtension') }}
+
+
+
+
+
+ {{ t('zone.summary.entPhone') }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('zone.summary.sipExtension') }}
+
+
+
+
+
+
+
diff --git a/src/pages/Zone/Card/ZoneWarehouses.vue b/src/pages/Zone/Card/ZoneWarehouses.vue
new file mode 100644
index 0000000000..7ff73a5e95
--- /dev/null
+++ b/src/pages/Zone/Card/ZoneWarehouses.vue
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('Remove row') }}
+
+
+
+
+
+
+
+
+
+
+
+ es:
+ Remove row: Eliminar fila
+
diff --git a/src/pages/Zone/Delivery/ZoneDeliveryCreate.vue b/src/pages/Zone/Delivery/ZoneDeliveryCreate.vue
new file mode 100644
index 0000000000..a48eaf2787
--- /dev/null
+++ b/src/pages/Zone/Delivery/ZoneDeliveryCreate.vue
@@ -0,0 +1,432 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{
+ t('zone.warnings.minHeightBetweenTrays') +
+ zoneConfig.minHeightBetweenTrays +
+ ' cm'
+ }}
+
+ {{
+ t('zone.warnings.maxZoneHeight') +
+ zoneConfig.maxZoneHeight +
+ ' cm'
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('zone.delivery.trayColor') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Zone/Delivery/ZoneDeliveryList.vue b/src/pages/Zone/Delivery/ZoneDeliveryList.vue
new file mode 100644
index 0000000000..695388a9b1
--- /dev/null
+++ b/src/pages/Zone/Delivery/ZoneDeliveryList.vue
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Zone/Upcoming/ZoneUpcomingCreate.vue b/src/pages/Zone/Upcoming/ZoneUpcomingCreate.vue
new file mode 100644
index 0000000000..6bc04c4282
--- /dev/null
+++ b/src/pages/Zone/Upcoming/ZoneUpcomingCreate.vue
@@ -0,0 +1,432 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{
+ t('zone.warnings.minHeightBetweenTrays') +
+ zoneConfig.minHeightBetweenTrays +
+ ' cm'
+ }}
+
+ {{
+ t('zone.warnings.maxZoneHeight') +
+ zoneConfig.maxZoneHeight +
+ ' cm'
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('zone.upcoming.trayColor') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Zone/Upcoming/ZoneUpcomingList.vue b/src/pages/Zone/Upcoming/ZoneUpcomingList.vue
new file mode 100644
index 0000000000..2d3016f258
--- /dev/null
+++ b/src/pages/Zone/Upcoming/ZoneUpcomingList.vue
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Zone/ZoneCreate.vue b/src/pages/Zone/ZoneCreate.vue
new file mode 100644
index 0000000000..93ea9589b1
--- /dev/null
+++ b/src/pages/Zone/ZoneCreate.vue
@@ -0,0 +1,184 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('zone.warnings.noData') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Zone/ZoneDeliveryDays.vue b/src/pages/Zone/ZoneDeliveryDays.vue
new file mode 100644
index 0000000000..485500dbaa
--- /dev/null
+++ b/src/pages/Zone/ZoneDeliveryDays.vue
@@ -0,0 +1 @@
+Zone Delivery days
diff --git a/src/pages/Zone/ZoneFilterPanel.vue b/src/pages/Zone/ZoneFilterPanel.vue
new file mode 100644
index 0000000000..94765919d0
--- /dev/null
+++ b/src/pages/Zone/ZoneFilterPanel.vue
@@ -0,0 +1,55 @@
+
+
+
+ (agencies = data)"
+ auto-load
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Zone/ZoneList.vue b/src/pages/Zone/ZoneList.vue
new file mode 100644
index 0000000000..f260eb1342
--- /dev/null
+++ b/src/pages/Zone/ZoneList.vue
@@ -0,0 +1,112 @@
+
+
+
+ (agencyOptions = data)"
+ :filter="{ fields: ['id', 'name'] }"
+ auto-load
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('zone.list.create') }}
+
+
+
+
diff --git a/src/pages/Zone/ZoneMain.vue b/src/pages/Zone/ZoneMain.vue
new file mode 100644
index 0000000000..66ce78f232
--- /dev/null
+++ b/src/pages/Zone/ZoneMain.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Zone/ZoneUpcoming.vue b/src/pages/Zone/ZoneUpcoming.vue
new file mode 100644
index 0000000000..d405c95f6b
--- /dev/null
+++ b/src/pages/Zone/ZoneUpcoming.vue
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ t(`${getWeekDay(/*detail.shipped*/)}`) }} -
+ {{ t /*'detail.shipped'*/() }}
+
+
+
+
diff --git a/src/pages/Zone/locale/en.yml b/src/pages/Zone/locale/en.yml
new file mode 100644
index 0000000000..e62111d577
--- /dev/null
+++ b/src/pages/Zone/locale/en.yml
@@ -0,0 +1,19 @@
+zone:
+ list:
+ volume: Volume
+ clone: Clone
+ id: Id
+ name: Name
+ agency: Agency
+ close: Close
+ price: Price
+ create: Create zone
+ openSummary: Details
+ create:
+ name: Name
+ agency: Agency
+ close: Close
+ price: Price
+ type:
+ submit: Save
+ reset: Reset
diff --git a/src/pages/Zone/locale/es.yml b/src/pages/Zone/locale/es.yml
new file mode 100644
index 0000000000..5d7a265bfd
--- /dev/null
+++ b/src/pages/Zone/locale/es.yml
@@ -0,0 +1,19 @@
+zone:
+ list:
+ volume: Volumen
+ clone: Clonar
+ id: Id
+ name: Nombre
+ agency: Agencia
+ close: Cierre
+ price: Precio
+ create: Crear zona
+ openSummary: Detalles
+ create:
+ name: Nombre
+ agency: Agencia
+ close: Cierre
+ price: Precio
+ type:
+ submit: Guardar
+ reset: Reiniciar
diff --git a/src/router/modules/index.js b/src/router/modules/index.js
index 941358d26a..7fff2f2e5a 100644
--- a/src/router/modules/index.js
+++ b/src/router/modules/index.js
@@ -17,6 +17,7 @@ import roadmap from './roadmap';
import Parking from './parking';
import Agency from './agency';
import ItemType from './itemType';
+import Zone from './zone';
export default [
Item,
@@ -38,4 +39,5 @@ export default [
Parking,
Agency,
ItemType,
+ Zone,
];
diff --git a/src/router/modules/item.js b/src/router/modules/item.js
index d79ac30719..6e86597472 100644
--- a/src/router/modules/item.js
+++ b/src/router/modules/item.js
@@ -26,6 +26,9 @@ export default {
'ItemTax',
'ItemBotanical',
'ItemBarcode',
+ 'ItemShelving',
+ 'ItemLastEntries',
+ 'ItemTags',
],
},
children: [
@@ -135,6 +138,15 @@ export default {
},
component: () => import('src/pages/Item/Card/ItemTags.vue'),
},
+ {
+ path: 'last-entries',
+ name: 'ItemLastEntries',
+ meta: {
+ title: 'lastEntries',
+ icon: 'vn:regentry',
+ },
+ component: () => import('src/pages/Item/Card/ItemLastEntries.vue'),
+ },
{
path: 'tax',
name: 'ItemTax',
@@ -144,6 +156,24 @@ export default {
},
component: () => import('src/pages/Item/Card/ItemTax.vue'),
},
+ {
+ path: 'botanical',
+ name: 'ItemBotanical',
+ meta: {
+ title: 'botanical',
+ icon: 'local_florist',
+ },
+ component: () => import('src/pages/Item/Card/ItemBotanical.vue'),
+ },
+ {
+ path: 'shelving',
+ name: 'ItemShelving',
+ meta: {
+ title: 'shelving',
+ icon: 'vn:inventory',
+ },
+ component: () => import('src/pages/Item/Card/ItemShelving.vue'),
+ },
{
path: 'barcode',
name: 'ItemBarcode',
diff --git a/src/router/modules/zone.js b/src/router/modules/zone.js
new file mode 100644
index 0000000000..079dfaa844
--- /dev/null
+++ b/src/router/modules/zone.js
@@ -0,0 +1,160 @@
+import { RouterView } from 'vue-router';
+
+export default {
+ path: '/zone',
+ name: 'Zone',
+ meta: {
+ title: 'zones',
+ icon: 'vn:zone',
+ moduleName: 'Zone',
+ },
+ component: RouterView,
+ redirect: { name: 'ZoneMain' },
+ menus: {
+ main: [
+ /*'ZoneList', 'ZoneDeliveryList', 'ZoneUpcomingList'*/
+ ],
+ card: [
+ //
+ ],
+ },
+ children: [
+ // {
+ // path: '/zone',
+ // name: 'ZoneMain',
+ // component: () => import('src/pages/Zone/ZoneMain.vue'),
+ // redirect: { name: 'ZoneList' },
+ // children: [
+ // {
+ // path: 'list',
+ // name: 'ZoneList',
+ // meta: {
+ // title: 'zonesList',
+ // icon: 'vn:zone',
+ // },
+ // component: () => import('src/pages/Zone/ZoneList.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: 'ZoneCard',
+ path: ':id',
+ component: () => import('src/pages/Zone/Card/ZoneCard.vue'),
+ redirect: { name: 'ZoneSummary' },
+ children: [
+ {
+ name: 'ZoneSummary',
+ path: 'summary',
+ meta: {
+ title: 'summary',
+ icon: 'launch',
+ },
+ component: () => import('src/pages/Zone/Card/ZoneSummary.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/router/routes.js b/src/router/routes.js
index 92145d44e7..04780ee176 100644
--- a/src/router/routes.js
+++ b/src/router/routes.js
@@ -17,6 +17,7 @@ import entry from 'src/router/modules/entry';
import roadmap from 'src/router/modules/roadmap';
import parking from 'src/router/modules/parking';
import agency from 'src/router/modules/agency';
+import zone from 'src/router/modules/zone';
const routes = [
{
@@ -75,6 +76,7 @@ const routes = [
parking,
agency,
ItemType,
+ zone,
{
path: '/:catchAll(.*)*',
name: 'NotFound',
diff --git a/src/stores/useNavigationStore.js b/src/stores/useNavigationStore.js
index f075301f66..ee1e04e9b6 100644
--- a/src/stores/useNavigationStore.js
+++ b/src/stores/useNavigationStore.js
@@ -21,6 +21,7 @@ export const useNavigationStore = defineStore('navigationStore', () => {
'ticket',
'worker',
'wagon',
+ 'zone',
];
const pinnedModules = ref([]);
const role = useRole();
diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js
index 28a8aa9795..e7f8cb9d94 100755
--- a/test/cypress/support/commands.js
+++ b/test/cypress/support/commands.js
@@ -38,6 +38,15 @@ Cypress.Commands.add('login', (user) => {
},
}).then((response) => {
window.localStorage.setItem('token', response.body.token);
+ cy.request({
+ method: 'GET',
+ url: '/api/VnUsers/ShareToken',
+ headers: {
+ Authorization: window.localStorage.getItem('token'),
+ },
+ }).then(({ body }) => {
+ window.localStorage.setItem('tokenMultimedia', body.multimediaToken.id);
+ });
});
});