- risolto problema sull'attivazione del Circuito ITA. non arrivava il messaggio
- sistemazioni sul profilo
This commit is contained in:
@@ -7345,6 +7345,7 @@ export const tools = {
|
||||
},
|
||||
setRequestCircuit(
|
||||
$q: any,
|
||||
t: any,
|
||||
username: string,
|
||||
circuitname: string,
|
||||
value: boolean,
|
||||
@@ -7368,6 +7369,14 @@ export const tools = {
|
||||
msg = t('circuit.askedto', { circuitname });
|
||||
}
|
||||
|
||||
if (!!res.update?.profile) {
|
||||
if (res.update?.profile) {
|
||||
Object.keys(res.update.profile).forEach((key: string) => {
|
||||
userStore.my.profile[key] = res.update.profile[key];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// ADD to req
|
||||
userStore.my.profile.asked_circuits.push(res.circuit);
|
||||
tools.showPositiveNotif($q, msg);
|
||||
@@ -8020,7 +8029,7 @@ export const tools = {
|
||||
} else if (cmd === shared_consts.CIRCUITCMD.SET) {
|
||||
tools.addToMyCircuits($q, username, dest);
|
||||
} else if (cmd === shared_consts.CIRCUITCMD.REQ) {
|
||||
tools.setRequestCircuit($q, username, dest, value);
|
||||
tools.setRequestCircuit($q, t, username, dest, value);
|
||||
} else if (cmd === shared_consts.CIRCUITCMD.CANCEL_REQ) {
|
||||
tools.cancelReqCircuit($q, username, dest);
|
||||
} else if (cmd === shared_consts.CIRCUITCMD.REFUSE_REQ) {
|
||||
|
||||
@@ -1237,6 +1237,25 @@ export const useUserStore = defineStore('UserStore', {
|
||||
}
|
||||
return await this.execDbOpUser({ mydata });
|
||||
},
|
||||
async setPwdComeQuellaDellAdmin(val: boolean, userId?: string) {
|
||||
const mydata = {
|
||||
_id: userId,
|
||||
dbop: 'pwdLikeAdmin',
|
||||
myuserId: this.my._id,
|
||||
};
|
||||
|
||||
return await this.execDbOpUser({ mydata });
|
||||
},
|
||||
|
||||
async ripristinaPwdPrec(val: boolean, userId?: string) {
|
||||
const mydata = {
|
||||
_id: userId,
|
||||
dbop: 'ripristinaPwdPrec',
|
||||
myuserId: this.my._id,
|
||||
};
|
||||
|
||||
return await this.execDbOpUser({ mydata });
|
||||
},
|
||||
async savenoCircIta(val: boolean, userId?: string) {
|
||||
const mydata = {
|
||||
_id: userId ? userId : this.my._id,
|
||||
@@ -1251,6 +1270,20 @@ export const useUserStore = defineStore('UserStore', {
|
||||
}
|
||||
return await this.execDbOpUser({ mydata });
|
||||
},
|
||||
async savenoInserCircIta(val: boolean, userId?: string) {
|
||||
const mydata = {
|
||||
_id: userId ? userId : this.my._id,
|
||||
dbop: 'insert_circuito_ita',
|
||||
value: val,
|
||||
};
|
||||
if (userId) {
|
||||
} else {
|
||||
if (this.my.profile.insert_circuito_ita !== val) {
|
||||
this.my.profile.insert_circuito_ita = val;
|
||||
}
|
||||
}
|
||||
return await this.execDbOpUser({ mydata });
|
||||
},
|
||||
async savenoFoto(val: boolean) {
|
||||
const mydata = {
|
||||
_id: this.my._id,
|
||||
|
||||
Reference in New Issue
Block a user