- Pagina MySkills personale
This commit is contained in:
@@ -387,6 +387,17 @@ const baseroutes: IListRoutes[] = [
|
|||||||
inmenu: false,
|
inmenu: false,
|
||||||
infooter: false,
|
infooter: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
active: true,
|
||||||
|
order: 130,
|
||||||
|
path: '/mypage/:idskill',
|
||||||
|
materialIcon: 'fas fa-user',
|
||||||
|
name: 'pages.profile2',
|
||||||
|
component: () => import('@/views/user/mypageskill/mypageskill.vue'),
|
||||||
|
meta: { requiresAuth: true },
|
||||||
|
inmenu: false,
|
||||||
|
infooter: false,
|
||||||
|
},
|
||||||
/*{
|
/*{
|
||||||
active: true,
|
active: true,
|
||||||
order: 6,
|
order: 6,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="q-pa-sm bi-border-all">
|
||||||
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
<div class="q-ma-sm q-gutter-sm q-pa-xs bg-green">
|
||||||
<CGridTableRec
|
<CGridTableRec
|
||||||
v-if="searchList.length > 0"
|
v-if="searchList.length > 0"
|
||||||
prop_mytable="myskills"
|
prop_mytable="myskills"
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<!--<div class="q-pa-md items-start " style="display: inline-flex; width: 800px;"> -->
|
<!--<div class="q-pa-md items-start " style="display: inline-flex; width: 800px;"> -->
|
||||||
<div v-if="!edit">
|
<div v-if="!edit">
|
||||||
|
|
||||||
<div class="q-pa-md q-gutter-md">
|
<div class="q-pa-md q-gutter-md">
|
||||||
<q-card :class="getclass()" @click="apri">
|
<q-card :class="getclass()" @click="apri">
|
||||||
<div v-for="(mygallery, index) in getlistimages()" :key="index">
|
<div v-for="(mygallery, index) in getlistimages()" :key="index">
|
||||||
|
|||||||
@@ -70,6 +70,11 @@ export default defineComponent({
|
|||||||
required: false,
|
required: false,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
visuinpage: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
showType: {
|
showType: {
|
||||||
type: Number,
|
type: Number,
|
||||||
required: false,
|
required: false,
|
||||||
@@ -962,7 +967,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function visuIntestazCol(col: IColGridTable) {
|
function visuIntestazCol(col: IColGridTable) {
|
||||||
if (col.fieldtype === costanti.FieldType.html || col.fieldtype === costanti.FieldType.listimages) {
|
if (col.fieldtype === costanti.FieldType.html || col.fieldtype === costanti.FieldType.listimages || col.noshowlabel) {
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
return true
|
return true
|
||||||
@@ -1226,7 +1231,23 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function checkIfShowRec(rec: any) {
|
function checkIfShowRec(rec: any) {
|
||||||
return (rec._id > 0 && typeof rec._id === 'number') || rec._id !== 'number'
|
return ((rec._id > 0 && typeof rec._id === 'number') || rec._id !== 'number') && rec !== -100
|
||||||
|
}
|
||||||
|
|
||||||
|
function showColCheck(col: IColGridTable, newrec: boolean){
|
||||||
|
return (colVisib.value.includes(col.field! + col.subfield) || colVisib.value.includes(col.field + '.' + col.subfield)) &&
|
||||||
|
(!col.showOnlyNewRec || (col.showOnlyNewRec && newrec)) &&
|
||||||
|
(col.visible) &&
|
||||||
|
(!props.visuinpage || (col.visuinpage && props.visuinpage))
|
||||||
|
}
|
||||||
|
|
||||||
|
function getValueExtra(col: IColGridTable, record: any) {
|
||||||
|
if (record) {
|
||||||
|
if (col.filter_field! in record) {
|
||||||
|
return col.filter_field ? record[col.filter_field] || '' : ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ''
|
||||||
}
|
}
|
||||||
|
|
||||||
// onMounted(mounted)
|
// onMounted(mounted)
|
||||||
@@ -1302,6 +1323,8 @@ export default defineComponent({
|
|||||||
labelcombo,
|
labelcombo,
|
||||||
filter,
|
filter,
|
||||||
myvertical,
|
myvertical,
|
||||||
|
showColCheck,
|
||||||
|
getValueExtra,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
:props="props"
|
:props="props"
|
||||||
class="text-italic text-weight-bold"
|
class="text-italic text-weight-bold"
|
||||||
>
|
>
|
||||||
<span v-if="col && colVisib.includes(col.field + col.subfield)">
|
<span v-if="col && showColCheck(col, false)">
|
||||||
{{ col.label }}
|
{{ col.label }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@@ -167,7 +167,7 @@
|
|||||||
<template
|
<template
|
||||||
v-if="item.arrvalue.length >= 1"
|
v-if="item.arrvalue.length >= 1"
|
||||||
v-slot:selected-item="scope">
|
v-slot:selected-item="scope">
|
||||||
<div v-if="scope.opt[fieldsTable.getLabelByTable(item.table)]">
|
<div v-if="scope.opt[fieldsTable.getLabelByTable(item.table)] || (scope.opt && checkIfShowRec(scope.opt)) ">
|
||||||
<q-chip
|
<q-chip
|
||||||
removable
|
removable
|
||||||
dense
|
dense
|
||||||
@@ -178,7 +178,7 @@
|
|||||||
class="q-my-none q-ml-xs q-mr-none"
|
class="q-my-none q-ml-xs q-mr-none"
|
||||||
>
|
>
|
||||||
<q-avatar color="primary" text-color="white" :icon="item.icon" size="12px"/>
|
<q-avatar color="primary" text-color="white" :icon="item.icon" size="12px"/>
|
||||||
{{ scope.opt[fieldsTable.getLabelByTable(item.table)] }}
|
{{ scope.opt[fieldsTable.getLabelByTable(item.table)] || (scope.opt) }}
|
||||||
</q-chip>
|
</q-chip>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -252,7 +252,7 @@
|
|||||||
<q-td
|
<q-td
|
||||||
v-for="col in mycolumns" :key="col.name" :props="props">
|
v-for="col in mycolumns" :key="col.name" :props="props">
|
||||||
<div
|
<div
|
||||||
v-if="colVisib.includes(col.field + col.subfield)" class="tdclass">
|
v-if="showColCheck(col, false)" class="tdclass">
|
||||||
<div :class="getclrow(props.row)">
|
<div :class="getclrow(props.row)">
|
||||||
<CMyPopupEdit
|
<CMyPopupEdit
|
||||||
:table="mytable"
|
:table="mytable"
|
||||||
@@ -307,8 +307,8 @@
|
|||||||
:style="props.selected ? 'transform: scale(0.95);' : ''"
|
:style="props.selected ? 'transform: scale(0.95);' : ''"
|
||||||
>
|
>
|
||||||
<q-card :class="props.selected ? 'bg-grey-2' : ''" style="min-width: 200px;">
|
<q-card :class="props.selected ? 'bg-grey-2' : ''" style="min-width: 200px;">
|
||||||
<q-bar dense class="bg-primary text-white">
|
<q-bar v-if="!visuinpage" dense class="bg-primary text-white full-height">
|
||||||
<span class="ellipsis"> {{ props.row[col_title] }} </span>
|
<span class=""> {{ props.row[col_title] }} </span>
|
||||||
<q-space/>
|
<q-space/>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="canModifyThisRec(props.row)"
|
v-if="canModifyThisRec(props.row)"
|
||||||
@@ -328,10 +328,15 @@
|
|||||||
<q-list dense>
|
<q-list dense>
|
||||||
<div v-for="col in mycolumns" :key="col.name">
|
<div v-for="col in mycolumns" :key="col.name">
|
||||||
|
|
||||||
<q-item v-if="colVisib.includes(col.field + col.subfield) &&
|
<q-item v-if="showColCheck(col, false) &&
|
||||||
(!col.noshowifnone || (col.noshowifnone && tools.getValue(props.row,col.field, col.subfield)))"
|
(!col.noshowifnone || (col.noshowifnone && tools.getValue(props.row,col.field, col.subfield))
|
||||||
|
)"
|
||||||
:class="clByCol(col)" class="riduci_pad">
|
:class="clByCol(col)" class="riduci_pad">
|
||||||
|
|
||||||
|
<q-item-section avatar v-if="col.icon">
|
||||||
|
<q-item-label class="q-table__col"><q-icon :name="col.icon"></q-icon></q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
|
||||||
<q-item-section avatar v-if="visuIntestazCol(col)">
|
<q-item-section avatar v-if="visuIntestazCol(col)">
|
||||||
<q-item-label class="q-table__col">{{ col.label }}</q-item-label>
|
<q-item-label class="q-table__col">{{ col.label }}</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
@@ -373,7 +378,7 @@
|
|||||||
<div
|
<div
|
||||||
class="q-ma-xs q-pa-xs text-center rounded-borders q-list--bordered"
|
class="q-ma-xs q-pa-xs text-center rounded-borders q-list--bordered"
|
||||||
v-for="mycol in mycolumns" :key="mycol.name">
|
v-for="mycol in mycolumns" :key="mycol.name">
|
||||||
<div v-if="colVisib.includes(mycol.field + mycol.subfield)">
|
<div v-if="showColCheck(mycol, false)">
|
||||||
<div class="row items-center justify-center q-gutter-md q-ma-xs">
|
<div class="row items-center justify-center q-gutter-md q-ma-xs">
|
||||||
<div class="q-ma-xs">
|
<div class="q-ma-xs">
|
||||||
<q-field rounded outlined bg-color="orange-3" dense>
|
<q-field rounded outlined bg-color="orange-3" dense>
|
||||||
@@ -386,6 +391,7 @@
|
|||||||
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 rounded-borders " style="border: 1px solid #bbb"
|
||||||
@click="colclicksel = mycol">
|
@click="colclicksel = mycol">
|
||||||
|
|
||||||
|
mycol : {{mycol}}
|
||||||
<CMyPopupEdit
|
<CMyPopupEdit
|
||||||
:table="mytable"
|
:table="mytable"
|
||||||
:canEdit="true"
|
:canEdit="true"
|
||||||
@@ -395,7 +401,7 @@
|
|||||||
:mycol="mycol"
|
:mycol="mycol"
|
||||||
:showall="true"
|
:showall="true"
|
||||||
:row="rowclicksel"
|
:row="rowclicksel"
|
||||||
:tablesel="col.tablesel"
|
:tablesel="mycol.tablesel"
|
||||||
:field="mycol.field"
|
:field="mycol.field"
|
||||||
:subfield="mycol.subfield"
|
:subfield="mycol.subfield"
|
||||||
@save="SaveValdb"
|
@save="SaveValdb"
|
||||||
@@ -420,7 +426,7 @@
|
|||||||
<div
|
<div
|
||||||
v-for="col in mycolumns" :key="col.name" class="newrec_fields">
|
v-for="col in mycolumns" :key="col.name" class="newrec_fields">
|
||||||
<div
|
<div
|
||||||
v-if="colVisib.includes(col.field + col.subfield) && col.foredit">
|
v-if="showColCheck(col, true) && col.foredit">
|
||||||
<div class="">
|
<div class="">
|
||||||
<CMyPopupEdit
|
<CMyPopupEdit
|
||||||
:table="mytable"
|
:table="mytable"
|
||||||
@@ -431,6 +437,7 @@
|
|||||||
:field="col.field"
|
:field="col.field"
|
||||||
:subfield="col.subfield"
|
:subfield="col.subfield"
|
||||||
:tablesel="col.tablesel"
|
:tablesel="col.tablesel"
|
||||||
|
:value_extra="getValueExtra(col, newRecord)"
|
||||||
:isInModif="true"
|
:isInModif="true"
|
||||||
minuteinterval="1"
|
minuteinterval="1"
|
||||||
:visulabel="true"
|
:visulabel="true"
|
||||||
@@ -452,7 +459,7 @@
|
|||||||
</q-dialog>
|
</q-dialog>
|
||||||
<q-dialog v-model="editRecordBool">
|
<q-dialog v-model="editRecordBool">
|
||||||
<q-card class="dialog_card">
|
<q-card class="dialog_card">
|
||||||
<q-bar dense class="bg-primary text-white">
|
<q-bar dense class="bg-primary text-white full-height">
|
||||||
<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>
|
||||||
<q-space/>
|
<q-space/>
|
||||||
@@ -462,7 +469,7 @@
|
|||||||
<div
|
<div
|
||||||
v-for="col in mycolumns" :key="col.name">
|
v-for="col in mycolumns" :key="col.name">
|
||||||
<div
|
<div
|
||||||
v-if="colVisib.includes(col.field + col.subfield) && col.foredit">
|
v-if="showColCheck(col, false) && col.foredit">
|
||||||
<div>
|
<div>
|
||||||
<CMyPopupEdit
|
<CMyPopupEdit
|
||||||
:table="mytable"
|
:table="mytable"
|
||||||
@@ -474,6 +481,7 @@
|
|||||||
v-model:row="recModif"
|
v-model:row="recModif"
|
||||||
:field="col.field"
|
:field="col.field"
|
||||||
:subfield="col.subfield"
|
:subfield="col.subfield"
|
||||||
|
:value_extra="getValueExtra(col, recModif)"
|
||||||
minuteinterval="1"
|
minuteinterval="1"
|
||||||
@save="SaveValue"
|
@save="SaveValue"
|
||||||
@show="selItem(recModif, col, true)"
|
@show="selItem(recModif, col, true)"
|
||||||
|
|||||||
@@ -120,6 +120,16 @@ export default defineComponent({
|
|||||||
required: false,
|
required: false,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
|
field_extra: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
value_extra: {
|
||||||
|
type: [String, Number],
|
||||||
|
required: false,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
table: {
|
table: {
|
||||||
type: String,
|
type: String,
|
||||||
required: false,
|
required: false,
|
||||||
@@ -511,7 +521,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function visInNewRec(col: any) {
|
function visInNewRec(col: any) {
|
||||||
return !col.notShowInNewRec
|
return (!col.notShowInNewRec || (col.showOnlyNewRec && props.insertMode)) && (!col.noShowView || (col.noShowView && props.isInModif))
|
||||||
}
|
}
|
||||||
|
|
||||||
function getclassCol(col: any) {
|
function getclassCol(col: any) {
|
||||||
@@ -637,6 +647,7 @@ export default defineComponent({
|
|||||||
fieldsTable,
|
fieldsTable,
|
||||||
onInput,
|
onInput,
|
||||||
globalStore,
|
globalStore,
|
||||||
|
userStore,
|
||||||
getTitleGall,
|
getTitleGall,
|
||||||
getDirectoryGall,
|
getDirectoryGall,
|
||||||
removephoto,
|
removephoto,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<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 && !col.showOnlyNewRec && !col.noShowView) " style="flex-grow: 1;">
|
||||||
<div
|
<div
|
||||||
:class="{ flex: !isInModif, 'justify-center': true }">
|
:class="{ flex: !isInModif, 'justify-center': true }">
|
||||||
<div>
|
<div>
|
||||||
@@ -50,16 +50,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
|
|
||||||
<q-btn v-if="col.tipovisu === costanti.TipoVisu.LINK && myvalue" type="a" rounded dense size="sm"
|
<q-btn v-if="col.tipovisu === costanti.TipoVisu.LINK && myvalue"
|
||||||
color="white" text-color="blue" icon="person" :to="col.link.replace(col.name, myvalue)">
|
type="a" rounded size="md"
|
||||||
<span :class="{disabled: disable }">{{ myvalue }}</span>
|
:class="{disabled: disable }"
|
||||||
|
color="white" text-color="blue" :icon="`img:`+userStore.getImgByUsername(myvalue)" :to="col.link.replace(col.name, myvalue)"
|
||||||
|
:label="myvalue"
|
||||||
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-avatar v-else-if="col.tipovisu === costanti.TipoVisu.LINKIMG && myvalue" size="60px">
|
<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-img :src="getImgUser(contact)" :alt="myvalue" img-class="imgprofile" height="60px"/>
|
||||||
</q-avatar>
|
</q-avatar>
|
||||||
<q-btn v-else-if="col.tipovisu === costanti.TipoVisu.BUTTON && myvalue" rounded dense size="sm"
|
<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)">{{ myvalue }}
|
color="primary" icon="person" :to="col.link.replace(col.name, myvalue)" :label="myvalue">
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<span v-else :class="{disabled: disable }" v-html="visuValByType(myvalue, col, row)"></span>
|
<span v-else :class="{disabled: disable }" v-html="visuValByType(myvalue, col, row)"></span>
|
||||||
</div>
|
</div>
|
||||||
@@ -108,8 +111,8 @@
|
|||||||
:title="getTitleGall()"
|
:title="getTitleGall()"
|
||||||
:directory="getDirectoryGall()"
|
:directory="getDirectoryGall()"
|
||||||
:imgGall="myvalue"
|
:imgGall="myvalue"
|
||||||
:edit="isviewfield()"
|
:edit="isviewfield() && isInModif"
|
||||||
:canModify="canModify"
|
:canModify="canModify && isInModif"
|
||||||
@showandsave="Savedb">
|
@showandsave="Savedb">
|
||||||
</CGallery>
|
</CGallery>
|
||||||
</div>
|
</div>
|
||||||
@@ -250,6 +253,9 @@
|
|||||||
:multiple="true"
|
:multiple="true"
|
||||||
:withToggle="true"
|
:withToggle="true"
|
||||||
:label="col.label"
|
:label="col.label"
|
||||||
|
:filter_table="col.filter_table"
|
||||||
|
:filter_field="col.filter_field"
|
||||||
|
:value_extra="value_extra"
|
||||||
v-model:arrvalue="myvalue"
|
v-model:arrvalue="myvalue"
|
||||||
@update:arrvalue="changevalRec"
|
@update:arrvalue="changevalRec"
|
||||||
:addall="false"
|
:addall="false"
|
||||||
@@ -313,6 +319,9 @@
|
|||||||
:pickup="col.fieldtype === costanti.FieldType.select_by_server"
|
:pickup="col.fieldtype === costanti.FieldType.select_by_server"
|
||||||
:tablesel="col.type === costanti.FieldType.select_by_server ? tablesel : ''"
|
:tablesel="col.type === costanti.FieldType.select_by_server ? tablesel : ''"
|
||||||
@update:value="changevalRec"
|
@update:value="changevalRec"
|
||||||
|
:filter_table="col.filter_table"
|
||||||
|
:filter_field="col.filter_field"
|
||||||
|
:value_extra="value_extra"
|
||||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
||||||
@@ -340,6 +349,9 @@
|
|||||||
:addall="false"
|
:addall="false"
|
||||||
:tablesel="col.tablesel"
|
:tablesel="col.tablesel"
|
||||||
:pickup="true"
|
:pickup="true"
|
||||||
|
:filter_table="col.filter_table"
|
||||||
|
:filter_field="col.filter_field"
|
||||||
|
:value_extra="value_extra"
|
||||||
label-color="primary"
|
label-color="primary"
|
||||||
class="combowidth"
|
class="combowidth"
|
||||||
color="primary"
|
color="primary"
|
||||||
@@ -356,6 +368,9 @@
|
|||||||
:label="col.label"
|
:label="col.label"
|
||||||
v-model:value="myvalue"
|
v-model:value="myvalue"
|
||||||
@update:value="changevalRec"
|
@update:value="changevalRec"
|
||||||
|
:filter_table="col.filter_table"
|
||||||
|
:filter_field="col.filter_field"
|
||||||
|
:value_extra="value_extra"
|
||||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
||||||
@@ -385,7 +400,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<div v-if="!isFieldDb()">
|
<div v-if="!isFieldDb()">
|
||||||
<CMyEditor
|
<CMyEditor
|
||||||
v-model:value="myvalue" :title="getTitleEditor(col, row)" @keyup.enter.stop
|
v-model:value="myvalue" :title="getTitleEditor(col, row) && !isInModif" @keyup.enter.stop
|
||||||
:showButtons="false"
|
:showButtons="false"
|
||||||
:canModify="canModify"
|
:canModify="canModify"
|
||||||
@update:value="changevalRec"
|
@update:value="changevalRec"
|
||||||
@@ -394,18 +409,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<q-btn
|
<div class="row justify-evenly">
|
||||||
v-if="myvalue"
|
<q-btn
|
||||||
:label="$t('cal.details')" color="primary" text-color="white"
|
v-if="myvalue"
|
||||||
@click="visuhtml = true">
|
class="q-mx-md"
|
||||||
</q-btn>
|
icon="fas fa-info" color="primary" text-color="white"
|
||||||
|
round
|
||||||
|
@click="visuhtml = true">
|
||||||
|
</q-btn>
|
||||||
|
|
||||||
|
<q-btn
|
||||||
|
v-if="myvalue && col.field_extra1"
|
||||||
|
icon="far fa-file-alt" :label="col.titlepopupedit" color="primary" text-color="white"
|
||||||
|
:to="`/mypage/`+row['_id']"
|
||||||
|
>
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
<!--<div v-html="visuValByType(myvalue, col, row)" @click="visueditor = true"></div>-->
|
<!--<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>
|
<q-dialog v-model="visuhtml" full-height full-width>
|
||||||
<q-card>
|
<q-card>
|
||||||
<q-bar dense class="bg-primary text-white">
|
<q-bar dense class="bg-primary text-white">
|
||||||
<span class="ellipsis"> {{ getTitleEditor(col, row) }} </span>
|
<span> {{ getTitleEditor(col, row) }} </span>
|
||||||
<q-space/>
|
<q-space/>
|
||||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||||
</q-bar>
|
</q-bar>
|
||||||
@@ -528,6 +554,9 @@
|
|||||||
v-model:value="scope.value"
|
v-model:value="scope.value"
|
||||||
:pickup="col.fieldtype === costanti.FieldType.select_by_server"
|
:pickup="col.fieldtype === costanti.FieldType.select_by_server"
|
||||||
:tablesel="col.type === costanti.FieldType.select_by_server ? tablesel : ''"
|
:tablesel="col.type === costanti.FieldType.select_by_server ? tablesel : ''"
|
||||||
|
:filter_table="col.filter_table"
|
||||||
|
:filter_field="col.filter_field"
|
||||||
|
:value_extra="value_extra"
|
||||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
||||||
@@ -542,6 +571,9 @@
|
|||||||
@update:arrvalue="changevalRec"
|
@update:arrvalue="changevalRec"
|
||||||
:addall="false"
|
:addall="false"
|
||||||
:tablesel="tablesel"
|
:tablesel="tablesel"
|
||||||
|
:filter_table="col.filter_table"
|
||||||
|
:filter_field="col.filter_field"
|
||||||
|
:value_extra="value_extra"
|
||||||
:pickup="true"
|
:pickup="true"
|
||||||
label-color="primary"
|
label-color="primary"
|
||||||
class="combowidth"
|
class="combowidth"
|
||||||
@@ -589,6 +621,9 @@
|
|||||||
v-model:value="scope.value"
|
v-model:value="scope.value"
|
||||||
@update:value="changevalRec"
|
@update:value="changevalRec"
|
||||||
:tablesel="tablesel"
|
:tablesel="tablesel"
|
||||||
|
:filter_table="col.filter_table"
|
||||||
|
:filter_field="col.filter_field"
|
||||||
|
:value_extra="value_extra"
|
||||||
:pickup="pickup"
|
:pickup="pickup"
|
||||||
:optval="fieldsTable.getKeyByTable(tablesel)"
|
:optval="fieldsTable.getKeyByTable(tablesel)"
|
||||||
:optlab="fieldsTable.getLabelByTable(tablesel)"
|
:optlab="fieldsTable.getLabelByTable(tablesel)"
|
||||||
|
|||||||
@@ -37,6 +37,26 @@ export default defineComponent({
|
|||||||
required: false,
|
required: false,
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
|
type: {
|
||||||
|
type: Number,
|
||||||
|
required: false,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
filter_table: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
filter_field: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
value_extra: {
|
||||||
|
type: [String, Number],
|
||||||
|
required: false,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
optlab: [String, Function],
|
optlab: [String, Function],
|
||||||
optval: {
|
optval: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -121,7 +141,7 @@ export default defineComponent({
|
|||||||
if (!props.multiselect_by_server) {
|
if (!props.multiselect_by_server) {
|
||||||
valori.value = valoriload.value
|
valori.value = valoriload.value
|
||||||
} else {
|
} else {
|
||||||
console.log('@@@ VALORI CHANGED (1)', valori.value)
|
// console.log('@@@ VALORI CHANGED (1)', valori.value)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
@@ -202,7 +222,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function mounted() {
|
function mounted() {
|
||||||
console.log(' #### mounted myselect', props.options, 'arrvalue', myarrvalue.value)
|
// console.log(' #### mounted myselect', props.options, 'arrvalue', myarrvalue.value)
|
||||||
let rec: any
|
let rec: any
|
||||||
if (props.options) {
|
if (props.options) {
|
||||||
if (!props.multiselect_by_server) {
|
if (!props.multiselect_by_server) {
|
||||||
@@ -254,7 +274,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
console.log('@@@ VALORI CHANGED (4)', valori.value)
|
// console.log('@@@ VALORI CHANGED (4)', valori.value)
|
||||||
if (!props.multiselect_by_server) {
|
if (!props.multiselect_by_server) {
|
||||||
valori.value = valoriload.value
|
valori.value = valoriload.value
|
||||||
} else {
|
} else {
|
||||||
@@ -269,7 +289,45 @@ export default defineComponent({
|
|||||||
console.log('Filter val', val, val.length)
|
console.log('Filter val', val, val.length)
|
||||||
let myarr: any = []
|
let myarr: any = []
|
||||||
|
|
||||||
if (val.length <= 1) {
|
if (!fieldsTable.tableRemotePickup.includes(props.tablesel)) {
|
||||||
|
myarr = props.options
|
||||||
|
|
||||||
|
let needle: any = props.value_extra
|
||||||
|
|
||||||
|
// console.log('needle', needle)
|
||||||
|
if (props.filter_table) {
|
||||||
|
// console.log(' FILTERTABLE', props.filter_field, myarr)
|
||||||
|
if (props.multiple) {
|
||||||
|
myarr = myarr.filter((rec: any) => rec[props.filter_field] === needle)
|
||||||
|
} else {
|
||||||
|
myarr = myarr.filter((rec: any) => rec[props.filter_field].includes(needle))
|
||||||
|
}
|
||||||
|
// console.log(' RISSSSSSSSS: ', myarr)
|
||||||
|
}
|
||||||
|
if (props.addall) {
|
||||||
|
let myobj: any = {}
|
||||||
|
if (typeof props.optlab === 'string') {
|
||||||
|
myobj[props.optlab] = '(Tutti)'
|
||||||
|
myobj[props.optval] = costanti.FILTER_TUTTI
|
||||||
|
}
|
||||||
|
|
||||||
|
if (myarr)
|
||||||
|
myarr = [myobj, ...myarr]
|
||||||
|
// console.log(' myarr: ', myarr)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (myarr && myarr.length > 0) {
|
||||||
|
valori.value = myarr
|
||||||
|
} else {
|
||||||
|
if (props.filter_table) {
|
||||||
|
valori.value = []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (val.length <= 1) {
|
||||||
console.log('@@@ LENGTH <= 1')
|
console.log('@@@ LENGTH <= 1')
|
||||||
abort()
|
abort()
|
||||||
return
|
return
|
||||||
@@ -296,8 +354,6 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
// const needle = val.toLocaleLowerCase()
|
// const needle = val.toLocaleLowerCase()
|
||||||
// optFiltered.value = optFiltered.value.filter((v: any) => v.toLocaleLowerCase().indexOf(needle) > -1)
|
// optFiltered.value = optFiltered.value.filter((v: any) => v.toLocaleLowerCase().indexOf(needle) > -1)
|
||||||
} else {
|
|
||||||
myarr = props.options
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.addall) {
|
if (props.addall) {
|
||||||
@@ -313,7 +369,7 @@ export default defineComponent({
|
|||||||
if (myarr && myarr.length > 0) {
|
if (myarr && myarr.length > 0) {
|
||||||
valori.value = myarr
|
valori.value = myarr
|
||||||
if (props.multiselect_by_server) {
|
if (props.multiselect_by_server) {
|
||||||
console.log('@@@ VALORI CHANGED (3)', valori.value)
|
// console.log('@@@ VALORI CHANGED (3)', valori.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -114,6 +114,7 @@
|
|||||||
@update:model-value="changeval"
|
@update:model-value="changeval"
|
||||||
rounded
|
rounded
|
||||||
outlined
|
outlined
|
||||||
|
@filter="filterFn"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
:input-class="myclass"
|
:input-class="myclass"
|
||||||
:use-input="useinput"
|
:use-input="useinput"
|
||||||
@@ -149,7 +150,6 @@
|
|||||||
v-if="withToggle"
|
v-if="withToggle"
|
||||||
v-slot:option="{ itemProps, opt, selected, toggleOption }">
|
v-slot:option="{ itemProps, opt, selected, toggleOption }">
|
||||||
<q-item v-bind="itemProps">
|
<q-item v-bind="itemProps">
|
||||||
|
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label>{{ opt[optlab] }}</q-item-label>
|
<q-item-label>{{ opt[optlab] }}</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
@@ -174,6 +174,7 @@
|
|||||||
:option-value="optval"
|
:option-value="optval"
|
||||||
:option-label="optlab"
|
:option-label="optlab"
|
||||||
@update:model-value="changeval"
|
@update:model-value="changeval"
|
||||||
|
@filter="filterFn"
|
||||||
:label="label"
|
:label="label"
|
||||||
emit-value
|
emit-value
|
||||||
options-selected-class="text-deep-orange"
|
options-selected-class="text-deep-orange"
|
||||||
|
|||||||
@@ -25,6 +25,11 @@ export default defineComponent({
|
|||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
visuinpage: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
username: {
|
username: {
|
||||||
type: String,
|
type: String,
|
||||||
required: false,
|
required: false,
|
||||||
@@ -95,8 +100,12 @@ export default defineComponent({
|
|||||||
lk_as,
|
lk_as,
|
||||||
af_objId_tab,
|
af_objId_tab,
|
||||||
lk_proj: {
|
lk_proj: {
|
||||||
|
recSkill: 1,
|
||||||
|
sector: 1,
|
||||||
idSkill: 1,
|
idSkill: 1,
|
||||||
idSubSkill: 1,
|
idSubSkill: 1,
|
||||||
|
idStatusSkill: 1,
|
||||||
|
idContribType: 1,
|
||||||
idCity: 1,
|
idCity: 1,
|
||||||
numLevel: 1,
|
numLevel: 1,
|
||||||
photos: 1,
|
photos: 1,
|
||||||
@@ -104,11 +113,12 @@ export default defineComponent({
|
|||||||
subTitle: 1,
|
subTitle: 1,
|
||||||
date_created: 1,
|
date_created: 1,
|
||||||
date_updated: 1,
|
date_updated: 1,
|
||||||
comune: 1,
|
|
||||||
userId: 1,
|
userId: 1,
|
||||||
username: 1,
|
username: 1,
|
||||||
name: 1,
|
name: 1,
|
||||||
surname: 1,
|
surname: 1,
|
||||||
|
comune: 1,
|
||||||
|
mycities: 1,
|
||||||
'profile.img': 1,
|
'profile.img': 1,
|
||||||
'profile.qualifica': 1,
|
'profile.qualifica': 1,
|
||||||
}
|
}
|
||||||
@@ -120,8 +130,12 @@ export default defineComponent({
|
|||||||
lk_as: 'comune',
|
lk_as: 'comune',
|
||||||
af_objId_tab: '',
|
af_objId_tab: '',
|
||||||
lk_proj: {
|
lk_proj: {
|
||||||
|
recSkill: 1,
|
||||||
|
sector: 1,
|
||||||
idSkill: 1,
|
idSkill: 1,
|
||||||
idSubSkill: 1,
|
idSubSkill: 1,
|
||||||
|
idStatusSkill: 1,
|
||||||
|
idContribType: 1,
|
||||||
idCity: 1,
|
idCity: 1,
|
||||||
numLevel: 1,
|
numLevel: 1,
|
||||||
photos: 1,
|
photos: 1,
|
||||||
|
|||||||
@@ -9,9 +9,11 @@
|
|||||||
prop_colkey="idSkill"
|
prop_colkey="idSkill"
|
||||||
col_title="subTitle"
|
col_title="subTitle"
|
||||||
:vertical="true"
|
:vertical="true"
|
||||||
:choose_visutype="true"
|
:choose_visutype="!visuinpage"
|
||||||
|
:butt_modif_new="!visuinpage"
|
||||||
nodataLabel="Nessuna Competenza inserita"
|
nodataLabel="Nessuna Competenza inserita"
|
||||||
:prop_search="false"
|
:prop_search="false"
|
||||||
|
:visuinpage="visuinpage"
|
||||||
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"
|
||||||
|
|||||||
@@ -868,9 +868,9 @@ $heightBtn: 100%;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.combowidth {
|
.combowidth {
|
||||||
min-width: 150px;
|
min-width: 100px;
|
||||||
@media (max-width: 450px) {
|
@media (max-width: 450px) {
|
||||||
min-width: 300px;
|
min-width: 250px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -433,6 +433,17 @@ const baseroutes: IListRoutes[] = [
|
|||||||
inmenu: false,
|
inmenu: false,
|
||||||
infooter: false,
|
infooter: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
active: true,
|
||||||
|
order: 130,
|
||||||
|
path: '/mypage/:idSkill',
|
||||||
|
materialIcon: 'fas fa-user',
|
||||||
|
name: 'pages.profile2',
|
||||||
|
component: () => import('@/views/user/mypageskill/mypageskill.vue'),
|
||||||
|
meta: { requiresAuth: true },
|
||||||
|
inmenu: false,
|
||||||
|
infooter: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
active: true,
|
active: true,
|
||||||
order: 2000,
|
order: 2000,
|
||||||
|
|||||||
@@ -495,6 +495,7 @@ export interface IColGridTable {
|
|||||||
askaction?: string
|
askaction?: string
|
||||||
foredit?: boolean
|
foredit?: boolean
|
||||||
fieldtype?: number
|
fieldtype?: number
|
||||||
|
noshowlabel?: boolean
|
||||||
tipovisu?: number
|
tipovisu?: number
|
||||||
link?: string
|
link?: string
|
||||||
jointable?: string
|
jointable?: string
|
||||||
@@ -506,6 +507,9 @@ export interface IColGridTable {
|
|||||||
notShowInNewRec?: boolean
|
notShowInNewRec?: boolean
|
||||||
tablesel?: string
|
tablesel?: string
|
||||||
notsave?: boolean
|
notsave?: boolean
|
||||||
|
showOnlyNewRec?: boolean
|
||||||
|
visuinpage?: boolean
|
||||||
|
noShowView?: boolean
|
||||||
maxlength?: number
|
maxlength?: number
|
||||||
filter_table?: string
|
filter_table?: string
|
||||||
filter_field?: string
|
filter_field?: string
|
||||||
|
|||||||
@@ -409,6 +409,8 @@ const msg_it = {
|
|||||||
note_payment: 'Note Aggiuntive',
|
note_payment: 'Note Aggiuntive',
|
||||||
country_pay: 'Paese di Destinazione Pagamenti',
|
country_pay: 'Paese di Destinazione Pagamenti',
|
||||||
username_telegram: 'Username Telegram',
|
username_telegram: 'Username Telegram',
|
||||||
|
firstname_telegram: 'Nome Telegram',
|
||||||
|
lastname_telegram: 'Cognome Telegram',
|
||||||
telegram: 'Chat Telegram \'{botname}\'',
|
telegram: 'Chat Telegram \'{botname}\'',
|
||||||
teleg_id: 'Telegram ID',
|
teleg_id: 'Telegram ID',
|
||||||
teleg_id_old: 'OLD Tel ID',
|
teleg_id_old: 'OLD Tel ID',
|
||||||
@@ -656,6 +658,7 @@ const msg_it = {
|
|||||||
teacher: 'Condotto da',
|
teacher: 'Condotto da',
|
||||||
enterdate: 'Inserisci data',
|
enterdate: 'Inserisci data',
|
||||||
details: 'Dettagli',
|
details: 'Dettagli',
|
||||||
|
open_details: 'Apri Pagina',
|
||||||
infoextra: 'Date e Ora Extra:',
|
infoextra: 'Date e Ora Extra:',
|
||||||
alldayevent: 'Tutto il giorno',
|
alldayevent: 'Tutto il giorno',
|
||||||
eventstartdatetime: 'Inizio',
|
eventstartdatetime: 'Inizio',
|
||||||
|
|||||||
@@ -70,7 +70,11 @@ function AddCol(params: IColGridTable) {
|
|||||||
addall: (params.addall === undefined) ? false : params.addall,
|
addall: (params.addall === undefined) ? false : params.addall,
|
||||||
filter: (params.filter === undefined) ? null : params.filter,
|
filter: (params.filter === undefined) ? null : params.filter,
|
||||||
noshowifnone: (params.noshowifnone === undefined) ? false : params.noshowifnone,
|
noshowifnone: (params.noshowifnone === undefined) ? false : params.noshowifnone,
|
||||||
|
noshowlabel: (params.noshowlabel === undefined) ? false : params.noshowlabel,
|
||||||
notShowInNewRec: (params.notShowInNewRec === undefined) ? false : params.notShowInNewRec,
|
notShowInNewRec: (params.notShowInNewRec === undefined) ? false : params.notShowInNewRec,
|
||||||
|
showOnlyNewRec: (params.showOnlyNewRec === undefined) ? false : params.showOnlyNewRec,
|
||||||
|
visuinpage: (params.visuinpage === undefined) ? false : params.visuinpage,
|
||||||
|
noShowView: (params.noShowView === undefined) ? false : params.noShowView,
|
||||||
notsave: (params.notsave === undefined) ? false : params.notsave,
|
notsave: (params.notsave === undefined) ? false : params.notsave,
|
||||||
filter_table: (params.filter_table === undefined) ? '' : params.filter_table,
|
filter_table: (params.filter_table === undefined) ? '' : params.filter_table,
|
||||||
maxlength: (params.maxlength === undefined) ? 0 : params.maxlength,
|
maxlength: (params.maxlength === undefined) ? 0 : params.maxlength,
|
||||||
@@ -422,23 +426,35 @@ 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, tipovisu: costanti.TipoVisu.LINK, link: '/my/username' }),
|
AddCol({ name: 'subTitle', label_trans: 'event.title', fieldtype: costanti.FieldType.string, noshowifnone: true, maxlength: 70, noshowlabel: true, noShowView: true }),
|
||||||
/*AddCol({
|
AddCol({
|
||||||
|
name: 'photos',
|
||||||
|
label_trans: 'skill.photos',
|
||||||
|
fieldtype: costanti.FieldType.listimages,
|
||||||
|
jointable: '',
|
||||||
|
noshowifnone: true,
|
||||||
|
}),
|
||||||
|
AddCol({
|
||||||
name: 'idSector',
|
name: 'idSector',
|
||||||
label_trans: 'sectors.name',
|
label_trans: 'sectors.name',
|
||||||
fieldtype: costanti.FieldType.select,
|
fieldtype: costanti.FieldType.select,
|
||||||
required: true,
|
required: true,
|
||||||
jointable: 'sectors',
|
jointable: 'sectors',
|
||||||
|
notsave: true,
|
||||||
}), */
|
showOnlyNewRec: true,
|
||||||
AddCol({ name: 'subTitle', label_trans: 'event.title', fieldtype: costanti.FieldType.string, noshowifnone: true, maxlength: 40 }),
|
visible: true,
|
||||||
|
}),
|
||||||
AddCol({
|
AddCol({
|
||||||
name: 'idSkill',
|
name: 'idSkill',
|
||||||
label_trans: 'skill.name',
|
label_trans: 'skill.name',
|
||||||
fieldtype: costanti.FieldType.select,
|
fieldtype: costanti.FieldType.select,
|
||||||
required: true,
|
required: true,
|
||||||
jointable: 'skills',
|
jointable: 'skills',
|
||||||
// filter_table: 'sectors',
|
filter_table: 'sectors',
|
||||||
|
filter_field: 'idSector',
|
||||||
|
noshowlabel: true,
|
||||||
|
icon: 'far fa-id-card',
|
||||||
|
visuinpage: true,
|
||||||
}),
|
}),
|
||||||
AddCol({
|
AddCol({
|
||||||
name: 'idSubSkill',
|
name: 'idSubSkill',
|
||||||
@@ -448,6 +464,9 @@ export const colmySkills = [
|
|||||||
jointable: 'subskills',
|
jointable: 'subskills',
|
||||||
filter_table: 'skills',
|
filter_table: 'skills',
|
||||||
filter_field: 'idSkill',
|
filter_field: 'idSkill',
|
||||||
|
noshowlabel: true,
|
||||||
|
icon: 'fas fa-scroll',
|
||||||
|
visuinpage: true,
|
||||||
}),
|
}),
|
||||||
AddCol({
|
AddCol({
|
||||||
name: 'numLevel',
|
name: 'numLevel',
|
||||||
@@ -456,6 +475,9 @@ export const colmySkills = [
|
|||||||
required: true,
|
required: true,
|
||||||
jointable: 'levels',
|
jointable: 'levels',
|
||||||
noshowifnone: true,
|
noshowifnone: true,
|
||||||
|
noshowlabel: true,
|
||||||
|
icon: 'fas fa-layer-group',
|
||||||
|
visuinpage: true,
|
||||||
}),
|
}),
|
||||||
AddCol({
|
AddCol({
|
||||||
name: 'idStatusSkill',
|
name: 'idStatusSkill',
|
||||||
@@ -463,6 +485,7 @@ export const colmySkills = [
|
|||||||
fieldtype: costanti.FieldType.multiselect,
|
fieldtype: costanti.FieldType.multiselect,
|
||||||
jointable: 'statusSkills',
|
jointable: 'statusSkills',
|
||||||
noshowifnone: true,
|
noshowifnone: true,
|
||||||
|
visuinpage: true,
|
||||||
}),
|
}),
|
||||||
AddCol({
|
AddCol({
|
||||||
name: 'idContribType',
|
name: 'idContribType',
|
||||||
@@ -470,6 +493,9 @@ export const colmySkills = [
|
|||||||
fieldtype: costanti.FieldType.multiselect,
|
fieldtype: costanti.FieldType.multiselect,
|
||||||
jointable: 'contribtypes',
|
jointable: 'contribtypes',
|
||||||
noshowifnone: true,
|
noshowifnone: true,
|
||||||
|
noshowlabel: true,
|
||||||
|
icon: 'fas fa-hands-helping',
|
||||||
|
visuinpage: true,
|
||||||
}),
|
}),
|
||||||
AddCol({
|
AddCol({
|
||||||
name: 'idCity',
|
name: 'idCity',
|
||||||
@@ -477,16 +503,13 @@ export const colmySkills = [
|
|||||||
fieldtype: costanti.FieldType.multiselect_by_server,
|
fieldtype: costanti.FieldType.multiselect_by_server,
|
||||||
jointable: 'cities',
|
jointable: 'cities',
|
||||||
tablesel: 'cities',
|
tablesel: 'cities',
|
||||||
|
noshowlabel: true,
|
||||||
|
icon: 'fas fa-map-marker-alt',
|
||||||
|
visuinpage: true,
|
||||||
}),
|
}),
|
||||||
AddCol({
|
AddCol({ name: 'username', label_trans: 'reg.username', foredit: false, tipovisu: costanti.TipoVisu.LINK, link: '/my/username', noshowlabel: true }),
|
||||||
name: 'photos',
|
|
||||||
label_trans: 'skill.photos',
|
|
||||||
fieldtype: costanti.FieldType.listimages,
|
|
||||||
jointable: '',
|
|
||||||
noshowifnone: true,
|
|
||||||
}),
|
|
||||||
AddCol({ name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html, noshowifnone: true,
|
AddCol({ name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html, noshowifnone: true,
|
||||||
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '' }),
|
titlepopupedit: 'Dettagli:', field_extra1: 'username', subfield_extra1: '' }),
|
||||||
AddCol(DuplicateRec),
|
AddCol(DuplicateRec),
|
||||||
AddCol(ModifRec),
|
AddCol(ModifRec),
|
||||||
AddCol(DeleteRec),
|
AddCol(DeleteRec),
|
||||||
@@ -1415,6 +1438,24 @@ export const fieldsTable = {
|
|||||||
label_trans: 'reg.manage_telegram',
|
label_trans: 'reg.manage_telegram',
|
||||||
fieldtype: costanti.FieldType.boolean,
|
fieldtype: costanti.FieldType.boolean,
|
||||||
}),
|
}),
|
||||||
|
AddCol({
|
||||||
|
name: 'profile.username_telegram',
|
||||||
|
field: 'profile',
|
||||||
|
subfield: 'username_telegram',
|
||||||
|
label_trans: 'reg.username_telegram',
|
||||||
|
}),
|
||||||
|
AddCol({
|
||||||
|
name: 'profile.firstname_telegram',
|
||||||
|
field: 'profile',
|
||||||
|
subfield: 'firstname_telegram',
|
||||||
|
label_trans: 'reg.firstname_telegram',
|
||||||
|
}),
|
||||||
|
AddCol({
|
||||||
|
name: 'profile.lastname_telegram',
|
||||||
|
field: 'profile',
|
||||||
|
subfield: 'lastname_telegram',
|
||||||
|
label_trans: 'reg.lastname_telegram',
|
||||||
|
}),
|
||||||
AddCol({
|
AddCol({
|
||||||
name: 'profile.socio',
|
name: 'profile.socio',
|
||||||
field: 'profile',
|
field: 'profile',
|
||||||
@@ -1813,6 +1854,7 @@ export const fieldsTable = {
|
|||||||
columns: colCitys,
|
columns: colCitys,
|
||||||
colkey: '_id',
|
colkey: '_id',
|
||||||
collabel: 'comune',
|
collabel: 'comune',
|
||||||
|
// collabel: (rec: any) => `${rec.comune} (${rec.prov})`,
|
||||||
remote: true,
|
remote: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1470,11 +1470,15 @@ export const tools = {
|
|||||||
const myimage = dir + file
|
const myimage = dir + file
|
||||||
// console.log('includes = ', static_data.preLoadImages.map((a) => a.imgname).includes(myimage), myimage)
|
// console.log('includes = ', static_data.preLoadImages.map((a) => a.imgname).includes(myimage), myimage)
|
||||||
let ris = ''
|
let ris = ''
|
||||||
// @ts-ignore
|
try {
|
||||||
if (this.isMobile() && (preloadedimages().map((a) => a.imgname).includes(myimage))) {
|
// @ts-ignore
|
||||||
ris = `${dir}mobile/${file}`
|
if (this.isMobile() && (preloadedimages().map((a) => a.imgname).includes(myimage))) {
|
||||||
} else {
|
ris = `${dir}mobile/${file}`
|
||||||
ris = myimage
|
} else {
|
||||||
|
ris = myimage
|
||||||
|
}
|
||||||
|
}catch (e) {
|
||||||
|
return myimage
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log('getimgbysize', ris)
|
// console.log('getimgbysize', ris)
|
||||||
@@ -3280,7 +3284,7 @@ export const tools = {
|
|||||||
},
|
},
|
||||||
getCookie(mytok: any, def?: any) {
|
getCookie(mytok: any, def?: any) {
|
||||||
const ris = Cookies.get(mytok)
|
const ris = Cookies.get(mytok)
|
||||||
console.log('getCookie', mytok, ris)
|
// console.log('getCookie', mytok, ris)
|
||||||
if (!!ris) {
|
if (!!ris) {
|
||||||
return ris
|
return ris
|
||||||
} else {
|
} else {
|
||||||
@@ -3289,7 +3293,7 @@ export const tools = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
setCookie(mytok: any, value: string) {
|
setCookie(mytok: any, value: string) {
|
||||||
console.log('setCookie', mytok, value)
|
// console.log('setCookie', mytok, value)
|
||||||
return Cookies.set(mytok, value)
|
return Cookies.set(mytok, value)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -857,6 +857,20 @@ export const useUserStore = defineStore('UserStore', {
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async loadSkill(idSkill: string) {
|
||||||
|
const data = {
|
||||||
|
idSkill
|
||||||
|
}
|
||||||
|
|
||||||
|
return Api.SendReq('/myskills/page', 'POST', data)
|
||||||
|
.then((res) => {
|
||||||
|
return res.data
|
||||||
|
}).catch((error) => {
|
||||||
|
return {}
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
async loadFriends(username: string) {
|
async loadFriends(username: string) {
|
||||||
return Api.SendReq('/users/friends', 'POST', null)
|
return Api.SendReq('/users/friends', 'POST', null)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
:type="costanti.FieldType.string">
|
:type="costanti.FieldType.string">
|
||||||
</CMyFieldDb>
|
</CMyFieldDb>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="myrow">
|
||||||
<CMyFieldDb
|
<CMyFieldDb
|
||||||
:title="$t('reg.email')"
|
:title="$t('reg.email')"
|
||||||
table="users"
|
table="users"
|
||||||
|
|||||||
18
src/views/user/mypageskill/mypageskill.scss
Executable file
18
src/views/user/mypageskill/mypageskill.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;
|
||||||
|
}
|
||||||
99
src/views/user/mypageskill/mypageskill.ts
Executable file
99
src/views/user/mypageskill/mypageskill.ts
Executable file
@@ -0,0 +1,99 @@
|
|||||||
|
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 { CSkill } from '@/components/CSkill'
|
||||||
|
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 { IMySkill, IUserFields } from 'model'
|
||||||
|
import { shared_consts } from '@/common/shared_vuejs'
|
||||||
|
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||||
|
|
||||||
|
import { colCitys } from '@store/Modules/fieldsTable'
|
||||||
|
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: 'myuser',
|
||||||
|
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime, CMyPage },
|
||||||
|
props: {},
|
||||||
|
setup() {
|
||||||
|
const userStore = useUserStore()
|
||||||
|
const globalStore = useGlobalStore()
|
||||||
|
const $route = useRoute()
|
||||||
|
const $q = useQuasar()
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
|
const animation = ref('fade')
|
||||||
|
|
||||||
|
const idSkill = computed(() => $route.params.idSkill ? $route.params.idSkill.toString() : 0)
|
||||||
|
|
||||||
|
const filtroutente = ref(<any[]>[])
|
||||||
|
const showPic = ref(false)
|
||||||
|
|
||||||
|
const myskill = ref(<IMySkill>{})
|
||||||
|
|
||||||
|
function profile() {
|
||||||
|
return userStore.my.profile
|
||||||
|
}
|
||||||
|
|
||||||
|
function myusername() {
|
||||||
|
return userStore.my.username
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadSkill() {
|
||||||
|
// Carica il profilo di quest'utente
|
||||||
|
if (idSkill.value) {
|
||||||
|
userStore.loadSkill(idSkill.value).then((ris) => {
|
||||||
|
myskill.value = ris
|
||||||
|
if (ris.userId) {
|
||||||
|
filtroutente.value = [{ userId: ris.userId , _id: ris._id }]
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(() => idSkill.value, (to: any, from: any) => {
|
||||||
|
loadSkill()
|
||||||
|
})
|
||||||
|
|
||||||
|
function mounted() {
|
||||||
|
loadSkill()
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkifShow(col: string) {
|
||||||
|
//++Todo: checkifShow Permessi !
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
onMounted(mounted)
|
||||||
|
|
||||||
|
return {
|
||||||
|
profile,
|
||||||
|
tools,
|
||||||
|
costanti,
|
||||||
|
myskill,
|
||||||
|
shared_consts,
|
||||||
|
checkifShow,
|
||||||
|
globalStore,
|
||||||
|
filtroutente,
|
||||||
|
showPic,
|
||||||
|
myusername,
|
||||||
|
userStore,
|
||||||
|
t,
|
||||||
|
animation,
|
||||||
|
fieldsTable,
|
||||||
|
colCitys,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
52
src/views/user/mypageskill/mypageskill.vue
Executable file
52
src/views/user/mypageskill/mypageskill.vue
Executable file
@@ -0,0 +1,52 @@
|
|||||||
|
<template>
|
||||||
|
<CMyPage
|
||||||
|
:title='myskill.subTitle' imgbackground="images/calendario_eventi.jpg"
|
||||||
|
sizes="max-height: 100px" styleadd="bottom: -16px !important;">
|
||||||
|
|
||||||
|
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||||
|
<div v-if="!!myskill.note" v-html="myskill.note"></div>
|
||||||
|
|
||||||
|
<div v-for="(photo, index) in myskill.photos" :key="index">
|
||||||
|
<div v-if="!!photo.imagefile" class="text-center">
|
||||||
|
|
||||||
|
<q-img :src="'upload/profile/'+myskill.username+'/myskills/'+photo.imagefile" class="img"></q-img>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row justify-evenly">
|
||||||
|
<CSkill
|
||||||
|
:filtercustom="filtroutente"
|
||||||
|
:visuinpage="true"
|
||||||
|
>
|
||||||
|
|
||||||
|
</CSkill>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row justify-evenly q-mt-md">
|
||||||
|
<q-btn
|
||||||
|
type="a" rounded size="md"
|
||||||
|
color="white" text-color="blue" :icon="`img:`+userStore.getImgByUsername(myskill.username)"
|
||||||
|
:to="'/my/'+myskill.username"
|
||||||
|
:label="myskill.username"
|
||||||
|
>
|
||||||
|
</q-btn>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
</CMyPage>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" src="./mypageskill.ts">
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import './mypageskill.scss';
|
||||||
|
</style>
|
||||||
|
|
||||||
@@ -54,9 +54,9 @@
|
|||||||
to="/editprofile">
|
to="/editprofile">
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<div class="row justify-evenly q-pa-sm q-ma-sm">
|
<div class="myrow justify-evenly items-center q-pa-sm q-ma-sm">
|
||||||
|
|
||||||
<div class="col-md-6 q-mx-sm">
|
<div class="col-6 q-ma-xs">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="getLinkUserTelegram()" icon="fab fa-telegram"
|
v-if="getLinkUserTelegram()" icon="fab fa-telegram"
|
||||||
color="blue" type="a"
|
color="blue" type="a"
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 q-mx-sm">
|
<div class="col-6 q-ma-xs">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="getLinkWebSite()" icon="fas fa-globe"
|
v-if="getLinkWebSite()" icon="fas fa-globe"
|
||||||
color="blue" type="a"
|
color="blue" type="a"
|
||||||
|
|||||||
Reference in New Issue
Block a user