Files
newfreeplanet_OLD/src/components/CContactUser/CContactUser.ts
Surya Paolo 979f90f980 ver 1.1.20:
- corretto campo foto che non compariva più.
 - sistemato i campi aggiuntivi e i richiesti.
- migliorato la barra in alto di selezione.
- aggiunto alcune icone.
2025-02-03 17:18:33 +01:00

100 lines
2.2 KiB
TypeScript
Executable File

import { tools } from '../../store/Modules/tools'
import { useQuasar } from 'quasar'
import { useI18n } from '@src/boot/i18n'
import { useUserStore } from '@store/UserStore'
import { useGlobalStore } from '@store/globalStore'
import { defineComponent, computed, PropType, ref } from 'vue'
import { IUserFields } from 'model'
import { shared_consts } from '@/common/shared_vuejs'
import { CLabel } from '@/components/CLabel'
import { CSendCoins } from '@/components/CSendCoins'
export default defineComponent({
name: 'CContactUser',
emits: ['showed'],
props: {
myuser: {
type: Object as PropType<IUserFields>,
required: true,
},
showBtnActivities: {
type: Boolean,
required: true,
},
showBtnRis: {
type: Boolean,
required: true,
},
sendRIS: {
type: String,
required: false,
default: '',
},
causalDest: {
type: String,
required: false,
default: '',
},
},
components: { CLabel, CSendCoins },
setup(props, { emit }) {
const $q = useQuasar()
const userStore = useUserStore()
const globalStore = useGlobalStore()
const showsendCoinTo = ref(false)
const showingtooltip = ref(false)
const site = computed(() => globalStore.site)
const loading = ref(false)
function myusername() {
return userStore.my.username
}
function getLinkWebSite() {
if (props.myuser) {
let mysite = props.myuser.profile.website!
if (mysite) {
if (!mysite.startsWith('http')) {
mysite = 'https://' + mysite
}
}
return mysite
} else {
return ''
}
}
function clickOpenSendCoin() {
if (!userStore.my.profile.resid_province) {
// showProvinceToSelect.value = true
} else {
loading.value = true
showsendCoinTo.value = true
}
}
function showed() {
loading.value = false
emit('showed')
}
return {
tools,
userStore,
shared_consts,
showsendCoinTo,
getLinkWebSite,
myusername,
showingtooltip,
clickOpenSendCoin,
site,
loading,
showed,
}
},
})