pagina Attivita + Video e PDF Presentazione
This commit is contained in:
@@ -45,6 +45,7 @@ export const shared_consts = {
|
|||||||
BOTT_CONDIVIDI: 190,
|
BOTT_CONDIVIDI: 190,
|
||||||
BUTTON: 195,
|
BUTTON: 195,
|
||||||
PRESENTAZIONE: 200,
|
PRESENTAZIONE: 200,
|
||||||
|
MYACTIVITIES: 205,
|
||||||
NOTIFATTOP: 210,
|
NOTIFATTOP: 210,
|
||||||
CHART: 220,
|
CHART: 220,
|
||||||
CHECKNEWVERSION: 230,
|
CHECKNEWVERSION: 230,
|
||||||
@@ -1312,6 +1313,10 @@ export const shared_consts = {
|
|||||||
value: 200,
|
value: 200,
|
||||||
label: 'Presentazione',
|
label: 'Presentazione',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
value: 205,
|
||||||
|
label: 'Attività',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
value: 210,
|
value: 210,
|
||||||
label: 'Notifiche in Top',
|
label: 'Notifiche in Top',
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ import { useI18n } from '@/boot/i18n'
|
|||||||
import { tools } from '@store/Modules/tools'
|
import { tools } from '@store/Modules/tools'
|
||||||
import { costanti } from '@store/Modules/costanti'
|
import { costanti } from '@store/Modules/costanti'
|
||||||
import { static_data } from '@src/db/static_data'
|
import { static_data } from '@src/db/static_data'
|
||||||
|
import { CRegistration } from '@/components/CRegistration'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'CCheckIfIsLogged',
|
name: 'CCheckIfIsLogged',
|
||||||
components: { },
|
components: { CRegistration },
|
||||||
props: {},
|
props: {},
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,40 +1,132 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="!tools.isLogged()">
|
<div v-if="!tools.isLogged()">
|
||||||
<div class="q-pa-md q-gutter-sm">
|
<div class="q-pa-md q-gutter-sm">
|
||||||
|
|
||||||
<div id="logo" class="text-center">
|
<div id="logo" class="text-center">
|
||||||
<img id="logoimg" :src="tools.getimglogo()" alt="logo APP">
|
<q-img
|
||||||
|
id="logoimg"
|
||||||
|
:src="tools.getimglogo()"
|
||||||
|
class="q-my-sm"
|
||||||
|
alt="logo APP"
|
||||||
|
style="height: 100px; width: 100px"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-banner rounded class="bg-primary text-white">
|
<q-banner
|
||||||
<div class="text-h6 text-center">
|
v-if="site.confpages.videoPromo"
|
||||||
Accedi al menu inserendo le tue credenziali per entrare 🔑<br>
|
rounded
|
||||||
<div class="text-center">
|
dense
|
||||||
<q-btn push color="white" text-color="blue" label="Clicca qui per Accedere" @click="tools.openrighttoolbar()"/>
|
size="lg"
|
||||||
</div>
|
class="bg-grey-3 shadow-5 q-my-sm"
|
||||||
<br>
|
color="primary q-title"
|
||||||
Entra anche nel <a href="https://riso.app/gruppi_territoriali"><strong>Canale e Gruppo Telegram di RISO</strong></a> scegliendo la tua provincia !
|
style="text-align: center"
|
||||||
</div>
|
>
|
||||||
<br>
|
<div class="mybanner bg-blue text-white">Video di Presentazione:</div>
|
||||||
|
<br />
|
||||||
|
<q-video :src="site.confpages.videoPromo" :ratio="16 / 9"> </q-video>
|
||||||
</q-banner>
|
</q-banner>
|
||||||
|
|
||||||
|
<q-banner
|
||||||
|
v-if="site.confpages.PDFPromo"
|
||||||
|
rounded
|
||||||
|
dense
|
||||||
|
size="lg"
|
||||||
|
class="bg-grey-3 shadow-5 q-my-sm"
|
||||||
|
color="primary q-title"
|
||||||
|
style="text-align: center"
|
||||||
|
>
|
||||||
|
<div class="mybanner bg-blue text-white">PDF Presentazione RISO:</div>
|
||||||
|
<br />
|
||||||
|
<template v-slot:action>
|
||||||
|
<q-btn
|
||||||
|
type="a"
|
||||||
|
rounded
|
||||||
|
icon="fab fa-telegram"
|
||||||
|
color="primary"
|
||||||
|
:href="site.confpages.PDFPromo"
|
||||||
|
target="_blank"
|
||||||
|
label="Scarica PDF"
|
||||||
|
>
|
||||||
|
</q-btn>
|
||||||
|
</template>
|
||||||
|
</q-banner>
|
||||||
|
|
||||||
|
<div class="text-h6 text-center">
|
||||||
|
<transition-group
|
||||||
|
name="fade"
|
||||||
|
mode="out-in"
|
||||||
|
appear
|
||||||
|
enter-active-class="animazione fadeIn"
|
||||||
|
leave-active-class="animazione fadeOut"
|
||||||
|
>
|
||||||
|
<q-banner
|
||||||
|
:key="1"
|
||||||
|
rounded
|
||||||
|
dense
|
||||||
|
size="lg"
|
||||||
|
class="shadow-5 q-my-sm"
|
||||||
|
color="primary q-title"
|
||||||
|
style="text-align: center"
|
||||||
|
>
|
||||||
|
<template v-slot:avatar>
|
||||||
|
<q-icon :key="2" name="signal_wifi_off" color="primary" />
|
||||||
|
</template>
|
||||||
|
<div class="mybanner" :key="3">
|
||||||
|
Accedi per Unirti alla RETE e al Circuito di scambio RIS
|
||||||
|
</div>
|
||||||
|
<template v-slot:action>
|
||||||
|
<q-btn
|
||||||
|
rounded
|
||||||
|
icon="fas fa-user"
|
||||||
|
color="primary"
|
||||||
|
@click="tools.openrighttoolbar()"
|
||||||
|
>{{ $t('login.enter') }}
|
||||||
|
</q-btn>
|
||||||
|
<CRegistration />
|
||||||
|
</template>
|
||||||
|
</q-banner>
|
||||||
|
</transition-group>
|
||||||
|
<q-banner
|
||||||
|
rounded
|
||||||
|
dense
|
||||||
|
size="lg"
|
||||||
|
class="shadow-5"
|
||||||
|
color="primary q-title"
|
||||||
|
style="text-align: center"
|
||||||
|
>
|
||||||
|
<div class="mybanner" :key="3">
|
||||||
|
👉🏻 Entra nel canale Telegram per unirti al gruppo Provinciale:
|
||||||
|
</div>
|
||||||
|
<template v-slot:action>
|
||||||
|
<q-btn
|
||||||
|
type="a"
|
||||||
|
rounded
|
||||||
|
icon="fab fa-telegram"
|
||||||
|
color="primary"
|
||||||
|
href="https://t.me/+pZ40VpmL1NhkZjE0"
|
||||||
|
target="_blank"
|
||||||
|
label="Progetto RISO"
|
||||||
|
>
|
||||||
|
</q-btn>
|
||||||
|
</template>
|
||||||
|
</q-banner>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
<q-banner rounded class="bg-green-8 text-white">
|
<q-banner rounded class="bg-green-8 text-white">
|
||||||
<div class="text-h6 text-center">
|
<div class="text-h6 text-center">
|
||||||
Visualizza la pagina di Aiuto<br>
|
Visualizza la pagina di Aiuto<br />
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<q-btn :color="$q.dark.isActive ? `black` : `white`" push glossy :text-color="$q.dark.isActive ? `white` : `black`" label="Pagina Aiuto" to="/faq"/>
|
<q-btn
|
||||||
|
:color="$q.dark.isActive ? `black` : `white`"
|
||||||
|
push
|
||||||
|
glossy
|
||||||
|
:text-color="$q.dark.isActive ? `white` : `black`"
|
||||||
|
label="Pagina Aiuto"
|
||||||
|
to="/istruzioni"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-banner>
|
</q-banner>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
|
||||||
v-if="!tools.isLogged() && site.confpages.enableReg && site.confpages.showRegButton"
|
|
||||||
style="margin:20px; text-align: center;">
|
|
||||||
|
|
||||||
<q-btn rounded size="lg" color="primary" @click="tools.openrighttoolbar()">{{ $t('login.enter') }}
|
|
||||||
</q-btn>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -251,6 +251,11 @@ export default defineComponent({
|
|||||||
required: false,
|
required: false,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
hidetitleIfEmpty: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
CMyPopupEdit, CTitleBanner, CMyFieldDb, CMySelect, CMyFriends, CMyGroups,
|
CMyPopupEdit, CTitleBanner, CMyFieldDb, CMySelect, CMyFriends, CMyGroups,
|
||||||
@@ -282,6 +287,7 @@ export default defineComponent({
|
|||||||
const search = ref('')
|
const search = ref('')
|
||||||
|
|
||||||
const tablesel = ref('')
|
const tablesel = ref('')
|
||||||
|
const showSpin = ref(false)
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const editOn = computed({
|
const editOn = computed({
|
||||||
@@ -2178,6 +2184,7 @@ export default defineComponent({
|
|||||||
showNotification,
|
showNotification,
|
||||||
editOn,
|
editOn,
|
||||||
newRecordBoolOld,
|
newRecordBoolOld,
|
||||||
|
showSpin,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="tools.isDebugOn()">
|
<div v-if="tools.isDebugOn()"></div>
|
||||||
|
|
||||||
</div>
|
|
||||||
<div :class="$q.screen.lt.sm ? `` : `q-pa-xs`" v-if="isfinishLoading">
|
<div :class="$q.screen.lt.sm ? `` : `q-pa-xs`" v-if="isfinishLoading">
|
||||||
<q-toggle
|
<q-toggle
|
||||||
v-if="tools.isManager()"
|
v-if="tools.isManager()"
|
||||||
@@ -10,7 +8,11 @@
|
|||||||
icon="fas fa-pencil-alt"
|
icon="fas fa-pencil-alt"
|
||||||
>
|
>
|
||||||
</q-toggle>
|
</q-toggle>
|
||||||
<div class="centermydiv q-my-sm" style="text-align: center">
|
<div
|
||||||
|
v-if="mytable && visButtRow()"
|
||||||
|
class="centermydiv q-my-sm"
|
||||||
|
style="text-align: center"
|
||||||
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="mytable && visButtRow()"
|
v-if="mytable && visButtRow()"
|
||||||
rounded
|
rounded
|
||||||
@@ -26,7 +28,13 @@
|
|||||||
v-if="butt_modif_new || mytitle"
|
v-if="butt_modif_new || mytitle"
|
||||||
:class="$q.screen.lt.sm ? `` : `q-gutter-md q-ma-xs` + ` row`"
|
:class="$q.screen.lt.sm ? `` : `q-gutter-md q-ma-xs` + ` row`"
|
||||||
>
|
>
|
||||||
<div class="q-table__title" style="min-width: 150px">{{ mytitle }}</div>
|
<div
|
||||||
|
v-if="!hidetitleIfEmpty || (hidetitleIfEmpty && serverData.length > 0)"
|
||||||
|
class="q-table__title"
|
||||||
|
style="min-width: 150px"
|
||||||
|
>
|
||||||
|
{{ mytitle }}
|
||||||
|
</div>
|
||||||
<q-space></q-space>
|
<q-space></q-space>
|
||||||
<div v-if="butt_modif_new">
|
<div v-if="butt_modif_new">
|
||||||
<q-btn
|
<q-btn
|
||||||
@@ -321,7 +329,6 @@
|
|||||||
:offset="350"
|
:offset="350"
|
||||||
debounce="300"
|
debounce="300"
|
||||||
>
|
>
|
||||||
|
|
||||||
<div v-if="showHeaderCol">
|
<div v-if="showHeaderCol">
|
||||||
<div
|
<div
|
||||||
v-for="col in mycolumns"
|
v-for="col in mycolumns"
|
||||||
@@ -418,9 +425,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-else-if="
|
v-else-if="
|
||||||
((showType === costanti.SHOW_GROUPINFO &&
|
(showType === costanti.SHOW_GROUPINFO &&
|
||||||
myvertical !== costanti.VISUTABLE_SCHEDA_GROUP) ||
|
myvertical !== costanti.VISUTABLE_SCHEDA_GROUP) ||
|
||||||
(myvertical === 2 && tablesel === 'mygroups')) || (myvertical === costanti.VISUTABLE_GROUP_CIRCUIT)
|
(myvertical === 2 && tablesel === 'mygroups') ||
|
||||||
|
myvertical === costanti.VISUTABLE_GROUP_CIRCUIT
|
||||||
"
|
"
|
||||||
class="fill-all-width"
|
class="fill-all-width"
|
||||||
>
|
>
|
||||||
@@ -491,7 +499,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template v-slot:loading>
|
<template v-slot:loading>
|
||||||
<div class="text-center">
|
<div v-if="!hidetitleIfEmpty" class="text-center">
|
||||||
<q-spinner-dots color="primary" size="40px" />
|
<q-spinner-dots color="primary" size="40px" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -1336,7 +1344,7 @@
|
|||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
<br />
|
<span v-if="!hidetitleIfEmpty"> <br /></span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" src="./CGridTableRec.ts">
|
<script lang="ts" src="./CGridTableRec.ts">
|
||||||
|
|||||||
0
src/components/CMyActivities/CMyActivities.scss
Executable file
0
src/components/CMyActivities/CMyActivities.scss
Executable file
208
src/components/CMyActivities/CMyActivities.ts
Executable file
208
src/components/CMyActivities/CMyActivities.ts
Executable file
@@ -0,0 +1,208 @@
|
|||||||
|
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
||||||
|
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
||||||
|
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||||
|
import { CProfile } from '@/components/CProfile'
|
||||||
|
import { CLabel } from '@/components/CLabel'
|
||||||
|
import { CCopyBtn } from '@/components/CCopyBtn'
|
||||||
|
import { CSkill } from '@/components/CSkill'
|
||||||
|
import { CDateTime } from '@/components/CDateTime'
|
||||||
|
import { CMyGroup } from '@/components/CMyGroup'
|
||||||
|
import { CMyCircuit } from '@/components/CMyCircuit'
|
||||||
|
import { CNotifAtTop } from '@src/components/CNotifAtTop'
|
||||||
|
import { CSendCoins } from '@/components/CSendCoins'
|
||||||
|
import { CMyUser } from '@/components/CMyUser'
|
||||||
|
import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
|
||||||
|
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||||
|
import { tools } from '@store/Modules/tools'
|
||||||
|
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
|
||||||
|
import { useUserStore } from '@store/UserStore'
|
||||||
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
|
import { useGlobalStore } from '@store/globalStore'
|
||||||
|
import { useI18n } from '@/boot/i18n'
|
||||||
|
import { toolsext } from '@store/Modules/toolsext'
|
||||||
|
import { useQuasar } from 'quasar'
|
||||||
|
import { costanti } from '@costanti'
|
||||||
|
import { ICircuit, IMyCircuit, IMyGroup, IUserFields } from 'model'
|
||||||
|
import { shared_consts } from '@/common/shared_vuejs'
|
||||||
|
import { static_data } from '@/db/static_data'
|
||||||
|
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||||
|
import { useNotifStore } from '@store/NotifStore'
|
||||||
|
import MixinUsers from '@/mixins/mixin-users'
|
||||||
|
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: 'CMyActivities',
|
||||||
|
components: {
|
||||||
|
CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime, CCopyBtn, CUserNonVerif, CMyFieldRec, CMyUser,
|
||||||
|
CMyGroup, CLabel, CMyCircuit, CSendCoins, CNotifAtTop, CCheckIfIsLogged
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
},
|
||||||
|
setup() {
|
||||||
|
const userStore = useUserStore()
|
||||||
|
const globalStore = useGlobalStore()
|
||||||
|
const $route = useRoute()
|
||||||
|
const $q = useQuasar()
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
|
const site = ref(globalStore.site)
|
||||||
|
|
||||||
|
const { getRefLink } = MixinUsers()
|
||||||
|
|
||||||
|
const animation = ref('fade')
|
||||||
|
|
||||||
|
const username = computed(() => $route.params.username ? $route.params.username.toString() : userStore.my.username)
|
||||||
|
const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '')
|
||||||
|
|
||||||
|
const filtroutente = ref(<any[]>[])
|
||||||
|
const showPic = ref(false)
|
||||||
|
const caricato = ref(false)
|
||||||
|
const showsendCoinTo = ref(false)
|
||||||
|
|
||||||
|
const myuser = ref(<IUserFields | null>null)
|
||||||
|
|
||||||
|
const actualcard = ref('mygoods')
|
||||||
|
|
||||||
|
const notifStore = useNotifStore()
|
||||||
|
|
||||||
|
const mycards = computed(() => {
|
||||||
|
return costanti.MAINCARDS.filter((rec: any) => rec.table)
|
||||||
|
})
|
||||||
|
const optionsMainCards = ref({})
|
||||||
|
|
||||||
|
const listgroupsfiltered = ref(<IMyGroup[]>[])
|
||||||
|
const listcircuitsfiltered = ref(<IMyCircuit[]>[])
|
||||||
|
|
||||||
|
|
||||||
|
function profile() {
|
||||||
|
return userStore.my.profile
|
||||||
|
}
|
||||||
|
|
||||||
|
function myusername() {
|
||||||
|
return userStore.my.username
|
||||||
|
}
|
||||||
|
|
||||||
|
async function loadProfile() {
|
||||||
|
console.log('loadProfile...', username.value)
|
||||||
|
try {
|
||||||
|
// Carica il profilo di quest'utente
|
||||||
|
if (username.value) {
|
||||||
|
await userStore.loadUserProfile({ username: username.value, idnotif: idnotif.value }).then((ris) => {
|
||||||
|
console.log('loadUserProfile = ', ris)
|
||||||
|
myuser.value = ris
|
||||||
|
if (myuser.value) {
|
||||||
|
filtroutente.value = [{ userId: myuser.value._id }]
|
||||||
|
notifStore.setAsRead(idnotif.value)
|
||||||
|
|
||||||
|
try {
|
||||||
|
listgroupsfiltered.value = globalStore.mygroups.filter((grp: IMyGroup) => myuser.value!.profile.mygroups.findIndex((rec: IMyGroup) => rec.groupname === grp.groupname) >= 0)
|
||||||
|
} catch (e) {
|
||||||
|
listgroupsfiltered.value = []
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
listcircuitsfiltered.value = myuser.value.profile.mycircuits
|
||||||
|
} catch (e) {
|
||||||
|
listcircuitsfiltered.value = []
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
caricato.value = true
|
||||||
|
|
||||||
|
optionsMainCards.value = tools.getoptionsMainCards(true)
|
||||||
|
} catch (e) {
|
||||||
|
console.error('ERR loadProfile', e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(() => username.value, (to: any, from: any) => {
|
||||||
|
loadProfile()
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(() => actualcard.value, (to: any, from: any) => {
|
||||||
|
loadProfile()
|
||||||
|
})
|
||||||
|
|
||||||
|
function mounted() {
|
||||||
|
loadProfile()
|
||||||
|
}
|
||||||
|
|
||||||
|
function getImgUser() {
|
||||||
|
if (myuser.value)
|
||||||
|
return userStore.getImgByProfile(myuser.value)
|
||||||
|
else
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkifShow(col: string) {
|
||||||
|
//++Todo: checkifShow Permessi !
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
function getLinkUserTelegram() {
|
||||||
|
|
||||||
|
if (myuser.value) {
|
||||||
|
if (!!myuser.value.profile.username_telegram) {
|
||||||
|
return 'https://t.me/' + myuser.value.profile.username_telegram
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getLinkWebSite() {
|
||||||
|
if (myuser.value) {
|
||||||
|
let site = myuser.value.profile.website!
|
||||||
|
if (site) {
|
||||||
|
if (!site.startsWith('http')) {
|
||||||
|
site = 'https://' + site
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return site
|
||||||
|
} else {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function isMyRecord(username: string) {
|
||||||
|
return username === userStore.my.username
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(mounted)
|
||||||
|
|
||||||
|
return {
|
||||||
|
username,
|
||||||
|
profile,
|
||||||
|
tools,
|
||||||
|
costanti,
|
||||||
|
myuser,
|
||||||
|
shared_consts,
|
||||||
|
getImgUser,
|
||||||
|
checkifShow,
|
||||||
|
getLinkUserTelegram,
|
||||||
|
getLinkWebSite,
|
||||||
|
filtroutente,
|
||||||
|
showPic,
|
||||||
|
myusername,
|
||||||
|
userStore,
|
||||||
|
t,
|
||||||
|
static_data,
|
||||||
|
animation,
|
||||||
|
isMyRecord,
|
||||||
|
getRefLink,
|
||||||
|
fieldsTable,
|
||||||
|
mycards,
|
||||||
|
actualcard,
|
||||||
|
caricato,
|
||||||
|
listgroupsfiltered,
|
||||||
|
idnotif,
|
||||||
|
showsendCoinTo,
|
||||||
|
site,
|
||||||
|
listcircuitsfiltered,
|
||||||
|
optionsMainCards,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
167
src/components/CMyActivities/CMyActivities.vue
Executable file
167
src/components/CMyActivities/CMyActivities.vue
Executable file
@@ -0,0 +1,167 @@
|
|||||||
|
<template>
|
||||||
|
<div
|
||||||
|
v-if="!caricato"
|
||||||
|
class="fit column no-wrap justify-evenly items-center content-start"
|
||||||
|
>
|
||||||
|
<q-skeleton type="QAvatar" size="140px" height="140px" animation="fade" />
|
||||||
|
<q-card flat bordered style="width: 250px">
|
||||||
|
<div class="text-h6">
|
||||||
|
<q-skeleton :animation="animation" />
|
||||||
|
</div>
|
||||||
|
<div class="col-12 text-h7 text-grey text-center">
|
||||||
|
{{ username }}
|
||||||
|
</div>
|
||||||
|
<div class="col-12 text-h7">
|
||||||
|
<q-skeleton :animation="animation" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12 text-h8 q-mt-sm">
|
||||||
|
<q-skeleton :animation="animation" />
|
||||||
|
</div>
|
||||||
|
<div class="col-12 text-h8 q-mt-sm">
|
||||||
|
<q-skeleton :animation="animation" />
|
||||||
|
</div>
|
||||||
|
</q-card>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<div v-if="myuser">
|
||||||
|
<div v-if="tools.isUserOk() || tools.isLogged()">
|
||||||
|
<CNotifAtTop />
|
||||||
|
</div>
|
||||||
|
<div class="q-gutter-sm q-pa-sm q-pb-md">
|
||||||
|
<div
|
||||||
|
v-if="myuser && myuser.date_reg"
|
||||||
|
class="fit column no-wrap justify-evenly items-center content-start"
|
||||||
|
>
|
||||||
|
<div class="">
|
||||||
|
<q-avatar size="140px">
|
||||||
|
<q-img
|
||||||
|
:src="myuser.profile ? getImgUser(myuser.profile) : ''"
|
||||||
|
:alt="username"
|
||||||
|
img-class="imgprofile"
|
||||||
|
height="140px"
|
||||||
|
@click="showPic = true"
|
||||||
|
/>
|
||||||
|
<q-badge
|
||||||
|
v-if="tools.isUserOnline(myuser)"
|
||||||
|
align="top"
|
||||||
|
floating
|
||||||
|
color="green"
|
||||||
|
>online</q-badge
|
||||||
|
>
|
||||||
|
</q-avatar>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="last_access">
|
||||||
|
OnLine: {{ tools.timeAgo(myuser.lasttimeonline) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="myuser.reported">
|
||||||
|
<CTitleBanner
|
||||||
|
title="⚠️ L'utente è stato Segnalato per comportamento non idoneo."
|
||||||
|
bgcolor="bg-red"
|
||||||
|
clcolor="text-white"
|
||||||
|
>
|
||||||
|
</CTitleBanner>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="site && site.confpages && site.confpages.showNameSurname">
|
||||||
|
<div class="text-h6">
|
||||||
|
<span v-if="checkifShow('name') && myuser.name">
|
||||||
|
{{ myuser.name }}</span
|
||||||
|
>
|
||||||
|
<span v-if="checkifShow('surname') && myuser.surname"
|
||||||
|
> {{ myuser.surname }}</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 text-h7 text-blue text-shadow-2">
|
||||||
|
{{ myuser.username }}
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<CTitleBanner
|
||||||
|
v-if="site.confpages.showCompetenze"
|
||||||
|
class=""
|
||||||
|
:title="$t('profile.skills')"
|
||||||
|
bgcolor="bg-primary"
|
||||||
|
clcolor="text-white"
|
||||||
|
myclass="myshad"
|
||||||
|
:canopen="true"
|
||||||
|
>
|
||||||
|
<div v-for="(card, ind) of mycards" :key="ind" :name="card.table">
|
||||||
|
<div v-if="card.table === 'mygroups'">
|
||||||
|
<q-list>
|
||||||
|
<span
|
||||||
|
v-for="(grp, index) in listgroupsfiltered"
|
||||||
|
:key="index"
|
||||||
|
class="q-my-sm q-mx-none"
|
||||||
|
clickable
|
||||||
|
>
|
||||||
|
<CMyGroup
|
||||||
|
:mygrp="grp"
|
||||||
|
:visu="costanti.USER_GROUPS"
|
||||||
|
:noaut="true"
|
||||||
|
>
|
||||||
|
</CMyGroup>
|
||||||
|
</span>
|
||||||
|
</q-list>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="card.table === 'circuits'">
|
||||||
|
<div class="text-h6">{{ card.title }}</div>
|
||||||
|
<q-list>
|
||||||
|
<span
|
||||||
|
v-for="(circuit, index) in listcircuitsfiltered"
|
||||||
|
:key="index"
|
||||||
|
class="q-my-sm q-mx-none"
|
||||||
|
clickable
|
||||||
|
>
|
||||||
|
<CMyCircuit
|
||||||
|
:mycircuit="circuit"
|
||||||
|
:visu="costanti.USER_CIRCUITS"
|
||||||
|
:noaut="true"
|
||||||
|
>
|
||||||
|
</CMyCircuit>
|
||||||
|
</span>
|
||||||
|
</q-list>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<CSkill
|
||||||
|
:table="card.table"
|
||||||
|
:filtercustom="filtroutente"
|
||||||
|
:butt_modif_new="isMyRecord(myuser.username)"
|
||||||
|
:visuinpage="true"
|
||||||
|
:noaut="true"
|
||||||
|
:title="card.title"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</CTitleBanner>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="!tools.isLogged()">
|
||||||
|
<CCheckIfIsLogged></CCheckIfIsLogged>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<q-dialog v-model="showPic" full-height full-width>
|
||||||
|
<img :src="getImgUser()" :alt="username" class="full-width" />
|
||||||
|
</q-dialog>
|
||||||
|
|
||||||
|
<div v-if="showsendCoinTo">
|
||||||
|
<CSendCoins
|
||||||
|
:showprop="showsendCoinTo"
|
||||||
|
:to_user="myuser"
|
||||||
|
@close="showsendCoinTo = false"
|
||||||
|
>
|
||||||
|
</CSendCoins>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" src="./CMyActivities.ts">
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import './CMyActivities.scss';
|
||||||
|
</style>
|
||||||
1
src/components/CMyActivities/index.ts
Executable file
1
src/components/CMyActivities/index.ts
Executable file
@@ -0,0 +1 @@
|
|||||||
|
export {default as CMyActivities} from './CMyActivities.vue'
|
||||||
@@ -12,6 +12,7 @@ import { CTitle } from '@/components/CTitle/index'
|
|||||||
import { tools } from '@store/Modules/tools'
|
import { tools } from '@store/Modules/tools'
|
||||||
import { shared_consts } from '@/common/shared_vuejs'
|
import { shared_consts } from '@/common/shared_vuejs'
|
||||||
import { LandingFooter } from '@/components/LandingFooter'
|
import { LandingFooter } from '@/components/LandingFooter'
|
||||||
|
import { CMyActivities } from '@/components/CMyActivities'
|
||||||
import { COpenStreetMap } from '@src/components/COpenStreetMap'
|
import { COpenStreetMap } from '@src/components/COpenStreetMap'
|
||||||
import { CCardCarousel } from '@src/components/CCardCarousel'
|
import { CCardCarousel } from '@src/components/CCardCarousel'
|
||||||
import { CMyPage } from '@src/components/CMyPage'
|
import { CMyPage } from '@src/components/CMyPage'
|
||||||
@@ -46,7 +47,7 @@ export default defineComponent({
|
|||||||
CCardCarousel, COpenStreetMap, CMyPage, CMyPageIntro, CMyEditor, CMyFieldRec,
|
CCardCarousel, COpenStreetMap, CMyPage, CMyPageIntro, CMyEditor, CMyFieldRec,
|
||||||
CSelectColor, CSelectFontSize, CImgPoster,
|
CSelectColor, CSelectFontSize, CImgPoster,
|
||||||
CCheckIfIsLogged, CStatusReg, CDashboard, CMainView, CNotifAtTop,
|
CCheckIfIsLogged, CStatusReg, CDashboard, CMainView, CNotifAtTop,
|
||||||
CPresentazione,
|
CPresentazione, CMyActivities,
|
||||||
CTitleBanner, CShareSocial, CCheckAppRunning, CRegistration,
|
CTitleBanner, CShareSocial, CCheckAppRunning, CRegistration,
|
||||||
},
|
},
|
||||||
emits: ['selElemClick'],
|
emits: ['selElemClick'],
|
||||||
|
|||||||
@@ -521,6 +521,10 @@
|
|||||||
<div v-if="editOn" class="elemEdit">Pagina di Presentazione</div>
|
<div v-if="editOn" class="elemEdit">Pagina di Presentazione</div>
|
||||||
<CPresentazione></CPresentazione>
|
<CPresentazione></CPresentazione>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="myel.type === shared_consts.ELEMTYPE.MYACTIVITIES">
|
||||||
|
<div v-if="editOn" class="elemEdit">Pagina Attività</div>
|
||||||
|
<CMyActivities></CMyActivities>
|
||||||
|
</div>
|
||||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.NOTIFATTOP">
|
<div v-else-if="myel.type === shared_consts.ELEMTYPE.NOTIFATTOP">
|
||||||
<div v-if="editOn" class="elemEdit">Notifiche in Cima</div>
|
<div v-if="editOn" class="elemEdit">Notifiche in Cima</div>
|
||||||
<CNotifAtTop></CNotifAtTop>
|
<CNotifAtTop></CNotifAtTop>
|
||||||
|
|||||||
@@ -19,6 +19,11 @@ export default defineComponent({
|
|||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
defaultnewrec: {
|
defaultnewrec: {
|
||||||
type: Function,
|
type: Function,
|
||||||
required: false,
|
required: false,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<CGridTableRec
|
<CGridTableRec
|
||||||
v-if="filtercustom.length > 0 && col && col.length > 0"
|
v-if="filtercustom.length > 0 && col && col.length > 0"
|
||||||
:prop_mytable="table"
|
:prop_mytable="table"
|
||||||
prop_mytitle=""
|
:prop_mytitle="title"
|
||||||
:prop_mycolumns="col"
|
:prop_mycolumns="col"
|
||||||
:prop_colkey="prop_colkey"
|
:prop_colkey="prop_colkey"
|
||||||
:col_title="col_title"
|
:col_title="col_title"
|
||||||
@@ -20,7 +20,8 @@
|
|||||||
:filtercustom="filtercustom"
|
:filtercustom="filtercustom"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
:extraparams="extraparams"
|
:extraparams="extraparams"
|
||||||
:noaut="noaut">
|
:noaut="noaut"
|
||||||
|
:hidetitleIfEmpty="true">
|
||||||
|
|
||||||
</CGridTableRec>
|
</CGridTableRec>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -180,7 +180,7 @@
|
|||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
icon="menu"
|
icon="fas fa-user"
|
||||||
@click="rightDrawerOpen = !rightDrawerOpen"
|
@click="rightDrawerOpen = !rightDrawerOpen"
|
||||||
>
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|||||||
@@ -441,17 +441,7 @@ function getRoutesAd(site: ISites) {
|
|||||||
inmenu: false,
|
inmenu: false,
|
||||||
infooter: false,
|
infooter: false,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
active: true,
|
|
||||||
order: 141,
|
|
||||||
path: '/attivita/:username',
|
|
||||||
materialIcon: 'fas fa-user',
|
|
||||||
name: 'otherpages.myactivities2',
|
|
||||||
component: () => import('@/views/user/myactivities/myactivities.vue'),
|
|
||||||
meta: { requiresAuth: true },
|
|
||||||
inmenu: false,
|
|
||||||
infooter: false,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
active: true,
|
active: true,
|
||||||
order: 200,
|
order: 200,
|
||||||
|
|||||||
@@ -1,206 +1,27 @@
|
|||||||
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
import { CMyActivities } from '@/components/CMyActivities'
|
||||||
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
|
||||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
|
||||||
import { CProfile } from '@/components/CProfile'
|
|
||||||
import { CLabel } from '@/components/CLabel'
|
|
||||||
import { CCopyBtn } from '@/components/CCopyBtn'
|
|
||||||
import { CSkill } from '@/components/CSkill'
|
|
||||||
import { CDateTime } from '@/components/CDateTime'
|
|
||||||
import { CMyGroup } from '@/components/CMyGroup'
|
|
||||||
import { CMyCircuit } from '@/components/CMyCircuit'
|
|
||||||
import { CNotifAtTop } from '@src/components/CNotifAtTop'
|
|
||||||
import { CSendCoins } from '@/components/CSendCoins'
|
|
||||||
import { CMyUser } from '@/components/CMyUser'
|
|
||||||
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
|
||||||
import { tools } from '@store/Modules/tools'
|
import { tools } from '@store/Modules/tools'
|
||||||
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
|
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
|
||||||
import { useUserStore } from '@store/UserStore'
|
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
|
||||||
import { useGlobalStore } from '@store/globalStore'
|
|
||||||
import { useI18n } from '@/boot/i18n'
|
|
||||||
import { toolsext } from '@store/Modules/toolsext'
|
|
||||||
import { useQuasar } from 'quasar'
|
|
||||||
import { costanti } from '@costanti'
|
|
||||||
import { ICircuit, IMyCircuit, IMyGroup, IUserFields } from 'model'
|
|
||||||
import { shared_consts } from '@/common/shared_vuejs'
|
|
||||||
import { static_data } from '@/db/static_data'
|
|
||||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
|
||||||
import { useNotifStore } from '@store/NotifStore'
|
|
||||||
import MixinUsers from '@/mixins/mixin-users'
|
|
||||||
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'myactivities',
|
name: 'myactivities',
|
||||||
components: {
|
components: {
|
||||||
CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime, CCopyBtn, CUserNonVerif, CMyFieldRec, CMyUser,
|
CMyActivities
|
||||||
CMyGroup, CLabel, CMyCircuit, CSendCoins, CNotifAtTop
|
|
||||||
},
|
},
|
||||||
props: {},
|
props: {},
|
||||||
setup() {
|
setup() {
|
||||||
const userStore = useUserStore()
|
|
||||||
const globalStore = useGlobalStore()
|
|
||||||
const $route = useRoute()
|
|
||||||
const $q = useQuasar()
|
|
||||||
const { t } = useI18n()
|
|
||||||
|
|
||||||
const site = ref(globalStore.site)
|
// const username = computed(() => $route.params.username ? $route.params.username.toString() : userStore.my.username)
|
||||||
|
// const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '')
|
||||||
const { getRefLink } = MixinUsers()
|
|
||||||
|
|
||||||
const animation = ref('fade')
|
|
||||||
|
|
||||||
const username = computed(() => $route.params.username ? $route.params.username.toString() : userStore.my.username)
|
|
||||||
const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '')
|
|
||||||
|
|
||||||
const filtroutente = ref(<any[]>[])
|
|
||||||
const showPic = ref(false)
|
|
||||||
const caricato = ref(false)
|
|
||||||
const showsendCoinTo = ref(false)
|
|
||||||
|
|
||||||
const myuser = ref(<IUserFields | null>null)
|
|
||||||
|
|
||||||
const actualcard = ref('mygoods')
|
|
||||||
|
|
||||||
const notifStore = useNotifStore()
|
|
||||||
|
|
||||||
const mycards = computed(() => {
|
|
||||||
return costanti.MAINCARDS.filter((rec: any) => rec.table)
|
|
||||||
})
|
|
||||||
const optionsMainCards = ref({})
|
|
||||||
|
|
||||||
const listgroupsfiltered = ref(<IMyGroup[]>[])
|
|
||||||
const listcircuitsfiltered = ref(<IMyCircuit[]>[])
|
|
||||||
|
|
||||||
|
|
||||||
function profile() {
|
|
||||||
return userStore.my.profile
|
|
||||||
}
|
|
||||||
|
|
||||||
function myusername() {
|
|
||||||
return userStore.my.username
|
|
||||||
}
|
|
||||||
|
|
||||||
async function loadProfile() {
|
|
||||||
console.log('loadProfile...', username.value)
|
|
||||||
try {
|
|
||||||
// Carica il profilo di quest'utente
|
|
||||||
if (username.value) {
|
|
||||||
await userStore.loadUserProfile({ username: username.value, idnotif: idnotif.value }).then((ris) => {
|
|
||||||
console.log('loadUserProfile = ', ris)
|
|
||||||
myuser.value = ris
|
|
||||||
if (myuser.value) {
|
|
||||||
filtroutente.value = [{ userId: myuser.value._id }]
|
|
||||||
notifStore.setAsRead(idnotif.value)
|
|
||||||
|
|
||||||
try {
|
|
||||||
listgroupsfiltered.value = globalStore.mygroups.filter((grp: IMyGroup) => myuser.value!.profile.mygroups.findIndex((rec: IMyGroup) => rec.groupname === grp.groupname) >= 0)
|
|
||||||
} catch (e) {
|
|
||||||
listgroupsfiltered.value = []
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
listcircuitsfiltered.value = myuser.value.profile.mycircuits
|
|
||||||
} catch (e) {
|
|
||||||
listcircuitsfiltered.value = []
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
caricato.value = true
|
|
||||||
|
|
||||||
optionsMainCards.value = tools.getoptionsMainCards(true)
|
|
||||||
}catch (e) {
|
|
||||||
console.error('ERR loadProfile', e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
watch(() => username.value, (to: any, from: any) => {
|
|
||||||
loadProfile()
|
|
||||||
})
|
|
||||||
|
|
||||||
watch(() => actualcard.value, (to: any, from: any) => {
|
|
||||||
loadProfile()
|
|
||||||
})
|
|
||||||
|
|
||||||
function mounted() {
|
function mounted() {
|
||||||
loadProfile()
|
//
|
||||||
}
|
|
||||||
|
|
||||||
function getImgUser() {
|
|
||||||
if (myuser.value)
|
|
||||||
return userStore.getImgByProfile(myuser.value)
|
|
||||||
else
|
|
||||||
return ''
|
|
||||||
}
|
|
||||||
|
|
||||||
function checkifShow(col: string) {
|
|
||||||
//++Todo: checkifShow Permessi !
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
function getLinkUserTelegram() {
|
|
||||||
|
|
||||||
if (myuser.value) {
|
|
||||||
if (!!myuser.value.profile.username_telegram) {
|
|
||||||
return 'https://t.me/' + myuser.value.profile.username_telegram
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function getLinkWebSite() {
|
|
||||||
if (myuser.value) {
|
|
||||||
let site = myuser.value.profile.website!
|
|
||||||
if (site) {
|
|
||||||
if (!site.startsWith('http')) {
|
|
||||||
site = 'https://' + site
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return site
|
|
||||||
} else {
|
|
||||||
return ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function isMyRecord(username: string) {
|
|
||||||
return username === userStore.my.username
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(mounted)
|
onMounted(mounted)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
username,
|
|
||||||
profile,
|
|
||||||
tools,
|
tools,
|
||||||
costanti,
|
|
||||||
myuser,
|
|
||||||
shared_consts,
|
|
||||||
getImgUser,
|
|
||||||
checkifShow,
|
|
||||||
getLinkUserTelegram,
|
|
||||||
getLinkWebSite,
|
|
||||||
filtroutente,
|
|
||||||
showPic,
|
|
||||||
myusername,
|
|
||||||
userStore,
|
|
||||||
t,
|
|
||||||
static_data,
|
|
||||||
animation,
|
|
||||||
isMyRecord,
|
|
||||||
getRefLink,
|
|
||||||
fieldsTable,
|
|
||||||
mycards,
|
|
||||||
actualcard,
|
|
||||||
caricato,
|
|
||||||
listgroupsfiltered,
|
|
||||||
idnotif,
|
|
||||||
showsendCoinTo,
|
|
||||||
site,
|
|
||||||
listcircuitsfiltered,
|
|
||||||
optionsMainCards,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,162 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<CMyActivities />
|
||||||
v-if="!caricato"
|
|
||||||
class="fit column no-wrap justify-evenly items-center content-start"
|
|
||||||
>
|
|
||||||
<q-skeleton type="QAvatar" size="140px" height="140px" animation="fade" />
|
|
||||||
<q-card flat bordered style="width: 250px">
|
|
||||||
<div class="text-h6">
|
|
||||||
<q-skeleton :animation="animation" />
|
|
||||||
</div>
|
|
||||||
<div class="col-12 text-h7 text-grey text-center">
|
|
||||||
{{ username }}
|
|
||||||
</div>
|
|
||||||
<div class="col-12 text-h7">
|
|
||||||
<q-skeleton :animation="animation" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-12 text-h8 q-mt-sm">
|
|
||||||
<q-skeleton :animation="animation" />
|
|
||||||
</div>
|
|
||||||
<div class="col-12 text-h8 q-mt-sm">
|
|
||||||
<q-skeleton :animation="animation" />
|
|
||||||
</div>
|
|
||||||
</q-card>
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
<div v-if="myuser">
|
|
||||||
<div v-if="tools.isUserOk() || tools.isLogged()">
|
|
||||||
<CNotifAtTop />
|
|
||||||
</div>
|
|
||||||
<div class="q-gutter-sm q-pa-sm q-pb-md">
|
|
||||||
<div
|
|
||||||
v-if="myuser && myuser.date_reg"
|
|
||||||
class="fit column no-wrap justify-evenly items-center content-start"
|
|
||||||
>
|
|
||||||
<div class="">
|
|
||||||
<q-avatar size="140px">
|
|
||||||
<q-img
|
|
||||||
:src="myuser.profile ? getImgUser(myuser.profile) : ''"
|
|
||||||
:alt="username"
|
|
||||||
img-class="imgprofile"
|
|
||||||
height="140px"
|
|
||||||
@click="showPic = true"
|
|
||||||
/>
|
|
||||||
<q-badge
|
|
||||||
v-if="tools.isUserOnline(myuser)"
|
|
||||||
align="top"
|
|
||||||
floating
|
|
||||||
color="green"
|
|
||||||
>online</q-badge
|
|
||||||
>
|
|
||||||
</q-avatar>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="last_access">
|
|
||||||
OnLine: {{ tools.timeAgo(myuser.lasttimeonline) }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-if="myuser.reported">
|
|
||||||
<CTitleBanner
|
|
||||||
title="⚠️ L'utente è stato Segnalato per comportamento non idoneo."
|
|
||||||
bgcolor="bg-red"
|
|
||||||
clcolor="text-white"
|
|
||||||
>
|
|
||||||
</CTitleBanner>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-if="site && site.confpages && site.confpages.showNameSurname">
|
|
||||||
<div class="text-h6">
|
|
||||||
<span v-if="checkifShow('name') && myuser.name">
|
|
||||||
{{ myuser.name }}</span
|
|
||||||
>
|
|
||||||
<span v-if="checkifShow('surname') && myuser.surname"
|
|
||||||
> {{ myuser.surname }}</span
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 text-h7 text-blue text-shadow-2">
|
|
||||||
{{ myuser.username }}
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<CTitleBanner
|
|
||||||
v-if="site.confpages.showCompetenze"
|
|
||||||
class=""
|
|
||||||
:title="$t('profile.skills')"
|
|
||||||
bgcolor="bg-primary"
|
|
||||||
clcolor="text-white"
|
|
||||||
myclass="myshad"
|
|
||||||
:canopen="true"
|
|
||||||
>
|
|
||||||
<div v-for="(card, ind) of mycards" :key="ind" :name="card.table">
|
|
||||||
<div class="text-h6">{{ card.title }}</div>
|
|
||||||
<div v-if="card.table === 'mygroups'">
|
|
||||||
<q-list>
|
|
||||||
<span
|
|
||||||
v-for="(grp, index) in listgroupsfiltered"
|
|
||||||
:key="index"
|
|
||||||
class="q-my-sm q-mx-none"
|
|
||||||
clickable
|
|
||||||
>
|
|
||||||
<CMyGroup
|
|
||||||
:mygrp="grp"
|
|
||||||
:visu="costanti.USER_GROUPS"
|
|
||||||
:noaut="true"
|
|
||||||
>
|
|
||||||
</CMyGroup>
|
|
||||||
</span>
|
|
||||||
</q-list>
|
|
||||||
</div>
|
|
||||||
<div v-else-if="card.table === 'circuits'">
|
|
||||||
<q-list>
|
|
||||||
<span
|
|
||||||
v-for="(circuit, index) in listcircuitsfiltered"
|
|
||||||
:key="index"
|
|
||||||
class="q-my-sm q-mx-none"
|
|
||||||
clickable
|
|
||||||
>
|
|
||||||
<CMyCircuit
|
|
||||||
:mycircuit="circuit"
|
|
||||||
:visu="costanti.USER_CIRCUITS"
|
|
||||||
:noaut="true"
|
|
||||||
>
|
|
||||||
</CMyCircuit>
|
|
||||||
</span>
|
|
||||||
</q-list>
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
<CSkill
|
|
||||||
:table="card.table"
|
|
||||||
:filtercustom="filtroutente"
|
|
||||||
:butt_modif_new="isMyRecord(myuser.username)"
|
|
||||||
:visuinpage="true"
|
|
||||||
:noaut="true"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</CTitleBanner>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-if="!tools.isLogged()">
|
|
||||||
<CCheckIfIsLogged></CCheckIfIsLogged>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<q-dialog v-model="showPic" full-height full-width>
|
|
||||||
<img :src="getImgUser()" :alt="username" class="full-width" />
|
|
||||||
</q-dialog>
|
|
||||||
|
|
||||||
<div v-if="showsendCoinTo">
|
|
||||||
<CSendCoins
|
|
||||||
:showprop="showsendCoinTo"
|
|
||||||
:to_user="myuser"
|
|
||||||
@close="showsendCoinTo = false"
|
|
||||||
>
|
|
||||||
</CSendCoins>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" src="./myactivities.ts">
|
<script lang="ts" src="./myactivities.ts">
|
||||||
|
|||||||
Reference in New Issue
Block a user