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:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -29,7 +29,29 @@
|
||||
<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.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 side>
|
||||
|
||||
@@ -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(<IColGridTable>{})
|
||||
|
||||
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,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -26,16 +26,16 @@
|
||||
|
||||
<CGridTableRec
|
||||
v-if="searchList.length > 0"
|
||||
prop_mytable="myskills"
|
||||
:prop_mytable="table"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="colmySkills"
|
||||
prop_colkey="idSkill"
|
||||
col_title="descr"
|
||||
col_footer="idCity"
|
||||
col_tabfooter="mycities"
|
||||
:prop_mycolumns="col"
|
||||
:prop_colkey="prop_colkey"
|
||||
:col_title="col_title"
|
||||
:col_footer="col_footer"
|
||||
:col_tabfooter="col_tabfooter"
|
||||
:vertical="costanti.VISUTABLE_LISTA"
|
||||
:showType="costanti.SHOW_MYSKILL"
|
||||
:nodataLabel="idSector > 0 ? 'Nessuna Competenza trovata': 'Selezionare un Settore'"
|
||||
:showType="costanti.SHOW_MYCARD"
|
||||
:nodataLabel="'Nessuna Competenza trovata'"
|
||||
:prop_search="true"
|
||||
:finder="true"
|
||||
:choose_visutype="$q.screen.gt.xs"
|
||||
|
||||
@@ -389,6 +389,7 @@ export default defineComponent({
|
||||
fullscreensrc,
|
||||
onRejected,
|
||||
isListImgValid,
|
||||
costanti,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
<!--<div class="q-pa-md items-start " style="display: inline-flex; width: 800px;"> -->
|
||||
|
||||
<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">
|
||||
<div v-for="(mygallery, index) in getlistimages()" :key="index">
|
||||
<div v-if="index === 0">
|
||||
AA
|
||||
<q-img
|
||||
:src="getsrcimg(mygallery)" :class="getclimg()"
|
||||
:alt="mygallery.alt">
|
||||
@@ -19,7 +18,8 @@
|
||||
</div>
|
||||
</q-card>
|
||||
<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
|
||||
:src="imagebak" :class="getclimg()">
|
||||
</q-img>
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -313,13 +313,14 @@
|
||||
</template>
|
||||
|
||||
<template v-slot:item="props">
|
||||
<div v-if="showType === costanti.SHOW_MYSKILL || (myvertical === costanti.VISUTABLE_LISTA && tablesel === 'myskills') ">
|
||||
<CMySkill
|
||||
:prop_myskill="props.row"
|
||||
<div v-if="showType === costanti.SHOW_MYCARD || (myvertical === costanti.VISUTABLE_LISTA && shared_consts.TABLES_VISU_CMYSRECCARD.includes(tablesel)) ">
|
||||
<CMyRecCard
|
||||
:table="tablesel"
|
||||
:prop_myrec="props.row"
|
||||
@cmdext="cmdExt"
|
||||
:visu="visufind"
|
||||
>
|
||||
</CMySkill>
|
||||
</CMyRecCard>
|
||||
|
||||
</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">
|
||||
@@ -394,7 +395,6 @@
|
||||
<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))"
|
||||
:class="clByCol(col)" class="riduci_pad">
|
||||
|
||||
<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-section>
|
||||
@@ -406,6 +406,7 @@
|
||||
<div class="tdclass">
|
||||
<div :class="getclrow(props.row)">
|
||||
|
||||
|
||||
<CMyPopupEdit
|
||||
:table="mytable"
|
||||
:canEdit="canEdit"
|
||||
@@ -433,6 +434,14 @@
|
||||
</template>
|
||||
</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">
|
||||
|
||||
<CTitleBanner title="Record:"></CTitleBanner>
|
||||
@@ -450,7 +459,7 @@
|
||||
</q-field>
|
||||
</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">
|
||||
<CMyPopupEdit
|
||||
:table="mytable"
|
||||
@@ -475,7 +484,7 @@
|
||||
</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-bar dense class="bg-primary text-white">
|
||||
Nuovo:
|
||||
@@ -517,9 +526,9 @@
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</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-bar dense class="bg-primary text-white full-height">
|
||||
<q-bar dense class="bg-primary text-white">
|
||||
<span class="ellipsis">{{ recModif[col_title] }}</span>
|
||||
<q-space/>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
<CBigBtn
|
||||
label="Bacheca" to="/bacheca" icon="fas fa-bullhorn" color="blue">
|
||||
</CBigBtn>
|
||||
<CBigBtn
|
||||
label="Lavoro" to="/work" icon="fas fa-briefcase" color="blue">
|
||||
</CBigBtn>
|
||||
<CBigBtn
|
||||
label="Scuola" to="/school" icon="fas fa-book-reader" color="orange" disable>
|
||||
</CBigBtn>
|
||||
|
||||
34
src/components/CMyCardPopup/CMyCardPopup.scss
Normal file
34
src/components/CMyCardPopup/CMyCardPopup.scss
Normal 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;
|
||||
|
||||
}
|
||||
95
src/components/CMyCardPopup/CMyCardPopup.ts
Normal file
95
src/components/CMyCardPopup/CMyCardPopup.ts
Normal 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,
|
||||
}
|
||||
}
|
||||
})
|
||||
59
src/components/CMyCardPopup/CMyCardPopup.vue
Normal file
59
src/components/CMyCardPopup/CMyCardPopup.vue
Normal 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>
|
||||
|
||||
1
src/components/CMyCardPopup/index.ts
Normal file
1
src/components/CMyCardPopup/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { default as CMyCardPopup } from './CMyCardPopup.vue'
|
||||
@@ -20,7 +20,7 @@
|
||||
</q-field>
|
||||
</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
|
||||
v-bind="$attrs"
|
||||
:title="title"
|
||||
|
||||
@@ -46,18 +46,13 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
columns: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
disable: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
type: [String, Number],
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
@@ -99,8 +94,9 @@ export default defineComponent({
|
||||
keytab.value = fieldsTable.getKeyByTable(props.table)
|
||||
optlab.value = fieldsTable.getLabelByTable(props.table)
|
||||
// recordCol.value = fieldsTable.getrecTableList(props.table)
|
||||
if (props.columns) {
|
||||
col.value = props.columns.find((col: any) => col.name === props.field)
|
||||
let columns = fieldsTable.getArrColsByTable(props.table)
|
||||
if (columns) {
|
||||
col.value = columns.find((col: any) => col.field === props.field)
|
||||
} else {
|
||||
col.value = fieldsTable.getColByTable(props.table, props.field)
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="text-center">
|
||||
<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;">
|
||||
<template v-slot:control>
|
||||
<div class="centermydiv">
|
||||
@@ -20,7 +20,7 @@
|
||||
</q-field>
|
||||
</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
|
||||
v-bind="$attrs"
|
||||
:isrec="true"
|
||||
@@ -38,7 +38,7 @@
|
||||
:canEdit="canEdit"
|
||||
:id="id"
|
||||
:idmain="idmain"
|
||||
:visulabel="true"
|
||||
:visulabel="!!mytitle"
|
||||
:mycol="col"
|
||||
:tablesel="tablesel"
|
||||
:pickup="pickup"
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
<div v-if="tools.isUserOk()">
|
||||
<div v-if="grp">
|
||||
<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-img :src="getImgGroup(grp)" :alt="grp.groupname" img-class="imgprofile" height="60px"/>
|
||||
</q-avatar>
|
||||
</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>
|
||||
<q-item-label v-if="grp.descr" caption lines="1"><em>{{ grp.descr }}</em></q-item-label>
|
||||
|
||||
@@ -22,6 +22,8 @@ import { costanti } from '@costanti'
|
||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||
import MixinBase from '@/mixins/mixin-base'
|
||||
import MixinUsers from '@/mixins/mixin-users'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyPopupEdit',
|
||||
@@ -657,8 +659,8 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function getToByCol(col: IColGridTable){
|
||||
if (props.table === 'myskills') {
|
||||
return '/mypage/'+ props.row['_id']
|
||||
if (shared_consts.TABLES_REC_ID.includes(props.table)) {
|
||||
return '/' + tools.getDirectoryByTable(props.table) + '/' + props.row['_id']
|
||||
} else if (props.table === 'mygroups') {
|
||||
return '/grp/' + props.row['groupname']
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<template>
|
||||
<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
|
||||
:class="{ flex: !isInModif, 'justify-center': true }">
|
||||
<div>
|
||||
@@ -30,6 +32,25 @@
|
||||
@update:model-value="Savedb"></q-toggle>
|
||||
</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-if="visulabel || isInModif" :class="{ flex: !isInModif}">
|
||||
<q-input
|
||||
@@ -53,7 +74,8 @@
|
||||
<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)"
|
||||
color="white" text-color="blue" :icon="`img:`+userStore.getImgUserByUsername(myvalue)"
|
||||
:to="col.link.replace(col.name, myvalue)"
|
||||
:label="myvalue"
|
||||
>
|
||||
</q-btn>
|
||||
@@ -108,7 +130,7 @@
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.listimages" style="text-align: center;">
|
||||
<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()"
|
||||
:directory="getDirectoryGall()"
|
||||
:imgGall="myvalue"
|
||||
@@ -145,7 +167,7 @@
|
||||
</div>
|
||||
<div v-else class="text-center">
|
||||
<q-img
|
||||
src="images/noimg-user.svg"
|
||||
:src="col.showpicprofile_ifnotset ? userStore.getImgByProfile(row['profile'], true) : 'images/noimg-user.svg'"
|
||||
class="text-center"
|
||||
style="height: 100px; width: 100px;"
|
||||
alt="nessuna immagine">
|
||||
@@ -418,7 +440,9 @@
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.html">
|
||||
<div v-if="isInModif">
|
||||
<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-bar>
|
||||
<div v-if="!isFieldDb()">
|
||||
@@ -517,7 +541,8 @@
|
||||
</q-checkbox>
|
||||
<span v-html="visuValByType(myvalue, col, row)"></span>
|
||||
</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
|
||||
v-bind="$attrs"
|
||||
counter
|
||||
@@ -733,7 +758,8 @@
|
||||
@showandsave="Savedb">
|
||||
</CMyEditor>
|
||||
</div>
|
||||
</div> </q-popup-edit>
|
||||
</div>
|
||||
</q-popup-edit>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,20 +1,26 @@
|
||||
import { defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { IImgGallery, IMySkill, IUserFields, IUserProfile } from 'model'
|
||||
import { IImgGallery, IUserFields, IUserProfile } from 'model'
|
||||
import { costanti } from '@costanti'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { CMyCardPopup } from '@/components/CMyCardPopup'
|
||||
// import { useRouter } from 'vue-router'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMySkill',
|
||||
name: 'CMyRecCard',
|
||||
components: { CMyCardPopup },
|
||||
emits: ['setCmd', 'cmdext'],
|
||||
props: {
|
||||
prop_myskill: {
|
||||
type: Object as PropType<IMySkill | null>,
|
||||
table: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
prop_myrec: {
|
||||
type: Object as PropType<any | null>,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
@@ -23,23 +29,22 @@ export default defineComponent({
|
||||
setup(props, { emit }) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
const $q = useQuasar()
|
||||
// const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const $router = useRouter()
|
||||
const $route = useRoute()
|
||||
// const $router = useRouter()
|
||||
|
||||
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()
|
||||
})
|
||||
|
||||
function mounted() {
|
||||
if (props.prop_myskill) {
|
||||
myskill.value = props.prop_myskill
|
||||
if (props.prop_myrec) {
|
||||
myrec.value = props.prop_myrec
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,9 +52,9 @@ export default defineComponent({
|
||||
return userStore.getImgByProfile(profile)
|
||||
}
|
||||
|
||||
function naviga(path: string) {
|
||||
/*function naviga(path: string) {
|
||||
$router.push(path)
|
||||
}
|
||||
}*/
|
||||
|
||||
function setCmd($q: any, cmd: number, myusername: string, value: any, groupname: string) {
|
||||
emit('setCmd', $q, cmd, myusername, value, groupname)
|
||||
@@ -62,16 +67,18 @@ export default defineComponent({
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
myskill,
|
||||
t,
|
||||
myrec,
|
||||
costanti,
|
||||
getImgUser,
|
||||
naviga,
|
||||
// naviga,
|
||||
setCmd,
|
||||
shared_consts,
|
||||
userStore,
|
||||
tools,
|
||||
fieldsTable,
|
||||
cmdExt,
|
||||
visupage,
|
||||
}
|
||||
},
|
||||
})
|
||||
@@ -1,48 +1,48 @@
|
||||
<template>
|
||||
<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-section avatar @click="naviga(`/my/` + myskill.username)">
|
||||
<q-badge class="q-my-xs self-center" :color="fieldsTable.getColByAdType(myskill.adType)">
|
||||
{{ fieldsTable.getValByTabAndId('myskills', 'adType', myskill.adType) }}
|
||||
<q-icon :name="fieldsTable.getIconByAdType(myskill.adType)" color="white"
|
||||
<q-item v-if="myrec" clickable v-ripple class="shadow-2 q-btn--rounded bg-teal-1">
|
||||
<q-item-section avatar @click="naviga(`/my/` + myrec.username)">
|
||||
<q-badge class="q-my-xs self-center" :color="fieldsTable.getColByAdType(myrec.adType)">
|
||||
{{ fieldsTable.getValByTabAndId(table, 'adType', myrec.adType) }}
|
||||
<q-icon :name="fieldsTable.getIconByAdType(myrec.adType)" color="white"
|
||||
class="q-ml-xs"/>
|
||||
</q-badge>
|
||||
<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-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">
|
||||
<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
|
||||
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
|
||||
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 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 overline lines="1" style="text-align: right">
|
||||
<span class="text-weight-bold">{{ myskill.username }}</span> -
|
||||
<span v-for="(rec, ind) of myskill.mycities" :key="ind"><span v-if="ind > 0">, </span>{{ rec.comune }}</span>
|
||||
<span class="text-weight-bold">{{ myrec.username }}</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-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-btn rounded icon="fas fa-ellipsis-h">
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<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>
|
||||
</q-list>
|
||||
<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>
|
||||
</q-list>
|
||||
@@ -51,16 +51,15 @@
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
|
||||
</q-item>
|
||||
<q-separator inset="item"/>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMySkill.ts">
|
||||
<script lang="ts" src="./CMyRecCard.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CMySkill.scss';
|
||||
@import './CMyRecCard.scss';
|
||||
</style>
|
||||
1
src/components/CMyRecCard/index.ts
Executable file
1
src/components/CMyRecCard/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export { default as CMyRecCard } from './CMyRecCard.vue'
|
||||
@@ -1 +0,0 @@
|
||||
export { default as CMySkill } from './CMySkill.vue'
|
||||
@@ -9,11 +9,17 @@ import { useGlobalStore } from '@store/globalStore'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { colmySkills } from '@store/Modules/fieldsTable'
|
||||
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({
|
||||
name: 'CSkill',
|
||||
props: {
|
||||
table: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
defaultnewrec: {
|
||||
type: Function,
|
||||
required: false,
|
||||
@@ -40,28 +46,30 @@ export default defineComponent({
|
||||
CMyFieldDb, CGridTableRec,
|
||||
},
|
||||
setup(props, { attrs, slots, emit }) {
|
||||
const mytable = 'users'
|
||||
const globalStore = useGlobalStore()
|
||||
const userStore = useUserStore()
|
||||
|
||||
const table = ref(toolsext.TABMYSKILLS)
|
||||
|
||||
function getdefaultnewrec(): IMySkill {
|
||||
return {
|
||||
_id: 0,
|
||||
idSector: 0,
|
||||
idSkill: 0,
|
||||
idSubSkill: [],
|
||||
idStatusSkill: [],
|
||||
idContribType: [],
|
||||
idCity: [],
|
||||
NumLevel: 0,
|
||||
adType: 0,
|
||||
photos: [],
|
||||
note: '',
|
||||
descr: '',
|
||||
}
|
||||
}
|
||||
const col = ref(<IColGridTable>{})
|
||||
|
||||
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() {
|
||||
let lk_tab = 'users'
|
||||
@@ -178,7 +186,7 @@ export default defineComponent({
|
||||
lk_tab: 'subskills',
|
||||
lk_LF: 'idSubSkill',
|
||||
lk_FF: '_id',
|
||||
lk_as: 'myskill',
|
||||
lk_as: 'myrec',
|
||||
af_objId_tab: '',
|
||||
},
|
||||
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 {
|
||||
tools,
|
||||
costanti,
|
||||
colmySkills,
|
||||
getdefaultnewrec,
|
||||
extraparams,
|
||||
fieldsTable,
|
||||
col,
|
||||
prop_colkey,
|
||||
col_title,
|
||||
col_footer,
|
||||
col_tabfooter,
|
||||
getdefaultnewrec,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
<div>
|
||||
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||
<CGridTableRec
|
||||
v-if="filtercustom.length > 0"
|
||||
prop_mytable="myskills"
|
||||
v-if="filtercustom.length > 0 && col && col.length > 0"
|
||||
:prop_mytable="table"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="colmySkills"
|
||||
prop_colkey="idSkill"
|
||||
col_title="descr"
|
||||
col_footer="idCity"
|
||||
:prop_mycolumns="col"
|
||||
:prop_colkey="prop_colkey"
|
||||
:col_title="col_title"
|
||||
:col_footer="col_footer"
|
||||
:vertical="-1"
|
||||
:choose_visutype="!visuinpage"
|
||||
:butt_modif_new="!visuinpage"
|
||||
nodataLabel="Nessuna Competenza inserita"
|
||||
nodataLabel="Nessun dato presente"
|
||||
:prop_search="false"
|
||||
:visuinpage="visuinpage"
|
||||
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
|
||||
|
||||
29
src/components/CTestServer/CTestServer.scss
Executable file
29
src/components/CTestServer/CTestServer.scss
Executable 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;
|
||||
}
|
||||
44
src/components/CTestServer/CTestServer.ts
Executable file
44
src/components/CTestServer/CTestServer.ts
Executable 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,
|
||||
}
|
||||
},
|
||||
})
|
||||
25
src/components/CTestServer/CTestServer.vue
Executable file
25
src/components/CTestServer/CTestServer.vue
Executable 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>
|
||||
1
src/components/CTestServer/index.ts
Executable file
1
src/components/CTestServer/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export { default as CTestServer } from './CTestServer.vue'
|
||||
@@ -98,11 +98,6 @@
|
||||
</div>-->
|
||||
|
||||
<!-- 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
|
||||
class="q-mx-xs" v-if="static_data.functionality.ENABLE_ECOMMERCE && isLogged()" round dense flat
|
||||
@@ -114,7 +109,7 @@
|
||||
</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
|
||||
to="/orderinfo" icon="fas fa-list-ol">
|
||||
|
||||
@@ -123,18 +118,16 @@
|
||||
</q-badge>
|
||||
</q-btn>
|
||||
|
||||
<!--<q-avatar v-if="static_data.functionality.SHOW_USER_MENU && isLogged()"
|
||||
size="30px"
|
||||
@click="rightDrawerOpen = !rightDrawerOpen" :color="getcolormenu()">
|
||||
<q-img :src="getMyImgforIcon()" :alt="Username()" img-class=""/>
|
||||
</q-avatar>-->
|
||||
|
||||
|
||||
<q-avatar v-if="static_data.functionality.SHOW_USER_MENU && isLogged() && getMyImg()"
|
||||
<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-avatar v-else-if="static_data.functionality.SHOW_USER_MENU && isLogged() && getMyImg()"
|
||||
size="36px" class="center_img cursor-pointer"
|
||||
@click="rightDrawerOpen = !rightDrawerOpen">
|
||||
<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-btn
|
||||
v-else
|
||||
|
||||
@@ -32,6 +32,7 @@ export * from './logo'
|
||||
export * from './testpao'
|
||||
export * from './CEventsCalendar'
|
||||
export * from './CMySingleEvent'
|
||||
export * from './CMyCardPopup'
|
||||
// export * from './PagePolicy'
|
||||
export * from './CFacebookFrame'
|
||||
export * from './CVerifyEmail'
|
||||
@@ -42,5 +43,5 @@ export * from './CMyGroups'
|
||||
export * from './CDashboard'
|
||||
export * from './CMainView'
|
||||
export * from './CBigBtn'
|
||||
export * from './CMySkill'
|
||||
export * from './CMyRecCard'
|
||||
// export * from './CPreloadImages'
|
||||
|
||||
@@ -948,3 +948,8 @@ $heightBtn: 100%;
|
||||
.no-padding{
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.popupedit{
|
||||
// border: 1px solid #bbb;
|
||||
border-radius: $generic-border-radius
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ const msg_website_it = {
|
||||
profile: 'Profilo',
|
||||
profile2: 'ProfiloU',
|
||||
mypage2: 'mypage2',
|
||||
mywork2: 'mywork2',
|
||||
test: 'Test',
|
||||
projects: 'Progetti',
|
||||
report: 'Report Ore',
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -691,3 +691,20 @@ export interface IMySkill {
|
||||
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,
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ export interface IMyGroup {
|
||||
export interface ICalcStat {
|
||||
numUsersReg: number
|
||||
numMySkills: number
|
||||
numMyBachecas: number
|
||||
numGroups: number
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import {
|
||||
} 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'
|
||||
@@ -17,6 +18,7 @@ import { static_data } from '@/db/static_data'
|
||||
import MixinBase from '@/mixins/mixin-base'
|
||||
import MixinUsers from '@/mixins/mixin-users'
|
||||
|
||||
import { colmyBachecas } from '@store/Modules/fieldsTable'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'bacheca',
|
||||
@@ -51,7 +53,9 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
return {
|
||||
colmyBachecas,
|
||||
tools,
|
||||
toolsext,
|
||||
static_data,
|
||||
isEmailVerified,
|
||||
TelegCode,
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
<div v-if="isUserOk()">
|
||||
|
||||
<CFinder>
|
||||
<CFinder
|
||||
:table="toolsext.TABMYBACHECAS">
|
||||
|
||||
</CFinder>
|
||||
|
||||
|
||||
0
src/root/work/work.scss
Executable file
0
src/root/work/work.scss
Executable file
71
src/root/work/work.ts
Executable file
71
src/root/work/work.ts
Executable 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
28
src/root/work/work.vue
Executable 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>
|
||||
@@ -878,6 +878,8 @@ const msg_it = {
|
||||
create_group: 'Crea Gruppo',
|
||||
friends: 'Amici',
|
||||
bacheca: 'Bacheca',
|
||||
work: 'Lavoro',
|
||||
test: 'Test',
|
||||
groups: 'Gruppi',
|
||||
request_friends: 'Rich. Amicizia',
|
||||
request_sent_friends: 'Rich. Inviate',
|
||||
|
||||
@@ -10,7 +10,7 @@ export const costanti = {
|
||||
|
||||
SHOW_USERINFO: 1,
|
||||
SHOW_GROUPINFO: 5,
|
||||
SHOW_MYSKILL: 10,
|
||||
SHOW_MYCARD: 10,
|
||||
|
||||
BINARY_CHECK: 1,
|
||||
|
||||
@@ -42,6 +42,7 @@ export const costanti = {
|
||||
|
||||
CMD_DELETE: 1,
|
||||
CMD_MODIFY: 2,
|
||||
CMD_SHOW_PAGE: 3,
|
||||
|
||||
SHOW_ALL: 50,
|
||||
|
||||
@@ -61,6 +62,8 @@ export const costanti = {
|
||||
|
||||
ALLOWCHAR_CODE: 1,
|
||||
|
||||
NESSUN_IMMAGINE: 'none',
|
||||
|
||||
showWhen: {
|
||||
NewRec: 1,
|
||||
InPage: 2,
|
||||
@@ -106,6 +109,7 @@ export const costanti = {
|
||||
crypted: 9000,
|
||||
object: 10000,
|
||||
separator: 11000,
|
||||
username_chip: 12000,
|
||||
},
|
||||
|
||||
FieldTypeArr: [
|
||||
|
||||
@@ -3,6 +3,7 @@ import { useUserStore } from '@store/UserStore'
|
||||
import { lists } from './lists'
|
||||
import { costanti } from './costanti'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
|
||||
const DeleteRec = {
|
||||
name: 'deleterec',
|
||||
@@ -177,7 +178,12 @@ export const colmybot = [
|
||||
AddCol({ name: 'label', label_trans: 'bot.label' }),
|
||||
AddCol({ name: 'type', label_trans: 'bot.type', fieldtype: costanti.FieldType.select, jointable: 'bottype' }),
|
||||
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(DeleteRec),
|
||||
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_end', label_trans: 'hours.time_end', fieldtype: costanti.FieldType.number }),
|
||||
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(DuplicateRec),
|
||||
]
|
||||
@@ -403,14 +413,18 @@ export const colTablePhones = [
|
||||
|
||||
export const colTableUsersGeneric = [
|
||||
AddCol({ name: 'username', label_trans: 'reg.username_short' }),
|
||||
AddCol({ name: 'date', label_trans: 'reg.date', fieldtype: costanti.FieldType.onlydate,
|
||||
showWhen: costanti.showWhen.InPage + costanti.showWhen.InView_OnlyifExist }),
|
||||
AddCol({
|
||||
name: 'date', label_trans: 'reg.date', fieldtype: costanti.FieldType.onlydate,
|
||||
showWhen: costanti.showWhen.InPage + costanti.showWhen.InView_OnlyifExist
|
||||
}),
|
||||
]
|
||||
|
||||
export const colTableMyGroup = [
|
||||
AddCol({ name: 'groupname', label_trans: 'reg.groupname' }),
|
||||
AddCol({ name: 'date', label_trans: 'reg.date', fieldtype: costanti.FieldType.onlydate,
|
||||
showWhen: costanti.showWhen.InPage + costanti.showWhen.InView_OnlyifExist }),
|
||||
AddCol({
|
||||
name: 'date', label_trans: 'reg.date', fieldtype: costanti.FieldType.onlydate,
|
||||
showWhen: costanti.showWhen.InPage + costanti.showWhen.InView_OnlyifExist
|
||||
}),
|
||||
]
|
||||
|
||||
export const colSkills = [
|
||||
@@ -461,7 +475,8 @@ export const colmyUserPeople = [
|
||||
|
||||
export const colmyUserGroup = [
|
||||
// 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,
|
||||
allowchar: costanti.ALLOWCHAR_CODE,
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
|
||||
@@ -478,10 +493,15 @@ export const colmyUserGroup = [
|
||||
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,
|
||||
}),
|
||||
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,
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit,
|
||||
}),
|
||||
@@ -497,7 +517,7 @@ export const colmyUserGroup = [
|
||||
label_trans: 'skill.photos',
|
||||
fieldtype: costanti.FieldType.listimages,
|
||||
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({
|
||||
name: 'idCity',
|
||||
@@ -512,16 +532,19 @@ export const colmyUserGroup = [
|
||||
remote_key: '_id',
|
||||
remote_field: 'comune',
|
||||
}),
|
||||
AddCol({ name: 'date_created', label_trans: 'reg.date_created', fieldtype: costanti.FieldType.onlydate,
|
||||
showWhen: costanti.showWhen.InPage + costanti.showWhen.InView_OnlyifExist }),
|
||||
AddCol({ name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html,
|
||||
titlepopupedit: 'Dettagli', field_extra1: 'groupname', subfield_extra1: '' }),
|
||||
AddCol({
|
||||
name: 'date_created', label_trans: 'reg.date_created', fieldtype: costanti.FieldType.onlydate,
|
||||
showWhen: costanti.showWhen.InPage + costanti.showWhen.InView_OnlyifExist
|
||||
}),
|
||||
AddCol({
|
||||
name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html,
|
||||
titlepopupedit: 'Dettagli', field_extra1: 'groupname', subfield_extra1: ''
|
||||
}),
|
||||
AddCol(ModifRec),
|
||||
AddCol(DeleteRec),
|
||||
]
|
||||
|
||||
|
||||
|
||||
export const colmySkills = [
|
||||
/*AddCol({
|
||||
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: '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',
|
||||
@@ -541,16 +574,13 @@ export const colmySkills = [
|
||||
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: '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,
|
||||
visible: true,
|
||||
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',
|
||||
@@ -630,10 +660,154 @@ export const colmySkills = [
|
||||
remote_key: '_id',
|
||||
remote_field: 'comune',
|
||||
}),
|
||||
AddCol({ name: 'username', label_trans: 'reg.username', foredit: false, tipovisu: costanti.TipoVisu.LINK, link: '/my/username', noshowlabel: true }),
|
||||
AddCol({ name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html,
|
||||
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: '' }),
|
||||
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(ModifRec),
|
||||
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_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_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: '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 }),
|
||||
@@ -1057,6 +1235,13 @@ export const fieldsTable = {
|
||||
} else
|
||||
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 {
|
||||
const myrec = this.getrecTableList(mytable)
|
||||
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: 'idapp', label_trans: 'reg.idapp', fieldtype: costanti.FieldType.string }),
|
||||
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(DeleteRec),
|
||||
@@ -1505,7 +1694,11 @@ export const fieldsTable = {
|
||||
AddCol({ name: 'lasttimeonline', label_trans: 'reg.lasttimeonline', fieldtype: costanti.FieldType.date }),
|
||||
// AddCol({ name: 'idapp', label_trans: 'reg.idapp', fieldtype: costanti.FieldType.string }),
|
||||
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: '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: 'note', label_trans: 'reg.note' }),
|
||||
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: 'blocked', label_trans: 'reg.blocked', fieldtype: costanti.FieldType.boolean }),
|
||||
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: 'lasttimeonline', label_trans: 'reg.lasttimeonline', fieldtype: costanti.FieldType.date }),
|
||||
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: 'deleted', label_trans: 'reg.deleted', fieldtype: costanti.FieldType.boolean }),
|
||||
@@ -1723,6 +1924,7 @@ export const fieldsTable = {
|
||||
|
||||
tableForUsers: [
|
||||
'myskills',
|
||||
'mybachecas',
|
||||
],
|
||||
|
||||
tableRemotePickup: [
|
||||
@@ -1733,6 +1935,7 @@ export const fieldsTable = {
|
||||
|
||||
tableWithUsername: [
|
||||
'myskills',
|
||||
'mybachecas',
|
||||
],
|
||||
|
||||
tablesList: [
|
||||
@@ -1982,11 +2185,18 @@ export const fieldsTable = {
|
||||
collabel: 'key',
|
||||
},
|
||||
{
|
||||
value: 'myskills',
|
||||
value: toolsext.TABMYSKILLS,
|
||||
label: 'Mie Competenze',
|
||||
columns: colmySkills,
|
||||
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',
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
ITodo,
|
||||
IUserFields,
|
||||
Privacy,
|
||||
TipoVisu, IGroup,
|
||||
TipoVisu, IGroup, IMySkill, IMyBacheca,
|
||||
} from '@model'
|
||||
|
||||
import { lists } from '@store/Modules/lists'
|
||||
@@ -105,7 +105,6 @@ export const tools = {
|
||||
'lime',
|
||||
'orange',
|
||||
'deeporange',
|
||||
'blue-gray',
|
||||
'yellow',
|
||||
],
|
||||
|
||||
@@ -4894,11 +4893,81 @@ export const tools = {
|
||||
return Array.isArray(val)
|
||||
},
|
||||
|
||||
isUserOk(){
|
||||
isUserOk() {
|
||||
const userStore = useUserStore()
|
||||
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() {
|
||||
// if (navigator.languages && navigator.languages.length > 0) {
|
||||
|
||||
@@ -61,6 +61,7 @@ export const toolsext = {
|
||||
TABFRIENDS: 'friends',
|
||||
TABMYGROUPS: 'mygroups',
|
||||
TABMYSKILLS: 'myskills',
|
||||
TABMYBACHECAS: 'mybachecas',
|
||||
TABNAVI: 'navi',
|
||||
TABLISTAINGRESSO: 'listaingressos',
|
||||
TABGRADUATORIA: 'graduatorias',
|
||||
|
||||
@@ -234,7 +234,6 @@ export const useUserStore = defineStore('UserStore', {
|
||||
},
|
||||
|
||||
getImgByProfile(userparam: IUserFields, reale: any = false): string {
|
||||
|
||||
try {
|
||||
if (userparam.profile && 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) {
|
||||
return Api.SendReq('/users/friends', 'POST', null)
|
||||
.then((ris) => {
|
||||
|
||||
@@ -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) {
|
||||
// console.log('saveTable', mydata)
|
||||
const userStore = useUserStore()
|
||||
|
||||
0
src/views/testServer/testServer.scss
Executable file
0
src/views/testServer/testServer.scss
Executable file
15
src/views/testServer/testServer.ts
Executable file
15
src/views/testServer/testServer.ts
Executable 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 {
|
||||
}
|
||||
},
|
||||
})
|
||||
13
src/views/testServer/testServer.vue
Executable file
13
src/views/testServer/testServer.vue
Executable 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>
|
||||
27
src/views/user/mypagebacheca/mypagebacheca.ts
Executable file
27
src/views/user/mypagebacheca/mypagebacheca.ts
Executable 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,
|
||||
}
|
||||
}
|
||||
})
|
||||
24
src/views/user/mypagebacheca/mypagebacheca.vue
Executable file
24
src/views/user/mypagebacheca/mypagebacheca.vue
Executable 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>
|
||||
|
||||
18
src/views/user/mywork/mywork.scss
Executable file
18
src/views/user/mywork/mywork.scss
Executable 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;
|
||||
}
|
||||
@@ -21,7 +21,7 @@ import { colCitys } from '@store/Modules/fieldsTable'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
name: 'myuser',
|
||||
name: 'mywork',
|
||||
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime, CMyPage },
|
||||
props: {},
|
||||
setup() {
|
||||
@@ -33,6 +33,8 @@ export default defineComponent({
|
||||
|
||||
const animation = ref('fade')
|
||||
|
||||
const table = ref(toolsext.TABMYSKILLS)
|
||||
|
||||
const idSkill = computed(() => $route.params.idSkill ? $route.params.idSkill.toString() : 0)
|
||||
|
||||
const filtroutente = ref(<any[]>[])
|
||||
@@ -94,6 +96,7 @@ export default defineComponent({
|
||||
animation,
|
||||
fieldsTable,
|
||||
colCitys,
|
||||
table,
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
<div class="row justify-evenly">
|
||||
<CSkill
|
||||
:table="table"
|
||||
:filtercustom="filtroutente"
|
||||
:visuinpage="true"
|
||||
>
|
||||
@@ -46,10 +47,10 @@
|
||||
</CMyPage>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./mypageskill.ts">
|
||||
<script lang="ts" src="./mywork.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './mypageskill.scss';
|
||||
@import './mywork.scss';
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user