- 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)
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
:class="$q.screen.lt.sm ? `` : `q-pa-xs`"
|
||||
v-if="isfinishLoading && mycolumns"
|
||||
>
|
||||
|
||||
<div :class="`shadow-2 rounded-borders`">
|
||||
<div>
|
||||
<div v-if="prop_search || canEdit" class="q-my-xs text-right">
|
||||
@@ -83,7 +84,7 @@
|
||||
: labelcombo(item)
|
||||
"
|
||||
v-model:value="item.value"
|
||||
@update:value="searchval(item.value, item.table)"
|
||||
@update:value="searchval(item.value, item.table, tablesel)"
|
||||
:addall="item.addall"
|
||||
:addnone="item.addnone"
|
||||
:addlast="true"
|
||||
@@ -126,7 +127,7 @@
|
||||
:multiselect_by_server="true"
|
||||
:label="labelcombo(item)"
|
||||
v-model:arrvalue="item.arrvalue"
|
||||
@update:arrvalue="searchval(item.arrvalue, item.table)"
|
||||
@update:arrvalue="searchval(item.arrvalue, item.table, tablesel)"
|
||||
:addall="item.addall"
|
||||
:addnone="item.addnone"
|
||||
dark
|
||||
@@ -152,7 +153,7 @@
|
||||
v-model="item.arrvalue"
|
||||
label-color="primary"
|
||||
:label="labelcombo(item)"
|
||||
@update:model-value="searchval(item.arrvalue, item.table)"
|
||||
@update:model-value="searchval(item.arrvalue, item.table, tablesel)"
|
||||
rounded
|
||||
dark
|
||||
dense
|
||||
|
||||
Reference in New Issue
Block a user