l'admin non riesce a cambiare il fido degli utenti...
This commit is contained in:
@@ -3052,12 +3052,12 @@ export const colTableCircuit = [
|
||||
AddCol({
|
||||
name: 'name', label_trans: 'circuit.name',
|
||||
required: true,
|
||||
maxlength: 30,
|
||||
maxlength: 40,
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InView
|
||||
}),
|
||||
AddCol({
|
||||
name: 'path', label_trans: 'circuit.path', required: true,
|
||||
maxlength: 30,
|
||||
maxlength: 40,
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InView,
|
||||
allowchar: costanti.ALLOWCHAR_CODE,
|
||||
}),
|
||||
|
||||
@@ -232,7 +232,7 @@ export const useNotifStore = defineStore('NotifStore', {
|
||||
|
||||
return Api.SendReq('/sendnotif', 'POST', data)
|
||||
.then((res) => {
|
||||
console.log('res', res)
|
||||
// console.log('res', res)
|
||||
if (res.status === 200) {
|
||||
if (res.data.code === serv_constants.RIS_CODE_OK && res.data.record) {
|
||||
if (res.data.record.dest === userStore.my.username) {
|
||||
|
||||
@@ -488,6 +488,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
getMyCircuitsInCommonByUser(user: IUserFields): any[] {
|
||||
let arrout = []
|
||||
let arrfinale = []
|
||||
let vuoto = false
|
||||
|
||||
const circuitStore = useCircuitStore()
|
||||
@@ -497,21 +498,30 @@ export const useUserStore = defineStore('UserStore', {
|
||||
else
|
||||
arrout = tools.getCommon([...this.my.profile.mycircuits], [...user.profile.mycircuits], 'circuitname')
|
||||
|
||||
// se non ho neanche 1 circuito in comune, metto il mio preferito
|
||||
if (arrout.length <= 0) {
|
||||
const circuit = circuitStore.getCircuitByProvince(this.my.profile.resid_province)
|
||||
if (circuit)
|
||||
arrout.push(circuit.name)
|
||||
else {
|
||||
if (this.my.profile.mycircuits.length > 0) {
|
||||
arrout.push(this.my.profile.mycircuits[0].circuitname)
|
||||
}
|
||||
// controlla che il circuito sia Abilitato!
|
||||
for (const circuitname of arrout) {
|
||||
const circuit = circuitStore.getCircuitByName(circuitname)
|
||||
if (circuit && circuit.transactionsEnabled) {
|
||||
arrfinale.push(circuitname)
|
||||
}
|
||||
}
|
||||
|
||||
console.log('arrout', arrout)
|
||||
// se non ho neanche 1 circuito in comune, metto il mio preferito
|
||||
if (arrfinale.length <= 0) {
|
||||
const circuit = circuitStore.getCircuitByProvince(this.my.profile.resid_province)
|
||||
if (circuit)
|
||||
arrfinale.push(circuit.name)
|
||||
else {
|
||||
if (this.my.profile.mycircuits.length > 0) {
|
||||
arrfinale.push(this.my.profile.mycircuits[0].circuitname)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return arrout
|
||||
console.log('arrout', arrfinale)
|
||||
|
||||
return arrfinale
|
||||
},
|
||||
|
||||
getMyCircuits(): any[] {
|
||||
|
||||
@@ -1093,7 +1093,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
return Api.SendReq('/settable', 'POST', mydata)
|
||||
.then((res) => {
|
||||
this.serverError = false
|
||||
console.log('res', res)
|
||||
// console.log('res', res)
|
||||
if (res && res.data) {
|
||||
tools.updateMyData(res.data.ris)
|
||||
if (res.data.rec) {
|
||||
|
||||
Reference in New Issue
Block a user