diff --git a/_ALL_SITES/popolodelnuovomondo.app/db/static_data.ts b/_ALL_SITES/popolodelnuovomondo.app/db/static_data.ts index c358ff89..a41cdb4b 100755 --- a/_ALL_SITES/popolodelnuovomondo.app/db/static_data.ts +++ b/_ALL_SITES/popolodelnuovomondo.app/db/static_data.ts @@ -105,6 +105,19 @@ const routes_admin: IListRoutes[] = [ inmenu: true, submenu: true, onlyAdmin: true + }, + { + active: true, + order: 1040, + path: '/admin/importfile', + materialIcon: 'event_seat', + name: 'otherpages.manage.importfile', + component: () => import('@/rootgen/admin/importdata/importdata.vue'), + level_parent: 0.0, + level_child: 0.5, + inmenu: true, + submenu: true, + onlyAdmin: true } ] diff --git a/src/common/shared_nodejs.js b/src/common/shared_nodejs.js index 7c875a80..2c295825 100755 --- a/src/common/shared_nodejs.js +++ b/src/common/shared_nodejs.js @@ -45,6 +45,12 @@ module.exports = { Outcoming: 2, }, + Cmd: { + PROVINCE: 1, + COMUNI: 2, + CITIES_SERVER: 3, + }, + WalletFinalStatusType: { None: 0, InCommonCash: 1, diff --git a/src/common/shared_vuejs.ts b/src/common/shared_vuejs.ts index ccb27f41..696ef31b 100755 --- a/src/common/shared_vuejs.ts +++ b/src/common/shared_vuejs.ts @@ -60,6 +60,7 @@ export const shared_consts = { TAB_COUNTRY: 'countries', TAB_CITIES: 'cities', TAB_PHONES: 'phones', + TAB_SITES: 'sites', TAB_SETTINGS: 'settings', KEY_TO_CRYPTED: ['PWD_FROM'], @@ -72,6 +73,12 @@ export const shared_consts = { Outcoming: 2, }, + Cmd: { + PROVINCE: 1, + COMUNI: 2, + CITIES_SERVER: 3, + }, + BOTTYPE_NONE: 0, BOTTYPE_PAGE: 1, BOTTYPE_LINK: 2, @@ -102,6 +109,89 @@ export const shared_consts = { VISIB_ONLY_ADMIN: 4, + Regions: [ + { + value: 'ABR', + label: 'Abruzzo', + }, + { + value: 'BAS', + label: 'Basilicata', + }, + { + value: 'CAL', + label: 'Calabria', + }, + { + value: 'CAM', + label: 'Campania', + }, + { + value: 'EMI', + label: 'Emilia-Romagna', + }, + { + value: 'FRI', + label: 'Friuli Venezia Giulia', + }, + { + value: 'LAZ', + label: 'Lazio', + }, + { + value: 'LIG', + label: 'Liguria', + }, + { + value: 'LOM', + label: 'Lombardia', + }, + { + value: 'MAR', + label: 'Marche', + }, + { + value: 'MOL', + label: 'Molise', + }, + { + value: 'PIE', + label: 'Piemonte', + }, + { + value: 'PUG', + label: 'Puglia', + }, + { + value: 'SAR', + label: 'Sardegna', + }, + { + value: 'SIC', + label: 'Sicilia', + }, + { + value: 'TOS', + label: 'Toscana', + }, + { + value: 'TRE', + label: 'Trentino-Alto Adige', + }, + { + value: 'UMB', + label: 'Umbria', + }, + { + value: 'VAL', + label: 'Valle d\'Aosta', + }, + { + value: 'VEN', + label: 'Veneto', + }, + ], + Lang: [ { value: 'it', diff --git a/src/components/CFinder/CFinder.ts b/src/components/CFinder/CFinder.ts index bc90d5cd..b82f8d2f 100755 --- a/src/components/CFinder/CFinder.ts +++ b/src/components/CFinder/CFinder.ts @@ -51,6 +51,10 @@ export default defineComponent({ } } + function getFilterCities(recSkill: any, index: number, arr: any) { + return true + } + function getFilterSubSkills(recSubSkill: any, index: number, arr: any) { const recskills:any = searchList.value.find((rec) => rec.table === 'skills') // console.log('recSubSkill', recSubSkill, 'recskills', recskills) @@ -73,6 +77,7 @@ export default defineComponent({ filter: null, addall: true, notinsearch: true, + useinput: false, }, { label: 'Competenza', @@ -84,6 +89,7 @@ export default defineComponent({ addall: true, filter: getFilterSkills, showcount: true, + useinput: true, }, { label: 'Specializz.', @@ -95,15 +101,28 @@ export default defineComponent({ addall: true, filter: getFilterSubSkills, showcount: true, + useinput: false, + }, + { + label: 'Regione', + table: 'regions', + key: 'idReg', + value: 0, + type: costanti.FieldType.select, + arrvalue: tools.getCookie(tools.COOK_SEARCH + 'regions', [costanti.FILTER_TUTTI]), + filter: null, + useinput: true, }, { label: 'Citta', table: 'cities', key: 'idCity', + type: costanti.FieldType.multiselect_by_server, value: 0, - type: costanti.FieldType.multiselect, arrvalue: tools.getCookie(tools.COOK_SEARCH + 'cities', [costanti.FILTER_TUTTI]), filter: null, + useinput: true, + tablesel: 'cities', }, { label: 'Livello', @@ -113,6 +132,7 @@ export default defineComponent({ arrvalue: [], type: costanti.FieldType.select, filter: null, + useinput: false, }, { label: 'Stato', @@ -122,6 +142,7 @@ export default defineComponent({ arrvalue: tools.getCookie(tools.COOK_SEARCH + 'statusSkills', [costanti.FILTER_TUTTI]), type: costanti.FieldType.multiselect, filter: null, + useinput: false, }, { label: 'Contributo', @@ -131,6 +152,7 @@ export default defineComponent({ arrvalue: tools.getCookie(tools.COOK_SEARCH + 'contribtypes', [costanti.FILTER_TUTTI]), type: costanti.FieldType.multiselect, filter: null, + useinput: false, }, ] @@ -208,7 +230,10 @@ export default defineComponent({ userId: 1, username: 1, name: 1, - surname: 1 + surname: 1, + comune: 1, + 'profile.img': 1, + 'profile.qualifica': 1, } }, lookup3: { @@ -225,6 +250,13 @@ export default defineComponent({ lk_as: 'myskill', af_objId_tab: '', }, + lookup5: { + lk_tab: 'cities', + lk_LF: 'idCity', + lk_FF: '_id', + lk_as: 'comune', + af_objId_tab: '', + }, } } diff --git a/src/components/CGridTableRec/CGridTableRec.ts b/src/components/CGridTableRec/CGridTableRec.ts index 363341de..10fd53a9 100755 --- a/src/components/CGridTableRec/CGridTableRec.ts +++ b/src/components/CGridTableRec/CGridTableRec.ts @@ -227,6 +227,8 @@ export default defineComponent({ const mycodeid = toRef(props, 'prop_codeId') + const myvertical = ref(0) + const valoriopt = computed(() => (item: any, addall: boolean) => { // console.log('valoriopt', item.table) return globalStore.getTableJoinByName(item.table, addall, item.filter) @@ -730,7 +732,9 @@ export default defineComponent({ const mysub = elem.subfield ? elem.subfield : '' if (elem) { if (elem.field !== costanti.NOFIELD) { - colVisib.value.push(elem.field + mysub) + if (checkIfColShow(elem.field)) { + colVisib.value.push(elem.field + mysub) + } } if (elem.visible && elem.field === costanti.NOFIELD) { @@ -792,6 +796,11 @@ export default defineComponent({ mycolumns.value = props.prop_mycolumns colkey.value = props.prop_colkey pagination.value = props.prop_pagination + + myvertical.value = props.vertical ? -1 : 0 + if (props.finder) { + myvertical.value = tools.getCookie('myv', 0) + } } function mounted() { @@ -799,10 +808,12 @@ export default defineComponent({ console.log('props.filtercustom', props.filtercustom) + if (!!props.tablesList) { canEdit.value = tools.getCookie(tools.CAN_EDIT, canEdit) === 'true' tablesel.value = tools.getCookie('tablesel', tablesel.value) } + myfilterand.value = props.filterdef // myfiltercustom.value = props.filtercustom // console.log('tablesel', tablesel) @@ -926,6 +937,16 @@ export default defineComponent({ } } + function checkIfColShow(field: string|undefined) { + let vis = true + if (props.prop_mytable === 'myskills' && !props.prop_search) { + if (field === 'username') { + vis = false + } + } + return vis + } + function changeCol(newval: any) { // console.log('changecol', mytable.value) if (!!mytable.value) { @@ -993,8 +1014,11 @@ export default defineComponent({ colVisib.value = myselcol.split('|') } else { mycolumns.value.forEach((elem: any) => { - if (elem.field !== costanti.NOFIELD) - colVisib.value.push(elem.field + elem.subfield) + if (elem.field !== costanti.NOFIELD) { + if (checkIfColShow(elem.field)) { + colVisib.value.push(elem.field + elem.subfield) + } + } }) } } @@ -1163,7 +1187,6 @@ export default defineComponent({ return (rec._id > 0 && typeof rec._id === 'number') || rec._id !== 'number' } - // onMounted(mounted) created() @@ -1236,6 +1259,7 @@ export default defineComponent({ valoriopt, labelcombo, filter, + myvertical, } } }) diff --git a/src/components/CGridTableRec/CGridTableRec.vue b/src/components/CGridTableRec/CGridTableRec.vue index 307e9590..708cdbcb 100755 --- a/src/components/CGridTableRec/CGridTableRec.vue +++ b/src/components/CGridTableRec/CGridTableRec.vue @@ -32,7 +32,7 @@ + :useinput="item.useinput && item.type !== costanti.FieldType.select_by_server"> + + + + + -
{{ pagination.rowsNumber }} elementi trovati
+
{{ pagination.rowsNumber }} elemento trovato
+
{{ pagination.rowsNumber }} elementi trovati
+ +
+ + + +