From dedf35c659ce8b70cb7b5c0476a7c4ebe436cd11 Mon Sep 17 00:00:00 2001 From: paoloar77 Date: Thu, 17 Feb 2022 00:44:52 +0100 Subject: [PATCH] La foto non si carica bene sul server. L'immagine della Bacheca metterla in fondo. Creare un'area LAVORO ed un'area BACHECA. Poter contattare la persona dalla pagina che si apre. Riscritto visualizzazione della Card Competenza --- _ALL_SITES/freeplanet.app/db/static_data.ts | 37 ++- _ALL_SITES/insiemesipuo.app/db/static_data.ts | 37 ++- .../popolodelnuovomondo.app/db/static_data.ts | 39 ++- src/common/shared_vuejs.ts | 23 +- src/components/CDashboard/CDashboard.ts | 2 +- src/components/CDashboard/CDashboard.vue | 24 +- src/components/CFinder/CFinder.ts | 75 +++-- src/components/CFinder/CFinder.vue | 16 +- src/components/CGallery/CGallery.ts | 1 + src/components/CGallery/CGallery.vue | 6 +- src/components/CGridTableRec/CGridTableRec.ts | 36 ++- .../CGridTableRec/CGridTableRec.vue | 27 +- src/components/CMainView/CMainView.vue | 3 + src/components/CMyCardPopup/CMyCardPopup.scss | 34 +++ src/components/CMyCardPopup/CMyCardPopup.ts | 95 ++++++ src/components/CMyCardPopup/CMyCardPopup.vue | 59 ++++ src/components/CMyCardPopup/index.ts | 1 + src/components/CMyFieldDb/CMyFieldDb.vue | 2 +- src/components/CMyFieldRec/CMyFieldRec.ts | 12 +- src/components/CMyFieldRec/CMyFieldRec.vue | 6 +- src/components/CMyGroup/CMyGroup.vue | 4 +- src/components/CMyPopupEdit/CMyPopupEdit.ts | 6 +- src/components/CMyPopupEdit/CMyPopupEdit.vue | 40 ++- .../CMyRecCard.scss} | 0 .../CMySkill.ts => CMyRecCard/CMyRecCard.ts} | 43 +-- .../CMyRecCard.vue} | 37 ++- src/components/CMyRecCard/index.ts | 1 + src/components/CMySkill/index.ts | 1 - src/components/CSkill/CSkill.ts | 65 ++-- src/components/CSkill/CSkill.vue | 14 +- src/components/CTestServer/CTestServer.scss | 29 ++ src/components/CTestServer/CTestServer.ts | 44 +++ src/components/CTestServer/CTestServer.vue | 25 ++ src/components/CTestServer/index.ts | 1 + src/components/Header/Header.vue | 23 +- src/components/index.ts | 3 +- src/css/app.scss | 5 + src/db/lang/ws_it.js | 1 + src/db/static_data.ts | 37 ++- src/model/GlobalStore.ts | 17 ++ src/model/UserStore.ts | 1 + src/root/bacheca/bacheca.ts | 4 + src/root/bacheca/bacheca.vue | 3 +- src/root/work/work.scss | 0 src/root/work/work.ts | 71 +++++ src/root/work/work.vue | 28 ++ src/statics/lang/it.js | 2 + src/store/Modules/costanti.ts | 6 +- src/store/Modules/fieldsTable.ts | 280 +++++++++++++++--- src/store/Modules/tools.ts | 75 ++++- src/store/Modules/toolsext.ts | 1 + src/store/UserStore.ts | 16 +- src/store/globalStore.ts | 15 + src/views/testServer/testServer.scss | 0 src/views/testServer/testServer.ts | 15 + src/views/testServer/testServer.vue | 13 + .../mypagebacheca.scss} | 0 src/views/user/mypagebacheca/mypagebacheca.ts | 27 ++ .../user/mypagebacheca/mypagebacheca.vue | 24 ++ src/views/user/mywork/mywork.scss | 18 ++ .../mypageskill.ts => mywork/mywork.ts} | 5 +- .../mypageskill.vue => mywork/mywork.vue} | 5 +- 62 files changed, 1311 insertions(+), 229 deletions(-) create mode 100644 src/components/CMyCardPopup/CMyCardPopup.scss create mode 100644 src/components/CMyCardPopup/CMyCardPopup.ts create mode 100644 src/components/CMyCardPopup/CMyCardPopup.vue create mode 100644 src/components/CMyCardPopup/index.ts rename src/components/{CMySkill/CMySkill.scss => CMyRecCard/CMyRecCard.scss} (100%) rename src/components/{CMySkill/CMySkill.ts => CMyRecCard/CMyRecCard.ts} (63%) rename src/components/{CMySkill/CMySkill.vue => CMyRecCard/CMyRecCard.vue} (54%) create mode 100755 src/components/CMyRecCard/index.ts delete mode 100755 src/components/CMySkill/index.ts create mode 100755 src/components/CTestServer/CTestServer.scss create mode 100755 src/components/CTestServer/CTestServer.ts create mode 100755 src/components/CTestServer/CTestServer.vue create mode 100755 src/components/CTestServer/index.ts create mode 100755 src/root/work/work.scss create mode 100755 src/root/work/work.ts create mode 100755 src/root/work/work.vue create mode 100755 src/views/testServer/testServer.scss create mode 100755 src/views/testServer/testServer.ts create mode 100755 src/views/testServer/testServer.vue rename src/views/user/{mypageskill/mypageskill.scss => mypagebacheca/mypagebacheca.scss} (100%) create mode 100755 src/views/user/mypagebacheca/mypagebacheca.ts create mode 100755 src/views/user/mypagebacheca/mypagebacheca.vue create mode 100755 src/views/user/mywork/mywork.scss rename src/views/user/{mypageskill/mypageskill.ts => mywork/mywork.ts} (97%) rename src/views/user/{mypageskill/mypageskill.vue => mywork/mywork.vue} (92%) 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 @@