fix Saldo when press refuse coins.
fix Risolvere problema del ritardo quando si fa il primo login...
This commit is contained in:
@@ -7,9 +7,15 @@
|
||||
|
||||
Occorre prima registrarsi alla App </h3>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-else-if="tools.isLogged()">
|
||||
<h3>Circuito non Esistente</h3>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="!tools.isLogged()">
|
||||
<CCheckIfIsLogged></CCheckIfIsLogged>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
|
||||
|
||||
@@ -78,31 +78,37 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
async function loadProfile() {
|
||||
// Carica il profilo di quest'utente
|
||||
if (username.value) {
|
||||
await userStore.loadUserProfile({ username: username.value, idnotif: idnotif.value }).then((ris) => {
|
||||
myuser.value = ris
|
||||
if (myuser.value) {
|
||||
filtroutente.value = [{ userId: myuser.value._id }]
|
||||
notifStore.setAsRead(idnotif.value)
|
||||
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 = []
|
||||
}
|
||||
|
||||
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
|
||||
}catch (e) {
|
||||
console.error('ERR loadProfile', e)
|
||||
}
|
||||
caricato.value = true
|
||||
}
|
||||
|
||||
watch(() => username.value, (to: any, from: any) => {
|
||||
|
||||
@@ -326,6 +326,7 @@
|
||||
</div>
|
||||
<div v-else-if="caricato">
|
||||
<h2>Utente {{ username }} non trovato</h2>
|
||||
({{filtroutente}})
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
|
||||
Reference in New Issue
Block a user