Quando accedi al Circuito RIS Nazionale, ti imposta il Fido e QtaMax DOPPIA rispetto al tuo Circuito Locale

This commit is contained in:
Surya Paolo
2023-11-15 17:50:24 +01:00
parent a071d17410
commit 0642375eaf
18 changed files with 91 additions and 35 deletions

View File

@@ -106,7 +106,7 @@ export default defineComponent({
try {
if (props.modelValue === costanti.CIRCUITS) {
arr = circuitStore.listcircuits
} else if (props.modelValue === costanti.MY_CIRCUITS ) {
} else if (props.modelValue === costanti.MY_CIRCUITS) {
arr = circuitStore.listcircuits.filter((circ: any) => userStore.my.profile.mycircuits.findIndex((rec: any) => circ.name === rec.circuitname) >= 0)
} else if (props.modelValue === costanti.ASK_SENT_CIRCUIT) {
arr = userStore.my.profile.asked_circuits
@@ -115,6 +115,16 @@ export default defineComponent({
arr = []
}
if (props.modelValue === costanti.MY_CIRCUITS) {
const arrtoinsert: any = circuitStore.listcircuits.filter((circ: any) => circ.showAlways)
for (const rec of arrtoinsert) {
if (arr.findIndex(myrec => myrec._id === rec._id) < 0) {
// Se non c'è il circuito Nazionale, glielo aggiungo
arr.push(rec)
}
}
}
return arr
}