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
This commit is contained in:
paoloar77
2022-02-17 00:44:52 +01:00
parent ec410c32d5
commit dedf35c659
62 changed files with 1311 additions and 229 deletions

View File

@@ -390,6 +390,17 @@ const baseroutes: IListRoutes[] = [
inmenu: true, inmenu: true,
infooter: 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, active: true,
order: 100, order: 100,
@@ -470,10 +481,32 @@ const baseroutes: IListRoutes[] = [
{ {
active: true, active: true,
order: 130, order: 130,
path: '/mypage/:idSkill', path: '/mypage/:idBacheca',
materialIcon: 'fas fa-user', materialIcon: 'fas fa-user',
name: 'pages.mypage2', 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 }, meta: { requiresAuth: true },
inmenu: false, inmenu: false,
infooter: false, infooter: false,

View File

@@ -390,6 +390,17 @@ const baseroutes: IListRoutes[] = [
inmenu: true, inmenu: true,
infooter: 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, active: true,
order: 100, order: 100,
@@ -470,10 +481,32 @@ const baseroutes: IListRoutes[] = [
{ {
active: true, active: true,
order: 130, order: 130,
path: '/mypage/:idSkill', path: '/mypage/:idBacheca',
materialIcon: 'fas fa-user', materialIcon: 'fas fa-user',
name: 'pages.mypage2', 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 }, meta: { requiresAuth: true },
inmenu: false, inmenu: false,
infooter: false, infooter: false,

View File

@@ -390,6 +390,17 @@ const baseroutes: IListRoutes[] = [
inmenu: true, inmenu: true,
infooter: 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, active: true,
order: 100, order: 100,
@@ -470,10 +481,32 @@ const baseroutes: IListRoutes[] = [
{ {
active: true, active: true,
order: 130, order: 130,
path: '/mypage/:idSkill', path: '/mypage/:idBacheca',
materialIcon: 'fas fa-user', materialIcon: '',
name: 'pages.mypage2', 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 }, meta: { requiresAuth: true },
inmenu: false, inmenu: false,
infooter: false, infooter: false,

View File

@@ -84,14 +84,23 @@ export const shared_consts = {
PARAM_SHOW_PROVINCE: 1, PARAM_SHOW_PROVINCE: 1,
TABLES_ID_NUMBER: ['permissions', 'levels', 'adtypes', 'statusSkills', 'sectors', 'catgrps', 'skills', 'subskills', 'cities', 'provinces', 'myskills', 'mygroups'], TABLES_MYSKILLS: 'myskills',
TABLES_USER_ID: ['myskills'], TABLES_MYBACHECAS: 'mybachecas',
TABLES_UPDATE_LASTMODIFIED: ['myskills', 'mybots'],
TABLES_FINDER: ['myskills', 'mygroups'],
TABLES_PERM_CHANGE_FOR_USERS: ['myskills'], TABLES_USER_INCLUDE_MY: ['mygroups'],
TABLES_VISU_LISTA_USER: ['myskills', 'users'], TABLES_GETCOMPLETEREC: ['myskills'],
TABLES_NOT_SHOW_IF_USERNAME: ['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_ALL: 0,
VISIB_ONLYIF_VERIFIED: 1, VISIB_ONLYIF_VERIFIED: 1,

View File

@@ -19,7 +19,7 @@ export default defineComponent({
const globalStore = useGlobalStore() const globalStore = useGlobalStore()
const { t } = useI18n(); 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 { return {
userStore, userStore,

View File

@@ -29,7 +29,29 @@
<q-item class="q-pb-none q-pt-xs"> <q-item class="q-pb-none q-pt-xs">
<q-item-section> <q-item-section>
<q-item-label class="text-h4" style="font-weight: 500;letter-spacing: 3px;">{{ calcstat.numMySkills }}</q-item-label> <q-item-label class="text-h4" style="font-weight: 500;letter-spacing: 3px;">{{ calcstat.numMySkills }}</q-item-label>
<q-item-label :class="!$q.dark.isActive? 'text-grey-7':'text-white'" style="letter-spacing: 1px;">Competenze Aggiunte</q-item-label> <q-item-label :class="!$q.dark.isActive? 'text-grey-7':'text-white'" style="letter-spacing: 1px;">Competenze</q-item-label>
</q-item-section>
<q-item-section side>
<q-icon name="engineering" class="box_3" size="60px"></q-icon>
</q-item-section>
</q-item>
<q-item class="q-py-xs" style="min-height: unset">
<q-item-section>
<div class="progress-base q-my-sm">
<div class="progress-bar-3" style="width:100%"></div>
</div>
</q-item-section>
</q-item>
</q-card>
</div>
<div class="col-md-3 col-lg-3 col-sm-12 col-xs-12 box_3" style="border-left: 1px solid #efefef;"
v-bind:class="{'border-top': $q.platform.is.mobile}">
<q-card class="no-shadow q-pa-sm">
<q-item class="q-pb-none q-pt-xs">
<q-item-section>
<q-item-label class="text-h4" style="font-weight: 500;letter-spacing: 3px;">{{ calcstat.numMyBachecas }}</q-item-label>
<q-item-label :class="!$q.dark.isActive? 'text-grey-7':'text-white'" style="letter-spacing: 1px;">Annunci</q-item-label>
</q-item-section> </q-item-section>
<q-item-section side> <q-item-section side>

View File

@@ -8,18 +8,20 @@ import { CMyFieldDb } from '@/components/CMyFieldDb'
import { costanti } from '@costanti' import { costanti } from '@costanti'
import { useGlobalStore } from '@store/globalStore' import { useGlobalStore } from '@store/globalStore'
import { useUserStore } from '@store/UserStore' import { useUserStore } from '@store/UserStore'
import { colmySkills } from '@store/Modules/fieldsTable'
import { CGridTableRec } from '@/components/CGridTableRec' 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 { shared_consts } from '@/common/shared_vuejs'
import { useI18n } from '@/boot/i18n' import { useI18n } from '@/boot/i18n'
import { toolsext } from '@store/Modules/toolsext'
import { fieldsTable } from '@store/Modules/fieldsTable'
export default defineComponent({ export default defineComponent({
name: 'CFinder', name: 'CFinder',
props: { props: {
defaultnewrec: { table: {
type: Function, type: String,
required: false, required: true,
}, },
}, },
components: { components: {
@@ -38,12 +40,19 @@ export default defineComponent({
const search = ref('') const search = ref('')
const myrecfiltertoggle = ref(tools.FILTER_ALL) 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(<IColGridTable>{})
const idSector = computed(() => { const idSector = computed(() => {
let myval: any = null let myval: any = null
myval = searchList.value.find((rec) => (rec.table === 'sectors')) myval = searchList.value.find((rec) => (rec.table === 'sectors'))
if (myval) { if (myval) {
const ris = myval.value || 0 const ris = myval.value || 0
console.log('idSector=', ris) // console.log('idSector=', ris)
return ris return ris
} else { } else {
return 0 return 0
@@ -61,13 +70,16 @@ export default defineComponent({
function mounted() { 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) { function getFilterSkills(recSkill: any, index: number, arr: any) {
const recsectors: any = searchList.value.find((rec) => rec.table === 'sectors') const recsectors: any = searchList.value.find((rec) => rec.table === 'sectors')
@@ -100,6 +112,8 @@ export default defineComponent({
} }
searchList.value = [ searchList.value = [
{ {
label: 'Provincia', 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() { function extraparams() {
@@ -314,7 +312,7 @@ export default defineComponent({
lk_tab: 'subskills', lk_tab: 'subskills',
lk_LF: 'idSubSkill', lk_LF: 'idSubSkill',
lk_FF: '_id', lk_FF: '_id',
lk_as: 'myskill', lk_as: 'myrec',
af_objId_tab: '', af_objId_tab: '',
}, },
lookup5: { 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() { function doSearch() {
// //
} }
@@ -337,8 +345,6 @@ export default defineComponent({
t, t,
tools, tools,
costanti, costanti,
colmySkills,
getdefaultnewrec,
extraparams, extraparams,
arrfilterand, arrfilterand,
filtercustom, filtercustom,
@@ -347,6 +353,13 @@ export default defineComponent({
search, search,
doSearch, doSearch,
myrecfiltertoggle, myrecfiltertoggle,
prop_colkey,
col_title,
col_footer,
col_tabfooter,
col,
toolsext,
getdefaultnewrec,
} }
}, },
}) })

View File

@@ -26,16 +26,16 @@
<CGridTableRec <CGridTableRec
v-if="searchList.length > 0" v-if="searchList.length > 0"
prop_mytable="myskills" :prop_mytable="table"
prop_mytitle="" prop_mytitle=""
:prop_mycolumns="colmySkills" :prop_mycolumns="col"
prop_colkey="idSkill" :prop_colkey="prop_colkey"
col_title="descr" :col_title="col_title"
col_footer="idCity" :col_footer="col_footer"
col_tabfooter="mycities" :col_tabfooter="col_tabfooter"
:vertical="costanti.VISUTABLE_LISTA" :vertical="costanti.VISUTABLE_LISTA"
:showType="costanti.SHOW_MYSKILL" :showType="costanti.SHOW_MYCARD"
:nodataLabel="idSector > 0 ? 'Nessuna Competenza trovata': 'Selezionare un Settore'" :nodataLabel="'Nessuna Competenza trovata'"
:prop_search="true" :prop_search="true"
:finder="true" :finder="true"
:choose_visutype="$q.screen.gt.xs" :choose_visutype="$q.screen.gt.xs"

View File

@@ -389,6 +389,7 @@ export default defineComponent({
fullscreensrc, fullscreensrc,
onRejected, onRejected,
isListImgValid, isListImgValid,
costanti,
} }
} }
}) })

View File

@@ -2,11 +2,10 @@
<!--<div class="q-pa-md items-start " style="display: inline-flex; width: 800px;"> --> <!--<div class="q-pa-md items-start " style="display: inline-flex; width: 800px;"> -->
<div v-if="!edit"> <div v-if="!edit">
<div class="q-pa-xs q-gutter-md"> <div class="q-pa-xs">
<q-card v-if="isListImgValid" :class="getclass()" @click="apri"> <q-card v-if="isListImgValid" :class="getclass()" @click="apri">
<div v-for="(mygallery, index) in getlistimages()" :key="index"> <div v-for="(mygallery, index) in getlistimages()" :key="index">
<div v-if="index === 0"> <div v-if="index === 0">
AA
<q-img <q-img
:src="getsrcimg(mygallery)" :class="getclimg()" :src="getsrcimg(mygallery)" :class="getclimg()"
:alt="mygallery.alt"> :alt="mygallery.alt">
@@ -19,7 +18,8 @@
</div> </div>
</q-card> </q-card>
<div v-else-if="!isInModif && !isListImgValid && imagebak"> <div v-else-if="!isInModif && !isListImgValid && imagebak">
<q-card :class="getclass()" @click="ImgFullScreen(mygallery)">
<q-card v-if="imagebak !== costanti.NESSUN_IMMAGINE" :class="getclass()" @click="ImgFullScreen(mygallery)">
<q-img <q-img
:src="imagebak" :class="getclimg()"> :src="imagebak" :class="getclimg()">
</q-img> </q-img>

View File

@@ -23,6 +23,7 @@ import { CMyFriends } from '../CMyFriends'
import { CMyUser } from '../CMyUser' import { CMyUser } from '../CMyUser'
import { CMyGroups } from '../CMyGroups' import { CMyGroups } from '../CMyGroups'
import { CMyFieldDb } from '../CMyFieldDb' import { CMyFieldDb } from '../CMyFieldDb'
import { CMyRecCard } from '../CMyRecCard'
import { CMySelect } from '../CMySelect' import { CMySelect } from '../CMySelect'
import { CTitleBanner } from '../CTitleBanner' import { CTitleBanner } from '../CTitleBanner'
@@ -32,7 +33,7 @@ import { useQuasar } from 'quasar'
import { costanti } from '@costanti' import { costanti } from '@costanti'
import translate from '@/globalroutines/util' import translate from '@/globalroutines/util'
import { toolsext } from '@store/Modules/toolsext' import { toolsext } from '@store/Modules/toolsext'
import { CMySkill } from '@/components/CMySkill' import { CMyCardPopup } from '@/components/CMyCardPopup'
export default defineComponent({ export default defineComponent({
name: 'CGridTableRec', name: 'CGridTableRec',
@@ -205,7 +206,7 @@ export default defineComponent({
default: '', default: '',
}, },
}, },
components: { CMyPopupEdit, CTitleBanner, CMyFieldDb, CMySelect, CMyFriends, CMyGroups, CMyUser, CMySkill }, components: { CMyPopupEdit, CTitleBanner, CMyFieldDb, CMySelect, CMyFriends, CMyGroups, CMyUser, CMyRecCard, CMyCardPopup },
setup(props, { emit }) { setup(props, { emit }) {
const $q = useQuasar() const $q = useQuasar()
const { t } = useI18n() const { t } = useI18n()
@@ -233,6 +234,9 @@ export default defineComponent({
const loading = ref(false) const loading = ref(false)
const visupagedialog = ref(false)
const myrecdialog = ref(null)
const startsearch = ref(false) const startsearch = ref(false)
const serverData: any = ref([]) const serverData: any = ref([])
@@ -282,7 +286,7 @@ export default defineComponent({
}) })
watch(() => searchList.value, (to: any, from: any) => { watch(() => searchList.value, (to: any, from: any) => {
console.log('watch searchlist', to) // console.log('watch searchlist', to)
refresh() refresh()
}) })
@@ -291,12 +295,12 @@ export default defineComponent({
}) })
watch(() => props.filtercustom, (to: any, from: any) => { watch(() => props.filtercustom, (to: any, from: any) => {
console.log('filtercustom', to) // console.log('filtercustom', to)
refresh() refresh()
}) })
function searchval(newval: any, table: any) { function searchval(newval: any, table: any) {
console.log('searchval', newval, table) // console.log('searchval', newval, table)
tools.setCookie(tools.COOK_SEARCH + table, newval) tools.setCookie(tools.COOK_SEARCH + table, newval)
if (table === 'skills') { if (table === 'skills') {
@@ -317,9 +321,9 @@ export default defineComponent({
const recSkill = searchList.value.find((rec) => rec.table === 'skills') const recSkill = searchList.value.find((rec) => rec.table === 'skills')
let trovato = false let trovato = false
if (recSkill) { if (recSkill) {
console.log('recSkill.value', recSkill) // console.log('recSkill.value', recSkill)
const arrvalues = valoriopt.value(recSkill.value, false) const arrvalues = valoriopt.value(recSkill.value, false)
console.log('arrvalues', arrvalues) // console.log('arrvalues', arrvalues)
if (arrvalues) if (arrvalues)
trovato = arrvalues.find((rec: any) => rec[recSkill.key] === valsaved) trovato = arrvalues.find((rec: any) => rec[recSkill.key] === valsaved)
} }
@@ -579,8 +583,8 @@ export default defineComponent({
emit('savefilter', myfilterand) emit('savefilter', myfilterand)
} }
function onRequest(props: any) { function onRequest(myprops: any) {
const { page, rowsPerPage, rowsNumber, sortBy, descending } = props.pagination const { page, rowsPerPage, rowsNumber, sortBy, descending } = myprops.pagination
const myfilternow = myfilter.value const myfilternow = myfilter.value
const myfilterandnow = myfilterand.value const myfilterandnow = myfilterand.value
@@ -1055,11 +1059,11 @@ export default defineComponent({
function checkIfColShow(field: string | undefined) { function checkIfColShow(field: string | undefined) {
let vis = true 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') { if (field === 'username') {
vis = false vis = false
} }
} }*/
return vis return vis
} }
@@ -1087,7 +1091,7 @@ export default defineComponent({
} }
function changeTable(mysel: any) { function changeTable(mysel: any) {
console.log('changeTable', tablesel.value) // console.log('changeTable', tablesel.value)
if (tablesel.value === undefined || tablesel.value === '') if (tablesel.value === undefined || tablesel.value === '')
return return
@@ -1432,6 +1436,12 @@ export default defineComponent({
function cmdExt(cmd: any, id: any, val2: any) { function cmdExt(cmd: any, id: any, val2: any) {
console.log('cmd', cmd) console.log('cmd', cmd)
if (cmd === costanti.CMD_SHOW_PAGE) {
visupagedialog.value = true
myrecdialog.value = id
return true
}
let action = 0 let action = 0
if (cmd === costanti.CMD_DELETE) { if (cmd === costanti.CMD_DELETE) {
action = lists.MenuAction.DELETE_RECTABLE action = lists.MenuAction.DELETE_RECTABLE
@@ -1532,6 +1542,8 @@ export default defineComponent({
getLabelFooterByRow, getLabelFooterByRow,
showfilteradv, showfilteradv,
cmdExt, cmdExt,
visupagedialog,
myrecdialog,
} }
} }
}) })

View File

@@ -313,13 +313,14 @@
</template> </template>
<template v-slot:item="props"> <template v-slot:item="props">
<div v-if="showType === costanti.SHOW_MYSKILL || (myvertical === costanti.VISUTABLE_LISTA && tablesel === 'myskills') "> <div v-if="showType === costanti.SHOW_MYCARD || (myvertical === costanti.VISUTABLE_LISTA && shared_consts.TABLES_VISU_CMYSRECCARD.includes(tablesel)) ">
<CMySkill <CMyRecCard
:prop_myskill="props.row" :table="tablesel"
:prop_myrec="props.row"
@cmdext="cmdExt" @cmdext="cmdExt"
:visu="visufind" :visu="visufind"
> >
</CMySkill> </CMyRecCard>
</div> </div>
<div v-else-if="((showType === costanti.SHOW_USERINFO) && myvertical !== costanti.VISUTABLE_SCHEDA_USER) || ((myvertical === 2) && (shared_consts.TABLES_VISU_LISTA_USER.includes(tablesel)))" class="fill-all-width"> <div v-else-if="((showType === costanti.SHOW_USERINFO) && myvertical !== costanti.VISUTABLE_SCHEDA_USER) || ((myvertical === 2) && (shared_consts.TABLES_VISU_LISTA_USER.includes(tablesel)))" class="fill-all-width">
@@ -394,7 +395,6 @@
<div v-for="col in mycolumns" :key="col.name"> <div v-for="col in mycolumns" :key="col.name">
<q-item v-if="showColCheck(col, tools.TIPOVIS_SHOW_RECORD, false, tools.getValue(props.row,col.field, col.subfield))" <q-item v-if="showColCheck(col, tools.TIPOVIS_SHOW_RECORD, false, tools.getValue(props.row,col.field, col.subfield))"
:class="clByCol(col)" class="riduci_pad"> :class="clByCol(col)" class="riduci_pad">
<q-item-section avatar v-if="col.icon"> <q-item-section avatar v-if="col.icon">
<q-item-label class="q-table__col"><q-icon :name="col.icon"></q-icon></q-item-label> <q-item-label class="q-table__col"><q-icon :name="col.icon"></q-icon></q-item-label>
</q-item-section> </q-item-section>
@@ -406,6 +406,7 @@
<div class="tdclass"> <div class="tdclass">
<div :class="getclrow(props.row)"> <div :class="getclrow(props.row)">
<CMyPopupEdit <CMyPopupEdit
:table="mytable" :table="mytable"
:canEdit="canEdit" :canEdit="canEdit"
@@ -433,6 +434,14 @@
</template> </template>
</q-table> </q-table>
<q-dialog v-model="visupagedialog" @hide="hidewindow" :maximized="$q.screen.lt.sm">
<CMyCardPopup
:table="mytable"
:prop_myrec="myrecdialog">
</CMyCardPopup>
</q-dialog>
<div v-if="rowclicksel"> <div v-if="rowclicksel">
<CTitleBanner title="Record:"></CTitleBanner> <CTitleBanner title="Record:"></CTitleBanner>
@@ -450,7 +459,7 @@
</q-field> </q-field>
</div> </div>
<div <div
class="q-ma-sm q-pa-sm colmodif col-grow rounded-borders " style="border: 1px solid #bbb" class="q-ma-sm q-pa-sm colmodif col-grow popupedit"
@click="colclicksel = mycol"> @click="colclicksel = mycol">
<CMyPopupEdit <CMyPopupEdit
:table="mytable" :table="mytable"
@@ -475,7 +484,7 @@
</div> </div>
</div> </div>
</div> </div>
<q-dialog v-model="newRecordBool" @hide="hidewindow" :maximized="true"> <q-dialog v-model="newRecordBool" @hide="hidewindow" :maximized="$q.screen.lt.sm">
<q-card class="dialog_card"> <q-card class="dialog_card">
<q-bar dense class="bg-primary text-white"> <q-bar dense class="bg-primary text-white">
Nuovo: Nuovo:
@@ -517,9 +526,9 @@
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
<q-dialog v-model="editRecordBool"> <q-dialog v-model="editRecordBool" @hide="hidewindow" :maximized="$q.screen.lt.sm">
<q-card class="dialog_card"> <q-card class="dialog_card">
<q-bar dense class="bg-primary text-white full-height"> <q-bar dense class="bg-primary text-white">
<span class="ellipsis">{{ recModif[col_title] }}</span> <span class="ellipsis">{{ recModif[col_title] }}</span>
<q-space/> <q-space/>
<q-btn flat round color="white" icon="close" v-close-popup></q-btn> <q-btn flat round color="white" icon="close" v-close-popup></q-btn>

View File

@@ -4,6 +4,9 @@
<CBigBtn <CBigBtn
label="Bacheca" to="/bacheca" icon="fas fa-bullhorn" color="blue"> label="Bacheca" to="/bacheca" icon="fas fa-bullhorn" color="blue">
</CBigBtn> </CBigBtn>
<CBigBtn
label="Lavoro" to="/work" icon="fas fa-briefcase" color="blue">
</CBigBtn>
<CBigBtn <CBigBtn
label="Scuola" to="/school" icon="fas fa-book-reader" color="orange" disable> label="Scuola" to="/school" icon="fas fa-book-reader" color="orange" disable>
</CBigBtn> </CBigBtn>

View File

@@ -0,0 +1,34 @@
.profile {
width: 100%;
margin: 0 auto;
max-width: 450px;
}
.myrow{
display: flex;
@media (max-width: 600px) {
flex-flow: column;
}
}
.qualifica{
border: solid 2px #4198ef;
border-radius: 1rem;
padding: 5px;
}
.text-bacheca{
margin: 10px;
border: solid 2px #4198ef;
border-radius: 1rem;
padding: 10px;
}
.note-bacheca{
border: solid 2px #C10015;
border-radius: 1rem;
padding: 10px;
}

View File

@@ -0,0 +1,95 @@
import { computed, defineComponent, onMounted, PropType, ref, watch } from 'vue'
import { CMyFieldDb } from '@/components/CMyFieldDb'
import { CTitleBanner } from '@/components/CTitleBanner'
import { CProfile } from '@/components/CProfile'
import { CDateTime } from '@/components/CDateTime'
import { CMyPage } from '@/components/CMyPage'
import { CMyFieldRec } from '@/components/CMyFieldRec'
import { tools } from '@store/Modules/tools'
import { useUserStore } from '@store/UserStore'
import { useGlobalStore } from '@store/globalStore'
import { useI18n } from '@/boot/i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
import { IColGridTable, IMyBacheca, IUserFields } from 'model'
import { shared_consts } from '@/common/shared_vuejs'
import { colCitys, fieldsTable } from '@store/Modules/fieldsTable'
export default defineComponent({
name: 'CMyCardPopup',
components: { CProfile, CTitleBanner, CMyFieldDb, CDateTime, CMyPage, CMyFieldRec },
props: {
table: {
type: String,
required: true,
},
prop_myrec: {
type: Object as PropType<any>,
required: false,
default: null,
},
idRec: {
type: Number,
required: false,
default: 0
}
},
setup(props) {
const userStore = useUserStore()
const globalStore = useGlobalStore()
const $q = useQuasar()
const { t } = useI18n()
const showPic = ref(false)
const mybacheca = ref(<IMyBacheca>{})
const col = ref(<IColGridTable>{})
function profile() {
return userStore.my.profile
}
function load() {
// Carica il profilo di quest'utente
if (props.idRec > 0) {
userStore.loadGeneric(props.table, props.idRec).then((ris) => {
mybacheca.value = ris
})
} else {
mybacheca.value = props.prop_myrec
}
col.value = fieldsTable.getArrColsByTable(props.table)
}
watch(() => props.idRec, (to: any, from: any) => {
load()
})
function mounted() {
load()
}
onMounted(mounted)
return {
profile,
tools,
costanti,
mybacheca,
shared_consts,
globalStore,
showPic,
userStore,
t,
fieldsTable,
colCitys,
toolsext,
col,
}
}
})

View File

@@ -0,0 +1,59 @@
<template>
<q-card class="dialog_card" v-if="mybacheca">
<q-bar dense class="bg-primary text-white">
{{ mybacheca.username }}
<q-space/>
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
</q-bar>
<q-card-section class="inset-shadow">
<div class="text-center">
<q-chip :icon="fieldsTable.getIconByAdType(mybacheca.adType)"
:color="fieldsTable.getColByAdType(mybacheca.adType)"
text-color="white">{{
fieldsTable.getValByTabAndId(table, 'adType', mybacheca.adType)
}}
</q-chip>
</div>
<!--:title="t(mycol.label_trans)"-->
<div v-for="(mycol, index) of col" :key="index">
<div
v-if="(mycol.visible && (tools.checkIfShowField(mycol, tools.TIPOVIS_SHOW_RECORD, false, tools.getValue(mybacheca, mycol.field, mycol.subfield))))">
<div v-if="mycol.fieldtype === costanti.FieldType.html">
<div class="note-bacheca"
v-html="tools.getValue(mybacheca, mycol.field, mycol.subfield)">
</div>
</div>
<div v-else-if="mycol.name === 'descr'">
<div class="text-bacheca">
{{ tools.getValue(mybacheca, mycol.field, mycol.subfield) }}
</div>
</div>
<CMyFieldRec
v-else
:table="table"
:id="mybacheca._id"
:rec="mybacheca"
:field="mycol.field"
:canEdit="false"
:canModify="false">
</CMyFieldRec>
</div>
</div>
</q-card-section>
</q-card>
</template>
<script lang="ts" src="./CMyCardPopup.ts">
</script>
<style lang="scss" scoped>
@import './CMyCardPopup.scss';
</style>

View File

@@ -0,0 +1 @@
export { default as CMyCardPopup } from './CMyCardPopup.vue'

View File

@@ -20,7 +20,7 @@
</q-field> </q-field>
</div> </div>
<div :class="` q-ma-sm q-pa-sm col-grow rounded-borders `" :style="withBorder() ? `border: 1px solid #bbb` : ``"> <div :class="` q-ma-sm q-pa-sm col-grow popupedit `" :style="withBorder() ? `` : ``">
<CMyPopupEdit <CMyPopupEdit
v-bind="$attrs" v-bind="$attrs"
:title="title" :title="title"

View File

@@ -46,18 +46,13 @@ export default defineComponent({
required: false, required: false,
default: false, default: false,
}, },
columns: {
type: Object,
required: false,
default: null,
},
disable: { disable: {
type: Boolean, type: Boolean,
required: false, required: false,
default: false, default: false,
}, },
id: { id: {
type: String, type: [String, Number],
required: false, required: false,
default: '', default: '',
}, },
@@ -99,8 +94,9 @@ export default defineComponent({
keytab.value = fieldsTable.getKeyByTable(props.table) keytab.value = fieldsTable.getKeyByTable(props.table)
optlab.value = fieldsTable.getLabelByTable(props.table) optlab.value = fieldsTable.getLabelByTable(props.table)
// recordCol.value = fieldsTable.getrecTableList(props.table) // recordCol.value = fieldsTable.getrecTableList(props.table)
if (props.columns) { let columns = fieldsTable.getArrColsByTable(props.table)
col.value = props.columns.find((col: any) => col.name === props.field) if (columns) {
col.value = columns.find((col: any) => col.field === props.field)
} else { } else {
col.value = fieldsTable.getColByTable(props.table, props.field) col.value = fieldsTable.getColByTable(props.table, props.field)
} }

View File

@@ -2,7 +2,7 @@
<div class="text-center"> <div class="text-center">
<div v-if="visuElem()" class="row items-center justify-center q-ma-xs"> <div v-if="visuElem()" class="row items-center justify-center q-ma-xs">
<div class="q-ma-xs"> <div v-if="mytitle" class="q-ma-xs">
<q-field rounded outlined bg-color="blue-1" dense style="min-width:110px;"> <q-field rounded outlined bg-color="blue-1" dense style="min-width:110px;">
<template v-slot:control> <template v-slot:control>
<div class="centermydiv"> <div class="centermydiv">
@@ -20,7 +20,7 @@
</q-field> </q-field>
</div> </div>
<div :class="` q-ma-sm q-pa-sm col-grow rounded-borders `" :style="withBorder() ? `border: 1px solid #bbb` : ``"> <div :class="` col-grow popupedit `" :style="withBorder() ? `` : ``">
<CMyPopupEdit <CMyPopupEdit
v-bind="$attrs" v-bind="$attrs"
:isrec="true" :isrec="true"
@@ -38,7 +38,7 @@
:canEdit="canEdit" :canEdit="canEdit"
:id="id" :id="id"
:idmain="idmain" :idmain="idmain"
:visulabel="true" :visulabel="!!mytitle"
:mycol="col" :mycol="col"
:tablesel="tablesel" :tablesel="tablesel"
:pickup="pickup" :pickup="pickup"

View File

@@ -2,13 +2,13 @@
<div v-if="tools.isUserOk()"> <div v-if="tools.isUserOk()">
<div v-if="grp"> <div v-if="grp">
<q-item class="q-my-sm" clickable> <q-item class="q-my-sm" clickable>
<q-item-section avatar @click="naviga(`/grp/` + grp.groupname)"> <q-item-section avatar @click="naviga(`/` + tools.getDirectoryByTable(table) + `/` + grp.groupname)">
<q-avatar size="60px"> <q-avatar size="60px">
<q-img :src="getImgGroup(grp)" :alt="grp.groupname" img-class="imgprofile" height="60px"/> <q-img :src="getImgGroup(grp)" :alt="grp.groupname" img-class="imgprofile" height="60px"/>
</q-avatar> </q-avatar>
</q-item-section> </q-item-section>
<q-item-section @click="naviga(`/grp/` + grp.groupname)"> <q-item-section @click="naviga(`/` + tools.getDirectoryByTable(table) + `/` + grp.groupname)">
<q-item-label><strong>{{ grp.title }}</strong> ({{ grp.groupname }}) <q-item-label><strong>{{ grp.title }}</strong> ({{ grp.groupname }})
</q-item-label> </q-item-label>
<q-item-label v-if="grp.descr" caption lines="1"><em>{{ grp.descr }}</em></q-item-label> <q-item-label v-if="grp.descr" caption lines="1"><em>{{ grp.descr }}</em></q-item-label>

View File

@@ -22,6 +22,8 @@ import { costanti } from '@costanti'
import { fieldsTable } from '@store/Modules/fieldsTable' import { fieldsTable } from '@store/Modules/fieldsTable'
import MixinBase from '@/mixins/mixin-base' import MixinBase from '@/mixins/mixin-base'
import MixinUsers from '@/mixins/mixin-users' import MixinUsers from '@/mixins/mixin-users'
import { toolsext } from '@store/Modules/toolsext'
import { shared_consts } from '@/common/shared_vuejs'
export default defineComponent({ export default defineComponent({
name: 'CMyPopupEdit', name: 'CMyPopupEdit',
@@ -657,8 +659,8 @@ export default defineComponent({
} }
function getToByCol(col: IColGridTable){ function getToByCol(col: IColGridTable){
if (props.table === 'myskills') { if (shared_consts.TABLES_REC_ID.includes(props.table)) {
return '/mypage/'+ props.row['_id'] return '/' + tools.getDirectoryByTable(props.table) + '/' + props.row['_id']
} else if (props.table === 'mygroups') { } else if (props.table === 'mygroups') {
return '/grp/' + props.row['groupname'] return '/grp/' + props.row['groupname']
} }

View File

@@ -1,6 +1,8 @@
<template> <template>
<div :class="getclassCol(col)"> <div :class="getclassCol(col)">
<div v-if="tools.checkIfShowField(col, insertMode ? tools.TIPOVIS_NEW_RECORD : (isInModif ? tools.TIPOVIS_EDIT_RECORD : tools.TIPOVIS_SHOW_RECORD), visulabel, myvalue)" style="flex-grow: 1;"> <div
v-if="tools.checkIfShowField(col, insertMode ? tools.TIPOVIS_NEW_RECORD : (isInModif ? tools.TIPOVIS_EDIT_RECORD : tools.TIPOVIS_SHOW_RECORD), visulabel, myvalue)"
style="flex-grow: 1;">
<div <div
:class="{ flex: !isInModif, 'justify-center': true }"> :class="{ flex: !isInModif, 'justify-center': true }">
<div> <div>
@@ -30,6 +32,25 @@
@update:model-value="Savedb"></q-toggle> @update:model-value="Savedb"></q-toggle>
</div> </div>
</div> </div>
<div v-else-if="col.fieldtype === costanti.FieldType.username_chip">
<div class="q-ma-xs">
<q-btn v-if="col.tipovisu === costanti.TipoVisu.LINK && myvalue"
type="a" rounded size="md"
:class="{disabled: disable }"
color="white" text-color="blue" :icon="`img:`+userStore.getImgUserByUsername(myvalue)"
:to="col.link.replace(col.name, myvalue)"
:label="myvalue"
>
</q-btn>
<q-avatar v-else-if="col.tipovisu === costanti.TipoVisu.LINKIMG && myvalue" size="60px">
<q-img :src="getImgUser(contact)" :alt="myvalue" img-class="imgprofile" height="60px"/>
</q-avatar>
<q-btn v-else-if="col.tipovisu === costanti.TipoVisu.BUTTON && myvalue" rounded size="sm"
color="primary" icon="person" :to="col.link.replace(col.name, myvalue)" :label="myvalue">
</q-btn>
</div>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.string || col.fieldtype === costanti.FieldType.crypted"> <div v-else-if="col.fieldtype === costanti.FieldType.string || col.fieldtype === costanti.FieldType.crypted">
<div v-if="visulabel || isInModif" :class="{ flex: !isInModif}"> <div v-if="visulabel || isInModif" :class="{ flex: !isInModif}">
<q-input <q-input
@@ -53,7 +74,8 @@
<q-btn v-if="col.tipovisu === costanti.TipoVisu.LINK && myvalue" <q-btn v-if="col.tipovisu === costanti.TipoVisu.LINK && myvalue"
type="a" rounded size="md" type="a" rounded size="md"
:class="{disabled: disable }" :class="{disabled: disable }"
color="white" text-color="blue" :icon="`img:`+userStore.getImgUserByUsername(myvalue)" :to="col.link.replace(col.name, myvalue)" color="white" text-color="blue" :icon="`img:`+userStore.getImgUserByUsername(myvalue)"
:to="col.link.replace(col.name, myvalue)"
:label="myvalue" :label="myvalue"
> >
</q-btn> </q-btn>
@@ -108,7 +130,7 @@
</div> </div>
<div v-else-if="col.fieldtype === costanti.FieldType.listimages" style="text-align: center;"> <div v-else-if="col.fieldtype === costanti.FieldType.listimages" style="text-align: center;">
<CGallery <CGallery
:imagebak="col.showpicprofile_ifnotset ? userStore.getImgByProfile(row, true) : ''" :imagebak="col.showpicprofile_ifnotset ? ((userStore.getImgByProfile(row, true) === '') ? costanti.NESSUN_IMMAGINE : userStore.getImgByProfile(row, true)) : ''"
:title="getTitleGall()" :title="getTitleGall()"
:directory="getDirectoryGall()" :directory="getDirectoryGall()"
:imgGall="myvalue" :imgGall="myvalue"
@@ -145,7 +167,7 @@
</div> </div>
<div v-else class="text-center"> <div v-else class="text-center">
<q-img <q-img
src="images/noimg-user.svg" :src="col.showpicprofile_ifnotset ? userStore.getImgByProfile(row['profile'], true) : 'images/noimg-user.svg'"
class="text-center" class="text-center"
style="height: 100px; width: 100px;" style="height: 100px; width: 100px;"
alt="nessuna immagine"> alt="nessuna immagine">
@@ -418,7 +440,9 @@
<div v-else-if="col.fieldtype === costanti.FieldType.html"> <div v-else-if="col.fieldtype === costanti.FieldType.html">
<div v-if="isInModif"> <div v-if="isInModif">
<q-bar v-if="isInModif" dense class="bg-primary text-white"> <q-bar v-if="isInModif" dense class="bg-primary text-white">
<span v-if="col.label_trans">{{t(col.label_trans)}}</span><span v-else> {{ $t('event.testo_di_spiegazione') }}: </span> <span v-if="col.label_trans">{{ t(col.label_trans) }}</span><span v-else> {{
$t('event.testo_di_spiegazione')
}}: </span>
<q-space/> <q-space/>
</q-bar> </q-bar>
<div v-if="!isFieldDb()"> <div v-if="!isFieldDb()">
@@ -517,7 +541,8 @@
</q-checkbox> </q-checkbox>
<span v-html="visuValByType(myvalue, col, row)"></span> <span v-html="visuValByType(myvalue, col, row)"></span>
</div> </div>
<div v-else-if="col.fieldtype === costanti.FieldType.string || col.fieldtype === costanti.FieldType.crypted"> <div
v-else-if="col.fieldtype === costanti.FieldType.string || col.fieldtype === costanti.FieldType.crypted">
<q-input <q-input
v-bind="$attrs" v-bind="$attrs"
counter counter
@@ -733,7 +758,8 @@
@showandsave="Savedb"> @showandsave="Savedb">
</CMyEditor> </CMyEditor>
</div> </div>
</div> </q-popup-edit> </div>
</q-popup-edit>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,20 +1,26 @@
import { defineComponent, onMounted, PropType, ref, watch } from 'vue' import { defineComponent, onMounted, PropType, ref, watch } from 'vue'
import { useUserStore } from '@store/UserStore' import { useUserStore } from '@store/UserStore'
import { IImgGallery, IMySkill, IUserFields, IUserProfile } from 'model' import { IImgGallery, IUserFields, IUserProfile } from 'model'
import { costanti } from '@costanti' import { costanti } from '@costanti'
import { shared_consts } from '@/common/shared_vuejs' import { shared_consts } from '@/common/shared_vuejs'
import { fieldsTable } from '@store/Modules/fieldsTable' import { fieldsTable } from '@store/Modules/fieldsTable'
import { tools } from '@store/Modules/tools' import { tools } from '@store/Modules/tools'
import { useQuasar } from 'quasar' import { useQuasar } from 'quasar'
import { useI18n } from '@/boot/i18n' import { useI18n } from '@/boot/i18n'
import { useRoute, useRouter } from 'vue-router' import { CMyCardPopup } from '@/components/CMyCardPopup'
// import { useRouter } from 'vue-router'
export default defineComponent({ export default defineComponent({
name: 'CMySkill', name: 'CMyRecCard',
components: { CMyCardPopup },
emits: ['setCmd', 'cmdext'], emits: ['setCmd', 'cmdext'],
props: { props: {
prop_myskill: { table: {
type: Object as PropType<IMySkill | null>, type: String,
required: true,
},
prop_myrec: {
type: Object as PropType<any | null>,
required: false, required: false,
default: null, default: null,
}, },
@@ -23,23 +29,22 @@ export default defineComponent({
setup(props, { emit }) { setup(props, { emit }) {
const userStore = useUserStore() const userStore = useUserStore()
const $q = useQuasar() // const $q = useQuasar()
const { t } = useI18n() const { t } = useI18n()
const $router = useRouter() // const $router = useRouter()
const $route = useRoute()
const username = ref('') const myrec = ref(<any | null>null)
const myskill = ref(<IMySkill | null>null) const visupage = ref(false)
watch(() => props.prop_myrec, (newval, oldval) => {
watch(() => props.prop_myskill, (newval, oldval) => {
console.log('watch: myskill')
mounted() mounted()
}) })
function mounted() { function mounted() {
if (props.prop_myskill) { if (props.prop_myrec) {
myskill.value = props.prop_myskill myrec.value = props.prop_myrec
} }
} }
@@ -47,9 +52,9 @@ export default defineComponent({
return userStore.getImgByProfile(profile) return userStore.getImgByProfile(profile)
} }
function naviga(path: string) { /*function naviga(path: string) {
$router.push(path) $router.push(path)
} }*/
function setCmd($q: any, cmd: number, myusername: string, value: any, groupname: string) { function setCmd($q: any, cmd: number, myusername: string, value: any, groupname: string) {
emit('setCmd', $q, cmd, myusername, value, groupname) emit('setCmd', $q, cmd, myusername, value, groupname)
@@ -62,16 +67,18 @@ export default defineComponent({
onMounted(mounted) onMounted(mounted)
return { return {
myskill, t,
myrec,
costanti, costanti,
getImgUser, getImgUser,
naviga, // naviga,
setCmd, setCmd,
shared_consts, shared_consts,
userStore, userStore,
tools, tools,
fieldsTable, fieldsTable,
cmdExt, cmdExt,
visupage,
} }
}, },
}) })

View File

@@ -1,48 +1,48 @@
<template> <template>
<div class="q-py-xs centermydiv" :style="`min-width: `+ (tools.getwidth($q) - 20) +`px;`"> <div class="q-py-xs centermydiv" :style="`min-width: `+ (tools.getwidth($q) - 20) +`px;`">
<q-item v-if="myskill" clickable v-ripple class="shadow-2 q-btn--rounded bg-teal-1"> <q-item v-if="myrec" clickable v-ripple class="shadow-2 q-btn--rounded bg-teal-1">
<q-item-section avatar @click="naviga(`/my/` + myskill.username)"> <q-item-section avatar @click="naviga(`/my/` + myrec.username)">
<q-badge class="q-my-xs self-center" :color="fieldsTable.getColByAdType(myskill.adType)"> <q-badge class="q-my-xs self-center" :color="fieldsTable.getColByAdType(myrec.adType)">
{{ fieldsTable.getValByTabAndId('myskills', 'adType', myskill.adType) }} {{ fieldsTable.getValByTabAndId(table, 'adType', myrec.adType) }}
<q-icon :name="fieldsTable.getIconByAdType(myskill.adType)" color="white" <q-icon :name="fieldsTable.getIconByAdType(myrec.adType)" color="white"
class="q-ml-xs"/> class="q-ml-xs"/>
</q-badge> </q-badge>
<q-avatar size="60px"> <q-avatar size="60px">
<q-img :src="getImgUser(myskill)" :alt="myskill.username" img-class="imgprofile" height="60px"/> <q-img :src="getImgUser(myrec)" :alt="myrec.username" img-class="imgprofile" height="60px"/>
</q-avatar> </q-avatar>
</q-item-section> </q-item-section>
<q-item-section @click="naviga(`/mypage/` + myskill._id)"> <q-item-section @click="cmdExt(costanti.CMD_SHOW_PAGE, myrec)">
<q-item-label class="full-width"> <q-item-label class="full-width">
<span v-for="(rec, ind) of myskill.recSkill" :key="ind"> <q-chip <span v-for="(rec, ind) of myrec.recSkill" :key="ind"> <q-chip
dense dense
class="text-center shadow-5 glossy bg-blue chipmodif">{{ rec.descr }}</q-chip></span> class="text-center shadow-5 glossy bg-blue chipmodif">{{ rec.descr }}</q-chip></span>
<span v-for="(rec, ind) of myskill.myskill" :key="ind"> <q-chip <span v-for="(rec, ind) of myrec.myskill" :key="ind"> <q-chip
dense dense
class="text-center shadow-5 glossy bg-green chipmodif">{{ rec.descr }}</q-chip></span> class="text-center shadow-5 glossy bg-green chipmodif">{{ rec.descr }}</q-chip></span>
<!--<span> - {{ myskill.profile.qualifica }}</span>--> <!--<span> - {{ myrec.profile.qualifica }}</span>-->
</q-item-label> </q-item-label>
<q-item-label lines="3" v-if="myskill.descr">{{ myskill.descr }}<br> <q-item-label lines="3" v-if="myrec.descr">{{ myrec.descr }}<br>
</q-item-label> </q-item-label>
<q-item-label overline lines="1" style="text-align: right"> <q-item-label overline lines="1" style="text-align: right">
<span class="text-weight-bold">{{ myskill.username }}</span> - <span class="text-weight-bold">{{ myrec.username }}</span> -
<span v-for="(rec, ind) of myskill.mycities" :key="ind"><span v-if="ind > 0">, </span>{{ rec.comune }}</span> <span v-for="(rec, ind) of myrec.mycities" :key="ind"><span v-if="ind > 0">, </span>{{ rec.comune }}</span>
</q-item-label> </q-item-label>
</q-item-section> </q-item-section>
<q-item-section side v-if="myskill.userId === userStore.my._id"> <q-item-section side v-if="myrec.userId === userStore.my._id">
<q-item-label> <q-item-label>
<q-btn rounded icon="fas fa-ellipsis-h"> <q-btn rounded icon="fas fa-ellipsis-h">
<q-menu> <q-menu>
<q-list style="min-width: 150px"> <q-list style="min-width: 150px">
<q-item clickable icon="fas fa-pencil-alt" v-close-popup <q-item clickable icon="fas fa-pencil-alt" v-close-popup
@click="cmdExt(costanti.CMD_MODIFY, myskill._id)"> @click="cmdExt(costanti.CMD_MODIFY, myrec._id)">
<q-item-section>{{ $t('reg.edit') }}</q-item-section> <q-item-section>{{ $t('reg.edit') }}</q-item-section>
</q-item> </q-item>
</q-list> </q-list>
<q-list style="min-width: 150px"> <q-list style="min-width: 150px">
<q-item clickable icon="fas fa-trash-alt" v-close-popup @click="cmdExt(costanti.CMD_DELETE, myskill._id)"> <q-item clickable icon="fas fa-trash-alt" v-close-popup @click="cmdExt(costanti.CMD_DELETE, myrec._id)">
<q-item-section>{{ $t('reg.elimina') }}</q-item-section> <q-item-section>{{ $t('reg.elimina') }}</q-item-section>
</q-item> </q-item>
</q-list> </q-list>
@@ -51,16 +51,15 @@
</q-item-label> </q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-separator inset="item"/> <q-separator inset="item"/>
</div> </div>
</template> </template>
<script lang="ts" src="./CMySkill.ts"> <script lang="ts" src="./CMyRecCard.ts">
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import './CMySkill.scss'; @import './CMyRecCard.scss';
</style> </style>

View File

@@ -0,0 +1 @@
export { default as CMyRecCard } from './CMyRecCard.vue'

View File

@@ -1 +0,0 @@
export { default as CMySkill } from './CMySkill.vue'

View File

@@ -9,11 +9,17 @@ import { useGlobalStore } from '@store/globalStore'
import { useUserStore } from '@store/UserStore' import { useUserStore } from '@store/UserStore'
import { colmySkills } from '@store/Modules/fieldsTable' import { colmySkills } from '@store/Modules/fieldsTable'
import { CGridTableRec } from '@/components/CGridTableRec' import { CGridTableRec } from '@/components/CGridTableRec'
import { IMySkill, ISkill } from 'model' import { IColGridTable, IMySkill, ISkill } from 'model'
import { toolsext } from '@store/Modules/toolsext'
import { fieldsTable } from '@store/Modules/fieldsTable'
export default defineComponent({ export default defineComponent({
name: 'CSkill', name: 'CSkill',
props: { props: {
table: {
type: String,
required: true,
},
defaultnewrec: { defaultnewrec: {
type: Function, type: Function,
required: false, required: false,
@@ -40,28 +46,30 @@ export default defineComponent({
CMyFieldDb, CGridTableRec, CMyFieldDb, CGridTableRec,
}, },
setup(props, { attrs, slots, emit }) { setup(props, { attrs, slots, emit }) {
const mytable = 'users'
const globalStore = useGlobalStore() const globalStore = useGlobalStore()
const userStore = useUserStore() const userStore = useUserStore()
const table = ref(toolsext.TABMYSKILLS)
function getdefaultnewrec(): IMySkill { const col = ref(<IColGridTable>{})
return {
_id: 0,
idSector: 0,
idSkill: 0,
idSubSkill: [],
idStatusSkill: [],
idContribType: [],
idCity: [],
NumLevel: 0,
adType: 0,
photos: [],
note: '',
descr: '',
}
}
const prop_colkey = ref('')
const col_title = ref('')
const col_footer = ref('')
const col_tabfooter = ref('')
function mounted() {
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 extraparams() { function extraparams() {
let lk_tab = 'users' let lk_tab = 'users'
@@ -178,7 +186,7 @@ export default defineComponent({
lk_tab: 'subskills', lk_tab: 'subskills',
lk_LF: 'idSubSkill', lk_LF: 'idSubSkill',
lk_FF: '_id', lk_FF: '_id',
lk_as: 'myskill', lk_as: 'myrec',
af_objId_tab: '', af_objId_tab: '',
}, },
lookup5: { lookup5: {
@@ -192,12 +200,29 @@ 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
}
onMounted(mounted)
return { return {
tools, tools,
costanti, costanti,
colmySkills, colmySkills,
getdefaultnewrec,
extraparams, extraparams,
fieldsTable,
col,
prop_colkey,
col_title,
col_footer,
col_tabfooter,
getdefaultnewrec,
} }
}, },
}) })

View File

@@ -2,17 +2,17 @@
<div> <div>
<div class="q-ma-sm q-gutter-sm q-pa-xs"> <div class="q-ma-sm q-gutter-sm q-pa-xs">
<CGridTableRec <CGridTableRec
v-if="filtercustom.length > 0" v-if="filtercustom.length > 0 && col && col.length > 0"
prop_mytable="myskills" :prop_mytable="table"
prop_mytitle="" prop_mytitle=""
:prop_mycolumns="colmySkills" :prop_mycolumns="col"
prop_colkey="idSkill" :prop_colkey="prop_colkey"
col_title="descr" :col_title="col_title"
col_footer="idCity" :col_footer="col_footer"
:vertical="-1" :vertical="-1"
:choose_visutype="!visuinpage" :choose_visutype="!visuinpage"
:butt_modif_new="!visuinpage" :butt_modif_new="!visuinpage"
nodataLabel="Nessuna Competenza inserita" nodataLabel="Nessun dato presente"
:prop_search="false" :prop_search="false"
:visuinpage="visuinpage" :visuinpage="visuinpage"
noresultLabel="Il filtro selezionato non ha trovato nessun risultato" noresultLabel="Il filtro selezionato non ha trovato nessun risultato"

View File

@@ -0,0 +1,29 @@
.cltitlebg{
}
.titletext {
color: white;
font-size: 3rem;
font-weight: 500;
line-height: 3rem;
text-shadow: .25rem .25rem .5rem black;
letter-spacing: .00937em;
opacity: 0.9;
}
@media (max-width: 718px) {
// PER VERSIONE MOBILE
.titletext {
color: white;
font-size: 2rem;
font-weight: 500;
line-height: 2rem;
text-shadow: .25rem .25rem .5rem black;
}
}
.q-img__content > div{
background: rgba(0,0,0,0.17) !important;
}

View File

@@ -0,0 +1,44 @@
import {
computed,
defineComponent, onBeforeMount, onBeforeUnmount, onMounted, ref, toRef, toRefs, watch,
} from 'vue'
import { tools } from '@store/Modules/tools'
import { costanti } from '@costanti'
import { useGlobalStore } from '@store/globalStore'
import { useUserStore } from '@store/UserStore'
import { useI18n } from '@/boot/i18n'
export default defineComponent({
name: 'CTestServer',
props: {
},
components: {
},
setup(props, { attrs, slots, emit }) {
const { t } = useI18n()
const globalStore = useGlobalStore()
const userStore = useUserStore()
const testServer = ref({})
function mounted() {
ricarica()
}
async function ricarica() {
testServer.value = {}
testServer.value = await globalStore.loadPageTest()
}
onMounted(mounted)
return {
t,
tools,
costanti,
testServer,
ricarica,
}
},
})

View File

@@ -0,0 +1,25 @@
<template>
<div class="bi-border-all">
<q-banner
rounded
class="bg-primary text-white"
color="primary q-title"
style="text-align: center;">
<span class="mybanner">Server: {{testServer}}</span>
</q-banner>
<div class="text-center q-ma-lg">
<q-btn push size="lg" color="primary" rounded label="Ricarica" @click="ricarica"></q-btn>
</div>
</div>
</template>
<script lang="ts" src="./CTestServer.ts">
</script>
<style lang="scss" scoped>
@import './CTestServer.scss';
</style>

View File

@@ -0,0 +1 @@
export { default as CTestServer } from './CTestServer.vue'

View File

@@ -98,11 +98,6 @@
</div>--> </div>-->
<!-- BUTTON USER BAR --> <!-- BUTTON USER BAR -->
<q-btn
class="q-mx-xs" v-if="static_data.functionality.SHOW_USER_MENU && !isLogged()" dense flat round
icon="menu"
@click="rightDrawerOpen = !rightDrawerOpen">
</q-btn>
<q-btn <q-btn
class="q-mx-xs" v-if="static_data.functionality.ENABLE_ECOMMERCE && isLogged()" round dense flat class="q-mx-xs" v-if="static_data.functionality.ENABLE_ECOMMERCE && isLogged()" round dense flat
@@ -114,7 +109,7 @@
</q-btn> </q-btn>
<q-btn <q-btn
class="q-mx-xs" v-if="static_data.functionality.ENABLE_ECOMMERCE && isLogged && getnumOrdersCart() > 0" class="q-mx-xs" v-if="static_data.functionality.ENABLE_ECOMMERCE && isLogged() && getnumOrdersCart() > 0"
round dense flat round dense flat
to="/orderinfo" icon="fas fa-list-ol"> to="/orderinfo" icon="fas fa-list-ol">
@@ -123,18 +118,16 @@
</q-badge> </q-badge>
</q-btn> </q-btn>
<!--<q-avatar v-if="static_data.functionality.SHOW_USER_MENU && isLogged()" <q-btn
size="30px" class="q-mx-xs" v-if="static_data.functionality.SHOW_USER_MENU && !isLogged()" dense flat round
@click="rightDrawerOpen = !rightDrawerOpen" :color="getcolormenu()"> icon="menu"
<q-img :src="getMyImgforIcon()" :alt="Username()" img-class=""/> @click="rightDrawerOpen = !rightDrawerOpen">
</q-avatar>--> </q-btn>
<q-avatar v-else-if="static_data.functionality.SHOW_USER_MENU && isLogged() && getMyImg()"
<q-avatar v-if="static_data.functionality.SHOW_USER_MENU && isLogged() && getMyImg()"
size="36px" class="center_img cursor-pointer" size="36px" class="center_img cursor-pointer"
@click="rightDrawerOpen = !rightDrawerOpen"> @click="rightDrawerOpen = !rightDrawerOpen">
<q-img ratio="1" fit="conver" :src="getMyImg()" :alt="Username()" img-class="imgprofile_small" stretch="false" <q-img ratio="1" fit="conver" :src="getMyImg()" :alt="Username()" img-class="imgprofile_small" stretch="false"
placeholder-src="https://placeimg.com/36/36/nature"/> />
</q-avatar> </q-avatar>
<q-btn <q-btn
v-else v-else

View File

@@ -32,6 +32,7 @@ export * from './logo'
export * from './testpao' export * from './testpao'
export * from './CEventsCalendar' export * from './CEventsCalendar'
export * from './CMySingleEvent' export * from './CMySingleEvent'
export * from './CMyCardPopup'
// export * from './PagePolicy' // export * from './PagePolicy'
export * from './CFacebookFrame' export * from './CFacebookFrame'
export * from './CVerifyEmail' export * from './CVerifyEmail'
@@ -42,5 +43,5 @@ export * from './CMyGroups'
export * from './CDashboard' export * from './CDashboard'
export * from './CMainView' export * from './CMainView'
export * from './CBigBtn' export * from './CBigBtn'
export * from './CMySkill' export * from './CMyRecCard'
// export * from './CPreloadImages' // export * from './CPreloadImages'

View File

@@ -948,3 +948,8 @@ $heightBtn: 100%;
.no-padding{ .no-padding{
padding: 0 !important; padding: 0 !important;
} }
.popupedit{
// border: 1px solid #bbb;
border-radius: $generic-border-radius
}

View File

@@ -25,6 +25,7 @@ const msg_website_it = {
profile: 'Profilo', profile: 'Profilo',
profile2: 'ProfiloU', profile2: 'ProfiloU',
mypage2: 'mypage2', mypage2: 'mypage2',
mywork2: 'mywork2',
test: 'Test', test: 'Test',
projects: 'Progetti', projects: 'Progetti',
report: 'Report Ore', report: 'Report Ore',

View File

@@ -390,6 +390,17 @@ const baseroutes: IListRoutes[] = [
inmenu: true, inmenu: true,
infooter: 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, active: true,
order: 100, order: 100,
@@ -470,10 +481,32 @@ const baseroutes: IListRoutes[] = [
{ {
active: true, active: true,
order: 130, order: 130,
path: '/mypage/:idSkill', path: '/mypage/:idBacheca',
materialIcon: 'fas fa-user', materialIcon: 'fas fa-user',
name: 'pages.mypage2', 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 }, meta: { requiresAuth: true },
inmenu: false, inmenu: false,
infooter: false, infooter: false,

View File

@@ -691,3 +691,20 @@ export interface IMySkill {
date_updated?: Date, date_updated?: Date,
} }
export interface IMyBacheca {
_id: number
idSector: number
idSkill: number
idSubSkill: number[]
idStatusSkill: number[]
idContribType: string[]
idCity: number[]
photos: IGallery[]
NumLevel: number
adType: number
note: string
descr: string
date_created?: Date,
date_updated?: Date,
}

View File

@@ -33,6 +33,7 @@ export interface IMyGroup {
export interface ICalcStat { export interface ICalcStat {
numUsersReg: number numUsersReg: number
numMySkills: number numMySkills: number
numMyBachecas: number
numGroups: number numGroups: number
} }

View File

@@ -3,6 +3,7 @@ import {
} from 'vue' } from 'vue'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { CSkill } from '@/components/CSkill' import { CSkill } from '@/components/CSkill'
import { CFinder } from '@/components/CFinder' import { CFinder } from '@/components/CFinder'
import { CDashboard } from '@/components/CDashboard' import { CDashboard } from '@/components/CDashboard'
@@ -17,6 +18,7 @@ import { static_data } from '@/db/static_data'
import MixinBase from '@/mixins/mixin-base' import MixinBase from '@/mixins/mixin-base'
import MixinUsers from '@/mixins/mixin-users' import MixinUsers from '@/mixins/mixin-users'
import { colmyBachecas } from '@store/Modules/fieldsTable'
export default defineComponent({ export default defineComponent({
name: 'bacheca', name: 'bacheca',
@@ -51,7 +53,9 @@ export default defineComponent({
} }
return { return {
colmyBachecas,
tools, tools,
toolsext,
static_data, static_data,
isEmailVerified, isEmailVerified,
TelegCode, TelegCode,

View File

@@ -5,7 +5,8 @@
<div v-if="isUserOk()"> <div v-if="isUserOk()">
<CFinder> <CFinder
:table="toolsext.TABMYBACHECAS">
</CFinder> </CFinder>

0
src/root/work/work.scss Executable file
View File

71
src/root/work/work.ts Executable file
View File

@@ -0,0 +1,71 @@
import {
defineComponent, ref, computed,
} from 'vue'
import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { CSkill } from '@/components/CSkill'
import { CFinder } from '@/components/CFinder'
import { CDashboard } from '@/components/CDashboard'
import { CChartMap } from '@src/components/CChartMap'
import { CUserNonVerif } from '@/components/CUserNonVerif'
import { CMapsEsempio } from '@src/components/CMapsEsempio'
import { CVerifyEmail } from '@src/components/CVerifyEmail'
import { CVerifyTelegram } from '@src/components/CVerifyTelegram'
import { useGlobalStore } from '@store/globalStore'
import { useUserStore } from '@store/UserStore'
import { static_data } from '@/db/static_data'
import MixinBase from '@/mixins/mixin-base'
import MixinUsers from '@/mixins/mixin-users'
import { colmySkills } from '@store/Modules/fieldsTable'
export default defineComponent({
name: 'bacheca',
components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram, CDashboard, CUserNonVerif },
setup() {
const globalStore = useGlobalStore()
const userStore = useUserStore()
const { getValDb } = MixinBase()
const { isEmailVerified, TelegVerificato } = MixinUsers()
function TelegCode() {
return userStore.my.profile.teleg_checkcode
}
function openrighttoolbar() {
globalStore.rightDrawerOpen = true
}
function isLogged() {
return userStore.isLogged
}
function isUserOk() {
return userStore.isUserOk()
}
function getLinkBotTelegram(): string {
if ( tools.isTest() && !process.env.DEV) {
return getValDb('TELEG_BOT_LINK_TEST', false)
} else{
return getValDb('TELEG_BOT_LINK', false)
}
}
return {
tools,
toolsext,
static_data,
isEmailVerified,
TelegCode,
TelegVerificato,
isLogged,
openrighttoolbar,
isUserOk,
getLinkBotTelegram,
colmySkills,
}
},
})

28
src/root/work/work.vue Executable file
View File

@@ -0,0 +1,28 @@
<template>
<q-page class="">
<div v-if="isLogged()">
<div v-if="isUserOk()">
<CFinder
:table="toolsext.TABMYSKILLS"
/>
<CDashboard></CDashboard>
</div>
<div v-else>
<CUserNonVerif></CUserNonVerif>
</div>
</div>
</q-page>
</template>
<script lang="ts" src="./work.ts">
</script>
<style lang="scss" scoped>
@import './work.scss';
</style>

View File

@@ -878,6 +878,8 @@ const msg_it = {
create_group: 'Crea Gruppo', create_group: 'Crea Gruppo',
friends: 'Amici', friends: 'Amici',
bacheca: 'Bacheca', bacheca: 'Bacheca',
work: 'Lavoro',
test: 'Test',
groups: 'Gruppi', groups: 'Gruppi',
request_friends: 'Rich. Amicizia', request_friends: 'Rich. Amicizia',
request_sent_friends: 'Rich. Inviate', request_sent_friends: 'Rich. Inviate',

View File

@@ -10,7 +10,7 @@ export const costanti = {
SHOW_USERINFO: 1, SHOW_USERINFO: 1,
SHOW_GROUPINFO: 5, SHOW_GROUPINFO: 5,
SHOW_MYSKILL: 10, SHOW_MYCARD: 10,
BINARY_CHECK: 1, BINARY_CHECK: 1,
@@ -42,6 +42,7 @@ export const costanti = {
CMD_DELETE: 1, CMD_DELETE: 1,
CMD_MODIFY: 2, CMD_MODIFY: 2,
CMD_SHOW_PAGE: 3,
SHOW_ALL: 50, SHOW_ALL: 50,
@@ -61,6 +62,8 @@ export const costanti = {
ALLOWCHAR_CODE: 1, ALLOWCHAR_CODE: 1,
NESSUN_IMMAGINE: 'none',
showWhen: { showWhen: {
NewRec: 1, NewRec: 1,
InPage: 2, InPage: 2,
@@ -106,6 +109,7 @@ export const costanti = {
crypted: 9000, crypted: 9000,
object: 10000, object: 10000,
separator: 11000, separator: 11000,
username_chip: 12000,
}, },
FieldTypeArr: [ FieldTypeArr: [

View File

@@ -3,6 +3,7 @@ import { useUserStore } from '@store/UserStore'
import { lists } from './lists' import { lists } from './lists'
import { costanti } from './costanti' import { costanti } from './costanti'
import { useGlobalStore } from '@store/globalStore' import { useGlobalStore } from '@store/globalStore'
import { toolsext } from '@store/Modules/toolsext'
const DeleteRec = { const DeleteRec = {
name: 'deleterec', name: 'deleterec',
@@ -177,7 +178,12 @@ export const colmybot = [
AddCol({ name: 'label', label_trans: 'bot.label' }), AddCol({ name: 'label', label_trans: 'bot.label' }),
AddCol({ name: 'type', label_trans: 'bot.type', fieldtype: costanti.FieldType.select, jointable: 'bottype' }), AddCol({ name: 'type', label_trans: 'bot.type', fieldtype: costanti.FieldType.select, jointable: 'bottype' }),
AddCol({ name: 'value', label_trans: 'bot.value' }), AddCol({ name: 'value', label_trans: 'bot.value' }),
AddCol({ name: 'visibility', label_trans: 'bot.visibility', fieldtype: costanti.FieldType.binary, jointable: 'visibility' }), AddCol({
name: 'visibility',
label_trans: 'bot.visibility',
fieldtype: costanti.FieldType.binary,
jointable: 'visibility'
}),
AddCol({ name: 'date_updated', label_trans: 'bot.date_updated', fieldtype: costanti.FieldType.date }), AddCol({ name: 'date_updated', label_trans: 'bot.date_updated', fieldtype: costanti.FieldType.date }),
AddCol(DeleteRec), AddCol(DeleteRec),
AddCol(DuplicateRec), AddCol(DuplicateRec),
@@ -278,7 +284,11 @@ export const colTableHours = [
// AddCol({ name: 'time_start', label_trans: 'hours.time_start', fieldtype: costanti.FieldType.number }), // AddCol({ name: 'time_start', label_trans: 'hours.time_start', fieldtype: costanti.FieldType.number }),
// AddCol({ name: 'time_end', label_trans: 'hours.time_end', fieldtype: costanti.FieldType.number }), // AddCol({ name: 'time_end', label_trans: 'hours.time_end', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'descr', label_trans: 'hours.note' }), AddCol({ name: 'descr', label_trans: 'hours.note' }),
AddCol({ name: 'username', label_trans: 'reg.username_short', showWhen: costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView }), AddCol({
name: 'username',
label_trans: 'reg.username_short',
showWhen: costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView
}),
AddCol(DeleteRec), AddCol(DeleteRec),
AddCol(DuplicateRec), AddCol(DuplicateRec),
] ]
@@ -403,14 +413,18 @@ export const colTablePhones = [
export const colTableUsersGeneric = [ export const colTableUsersGeneric = [
AddCol({ name: 'username', label_trans: 'reg.username_short' }), AddCol({ name: 'username', label_trans: 'reg.username_short' }),
AddCol({ name: 'date', label_trans: 'reg.date', fieldtype: costanti.FieldType.onlydate, AddCol({
showWhen: costanti.showWhen.InPage + costanti.showWhen.InView_OnlyifExist }), name: 'date', label_trans: 'reg.date', fieldtype: costanti.FieldType.onlydate,
showWhen: costanti.showWhen.InPage + costanti.showWhen.InView_OnlyifExist
}),
] ]
export const colTableMyGroup = [ export const colTableMyGroup = [
AddCol({ name: 'groupname', label_trans: 'reg.groupname' }), AddCol({ name: 'groupname', label_trans: 'reg.groupname' }),
AddCol({ name: 'date', label_trans: 'reg.date', fieldtype: costanti.FieldType.onlydate, AddCol({
showWhen: costanti.showWhen.InPage + costanti.showWhen.InView_OnlyifExist }), name: 'date', label_trans: 'reg.date', fieldtype: costanti.FieldType.onlydate,
showWhen: costanti.showWhen.InPage + costanti.showWhen.InView_OnlyifExist
}),
] ]
export const colSkills = [ export const colSkills = [
@@ -461,7 +475,8 @@ export const colmyUserPeople = [
export const colmyUserGroup = [ export const colmyUserGroup = [
// AddCol({ name: '_id', label_trans: 'reg.id' }), // AddCol({ name: '_id', label_trans: 'reg.id' }),
AddCol({ name: 'groupname', label_trans: 'reg.groupname', required: true, AddCol({
name: 'groupname', label_trans: 'reg.groupname', required: true,
maxlength: 30, maxlength: 30,
allowchar: costanti.ALLOWCHAR_CODE, allowchar: costanti.ALLOWCHAR_CODE,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
@@ -478,10 +493,15 @@ export const colmyUserGroup = [
noshowlabel: true, noshowlabel: true,
}), }),
AddCol({ name: 'descr', label_trans: 'proj.longdescr', required: true, noshowlabel: true, }), AddCol({ name: 'descr', label_trans: 'proj.longdescr', required: true, noshowlabel: true, }),
AddCol({ name: 'visibility', label_trans: 'bot.visibility', fieldtype: costanti.FieldType.multiselect, jointable: 'visibilGroup', 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, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
}), }),
AddCol({ name: 'pwd', label_trans: 'groups.pwd', fieldtype: costanti.FieldType.crypted, AddCol({
name: 'pwd', label_trans: 'groups.pwd', fieldtype: costanti.FieldType.crypted,
visibleif: costanti.BINARY_CHECK, visib_field: 'visibility', visib_value: costanti.RISERVATO_PASSWORD, visibleif: costanti.BINARY_CHECK, visib_field: 'visibility', visib_value: costanti.RISERVATO_PASSWORD,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit,
}), }),
@@ -497,7 +517,7 @@ export const colmyUserGroup = [
label_trans: 'skill.photos', label_trans: 'skill.photos',
fieldtype: costanti.FieldType.listimages, fieldtype: costanti.FieldType.listimages,
jointable: '', jointable: '',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
}), }),
AddCol({ AddCol({
name: 'idCity', name: 'idCity',
@@ -512,16 +532,19 @@ export const colmyUserGroup = [
remote_key: '_id', remote_key: '_id',
remote_field: 'comune', remote_field: 'comune',
}), }),
AddCol({ name: 'date_created', label_trans: 'reg.date_created', fieldtype: costanti.FieldType.onlydate, AddCol({
showWhen: costanti.showWhen.InPage + costanti.showWhen.InView_OnlyifExist }), name: 'date_created', label_trans: 'reg.date_created', fieldtype: costanti.FieldType.onlydate,
AddCol({ name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html, showWhen: costanti.showWhen.InPage + costanti.showWhen.InView_OnlyifExist
titlepopupedit: 'Dettagli', field_extra1: 'groupname', subfield_extra1: '' }), }),
AddCol({
name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html,
titlepopupedit: 'Dettagli', field_extra1: 'groupname', subfield_extra1: ''
}),
AddCol(ModifRec), AddCol(ModifRec),
AddCol(DeleteRec), AddCol(DeleteRec),
] ]
export const colmySkills = [ export const colmySkills = [
/*AddCol({ /*AddCol({
name: 'userId', label_trans: 'order.users', fieldtype: costanti.FieldType.string, jointable: 'users', name: 'userId', label_trans: 'order.users', fieldtype: costanti.FieldType.string, jointable: 'users',
@@ -531,6 +554,16 @@ export const colmySkills = [
//AddCol({ name: 'surname', label_trans: 'reg.surname', fieldtype: costanti.FieldType.string }), //AddCol({ name: 'surname', label_trans: 'reg.surname', fieldtype: costanti.FieldType.string }),
// AddCol({ name: 'subTitle', label_trans: 'event.title', fieldtype: costanti.FieldType.string, // AddCol({ name: 'subTitle', label_trans: 'event.title', fieldtype: costanti.FieldType.string,
// showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit , maxlength: 70, noshowlabel: true }), // showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit , maxlength: 70, noshowlabel: true }),
AddCol({
name: 'username',
label_trans: 'reg.username',
foredit: false,
tipovisu: costanti.TipoVisu.LINK,
fieldtype: costanti.FieldType.username_chip,
link: '/my/username',
noshowlabel: true,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
}),
AddCol({ AddCol({
name: 'adType', name: 'adType',
label_trans: 'adTypes.name', label_trans: 'adTypes.name',
@@ -541,16 +574,13 @@ export const colmySkills = [
icon: 'fas fa-bullhorn', icon: 'fas fa-bullhorn',
noshowlabel: true, noshowlabel: true,
}), }),
AddCol({ name: 'descr', label_trans: 'proj.shortdescr', fieldtype: costanti.FieldType.string,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist, noshowlabel: true, maxlength: 200 }),
AddCol({ AddCol({
name: 'photos', name: 'descr',
label_trans: 'skill.photos', label_trans: 'proj.shortdescr',
fieldtype: costanti.FieldType.listimages, fieldtype: costanti.FieldType.string,
jointable: '', showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
showpicprofile_ifnotset: true, noshowlabel: true,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView, maxlength: 200
visible: true,
}), }),
AddCol({ AddCol({
name: 'idSector', name: 'idSector',
@@ -630,10 +660,154 @@ export const colmySkills = [
remote_key: '_id', remote_key: '_id',
remote_field: 'comune', remote_field: 'comune',
}), }),
AddCol({ name: 'username', label_trans: 'reg.username', foredit: false, tipovisu: costanti.TipoVisu.LINK, link: '/my/username', noshowlabel: true }), AddCol({
AddCol({ name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html, name: 'photos',
label_trans: 'skill.photos',
fieldtype: costanti.FieldType.listimages,
jointable: '',
showpicprofile_ifnotset: true,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
}),
AddCol({
name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '' }), titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: ''
}),
AddCol({ name: 'website', label_trans: 'producer.website' }),
AddCol(DuplicateRec),
AddCol(ModifRec),
AddCol(DeleteRec),
]
export const colmyBachecas = [
/*AddCol({
name: 'userId', label_trans: 'order.users', fieldtype: costanti.FieldType.string, jointable: 'users',
visible: false
}), */
//AddCol({ name: 'name', label_trans: 'reg.name', fieldtype: costanti.FieldType.string }),
//AddCol({ name: 'surname', label_trans: 'reg.surname', fieldtype: costanti.FieldType.string }),
// AddCol({ name: 'subTitle', label_trans: 'event.title', fieldtype: costanti.FieldType.string,
// showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit , maxlength: 70, noshowlabel: true }),
AddCol({
name: 'username',
label_trans: 'reg.username',
foredit: false,
tipovisu: costanti.TipoVisu.LINK,
fieldtype: costanti.FieldType.username_chip,
link: '/my/username',
noshowlabel: true,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
}),
AddCol({
name: 'adType',
label_trans: 'adTypes.name',
fieldtype: costanti.FieldType.select,
required: true,
jointable: 'adtypes',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
icon: 'fas fa-bullhorn',
noshowlabel: true,
}),
AddCol({
name: 'descr',
label_trans: 'proj.shortdescr',
fieldtype: costanti.FieldType.string,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
noshowlabel: true,
maxlength: 200
}),
AddCol({
name: 'idSector',
label_trans: 'sectors.name',
fieldtype: costanti.FieldType.select,
required: true,
jointable: 'sectors',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit,
visible: true,
icon: 'category',
}),
AddCol({
name: 'idSkill',
label_trans: 'skill.name',
fieldtype: costanti.FieldType.select,
required: true,
jointable: 'skills',
filter_table: 'sectors',
filter_field: 'idSector',
noshowlabel: true,
icon: 'engineering',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
allowNewValue: true,
}),
AddCol({
name: 'idSubSkill',
label_trans: 'skill.subskill',
fieldtype: costanti.FieldType.multiselect,
required: false,
jointable: 'subskills',
filter_table: 'skills',
filter_field: 'idSkill',
noshowlabel: true,
icon: 'far fa-id-card',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
allowNewValue: true,
}),
AddCol({
name: 'numLevel',
label_trans: 'level.name',
fieldtype: costanti.FieldType.star3,
required: false,
jointable: 'levels',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
noshowlabel: false,
icon: 'grading',
}),
AddCol({
name: 'idStatusSkill',
label_trans: 'statusSkill.name',
fieldtype: costanti.FieldType.multiselect,
jointable: 'statusSkills',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
noshowlabel: true,
icon: 'mood',
}),
AddCol({
name: 'idContribType',
label_trans: 'contribtype.name',
fieldtype: costanti.FieldType.multiselect,
jointable: 'contribtypes',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
noshowlabel: true,
icon: 'currency_exchange',
//icon: 'fas fa-hands-helping',
}),
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',
}),
AddCol({
name: 'photos',
label_trans: 'skill.photos',
fieldtype: costanti.FieldType.listimages,
jointable: '',
showpicprofile_ifnotset: true,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
}),
AddCol({
name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: ''
}),
AddCol({ name: 'website', label_trans: 'producer.website' }),
AddCol(DuplicateRec), AddCol(DuplicateRec),
AddCol(ModifRec), AddCol(ModifRec),
AddCol(DeleteRec), AddCol(DeleteRec),
@@ -665,7 +839,11 @@ export const colTableSites = [
AddCol({ name: 'telegram_key', label_trans: 'sites.telegram_key', fieldtype: costanti.FieldType.string }), AddCol({ name: 'telegram_key', label_trans: 'sites.telegram_key', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'telegram_bot_name', label_trans: 'sites.telegram_bot_name', fieldtype: costanti.FieldType.string }), AddCol({ name: 'telegram_bot_name', label_trans: 'sites.telegram_bot_name', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'telegram_key_test', label_trans: 'sites.telegram_key_test', fieldtype: costanti.FieldType.string }), AddCol({ name: 'telegram_key_test', label_trans: 'sites.telegram_key_test', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'telegram_bot_name_test', label_trans: 'sites.telegram_bot_name_test', fieldtype: costanti.FieldType.string }), AddCol({
name: 'telegram_bot_name_test',
label_trans: 'sites.telegram_bot_name_test',
fieldtype: costanti.FieldType.string
}),
AddCol({ name: 'pathreg_add', label_trans: 'sites.pathreg_add', fieldtype: costanti.FieldType.string }), AddCol({ name: 'pathreg_add', label_trans: 'sites.pathreg_add', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'ask_to_verify_reg', label_trans: 'sites.ask_to_verify_reg', fieldtype: costanti.FieldType.boolean }), AddCol({ name: 'ask_to_verify_reg', label_trans: 'sites.ask_to_verify_reg', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'who', label_trans: 'sites.who', fieldtype: costanti.FieldType.string }), AddCol({ name: 'who', label_trans: 'sites.who', fieldtype: costanti.FieldType.string }),
@@ -1057,6 +1235,13 @@ export const fieldsTable = {
} else } else
return null return null
}, },
getArrColsByTable(mytable: string) {
const tablerec: any = this.tablesList.find((rec) => rec.value === mytable)
if (tablerec) {
return tablerec.columns
} else
return null
},
getKeyByTable(mytable: string): string { getKeyByTable(mytable: string): string {
const myrec = this.getrecTableList(mytable) const myrec = this.getrecTableList(mytable)
if (myrec) return ((myrec.colkey) ? myrec.colkey : '_id') if (myrec) return ((myrec.colkey) ? myrec.colkey : '_id')
@@ -1340,7 +1525,11 @@ export const fieldsTable = {
AddCol({ name: 'lasttimeonline', label_trans: 'reg.lasttimeonline', fieldtype: costanti.FieldType.date }), AddCol({ name: 'lasttimeonline', label_trans: 'reg.lasttimeonline', fieldtype: costanti.FieldType.date }),
// AddCol({ name: 'idapp', label_trans: 'reg.idapp', fieldtype: costanti.FieldType.string }), // AddCol({ name: 'idapp', label_trans: 'reg.idapp', fieldtype: costanti.FieldType.string }),
AddCol({ AddCol({
name: 'perm', label_trans: 'reg.perm', fieldtype: costanti.FieldType.binary, jointable: 'permissions', titlepopupedit: 'Permessi' name: 'perm',
label_trans: 'reg.perm',
fieldtype: costanti.FieldType.binary,
jointable: 'permissions',
titlepopupedit: 'Permessi'
}), }),
AddCol({ name: 'ipaddr', label_trans: 'reg.ipaddr' }), AddCol({ name: 'ipaddr', label_trans: 'reg.ipaddr' }),
AddCol(DeleteRec), AddCol(DeleteRec),
@@ -1505,7 +1694,11 @@ export const fieldsTable = {
AddCol({ name: 'lasttimeonline', label_trans: 'reg.lasttimeonline', fieldtype: costanti.FieldType.date }), AddCol({ name: 'lasttimeonline', label_trans: 'reg.lasttimeonline', fieldtype: costanti.FieldType.date }),
// AddCol({ name: 'idapp', label_trans: 'reg.idapp', fieldtype: costanti.FieldType.string }), // AddCol({ name: 'idapp', label_trans: 'reg.idapp', fieldtype: costanti.FieldType.string }),
AddCol({ AddCol({
name: 'perm', label_trans: 'reg.perm', fieldtype: costanti.FieldType.binary, jointable: 'permissions', titlepopupedit: 'Permessi' name: 'perm',
label_trans: 'reg.perm',
fieldtype: costanti.FieldType.binary,
jointable: 'permissions',
titlepopupedit: 'Permessi'
}), }),
AddCol({ name: 'ipaddr', label_trans: 'reg.ipaddr' }), AddCol({ name: 'ipaddr', label_trans: 'reg.ipaddr' }),
AddCol({ name: 'deleted', label_trans: 'reg.deleted', fieldtype: costanti.FieldType.boolean }), AddCol({ name: 'deleted', label_trans: 'reg.deleted', fieldtype: costanti.FieldType.boolean }),
@@ -1524,7 +1717,11 @@ export const fieldsTable = {
AddCol({ name: 'verified_email', label_trans: 'reg.verified_email', fieldtype: costanti.FieldType.boolean }), AddCol({ name: 'verified_email', label_trans: 'reg.verified_email', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'note', label_trans: 'reg.note' }), AddCol({ name: 'note', label_trans: 'reg.note' }),
AddCol({ name: 'aportador_solidario', label_trans: 'reg.aportador_solidario' }), AddCol({ name: 'aportador_solidario', label_trans: 'reg.aportador_solidario' }),
AddCol({ name: 'verified_by_aportador', label_trans: 'reg.verified_by_aportador', fieldtype: costanti.FieldType.boolean }), AddCol({
name: 'verified_by_aportador',
label_trans: 'reg.verified_by_aportador',
fieldtype: costanti.FieldType.boolean
}),
AddCol({ name: 'trust_modified', label_trans: 'reg.trust_modified', fieldtype: costanti.FieldType.date }), AddCol({ name: 'trust_modified', label_trans: 'reg.trust_modified', fieldtype: costanti.FieldType.date }),
AddCol({ name: 'blocked', label_trans: 'reg.blocked', fieldtype: costanti.FieldType.boolean }), AddCol({ name: 'blocked', label_trans: 'reg.blocked', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'username_who_block', label_trans: 'reg.username_who_block' }), AddCol({ name: 'username_who_block', label_trans: 'reg.username_who_block' }),
@@ -1661,7 +1858,11 @@ export const fieldsTable = {
AddCol({ name: 'date_reg', label_trans: 'reg.date_reg', fieldtype: costanti.FieldType.date }), AddCol({ name: 'date_reg', label_trans: 'reg.date_reg', fieldtype: costanti.FieldType.date }),
AddCol({ name: 'lasttimeonline', label_trans: 'reg.lasttimeonline', fieldtype: costanti.FieldType.date }), AddCol({ name: 'lasttimeonline', label_trans: 'reg.lasttimeonline', fieldtype: costanti.FieldType.date }),
AddCol({ AddCol({
name: 'perm', label_trans: 'reg.perm', fieldtype: costanti.FieldType.binary, jointable: 'permissions', titlepopupedit: 'Permessi' name: 'perm',
label_trans: 'reg.perm',
fieldtype: costanti.FieldType.binary,
jointable: 'permissions',
titlepopupedit: 'Permessi'
}), }),
AddCol({ name: 'ipaddr', label_trans: 'reg.ipaddr' }), AddCol({ name: 'ipaddr', label_trans: 'reg.ipaddr' }),
AddCol({ name: 'deleted', label_trans: 'reg.deleted', fieldtype: costanti.FieldType.boolean }), AddCol({ name: 'deleted', label_trans: 'reg.deleted', fieldtype: costanti.FieldType.boolean }),
@@ -1723,6 +1924,7 @@ export const fieldsTable = {
tableForUsers: [ tableForUsers: [
'myskills', 'myskills',
'mybachecas',
], ],
tableRemotePickup: [ tableRemotePickup: [
@@ -1733,6 +1935,7 @@ export const fieldsTable = {
tableWithUsername: [ tableWithUsername: [
'myskills', 'myskills',
'mybachecas',
], ],
tablesList: [ tablesList: [
@@ -1982,11 +2185,18 @@ export const fieldsTable = {
collabel: 'key', collabel: 'key',
}, },
{ {
value: 'myskills', value: toolsext.TABMYSKILLS,
label: 'Mie Competenze', label: 'Mie Competenze',
columns: colmySkills, columns: colmySkills,
colkey: '_id', colkey: '_id',
collabel: (rec: any) => `${rec.name} ${rec.surname}`, collabel: (rec: any) => `${rec.descr}`,
},
{
value: toolsext.TABMYBACHECAS,
label: 'Bacheca',
columns: colmyBachecas,
colkey: '_id',
collabel: (rec: any) => `${rec.descr}`,
}, },
{ {
value: 'skills', value: 'skills',

View File

@@ -12,7 +12,7 @@ import {
ITodo, ITodo,
IUserFields, IUserFields,
Privacy, Privacy,
TipoVisu, IGroup, TipoVisu, IGroup, IMySkill, IMyBacheca,
} from '@model' } from '@model'
import { lists } from '@store/Modules/lists' import { lists } from '@store/Modules/lists'
@@ -105,7 +105,6 @@ export const tools = {
'lime', 'lime',
'orange', 'orange',
'deeporange', 'deeporange',
'blue-gray',
'yellow', 'yellow',
], ],
@@ -4899,6 +4898,76 @@ export const tools = {
return userStore.isUserOk() return userStore.isUserOk()
}, },
getParamsByTable(table: string) {
let obj = {
prop_colkey: '',
col_title: '',
col_footer: '',
col_tabfooter: '',
}
if (table === toolsext.TABMYSKILLS) {
obj.prop_colkey = 'idSkill'
obj.col_title = 'descr'
obj.col_footer = 'idCity'
obj.col_tabfooter = 'mycities'
} else if (table === toolsext.TABMYBACHECAS) {
obj.prop_colkey = 'idSkill'
obj.col_title = 'descr'
obj.col_footer = 'idCity'
obj.col_tabfooter = 'mycities'
}
return obj
},
getdefaultnewrec_MySkill(): any {
return {
_id: 0,
idSector: 0,
idSkill: 0,
idSubSkill: [],
idStatusSkill: [],
idContribType: [],
idCity: [],
NumLevel: 0,
adType: 0,
photos: [],
note: '',
descr: '',
}
},
getdefaultnewrec_MyBacheca(): any {
return {
_id: 0,
idSector: 0,
idSkill: 0,
idSubSkill: [],
idStatusSkill: [],
idContribType: [],
idCity: [],
NumLevel: 0,
adType: 0,
photos: [],
note: '',
descr: '',
}
},
getDirectoryByTable(table: string) {
if (table === toolsext.TABMYSKILLS) {
return 'mywork'
} else if (table === toolsext.TABMYBACHECAS) {
return 'mypage'
} else if (table === 'mygroups') {
return 'grp'
}
return ''
},
// getLocale() { // getLocale() {
// if (navigator.languages && navigator.languages.length > 0) { // if (navigator.languages && navigator.languages.length > 0) {

View File

@@ -61,6 +61,7 @@ export const toolsext = {
TABFRIENDS: 'friends', TABFRIENDS: 'friends',
TABMYGROUPS: 'mygroups', TABMYGROUPS: 'mygroups',
TABMYSKILLS: 'myskills', TABMYSKILLS: 'myskills',
TABMYBACHECAS: 'mybachecas',
TABNAVI: 'navi', TABNAVI: 'navi',
TABLISTAINGRESSO: 'listaingressos', TABLISTAINGRESSO: 'listaingressos',
TABGRADUATORIA: 'graduatorias', TABGRADUATORIA: 'graduatorias',

View File

@@ -234,7 +234,6 @@ export const useUserStore = defineStore('UserStore', {
}, },
getImgByProfile(userparam: IUserFields, reale: any = false): string { getImgByProfile(userparam: IUserFields, reale: any = false): string {
try { try {
if (userparam.profile && userparam.profile.img) { if (userparam.profile && userparam.profile.img) {
return costanti.DIR_UPLOAD + 'profile/' + userparam.username + '/' + userparam.profile.img return costanti.DIR_UPLOAD + 'profile/' + userparam.username + '/' + userparam.profile.img
@@ -939,6 +938,21 @@ export const useUserStore = defineStore('UserStore', {
}, },
async loadGeneric(table: string, id: number) {
const data = {
table,
id
}
return Api.SendReq('/mygen/page', 'POST', data)
.then((res) => {
return res.data
}).catch((error) => {
return {}
})
},
async loadFriends(username: string) { async loadFriends(username: string) {
return Api.SendReq('/users/friends', 'POST', null) return Api.SendReq('/users/friends', 'POST', null)
.then((ris) => { .then((ris) => {

View File

@@ -827,6 +827,21 @@ export const useGlobalStore = defineStore('GlobalStore', {
}) })
}, },
async loadPageTest() {
console.log('loadPageTest')
let obj = { test: 'OK! Versione Client: ' + tools.getvers() }
return Api.SendReq('/testServer', 'POST', obj)
.then((res) => {
return res
})
.catch((error) => {
return error
})
},
async saveTable(mydata: any) { async saveTable(mydata: any) {
// console.log('saveTable', mydata) // console.log('saveTable', mydata)
const userStore = useUserStore() const userStore = useUserStore()

View File

View File

@@ -0,0 +1,15 @@
import {
defineComponent, ref, computed,
} from 'vue'
import { CTestServer } from '../../components/CTestServer'
export default defineComponent({
name: 'testServer',
components: { CTestServer },
setup() {
return {
}
},
})

View File

@@ -0,0 +1,13 @@
<template>
<q-page class="">
<CTestServer></CTestServer>
</q-page>
</template>
<script lang="ts" src="./testServer.ts">
</script>
<style lang="scss" scoped>
@import './testServer.scss';
</style>

View File

@@ -0,0 +1,27 @@
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRoute, useRouter } from 'vue-router'
import { useI18n } from '@/boot/i18n'
import { useQuasar } from 'quasar'
import { CMyCardPopup } from '@/components/CMyCardPopup'
import { toolsext } from '@store/Modules/toolsext'
export default defineComponent({
name: 'mypagebacheca',
components: { CMyCardPopup },
props: {},
setup() {
const userStore = useUserStore()
const $route = useRoute()
const $q = useQuasar()
const { t } = useI18n()
const idBacheca = computed(() => $route.params.idBacheca ? $route.params.idBacheca.toString() : 0)
return {
t,
idBacheca,
toolsext,
}
}
})

View File

@@ -0,0 +1,24 @@
<template>
<CMyPage title="Pagina:"
imgbackground="images/calendario_eventi.jpg"
sizes="max-height: 120px" styleadd="bottom: -20px !important;">
<CMyCardPopup
:table="toolsext.TABMYBACHECAS"
:idRec="idBacheca">
</CMyCardPopup>
<br>
<br>
</CMyPage>
</template>
<script lang="ts" src="./mypagebacheca.ts">
</script>
<style lang="scss" scoped>
@import './mypagebacheca.scss';
</style>

View File

@@ -0,0 +1,18 @@
.profile {
width: 100%;
margin: 0 auto;
max-width: 450px;
}
.myrow{
display: flex;
@media (max-width: 600px) {
flex-flow: column;
}
}
.qualifica{
border: solid 2px #4198ef;
border-radius: 1rem;
padding: 5px;
}

View File

@@ -21,7 +21,7 @@ import { colCitys } from '@store/Modules/fieldsTable'
export default defineComponent({ export default defineComponent({
name: 'myuser', name: 'mywork',
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime, CMyPage }, components: { CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime, CMyPage },
props: {}, props: {},
setup() { setup() {
@@ -33,6 +33,8 @@ export default defineComponent({
const animation = ref('fade') const animation = ref('fade')
const table = ref(toolsext.TABMYSKILLS)
const idSkill = computed(() => $route.params.idSkill ? $route.params.idSkill.toString() : 0) const idSkill = computed(() => $route.params.idSkill ? $route.params.idSkill.toString() : 0)
const filtroutente = ref(<any[]>[]) const filtroutente = ref(<any[]>[])
@@ -94,6 +96,7 @@ export default defineComponent({
animation, animation,
fieldsTable, fieldsTable,
colCitys, colCitys,
table,
} }
} }
}) })

View File

@@ -16,6 +16,7 @@
<div class="row justify-evenly"> <div class="row justify-evenly">
<CSkill <CSkill
:table="table"
:filtercustom="filtroutente" :filtercustom="filtroutente"
:visuinpage="true" :visuinpage="true"
> >
@@ -46,10 +47,10 @@
</CMyPage> </CMyPage>
</template> </template>
<script lang="ts" src="./mypageskill.ts"> <script lang="ts" src="./mywork.ts">
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import './mypageskill.scss'; @import './mywork.scss';
</style> </style>