- fix zona provinciale
- email abilitazione circuito: invio email ad admin - admin che abilita la fiducia cliccando sul bottone
This commit is contained in:
@@ -6409,12 +6409,6 @@ export const colTableCircuitComplete = [
|
||||
fieldtype: costanti.FieldType.boolean,
|
||||
onlyforAdmin: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'sendEmailAfterAskingToEnter',
|
||||
label_trans: 'circuit.sendEmailAfterAskingToEnter',
|
||||
fieldtype: costanti.FieldType.boolean,
|
||||
onlyforAdmin: true,
|
||||
}),
|
||||
AddCol(ModifRec),
|
||||
AddCol(DeleteRec),
|
||||
AddCol(DuplicateRec),
|
||||
|
||||
@@ -4226,9 +4226,13 @@ export const tools = {
|
||||
//T_TOLTO
|
||||
|
||||
if (short) {
|
||||
return t('ws.siteshortname');
|
||||
return translate('ws.siteshortname');
|
||||
}
|
||||
return t('ws.sitename');
|
||||
return translate('ws.sitename');
|
||||
},
|
||||
|
||||
sitename() {
|
||||
return this.getappname()
|
||||
},
|
||||
|
||||
getproc() {
|
||||
@@ -9205,13 +9209,13 @@ export const tools = {
|
||||
if (field) {
|
||||
const mycol = fieldsTable.getColByTable(tablesel, field);
|
||||
if (mycol) {
|
||||
console.log(
|
||||
/*console.log(
|
||||
'remote_table = ',
|
||||
mycol.remote_table,
|
||||
'remote_key',
|
||||
mycol.remote_key
|
||||
);
|
||||
console.log('ROW', row);
|
||||
console.log('ROW', row);*/
|
||||
return tools.getValueByRemoteField(mycol, row);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import type {
|
||||
import { IFriends, ISettings } from '@src/model';
|
||||
import { tools } from '@tools';
|
||||
import translate from '@src/globalroutines/util';
|
||||
import type { IAmmetti, ILinkReg, IToken } from '@model/other';
|
||||
import type { IAbilitaCirc, IAmmetti, ILinkReg, IToken } from '@model/other';
|
||||
import { ICallResult, IResult } from '@model/other';
|
||||
|
||||
import objectId from '@src/js/objectId';
|
||||
@@ -1157,6 +1157,35 @@ export const useUserStore = defineStore('UserStore', {
|
||||
});
|
||||
},
|
||||
|
||||
async abilita(paramquery: IAbilitaCirc) {
|
||||
const usertosend = {
|
||||
cmd: paramquery.cmd,
|
||||
token: paramquery.token,
|
||||
username: paramquery.username,
|
||||
username_action: this.my.username,
|
||||
groupname: paramquery.groupname,
|
||||
};
|
||||
console.log(usertosend);
|
||||
|
||||
this.setServerCode(tools.CALLING);
|
||||
|
||||
return Api.SendReq('/abcirc', 'POST', usertosend)
|
||||
.then((res) => {
|
||||
// console.log("RITORNO 2 ");
|
||||
// mutations.setServerCode(myres);
|
||||
if (res.data.code === serv_constants.RIS_CODE_AMMESSO) {
|
||||
console.log('ABILITATO !!');
|
||||
} else {
|
||||
console.log('Risultato di abilita: ', res.data.code);
|
||||
}
|
||||
return { code: res.data.code, msg: res.data.msg, circuitName: res.data.circuitName };
|
||||
})
|
||||
.catch((error) => {
|
||||
this.setErrorCatch(error);
|
||||
return { code: this.getServerCode, msg: error.getMsgError() };
|
||||
});
|
||||
},
|
||||
|
||||
async unsubscribe(paramquery: any) {
|
||||
return Api.SendReq('/news/unsubscribe', 'POST', paramquery)
|
||||
.then((res) => {
|
||||
@@ -1508,7 +1537,10 @@ export const useUserStore = defineStore('UserStore', {
|
||||
);
|
||||
else tools.localStSetItem(toolsext.localStorage.img, '');
|
||||
localStorage.setItem(toolsext.localStorage.token, this.x_auth_token);
|
||||
localStorage.setItem(toolsext.localStorage.browser_random, this.getBrowserRandom());
|
||||
localStorage.setItem(
|
||||
toolsext.localStorage.browser_random,
|
||||
this.getBrowserRandom()
|
||||
);
|
||||
// console.log('updateLocalStorage: salva refreshtoken', this.refreshToken)
|
||||
localStorage.setItem(toolsext.localStorage.refreshToken, this.refreshToken);
|
||||
localStorage.setItem(
|
||||
@@ -1591,7 +1623,10 @@ export const useUserStore = defineStore('UserStore', {
|
||||
tools.localStSetItem(toolsext.localStorage.name, newuser.name);
|
||||
tools.localStSetItem(toolsext.localStorage.surname, newuser.surname);
|
||||
localStorage.setItem(toolsext.localStorage.token, this.x_auth_token);
|
||||
localStorage.setItem(toolsext.localStorage.browser_random, this.getBrowserRandom());
|
||||
localStorage.setItem(
|
||||
toolsext.localStorage.browser_random,
|
||||
this.getBrowserRandom()
|
||||
);
|
||||
localStorage.setItem(
|
||||
toolsext.localStorage.refreshToken,
|
||||
this.refreshToken
|
||||
@@ -1810,7 +1845,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
tools.checkApp();
|
||||
|
||||
this.clearAuthData()
|
||||
this.clearAuthData();
|
||||
|
||||
return await Api.SendReq('/users/me/token', 'DELETE', null)
|
||||
.then((res) => {
|
||||
@@ -2683,9 +2718,26 @@ export const useUserStore = defineStore('UserStore', {
|
||||
this.browser_random = localStorage.getItem(toolsext.localStorage.browser_random);
|
||||
}
|
||||
if (!this.browser_random) {
|
||||
this.browser_random = tools.getTokenRandom()
|
||||
this.browser_random = tools.getTokenRandom();
|
||||
}
|
||||
return this.browser_random;
|
||||
}
|
||||
},
|
||||
saveZona($q: any, t: any, id: any, valzona: any) {
|
||||
const globalStore = useGlobalStore();
|
||||
|
||||
const mydatatosave = {
|
||||
id,
|
||||
table: 'users',
|
||||
fieldsvalue: { 'profile.resid_card': valzona },
|
||||
};
|
||||
|
||||
globalStore.saveFieldValue(mydatatosave).then((esito) => {
|
||||
if (esito) {
|
||||
tools.showPositiveNotif($q, t('db.recupdated'));
|
||||
} else {
|
||||
tools.showNegativeNotif($q, t('db.recfailed'));
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user