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) {
{ + 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) => { --> - - -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(); });