From 616a6c42183d36b263fa65f1b83f155be0119747 Mon Sep 17 00:00:00 2001 From: Surya Paolo Date: Thu, 1 Jun 2023 11:40:04 +0200 Subject: [PATCH] - L'utente entra direttamente sul circuito, con fido a zero. ++Abilitazione Fido utente (per admin). --- src/components/CContactUser/CContactUser.ts | 11 ++++++++++ src/components/CSendCoins/CSendCoins.ts | 23 ++++++++++++--------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/src/components/CContactUser/CContactUser.ts b/src/components/CContactUser/CContactUser.ts index 875e95c0..b94e3257 100755 --- a/src/components/CContactUser/CContactUser.ts +++ b/src/components/CContactUser/CContactUser.ts @@ -59,6 +59,16 @@ export default defineComponent({ } } + function clickOpenSendCoin() { + if (!userStore.my.profile.resid_province) { + // showProvinceToSelect.value = true + } else { + showsendCoinTo.value = true + } + + } + + return { tools, userStore, @@ -68,6 +78,7 @@ export default defineComponent({ getLinkWebSite, myusername, showingtooltip, + clickOpenSendCoin, } }, }) diff --git a/src/components/CSendCoins/CSendCoins.ts b/src/components/CSendCoins/CSendCoins.ts index cacb3226..1480fbfe 100755 --- a/src/components/CSendCoins/CSendCoins.ts +++ b/src/components/CSendCoins/CSendCoins.ts @@ -54,7 +54,7 @@ export default defineComponent({ setup(props, { emit }) { const $q = useQuasar() const { t } = useI18n() - const show = ref(false) + const showpage = ref(false) const userStore = useUserStore() const circuitStore = useCircuitStore() @@ -67,6 +67,8 @@ export default defineComponent({ const loading = ref(false) const bothcircuits = ref([]) + const showProvinceToSelect = ref(false) + const groupSel = ref(null) const datasaved = ref(null) @@ -122,11 +124,11 @@ export default defineComponent({ watch(() => props.showprop, (newval, oldval) => { console.log('props.showprop', props.showprop, newval) - show.value = newval + showpage.value = newval }) async function aggiorna() { - loading.value = true + groupSel.value = null from_contocom.value = '' accountloaded.value = null @@ -135,6 +137,7 @@ export default defineComponent({ circuittoload.value = circuitStore.listcircuits.find((rec: ICircuit) => rec.name === circuitsel.value) if (circuittoload.value) { + loading.value = true await userStore.loadCircuit(circuittoload.value.path, '').then(({ data, status }: { data: any, status: number }) => { datasaved.value = data }) @@ -166,7 +169,7 @@ export default defineComponent({ } groupsListAdmin.value = userStore.GroupsListWhereIAmAdminInTheCircuit(circuitloaded.value.name) - console.log('groupsListAdmin.value', groupsListAdmin.value) + // console.log('groupsListAdmin.value', groupsListAdmin.value) arrGroupsList.value = [] @@ -264,7 +267,7 @@ export default defineComponent({ aggiorna() - show.value = true + showpage.value = true } if (props.to_group) { @@ -282,7 +285,7 @@ export default defineComponent({ aggiorna() - show.value = true + showpage.value = true } if (props.to_contocom) { bothcircuits.value = userStore.getMyCircuits() @@ -295,7 +298,7 @@ export default defineComponent({ aggiorna() - show.value = true + showpage.value = true } } @@ -334,7 +337,7 @@ export default defineComponent({ tools.sendCoinsByCircuit($q, circuitloaded.value, myrecsendcoin) .then((ris: any) => { if (ris) { - show.value = false + showpage.value = false } }) } @@ -342,13 +345,12 @@ export default defineComponent({ } - onMounted(mounted) return { t, tools, - show, + showpage, bothcircuits, from_username, circuitsel, @@ -375,6 +377,7 @@ export default defineComponent({ from_contocom, arrTypesAccounts, loading, + showProvinceToSelect, } }, })