Version 1.0.1 with RIS Circuit Money Exchange !

This commit is contained in:
Paolo Arena
2022-09-14 17:37:10 +02:00
parent 25a60472ab
commit f86d8cb7d1
31 changed files with 242 additions and 116 deletions

View File

@@ -52,22 +52,8 @@ export default defineComponent({
const filtroutente = ref(<any[]>[])
const listcircuitsfiltered = computed(() => {
let arr: any[] = []
try {
if (props.modelValue === costanti.CIRCUITS) {
arr = circuitStore.listcircuits
} 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.MANAGE_CIRCUITS) {
// arr = userStore.my.profile.manage_mycircuits
} else if (props.modelValue === costanti.ASK_SENT_CIRCUIT) {
arr = userStore.my.profile.asked_circuits
}
} catch (e) {
arr = []
}
return arr
console.log('list modif')
return updateListCircuit()
})
const myoptions = computed(() => {
@@ -105,10 +91,29 @@ export default defineComponent({
}
}
function updateListCircuit() {
let arr: any[] = []
try {
if (props.modelValue === costanti.CIRCUITS) {
arr = circuitStore.listcircuits
} 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.MANAGE_CIRCUITS) {
// arr = userStore.my.profile.manage_mycircuits
} else if (props.modelValue === costanti.ASK_SENT_CIRCUIT) {
arr = userStore.my.profile.asked_circuits
}
} catch (e) {
arr = []
}
return arr
}
function mounted() {
username.value = userStore.my.username
loadCircuits()
}
function updateValue(val: number) {
@@ -126,6 +131,7 @@ export default defineComponent({
updateValue,
myoptions,
userStore,
circuitStore,
}
}
})