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