diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue
index eb0bbbe66..dac028965 100644
--- a/src/components/ui/VnFilterPanel.vue
+++ b/src/components/ui/VnFilterPanel.vue
@@ -147,7 +147,7 @@ const customTags = computed(() =>
async function remove(key) {
userParams.value[key] = null;
- await search();
+ await arrayData.applyFilter({ params: userParams.value });
emit('remove', key);
}
diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml
index d8fb231f0..c5f923855 100644
--- a/src/i18n/locale/en.yml
+++ b/src/i18n/locale/en.yml
@@ -1234,12 +1234,6 @@ item/itemType:
itemType: Item type
basicData: Basic data
summary: Summary
-zone:
- pageTitles:
- zones: Zone
- zonesList: Zones
- deliveryList: Delivery days
- upcomingList: Upcoming deliveries
components:
topbar: {}
itemsFilterPanel:
diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml
index 67e075935..3b417c3a6 100644
--- a/src/i18n/locale/es.yml
+++ b/src/i18n/locale/es.yml
@@ -1233,12 +1233,7 @@ item/itemType:
itemType: Familia
basicData: Datos básicos
summary: Resumen
-zone:
- pageTitles:
- zones: Zona
- zonesList: Zonas
- deliveryList: Días de entrega
- upcomingList: Próximos repartos
+
components:
topbar: {}
itemsFilterPanel:
diff --git a/src/pages/Route/RouteAutonomous.vue b/src/pages/Route/RouteAutonomous.vue
index 0ecf0a971..238dce070 100644
--- a/src/pages/Route/RouteAutonomous.vue
+++ b/src/pages/Route/RouteAutonomous.vue
@@ -280,7 +280,7 @@ function navigateToRouteSummary(event, row) {
{
{
import VnCard from 'components/common/VnCard.vue';
+import ZoneDescriptor from './ZoneDescriptor.vue';
-
+
diff --git a/src/pages/Zone/Card/ZoneDescriptor.vue b/src/pages/Zone/Card/ZoneDescriptor.vue
index 93e951801..8f0aa9e07 100644
--- a/src/pages/Zone/Card/ZoneDescriptor.vue
+++ b/src/pages/Zone/Card/ZoneDescriptor.vue
@@ -6,6 +6,7 @@ import { useI18n } from 'vue-i18n';
import CardDescriptor from 'components/ui/CardDescriptor.vue';
import VnLv from 'src/components/ui/VnLv.vue';
import { toTimeFormat } from 'src/filters/date';
+import { toCurrency } from 'filters/index';
import useCardDescription from 'src/composables/useCardDescription';
@@ -73,24 +74,11 @@ const setData = (entity) => {
-->
{{ 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/ZoneSummary.vue b/src/pages/Zone/Card/ZoneSummary.vue
index 00df03cb0..b39d2aaab 100644
--- a/src/pages/Zone/Card/ZoneSummary.vue
+++ b/src/pages/Zone/Card/ZoneSummary.vue
@@ -2,14 +2,16 @@
import { ref, onMounted, computed } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
-import { dashIfEmpty } from 'src/filters';
-import { getUrl } from 'src/composables/getUrl';
+
import VnLv from 'src/components/ui/VnLv.vue';
-import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
import CardSummary from 'components/ui/CardSummary.vue';
-import VnUserLink from 'src/components/ui/VnUserLink.vue';
import VnTitle from 'src/components/common/VnTitle.vue';
+import { getUrl } from 'src/composables/getUrl';
+import { toCurrency } from 'filters/index';
+import { toTimeFormat } from 'src/filters/date';
+import axios from 'axios';
+
const route = useRoute();
const { t } = useI18n();
@@ -23,71 +25,84 @@ const $props = defineProps({
const entityId = computed(() => $props.id || route.params.id);
const zoneUrl = ref();
-onMounted(async () => {
- zoneUrl.value = (await getUrl('')) + `zone/${entityId.value}/`;
+const filter = computed(() => {
+ const filter = {
+ include: {
+ relation: 'agencyMode',
+ fields: ['name'],
+ },
+ where: {
+ id: route.params.id,
+ },
+ };
+ return filter;
});
-const filter = computed(() => {
- return { where: { id: entityId.value } };
+const columns = computed(() => [
+ {
+ label: t('summary.name'),
+ name: 'name',
+ field: 'warehouse',
+ align: 'left',
+ format: (val) => val.name,
+ },
+]);
+const warehouses = ref([]);
+
+const getWarehouses = async () => {
+ const params = {
+ filter: {
+ include: {
+ relation: 'warehouse',
+ fields: ['name'],
+ },
+ },
+ };
+
+ const { data } = await axios.get(`Zones/${entityId.value}/warehouses`, { params });
+ warehouses.value = data;
+};
+
+onMounted(async () => {
+ zoneUrl.value = (await getUrl('')) + `zone/${entityId.value}/`;
+ await getWarehouses();
});
- {{ entity.id }} - {{ entity.firstName }} {{ entity.lastName }}
+ #{{ entity.id }} - {{ entity.name }}
-
-
-
-
-
-
-
-
-
-
-
- {{ t('zone.summary.phoneExtension') }}
-
-
-
-
-
- {{ t('zone.summary.entPhone') }}
-
-
-
-
+
+
+
+
-
-
-
-
-
-
- {{ t('zone.summary.sipExtension') }}
-
-
-
+
+
+
+
+
+
+
+
diff --git a/src/pages/Zone/Delivery/ZoneDeliveryList.vue b/src/pages/Zone/Delivery/ZoneDeliveryList.vue
index 695388a9b..ca87dbd84 100644
--- a/src/pages/Zone/Delivery/ZoneDeliveryList.vue
+++ b/src/pages/Zone/Delivery/ZoneDeliveryList.vue
@@ -63,7 +63,7 @@ async function remove(row) {
outline
/>
@@ -116,7 +116,7 @@ function filterType(val, update) {
-
+
- (agencies = data)"
- auto-load
- />
-
-
+ (agencies = data)" auto-load />
+
+
+
+ {{ t(`filterPanel.${tag.label}`) }}:
+ {{ tag.value }}
+
+
+
-
+
-
-
+
diff --git a/src/pages/Zone/ZoneList.vue b/src/pages/Zone/ZoneList.vue
index f260eb134..3806a519e 100644
--- a/src/pages/Zone/ZoneList.vue
+++ b/src/pages/Zone/ZoneList.vue
@@ -1,111 +1,219 @@
- (agencyOptions = data)"
- :filter="{ fields: ['id', 'name'] }"
- auto-load
- />
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ t(col.label) }}
+ {{
+ col.tooltip
+ }}
+
+
+
+
+
+
+
+ {{ props.value }}
+
+
+
+
+
+
+ {{ t('globals.clone') }}
+
+
+ {{ t('Preview') }}
+
+
+
+
+
-
- {{ t('zone.list.create') }}
+
+ {{ t('list.create') }}
diff --git a/src/pages/Zone/locale/en.yml b/src/pages/Zone/locale/en.yml
index e62111d57..d0a22ebcd 100644
--- a/src/pages/Zone/locale/en.yml
+++ b/src/pages/Zone/locale/en.yml
@@ -1,19 +1,40 @@
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
+ pageTitles:
+ zones: Zone
+ zonesList: Zones
+ deliveryList: Delivery days
+ upcomingList: Upcoming deliveries
+list:
+ clone: Clone
+ id: Id
+ name: Name
+ agency: Agency
+ close: Close
+ price: Price
+ create: Create zone
+ openSummary: Details
+ confirmCloneTitle: All it's properties will be copied
+ confirmCloneSubtitle: Do you want to clone this zone?
+ searchZone: Search zones
+ searchInfo: Search zone by id or name
+create:
+ name: Name
+ agency: Agency
+ close: Close
+ price: Price
+type:
+ submit: Save
+ reset: Reset
+summary:
+ agency: Agency
+ price: Price
+ basicData: Basic data
+ bonus: Bonus
+ closeHour: Close hour
+ travelingDays: Traveling days
+ volumetric: Volumetric
+ warehouse: Warehouse
+ name: Name
+filterPanel:
+ name: Name
+ agencyModeFk: Agency
diff --git a/src/pages/Zone/locale/es.yml b/src/pages/Zone/locale/es.yml
index 5d7a265bf..ad740d5f7 100644
--- a/src/pages/Zone/locale/es.yml
+++ b/src/pages/Zone/locale/es.yml
@@ -1,19 +1,42 @@
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
+ pageTitles:
+ zones: Zonas
+ zonesList: Zonas
+ deliveryList: Días de entrega
+ upcomingList: Próximos repartos
+list:
+ clone: Clonar
+ id: Id
+ name: Nombre
+ agency: Agencia
+ close: Cierre
+ price: Precio
+ create: Crear zona
+ openSummary: Detalles
+ confirmCloneTitle: Todas sus propiedades serán copiadas
+ confirmCloneSubtitle: ¿Seguro que quieres clonar esta zona?
+ searchZone: Buscar zonas
+ searchInfo: Buscar zonas por identificador o nombre
+create:
+ name: Nombre
+ agency: Agencia
+ close: Cierre
+ price: Precio
+type:
+ submit: Guardar
+ reset: Reiniciar
+summary:
+ agency: Agencia
+ price: Precio
+ basicData: Datos básicos
+ bonus: Bonificación
+ closeHour: Hora de cierre
+ travelingDays: Días de viaje
+ volumetric: Volumétrico
+ warehouse: Almacén
+ name: Nombre
+filterPanel:
+ name: Nombre
+ agencyModeFk: Agencia
+Search zones: Buscar zonas
+You can search by zone reference: Puedes buscar por referencia de la zona
diff --git a/src/router/modules/zone.js b/src/router/modules/zone.js
index 079dfaa84..d39ed82d0 100644
--- a/src/router/modules/zone.js
+++ b/src/router/modules/zone.js
@@ -11,58 +11,54 @@ export default {
component: RouterView,
redirect: { name: 'ZoneMain' },
menus: {
- main: [
- /*'ZoneList', 'ZoneDeliveryList', 'ZoneUpcomingList'*/
- ],
- card: [
- //
- ],
+ main: ['ZoneList', 'ZoneDeliveryList', 'ZoneUpcomingList'],
+ card: ['ZoneBasicData'],
},
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'),
- // },
- // ],
- // },
+ {
+ 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',
@@ -78,6 +74,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'),
+ },
// {
// path: '/zone/delivery',
// name: 'ZoneDeliveryMain',