fix Saldo when press refuse coins.

fix Risolvere problema del ritardo quando si fa il primo login...
This commit is contained in:
Paolo Arena
2022-09-16 17:39:28 +02:00
parent a194acfc69
commit 78a79e1ad5
53 changed files with 3779 additions and 3498 deletions

View File

@@ -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) => {