- sistemati i filtri per tabella
- corretto le preferenze dell'ospitalità
This commit is contained in:
@@ -147,6 +147,7 @@ export default defineComponent({
|
||||
|
||||
watch(() => props.table, (newval, oldval) => {
|
||||
tablesel.value = props.table
|
||||
console.log('CHANGE TABLESEL', tablesel.value)
|
||||
})
|
||||
|
||||
watch(() => globalStore.myselector.data, (newval, oldval) => {
|
||||
@@ -180,11 +181,11 @@ export default defineComponent({
|
||||
|
||||
const recRegion = searchList.value.find((rec) => rec.table === tabregion)
|
||||
if (recRegion)
|
||||
tools.setCookie(tools.COOK_SEARCH + tabregion, newval)
|
||||
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + tabregion, newval)
|
||||
|
||||
for (const item of searchList.value) {
|
||||
if (item.table === tableprov) {
|
||||
const valsaved = tools.getCookie(tools.COOK_SEARCH + tableprov + '_' + newval, costanti.FILTER_TUTTI)
|
||||
const valsaved = tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + item.table + costanti.FILTER_SEP + newval, costanti.FILTER_TUTTI)
|
||||
const rec = searchList.value.find((myrec) => myrec.table === tableprov) // check if exist
|
||||
let trovato = false
|
||||
let arrvalues = []
|
||||
@@ -201,7 +202,7 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
} else if (item.table === toolsext.TABCITIES) {
|
||||
const valsaved = tools.getCookie(tools.COOK_SEARCH + toolsext.TABCITIES + '_' + newval, costanti.FILTER_TUTTI)
|
||||
const valsaved = tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + item.table + costanti.FILTER_SEP + newval, costanti.FILTER_TUTTI)
|
||||
const rec = searchList.value.find((myrec) => myrec.table === toolsext.TABCITIES) // check if exist
|
||||
let trovato = false
|
||||
let arrvalues = []
|
||||
@@ -222,20 +223,19 @@ export default defineComponent({
|
||||
|
||||
}
|
||||
|
||||
function searchval(newval: any, table: any) {
|
||||
// console.log('REFRR searchval', newval, table)
|
||||
function searchval(newval: any, table: any, tablesel: any) {
|
||||
console.log('REFRR searchval', newval, table, 'tablesel', tablesel)
|
||||
|
||||
globalStore.myselector = { table, data: newval }
|
||||
// console.log('globalStore.myselector', globalStore.myselector)
|
||||
|
||||
tools.setCookie(tools.COOK_SEARCH + table, newval)
|
||||
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + table, newval)
|
||||
|
||||
if (table === toolsext.TABREGIONS) {
|
||||
setProvinceByRegion(toolsext.TABPROVINCE, table, newval)
|
||||
} else if (table === toolsext.TABGOODS) {
|
||||
const recSector = searchList.value.find((rec) => rec.table === toolsext.TABSECTORGOODS)
|
||||
if (recSector) {
|
||||
tools.setCookie(tools.COOK_SEARCH + table + '_' + recSector.value, newval)
|
||||
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + recSector.value, newval)
|
||||
}
|
||||
// setCategBySector('sectorgoods', table, newval)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user