- Statistiche
- Menu e Sottomenu - Lista ultimi Movimenti
This commit is contained in:
100
src/components/CMyImgUser/CMyImgUser.ts
Executable file
100
src/components/CMyImgUser/CMyImgUser.ts
Executable file
@@ -0,0 +1,100 @@
|
||||
import { defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { ICircuit, IImgGallery, IMovQuery, IUserFields, IUserProfile } from 'model'
|
||||
import { costanti } from '@costanti'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { CSendCoins } from '@/components/CSendCoins'
|
||||
import { CSaldo } from '@/components/CSaldo'
|
||||
import { CUserInfoAccount } from '@/components/CUserInfoAccount'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useCircuitStore } from '@store/CircuitStore'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyImgUser',
|
||||
components: { CSendCoins, CSaldo, CUserInfoAccount },
|
||||
emits: ['setCmd', 'showInnerDialog'],
|
||||
props: {
|
||||
mycontact: {
|
||||
type: Object as PropType<IUserFields | null>,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
mov: {
|
||||
type: Object as PropType<IMovQuery | null>,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
from: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
myusername: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
groupname: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
|
||||
setup(props, { emit }) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const $router = useRouter()
|
||||
const $route = useRoute()
|
||||
|
||||
const showsendCoinTo = ref(false)
|
||||
|
||||
const showAccountInfo = ref(false)
|
||||
|
||||
const contact = ref(<IUserFields | null>null)
|
||||
const circuit = ref(<ICircuit | null | undefined>null)
|
||||
|
||||
watch(() => props.mycontact, (newval, oldval) => {
|
||||
mounted()
|
||||
})
|
||||
|
||||
function mounted() {
|
||||
if (props.mycontact) {
|
||||
contact.value = props.mycontact
|
||||
}
|
||||
}
|
||||
|
||||
function getImgUser(profile: IUserFields) {
|
||||
return userStore.getImgByProfile(profile)
|
||||
}
|
||||
|
||||
function getImgUserMov(tipoconto: number, from: boolean) {
|
||||
return userStore.getImgByMov(props.mov!, tipoconto, from, true)
|
||||
}
|
||||
|
||||
function naviga(path: string) {
|
||||
$router.push(path)
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
contact,
|
||||
costanti,
|
||||
getImgUser,
|
||||
getImgUserMov,
|
||||
naviga,
|
||||
shared_consts,
|
||||
userStore,
|
||||
tools,
|
||||
circuit,
|
||||
showAccountInfo,
|
||||
showsendCoinTo,
|
||||
}
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user