- aggiornata la grafica della Home di RISO

- Profilo Completition
- Email Verificata
- Invita un Amico (invio di email)
This commit is contained in:
Surya Paolo
2025-11-15 19:38:39 +01:00
parent d812c6c799
commit b8df3ea721
110 changed files with 10856 additions and 2765 deletions

View File

@@ -13,7 +13,6 @@ import type {
IAccount,
IColGridTable,
ISignupIscrizioneConacreisOptions,
ISignupIscrizioneArcadeiOptions,
IMovQuery,
} from '@src/model';
import { IFriends, ISettings } from '@src/model';
@@ -825,7 +824,7 @@ export const useUserStore = defineStore('UserStore', {
}
}
return false
return false;
// return this.my.verified_email! && this.isTelegIdOk() && this.my.verified_by_aportador!
},
@@ -1063,8 +1062,6 @@ export const useUserStore = defineStore('UserStore', {
});
},
async addNewSite(paramquery: any) {
console.log(paramquery);
@@ -1214,27 +1211,45 @@ export const useUserStore = defineStore('UserStore', {
return await this.execDbOpUser({ mydata });
}
},
async savenoCircuit(val: boolean) {
async setSkipTelegramVerif(val: boolean) {
const mydata = {
_id: this.my._id,
dbop: 'noCircuit',
dbop: 'telegram_verification_skipped',
value: val,
};
if (this.my.profile.noCircuit !== val) {
this.my.profile.noCircuit = val;
if (this.my.profile.telegram_verification_skipped !== val) {
this.my.profile.telegram_verification_skipped = val;
return await this.execDbOpUser({ mydata });
}
},
async savenoCircIta(val: boolean) {
async savenoCircuit(val: boolean, userId?: string) {
const mydata = {
_id: this.my._id,
_id: userId ? userId : this.my._id,
dbop: 'noCircuit',
value: val,
};
if (userId) {
} else {
if (this.my.profile.noCircuit !== val) {
this.my.profile.noCircuit = val;
}
}
return await this.execDbOpUser({ mydata });
},
async savenoCircIta(val: boolean, userId?: string) {
const mydata = {
_id: userId ? userId : this.my._id,
dbop: 'noCircIta',
value: val,
};
if (this.my.profile.noCircIta !== val) {
this.my.profile.noCircIta = val;
return await this.execDbOpUser({ mydata });
if (userId) {
} else {
if (this.my.profile.noCircIta !== val) {
this.my.profile.noCircIta = val;
}
}
return await this.execDbOpUser({ mydata });
},
async savenoFoto(val: boolean) {
const mydata = {
@@ -1356,7 +1371,12 @@ export const useUserStore = defineStore('UserStore', {
this.my.perm,
shared_consts.Permissions.Grafico.value
);
this.isCollaboratore = this.isGrafico || this.isCommerciale || this.isEditor || this.isAdmin || this.isManager
this.isCollaboratore =
this.isGrafico ||
this.isCommerciale ||
this.isEditor ||
this.isAdmin ||
this.isManager;
this.my.tokens = [];
this.resetArrToken(this.my.tokens);
@@ -1521,7 +1541,9 @@ export const useUserStore = defineStore('UserStore', {
data_login: tools.getDateNow(),
};
const index = this.my.tokens.findIndex((token) => token.access === 'auth' && token.token === x_auth_token);
const index = this.my.tokens.findIndex(
(token) => token.access === 'auth' && token.token === x_auth_token
);
if (index === -1) {
this.my.tokens.push(newToken);
} else {
@@ -1579,28 +1601,6 @@ export const useUserStore = defineStore('UserStore', {
});
},
async iscrivitiArcadei(authData: ISignupIscrizioneArcadeiOptions) {
console.log('iscrivitiArcadei');
this.setServerCode(tools.CALLING);
authData.userId = this.my._id;
return Api.SendReq('/iscritti_arcadei', 'POST', authData)
.then((res) => {
if (res.status === 200) {
return { code: serv_constants.RIS_ISCRIZIONE_OK, msg: '' };
} else {
return { code: toolsext.ERR_GENERICO, msg: '' };
}
})
.catch((error) => {
console.log('Err', error);
this.setErrorCatch(error);
return { code: this.getServerCode, msg: this.getMsg };
});
},
async signin(router: Router, authData: ISigninOptions) {
// console.log('LOGIN signin')
const globalStore = useGlobalStore();
@@ -1718,7 +1718,6 @@ export const useUserStore = defineStore('UserStore', {
});
},
async setGlobal(router: Router, isLogged: boolean) {
const globalStore = useGlobalStore();
@@ -2550,5 +2549,18 @@ export const useUserStore = defineStore('UserStore', {
}
return this.lista_referenti;
},
async refreshUserData(response: any) {
if (response) {
this.my.profile.username_telegram = response?.username_telegram;
this.my.profile.teleg_id = response?.teleg_id;
}
},
async resendEmailVerifyRegistration() {
return Api.SendReq('/sendmailreg', 'POST', {}).then((ris: any) => {
return ris.data;
});
},
},
});