diff --git a/_ALL_SITES/freeplanet.app/db/static_data.ts b/_ALL_SITES/freeplanet.app/db/static_data.ts index ddcc917e..ebde12d4 100755 --- a/_ALL_SITES/freeplanet.app/db/static_data.ts +++ b/_ALL_SITES/freeplanet.app/db/static_data.ts @@ -390,6 +390,17 @@ const baseroutes: IListRoutes[] = [ inmenu: true, infooter: true, }, + { + active: true, + order: 15, + path: '/work', + materialIcon: 'fas fa-briefcase', + name: 'mypages.work', + component: () => import('@/root/work/work.vue'), + meta: { requiresAuth: true }, + inmenu: true, + infooter: true, + }, { active: true, order: 100, @@ -470,10 +481,32 @@ const baseroutes: IListRoutes[] = [ { active: true, order: 130, - path: '/mypage/:idSkill', + path: '/mypage/:idBacheca', materialIcon: 'fas fa-user', name: 'pages.mypage2', - component: () => import('@/views/user/mypageskill/mypageskill.vue'), + component: () => import('@/views/user/mypagebacheca/mypagebacheca.vue'), + meta: { requiresAuth: true }, + inmenu: false, + infooter: false, + }, + { + active: true, + order: 130, + path: '/mywork/:idSkill', + materialIcon: '', + name: 'pages.mywork2', + component: () => import('@/views/user/mywork/mywork.vue'), + meta: { requiresAuth: true }, + inmenu: false, + infooter: false, + }, + { + active: true, + order: 400, + path: '/test', + materialIcon: 'fas fa-test', + name: 'mypages.test', + component: () => import('@/views/testServer/testServer.vue'), meta: { requiresAuth: true }, inmenu: false, infooter: false, diff --git a/_ALL_SITES/insiemesipuo.app/db/static_data.ts b/_ALL_SITES/insiemesipuo.app/db/static_data.ts index 1494f48d..a4ed2a78 100755 --- a/_ALL_SITES/insiemesipuo.app/db/static_data.ts +++ b/_ALL_SITES/insiemesipuo.app/db/static_data.ts @@ -390,6 +390,17 @@ const baseroutes: IListRoutes[] = [ inmenu: true, infooter: true, }, + { + active: true, + order: 15, + path: '/work', + materialIcon: 'fas fa-briefcase', + name: 'mypages.work', + component: () => import('@/root/work/work.vue'), + meta: { requiresAuth: true }, + inmenu: true, + infooter: true, + }, /*{ active: true, order: 100, @@ -470,10 +481,32 @@ const baseroutes: IListRoutes[] = [ { active: true, order: 130, - path: '/mypage/:idSkill', + path: '/mypage/:idBacheca', materialIcon: 'fas fa-user', name: 'pages.mypage2', - component: () => import('@/views/user/mypageskill/mypageskill.vue'), + component: () => import('@/views/user/mypagebacheca/mypagebacheca.vue'), + meta: { requiresAuth: true }, + inmenu: false, + infooter: false, + }, + { + active: true, + order: 130, + path: '/mywork/:idSkill', + materialIcon: '', + name: 'pages.mywork2', + component: () => import('@/views/user/mywork/mywork.vue'), + meta: { requiresAuth: true }, + inmenu: false, + infooter: false, + }, + { + active: true, + order: 400, + path: '/test', + materialIcon: 'fas fa-test', + name: 'mypages.test', + component: () => import('@/views/testServer/testServer.vue'), meta: { requiresAuth: true }, inmenu: false, infooter: false, diff --git a/_ALL_SITES/popolodelnuovomondo.app/db/static_data.ts b/_ALL_SITES/popolodelnuovomondo.app/db/static_data.ts index 06a99c43..b4d16497 100755 --- a/_ALL_SITES/popolodelnuovomondo.app/db/static_data.ts +++ b/_ALL_SITES/popolodelnuovomondo.app/db/static_data.ts @@ -390,6 +390,17 @@ const baseroutes: IListRoutes[] = [ inmenu: true, infooter: true, }, + { + active: true, + order: 15, + path: '/work', + materialIcon: 'fas fa-briefcase', + name: 'mypages.work', + component: () => import('@/root/work/work.vue'), + meta: { requiresAuth: true }, + inmenu: true, + infooter: true, + }, /*{ active: true, order: 100, @@ -470,10 +481,32 @@ const baseroutes: IListRoutes[] = [ { active: true, order: 130, - path: '/mypage/:idSkill', - materialIcon: 'fas fa-user', + path: '/mypage/:idBacheca', + materialIcon: '', name: 'pages.mypage2', - component: () => import('@/views/user/mypageskill/mypageskill.vue'), + component: () => import('@/views/user/mypagebacheca/mypagebacheca.vue'), + meta: { requiresAuth: true }, + inmenu: false, + infooter: false, + }, + { + active: true, + order: 130, + path: '/mywork/:idSkill', + materialIcon: '', + name: 'pages.mywork2', + component: () => import('@/views/user/mywork/mywork.vue'), + meta: { requiresAuth: true }, + inmenu: false, + infooter: false, + }, + { + active: true, + order: 400, + path: '/test', + materialIcon: 'fas fa-test', + name: 'mypages.test', + component: () => import('@/views/testServer/testServer.vue'), meta: { requiresAuth: true }, inmenu: false, infooter: false, diff --git a/src/common/shared_vuejs.ts b/src/common/shared_vuejs.ts index 7905ee43..b4c54c85 100755 --- a/src/common/shared_vuejs.ts +++ b/src/common/shared_vuejs.ts @@ -84,14 +84,23 @@ export const shared_consts = { PARAM_SHOW_PROVINCE: 1, - TABLES_ID_NUMBER: ['permissions', 'levels', 'adtypes', 'statusSkills', 'sectors', 'catgrps', 'skills', 'subskills', 'cities', 'provinces', 'myskills', 'mygroups'], - TABLES_USER_ID: ['myskills'], - TABLES_UPDATE_LASTMODIFIED: ['myskills', 'mybots'], - TABLES_FINDER: ['myskills', 'mygroups'], + TABLES_MYSKILLS: 'myskills', + TABLES_MYBACHECAS: 'mybachecas', - TABLES_PERM_CHANGE_FOR_USERS: ['myskills'], - TABLES_VISU_LISTA_USER: ['myskills', 'users'], - TABLES_NOT_SHOW_IF_USERNAME: ['myskills'], + TABLES_USER_INCLUDE_MY: ['mygroups'], + TABLES_GETCOMPLETEREC: ['myskills'], + TABLES_PERM_NEWREC: ['skills', 'subskills', 'mygroups'], + TABLES_REC_ID: ['skills', 'subskills'], + + TABLES_ID_NUMBER: ['permissions', 'levels', 'adtypes', 'statusSkills', 'sectors', 'catgrps', 'skills', 'subskills', 'cities', 'provinces', 'myskills', 'mybachecas', 'mygroups'], + TABLES_USER_ID: ['myskills', 'mybachecas'], + TABLES_UPDATE_LASTMODIFIED: ['myskills', 'mybots'], + TABLES_FINDER: ['myskills', 'mybachecas', 'mygroups'], + TABLES_VISU_CMYSRECCARD: ['myskills', 'mybachecas'], + + TABLES_PERM_CHANGE_FOR_USERS: ['myskills', 'mybachecas'], + TABLES_VISU_LISTA_USER: ['myskills', 'mybachecas', 'users'], + TABLES_NOT_SHOW_IF_USERNAME: ['myskills', 'mybachecas'], VISIB_ALL: 0, VISIB_ONLYIF_VERIFIED: 1, diff --git a/src/components/CDashboard/CDashboard.ts b/src/components/CDashboard/CDashboard.ts index e1378647..fe2445f9 100755 --- a/src/components/CDashboard/CDashboard.ts +++ b/src/components/CDashboard/CDashboard.ts @@ -19,7 +19,7 @@ export default defineComponent({ const globalStore = useGlobalStore() const { t } = useI18n(); - const calcstat = computed(() => userStore.my.calcstat ? userStore.my.calcstat : {numUsersReg: 0, numMySkills: 0} ) + const calcstat = computed(() => userStore.my.calcstat ? userStore.my.calcstat : {numUsersReg: 0, numMySkills: 0, numMyBachecas: 0} ) return { userStore, diff --git a/src/components/CDashboard/CDashboard.vue b/src/components/CDashboard/CDashboard.vue index b046e8ef..33242eb6 100755 --- a/src/components/CDashboard/CDashboard.vue +++ b/src/components/CDashboard/CDashboard.vue @@ -29,7 +29,29 @@ {{ calcstat.numMySkills }} - Competenze Aggiunte + Competenze + + + + + + + + +
+
+
+
+
+ + +
+ + + + {{ calcstat.numMyBachecas }} + Annunci diff --git a/src/components/CFinder/CFinder.ts b/src/components/CFinder/CFinder.ts index 52e8a27a..2b204fc3 100755 --- a/src/components/CFinder/CFinder.ts +++ b/src/components/CFinder/CFinder.ts @@ -8,18 +8,20 @@ import { CMyFieldDb } from '@/components/CMyFieldDb' import { costanti } from '@costanti' import { useGlobalStore } from '@store/globalStore' import { useUserStore } from '@store/UserStore' -import { colmySkills } from '@store/Modules/fieldsTable' + import { CGridTableRec } from '@/components/CGridTableRec' -import { IMySkill, ISearchList, ISkill } from 'model' +import { IColGridTable, IMyBacheca, IMySkill, ISearchList, ISkill } from 'model' import { shared_consts } from '@/common/shared_vuejs' import { useI18n } from '@/boot/i18n' +import { toolsext } from '@store/Modules/toolsext' +import { fieldsTable } from '@store/Modules/fieldsTable' export default defineComponent({ name: 'CFinder', props: { - defaultnewrec: { - type: Function, - required: false, + table: { + type: String, + required: true, }, }, components: { @@ -38,12 +40,19 @@ export default defineComponent({ const search = ref('') const myrecfiltertoggle = ref(tools.FILTER_ALL) + const prop_colkey = ref('idSkill') + const col_title = ref('descr') + const col_footer = ref('idCity') + const col_tabfooter = ref('mycities') + + const col = ref({}) + const idSector = computed(() => { let myval: any = null myval = searchList.value.find((rec) => (rec.table === 'sectors')) if (myval) { const ris = myval.value || 0 - console.log('idSector=', ris) + // console.log('idSector=', ris) return ris } else { return 0 @@ -61,13 +70,16 @@ export default defineComponent({ function mounted() { - /*arrfilterand.value = [ - { - label: 'Competenze', - value: shared_consts.FILTER_MYSKILL_SKILL - }, - ]*/ + let obj = tools.getParamsByTable(props.table) + + col.value = fieldsTable.getArrColsByTable(props.table) + + prop_colkey.value = obj.prop_colkey + col_title.value = obj.col_title + col_footer.value = obj.col_footer + col_tabfooter.value = obj.col_tabfooter + function getFilterSkills(recSkill: any, index: number, arr: any) { const recsectors: any = searchList.value.find((rec) => rec.table === 'sectors') @@ -100,6 +112,8 @@ export default defineComponent({ } + + searchList.value = [ { label: 'Provincia', @@ -243,22 +257,6 @@ export default defineComponent({ } - function getdefaultnewrec(): IMySkill { - return { - _id: 0, - idSector: 0, - idSkill: 0, - idSubSkill: [], - idStatusSkill: [], - idContribType: [], - idCity: [], - NumLevel: 0, - adType: 0, - photos: [], - note: '', - descr: '', - } - } function extraparams() { @@ -314,7 +312,7 @@ export default defineComponent({ lk_tab: 'subskills', lk_LF: 'idSubSkill', lk_FF: '_id', - lk_as: 'myskill', + lk_as: 'myrec', af_objId_tab: '', }, lookup5: { @@ -327,6 +325,16 @@ export default defineComponent({ } } + function getdefaultnewrec(): any { + if (props.table === toolsext.TABMYSKILLS) { + return tools.getdefaultnewrec_MySkill() + } else if (props.table === toolsext.TABMYBACHECAS) { + return tools.getdefaultnewrec_MyBacheca() + } + return null + } + + function doSearch() { // } @@ -337,8 +345,6 @@ export default defineComponent({ t, tools, costanti, - colmySkills, - getdefaultnewrec, extraparams, arrfilterand, filtercustom, @@ -347,6 +353,13 @@ export default defineComponent({ search, doSearch, myrecfiltertoggle, + prop_colkey, + col_title, + col_footer, + col_tabfooter, + col, + toolsext, + getdefaultnewrec, } }, }) diff --git a/src/components/CFinder/CFinder.vue b/src/components/CFinder/CFinder.vue index 027342e0..13409393 100755 --- a/src/components/CFinder/CFinder.vue +++ b/src/components/CFinder/CFinder.vue @@ -26,16 +26,16 @@ -->
-
+
- AA @@ -19,7 +18,8 @@
- + + diff --git a/src/components/CGridTableRec/CGridTableRec.ts b/src/components/CGridTableRec/CGridTableRec.ts index 2ee1c004..c9590a56 100755 --- a/src/components/CGridTableRec/CGridTableRec.ts +++ b/src/components/CGridTableRec/CGridTableRec.ts @@ -23,6 +23,7 @@ import { CMyFriends } from '../CMyFriends' import { CMyUser } from '../CMyUser' import { CMyGroups } from '../CMyGroups' import { CMyFieldDb } from '../CMyFieldDb' +import { CMyRecCard } from '../CMyRecCard' import { CMySelect } from '../CMySelect' import { CTitleBanner } from '../CTitleBanner' @@ -32,7 +33,7 @@ import { useQuasar } from 'quasar' import { costanti } from '@costanti' import translate from '@/globalroutines/util' import { toolsext } from '@store/Modules/toolsext' -import { CMySkill } from '@/components/CMySkill' +import { CMyCardPopup } from '@/components/CMyCardPopup' export default defineComponent({ name: 'CGridTableRec', @@ -205,7 +206,7 @@ export default defineComponent({ default: '', }, }, - components: { CMyPopupEdit, CTitleBanner, CMyFieldDb, CMySelect, CMyFriends, CMyGroups, CMyUser, CMySkill }, + components: { CMyPopupEdit, CTitleBanner, CMyFieldDb, CMySelect, CMyFriends, CMyGroups, CMyUser, CMyRecCard, CMyCardPopup }, setup(props, { emit }) { const $q = useQuasar() const { t } = useI18n() @@ -233,6 +234,9 @@ export default defineComponent({ const loading = ref(false) + const visupagedialog = ref(false) + const myrecdialog = ref(null) + const startsearch = ref(false) const serverData: any = ref([]) @@ -282,7 +286,7 @@ export default defineComponent({ }) watch(() => searchList.value, (to: any, from: any) => { - console.log('watch searchlist', to) + // console.log('watch searchlist', to) refresh() }) @@ -291,12 +295,12 @@ export default defineComponent({ }) watch(() => props.filtercustom, (to: any, from: any) => { - console.log('filtercustom', to) + // console.log('filtercustom', to) refresh() }) function searchval(newval: any, table: any) { - console.log('searchval', newval, table) + // console.log('searchval', newval, table) tools.setCookie(tools.COOK_SEARCH + table, newval) if (table === 'skills') { @@ -317,9 +321,9 @@ export default defineComponent({ const recSkill = searchList.value.find((rec) => rec.table === 'skills') let trovato = false if (recSkill) { - console.log('recSkill.value', recSkill) + // console.log('recSkill.value', recSkill) const arrvalues = valoriopt.value(recSkill.value, false) - console.log('arrvalues', arrvalues) + // console.log('arrvalues', arrvalues) if (arrvalues) trovato = arrvalues.find((rec: any) => rec[recSkill.key] === valsaved) } @@ -579,8 +583,8 @@ export default defineComponent({ emit('savefilter', myfilterand) } - function onRequest(props: any) { - const { page, rowsPerPage, rowsNumber, sortBy, descending } = props.pagination + function onRequest(myprops: any) { + const { page, rowsPerPage, rowsNumber, sortBy, descending } = myprops.pagination const myfilternow = myfilter.value const myfilterandnow = myfilterand.value @@ -1055,11 +1059,11 @@ export default defineComponent({ function checkIfColShow(field: string | undefined) { let vis = true - if (shared_consts.TABLES_NOT_SHOW_IF_USERNAME.includes(props.prop_mytable) && !props.prop_search) { + /*if (shared_consts.TABLES_NOT_SHOW_IF_USERNAME.includes(props.prop_mytable) && !props.prop_search) { if (field === 'username') { vis = false } - } + }*/ return vis } @@ -1087,7 +1091,7 @@ export default defineComponent({ } function changeTable(mysel: any) { - console.log('changeTable', tablesel.value) + // console.log('changeTable', tablesel.value) if (tablesel.value === undefined || tablesel.value === '') return @@ -1432,6 +1436,12 @@ export default defineComponent({ function cmdExt(cmd: any, id: any, val2: any) { console.log('cmd', cmd) + if (cmd === costanti.CMD_SHOW_PAGE) { + visupagedialog.value = true + myrecdialog.value = id + return true + } + let action = 0 if (cmd === costanti.CMD_DELETE) { action = lists.MenuAction.DELETE_RECTABLE @@ -1532,6 +1542,8 @@ export default defineComponent({ getLabelFooterByRow, showfilteradv, cmdExt, + visupagedialog, + myrecdialog, } } }) diff --git a/src/components/CGridTableRec/CGridTableRec.vue b/src/components/CGridTableRec/CGridTableRec.vue index c277eb5f..b1e43d82 100755 --- a/src/components/CGridTableRec/CGridTableRec.vue +++ b/src/components/CGridTableRec/CGridTableRec.vue @@ -313,13 +313,14 @@