Campo Citta di Nascita (nel profilo nuova maniera), manca ancora da sistemare l'edit
Se seleziono la Provincia , mi deve comparire la lista dei comuni
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.2.6"
|
||||
APP_VERSION="0.2.7"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.2.6"
|
||||
APP_VERSION="0.2.7"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="1"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.2.6"
|
||||
APP_VERSION="0.2.7"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.2.6"
|
||||
APP_VERSION="0.2.7"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="12"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<template>
|
||||
<div v-if="numcol === 3" class="col-xs-4 col-sm-4 col-md-3 col-lg-2">
|
||||
<div class="q-ma-xs">
|
||||
<q-btn v-if="!small" class="mybox_3" :color="color" rounded :to="to" v-bind="$attrs">
|
||||
<q-btn v-if="!small" class="mybox_3" :color="color" rounded push :to="to" v-bind="$attrs">
|
||||
<q-icon class="q-ma-sm" :name="icon"/>
|
||||
<div class="q-ma-sm my-text_3">{{ label }}</div>
|
||||
<div class="q-ma-sm my-text_3 no-wrap"><span v-html="label"></span></div>
|
||||
</q-btn>
|
||||
<q-btn v-if="small" class="mybox_small" :color="color" rounded :to="to" v-bind="$attrs">
|
||||
<q-btn v-if="small" class="mybox_small" :color="color" rounded push :to="to" v-bind="$attrs">
|
||||
<q-icon class="q-ma-xs" :name="icon" size="sm"/>
|
||||
<div class="q-ma-xs my-text-small">{{ label }}</div>
|
||||
<div class="q-ma-xs my-text-small no-wrap"><span v-html="label"></span></div>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="col-xs-6 col-sm-6 col-md-4 col-lg-3">
|
||||
<div class="q-ma-sm">
|
||||
<q-btn v-if="!small" class="mybox" :color="color" rounded :to="to" v-bind="$attrs">
|
||||
<q-btn v-if="!small" class="mybox" :color="color" rounded push :to="to" v-bind="$attrs">
|
||||
<q-icon class="q-ma-sm" size="4.5rem" :name="icon"/>
|
||||
<div class="q-ma-sm text-h5">{{ label }}</div>
|
||||
<div class="q-ma-sm text-h5 no-wrap"><span v-html="label"></span></div>
|
||||
</q-btn>
|
||||
<q-btn v-if="small" class="mybox_small" :color="color" rounded :to="to" v-bind="$attrs">
|
||||
<q-btn v-if="small" class="mybox_small" :color="color" rounded push :to="to" v-bind="$attrs">
|
||||
<q-icon class="q-ma-xs" :name="icon" size="sm"/>
|
||||
<div class="q-ma-xs my-text-small">{{ label }}</div>
|
||||
<div class="q-ma-xs my-text-small no-wrap"><span v-html="label"></span></div>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -125,11 +125,11 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function getFilterCitiesByProvince(recSubSkill: any, index: number, arr: any) {
|
||||
function getFilterCitiesByProvince(recCities: 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
|
||||
return recCities.idProvince === recprov.value
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
@@ -320,7 +320,7 @@ export default defineComponent({
|
||||
arrvalue: [],
|
||||
useinput: true,
|
||||
filter: null,
|
||||
// filter: getFilterCitiesByProvince,
|
||||
//filter: getFilterCitiesByProvince,
|
||||
// param1: shared_consts.PARAM_SHOW_PROVINCE,
|
||||
tablesel: 'cities',
|
||||
},
|
||||
|
||||
@@ -403,6 +403,7 @@ export default defineComponent({
|
||||
|
||||
let recSector = null
|
||||
let recSectorGood = null
|
||||
let recCities = null
|
||||
let recProvince = null
|
||||
let recSkill = null
|
||||
let idSector = 0
|
||||
@@ -421,6 +422,9 @@ export default defineComponent({
|
||||
recProvince = searchList.value.find((item: ISearchList) => item.table === 'provinces')
|
||||
idProvince = recProvince ? recProvince.value : 0
|
||||
}
|
||||
if (searchList.value) {
|
||||
recCities = searchList.value.find((item: ISearchList) => item.table === 'cities')
|
||||
}
|
||||
|
||||
if (searchList.value) {
|
||||
recSkill = searchList.value.find((item: ISearchList) => item.table === 'skills')
|
||||
@@ -444,6 +448,11 @@ export default defineComponent({
|
||||
if (item.value !== '' && item.value !== costanti.FILTER_TUTTI) {
|
||||
filtersearch3or.push(obj)
|
||||
}
|
||||
|
||||
if (item.value && recCities && idProvince !== costanti.FILTER_TUTTI) {
|
||||
recCities.filter_extra = {prov: idProvince}
|
||||
}
|
||||
|
||||
} else if (item.table === 'cities') {
|
||||
|
||||
if (item.value && item.value.hasOwnProperty('_id')) {
|
||||
|
||||
@@ -129,6 +129,7 @@
|
||||
:optlab="fieldsTable.getLabelByTable(item.table)"
|
||||
:options="valoriopt(item, false)"
|
||||
:filter="item.filter"
|
||||
:filter_extra="item.filter_extra"
|
||||
:useinput="item.useinput && item.type !== costanti.FieldType.select_by_server">
|
||||
</CMySelect>
|
||||
|
||||
@@ -155,6 +156,7 @@
|
||||
:optval="fieldsTable.getKeyByTable(item.table)"
|
||||
:optlab="fieldsTable.getLabelByTable(item.table)"
|
||||
:filter="item.filter"
|
||||
:filter_extra="item.filter_extra"
|
||||
:options="valoriopt(item, false)"
|
||||
:useinput="true">
|
||||
</CMySelect>
|
||||
|
||||
@@ -43,6 +43,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
rec: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
components: {},
|
||||
setup(props, { emit }) {
|
||||
@@ -60,7 +65,7 @@ export default defineComponent({
|
||||
myarrvalues.value = []
|
||||
|
||||
// console.log('options', props.options)
|
||||
if (props.options) {
|
||||
if (props.options.length > 0) {
|
||||
props.options.forEach((rec: any, index) => {
|
||||
if (props.type === costanti.FieldType.multiselect) {
|
||||
if (!!myval.value) {
|
||||
@@ -171,6 +176,20 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
if (props.type === costanti.FieldType.select_by_server) {
|
||||
|
||||
const mydata: any = {
|
||||
// @ts-ignore
|
||||
label: props.rec[props.optlab],
|
||||
value: 0,
|
||||
valbool: true,
|
||||
icon: '',
|
||||
color: tools.getColorByIndexBest(0)
|
||||
}
|
||||
|
||||
myarrvalues.value.push(mydata)
|
||||
}
|
||||
}
|
||||
|
||||
if (myarrvalues.value.length === 0)
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
<div :class="` q-ma-sm q-pa-sm col-grow popupedit `" :style="withBorder() ? `` : ``">
|
||||
<CMyPopupEdit
|
||||
v-bind="$attrs"
|
||||
:rec="rec"
|
||||
:isrec="!!rec"
|
||||
:table="table"
|
||||
:title="title"
|
||||
:field="mykey"
|
||||
:subfield="mysubkey"
|
||||
@@ -32,12 +35,11 @@
|
||||
:serv="serv"
|
||||
:disable="disable"
|
||||
:jointable="jointable"
|
||||
:table="table"
|
||||
:myimg="myimg"
|
||||
:id="id"
|
||||
:idmain="idmain"
|
||||
:canModify="canModify"
|
||||
:canEdit="true"
|
||||
:id="id"
|
||||
:idmain="idmain"
|
||||
:mycol="col"
|
||||
:tablesel="tablesel"
|
||||
:pickup="pickup"
|
||||
|
||||
@@ -17,6 +17,11 @@ export default defineComponent({
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
tablesel: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
required: false,
|
||||
@@ -66,6 +71,16 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: -1,
|
||||
},
|
||||
filter_table: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
filter_field: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
components: { CMyPopupEdit },
|
||||
setup(props, { emit }) {
|
||||
@@ -79,7 +94,6 @@ export default defineComponent({
|
||||
const optlab = ref('')
|
||||
|
||||
const pickup = ref(false)
|
||||
const tablesel = ref('')
|
||||
const jointable = ref('')
|
||||
const recordCol = ref(<any>{})
|
||||
|
||||
@@ -95,6 +109,7 @@ export default defineComponent({
|
||||
optlab.value = fieldsTable.getLabelByTable(props.table)
|
||||
// recordCol.value = fieldsTable.getrecTableList(props.table)
|
||||
let columns = fieldsTable.getArrColsByTable(props.table)
|
||||
|
||||
if (columns) {
|
||||
col.value = columns.find((col: any) => col.field === props.field)
|
||||
} else {
|
||||
@@ -151,7 +166,11 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function visuElem() {
|
||||
return !!col.value.name && (props.canEdit || (!props.canEdit && getValue()))
|
||||
if (col.value) {
|
||||
return !!col.value.name && (props.canEdit || (!props.canEdit && getValue()))
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
@@ -168,7 +187,6 @@ export default defineComponent({
|
||||
optlab,
|
||||
recordCol,
|
||||
pickup,
|
||||
tablesel,
|
||||
jointable,
|
||||
showandsel,
|
||||
mykey,
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
</div>
|
||||
|
||||
<div :class="` col-grow clpopupVisuCard `" :style="withBorder() ? `` : ``">
|
||||
|
||||
<CMyPopupEdit
|
||||
v-bind="$attrs"
|
||||
:isrec="true"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { defineComponent, onMounted, onBeforeMount, PropType, ref, toRef, watch } from 'vue'
|
||||
import { defineComponent, onMounted, onBeforeMount, PropType, ref, toRef, watch, computed } from 'vue'
|
||||
import { useI18n } from '@src/boot/i18n'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
@@ -38,6 +38,11 @@ export default defineComponent({
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
rec: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
isrec: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
@@ -186,15 +191,20 @@ export default defineComponent({
|
||||
|
||||
const col = ref(<IColGridTable> { name: 'test', fieldtype: 0, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView, visible: true, maxlength: props.mycol ? props.mycol.maxlength : 0 })
|
||||
|
||||
const myrow = toRef(props, 'row')
|
||||
|
||||
const { setValDb, getValDb } = MixinBase()
|
||||
const { getMyUsername } = MixinUsers()
|
||||
|
||||
const myrealrow = toRef(props, 'row')
|
||||
|
||||
watch(() => props.row, (newval, oldval) => {
|
||||
refresh()
|
||||
})
|
||||
|
||||
|
||||
const myrow = computed(() => {
|
||||
return props.rec && props.isrec ? props.rec : props.row
|
||||
})
|
||||
|
||||
function crea() {
|
||||
// console.log('crea', isFieldDb())
|
||||
|
||||
@@ -321,12 +331,13 @@ export default defineComponent({
|
||||
function mounted() {
|
||||
|
||||
try {
|
||||
|
||||
// console.log('mounted', 'isFieldDb()', isFieldDb())
|
||||
if (isFieldDb() && !props.isrec) {
|
||||
|
||||
} else {
|
||||
if (props.subfield !== '') {
|
||||
if (props.row[props.field] === undefined) {
|
||||
if (myrow.value[props.field] === undefined) {
|
||||
myrow.value[props.field] = {}
|
||||
myvalue.value = ''
|
||||
} else {
|
||||
@@ -408,8 +419,13 @@ export default defineComponent({
|
||||
} else {
|
||||
if (props.field !== '')
|
||||
myrow.value[props.field] = newVal
|
||||
else
|
||||
myrow.value = newVal
|
||||
else {
|
||||
if (!props.isrec) {
|
||||
// @ts-ignore
|
||||
myrealrow.value = newVal
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
emit('save', newVal, valinitial)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div :class="getclassCol(col)">
|
||||
|
||||
<div
|
||||
v-if="tools.checkIfShowField(col, insertMode ? tools.TIPOVIS_NEW_RECORD : (isInModif ? tools.TIPOVIS_EDIT_RECORD : tools.TIPOVIS_SHOW_RECORD), visulabel, myvalue)"
|
||||
style="flex-grow: 1;">
|
||||
@@ -305,6 +306,7 @@
|
||||
</div>
|
||||
<div v-else>
|
||||
<CMyChipList
|
||||
:rec="row"
|
||||
:type="costanti.FieldType.binary"
|
||||
:value="myvalue"
|
||||
@update:value="changevalRec"
|
||||
@@ -374,6 +376,7 @@
|
||||
</div>
|
||||
<div v-else>
|
||||
<CMyChipList
|
||||
:rec="row"
|
||||
:type="col.fieldtype"
|
||||
:type_out="col.field_outtype"
|
||||
@update:value="changevalRec"
|
||||
@@ -394,7 +397,7 @@
|
||||
:label="col.label"
|
||||
v-model:value="myvalue"
|
||||
:pickup="col.fieldtype === costanti.FieldType.select_by_server"
|
||||
:tablesel="col.type === costanti.FieldType.select_by_server ? tablesel : ''"
|
||||
:tablesel="col.fieldtype === costanti.FieldType.select_by_server ? tablesel : ''"
|
||||
@update:value="changevalRec"
|
||||
:newvaluefunc="addNewValue"
|
||||
:filter_table="col.filter_table"
|
||||
@@ -407,12 +410,23 @@
|
||||
</CMySelect>
|
||||
</div>
|
||||
<div v-else>
|
||||
<!--
|
||||
rec: {{rec}}
|
||||
row: {{row}}
|
||||
col.jointable {{col.jointable}}
|
||||
myvalue {{myvalue}}
|
||||
opt: {{globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)}}
|
||||
val: {{fieldsTable.getKeyByTable(col.jointable)}}
|
||||
lab: {{fieldsTable.getLabelByTable(col.jointable)}}-->
|
||||
<CMyChipList
|
||||
:rec="row"
|
||||
myclass="text-center"
|
||||
:type="col.fieldtype"
|
||||
:type_out="col.field_outtype"
|
||||
@update:value="changevalRec"
|
||||
v-model:value="myvalue"
|
||||
:filter_table="col.filter_table"
|
||||
:filter_field="col.filter_field"
|
||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
@@ -420,6 +434,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.multiselect_by_server">
|
||||
|
||||
<CMySelect
|
||||
:type_out="col.field_outtype"
|
||||
:col="col"
|
||||
@@ -648,7 +663,7 @@
|
||||
:label="col.label"
|
||||
v-model:value="scope.value"
|
||||
:pickup="col.fieldtype === costanti.FieldType.select_by_server"
|
||||
:tablesel="col.type === costanti.FieldType.select_by_server ? tablesel : ''"
|
||||
:tablesel="col.fieldtype === costanti.FieldType.select_by_server ? tablesel : ''"
|
||||
:filter_table="col.filter_table"
|
||||
:filter_field="col.filter_field"
|
||||
:value_extra="value_extra"
|
||||
|
||||
@@ -67,6 +67,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
filter_extra: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
value_extra: {
|
||||
type: [String, Number],
|
||||
required: false,
|
||||
@@ -450,7 +455,8 @@ export default defineComponent({
|
||||
return
|
||||
}
|
||||
|
||||
if (val.length <= 1) {
|
||||
|
||||
if (val.length <= 1 && !(fieldsTable.tableRemotePickup.includes(props.tablesel) && props.filter_extra )) {
|
||||
console.log('@@@ LENGTH <= 1')
|
||||
abort()
|
||||
return
|
||||
@@ -461,9 +467,9 @@ export default defineComponent({
|
||||
if (fieldsTable.tableRemotePickup.includes(props.tablesel)) {
|
||||
try {
|
||||
myarr = optionsreal.value
|
||||
if (mystr !== '')
|
||||
if (mystr !== '' || props.filter_extra)
|
||||
// myarr = [{_id:1, prov: 'RN', descr: 'Rimini'}]
|
||||
myarr = await globalStore.loadPickup({ table: props.tablesel, search: mystr.trim() })
|
||||
myarr = await globalStore.loadPickup({ table: props.tablesel, search: mystr.trim(), filter: props.filter_extra })
|
||||
|
||||
if (myarr === null) {
|
||||
console.log('@@@ VALORI VALUE XXX', valori.value)
|
||||
|
||||
@@ -464,6 +464,7 @@ export interface IParLookup {
|
||||
export interface IParamsPickup {
|
||||
table: string
|
||||
search: string
|
||||
filter: string
|
||||
}
|
||||
export interface IParamsQuery {
|
||||
table: string
|
||||
@@ -558,6 +559,7 @@ export interface ISearchList {
|
||||
tablesel?: string
|
||||
icon?: string
|
||||
filteradv?: boolean
|
||||
filter_extra?: object
|
||||
}
|
||||
|
||||
export interface IFilter {
|
||||
|
||||
@@ -27,22 +27,14 @@ export const costanti = {
|
||||
color: 'red',
|
||||
hint: '',
|
||||
},
|
||||
{
|
||||
title: 'Luoghi',
|
||||
to: '/places',
|
||||
icon: 'fas fa-map-marker-alt',
|
||||
color: 'blue',
|
||||
hint: '',
|
||||
disable: true,
|
||||
},
|
||||
{
|
||||
title: 'Mobilità',
|
||||
to: '/places',
|
||||
icon: 'fas fa-taxi',
|
||||
color: 'yellow-5',
|
||||
textcolor: 'grey-10',
|
||||
color: 'lime-7',
|
||||
textcolor: '',
|
||||
hint: '',
|
||||
disable: true,
|
||||
disable: false,
|
||||
},
|
||||
{
|
||||
title: 'Scuola',
|
||||
@@ -50,7 +42,7 @@ export const costanti = {
|
||||
icon: 'fas fa-book-open',
|
||||
color: 'orange',
|
||||
hint: '',
|
||||
disable: true,
|
||||
disable: false,
|
||||
},
|
||||
{
|
||||
title: 'Alimenti',
|
||||
@@ -58,34 +50,42 @@ export const costanti = {
|
||||
icon: 'fas fa-utensils',
|
||||
color: 'green-5',
|
||||
hint: '',
|
||||
disable: true,
|
||||
disable: false,
|
||||
},
|
||||
{
|
||||
title: 'Tue_Idee',
|
||||
title: 'Luoghi',
|
||||
to: '/places',
|
||||
icon: 'fas fa-map-marker-alt',
|
||||
color: 'blue',
|
||||
hint: '',
|
||||
disable: false,
|
||||
},
|
||||
{
|
||||
title: 'Tue Idee',
|
||||
to: '/ideas',
|
||||
icon: 'fas fa-lightbulb',
|
||||
color: 'red-5',
|
||||
textcolor: '',
|
||||
hint: '',
|
||||
disable: true,
|
||||
disable: false,
|
||||
small: true,
|
||||
},
|
||||
{
|
||||
title: 'Aiuto',
|
||||
title: 'Eventi',
|
||||
to: '/bacheca',
|
||||
icon: 'event',
|
||||
color: 'pink-5',
|
||||
hint: 'eventi, last minute, offerte di lavoro',
|
||||
disable: true,
|
||||
disable: false,
|
||||
small: true,
|
||||
},
|
||||
{
|
||||
title: 'Socializza',
|
||||
title: 'Social',
|
||||
to: '/socialising',
|
||||
icon: 'fas fa-users',
|
||||
color: 'purple-5',
|
||||
hint: '',
|
||||
disable: true,
|
||||
disable: false,
|
||||
small: true,
|
||||
},
|
||||
],
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,5 @@
|
||||
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
||||
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CProfile } from '@/components/CProfile'
|
||||
import { CSkill } from '@/components/CSkill'
|
||||
@@ -12,11 +13,12 @@ import { toolsext } from '@store/Modules/toolsext'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { costanti } from '@costanti'
|
||||
import { static_data } from '@/db/static_data'
|
||||
import { IUserFields } from 'model'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
name: 'EditProfile',
|
||||
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill },
|
||||
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill, CMyFieldRec },
|
||||
props: {},
|
||||
setup() {
|
||||
const userStore = useUserStore()
|
||||
@@ -25,6 +27,8 @@ export default defineComponent({
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n();
|
||||
|
||||
const myuser = ref({})
|
||||
|
||||
const filtroutente = ref(<any[]>[])
|
||||
|
||||
function getpayment() {
|
||||
@@ -74,10 +78,19 @@ export default defineComponent({
|
||||
})
|
||||
}
|
||||
|
||||
function loadProfile() {
|
||||
// Carica il profilo di quest'utente
|
||||
userStore.loadUserProfile(userStore.my.username).then((ris) => {
|
||||
myuser.value = ris
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function mounted() {
|
||||
filtroutente.value = [
|
||||
{ userId: userStore.my._id}
|
||||
]
|
||||
loadProfile()
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
@@ -90,6 +103,8 @@ export default defineComponent({
|
||||
costanti,
|
||||
static_data,
|
||||
filtroutente,
|
||||
myuser,
|
||||
t,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -134,17 +134,34 @@
|
||||
:type="costanti.FieldType.nationality">
|
||||
</CMyFieldDb>
|
||||
|
||||
<!--
|
||||
<CMyFieldDb
|
||||
v-if="myuser"
|
||||
:title="$t('reg.residency_city')"
|
||||
table="users"
|
||||
tablesel="cities"
|
||||
mykey="profile"
|
||||
:useinput="false"
|
||||
mysubkey="born_city_id"
|
||||
:useinput="false"
|
||||
jointable="cities"
|
||||
:pickup="true"
|
||||
:type="costanti.FieldType.select_by_server">
|
||||
</CMyFieldDb>
|
||||
:type="costanti.FieldType.select_by_server"
|
||||
:rec="myuser"
|
||||
/>
|
||||
-->
|
||||
|
||||
<CMyFieldRec
|
||||
:title="t('reg.residency_city')"
|
||||
table="users"
|
||||
tablesel="cities"
|
||||
:id="myuser._id"
|
||||
:rec="myuser"
|
||||
field="profile.born_city_id"
|
||||
:canEdit="true"
|
||||
:canModify="true">
|
||||
</CMyFieldRec>
|
||||
|
||||
|
||||
|
||||
<CMyFieldDb
|
||||
:title="$t('reg.dateofbirth')"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
||||
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CProfile } from '@/components/CProfile'
|
||||
import { CCopyBtn } from '@/components/CCopyBtn'
|
||||
@@ -23,7 +24,7 @@ import MixinUsers from '@/mixins/mixin-users'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'myprofile',
|
||||
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime, CCopyBtn, CUserNonVerif },
|
||||
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime, CCopyBtn, CUserNonVerif, CMyFieldRec },
|
||||
props: {},
|
||||
setup() {
|
||||
const userStore = useUserStore()
|
||||
|
||||
@@ -19,14 +19,16 @@
|
||||
<div class="col-12 text-h7 text-blue text-shadow-2">
|
||||
{{ myuser.username }}
|
||||
</div>
|
||||
|
||||
ID: {{myuser.profile.born_city_id}}
|
||||
<div class="col-12 text-h7">
|
||||
<span v-if="myuser.profile && myuser.profile.born_city_id">
|
||||
<CMyFieldRec
|
||||
title="Comune"
|
||||
title=""
|
||||
table="users"
|
||||
tablesel="cities"
|
||||
:id="myuser._id"
|
||||
:columns="fieldsTable.userlist()"
|
||||
:rec="mygrp"
|
||||
:rec="myuser"
|
||||
field="profile.born_city_id"
|
||||
:canEdit="false"
|
||||
:canModify="false">
|
||||
|
||||
Reference in New Issue
Block a user