Aggiunto il filtro per Provincia

This commit is contained in:
paoloar77
2022-01-23 23:25:19 +01:00
parent 6e54fa06c4
commit 030523c8ee
25 changed files with 1097 additions and 405 deletions

View File

@@ -61,6 +61,16 @@ export default defineComponent({
}
}
function getFilterCitiesByProvince(recSubSkill: any, index: number, arr: any) {
const recprov:any = searchList.value.find((rec) => rec.table === 'provinces')
// console.log('recSubSkill', recSubSkill, 'recskills', recskills)
if (recprov) {
return recSubSkill.idSkill === recprov.value
} else {
return true
}
}
searchList.value = [
{
@@ -110,15 +120,28 @@ export default defineComponent({
useinput: true,
},*/
{
label: 'Citta',
label: 'Provincia',
table: 'provinces',
key: 'idProvince',
type: costanti.FieldType.multiselect,
value: 0,
addall: true,
arrvalue: tools.getCookie(tools.COOK_SEARCH + 'provinces', [costanti.FILTER_TUTTI]),
filter: null,
useinput: true,
notinsearch: true,
},
{
label: 'Città',
table: 'cities',
key: 'idCity',
key: 'idProvince',
type: costanti.FieldType.multiselect_by_server,
value: 0,
addall: true,
arrvalue: tools.getCookie(tools.COOK_SEARCH + 'cities', [costanti.FILTER_TUTTI]),
filter: null,
useinput: true,
filter: getFilterCitiesByProvince,
// param1: shared_consts.PARAM_SHOW_PROVINCE,
tablesel: 'cities',
},
{
@@ -248,10 +271,10 @@ export default defineComponent({
af_objId_tab: '',
},
lookup5: {
lk_tab: 'cities',
lk_LF: 'idCity',
lk_FF: '_id',
lk_as: 'comune',
lk_tab: 'provinces',
lk_LF: 'idProvince',
lk_FF: 'prov',
lk_as: 'descr',
af_objId_tab: '',
},
}