Aggiunto il filtro per Provincia
This commit is contained in:
@@ -59,6 +59,7 @@ export const shared_consts = {
|
||||
|
||||
TAB_COUNTRY: 'countries',
|
||||
TAB_CITIES: 'cities',
|
||||
TAB_PROVINCES: 'provinces',
|
||||
TAB_PHONES: 'phones',
|
||||
TAB_SITES: 'sites',
|
||||
TAB_SETTINGS: 'settings',
|
||||
@@ -67,6 +68,24 @@ export const shared_consts = {
|
||||
|
||||
TablePickup: ['countries', 'phones', 'cities'],
|
||||
|
||||
PARAM_SHOW_PROVINCE: 1,
|
||||
|
||||
TABLES_ID_NUMBER: ['permissions', 'levels', 'statusSkills', 'sectors', 'skills', 'subskills', 'cities', 'provinces', 'myskills'],
|
||||
TABLES_USER_ID: ['myskills'],
|
||||
TABLES_UPDATE_LASTMODIFIED: ['myskills', 'mybots'],
|
||||
|
||||
TABLES_PERM_CHANGE_FOR_USERS: ['myskills'],
|
||||
|
||||
VISIB_ALL: 0,
|
||||
VISIB_ONLYIF_VERIFIED: 1,
|
||||
VISIB_ONLY_MANAGER: 2,
|
||||
VISIB_ONLY_ADMIN: 4,
|
||||
|
||||
BOTTYPE_NONE: 0,
|
||||
BOTTYPE_PAGE: 1,
|
||||
BOTTYPE_LINK: 2,
|
||||
BOTTYPE_TEXT: 3,
|
||||
|
||||
CashType: {
|
||||
None: 0,
|
||||
Incoming: 1,
|
||||
@@ -79,11 +98,6 @@ export const shared_consts = {
|
||||
CITIES_SERVER: 3,
|
||||
},
|
||||
|
||||
BOTTYPE_NONE: 0,
|
||||
BOTTYPE_PAGE: 1,
|
||||
BOTTYPE_LINK: 2,
|
||||
BOTTYPE_TEXT: 3,
|
||||
|
||||
BotType: [
|
||||
{
|
||||
value: 0,
|
||||
@@ -103,11 +117,448 @@ export const shared_consts = {
|
||||
},
|
||||
],
|
||||
|
||||
VISIB_ALL: 0,
|
||||
VISIB_ONLYIF_VERIFIED: 1,
|
||||
VISIB_ONLY_MANAGER: 2,
|
||||
VISIB_ONLY_ADMIN: 4,
|
||||
|
||||
Provinces: [
|
||||
{
|
||||
label: 'Agrigento',
|
||||
value: 'AG',
|
||||
},
|
||||
{
|
||||
label: 'Alessandria',
|
||||
value: 'AL',
|
||||
},
|
||||
{
|
||||
label: 'Ancona',
|
||||
value: 'AN',
|
||||
},
|
||||
{
|
||||
label: 'Aosta',
|
||||
value: 'AO',
|
||||
},
|
||||
{
|
||||
label: 'Arezzo',
|
||||
value: 'AR',
|
||||
},
|
||||
{
|
||||
label: 'Ascoli Piceno',
|
||||
value: 'AP',
|
||||
},
|
||||
{
|
||||
label: 'Asti',
|
||||
value: 'AT',
|
||||
},
|
||||
{
|
||||
label: 'Avellino',
|
||||
value: 'AV',
|
||||
},
|
||||
{
|
||||
label: 'Bari',
|
||||
value: 'BA',
|
||||
},
|
||||
{
|
||||
label: 'Barletta-Andria-Trani',
|
||||
value: 'BT',
|
||||
},
|
||||
{
|
||||
label: 'Belluno',
|
||||
value: 'BL',
|
||||
},
|
||||
{
|
||||
label: 'Benevento',
|
||||
value: 'BN',
|
||||
},
|
||||
{
|
||||
label: 'Bergamo',
|
||||
value: 'BG',
|
||||
},
|
||||
{
|
||||
label: 'Biella',
|
||||
value: 'BI',
|
||||
},
|
||||
{
|
||||
label: 'Bologna',
|
||||
value: 'BO',
|
||||
},
|
||||
{
|
||||
label: 'Bolzano',
|
||||
value: 'BZ',
|
||||
},
|
||||
{
|
||||
label: 'Brescia',
|
||||
value: 'BS',
|
||||
},
|
||||
{
|
||||
label: 'Brindisi',
|
||||
value: 'BR',
|
||||
},
|
||||
{
|
||||
label: 'Cagliari',
|
||||
value: 'CA',
|
||||
},
|
||||
{
|
||||
label: 'Caltanissetta',
|
||||
value: 'CL',
|
||||
},
|
||||
{
|
||||
label: 'Campobasso',
|
||||
value: 'CB',
|
||||
},
|
||||
{
|
||||
label: 'Carbonia-Iglesias',
|
||||
value: 'CI',
|
||||
},
|
||||
{
|
||||
label: 'Caserta',
|
||||
value: 'CE',
|
||||
},
|
||||
{
|
||||
label: 'Catania',
|
||||
value: 'CT',
|
||||
},
|
||||
{
|
||||
label: 'Catanzaro',
|
||||
value: 'CZ',
|
||||
},
|
||||
{
|
||||
label: 'Chieti',
|
||||
value: 'CH',
|
||||
},
|
||||
{
|
||||
label: 'Como',
|
||||
value: 'CO',
|
||||
},
|
||||
{
|
||||
label: 'Cosenza',
|
||||
value: 'CS',
|
||||
},
|
||||
{
|
||||
label: 'Cremona',
|
||||
value: 'CR',
|
||||
},
|
||||
{
|
||||
label: 'Crotone',
|
||||
value: 'KR',
|
||||
},
|
||||
{
|
||||
label: 'Cuneo',
|
||||
value: 'CN',
|
||||
},
|
||||
{
|
||||
label: 'Enna',
|
||||
value: 'EN',
|
||||
},
|
||||
{
|
||||
label: 'Fermo',
|
||||
value: 'FM',
|
||||
},
|
||||
{
|
||||
label: 'Ferrara',
|
||||
value: 'FE',
|
||||
},
|
||||
{
|
||||
label: 'Firenze',
|
||||
value: 'FI',
|
||||
},
|
||||
{
|
||||
label: 'Foggia',
|
||||
value: 'FG',
|
||||
},
|
||||
{
|
||||
label: 'Forli-Cesena',
|
||||
value: 'FC',
|
||||
},
|
||||
{
|
||||
label: 'Frosinone',
|
||||
value: 'FR',
|
||||
},
|
||||
{
|
||||
label: 'Genova',
|
||||
value: 'GE',
|
||||
},
|
||||
{
|
||||
label: 'Gorizia',
|
||||
value: 'GO',
|
||||
},
|
||||
{
|
||||
label: 'Grosseto',
|
||||
value: 'GR',
|
||||
},
|
||||
{
|
||||
label: 'Imperia',
|
||||
value: 'IM',
|
||||
},
|
||||
{
|
||||
label: 'Isernia',
|
||||
value: 'IS',
|
||||
},
|
||||
{
|
||||
label: 'La Spezia',
|
||||
value: 'SP',
|
||||
},
|
||||
{
|
||||
label: 'L\'Aquila',
|
||||
value: 'AQ',
|
||||
},
|
||||
{
|
||||
label: 'Latina',
|
||||
value: 'LT',
|
||||
},
|
||||
{
|
||||
label: 'Lecce',
|
||||
value: 'LE',
|
||||
},
|
||||
{
|
||||
label: 'Lecco',
|
||||
value: 'LC',
|
||||
},
|
||||
{
|
||||
label: 'Livorno',
|
||||
value: 'LI',
|
||||
},
|
||||
{
|
||||
label: 'Lodi',
|
||||
value: 'LO',
|
||||
},
|
||||
{
|
||||
label: 'Lucca',
|
||||
value: 'LU',
|
||||
},
|
||||
{
|
||||
label: 'Macerata',
|
||||
value: 'MC',
|
||||
},
|
||||
{
|
||||
label: 'Mantova',
|
||||
value: 'MN',
|
||||
},
|
||||
{
|
||||
label: 'Massa-Carrara',
|
||||
value: 'MS',
|
||||
},
|
||||
{
|
||||
label: 'Matera',
|
||||
value: 'MT',
|
||||
},
|
||||
{
|
||||
label: 'Messina',
|
||||
value: 'ME',
|
||||
},
|
||||
{
|
||||
label: 'Milano',
|
||||
value: 'MI',
|
||||
},
|
||||
{
|
||||
label: 'Modena',
|
||||
value: 'MO',
|
||||
},
|
||||
{
|
||||
label: 'Monza e della Brianza',
|
||||
value: 'MB',
|
||||
},
|
||||
{
|
||||
label: 'Napoli',
|
||||
value: 'NA',
|
||||
},
|
||||
{
|
||||
label: 'Novara',
|
||||
value: 'NO',
|
||||
},
|
||||
{
|
||||
label: 'Nuoro',
|
||||
value: 'NU',
|
||||
},
|
||||
{
|
||||
label: 'Olbia-Tempio',
|
||||
value: 'OT',
|
||||
},
|
||||
{
|
||||
label: 'Oristano',
|
||||
value: 'OR',
|
||||
},
|
||||
{
|
||||
label: 'Padova',
|
||||
value: 'PD',
|
||||
},
|
||||
{
|
||||
label: 'Palermo',
|
||||
value: 'PA',
|
||||
},
|
||||
{
|
||||
label: 'Parma',
|
||||
value: 'PR',
|
||||
},
|
||||
{
|
||||
label: 'Pavia',
|
||||
value: 'PV',
|
||||
},
|
||||
{
|
||||
label: 'Perugia',
|
||||
value: 'PG',
|
||||
},
|
||||
{
|
||||
label: 'Pesaro e Urbino',
|
||||
value: 'PU',
|
||||
},
|
||||
{
|
||||
label: 'Pescara',
|
||||
value: 'PE',
|
||||
},
|
||||
{
|
||||
label: 'Piacenza',
|
||||
value: 'PC',
|
||||
},
|
||||
{
|
||||
label: 'Pisa',
|
||||
value: 'PI',
|
||||
},
|
||||
{
|
||||
label: 'Pistoia',
|
||||
value: 'PT',
|
||||
},
|
||||
{
|
||||
label: 'Pordenone',
|
||||
value: 'PN',
|
||||
},
|
||||
{
|
||||
label: 'Potenza',
|
||||
value: 'PZ',
|
||||
},
|
||||
{
|
||||
label: 'Prato',
|
||||
value: 'PO',
|
||||
},
|
||||
{
|
||||
label: 'Ragusa',
|
||||
value: 'RG',
|
||||
},
|
||||
{
|
||||
label: 'Ravenna',
|
||||
value: 'RA',
|
||||
},
|
||||
{
|
||||
label: 'Reggio Calabria',
|
||||
value: 'RC',
|
||||
},
|
||||
{
|
||||
label: 'Reggio Emilia',
|
||||
value: 'RE',
|
||||
},
|
||||
{
|
||||
label: 'Rieti',
|
||||
value: 'RI',
|
||||
},
|
||||
{
|
||||
label: 'Rimini',
|
||||
value: 'RN',
|
||||
},
|
||||
{
|
||||
label: 'Roma',
|
||||
value: 'RM',
|
||||
},
|
||||
{
|
||||
label: 'Rovigo',
|
||||
value: 'RO',
|
||||
},
|
||||
{
|
||||
label: 'Salerno',
|
||||
value: 'SA',
|
||||
},
|
||||
{
|
||||
label: 'Medio Campidano',
|
||||
value: 'VS',
|
||||
},
|
||||
{
|
||||
label: 'Sassari',
|
||||
value: 'SS',
|
||||
},
|
||||
{
|
||||
label: 'Savona',
|
||||
value: 'SV',
|
||||
},
|
||||
{
|
||||
label: 'Siena',
|
||||
value: 'SI',
|
||||
},
|
||||
{
|
||||
label: 'Siracusa',
|
||||
value: 'SR',
|
||||
},
|
||||
{
|
||||
label: 'Sondrio',
|
||||
value: 'SO',
|
||||
},
|
||||
{
|
||||
label: 'Taranto',
|
||||
value: 'TA',
|
||||
},
|
||||
{
|
||||
label: 'Teramo',
|
||||
value: 'TE',
|
||||
},
|
||||
{
|
||||
label: 'Terni',
|
||||
value: 'TR',
|
||||
},
|
||||
{
|
||||
label: 'Torino',
|
||||
value: 'TO',
|
||||
},
|
||||
{
|
||||
label: 'Ogliastra',
|
||||
value: 'OG',
|
||||
},
|
||||
{
|
||||
label: 'Trapani',
|
||||
value: 'TP',
|
||||
},
|
||||
{
|
||||
label: 'Trento',
|
||||
value: 'TN',
|
||||
},
|
||||
{
|
||||
label: 'Treviso',
|
||||
value: 'TV',
|
||||
},
|
||||
{
|
||||
label: 'Trieste',
|
||||
value: 'TS',
|
||||
},
|
||||
{
|
||||
label: 'Udine',
|
||||
value: 'UD',
|
||||
},
|
||||
{
|
||||
label: 'Varese',
|
||||
value: 'VA',
|
||||
},
|
||||
{
|
||||
label: 'Venezia',
|
||||
value: 'VE',
|
||||
},
|
||||
{
|
||||
label: 'Verbano-Cusio-Ossola',
|
||||
value: 'VB',
|
||||
},
|
||||
{
|
||||
label: 'Vercelli',
|
||||
value: 'VC',
|
||||
},
|
||||
{
|
||||
label: 'Verona',
|
||||
value: 'VR',
|
||||
},
|
||||
{
|
||||
label: 'Vibo Valentia',
|
||||
value: 'VV',
|
||||
},
|
||||
{
|
||||
label: 'Vicenza',
|
||||
value: 'VI',
|
||||
},
|
||||
{
|
||||
label: 'Viterbo',
|
||||
value: 'VT',
|
||||
},
|
||||
],
|
||||
|
||||
Regions: [
|
||||
{
|
||||
@@ -392,7 +843,7 @@ export const shared_consts = {
|
||||
},
|
||||
|
||||
fieldsUserToChange() {
|
||||
return ['_id', 'username', 'email', 'name', 'surname', 'perm', 'date_reg', 'verified_email', 'verified_by_aportador', 'trust_modified', 'img', 'ipaddr', 'lasttimeonline', 'profile', 'news_on']
|
||||
return ['_id', 'username', 'group', 'email', 'name', 'surname', 'perm', 'date_reg', 'verified_email', 'verified_by_aportador', 'trust_modified', 'img', 'ipaddr', 'lasttimeonline', 'profile', 'news_on']
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
@@ -61,6 +61,16 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function getFilterCitiesByProvince(recSubSkill: any, index: number, arr: any) {
|
||||
const recprov:any = searchList.value.find((rec) => rec.table === 'provinces')
|
||||
// console.log('recSubSkill', recSubSkill, 'recskills', recskills)
|
||||
if (recprov) {
|
||||
return recSubSkill.idSkill === recprov.value
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
searchList.value = [
|
||||
{
|
||||
@@ -110,15 +120,28 @@ export default defineComponent({
|
||||
useinput: true,
|
||||
},*/
|
||||
{
|
||||
label: 'Citta',
|
||||
label: 'Provincia',
|
||||
table: 'provinces',
|
||||
key: 'idProvince',
|
||||
type: costanti.FieldType.multiselect,
|
||||
value: 0,
|
||||
addall: true,
|
||||
arrvalue: tools.getCookie(tools.COOK_SEARCH + 'provinces', [costanti.FILTER_TUTTI]),
|
||||
filter: null,
|
||||
useinput: true,
|
||||
notinsearch: true,
|
||||
},
|
||||
{
|
||||
label: 'Città',
|
||||
table: 'cities',
|
||||
key: 'idCity',
|
||||
key: 'idProvince',
|
||||
type: costanti.FieldType.multiselect_by_server,
|
||||
value: 0,
|
||||
addall: true,
|
||||
arrvalue: tools.getCookie(tools.COOK_SEARCH + 'cities', [costanti.FILTER_TUTTI]),
|
||||
filter: null,
|
||||
useinput: true,
|
||||
filter: getFilterCitiesByProvince,
|
||||
// param1: shared_consts.PARAM_SHOW_PROVINCE,
|
||||
tablesel: 'cities',
|
||||
},
|
||||
{
|
||||
@@ -248,10 +271,10 @@ export default defineComponent({
|
||||
af_objId_tab: '',
|
||||
},
|
||||
lookup5: {
|
||||
lk_tab: 'cities',
|
||||
lk_LF: 'idCity',
|
||||
lk_FF: '_id',
|
||||
lk_as: 'comune',
|
||||
lk_tab: 'provinces',
|
||||
lk_LF: 'idProvince',
|
||||
lk_FF: 'prov',
|
||||
lk_as: 'descr',
|
||||
af_objId_tab: '',
|
||||
},
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
nodataLabel="Nessuna Competenza trovata"
|
||||
:prop_search="true"
|
||||
:finder="true"
|
||||
:choose_visutype="true"
|
||||
:butt_modif_new="false"
|
||||
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
|
||||
:arrfilters="arrfilterand"
|
||||
|
||||
@@ -328,6 +328,14 @@ export default defineComponent({
|
||||
fullscreensrc.value = getfullname(mygallery)
|
||||
}
|
||||
|
||||
function onRejected (rejectedEntries: any) {
|
||||
// Notify plugin needs to be installed
|
||||
// https://quasar.dev/quasar-plugins/notify#Installation
|
||||
$q.notify({
|
||||
type: 'negative',
|
||||
message: 'La Dimensione massima dell\'immagine è di 2 MB'
|
||||
})
|
||||
}
|
||||
onMounted(created)
|
||||
|
||||
return {
|
||||
@@ -355,6 +363,7 @@ export default defineComponent({
|
||||
ImgFullScreen,
|
||||
fullscreen,
|
||||
fullscreensrc,
|
||||
onRejected,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -101,6 +101,7 @@
|
||||
hide-upload-btn
|
||||
no-thumbnails
|
||||
@uploaded="uploaded"
|
||||
@rejected="onRejected"
|
||||
style="width: 208px"
|
||||
></q-uploader>
|
||||
</div>
|
||||
@@ -215,6 +216,7 @@
|
||||
hide-upload-btn
|
||||
no-thumbnails
|
||||
@uploaded="uploaded"
|
||||
@rejected="onRejected"
|
||||
style="width: 208px"
|
||||
></q-uploader>
|
||||
</div>
|
||||
|
||||
@@ -167,6 +167,11 @@ export default defineComponent({
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true
|
||||
},
|
||||
choose_visutype: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
components: { CMyPopupEdit, CTitleBanner, CMyFieldDb, CMySelect, CMyFriends },
|
||||
@@ -1116,7 +1121,17 @@ export default defineComponent({
|
||||
data: {}
|
||||
}
|
||||
|
||||
mydata.data = newRecord.value
|
||||
const myobj = newRecord.value
|
||||
|
||||
|
||||
//++ Eliminare eventuali campi ?
|
||||
mycolumns.value.forEach((col:IColGridTable) => {
|
||||
if (col.notsave) {
|
||||
delete myobj[col.name]
|
||||
}
|
||||
})
|
||||
|
||||
mydata.data = myobj
|
||||
|
||||
const data = await globalStore.saveTable(mydata)
|
||||
.then((ris) => {
|
||||
|
||||
@@ -134,6 +134,7 @@
|
||||
:addall="true"
|
||||
:tablesel="item.tablesel"
|
||||
:pickup="true"
|
||||
:param1="item.param1"
|
||||
label-color="primary"
|
||||
class="combowidth"
|
||||
color="primary"
|
||||
@@ -233,7 +234,7 @@
|
||||
<div v-if="pagination.rowsNumber === 1 && prop_search">{{ pagination.rowsNumber }} elemento trovato</div>
|
||||
<div v-if="pagination.rowsNumber > 1 && prop_search">{{ pagination.rowsNumber }} elementi trovati</div>
|
||||
|
||||
<div v-if="finder" class="">
|
||||
<div v-if="choose_visutype" class="">
|
||||
<q-radio v-model="myvertical" :val="2" label="Lista"
|
||||
@update:model-value="tools.setCookie('myv', myvertical) "/>
|
||||
<q-radio v-model="myvertical" :val="-1" label="Scheda"
|
||||
@@ -326,8 +327,9 @@
|
||||
<q-card-section class="inset-shadow">
|
||||
<q-list dense>
|
||||
<div v-for="col in mycolumns" :key="col.name">
|
||||
|
||||
<q-item v-if="colVisib.includes(col.field + col.subfield) &&
|
||||
!col.noshowifnone || (col.noshowifnone && !!props.row.value)"
|
||||
(!col.noshowifnone || (col.noshowifnone && tools.getValue(props.row,col.field, col.subfield)))"
|
||||
:class="clByCol(col)" class="riduci_pad">
|
||||
|
||||
<q-item-section avatar v-if="visuIntestazCol(col)">
|
||||
|
||||
@@ -595,6 +595,19 @@ export default defineComponent({
|
||||
)
|
||||
}
|
||||
|
||||
function getTitleEditor(col: IColGridTable, row: any) {
|
||||
|
||||
let title = ''
|
||||
if (!!col.field_extra1) {
|
||||
try {
|
||||
title = tools.getValue(row, col.field_extra1, col.subfield_extra1!)
|
||||
}catch (e){}
|
||||
}
|
||||
|
||||
return title
|
||||
|
||||
}
|
||||
|
||||
onBeforeMount(mounted)
|
||||
|
||||
crea()
|
||||
@@ -631,6 +644,7 @@ export default defineComponent({
|
||||
col,
|
||||
myImgGall,
|
||||
noPopupeditByCol,
|
||||
getTitleEditor,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -31,12 +31,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.string">
|
||||
<div v-if="visulabel || isInModif" :class="{ flex: !isInModif }">
|
||||
<div v-if="visulabel || isInModif" :class="{ flex: !isInModif}">
|
||||
|
||||
<q-input
|
||||
v-bind="$attrs"
|
||||
v-model="myvalue"
|
||||
autogrow
|
||||
:style="$q.screen.lt.sm ? 'min-width: 300px' : ''"
|
||||
counter
|
||||
:maxlength="col.maxlength ? col.maxlength : undefined"
|
||||
:disable="disable"
|
||||
:readonly="disable"
|
||||
@keyup.enter.stop
|
||||
@@ -99,7 +102,7 @@
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.listimages" style="text-align: center;">
|
||||
<p v-if="isInModif">
|
||||
{{ $t('reg.images') }}:
|
||||
{{ $t('reg.image') }}:
|
||||
</p>
|
||||
<CGallery
|
||||
:title="getTitleGall()"
|
||||
@@ -243,7 +246,24 @@
|
||||
<!-- Show Value -->
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.multiselect">
|
||||
<div v-if="isInModif">
|
||||
<q-select
|
||||
<CMySelect
|
||||
:multiple="true"
|
||||
:withToggle="true"
|
||||
:label="col.label"
|
||||
v-model:arrvalue="myvalue"
|
||||
@update:arrvalue="changevalRec"
|
||||
:addall="false"
|
||||
label-color="primary"
|
||||
class="combowidth"
|
||||
color="primary"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
||||
:sola_lettura="!isInModif"
|
||||
:useinput="false">
|
||||
</CMySelect>
|
||||
|
||||
<!--<q-select
|
||||
v-model="myvalue"
|
||||
rounded
|
||||
outlined
|
||||
@@ -270,7 +290,7 @@
|
||||
</q-item>
|
||||
</template>
|
||||
|
||||
</q-select>
|
||||
</q-select>-->
|
||||
|
||||
</div>
|
||||
<div v-else>
|
||||
@@ -360,9 +380,12 @@
|
||||
<div v-if="insertMode">
|
||||
|
||||
</div>
|
||||
<p v-if="isInModif" class="text-center">
|
||||
{{ $t('event.testo_di_spiegazione') }}:
|
||||
</p>
|
||||
<div v-if="!isFieldDb()">
|
||||
<CMyEditor
|
||||
v-model:value="myvalue" :title="col.title" @keyup.enter.stop
|
||||
v-model:value="myvalue" :title="getTitleEditor(col, row)" @keyup.enter.stop
|
||||
:showButtons="false"
|
||||
:canModify="canModify"
|
||||
@update:value="changevalRec"
|
||||
@@ -379,10 +402,12 @@
|
||||
<!--<div v-html="visuValByType(myvalue, col, row)" @click="visueditor = true"></div>-->
|
||||
|
||||
<div v-if="!isFieldDb()">
|
||||
<q-dialog v-model="visuhtml" full-height full-width auto-close>
|
||||
<q-dialog v-model="visuhtml" full-height full-width>
|
||||
<q-card>
|
||||
<q-bar dense class="bg-primary text-white">
|
||||
<span class="ellipsis"> {{ getTitleEditor(col, row) }} </span>
|
||||
<q-space/>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-bar>
|
||||
<q-card-section class="inset-shadow">
|
||||
<q-card class="dialog_card">
|
||||
@@ -437,7 +462,7 @@
|
||||
v-slot="scope">
|
||||
|
||||
<div v-if="col.fieldtype === costanti.FieldType.boolean">
|
||||
<q-checkbox v-model="scope.value" :label="col.title">
|
||||
<q-checkbox v-model="scope.value" :label="col.title ? col.title : col.titlepopupedit">
|
||||
</q-checkbox>
|
||||
<span v-html="visuValByType(myvalue, col, row)"></span>
|
||||
</div>
|
||||
@@ -445,6 +470,7 @@
|
||||
<q-input
|
||||
v-bind="$attrs"
|
||||
counter
|
||||
:maxlength="col.maxlength ? col.maxlength : undefined"
|
||||
v-model="scope.value"
|
||||
autogrow
|
||||
@keyup.enter.stop
|
||||
|
||||
@@ -82,6 +82,10 @@ export default defineComponent({
|
||||
sola_lettura: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
withToggle: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
@@ -116,7 +120,8 @@ export default defineComponent({
|
||||
watch(() => props.options, (value: any, oldval: any) => {
|
||||
if (!props.multiselect_by_server) {
|
||||
valori.value = valoriload.value
|
||||
// console.log('@@@ VALORI CHANGED (1)', valori.value)
|
||||
} else {
|
||||
console.log('@@@ VALORI CHANGED (1)', valori.value)
|
||||
}
|
||||
},
|
||||
)
|
||||
@@ -170,8 +175,8 @@ export default defineComponent({
|
||||
|
||||
|
||||
function changeval(newval: any) {
|
||||
// console.log(' ½½½½½½½ changeval', newval)
|
||||
if (props.multiselect_by_server) {
|
||||
console.log(' ½½½½½½½ changeval', newval)
|
||||
if (props.multiple || props.multiselect_by_server) {
|
||||
// localStorage.setItem(props.tablesel + '_' + newval, valori.value[newval])
|
||||
myarrvalue.value = newval && newval['arrvalue'] ? newval['arrvalue'] : newval
|
||||
saveOptInCookie(newval)
|
||||
@@ -249,9 +254,9 @@ export default defineComponent({
|
||||
}
|
||||
// }
|
||||
}
|
||||
console.log('@@@ VALORI CHANGED (4)', valori.value)
|
||||
if (!props.multiselect_by_server) {
|
||||
valori.value = valoriload.value
|
||||
console.log('@@@ VALORI CHANGED (4)', valori.value)
|
||||
} else {
|
||||
valori.value = arrtempOpt.value
|
||||
}
|
||||
@@ -260,50 +265,34 @@ export default defineComponent({
|
||||
|
||||
function filterFn(val: any, update: any, abort: any) {
|
||||
update(
|
||||
() => {
|
||||
async () => {
|
||||
console.log('Filter val', val, val.length)
|
||||
let myarr: any = []
|
||||
|
||||
if (val.length <= 1) {
|
||||
valori.value = arrtempOpt.value
|
||||
console.log('@@@ LENGTH <= 1')
|
||||
abort()
|
||||
return
|
||||
}
|
||||
|
||||
let mystr = val.toLocaleLowerCase()
|
||||
|
||||
console.log('props.tablesel', props.tablesel)
|
||||
// console.log('props.tablesel', props.tablesel)
|
||||
|
||||
if (fieldsTable.tableRemotePickup.includes(props.tablesel)) {
|
||||
try {
|
||||
myarr = props.options
|
||||
if (mystr !== '')
|
||||
return globalStore.loadPickup({ table: props.tablesel, search: mystr })
|
||||
.then((ris) => {
|
||||
myarr = props.options
|
||||
if (ris) {
|
||||
if (props.addall) {
|
||||
let myobj: any = {}
|
||||
if (typeof props.optlab === 'string') {
|
||||
myobj[props.optlab] = '(Tutti)'
|
||||
myobj[props.optval] = costanti.FILTER_TUTTI
|
||||
}
|
||||
|
||||
ris = [myobj, ...ris]
|
||||
}
|
||||
valori.value = ris
|
||||
if (props.multiselect_by_server) {
|
||||
console.log('@@@ VALORI CHANGED (2)', valori.value)
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
// myarr = [{_id:1, prov: 'RN', descr: 'Rimini'}]
|
||||
myarr = await globalStore.loadPickup({ table: props.tablesel, search: mystr.trim() })
|
||||
|
||||
if (myarr === null) {
|
||||
console.log('@@@ VALORI VALUE XXX', valori.value)
|
||||
valori.value = arrtempOpt.value
|
||||
return
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('@@@ VALORI VALUE XXX', valori.value)
|
||||
valori.value = arrtempOpt.value
|
||||
return
|
||||
}
|
||||
// const needle = val.toLocaleLowerCase()
|
||||
// optFiltered.value = optFiltered.value.filter((v: any) => v.toLocaleLowerCase().indexOf(needle) > -1)
|
||||
@@ -332,6 +321,7 @@ export default defineComponent({
|
||||
},
|
||||
// "ref" is the Vue reference to the QSelect
|
||||
(ref: any) => {
|
||||
// console.log('ref.options', ref.options)
|
||||
if (val !== '' && ref.options.length > 0) {
|
||||
ref.setOptionIndex(-1) // reset optionIndex in case there is something selected
|
||||
ref.moveOptionSelection(1, true) // focus the first selectable option and do not update the input-value
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
@filter="filterFn"
|
||||
@filter-abort="abortFilterFn"
|
||||
@update:model-value="changeval"
|
||||
input-debounce="300"
|
||||
input-debounce="600"
|
||||
rounded
|
||||
outlined
|
||||
multiple
|
||||
@@ -66,29 +66,7 @@
|
||||
</q-select>
|
||||
|
||||
</div>
|
||||
<div v-else-if="useinput">
|
||||
<q-select
|
||||
:multiple="multiple"
|
||||
rounded
|
||||
outlined
|
||||
v-bind="$attrs"
|
||||
:input-class="myclass"
|
||||
:model-value="myvalue"
|
||||
:use-input="useinput"
|
||||
input-debounce="0"
|
||||
@new-value="newvaluefunc"
|
||||
new-value-mode="add-unique"
|
||||
map-options
|
||||
emit-value
|
||||
:options="valori"
|
||||
:option-value="optval"
|
||||
:option-label="optlab"
|
||||
@update:model-value="changeval"
|
||||
:label="label"
|
||||
:dense="dense">
|
||||
</q-select>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-else-if="pickup">
|
||||
<q-select
|
||||
v-if="pickup"
|
||||
filled
|
||||
@@ -126,9 +104,67 @@
|
||||
</q-item>
|
||||
</template>
|
||||
</q-select>
|
||||
</div>
|
||||
<div v-else-if="multiple">
|
||||
<q-select
|
||||
v-else
|
||||
:multiple="multiple"
|
||||
:multiple="true"
|
||||
:model-value="myarrvalue"
|
||||
label-color="primary"
|
||||
:label="label"
|
||||
@update:model-value="changeval"
|
||||
rounded
|
||||
outlined
|
||||
v-bind="$attrs"
|
||||
:input-class="myclass"
|
||||
:use-input="useinput"
|
||||
input-debounce="0"
|
||||
@new-value="newvaluefunc"
|
||||
new-value-mode="add-unique"
|
||||
map-options
|
||||
emit-value
|
||||
stack-label
|
||||
:options="valori"
|
||||
:option-value="optval"
|
||||
:option-label="optlab"
|
||||
:dense="dense">
|
||||
|
||||
<template
|
||||
v-slot:selected-item="scope">
|
||||
<div v-if="scope.opt[optlab]">
|
||||
<q-chip
|
||||
removable
|
||||
dense
|
||||
@remove="scope.removeAtIndex(scope.index)"
|
||||
v-if="checkIfShowRec(scope.opt)"
|
||||
color="white"
|
||||
text-color="mycol"
|
||||
class="q-my-none q-ml-xs q-mr-none"
|
||||
>
|
||||
<q-avatar color="primary" text-color="white" :icon="scope.opt.icon ? scope.opt.icon : ''" size="12px"/>
|
||||
{{ scope.opt[optlab] }}
|
||||
</q-chip>
|
||||
</div>
|
||||
</template>
|
||||
<template
|
||||
v-if="withToggle"
|
||||
v-slot:option="{ itemProps, opt, selected, toggleOption }">
|
||||
<q-item v-bind="itemProps">
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label>{{ opt[optlab] }}</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-toggle :model-value="selected" @update:value="toggleOption(opt)"/>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
|
||||
</q-select>
|
||||
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-select
|
||||
:multiple="false"
|
||||
rounded
|
||||
outlined
|
||||
:dense="dense"
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
prop_colkey="idSkill"
|
||||
col_title="subTitle"
|
||||
:vertical="true"
|
||||
:choose_visutype="true"
|
||||
nodataLabel="Nessuna Competenza inserita"
|
||||
:prop_search="false"
|
||||
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
|
||||
|
||||
@@ -505,6 +505,12 @@ export interface IColGridTable {
|
||||
noshowifnone?: boolean
|
||||
notShowInNewRec?: boolean
|
||||
tablesel?: string
|
||||
notsave?: boolean
|
||||
maxlength?: number
|
||||
filter_table?: string
|
||||
filter_field?: string
|
||||
field_extra1?: string
|
||||
subfield_extra1?: string
|
||||
}
|
||||
|
||||
export interface ITableRec {
|
||||
@@ -527,6 +533,7 @@ export interface ISearchList {
|
||||
value: any
|
||||
type: number
|
||||
filter: any
|
||||
param1?: any
|
||||
useinput: boolean
|
||||
notinsearch?: boolean
|
||||
addall?: boolean
|
||||
|
||||
@@ -26,6 +26,7 @@ export interface IUserProfile {
|
||||
link_payment?: string
|
||||
note_payment?: string
|
||||
username_telegram?: string
|
||||
website?: string
|
||||
teleg_id?: number
|
||||
teleg_checkcode?: number
|
||||
paymenttypes?: IPaymentType[]
|
||||
|
||||
@@ -66,36 +66,36 @@ export default defineComponent({
|
||||
|
||||
for (const rec of myarr) {
|
||||
|
||||
let lab = rec[0]
|
||||
let val = rec[1]
|
||||
let lab = tools.addslashes(rec[0])
|
||||
let val = tools.addslashes(rec[1])
|
||||
if (cmd === shared_consts.Cmd.PROVINCE) {
|
||||
val = rec[2]
|
||||
|
||||
strris += '{ \n'
|
||||
strris += ' label:\'' + lab + '\','
|
||||
strris += ' value:\'' + val + '\','
|
||||
strris += ' _id:' + ind + ','
|
||||
strris += ' prov:\'' + val + '\','
|
||||
strris += ' descr:\'' + lab + '\','
|
||||
strris += '}, \n'
|
||||
|
||||
} else if (cmd === shared_consts.Cmd.COMUNI) {
|
||||
strris += '{ \n'
|
||||
strris += ' istat:\'' + rec[0] + '\','
|
||||
strris += ' comune:\'' + rec[1] + '\','
|
||||
strris += ' prov:\'' + rec[2] + '\''
|
||||
strris += ' istat:\'' + tools.addslashes(rec[0]) + '\','
|
||||
strris += ' comune:\'' + tools.addslashes(rec[1]) + '\','
|
||||
strris += ' prov:\'' + tools.addslashes(rec[2]) + '\''
|
||||
|
||||
} else if (cmd === shared_consts.Cmd.CITIES_SERVER) {
|
||||
strris += '{ \n'
|
||||
strris += ' _id :' + ind + ',\n'
|
||||
strris += ' istat :\'' + rec[0] + '\'\n,'
|
||||
strris += ' comune :\'' + rec[1] + '\'\n,'
|
||||
strris += ' comune :\'' + tools.addslashes(rec[1]) + '\'\n,'
|
||||
strris += ' prov :\'' + rec[2] + '\'\n,'
|
||||
strris += ' reg :\'' + rec[3] + '\'\n,'
|
||||
strris += ' pref :\'' + rec[4] + '\'\n,'
|
||||
strris += ' reg :\'' + tools.addslashes(rec[3]) + '\'\n,'
|
||||
strris += ' pref :\'' + tools.addslashes(rec[4]) + '\'\n,'
|
||||
strris += ' cap :\'' + rec[5] + '\'\n,'
|
||||
strris += ' abitanti :\'' + rec[6] + '\'\n,'
|
||||
strris += ' country : \'IT\'\n'
|
||||
strris += '}, \n'
|
||||
ind += 1
|
||||
}
|
||||
ind += 1
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -396,6 +396,7 @@ const msg_it = {
|
||||
iscrizioneincorso: 'Iscrizione in corso...',
|
||||
richiesto: 'Campo Richiesto',
|
||||
email: 'Email',
|
||||
website: 'Sito Web',
|
||||
intcode_cell: 'Prefisso Int.',
|
||||
cell: 'Cellulare',
|
||||
cellreg: 'Cellulare con cui ti eri registrato',
|
||||
@@ -486,6 +487,7 @@ const msg_it = {
|
||||
come_ci_hai_conosciuto: 'Come ci hai conosciuto?',
|
||||
photo: 'Foto',
|
||||
images: 'Immagini',
|
||||
image: 'Immagine',
|
||||
err: {
|
||||
required: 'è richiesto',
|
||||
email: 'inserire una email valida',
|
||||
@@ -732,6 +734,7 @@ const msg_it = {
|
||||
showinhome: 'Mostra nella Home',
|
||||
showinnewsletter: 'Mostra nella Newsletter',
|
||||
color: 'Colore del titolo',
|
||||
testo_di_spiegazione: 'Testo di Spiegazione',
|
||||
},
|
||||
disc: {
|
||||
typol_code: 'Codice Tipologia',
|
||||
@@ -802,6 +805,7 @@ const msg_it = {
|
||||
city: 'Città',
|
||||
photos: 'Foto',
|
||||
note: 'Note',
|
||||
short_node: 'Breve Nota',
|
||||
subskill: 'Specializz.',
|
||||
},
|
||||
level: {
|
||||
|
||||
@@ -54,6 +54,8 @@ function AddCol(params: IColGridTable) {
|
||||
sortable: (params.sortable === undefined) ? true : params.sortable,
|
||||
disable: (params.disable === undefined) ? false : params.disable,
|
||||
titlepopupedit: (params.titlepopupedit === undefined) ? '' : params.titlepopupedit,
|
||||
field_extra1: (params.field_extra1 === undefined) ? '' : params.field_extra1,
|
||||
subfield_extra1: (params.subfield_extra1 === undefined) ? '' : params.subfield_extra1,
|
||||
visible: (params.visible === undefined) ? true : params.visible,
|
||||
icon: (params.icon === undefined) ? '' : params.icon,
|
||||
action: (params.action === undefined) ? '' : params.action,
|
||||
@@ -69,6 +71,10 @@ function AddCol(params: IColGridTable) {
|
||||
filter: (params.filter === undefined) ? null : params.filter,
|
||||
noshowifnone: (params.noshowifnone === undefined) ? false : params.noshowifnone,
|
||||
notShowInNewRec: (params.notShowInNewRec === undefined) ? false : params.notShowInNewRec,
|
||||
notsave: (params.notsave === undefined) ? false : params.notsave,
|
||||
filter_table: (params.filter_table === undefined) ? '' : params.filter_table,
|
||||
maxlength: (params.maxlength === undefined) ? 0 : params.maxlength,
|
||||
filter_field: (params.filter_field === undefined) ? '' : params.filter_field,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -343,6 +349,14 @@ export const colCitys = [
|
||||
AddCol(DuplicateRec),
|
||||
]
|
||||
|
||||
export const colProvinces = [
|
||||
// AddCol({ name: '_id', label_trans: 'index', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'label', label_trans: 'store.description' }),
|
||||
AddCol({ name: 'value', label_trans: 'city.prov' }),
|
||||
AddCol(DeleteRec),
|
||||
AddCol(DuplicateRec),
|
||||
]
|
||||
|
||||
export const colTableCountry = [
|
||||
AddCol({ name: 'id', label_trans: 'index', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'value', label_trans: 'city.country' }),
|
||||
@@ -409,12 +423,22 @@ export const colmySkills = [
|
||||
//AddCol({ name: 'name', label_trans: 'reg.name', 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: 'idSector',
|
||||
label_trans: 'sectors.name',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
required: true,
|
||||
jointable: 'sectors',
|
||||
|
||||
}), */
|
||||
AddCol({ name: 'subTitle', label_trans: 'event.title', fieldtype: costanti.FieldType.string, noshowifnone: true, maxlength: 40 }),
|
||||
AddCol({
|
||||
name: 'idSkill',
|
||||
label_trans: 'skill.name',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
required: true,
|
||||
jointable: 'skills',
|
||||
// filter_table: 'sectors',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idSubSkill',
|
||||
@@ -422,6 +446,8 @@ export const colmySkills = [
|
||||
fieldtype: costanti.FieldType.multiselect,
|
||||
required: true,
|
||||
jointable: 'subskills',
|
||||
filter_table: 'skills',
|
||||
filter_field: 'idSkill',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'numLevel',
|
||||
@@ -459,8 +485,8 @@ export const colmySkills = [
|
||||
jointable: '',
|
||||
noshowifnone: true,
|
||||
}),
|
||||
AddCol({ name: 'subTitle', label_trans: 'skill.note', fieldtype: costanti.FieldType.string }),
|
||||
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: '' }),
|
||||
AddCol(DuplicateRec),
|
||||
AddCol(ModifRec),
|
||||
AddCol(DeleteRec),
|
||||
@@ -1789,6 +1815,14 @@ export const fieldsTable = {
|
||||
collabel: 'comune',
|
||||
remote: true,
|
||||
},
|
||||
{
|
||||
value: 'provinces',
|
||||
label: 'Provincia',
|
||||
columns: colTablePermission,
|
||||
colkey: 'value',
|
||||
collabel: 'label',
|
||||
remote: true,
|
||||
},
|
||||
{
|
||||
value: 'countries',
|
||||
label: 'Nazione',
|
||||
|
||||
@@ -4484,7 +4484,7 @@ export const tools = {
|
||||
'(?:\"([^\"]*(?:\"\"[^\"]*)*)\"|' +
|
||||
|
||||
// Standard fields.
|
||||
'([^\'\\' + strDelimiter + '\\r\\n]*))'
|
||||
'([^\"\\' + strDelimiter + '\\r\\n]*))'
|
||||
),
|
||||
'gi'
|
||||
)
|
||||
@@ -4551,6 +4551,33 @@ export const tools = {
|
||||
return (arrData)
|
||||
},
|
||||
|
||||
getValue(myrow: any, field: string, subfield: string) {
|
||||
let myvalue = ''
|
||||
if (subfield !== '') {
|
||||
if (myrow[field] === undefined) {
|
||||
myrow[field] = {}
|
||||
myvalue = ''
|
||||
} else {
|
||||
myvalue = myrow[field][subfield]
|
||||
}
|
||||
} else {
|
||||
if (field !== '')
|
||||
myvalue = myrow[field]
|
||||
else {
|
||||
// @ts-ignore
|
||||
myvalue = myrow
|
||||
}
|
||||
}
|
||||
if (Array.isArray(myvalue)) {
|
||||
return myvalue.length > 0 ? myvalue : ''
|
||||
} else {
|
||||
return myvalue
|
||||
}
|
||||
},
|
||||
addslashes(str: string) {
|
||||
return (str + '').replace(/[\\"']/g, '\\$&').replace(/\u0000/g, '\\0')
|
||||
},
|
||||
|
||||
|
||||
// getLocale() {
|
||||
// if (navigator.languages && navigator.languages.length > 0) {
|
||||
|
||||
@@ -725,7 +725,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
})
|
||||
},
|
||||
|
||||
async loadPickup(params: IParamsPickup) {
|
||||
loadPickup(params: IParamsPickup) {
|
||||
console.log('loadPickup', params)
|
||||
const userStore = useUserStore()
|
||||
|
||||
@@ -1295,6 +1295,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
if (table === 'visibility') return shared_consts.Visibility
|
||||
if (table === 'lang') return shared_consts.Lang
|
||||
if (table === 'regions') return shared_consts.Regions
|
||||
if (table === 'provinces') return shared_consts.Provinces
|
||||
|
||||
let myarr = this.getListByTable(table)
|
||||
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
mysubkey="username_telegram"
|
||||
:type="costanti.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
</div>
|
||||
<div class="row">
|
||||
<CMyFieldDb
|
||||
:title="$t('reg.email')"
|
||||
table="users"
|
||||
@@ -43,6 +45,13 @@
|
||||
:disable="true"
|
||||
:type="costanti.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
<CMyFieldDb
|
||||
:title="$t('reg.website')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="website"
|
||||
:type="costanti.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
:prop_search="true"
|
||||
hint="Username da trovare"
|
||||
:finder="true"
|
||||
:choose_visutype="true"
|
||||
:finder_noNull="true"
|
||||
:options="shared_consts.OPTIONS_SEARCH_ONLY_FULL_WORDS"
|
||||
:butt_modif_new="false"
|
||||
|
||||
@@ -78,6 +78,16 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function getLinkWebSite() {
|
||||
let site = myuser.value.profile.website!
|
||||
if (site) {
|
||||
if (!site.startsWith('http')) {
|
||||
site = 'https://' + site
|
||||
}
|
||||
}
|
||||
return site
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
@@ -90,6 +100,7 @@ export default defineComponent({
|
||||
getImgUser,
|
||||
checkifShow,
|
||||
getLinkUserTelegram,
|
||||
getLinkWebSite,
|
||||
filtroutente,
|
||||
showPic,
|
||||
myusername,
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
</div>
|
||||
<div class="col-12 text-h7">
|
||||
<span v-if="myuser.profile.born_city">{{ myuser.profile.born_city }}</span> <span
|
||||
v-if="myuser.profile.nationality && myuser.profile.nationality !== 'Italia'">({{ myuser.profile.nationality }})</span>
|
||||
v-if="myuser.profile.nationality && myuser.profile.nationality !== 'Italia'">({{
|
||||
myuser.profile.nationality
|
||||
}})</span>
|
||||
</div>
|
||||
|
||||
<div v-if="myuser.username !== userStore.my.username">
|
||||
@@ -52,16 +54,29 @@
|
||||
to="/editprofile">
|
||||
</q-btn>
|
||||
|
||||
<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>
|
||||
<div class="row justify-evenly q-pa-sm q-ma-sm">
|
||||
|
||||
<div class="col-md-6 q-mx-sm">
|
||||
<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>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6 q-mx-sm">
|
||||
<q-btn
|
||||
v-if="getLinkWebSite()" icon="fas fa-globe"
|
||||
color="blue" type="a"
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('reg.website')"
|
||||
:href="getLinkWebSite()" target="__blank">
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="fit column no-wrap justify-evenly items-center content-start">
|
||||
|
||||
Reference in New Issue
Block a user