Aggiornamento APP RISO:
✅ Inviando i RIS, deve comparire prima il Circuito della Provincia, e poi quello Nazionale ✅ Risolto problema per vecchie registrazioni, la provincia compariva "undefined".
This commit is contained in:
@@ -472,7 +472,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
|
||||
IsAskedCircuitByName(name: string): boolean {
|
||||
if (this.my.profile.asked_circuits)
|
||||
if (this.my.profile.asked_circuits && this.my.profile.asked_circuits.length > 0)
|
||||
return this.my.profile.asked_circuits.findIndex((rec: ICircuit) => rec.name === name) >= 0
|
||||
else
|
||||
return false
|
||||
@@ -482,7 +482,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
IsMyCircuitByName(circuitname: string): boolean {
|
||||
|
||||
if (this.my.profile.mycircuits)
|
||||
if (this.my.profile.mycircuits && this.my.profile.mycircuits.length > 0)
|
||||
return this.my.profile.mycircuits.findIndex((rec: IMyCircuit) => rec.circuitname === circuitname) >= 0
|
||||
else
|
||||
return false
|
||||
@@ -515,10 +515,20 @@ export const useUserStore = defineStore('UserStore', {
|
||||
else
|
||||
arrout = tools.getCommon([...this.my.profile.mycircuits], [...user.profile.mycircuits], 'circuitname')
|
||||
|
||||
// controlla che il circuito sia Abilitato!
|
||||
|
||||
|
||||
// controlla che il circuito sia Abilitato e Territoriale !
|
||||
for (const circuitname of arrout) {
|
||||
const circuit = circuitStore.getCircuitByName(circuitname)
|
||||
if (circuit && circuit.transactionsEnabled) {
|
||||
if (circuit && circuit.transactionsEnabled && !circuit.showAlways) {
|
||||
arrfinale.push(circuitname)
|
||||
}
|
||||
}
|
||||
|
||||
// Poi aggiungi i Circuiti ITALIA
|
||||
for (const circuitname of arrout) {
|
||||
const circuit = circuitStore.getCircuitByName(circuitname)
|
||||
if (circuit && circuit.transactionsEnabled && circuit.showAlways) {
|
||||
arrfinale.push(circuitname)
|
||||
}
|
||||
}
|
||||
@@ -1840,7 +1850,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
})
|
||||
},
|
||||
|
||||
async importToServerCmd($q: any, t: any, cmd: number, data: any) {
|
||||
async importToServerCmd($q: any, t: any, cmd: number, data: any, recorddaimportare: boolean = false) {
|
||||
return Api.SendReq('/admin/import', 'POST', { cmd, data })
|
||||
.then((res: any) => {
|
||||
if (res) {
|
||||
@@ -1856,9 +1866,17 @@ export const useUserStore = defineStore('UserStore', {
|
||||
msg += ' ' + t('db.records_updated', { num: res.data.updated })
|
||||
}
|
||||
if (!msg) {
|
||||
msg = t('db.recupdated')
|
||||
if (recorddaimportare) {
|
||||
msg += ' ' + t('db.records_imported', { num: 0 })
|
||||
tools.showNegativeNotif($q, msg)
|
||||
} else {
|
||||
msg = t('db.recupdated')
|
||||
tools.showPositiveNotif($q, msg)
|
||||
}
|
||||
} else {
|
||||
tools.showPositiveNotif($q, msg)
|
||||
}
|
||||
tools.showPositiveNotif($q, msg)
|
||||
|
||||
}
|
||||
}).catch((error) => {
|
||||
tools.showNegativeNotif($q, t('db.recfailed'))
|
||||
|
||||
Reference in New Issue
Block a user