From d8e7f3acaa3b4b2ea6fcb190225f96c4e6d5a236 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 17 Jan 2024 08:31:28 +0100 Subject: [PATCH] refs #6694 perf: remove comments --- src/components/common/VnLocation.vue | 50 ---------------------------- 1 file changed, 50 deletions(-) diff --git a/src/components/common/VnLocation.vue b/src/components/common/VnLocation.vue index db6f49469..b321b731a 100644 --- a/src/components/common/VnLocation.vue +++ b/src/components/common/VnLocation.vue @@ -7,10 +7,6 @@ const emit = defineEmits(['update:modelValue', 'update:options']); import { useI18n } from 'vue-i18n'; const { t } = useI18n(); -// const citiesLocationOptions = ref([]); -// const provincesLocationOptions = ref([]); -// const countriesOptions = ref([]); -// const townsRef = ref([]); const postcodesOptions = ref([]); const postcodesRef = ref(null); @@ -72,48 +68,14 @@ function showLabel(data) { } function locationFilter(value) { - // if(value==='') return []; let where = { limit: 30 }; const params = { value }; postcodesRef.value.fetch({ where: Object.assign(where, params) }); -// postcodesRef.value.fetch({ -// where: { -// or: [ -// { code: { like: '%4660%' } }, -// { 'town.name': { like: '%Alz%' } } -// ] -// }}); - // const townParams = { name: { like: `%${val}%` } }; - - // townsRef.value.fetch({ where: Object.assign(where, townParams) }); } function handleFetch( data) { -// if (from === 'towns') { -// data = data.reduce((acc, town) => { -// for (const postcode of town.postcodes) { -// console.log(postcode); -// acc.push({ ...postcode, town:{name: town.name, province: town.province} }); -// } - -// return acc; -// }, []); -// } -// console.log(from, data); postcodesOptions.value = data; } - -