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

@@ -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,

View File

@@ -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>

View File

@@ -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,
}
},
})

View File

@@ -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"

View File

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

View File

@@ -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>

View File

@@ -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,
}
}
})

View File

@@ -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>

View File

@@ -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>

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>
</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"

View File

@@ -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)
}

View File

@@ -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"

View File

@@ -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>

View File

@@ -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']
}

View File

@@ -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>

View File

@@ -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,
}
},
})

View File

@@ -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>

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 { 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,29 +46,31 @@ export default defineComponent({
CMyFieldDb, CGridTableRec,
},
setup(props, { attrs, slots, emit }) {
const mytable = 'users'
const globalStore = useGlobalStore()
const userStore = useUserStore()
const table = ref(toolsext.TABMYSKILLS)
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 getdefaultnewrec(): IMySkill {
return {
_id: 0,
idSector: 0,
idSkill: 0,
idSubSkill: [],
idStatusSkill: [],
idContribType: [],
idCity: [],
NumLevel: 0,
adType: 0,
photos: [],
note: '',
descr: '',
}
}
function extraparams() {
let lk_tab = 'users'
let lk_LF = 'userId'
@@ -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,
}
},
})

View File

@@ -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"

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>-->
<!-- 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

View File

@@ -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'