- sistemati i filtri per tabella
- corretto le preferenze dell'ospitalità
This commit is contained in:
@@ -282,6 +282,7 @@ export const shared_consts = {
|
|||||||
TABLES_WITH_FILTER_FIELD: ['caldate'],
|
TABLES_WITH_FILTER_FIELD: ['caldate'],
|
||||||
TABLES_WITH_SPECIAL_FILTER: ['pub_to_share'],
|
TABLES_WITH_SPECIAL_FILTER: ['pub_to_share'],
|
||||||
COL_WITH_FILTER_GTE: ['numMaxPeopleHosp'],
|
COL_WITH_FILTER_GTE: ['numMaxPeopleHosp'],
|
||||||
|
COL_WITH_ARRFILTER_IN_AND: ['preferences'],
|
||||||
TABLES_WITH_DATE: ['mybachecas', 'myhosps'], // 'mybachecas'
|
TABLES_WITH_DATE: ['mybachecas', 'myhosps'], // 'mybachecas'
|
||||||
TABLES_WITH_SORTING: ['mybachecas', 'myhosps'],
|
TABLES_WITH_SORTING: ['mybachecas', 'myhosps'],
|
||||||
TABLES_REC_ID: ['skills', 'goods', 'subskills', 'myskills', 'mybachecas', 'myhosps', 'mygoods'],
|
TABLES_REC_ID: ['skills', 'goods', 'subskills', 'myskills', 'mybachecas', 'myhosps', 'mygoods'],
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
watch(() => props.table, (newval, oldval) => {
|
watch(() => props.table, (newval, oldval) => {
|
||||||
tablesel.value = props.table
|
tablesel.value = props.table
|
||||||
|
console.log('CHANGE TABLESEL', tablesel.value)
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(() => globalStore.myselector.data, (newval, oldval) => {
|
watch(() => globalStore.myselector.data, (newval, oldval) => {
|
||||||
@@ -180,11 +181,11 @@ export default defineComponent({
|
|||||||
|
|
||||||
const recRegion = searchList.value.find((rec) => rec.table === tabregion)
|
const recRegion = searchList.value.find((rec) => rec.table === tabregion)
|
||||||
if (recRegion)
|
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) {
|
for (const item of searchList.value) {
|
||||||
if (item.table === tableprov) {
|
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
|
const rec = searchList.value.find((myrec) => myrec.table === tableprov) // check if exist
|
||||||
let trovato = false
|
let trovato = false
|
||||||
let arrvalues = []
|
let arrvalues = []
|
||||||
@@ -201,7 +202,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (item.table === toolsext.TABCITIES) {
|
} 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
|
const rec = searchList.value.find((myrec) => myrec.table === toolsext.TABCITIES) // check if exist
|
||||||
let trovato = false
|
let trovato = false
|
||||||
let arrvalues = []
|
let arrvalues = []
|
||||||
@@ -222,20 +223,19 @@ export default defineComponent({
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function searchval(newval: any, table: any) {
|
function searchval(newval: any, table: any, tablesel: any) {
|
||||||
// console.log('REFRR searchval', newval, table)
|
console.log('REFRR searchval', newval, table, 'tablesel', tablesel)
|
||||||
|
|
||||||
globalStore.myselector = { table, data: newval }
|
globalStore.myselector = { table, data: newval }
|
||||||
// console.log('globalStore.myselector', globalStore.myselector)
|
// console.log('globalStore.myselector', globalStore.myselector)
|
||||||
|
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + table, newval)
|
||||||
tools.setCookie(tools.COOK_SEARCH + table, newval)
|
|
||||||
|
|
||||||
if (table === toolsext.TABREGIONS) {
|
if (table === toolsext.TABREGIONS) {
|
||||||
setProvinceByRegion(toolsext.TABPROVINCE, table, newval)
|
setProvinceByRegion(toolsext.TABPROVINCE, table, newval)
|
||||||
} else if (table === toolsext.TABGOODS) {
|
} else if (table === toolsext.TABGOODS) {
|
||||||
const recSector = searchList.value.find((rec) => rec.table === toolsext.TABSECTORGOODS)
|
const recSector = searchList.value.find((rec) => rec.table === toolsext.TABSECTORGOODS)
|
||||||
if (recSector) {
|
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)
|
// setCategBySector('sectorgoods', table, newval)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
:class="$q.screen.lt.sm ? `` : `q-pa-xs`"
|
:class="$q.screen.lt.sm ? `` : `q-pa-xs`"
|
||||||
v-if="isfinishLoading && mycolumns"
|
v-if="isfinishLoading && mycolumns"
|
||||||
>
|
>
|
||||||
|
|
||||||
<div :class="`shadow-2 rounded-borders`">
|
<div :class="`shadow-2 rounded-borders`">
|
||||||
<div>
|
<div>
|
||||||
<div v-if="prop_search || canEdit" class="q-my-xs text-right">
|
<div v-if="prop_search || canEdit" class="q-my-xs text-right">
|
||||||
@@ -83,7 +84,7 @@
|
|||||||
: labelcombo(item)
|
: labelcombo(item)
|
||||||
"
|
"
|
||||||
v-model:value="item.value"
|
v-model:value="item.value"
|
||||||
@update:value="searchval(item.value, item.table)"
|
@update:value="searchval(item.value, item.table, tablesel)"
|
||||||
:addall="item.addall"
|
:addall="item.addall"
|
||||||
:addnone="item.addnone"
|
:addnone="item.addnone"
|
||||||
:addlast="true"
|
:addlast="true"
|
||||||
@@ -126,7 +127,7 @@
|
|||||||
:multiselect_by_server="true"
|
:multiselect_by_server="true"
|
||||||
:label="labelcombo(item)"
|
:label="labelcombo(item)"
|
||||||
v-model:arrvalue="item.arrvalue"
|
v-model:arrvalue="item.arrvalue"
|
||||||
@update:arrvalue="searchval(item.arrvalue, item.table)"
|
@update:arrvalue="searchval(item.arrvalue, item.table, tablesel)"
|
||||||
:addall="item.addall"
|
:addall="item.addall"
|
||||||
:addnone="item.addnone"
|
:addnone="item.addnone"
|
||||||
dark
|
dark
|
||||||
@@ -152,7 +153,7 @@
|
|||||||
v-model="item.arrvalue"
|
v-model="item.arrvalue"
|
||||||
label-color="primary"
|
label-color="primary"
|
||||||
:label="labelcombo(item)"
|
:label="labelcombo(item)"
|
||||||
@update:model-value="searchval(item.arrvalue, item.table)"
|
@update:model-value="searchval(item.arrvalue, item.table, tablesel)"
|
||||||
rounded
|
rounded
|
||||||
dark
|
dark
|
||||||
dense
|
dense
|
||||||
|
|||||||
@@ -333,7 +333,7 @@ export default defineComponent({
|
|||||||
table: 'regions',
|
table: 'regions',
|
||||||
key: 'idReg',
|
key: 'idReg',
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'regions', costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'regions', costanti.FILTER_TUTTI),
|
||||||
addall: true,
|
addall: true,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
filter: null,
|
filter: null,
|
||||||
@@ -345,7 +345,7 @@ export default defineComponent({
|
|||||||
table: 'provinces',
|
table: 'provinces',
|
||||||
key: 'idProvince',
|
key: 'idProvince',
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'provinces', costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'provinces', costanti.FILTER_TUTTI),
|
||||||
addall: true,
|
addall: true,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
filter: getFilterProvinceByRegion,
|
filter: getFilterProvinceByRegion,
|
||||||
@@ -358,7 +358,7 @@ export default defineComponent({
|
|||||||
table: 'cities',
|
table: 'cities',
|
||||||
key: 'idCity',
|
key: 'idCity',
|
||||||
type: costanti.FieldType.select_by_server,
|
type: costanti.FieldType.select_by_server,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'cities', costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'cities', costanti.FILTER_TUTTI),
|
||||||
addall: true,
|
addall: true,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
useinput: true,
|
useinput: true,
|
||||||
@@ -382,7 +382,7 @@ export default defineComponent({
|
|||||||
label: 'Settore',
|
label: 'Settore',
|
||||||
table: toolsext.TABSECTORS,
|
table: toolsext.TABSECTORS,
|
||||||
key: 'idSector',
|
key: 'idSector',
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORS, 0, true),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + toolsext.TABSECTORS, 0, true),
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
filter: null,
|
filter: null,
|
||||||
@@ -394,7 +394,7 @@ export default defineComponent({
|
|||||||
label: 'Categoria',
|
label: 'Categoria',
|
||||||
table: 'skills',
|
table: 'skills',
|
||||||
key: 'idSkill',
|
key: 'idSkill',
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + toolsext.TABSKILLS + '_' + tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORS, costanti.FILTER_TUTTI), costanti.FILTER_TUTTI, true),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORS, costanti.FILTER_TUTTI), costanti.FILTER_TUTTI, true),
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
addall: true,
|
addall: true,
|
||||||
@@ -406,7 +406,7 @@ export default defineComponent({
|
|||||||
label: 'Offro/Cerco',
|
label: 'Offro/Cerco',
|
||||||
table: 'adtypes',
|
table: 'adtypes',
|
||||||
key: 'adType',
|
key: 'adType',
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'adtypes', costanti.FILTER_TUTTI, true),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'adtypes', costanti.FILTER_TUTTI, true),
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
addall: true,
|
addall: true,
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
@@ -451,7 +451,7 @@ export default defineComponent({
|
|||||||
table: 'statusSkills',
|
table: 'statusSkills',
|
||||||
key: 'idStatusSkill',
|
key: 'idStatusSkill',
|
||||||
value: 0,
|
value: 0,
|
||||||
arrvalue: tools.getCookie(tools.COOK_SEARCH + 'statusSkills', []),
|
arrvalue: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'statusSkills', []),
|
||||||
type: costanti.FieldType.multiselect,
|
type: costanti.FieldType.multiselect,
|
||||||
filter: null,
|
filter: null,
|
||||||
useinput: false,
|
useinput: false,
|
||||||
@@ -509,7 +509,7 @@ export default defineComponent({
|
|||||||
table: 'regions',
|
table: 'regions',
|
||||||
key: 'idReg',
|
key: 'idReg',
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'regions', costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'regions', costanti.FILTER_TUTTI),
|
||||||
addall: true,
|
addall: true,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
filter: null,
|
filter: null,
|
||||||
@@ -521,7 +521,7 @@ export default defineComponent({
|
|||||||
table: 'provinces',
|
table: 'provinces',
|
||||||
key: 'idProvince',
|
key: 'idProvince',
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'provinces', costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'provinces', costanti.FILTER_TUTTI),
|
||||||
addall: true,
|
addall: true,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
filter: getFilterProvinceByRegion,
|
filter: getFilterProvinceByRegion,
|
||||||
@@ -533,7 +533,7 @@ export default defineComponent({
|
|||||||
table: 'cities',
|
table: 'cities',
|
||||||
key: 'idCity',
|
key: 'idCity',
|
||||||
type: costanti.FieldType.select_by_server,
|
type: costanti.FieldType.select_by_server,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'cities', costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'cities', costanti.FILTER_TUTTI),
|
||||||
addall: true,
|
addall: true,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
useinput: true,
|
useinput: true,
|
||||||
@@ -569,7 +569,7 @@ export default defineComponent({
|
|||||||
label: 'Settore',
|
label: 'Settore',
|
||||||
table: toolsext.TABSECTORS,
|
table: toolsext.TABSECTORS,
|
||||||
key: 'idSector',
|
key: 'idSector',
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORS, 0, true),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + toolsext.TABSECTORS, 0, true),
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
filter: null,
|
filter: null,
|
||||||
@@ -581,7 +581,7 @@ export default defineComponent({
|
|||||||
label: 'Categoria',
|
label: 'Categoria',
|
||||||
table: 'skills',
|
table: 'skills',
|
||||||
key: 'idSkill',
|
key: 'idSkill',
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + toolsext.TABSKILLS + '_' + tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORS, costanti.FILTER_TUTTI), costanti.FILTER_TUTTI, true),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORS, costanti.FILTER_TUTTI), costanti.FILTER_TUTTI, true),
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
addall: true,
|
addall: true,
|
||||||
@@ -611,7 +611,7 @@ export default defineComponent({
|
|||||||
table: 'regions',
|
table: 'regions',
|
||||||
key: 'idReg',
|
key: 'idReg',
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'regions_hosp', costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'regions', costanti.FILTER_TUTTI),
|
||||||
keycookie: '_hosp',
|
keycookie: '_hosp',
|
||||||
addall: true,
|
addall: true,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
@@ -624,7 +624,7 @@ export default defineComponent({
|
|||||||
table: 'provinces',
|
table: 'provinces',
|
||||||
key: 'idProvince',
|
key: 'idProvince',
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'provinces_hosp', costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'provinces', costanti.FILTER_TUTTI),
|
||||||
keycookie: '_hosp',
|
keycookie: '_hosp',
|
||||||
addall: true,
|
addall: true,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
@@ -637,7 +637,7 @@ export default defineComponent({
|
|||||||
table: 'cities',
|
table: 'cities',
|
||||||
key: 'idCity',
|
key: 'idCity',
|
||||||
type: costanti.FieldType.select_by_server,
|
type: costanti.FieldType.select_by_server,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'cities_hosp', costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'cities', costanti.FILTER_TUTTI),
|
||||||
keycookie: '_hosp',
|
keycookie: '_hosp',
|
||||||
addall: true,
|
addall: true,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
@@ -652,7 +652,7 @@ export default defineComponent({
|
|||||||
table: toolsext.TABTYPEHOSP,
|
table: toolsext.TABTYPEHOSP,
|
||||||
key: 'typeHosp',
|
key: 'typeHosp',
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'typeHosp', costanti.FILTER_TUTTI, true),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + toolsext.TABTYPEHOSP, costanti.FILTER_TUTTI, true),
|
||||||
addall: true,
|
addall: true,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
filter: null,
|
filter: null,
|
||||||
@@ -664,7 +664,7 @@ export default defineComponent({
|
|||||||
table: toolsext.TABPEOPLE,
|
table: toolsext.TABPEOPLE,
|
||||||
key: 'numMaxPeopleHosp',
|
key: 'numMaxPeopleHosp',
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'numMaxPeopleHosp', costanti.FILTER_TUTTI, true),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + toolsext.TABPEOPLE, costanti.FILTER_TUTTI, true),
|
||||||
addall: true,
|
addall: true,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
filter: null,
|
filter: null,
|
||||||
@@ -676,9 +676,9 @@ export default defineComponent({
|
|||||||
table: toolsext.TABPREF,
|
table: toolsext.TABPREF,
|
||||||
key: 'preferences',
|
key: 'preferences',
|
||||||
type: costanti.FieldType.multiselect,
|
type: costanti.FieldType.multiselect,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'preferences', costanti.FILTER_TUTTI),
|
value: 0,
|
||||||
addall: false,
|
addall: false,
|
||||||
arrvalue: [],
|
arrvalue: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + toolsext.TABPREF, []),
|
||||||
filter: null,
|
filter: null,
|
||||||
useinput: false,
|
useinput: false,
|
||||||
icon: 'fas fa-asterisk',
|
icon: 'fas fa-asterisk',
|
||||||
@@ -688,7 +688,7 @@ export default defineComponent({
|
|||||||
table: 'contribtypes',
|
table: 'contribtypes',
|
||||||
key: 'idContribType',
|
key: 'idContribType',
|
||||||
value: 0,
|
value: 0,
|
||||||
arrvalue: tools.getCookie(tools.COOK_SEARCH + 'contribtypes', []),
|
arrvalue: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'contribtypes', []),
|
||||||
type: costanti.FieldType.multiselect,
|
type: costanti.FieldType.multiselect,
|
||||||
filter: null,
|
filter: null,
|
||||||
useinput: false,
|
useinput: false,
|
||||||
@@ -705,7 +705,7 @@ export default defineComponent({
|
|||||||
table: 'regions',
|
table: 'regions',
|
||||||
key: 'idReg',
|
key: 'idReg',
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'regions', costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'regions', costanti.FILTER_TUTTI),
|
||||||
addall: true,
|
addall: true,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
filter: null,
|
filter: null,
|
||||||
@@ -717,7 +717,7 @@ export default defineComponent({
|
|||||||
table: 'provinces',
|
table: 'provinces',
|
||||||
key: 'idProvince',
|
key: 'idProvince',
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'provinces', costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'provinces', costanti.FILTER_TUTTI),
|
||||||
addall: true,
|
addall: true,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
filter: getFilterProvinceByRegion,
|
filter: getFilterProvinceByRegion,
|
||||||
@@ -729,7 +729,7 @@ export default defineComponent({
|
|||||||
table: 'cities',
|
table: 'cities',
|
||||||
key: 'idCity',
|
key: 'idCity',
|
||||||
type: costanti.FieldType.select_by_server,
|
type: costanti.FieldType.select_by_server,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'cities', costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'cities', costanti.FILTER_TUTTI),
|
||||||
addall: true,
|
addall: true,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
useinput: true,
|
useinput: true,
|
||||||
@@ -754,7 +754,7 @@ export default defineComponent({
|
|||||||
label: 'Settore',
|
label: 'Settore',
|
||||||
table: 'sectorgoods',
|
table: 'sectorgoods',
|
||||||
key: 'idSectorGood',
|
key: 'idSectorGood',
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORGOODS, 0, true),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + toolsext.TABSECTORGOODS, 0, true),
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
filter: null,
|
filter: null,
|
||||||
@@ -766,7 +766,7 @@ export default defineComponent({
|
|||||||
label: 'Categoria',
|
label: 'Categoria',
|
||||||
table: 'goods',
|
table: 'goods',
|
||||||
key: 'idGood',
|
key: 'idGood',
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + toolsext.TABGOODS + '_' + tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORGOODS, costanti.FILTER_TUTTI), costanti.FILTER_TUTTI, true),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORGOODS, costanti.FILTER_TUTTI), costanti.FILTER_TUTTI, true),
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
addall: true,
|
addall: true,
|
||||||
@@ -778,7 +778,7 @@ export default defineComponent({
|
|||||||
label: 'Offro/Cerco',
|
label: 'Offro/Cerco',
|
||||||
table: 'adtypes',
|
table: 'adtypes',
|
||||||
key: 'adType',
|
key: 'adType',
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'adtypes', costanti.FILTER_TUTTI, true),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'adtypes', costanti.FILTER_TUTTI, true),
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
addall: true,
|
addall: true,
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
@@ -835,7 +835,7 @@ export default defineComponent({
|
|||||||
table: 'contribtypes',
|
table: 'contribtypes',
|
||||||
key: 'idContribType',
|
key: 'idContribType',
|
||||||
value: 0,
|
value: 0,
|
||||||
arrvalue: tools.getCookie(tools.COOK_SEARCH + 'contribtypes', []),
|
arrvalue: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'contribtypes', []),
|
||||||
type: costanti.FieldType.multiselect,
|
type: costanti.FieldType.multiselect,
|
||||||
filter: null,
|
filter: null,
|
||||||
useinput: false,
|
useinput: false,
|
||||||
@@ -847,7 +847,7 @@ export default defineComponent({
|
|||||||
label: 'Altri Filtri',
|
label: 'Altri Filtri',
|
||||||
table: 'otherfilters',
|
table: 'otherfilters',
|
||||||
key: 'otherfilters',
|
key: 'otherfilters',
|
||||||
arrvalue: tools.getCookie(tools.COOK_SEARCH + 'otherfilters', []),
|
arrvalue: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'otherfilters', []),
|
||||||
value: 0,
|
value: 0,
|
||||||
type: costanti.FieldType.multiselect,
|
type: costanti.FieldType.multiselect,
|
||||||
addall: false,
|
addall: false,
|
||||||
@@ -878,7 +878,7 @@ export default defineComponent({
|
|||||||
table: 'regions',
|
table: 'regions',
|
||||||
key: 'idReg',
|
key: 'idReg',
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'regions', costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'regions', costanti.FILTER_TUTTI),
|
||||||
addall: true,
|
addall: true,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
filter: null,
|
filter: null,
|
||||||
@@ -890,7 +890,7 @@ export default defineComponent({
|
|||||||
table: 'provinces',
|
table: 'provinces',
|
||||||
key: 'idProvince',
|
key: 'idProvince',
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'provinces', costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'provinces', costanti.FILTER_TUTTI),
|
||||||
addall: true,
|
addall: true,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
filter: getFilterProvinceByRegion,
|
filter: getFilterProvinceByRegion,
|
||||||
@@ -902,7 +902,7 @@ export default defineComponent({
|
|||||||
table: 'cities',
|
table: 'cities',
|
||||||
key: 'idCity',
|
key: 'idCity',
|
||||||
type: costanti.FieldType.select_by_server,
|
type: costanti.FieldType.select_by_server,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'cities', costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'cities', costanti.FILTER_TUTTI),
|
||||||
addall: true,
|
addall: true,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
useinput: true,
|
useinput: true,
|
||||||
@@ -919,7 +919,7 @@ export default defineComponent({
|
|||||||
table: 'regions',
|
table: 'regions',
|
||||||
key: 'idReg',
|
key: 'idReg',
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'regions', costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'regions', costanti.FILTER_TUTTI),
|
||||||
addall: true,
|
addall: true,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
filter: null,
|
filter: null,
|
||||||
@@ -931,7 +931,7 @@ export default defineComponent({
|
|||||||
table: 'provinces',
|
table: 'provinces',
|
||||||
key: 'idProvince',
|
key: 'idProvince',
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'provinces', costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'provinces', costanti.FILTER_TUTTI),
|
||||||
addall: true,
|
addall: true,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
filter: getFilterProvinceByRegion,
|
filter: getFilterProvinceByRegion,
|
||||||
@@ -945,7 +945,7 @@ export default defineComponent({
|
|||||||
type: costanti.FieldType.select_by_server,
|
type: costanti.FieldType.select_by_server,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
addall: true,
|
addall: true,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'cities', costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'cities', costanti.FILTER_TUTTI),
|
||||||
useinput: true,
|
useinput: true,
|
||||||
filter: null,
|
filter: null,
|
||||||
// filter: getFilterCitiesByProvince,
|
// filter: getFilterCitiesByProvince,
|
||||||
@@ -957,7 +957,7 @@ export default defineComponent({
|
|||||||
label: 'Categorie',
|
label: 'Categorie',
|
||||||
table: 'catgrps',
|
table: 'catgrps',
|
||||||
key: 'idCatGrp',
|
key: 'idCatGrp',
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'catgrps', costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'catgrps', costanti.FILTER_TUTTI),
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
filter: null,
|
filter: null,
|
||||||
@@ -970,7 +970,7 @@ export default defineComponent({
|
|||||||
table: 'visibilGroup',
|
table: 'visibilGroup',
|
||||||
key: 'visibility',
|
key: 'visibility',
|
||||||
type: costanti.FieldType.multiselect,
|
type: costanti.FieldType.multiselect,
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'visibility', costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'visibility', costanti.FILTER_TUTTI),
|
||||||
addall: true,
|
addall: true,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
useinput: true,
|
useinput: true,
|
||||||
|
|||||||
@@ -508,11 +508,11 @@ export default defineComponent({
|
|||||||
|
|
||||||
const recSector = searchList.value.find((rec) => rec.table === tabsector)
|
const recSector = searchList.value.find((rec) => rec.table === tabsector)
|
||||||
if (recSector)
|
if (recSector)
|
||||||
tools.setCookie(tools.COOK_SEARCH + tabsector, newval)
|
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + tabsector, newval)
|
||||||
|
|
||||||
for (const item of searchList.value) {
|
for (const item of searchList.value) {
|
||||||
if (item.table === tablecat) {
|
if (item.table === tablecat) {
|
||||||
const valsaved = tools.getCookie(tools.COOK_SEARCH + tablecat + '_' + newval, costanti.FILTER_TUTTI)
|
const valsaved = tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + item.table + costanti.FILTER_SEP + newval, costanti.FILTER_TUTTI)
|
||||||
const rec = searchList.value.find((myrec) => myrec.table === tablecat) // check if exist
|
const rec = searchList.value.find((myrec) => myrec.table === tablecat) // check if exist
|
||||||
let trovato = false
|
let trovato = false
|
||||||
let arrvalues = []
|
let arrvalues = []
|
||||||
@@ -539,11 +539,11 @@ export default defineComponent({
|
|||||||
|
|
||||||
const recRegion = searchList.value.find((rec) => rec.table === tabregion)
|
const recRegion = searchList.value.find((rec) => rec.table === tabregion)
|
||||||
if (recRegion)
|
if (recRegion)
|
||||||
tools.setCookie(tools.COOK_SEARCH + tabregion, newval)
|
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + tabregion, newval)
|
||||||
|
|
||||||
for (const item of searchList.value) {
|
for (const item of searchList.value) {
|
||||||
if (item.table === tableprov) {
|
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 + mytable.value + costanti.FILTER_SEP + tableprov + costanti.FILTER_SEP + newval, costanti.FILTER_TUTTI)
|
||||||
const rec = searchList.value.find((myrec) => myrec.table === tableprov) // check if exist
|
const rec = searchList.value.find((myrec) => myrec.table === tableprov) // check if exist
|
||||||
let trovato = false
|
let trovato = false
|
||||||
let arrvalues = []
|
let arrvalues = []
|
||||||
@@ -561,7 +561,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (item.table === toolsext.TABCITIES) {
|
} 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 + mytable.value + 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
|
const rec = searchList.value.find((myrec) => myrec.table === toolsext.TABCITIES) // check if exist
|
||||||
let trovato = false
|
let trovato = false
|
||||||
let arrvalues = []
|
let arrvalues = []
|
||||||
@@ -588,9 +588,9 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function searchval(newval: any, table: any) {
|
function searchval(newval: any, table: any) {
|
||||||
console.log('REFRR searchval', newval, table)
|
console.log('REFRR searchval', newval, table, 'mytable', mytable.value)
|
||||||
const myrecfilt = searchList.value.find((rec) => rec.table === table)
|
const myrecfilt = searchList.value.find((rec) => rec.table === table)
|
||||||
let keycookie = tools.COOK_SEARCH + table
|
let keycookie = tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + table
|
||||||
if (myrecfilt && myrecfilt.keycookie)
|
if (myrecfilt && myrecfilt.keycookie)
|
||||||
keycookie += myrecfilt.keycookie
|
keycookie += myrecfilt.keycookie
|
||||||
tools.setCookie(keycookie, newval)
|
tools.setCookie(keycookie, newval)
|
||||||
@@ -598,7 +598,7 @@ export default defineComponent({
|
|||||||
if (table === toolsext.TABSKILLS) {
|
if (table === toolsext.TABSKILLS) {
|
||||||
const recSector = searchList.value.find((rec) => rec.table === 'sectors')
|
const recSector = searchList.value.find((rec) => rec.table === 'sectors')
|
||||||
if (recSector) {
|
if (recSector) {
|
||||||
tools.setCookie(tools.COOK_SEARCH + table + '_' + recSector.value, newval)
|
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + recSector.value, newval)
|
||||||
}
|
}
|
||||||
} else if (table === toolsext.TABSECTORS) {
|
} else if (table === toolsext.TABSECTORS) {
|
||||||
setCategBySector(toolsext.TABSKILLS, table, newval)
|
setCategBySector(toolsext.TABSKILLS, table, newval)
|
||||||
@@ -609,7 +609,7 @@ export default defineComponent({
|
|||||||
} else if (table === toolsext.TABGOODS) {
|
} else if (table === toolsext.TABGOODS) {
|
||||||
const recSector = searchList.value.find((rec) => rec.table === toolsext.TABSECTORGOODS)
|
const recSector = searchList.value.find((rec) => rec.table === toolsext.TABSECTORGOODS)
|
||||||
if (recSector) {
|
if (recSector) {
|
||||||
tools.setCookie(tools.COOK_SEARCH + table + '_' + recSector.value, newval)
|
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + table + costanti.FILTER_SEP + recSector.value, newval)
|
||||||
}
|
}
|
||||||
// setCategBySector('sectorgoods', table, newval)
|
// setCategBySector('sectorgoods', table, newval)
|
||||||
} else if (table === toolsext.TABCITIES) {
|
} else if (table === toolsext.TABCITIES) {
|
||||||
@@ -850,7 +850,6 @@ export default defineComponent({
|
|||||||
|
|
||||||
} else if (item.arrvalue.length > 0) {
|
} else if (item.arrvalue.length > 0) {
|
||||||
|
|
||||||
|
|
||||||
const myarr = item.arrvalue.filter((value: any) => {
|
const myarr = item.arrvalue.filter((value: any) => {
|
||||||
if (typeof value === 'number') {
|
if (typeof value === 'number') {
|
||||||
return value > 0
|
return value > 0
|
||||||
@@ -861,6 +860,21 @@ export default defineComponent({
|
|||||||
const arr2: any = []
|
const arr2: any = []
|
||||||
|
|
||||||
if (item.table !== 'provinces') {
|
if (item.table !== 'provinces') {
|
||||||
|
if (shared_consts.COL_WITH_ARRFILTER_IN_AND.includes(item.key)) {
|
||||||
|
myarr.forEach((myval: any) => {
|
||||||
|
const objitem2: any = {}
|
||||||
|
objitem2[item.key] = myval
|
||||||
|
arr2.push(objitem2)
|
||||||
|
})
|
||||||
|
|
||||||
|
const obj2: any = {
|
||||||
|
$and: arr2
|
||||||
|
}
|
||||||
|
if (arr2.length > 0) {
|
||||||
|
filtersearch.push(obj2)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
myarr.forEach((myval: any) => {
|
myarr.forEach((myval: any) => {
|
||||||
const objitem2: any = {}
|
const objitem2: any = {}
|
||||||
objitem2[item.key] = myval
|
objitem2[item.key] = myval
|
||||||
@@ -874,6 +888,7 @@ export default defineComponent({
|
|||||||
filtersearch.push(obj2)
|
filtersearch.push(obj2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if ((item.table === toolsext.TABSKILLS) && item.value === costanti.FILTER_TUTTI) {
|
if ((item.table === toolsext.TABSKILLS) && item.value === costanti.FILTER_TUTTI) {
|
||||||
|
|||||||
@@ -488,11 +488,11 @@ export default defineComponent({
|
|||||||
|
|
||||||
const recSector = searchList.value.find((rec) => rec.table === tabsector)
|
const recSector = searchList.value.find((rec) => rec.table === tabsector)
|
||||||
if (recSector)
|
if (recSector)
|
||||||
tools.setCookie(tools.COOK_SEARCH + tabsector, newval)
|
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + tabsector + costanti.FILTER_SEP + tabsector, newval)
|
||||||
|
|
||||||
for (const item of searchList.value) {
|
for (const item of searchList.value) {
|
||||||
if (item.table === tablecat) {
|
if (item.table === tablecat) {
|
||||||
const valsaved = tools.getCookie(tools.COOK_SEARCH + tablecat + '_' + newval, costanti.FILTER_TUTTI)
|
const valsaved = tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + tablecat + costanti.FILTER_SEP + newval, costanti.FILTER_TUTTI)
|
||||||
const rec = searchList.value.find((myrec) => myrec.table === tablecat) // check if exist
|
const rec = searchList.value.find((myrec) => myrec.table === tablecat) // check if exist
|
||||||
let trovato = false
|
let trovato = false
|
||||||
let arrvalues = []
|
let arrvalues = []
|
||||||
@@ -519,11 +519,11 @@ export default defineComponent({
|
|||||||
|
|
||||||
const recRegion = searchList.value.find((rec) => rec.table === tabregion)
|
const recRegion = searchList.value.find((rec) => rec.table === tabregion)
|
||||||
if (recRegion)
|
if (recRegion)
|
||||||
tools.setCookie(tools.COOK_SEARCH + tabregion, newval)
|
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + tabregion + costanti.FILTER_SEP + tabregion, newval)
|
||||||
|
|
||||||
for (const item of searchList.value) {
|
for (const item of searchList.value) {
|
||||||
if (item.table === tableprov) {
|
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 + tableprov + costanti.FILTER_SEP + newval, costanti.FILTER_TUTTI)
|
||||||
const rec = searchList.value.find((myrec) => myrec.table === tableprov) // check if exist
|
const rec = searchList.value.find((myrec) => myrec.table === tableprov) // check if exist
|
||||||
let trovato = false
|
let trovato = false
|
||||||
let arrvalues = []
|
let arrvalues = []
|
||||||
@@ -541,7 +541,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (item.table === toolsext.TABCITIES) {
|
} 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
|
const rec = searchList.value.find((myrec) => myrec.table === toolsext.TABCITIES) // check if exist
|
||||||
let trovato = false
|
let trovato = false
|
||||||
let arrvalues = []
|
let arrvalues = []
|
||||||
@@ -570,7 +570,7 @@ export default defineComponent({
|
|||||||
function searchval(newval: any, table: any) {
|
function searchval(newval: any, table: any) {
|
||||||
console.log('REFRR searchval', newval, table)
|
console.log('REFRR searchval', newval, table)
|
||||||
const myrecfilt = searchList.value.find((rec) => rec.table === table)
|
const myrecfilt = searchList.value.find((rec) => rec.table === table)
|
||||||
let keycookie = tools.COOK_SEARCH + table
|
let keycookie = tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP
|
||||||
if (myrecfilt && myrecfilt.keycookie)
|
if (myrecfilt && myrecfilt.keycookie)
|
||||||
keycookie += myrecfilt.keycookie
|
keycookie += myrecfilt.keycookie
|
||||||
tools.setCookie(keycookie, newval)
|
tools.setCookie(keycookie, newval)
|
||||||
@@ -578,7 +578,7 @@ export default defineComponent({
|
|||||||
if (table === toolsext.TABSKILLS) {
|
if (table === toolsext.TABSKILLS) {
|
||||||
const recSector = searchList.value.find((rec) => rec.table === 'sectors')
|
const recSector = searchList.value.find((rec) => rec.table === 'sectors')
|
||||||
if (recSector) {
|
if (recSector) {
|
||||||
tools.setCookie(tools.COOK_SEARCH + table + '_' + recSector.value, newval)
|
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + table + costanti.FILTER_SEP + recSector.value, newval)
|
||||||
}
|
}
|
||||||
} else if (table === toolsext.TABSECTORS) {
|
} else if (table === toolsext.TABSECTORS) {
|
||||||
setCategBySector(toolsext.TABSKILLS, table, newval)
|
setCategBySector(toolsext.TABSKILLS, table, newval)
|
||||||
@@ -589,7 +589,7 @@ export default defineComponent({
|
|||||||
} else if (table === toolsext.TABGOODS) {
|
} else if (table === toolsext.TABGOODS) {
|
||||||
const recSector = searchList.value.find((rec) => rec.table === toolsext.TABSECTORGOODS)
|
const recSector = searchList.value.find((rec) => rec.table === toolsext.TABSECTORGOODS)
|
||||||
if (recSector) {
|
if (recSector) {
|
||||||
tools.setCookie(tools.COOK_SEARCH + table + '_' + recSector.value, newval)
|
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + table + costanti.FILTER_SEP + recSector.value, newval)
|
||||||
}
|
}
|
||||||
// setCategBySector('sectorgoods', table, newval)
|
// setCategBySector('sectorgoods', table, newval)
|
||||||
} else if (table === toolsext.TABCITIES) {
|
} else if (table === toolsext.TABCITIES) {
|
||||||
|
|||||||
@@ -148,9 +148,7 @@
|
|||||||
costanti.TIPOFAVBOOK.SEEN,
|
costanti.TIPOFAVBOOK.SEEN,
|
||||||
false,
|
false,
|
||||||
$t('cmd.seen', {
|
$t('cmd.seen', {
|
||||||
num: myrec.numseen
|
num: myrec.numseen ? myrec.numseen : 0,
|
||||||
? myrec.numseen
|
|
||||||
: 0,
|
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
@@ -161,9 +159,7 @@
|
|||||||
<q-item-section>
|
<q-item-section>
|
||||||
{{
|
{{
|
||||||
$t('cmd.seen', {
|
$t('cmd.seen', {
|
||||||
num: myrec.numseen
|
num: myrec.numseen ? myrec.numseen : 0,
|
||||||
? myrec.numseen
|
|
||||||
: 0,
|
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
@@ -235,9 +231,7 @@
|
|||||||
costanti.TIPOFAVBOOK.BOOKMARK,
|
costanti.TIPOFAVBOOK.BOOKMARK,
|
||||||
false,
|
false,
|
||||||
$t('cmd.bookmark', {
|
$t('cmd.bookmark', {
|
||||||
num: myrec.numbook
|
num: myrec.numbook ? myrec.numbook : 0,
|
||||||
? myrec.numbook
|
|
||||||
: 0,
|
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
@@ -248,9 +242,7 @@
|
|||||||
<q-item-section>
|
<q-item-section>
|
||||||
{{
|
{{
|
||||||
$t('cmd.bookmark', {
|
$t('cmd.bookmark', {
|
||||||
num: myrec.numbook
|
num: myrec.numbook ? myrec.numbook : 0,
|
||||||
? myrec.numbook
|
|
||||||
: 0,
|
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
@@ -277,6 +269,23 @@
|
|||||||
</div>
|
</div>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
||||||
|
<q-item-section avatar>
|
||||||
|
<q-item-label>
|
||||||
|
<span
|
||||||
|
v-for="(recstatus, index) in myrec.idStatusSkill"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<q-chip
|
||||||
|
dense
|
||||||
|
:color="globalStore.getColByStatusSkills(recstatus)"
|
||||||
|
text-color="white"
|
||||||
|
>
|
||||||
|
{{ globalStore.getStatusSkillById(recstatus) }}
|
||||||
|
</q-chip>
|
||||||
|
</span>
|
||||||
|
</q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label v-if="myrec.typeHosp" class="text-bold text-h7">
|
<q-item-label v-if="myrec.typeHosp" class="text-bold text-h7">
|
||||||
<q-chip dense color="green" text-color="white"
|
<q-chip dense color="green" text-color="white"
|
||||||
|
|||||||
@@ -327,6 +327,7 @@ export const costanti = {
|
|||||||
TABLES_ARRAY: ['mygroups', 'circuits'],
|
TABLES_ARRAY: ['mygroups', 'circuits'],
|
||||||
TABLES_USERNAME_DATE: ['friends', 'friendsandme'],
|
TABLES_USERNAME_DATE: ['friends', 'friendsandme'],
|
||||||
TABLES_IMG_USERNAME: ['friends', 'friendsandme'],
|
TABLES_IMG_USERNAME: ['friends', 'friendsandme'],
|
||||||
|
FILTER_SEP: '_',
|
||||||
|
|
||||||
FuncDialog: {
|
FuncDialog: {
|
||||||
CANCEL_BOOKING: 1,
|
CANCEL_BOOKING: 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user