Aggiunto comune, + filtro regione e provincia

aggiunto Visibilità (da fare check)
This commit is contained in:
Paolo Arena
2022-09-18 20:17:03 +02:00
parent 193afa770b
commit ce79360d03
2 changed files with 120 additions and 5 deletions

View File

@@ -859,6 +859,43 @@ export default defineComponent({
useinput: false,
icon: 'fas fa-globe-europe'
},
{
label: 'Provincia',
table: 'provinces',
key: 'idProvince',
type: costanti.FieldType.select,
value: tools.getCookie(tools.COOK_SEARCH + 'provinces', costanti.FILTER_TUTTI),
addall: true,
arrvalue: [],
filter: getFilterProvinceByRegion,
useinput: true,
icon: 'flag',
},
{
label: 'Comune',
table: 'cities',
key: 'idCity',
type: costanti.FieldType.select_by_server,
value: tools.getCookie(tools.COOK_SEARCH + 'cities', costanti.FILTER_TUTTI),
addall: true,
arrvalue: [],
useinput: true,
filter: null,
// filter: getFilterCitiesByProvince,
// param1: shared_consts.PARAM_SHOW_PROVINCE,
tablesel: 'cities',
},
{
label: 'Visibilità',
table: 'pub_to_share',
key: 'pub_to_share',
type: costanti.FieldType.select,
value: tools.getCookie(tools.COOK_SEARCH + 'pub_to_share', shared_consts.PUBTOSHARE.ALL, true),
addall: false,
arrvalue: [],
useinput: false,
filter: null,
},
]
searchList_MyGroups.value = [
@@ -1030,13 +1067,49 @@ export default defineComponent({
} else if (props.table === toolsext.TABCIRCUITS) {
let lk_tab = 'circuits'
let lk_LF = 'idapp'
let lk_FF = 'idapp'
let lk_as = 'circuit'
let af_objId_tab = 'myId'
let lk_tab = 'cities'
let lk_LF = 'idCity'
let lk_FF = '_id'
let lk_as = 'mycities'
let af_objId_tab = ''
return {
lookup1: {
lk_tab,
lk_LF,
lk_FF,
lk_as,
af_objId_tab,
lk_proj: {
_id: 1,
groupnameId: 1,
path: 1,
name: 1,
subname: 1,
longdescr: 1,
regulation: 1,
totCircolante: 1,
totTransato: 1,
systemUserId: 1,
createdBy: 1,
date_created: 1,
date_updated: 1,
nome_valuta: 1,
fido_scoperto_default: 1,
qta_max_default: 1,
symbol: 1,
idCity: 1,
pub_to_share: 1,
color: 1,
abbrev: 1,
data_costituz: 1,
photos: 1,
admins: 1,
req_users: 1,
refused_users: 1,
'mycities': 1,
}
},
}
} else if (props.table === toolsext.TABMYGOODS) {

View File

@@ -2450,6 +2450,27 @@ export const colTableCircuitComplete = [
}),
AddCol({ name: 'subname', label_trans: 'circuit.subname' }),
AddCol({ name: 'longdescr', label_trans: 'circuit.descr', fieldtype: costanti.FieldType.html }),
AddCol({
name: 'idCity',
label_trans: 'skill.city',
fieldtype: costanti.FieldType.multiselect_by_server,
jointable: 'cities',
tablesel: 'cities',
noshowlabel: true,
icon: 'fas fa-map-marker-alt',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
remote_table: 'mycities',
remote_key: '_id',
remote_field: 'comune',
required: true,
}),
AddCol({
name: 'visibility',
label_trans: 'bot.visibility',
fieldtype: costanti.FieldType.multiselect,
jointable: 'visibilGroup',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
}),
AddCol({ name: 'regulation', label_trans: 'circuit.regulation', fieldtype: costanti.FieldType.html }),
AddCol({ name: 'systemUserDescr', label_trans: 'circuit.systemUserDescr' }),
AddCol({ name: 'systemUserId', label_trans: 'circuit.systemUserId', fieldtype: costanti.FieldType.select, jointable: 'users', }),
@@ -2523,6 +2544,27 @@ export const colTableCircuit = [
}),
AddCol({ name: 'subname', label_trans: 'circuit.subname' }),
AddCol({ name: 'longdescr', label_trans: 'circuit.descr', fieldtype: costanti.FieldType.html }),
AddCol({
name: 'idCity',
label_trans: 'skill.city',
fieldtype: costanti.FieldType.multiselect_by_server,
jointable: 'cities',
tablesel: 'cities',
noshowlabel: true,
icon: 'fas fa-map-marker-alt',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
remote_table: 'mycities',
remote_key: '_id',
remote_field: 'comune',
required: true,
}),
AddCol({
name: 'visibility',
label_trans: 'bot.visibility',
fieldtype: costanti.FieldType.multiselect,
jointable: 'visibilGroup',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
}),
AddCol({ name: 'systemUserId', label_trans: 'circuit.systemUserId', fieldtype: costanti.FieldType.select, jointable: 'users',
showWhen: costanti.showWhen.InEdit + costanti.showWhen.InView,
}),