Version 1.0.1 with RIS Circuit Money Exchange !
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -20,6 +20,12 @@
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div v-else>
|
||||
<!--
|
||||
mycircuits: {{userStore.my.profile.mycircuits}}<br><br>
|
||||
listcircuitsfiltered: {{listcircuitsfiltered}}
|
||||
|
||||
<q-btn label="test" @click="userStore.my.profile.mycircuits = [...userStore.my.profile.mycircuits, {circuitname: 'prova'}]; circuitStore.listcircuits = [...circuitStore.listcircuits, {name: 'prova', path: 'prova'}]"></q-btn>
|
||||
-->
|
||||
<q-list>
|
||||
<span v-for="(circuit, index) in listcircuitsfiltered" :key="index" class="q-my-sm" clickable>
|
||||
<CMyCircuit
|
||||
|
||||
Reference in New Issue
Block a user