- MyProfile
- Immagine profilo e small
This commit is contained in:
@@ -45,12 +45,13 @@ export const shared_consts = {
|
|||||||
REPORT_FILT_ATTIVITA: 2,
|
REPORT_FILT_ATTIVITA: 2,
|
||||||
|
|
||||||
TAB_COUNTRY: 'countries',
|
TAB_COUNTRY: 'countries',
|
||||||
|
TAB_CITIES: 'cities',
|
||||||
TAB_PHONES: 'phones',
|
TAB_PHONES: 'phones',
|
||||||
TAB_SETTINGS: 'settings',
|
TAB_SETTINGS: 'settings',
|
||||||
|
|
||||||
KEY_TO_CRYPTED: ['PWD_FROM'],
|
KEY_TO_CRYPTED: ['PWD_FROM'],
|
||||||
|
|
||||||
TablePickup: ['countries', 'phones'],
|
TablePickup: ['countries', 'phones', 'cities'],
|
||||||
|
|
||||||
CashType: {
|
CashType: {
|
||||||
None: 0,
|
None: 0,
|
||||||
|
|||||||
@@ -21,11 +21,6 @@ $grayshadow: #555;
|
|||||||
height: 200px;
|
height: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.myimg-view {
|
|
||||||
border-radius: 5px !important;
|
|
||||||
height: 80px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.q-img {
|
.q-img {
|
||||||
&__image {
|
&__image {
|
||||||
border-radius: 10px !important;
|
border-radius: 10px !important;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<!-- display an myevent -->
|
<!-- display an myevent -->
|
||||||
<q-dialog v-model="displayEvent">
|
<q-dialog v-model="displayEvent">
|
||||||
<q-card v-if="myevent" :style="`min-width: ` + tools.myheight_dialog() + `px;`">
|
<q-card v-if="myevent" class="dialog_card">
|
||||||
<q-toolbar class="bg-primary text-white">
|
<q-toolbar class="bg-primary text-white">
|
||||||
<!--<q-toolbar :class="tools.displayClasses(myevent)"-->
|
<!--<q-toolbar :class="tools.displayClasses(myevent)"-->
|
||||||
<!--:style="tools.displayStyles(myevent) + ` min-width: `+ tools.myheight_dialog() + `px;`">-->
|
<!--:style="tools.displayStyles(myevent) + ` min-width: `+ tools.myheight_dialog() + `px;`">-->
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
<!-- id_bookedeventadd/edit an myevent -->
|
<!-- id_bookedeventadd/edit an myevent -->
|
||||||
|
|
||||||
<q-dialog v-model="addEvent" no-backdrop-dismiss persistent>
|
<q-dialog v-model="addEvent" no-backdrop-dismiss persistent>
|
||||||
<q-card v-if="addEvent" :style="`min-width: `+ tools.myheight_dialog() + `px;`">
|
<q-card v-if="addEvent" class="dialog_card">
|
||||||
<q-toolbar class="bg-primary text-white">
|
<q-toolbar class="bg-primary text-white">
|
||||||
<q-toolbar-title>
|
<q-toolbar-title>
|
||||||
{{ addOrUpdateEvent() }} {{ $t('cal.event') }}
|
{{ addOrUpdateEvent() }} {{ $t('cal.event') }}
|
||||||
@@ -350,7 +350,7 @@
|
|||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
||||||
<q-dialog v-model="bookEventpage.show" no-backdrop-dismiss>
|
<q-dialog v-model="bookEventpage.show" no-backdrop-dismiss>
|
||||||
<q-card v-if="bookEventpage.show" :style="`min-width: `+ tools.myheight_dialog() + `px;`">
|
<q-card v-if="bookEventpage.show" class="dialog_card">
|
||||||
<q-toolbar class="bg-primary text-white">
|
<q-toolbar class="bg-primary text-white">
|
||||||
<q-toolbar-title>
|
<q-toolbar-title>
|
||||||
{{ $t('cal.booking') }}
|
{{ $t('cal.booking') }}
|
||||||
@@ -481,7 +481,7 @@
|
|||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
||||||
<q-dialog v-model="askInfopage.show" no-backdrop-dismiss>
|
<q-dialog v-model="askInfopage.show" no-backdrop-dismiss>
|
||||||
<q-card v-if="askInfopage.show" :style="`min-width: `+ tools.myheight_dialog() + `px;`">
|
<q-card v-if="askInfopage.show" class="dialog_card">
|
||||||
<q-toolbar class="bg-primary text-white">
|
<q-toolbar class="bg-primary text-white">
|
||||||
<q-toolbar-title>
|
<q-toolbar-title>
|
||||||
{{ $t('cal.booking') }}
|
{{ $t('cal.booking') }}
|
||||||
|
|||||||
@@ -32,11 +32,6 @@ $grayshadow: #555;
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.myimg-view {
|
|
||||||
border-radius: 5px !important;
|
|
||||||
height: 80px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.q-img {
|
.q-img {
|
||||||
&__image {
|
&__image {
|
||||||
border-radius: 10px !important;
|
border-radius: 10px !important;
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ export default defineComponent({
|
|||||||
type: Object as PropType<IPagination>,
|
type: Object as PropType<IPagination>,
|
||||||
required: false,
|
required: false,
|
||||||
default: () => {
|
default: () => {
|
||||||
return { sortBy: 'desc', descending: false, page: 1, rowsNumber: 10, rowsPerPage: 10 }
|
return { sortBy: 'desc', descending: false, page: 1, rowsNumber: 0, rowsPerPage: 10 }
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
defaultnewrec: {
|
defaultnewrec: {
|
||||||
@@ -216,11 +216,16 @@ export default defineComponent({
|
|||||||
return lab
|
return lab
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(searchList.value, (to: any, from: any) => {
|
watch(() => searchList.value, (to: any, from: any) => {
|
||||||
console.log('watch searchlist', to)
|
console.log('watch searchlist', to)
|
||||||
refresh()
|
refresh()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
watch(() => props.filtercustom, (to: any, from: any) => {
|
||||||
|
console.log('filtercustom', to)
|
||||||
|
refresh()
|
||||||
|
})
|
||||||
|
|
||||||
function searchval(newval: any, table: any) {
|
function searchval(newval: any, table: any) {
|
||||||
console.log('searchval', newval, table)
|
console.log('searchval', newval, table)
|
||||||
tools.setCookie(tools.COOK_SEARCH + table, newval)
|
tools.setCookie(tools.COOK_SEARCH + table, newval)
|
||||||
|
|||||||
@@ -169,8 +169,8 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div v-if="(prop_search || canEdit)"
|
||||||
class="row justify-center vertical-middle">
|
class="row justify-center vertical-middle">
|
||||||
|
|
||||||
<div v-if="prop_search" class="q-mr-sm">
|
<div v-if="prop_search" class="q-mr-sm">
|
||||||
<q-input
|
<q-input
|
||||||
@@ -184,7 +184,7 @@
|
|||||||
|
|
||||||
<q-space></q-space>
|
<q-space></q-space>
|
||||||
<q-select
|
<q-select
|
||||||
v-if="mytable"
|
v-if="mytable && pagination.rowsNumber > 0 && (prop_search || canEdit)"
|
||||||
v-model="colVisib"
|
v-model="colVisib"
|
||||||
rounded
|
rounded
|
||||||
outlined
|
outlined
|
||||||
@@ -202,7 +202,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="pagination.rowsNumber > 0">{{ pagination.rowsNumber }} elementi trovati</div>
|
<div v-if="pagination.rowsNumber > 0 && prop_search">{{ pagination.rowsNumber }} elementi trovati</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
@@ -364,7 +364,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-dialog v-model="newRecordBool" @hide="hidewindow">
|
<q-dialog v-model="newRecordBool" @hide="hidewindow">
|
||||||
<q-card :style="`min-width: `+ tools.myheight_dialog() + `px;`">
|
<q-card class="dialog_card">
|
||||||
<q-bar dense class="bg-primary text-white">
|
<q-bar dense class="bg-primary text-white">
|
||||||
Nuovo:
|
Nuovo:
|
||||||
<q-space/>
|
<q-space/>
|
||||||
@@ -404,7 +404,7 @@
|
|||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
<q-dialog v-model="editRecordBool">
|
<q-dialog v-model="editRecordBool">
|
||||||
<q-card :style="`min-width: `+ tools.myheight_dialog() + `px;`">
|
<q-card class="dialog_card">
|
||||||
<q-bar dense class="bg-primary text-white">
|
<q-bar dense class="bg-primary text-white">
|
||||||
<span v-if="mytitle">{{ mytitle }}</span>
|
<span v-if="mytitle">{{ mytitle }}</span>
|
||||||
<span v-else>{{ recModif[col_title] }}</span>
|
<span v-else>{{ recModif[col_title] }}</span>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<q-card :style="`min-width: `+ tools.myheight_dialog() + `px;` ">
|
<q-card class="dialog_card">
|
||||||
<q-toolbar v-if="showButtons" class="bg-primary text-white" style="min-height: 30px;">
|
<q-toolbar v-if="showButtons" class="bg-primary text-white" style="min-height: 30px;">
|
||||||
<q-toolbar-title>
|
<q-toolbar-title>
|
||||||
Editor
|
Editor
|
||||||
@@ -25,6 +25,7 @@
|
|||||||
</q-btn>
|
</q-btn>
|
||||||
<q-editor
|
<q-editor
|
||||||
ref="editor"
|
ref="editor"
|
||||||
|
content-class="wrap_anywhere"
|
||||||
toolbar-text-color="white"
|
toolbar-text-color="white"
|
||||||
toolbar-toggle-color="yellow-8"
|
toolbar-toggle-color="yellow-8"
|
||||||
toolbar-bg="primary"
|
toolbar-bg="primary"
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ export default defineComponent({
|
|||||||
const myvalueprec = ref('false')
|
const myvalueprec = ref('false')
|
||||||
const countryname = ref('')
|
const countryname = ref('')
|
||||||
const visueditor = ref(false)
|
const visueditor = ref(false)
|
||||||
|
const visuhtml = ref(false)
|
||||||
const showeditor = ref(false)
|
const showeditor = ref(false)
|
||||||
|
|
||||||
const myImgGall = ref(<IImgGallery[]>[{}])
|
const myImgGall = ref(<IImgGallery[]>[{}])
|
||||||
@@ -477,6 +478,17 @@ export default defineComponent({
|
|||||||
return ''
|
return ''
|
||||||
} else {
|
} else {
|
||||||
let mystr = ''
|
let mystr = ''
|
||||||
|
let mylink = ''
|
||||||
|
|
||||||
|
if (col.link)
|
||||||
|
mylink = col.link.replace(col.name, val)
|
||||||
|
if (col.tipovisu === costanti.TipoVisu.LINK && col.link) {
|
||||||
|
return "<a href='"+mylink+"'>" + val + '</a>'
|
||||||
|
} else if (col.tipovisu === costanti.TipoVisu.BUTTON && col.link) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (props.showall) {
|
if (props.showall) {
|
||||||
return val
|
return val
|
||||||
} else {
|
} else {
|
||||||
@@ -586,6 +598,7 @@ export default defineComponent({
|
|||||||
myvalue,
|
myvalue,
|
||||||
countryname,
|
countryname,
|
||||||
visueditor,
|
visueditor,
|
||||||
|
visuhtml,
|
||||||
showeditor,
|
showeditor,
|
||||||
isviewfield,
|
isviewfield,
|
||||||
changeval,
|
changeval,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div :class="getclassCol(col)">
|
<div :class="getclassCol(col)">
|
||||||
<div v-if="(visInNewRec(col) && visulabel) || !visulabel " style="flex-grow: 1;">
|
<div v-if="(visInNewRec(col) && visulabel) || !visulabel " style="flex-grow: 1;">
|
||||||
<div
|
<div
|
||||||
:class="{ editor: (col.fieldtype === costanti.FieldType.html) && !isInModif, flex: true, 'justify-center': true }">
|
:class="{ flex: true, 'justify-center': true }">
|
||||||
<div>
|
<div>
|
||||||
<!-- Edit Value -->
|
<!-- Edit Value -->
|
||||||
<div v-if="col.fieldtype === costanti.FieldType.boolean">
|
<div v-if="col.fieldtype === costanti.FieldType.boolean">
|
||||||
@@ -24,8 +24,10 @@
|
|||||||
<div v-else-if="col.fieldtype === costanti.FieldType.string">
|
<div v-else-if="col.fieldtype === costanti.FieldType.string">
|
||||||
<div v-if="visulabel || isInModif" class="flex">
|
<div v-if="visulabel || isInModif" class="flex">
|
||||||
<q-input
|
<q-input
|
||||||
|
v-bind="$attrs"
|
||||||
v-model="myvalue"
|
v-model="myvalue"
|
||||||
autogrow
|
autogrow
|
||||||
|
:disable="disable"
|
||||||
@keyup.enter.stop
|
@keyup.enter.stop
|
||||||
@update:model-value="changevalRec"
|
@update:model-value="changevalRec"
|
||||||
autofocus
|
autofocus
|
||||||
@@ -33,12 +35,21 @@
|
|||||||
</q-input>
|
</q-input>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<span v-html="visuValByType(myvalue, col, row)"></span>
|
|
||||||
|
<q-btn v-if="col.tipovisu === costanti.TipoVisu.LINK && myvalue" type="a" rounded dense size="sm"
|
||||||
|
color="white" text-color="blue" icon="person" :to="col.link.replace(col.name, myvalue)">
|
||||||
|
{{ myvalue }}
|
||||||
|
</q-btn>
|
||||||
|
<q-btn v-else-if="col.tipovisu === costanti.TipoVisu.BUTTON && myvalue" rounded dense size="sm"
|
||||||
|
color="primary" icon="person" :to="col.link.replace(col.name, myvalue)">{{ myvalue }}
|
||||||
|
</q-btn>
|
||||||
|
<span v-else v-html="visuValByType(myvalue, col, row)"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.fieldtype === costanti.FieldType.number">
|
<div v-else-if="col.fieldtype === costanti.FieldType.number">
|
||||||
<div v-if="canEdit || isInModif">
|
<div v-if="canEdit || isInModif">
|
||||||
<q-input
|
<q-input
|
||||||
|
v-bind="$attrs"
|
||||||
v-model="myvalue"
|
v-model="myvalue"
|
||||||
@update:model-value="Savedb"
|
@update:model-value="Savedb"
|
||||||
type="number"
|
type="number"
|
||||||
@@ -316,10 +327,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<div v-html="visuValByType(myvalue, col, row)" @click="visueditor = true"></div>
|
<q-btn
|
||||||
|
v-if="myvalue"
|
||||||
|
:label="$t('cal.details')" color="primary" text-color="white"
|
||||||
|
@click="visuhtml = true">
|
||||||
|
</q-btn>
|
||||||
|
<!--<div v-html="visuValByType(myvalue, col, row)" @click="visueditor = true"></div>-->
|
||||||
|
|
||||||
<div v-if="!isFieldDb()">
|
<div v-if="!isFieldDb()">
|
||||||
|
<q-dialog v-model="visuhtml" full-height full-width auto-close>
|
||||||
|
<q-card>
|
||||||
|
<q-bar dense class="bg-primary text-white">
|
||||||
|
<q-space/>
|
||||||
|
</q-bar>
|
||||||
|
<q-card-section class="inset-shadow">
|
||||||
|
<q-card class="dialog_card">
|
||||||
|
<div v-html="myvalue" class="wrap_anywhere"></div>
|
||||||
|
</q-card>
|
||||||
|
</q-card-section>
|
||||||
|
</q-card>
|
||||||
|
</q-dialog>
|
||||||
<q-dialog v-model="visueditor" no-backdrop-dismiss persistent full-height full-width>
|
<q-dialog v-model="visueditor" no-backdrop-dismiss persistent full-height full-width>
|
||||||
<q-card :style="`min-width: `+ tools.myheight_dialog() + `px;`">
|
<q-card class="dialog_card">
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<CMyEditor
|
<CMyEditor
|
||||||
v-if="visueditor" v-model:value="myvalue" :title="col.title" @keyup.enter.stop
|
v-if="visueditor" v-model:value="myvalue" :title="col.title" @keyup.enter.stop
|
||||||
@@ -369,6 +398,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.fieldtype === costanti.FieldType.string">
|
<div v-else-if="col.fieldtype === costanti.FieldType.string">
|
||||||
<q-input
|
<q-input
|
||||||
|
v-bind="$attrs"
|
||||||
v-model="scope.value"
|
v-model="scope.value"
|
||||||
autogrow
|
autogrow
|
||||||
@keyup.enter.stop
|
@keyup.enter.stop
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<span>
|
<span>
|
||||||
<q-dialog v-model="showuserdetails" v-if="myop">
|
<q-dialog v-model="showuserdetails" v-if="myop">
|
||||||
<q-card :style="`min-width: `+ tools.myheight_dialog() + `px;`">
|
<q-card class="dialog_card">
|
||||||
<q-toolbar class="bg-primary text-white">
|
<q-toolbar class="bg-primary text-white">
|
||||||
<q-toolbar-title>
|
<q-toolbar-title>
|
||||||
{{ myop.name }} {{ myop.surname }}
|
{{ myop.name }} {{ myop.surname }}
|
||||||
|
|||||||
@@ -27,3 +27,4 @@
|
|||||||
.q-img__content > div{
|
.q-img__content > div{
|
||||||
background: rgba(0,0,0,0.17) !important;
|
background: rgba(0,0,0,0.17) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,11 @@ export default defineComponent({
|
|||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
username: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
CMyFieldDb, CGridTableRec,
|
CMyFieldDb, CGridTableRec,
|
||||||
@@ -44,7 +49,7 @@ export default defineComponent({
|
|||||||
data: {},
|
data: {},
|
||||||
field: 'myskills'
|
field: 'myskills'
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
if (props.defaultnewrec) {
|
if (props.defaultnewrec) {
|
||||||
|
|
||||||
@@ -72,13 +77,23 @@ export default defineComponent({
|
|||||||
|
|
||||||
|
|
||||||
function extraparams() {
|
function extraparams() {
|
||||||
|
let lk_tab = 'users'
|
||||||
|
let lk_LF = 'userId'
|
||||||
|
let lk_FF = '_id'
|
||||||
|
let lk_as = 'user'
|
||||||
|
let af_objId_tab = 'myId'
|
||||||
|
|
||||||
|
if (props.username) {
|
||||||
|
// lk_LF = 'username'
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
lookup1: {
|
lookup1: {
|
||||||
lk_tab: 'users',
|
lk_tab,
|
||||||
lk_LF: 'userId',
|
lk_LF,
|
||||||
lk_FF: '_id',
|
lk_FF,
|
||||||
lk_as: 'user',
|
lk_as,
|
||||||
af_objId_tab: 'myId',
|
af_objId_tab,
|
||||||
lk_proj: {
|
lk_proj: {
|
||||||
idSkill: 1,
|
idSkill: 1,
|
||||||
idSubSkill: 1,
|
idSubSkill: 1,
|
||||||
@@ -97,12 +112,24 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getFilterCustom() {
|
||||||
|
/*if (props.username) {
|
||||||
|
return [
|
||||||
|
{ username: props.username }
|
||||||
|
]
|
||||||
|
} else {
|
||||||
|
return props.filtercustom
|
||||||
|
}*/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
tools,
|
tools,
|
||||||
costanti,
|
costanti,
|
||||||
colmySkills,
|
colmySkills,
|
||||||
getdefaultnewrec,
|
getdefaultnewrec,
|
||||||
extraparams,
|
extraparams,
|
||||||
|
getFilterCustom,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||||
<CGridTableRec
|
<CGridTableRec
|
||||||
|
v-if="filtercustom.length > 0"
|
||||||
prop_mytable="myskills"
|
prop_mytable="myskills"
|
||||||
prop_mytitle=""
|
prop_mytitle=""
|
||||||
:prop_mycolumns="colmySkills"
|
:prop_mycolumns="colmySkills"
|
||||||
@@ -13,6 +14,7 @@
|
|||||||
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
|
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
|
||||||
:defaultnewrec="getdefaultnewrec"
|
:defaultnewrec="getdefaultnewrec"
|
||||||
:filtercustom="filtercustom"
|
:filtercustom="filtercustom"
|
||||||
|
v-bind="$attrs"
|
||||||
:extraparams="extraparams()">
|
:extraparams="extraparams()">
|
||||||
|
|
||||||
</CGridTableRec>
|
</CGridTableRec>
|
||||||
|
|||||||
@@ -70,9 +70,11 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function apri() {
|
function apri() {
|
||||||
myvisible.value = !myvisible.value
|
if (props.canopen) {
|
||||||
if (myvisible.value)
|
myvisible.value = !myvisible.value
|
||||||
emit('apri')
|
if (myvisible.value)
|
||||||
|
emit('apri')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getclass() {
|
function getclass() {
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="imgpreview" class="text-center cursor-pointer clBorderSteps" style="opacity: 0.5;"
|
v-if="imgpreview" class="text-center cursor-pointer clBorderSteps" style="opacity: 0.5;"
|
||||||
@click="myvisible = !myvisible">
|
@click="myvisible = !myvisible">
|
||||||
<q-img :src="imgpreview" class="img"></q-img>
|
<q-img :src="imgpreview" class="img"></q-img>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -345,9 +345,13 @@ export default defineComponent({
|
|||||||
|
|
||||||
function getappname() {
|
function getappname() {
|
||||||
let mystr = tools.getsuffisso() + tools.getappname(tools.isMobile())
|
let mystr = tools.getsuffisso() + tools.getappname(tools.isMobile())
|
||||||
//if (!tools.isMobile()) {
|
if (!tools.isMobile()) {
|
||||||
|
//if (!tools.isMobile()) {
|
||||||
mystr += ' ' + getAppVersion()
|
mystr += ' ' + getAppVersion()
|
||||||
//}
|
//}
|
||||||
|
} else {
|
||||||
|
mystr = ''
|
||||||
|
}
|
||||||
|
|
||||||
return mystr
|
return mystr
|
||||||
|
|
||||||
|
|||||||
@@ -869,7 +869,29 @@ $heightBtn: 100%;
|
|||||||
|
|
||||||
.combowidth {
|
.combowidth {
|
||||||
min-width: 150px;
|
min-width: 150px;
|
||||||
@media (max-width: 400px) {
|
@media (max-width: 450px) {
|
||||||
min-width: 300px;
|
min-width: 300px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.myimg-view {
|
||||||
|
border-radius: 5px !important;
|
||||||
|
height: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog_card{
|
||||||
|
min-width: 100%;
|
||||||
|
width: 100% !important;
|
||||||
|
margin-left: 2px !important;
|
||||||
|
margin-right: 2px !important;
|
||||||
|
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
width: auto;
|
||||||
|
min-width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.wrap_anywhere {
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ const msg_website_it = {
|
|||||||
pages: {
|
pages: {
|
||||||
home: 'Home',
|
home: 'Home',
|
||||||
profile: 'Profilo',
|
profile: 'Profilo',
|
||||||
|
profile2: 'ProfiloU',
|
||||||
test: 'Test',
|
test: 'Test',
|
||||||
projects: 'Progetti',
|
projects: 'Progetti',
|
||||||
report: 'Report Ore',
|
report: 'Report Ore',
|
||||||
|
|||||||
@@ -383,11 +383,22 @@ const baseroutes: IListRoutes[] = [
|
|||||||
path: '/profile',
|
path: '/profile',
|
||||||
materialIcon: 'fas fa-user',
|
materialIcon: 'fas fa-user',
|
||||||
name: 'pages.profile',
|
name: 'pages.profile',
|
||||||
component: () => import('@/views/user/profile/profile.vue'),
|
component: () => import('@/views/user/editprofile/editprofile.vue'),
|
||||||
meta: { requiresAuth: true },
|
meta: { requiresAuth: true },
|
||||||
inmenu: true,
|
inmenu: true,
|
||||||
infooter: true,
|
infooter: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
active: true,
|
||||||
|
order: 130,
|
||||||
|
path: '/my/:username',
|
||||||
|
materialIcon: 'fas fa-user',
|
||||||
|
name: 'pages.profile2',
|
||||||
|
component: () => import('@/views/user/myprofile/myprofile.vue'),
|
||||||
|
meta: { requiresAuth: true },
|
||||||
|
inmenu: false,
|
||||||
|
infooter: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
active: true,
|
active: true,
|
||||||
order: 120,
|
order: 120,
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { IMessage } from '@src/model'
|
|||||||
import { useUserStore } from '@store/UserStore'
|
import { useUserStore } from '@store/UserStore'
|
||||||
import { useGlobalStore } from '@store/globalStore'
|
import { useGlobalStore } from '@store/globalStore'
|
||||||
import { useProducts } from '@store/Products'
|
import { useProducts } from '@store/Products'
|
||||||
|
import { serv_constants } from '@store/Modules/serv_constants'
|
||||||
|
import { tools } from '@store/Modules/tools'
|
||||||
|
|
||||||
// You can declare a mixin as the same style as components.
|
// You can declare a mixin as the same style as components.
|
||||||
export default function () {
|
export default function () {
|
||||||
@@ -70,8 +72,10 @@ export default function () {
|
|||||||
|
|
||||||
function getMyImgforIcon() {
|
function getMyImgforIcon() {
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const ris = userStore.getImgByUsername(userStore.my.username)
|
const mypath = userStore.getImgByUsername(userStore.my.username)
|
||||||
return (ris !== '') ? `img:${ris}` : 'fas fa-user'
|
let img_small = tools.baseurl(mypath) + '/' + serv_constants.PREFIX_IMG_SMALL + tools.getLastItem(mypath);
|
||||||
|
console.log('img_small', img_small)
|
||||||
|
return (img_small !== '') ? `img:${img_small}` : 'fas fa-user'
|
||||||
}
|
}
|
||||||
|
|
||||||
function getIconCart() {
|
function getIconCart() {
|
||||||
|
|||||||
@@ -491,6 +491,8 @@ export interface IColGridTable {
|
|||||||
askaction?: string
|
askaction?: string
|
||||||
foredit?: boolean
|
foredit?: boolean
|
||||||
fieldtype?: number
|
fieldtype?: number
|
||||||
|
tipovisu?: number
|
||||||
|
link?: string
|
||||||
jointable?: string
|
jointable?: string
|
||||||
resultjoin?: string[]
|
resultjoin?: string[]
|
||||||
visuonlyEditVal?: boolean
|
visuonlyEditVal?: boolean
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</q-markup-table>
|
</q-markup-table>
|
||||||
<q-dialog v-model="shownote">
|
<q-dialog v-model="shownote">
|
||||||
<q-card v-if="eventsel" :style="`min-width: ` + tools.myheight_dialog() + `px;`">
|
<q-card v-if="eventsel" class="dialog_card">
|
||||||
<q-toolbar class="bg-primary text-white">
|
<q-toolbar class="bg-primary text-white">
|
||||||
<q-toolbar-title>
|
<q-toolbar-title>
|
||||||
Note: {{ eventsel.title }}
|
Note: {{ eventsel.title }}
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
<q-dialog v-model="showpeople">
|
<q-dialog v-model="showpeople">
|
||||||
<q-card v-if="eventsel" :style="`min-width: ` + tools.myheight_dialog() + `px;`">
|
<q-card v-if="eventsel" class="dialog_card">
|
||||||
<q-toolbar class="bg-primary text-white">
|
<q-toolbar class="bg-primary text-white">
|
||||||
<q-toolbar-title>
|
<q-toolbar-title>
|
||||||
{{ eventsel.title }}
|
{{ eventsel.title }}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(idparam, (newval, oldval) => {
|
watch(() => idparam, (newval, oldval) => {
|
||||||
tab.value = idparam.value
|
tab.value = idparam.value
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ export const costanti = {
|
|||||||
hours: 8000,
|
hours: 8000,
|
||||||
crypted: 9000,
|
crypted: 9000,
|
||||||
},
|
},
|
||||||
|
|
||||||
FieldTypeArr: [
|
FieldTypeArr: [
|
||||||
{ label: 'Boolean', value: 1 },
|
{ label: 'Boolean', value: 1 },
|
||||||
{ label: 'Date', value: 2 },
|
{ label: 'Date', value: 2 },
|
||||||
@@ -59,5 +60,10 @@ export const costanti = {
|
|||||||
{ label: 'Number', value: 64 },
|
{ label: 'Number', value: 64 },
|
||||||
],
|
],
|
||||||
|
|
||||||
|
TipoVisu: {
|
||||||
|
TESTO: 1,
|
||||||
|
LINK: 2,
|
||||||
|
BUTTON: 3,
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,8 @@ function AddCol(params: IColGridTable) {
|
|||||||
action: (params.action === undefined) ? '' : params.action,
|
action: (params.action === undefined) ? '' : params.action,
|
||||||
foredit: (params.foredit === undefined) ? true : params.foredit,
|
foredit: (params.foredit === undefined) ? true : params.foredit,
|
||||||
fieldtype: (params.fieldtype === undefined) ? costanti.FieldType.string : params.fieldtype,
|
fieldtype: (params.fieldtype === undefined) ? costanti.FieldType.string : params.fieldtype,
|
||||||
|
tipovisu: (params.tipovisu === undefined) ? costanti.TipoVisu.TESTO : params.tipovisu,
|
||||||
|
link: (params.link === undefined) ? '' : params.link,
|
||||||
visuonlyEditVal: (params.visuonlyEditVal === undefined) ? false : params.visuonlyEditVal,
|
visuonlyEditVal: (params.visuonlyEditVal === undefined) ? false : params.visuonlyEditVal,
|
||||||
askaction: (params.askaction === undefined) ? '' : params.askaction,
|
askaction: (params.askaction === undefined) ? '' : params.askaction,
|
||||||
jointable: (params.jointable === undefined) ? '' : params.jointable,
|
jointable: (params.jointable === undefined) ? '' : params.jointable,
|
||||||
@@ -389,7 +391,7 @@ export const colmySkills = [
|
|||||||
}), */
|
}), */
|
||||||
//AddCol({ name: 'name', label_trans: 'reg.name', fieldtype: costanti.FieldType.string }),
|
//AddCol({ name: 'name', label_trans: 'reg.name', fieldtype: costanti.FieldType.string }),
|
||||||
//AddCol({ name: 'surname', label_trans: 'reg.surname', fieldtype: costanti.FieldType.string }),
|
//AddCol({ name: 'surname', label_trans: 'reg.surname', fieldtype: costanti.FieldType.string }),
|
||||||
AddCol({ name: 'username', label_trans: 'reg.username', foredit: false }),
|
AddCol({ name: 'username', label_trans: 'reg.username', foredit: false, tipovisu: costanti.TipoVisu.LINK, link: '/my/username' }),
|
||||||
AddCol({
|
AddCol({
|
||||||
name: 'idSkill',
|
name: 'idSkill',
|
||||||
label_trans: 'skill.name',
|
label_trans: 'skill.name',
|
||||||
@@ -1309,6 +1311,10 @@ export const fieldsTable = {
|
|||||||
AddCol({
|
AddCol({
|
||||||
name: 'profile.nationality', field: 'profile', subfield: 'nationality', label_trans: 'reg.nationality',
|
name: 'profile.nationality', field: 'profile', subfield: 'nationality', label_trans: 'reg.nationality',
|
||||||
}),
|
}),
|
||||||
|
AddCol({ name: 'profile.dateofbirth', label_trans: 'reg.dateofbirth', fieldtype: costanti.FieldType.onlydate }),
|
||||||
|
AddCol({ name: 'profile.born_city', label_trans: 'reg.born_city', fieldtype: costanti.FieldType.string }),
|
||||||
|
AddCol({ name: 'profile.born_province', label_trans: 'reg.born_province', fieldtype: costanti.FieldType.string }),
|
||||||
|
AddCol({ name: 'profile.born_country', label_trans: 'reg.born_country', fieldtype: costanti.FieldType.string }),
|
||||||
AddCol({
|
AddCol({
|
||||||
name: 'profile.cell', field: 'profile', subfield: 'cell', label_trans: 'reg.cell',
|
name: 'profile.cell', field: 'profile', subfield: 'cell', label_trans: 'reg.cell',
|
||||||
}),
|
}),
|
||||||
@@ -1457,6 +1463,7 @@ export const fieldsTable = {
|
|||||||
tableRemotePickup: [
|
tableRemotePickup: [
|
||||||
'countries',
|
'countries',
|
||||||
'phones',
|
'phones',
|
||||||
|
'cities',
|
||||||
],
|
],
|
||||||
|
|
||||||
tableWithUsername: [
|
tableWithUsername: [
|
||||||
|
|||||||
@@ -36,4 +36,24 @@ export const serv_constants = {
|
|||||||
RIS_UNSUBSCRIBED_STR: 'unsubscribed',
|
RIS_UNSUBSCRIBED_STR: 'unsubscribed',
|
||||||
RIS_UNSUBSCRIBED_NOT_EXIST: -5,
|
RIS_UNSUBSCRIBED_NOT_EXIST: -5,
|
||||||
|
|
||||||
|
LIST_END: '10000000',
|
||||||
|
LIST_START: null,
|
||||||
|
|
||||||
|
PREFIX_IMG: 'm_',
|
||||||
|
PREFIX_IMG_SMALL: 'sm_',
|
||||||
|
|
||||||
|
Privacy: {
|
||||||
|
all: 'all',
|
||||||
|
friends: 'friends',
|
||||||
|
mygroup: 'mygroup',
|
||||||
|
onlyme: 'onlyme',
|
||||||
|
inherited: 'inherited'
|
||||||
|
},
|
||||||
|
|
||||||
|
TypeProj: {
|
||||||
|
TYPE_PROJECT: 1,
|
||||||
|
TYPE_SUBDIR: 2,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ export const tools = {
|
|||||||
'yellow',
|
'yellow',
|
||||||
],
|
],
|
||||||
|
|
||||||
MAX_CHARACTERS: 60,
|
MAX_CHARACTERS: 200,
|
||||||
projects: 'projects',
|
projects: 'projects',
|
||||||
todos: 'todos',
|
todos: 'todos',
|
||||||
EMPTY: 0,
|
EMPTY: 0,
|
||||||
@@ -3338,7 +3338,7 @@ export const tools = {
|
|||||||
return ''
|
return ''
|
||||||
},
|
},
|
||||||
getsuffisso() {
|
getsuffisso() {
|
||||||
if (this.isTest()) return 'TEST: '
|
if (this.isTest()) return 'T: '
|
||||||
return ''
|
return ''
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -4360,7 +4360,16 @@ export const tools = {
|
|||||||
col = 'green-5'
|
col = 'green-5'
|
||||||
}
|
}
|
||||||
return col
|
return col
|
||||||
}
|
},
|
||||||
|
|
||||||
|
baseurl(folder: string) {
|
||||||
|
return folder.substring(0, folder.lastIndexOf('/'))
|
||||||
|
},
|
||||||
|
|
||||||
|
getLastItem(thePath: string) {
|
||||||
|
return thePath.substring(thePath.lastIndexOf('/') + 1)
|
||||||
|
},
|
||||||
|
|
||||||
// getLocale() {
|
// getLocale() {
|
||||||
// if (navigator.languages && navigator.languages.length > 0) {
|
// if (navigator.languages && navigator.languages.length > 0) {
|
||||||
// return navigator.languages[0]
|
// return navigator.languages[0]
|
||||||
|
|||||||
@@ -176,6 +176,16 @@ export const useUserStore = defineStore('UserStore', {
|
|||||||
return ''
|
return ''
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getImgByProfile(userparam: IUserFields): string {
|
||||||
|
|
||||||
|
try{
|
||||||
|
if (userparam.profile && userparam.profile.img) {
|
||||||
|
return 'upload/profile/' + userparam.username + '/' + userparam.profile.img
|
||||||
|
}
|
||||||
|
}catch (e) {}
|
||||||
|
return 'images/noimg.png'
|
||||||
|
},
|
||||||
|
|
||||||
getRefLink(username: string): string {
|
getRefLink(username: string): string {
|
||||||
if (username === '')
|
if (username === '')
|
||||||
username = this.my.username
|
username = this.my.username
|
||||||
@@ -805,5 +815,19 @@ export const useUserStore = defineStore('UserStore', {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async loadUserProfile(username: string) {
|
||||||
|
const data = {
|
||||||
|
username
|
||||||
|
}
|
||||||
|
|
||||||
|
return Api.SendReq('/users/profile', 'POST', data)
|
||||||
|
.then((res) => {
|
||||||
|
return res.data
|
||||||
|
}).catch((error) => {
|
||||||
|
return {}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export default defineComponent({
|
|||||||
const invited = computed(() => $route.params.invited)
|
const invited = computed(() => $route.params.invited)
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
watch(invited, (newval, oldval) => {
|
watch(() => invited, (newval, oldval) => {
|
||||||
console.log('$route.params.invited')
|
console.log('$route.params.invited')
|
||||||
adult.value = !!$route.params.invited
|
adult.value = !!$route.params.invited
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="panel">
|
<div class="panel">
|
||||||
|
|
||||||
<q-dialog v-model="shownewsubproj">
|
<q-dialog v-model="shownewsubproj">
|
||||||
<q-card :style="`min-width: `+ tools.myheight_dialog() + `px;`">
|
<q-card class="dialog_card">
|
||||||
<q-toolbar class="bg-primary text-white">
|
<q-toolbar class="bg-primary text-white">
|
||||||
<q-toolbar-title>
|
<q-toolbar-title>
|
||||||
Nuovo
|
Nuovo
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { costanti } from '@costanti'
|
|||||||
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'ProfileMy',
|
name: 'EditProfile',
|
||||||
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill },
|
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill },
|
||||||
props: {},
|
props: {},
|
||||||
setup() {
|
setup() {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
|
<template>
|
||||||
<div class="q-gutter-sm q-pa-xs q-pb-md">
|
<div class="q-gutter-sm q-pa-xs q-pb-md">
|
||||||
|
|
||||||
<CTitleBanner
|
<CTitleBanner
|
||||||
@@ -20,21 +20,20 @@
|
|||||||
:type="costanti.FieldType.string">
|
:type="costanti.FieldType.string">
|
||||||
</CMyFieldDb>
|
</CMyFieldDb>
|
||||||
</div>
|
</div>
|
||||||
<div class="myrow">
|
|
||||||
<CMyFieldDb
|
|
||||||
:title="$t('reg.photo')"
|
|
||||||
table="users"
|
|
||||||
mykey="profile"
|
|
||||||
mysubkey="img"
|
|
||||||
:type="costanti.FieldType.image">
|
|
||||||
</CMyFieldDb>
|
|
||||||
</div>
|
|
||||||
<div class="myrow">
|
<div class="myrow">
|
||||||
<CMyFieldDb
|
<CMyFieldDb
|
||||||
:title="$t('reg.username')"
|
:title="$t('reg.username')"
|
||||||
table="users"
|
table="users"
|
||||||
mykey="username"
|
mykey="username"
|
||||||
:disable="true"
|
:disable="true"
|
||||||
|
:readonly="true"
|
||||||
|
:type="costanti.FieldType.string">
|
||||||
|
</CMyFieldDb>
|
||||||
|
<CMyFieldDb
|
||||||
|
:title="$t('reg.username_telegram')"
|
||||||
|
table="users"
|
||||||
|
mykey="profile"
|
||||||
|
mysubkey="username_telegram"
|
||||||
:type="costanti.FieldType.string">
|
:type="costanti.FieldType.string">
|
||||||
</CMyFieldDb>
|
</CMyFieldDb>
|
||||||
<CMyFieldDb
|
<CMyFieldDb
|
||||||
@@ -46,53 +45,13 @@
|
|||||||
</CMyFieldDb>
|
</CMyFieldDb>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="myrow">
|
|
||||||
<CMyFieldDb
|
|
||||||
:title="$t('reg.nationality')"
|
|
||||||
table="users"
|
|
||||||
tablesel="countries"
|
|
||||||
mykey="profile"
|
|
||||||
:useinput="false"
|
|
||||||
mysubkey="nationality"
|
|
||||||
:pickup="true"
|
|
||||||
:type="costanti.FieldType.nationality">
|
|
||||||
</CMyFieldDb>
|
|
||||||
|
|
||||||
<CMyFieldDb
|
|
||||||
:title="$t('reg.dateofbirth')"
|
|
||||||
table="users"
|
|
||||||
mykey="profile"
|
|
||||||
mysubkey="dateofbirth"
|
|
||||||
:type="costanti.FieldType.date">
|
|
||||||
</CMyFieldDb>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="myrow">
|
|
||||||
|
|
||||||
<CMyFieldDb
|
|
||||||
:title="$t('reg.intcode_cell')"
|
|
||||||
table="users"
|
|
||||||
mykey="profile"
|
|
||||||
mysubkey="intcode_cell"
|
|
||||||
:type="costanti.FieldType.intcode"
|
|
||||||
tablesel="phones"
|
|
||||||
:pickup="true">
|
|
||||||
</CMyFieldDb>
|
|
||||||
<CMyFieldDb
|
|
||||||
:title="$t('reg.cell')"
|
|
||||||
table="users"
|
|
||||||
mykey="profile"
|
|
||||||
mysubkey="cell"
|
|
||||||
:type="costanti.FieldType.string">
|
|
||||||
</CMyFieldDb>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
<div class="myrow justify-center">
|
<div class="myrow justify-center">
|
||||||
<q-btn
|
<q-btn
|
||||||
push
|
push
|
||||||
rounded
|
rounded
|
||||||
color="primary"
|
color="white"
|
||||||
|
text-color="blue"
|
||||||
size="md"
|
size="md"
|
||||||
to="/requestresetpwd"
|
to="/requestresetpwd"
|
||||||
:label="$t('reg.modificapassword')">
|
:label="$t('reg.modificapassword')">
|
||||||
@@ -102,6 +61,85 @@
|
|||||||
|
|
||||||
</CTitleBanner>
|
</CTitleBanner>
|
||||||
|
|
||||||
|
<CTitleBanner
|
||||||
|
class="q-pa-xs" title="Informazioni su di te" bgcolor="bg-primary" clcolor="text-white"
|
||||||
|
myclass="myshad" :canopen="true">
|
||||||
|
|
||||||
|
<div class="myrow">
|
||||||
|
<CMyFieldDb
|
||||||
|
:title="$t('reg.photo')"
|
||||||
|
table="users"
|
||||||
|
mykey="profile"
|
||||||
|
mysubkey="img"
|
||||||
|
:type="costanti.FieldType.image">
|
||||||
|
</CMyFieldDb>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<CMyFieldDb
|
||||||
|
title="Biografia"
|
||||||
|
table="users"
|
||||||
|
mykey="profile"
|
||||||
|
mysubkey="biografia"
|
||||||
|
maxlength="200"
|
||||||
|
:showall="true"
|
||||||
|
:type="costanti.FieldType.string">
|
||||||
|
</CMyFieldDb>
|
||||||
|
|
||||||
|
<div class="myrow">
|
||||||
|
<CMyFieldDb
|
||||||
|
:title="$t('reg.nationality')"
|
||||||
|
table="users"
|
||||||
|
tablesel="countries"
|
||||||
|
mykey="profile"
|
||||||
|
:useinput="false"
|
||||||
|
mysubkey="nationality"
|
||||||
|
:pickup="true"
|
||||||
|
:type="costanti.FieldType.nationality">
|
||||||
|
</CMyFieldDb>
|
||||||
|
|
||||||
|
<CMyFieldDb
|
||||||
|
:title="$t('reg.residency_city')"
|
||||||
|
table="users"
|
||||||
|
tablesel="cities"
|
||||||
|
mykey="profile"
|
||||||
|
:useinput="false"
|
||||||
|
mysubkey="born_city"
|
||||||
|
:pickup="true"
|
||||||
|
:type="costanti.FieldType.string">
|
||||||
|
</CMyFieldDb>
|
||||||
|
|
||||||
|
<CMyFieldDb
|
||||||
|
:title="$t('reg.dateofbirth')"
|
||||||
|
table="users"
|
||||||
|
mykey="profile"
|
||||||
|
mysubkey="dateofbirth"
|
||||||
|
:type="costanti.FieldType.date">
|
||||||
|
</CMyFieldDb>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="myrow">
|
||||||
|
|
||||||
|
<CMyFieldDb
|
||||||
|
:title="$t('reg.intcode_cell')"
|
||||||
|
table="users"
|
||||||
|
mykey="profile"
|
||||||
|
mysubkey="intcode_cell"
|
||||||
|
:type="costanti.FieldType.intcode"
|
||||||
|
tablesel="phones"
|
||||||
|
:pickup="true">
|
||||||
|
</CMyFieldDb>
|
||||||
|
<CMyFieldDb
|
||||||
|
:title="$t('reg.cell')"
|
||||||
|
table="users"
|
||||||
|
mykey="profile"
|
||||||
|
mysubkey="cell"
|
||||||
|
:type="costanti.FieldType.string">
|
||||||
|
</CMyFieldDb>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</CTitleBanner>
|
||||||
|
|
||||||
<CTitleBanner
|
<CTitleBanner
|
||||||
class="q-pa-xs" title="Competenze e Talenti" bgcolor="bg-primary" clcolor="text-white"
|
class="q-pa-xs" title="Competenze e Talenti" bgcolor="bg-primary" clcolor="text-white"
|
||||||
myclass="myshad" :canopen="true">
|
myclass="myshad" :canopen="true">
|
||||||
@@ -113,21 +151,6 @@
|
|||||||
|
|
||||||
|
|
||||||
</CTitleBanner>
|
</CTitleBanner>
|
||||||
<CTitleBanner
|
|
||||||
class="q-pa-xs" title="Informazioni su di te" bgcolor="bg-primary" clcolor="text-white"
|
|
||||||
myclass="myshad" :canopen="true">
|
|
||||||
|
|
||||||
<div class="column">
|
|
||||||
<div class="myrow">
|
|
||||||
<CMyFieldDb
|
|
||||||
title="Biografia"
|
|
||||||
table="users"
|
|
||||||
mykey="profile"
|
|
||||||
mysubkey="biografia"
|
|
||||||
:type="costanti.FieldType.string">
|
|
||||||
</CMyFieldDb>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<div class="column">
|
<div class="column">
|
||||||
@@ -188,8 +211,6 @@
|
|||||||
</div>
|
</div>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
</CTitleBanner>
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<CTitleBanner class="q-pa-xs" :title="$t('pages.payment')" bgcolor="bg-primary" clcolor="text-white"
|
<CTitleBanner class="q-pa-xs" :title="$t('pages.payment')" bgcolor="bg-primary" clcolor="text-white"
|
||||||
myclass="myshad" :canopen="true">
|
myclass="myshad" :canopen="true">
|
||||||
@@ -272,11 +293,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" src="./profile.ts">
|
<script lang="ts" src="./editprofile.ts">
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import './profile.scss';
|
@import './editprofile.scss';
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
18
src/views/user/myprofile/myprofile.scss
Executable file
18
src/views/user/myprofile/myprofile.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.imgprofile{
|
||||||
|
border: 4px solid rgb(29, 118, 13);
|
||||||
|
border-radius: 16px;
|
||||||
|
box-shadow: 0 0 45px rgba(246, 246, 246, 0.2);
|
||||||
|
}
|
||||||
88
src/views/user/myprofile/myprofile.ts
Executable file
88
src/views/user/myprofile/myprofile.ts
Executable file
@@ -0,0 +1,88 @@
|
|||||||
|
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
||||||
|
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||||
|
import { CProfile } from '@/components/CProfile'
|
||||||
|
import { CSkill } from '@/components/CSkill'
|
||||||
|
import { CDateTime } from '@/components/CDateTime'
|
||||||
|
import { tools } from '@store/Modules/tools'
|
||||||
|
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
|
||||||
|
import { useUserStore } from '@store/UserStore'
|
||||||
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
|
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 { IUserFields } from 'model'
|
||||||
|
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: 'myuser',
|
||||||
|
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime },
|
||||||
|
props: {},
|
||||||
|
setup() {
|
||||||
|
const userStore = useUserStore()
|
||||||
|
const $route = useRoute()
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
|
const username = computed(() => $route.params.username.toString())
|
||||||
|
|
||||||
|
const filtroutente = ref(<any[]>[])
|
||||||
|
const showPic = ref(false)
|
||||||
|
|
||||||
|
const myuser = ref(<IUserFields>{})
|
||||||
|
|
||||||
|
function profile() {
|
||||||
|
return userStore.my.profile
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadProfile() {
|
||||||
|
// Carica il profilo di quest'utente
|
||||||
|
if (username.value) {
|
||||||
|
userStore.loadUserProfile(username.value).then((ris) => {
|
||||||
|
myuser.value = ris
|
||||||
|
filtroutente.value = [{ userId: myuser.value._id }]
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(() => username, (to: any, from: any) => {
|
||||||
|
loadProfile()
|
||||||
|
})
|
||||||
|
|
||||||
|
function mounted() {
|
||||||
|
loadProfile()
|
||||||
|
}
|
||||||
|
|
||||||
|
function getImgUser() {
|
||||||
|
return userStore.getImgByProfile(myuser.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkifShow(col: string) {
|
||||||
|
//++Todo: checkifShow Permessi !
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
function getLinkUserTelegram() {
|
||||||
|
|
||||||
|
if (!!myuser.value.profile.username_telegram) {
|
||||||
|
return 'https://t.me/' + myuser.value.profile.username_telegram
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(mounted)
|
||||||
|
|
||||||
|
return {
|
||||||
|
username,
|
||||||
|
profile,
|
||||||
|
tools,
|
||||||
|
costanti,
|
||||||
|
myuser,
|
||||||
|
getImgUser,
|
||||||
|
checkifShow,
|
||||||
|
getLinkUserTelegram,
|
||||||
|
filtroutente,
|
||||||
|
showPic,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
105
src/views/user/myprofile/myprofile.vue
Executable file
105
src/views/user/myprofile/myprofile.vue
Executable file
@@ -0,0 +1,105 @@
|
|||||||
|
<template>
|
||||||
|
<div class="q-gutter-sm q-pa-sm q-pb-md">
|
||||||
|
|
||||||
|
<div v-if="myuser.profile" class="fit column no-wrap justify-evenly items-center content-start">
|
||||||
|
|
||||||
|
<div class="">
|
||||||
|
<q-avatar size="140px">
|
||||||
|
<img :src="getImgUser()" :alt="username" class="imgprofile" @click="showPic = true">
|
||||||
|
</q-avatar>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="text-h6">
|
||||||
|
<span v-if="checkifShow('name')"> {{ myuser.name }}</span> <span v-if="checkifShow('surname')">{{
|
||||||
|
myuser.surname
|
||||||
|
}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 text-h8 text-grey">
|
||||||
|
{{ myuser.username }}
|
||||||
|
</div>
|
||||||
|
<div class="col-12 text-h7">
|
||||||
|
{{ myuser.profile.born_city }} ({{ myuser.profile.nationality }})
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12 text-h8 q-mt-sm">
|
||||||
|
{{ myuser.profile.biografia }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12 row justify-evenly q-mt-md">
|
||||||
|
<q-btn
|
||||||
|
v-if="getLinkUserTelegram()" icon="fab fa-telegram"
|
||||||
|
color="blue" type="a"
|
||||||
|
size="md"
|
||||||
|
rounded
|
||||||
|
:label="$t('msgs.message')"
|
||||||
|
:href="getLinkUserTelegram()" target="__blank">
|
||||||
|
</q-btn>
|
||||||
|
<q-btn
|
||||||
|
v-if="false"
|
||||||
|
icon="fab fa-telegram"
|
||||||
|
color="white"
|
||||||
|
text-color="black"
|
||||||
|
size="md"
|
||||||
|
rounded>
|
||||||
|
</q-btn>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<CTitleBanner
|
||||||
|
class="" :title="$t('dashboard.info')" bgcolor="bg-primary" clcolor="text-white"
|
||||||
|
myclass="myshad" :canopen="true">
|
||||||
|
|
||||||
|
<div v-if="myuser.profile" class="fit column no-wrap justify-evenly content-start">
|
||||||
|
|
||||||
|
<div class="col-6 text-h6">
|
||||||
|
<CDateTime
|
||||||
|
v-if="checkifShow('profile.dateofbirth')"
|
||||||
|
v-model:value="myuser.profile.dateofbirth"
|
||||||
|
:label="$t('reg.dateofbirth')"
|
||||||
|
:canEdit="false">
|
||||||
|
</CDateTime>
|
||||||
|
|
||||||
|
<div v-if="myuser.profile.born_city"
|
||||||
|
class="col-6 text-h7">
|
||||||
|
{{ myuser.profile.born_city }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</CTitleBanner>
|
||||||
|
|
||||||
|
<CTitleBanner
|
||||||
|
class="" title="Competenze e Talenti" bgcolor="bg-primary" clcolor="text-white"
|
||||||
|
myclass="myshad" :canopen="true">
|
||||||
|
|
||||||
|
<CSkill
|
||||||
|
:filtercustom="filtroutente"
|
||||||
|
:butt_modif_new="false"
|
||||||
|
>
|
||||||
|
|
||||||
|
</CSkill>
|
||||||
|
|
||||||
|
|
||||||
|
</CTitleBanner>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<q-dialog
|
||||||
|
v-model="showPic"
|
||||||
|
full-height full-width
|
||||||
|
>
|
||||||
|
|
||||||
|
<img :src="getImgUser()" :alt="username" class="full-width">
|
||||||
|
|
||||||
|
</q-dialog>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" src="./myprofile.ts">
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import './myprofile.scss';
|
||||||
|
</style>
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
|
<template>
|
||||||
<div class="q-gutter-sm q-pa-xs q-pb-md">
|
<div class="q-gutter-sm q-pa-xs q-pb-md">
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user