Circuits OK
Accounts Ok Movements OK
This commit is contained in:
@@ -82,7 +82,7 @@ export const shared_consts = {
|
|||||||
SET: 2001,
|
SET: 2001,
|
||||||
REMOVE_FROM_MYLIST: 2144,
|
REMOVE_FROM_MYLIST: 2144,
|
||||||
REFUSE_REQ: 2145,
|
REFUSE_REQ: 2145,
|
||||||
CANCEL_REQ: 1146,
|
CANCEL_REQ: 2146,
|
||||||
DELETE: 2170,
|
DELETE: 2170,
|
||||||
ADDADMIN: 2180,
|
ADDADMIN: 2180,
|
||||||
REMOVEADMIN: 2185,
|
REMOVEADMIN: 2185,
|
||||||
@@ -943,6 +943,11 @@ export const shared_consts = {
|
|||||||
ID_CIRCUIT_ADDED_ADMIN: 128,
|
ID_CIRCUIT_ADDED_ADMIN: 128,
|
||||||
ID_CIRCUIT_REMOVED_ADMIN: 256,
|
ID_CIRCUIT_REMOVED_ADMIN: 256,
|
||||||
ID_CIRCUIT_SENDCOINSREQ: 512,
|
ID_CIRCUIT_SENDCOINSREQ: 512,
|
||||||
|
ID_CIRCUIT_COINS_ACCEPTED: 1024,
|
||||||
|
ID_CIRCUIT_COINS_REFUSED: 2048,
|
||||||
|
ID_CIRCUIT_SENDCOINSREQ_SENT: 4096,
|
||||||
|
ID_CIRCUIT_COINS_ACCEPTED_SENT: 8192,
|
||||||
|
ID_CIRCUIT_COINS_REFUSED_SENT: 16384,
|
||||||
|
|
||||||
TYPEDIR_BOOKING: 6,
|
TYPEDIR_BOOKING: 6,
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,22 @@
|
|||||||
background: linear-gradient(45deg, #ffdf40, #ff8359) !important;
|
background: linear-gradient(45deg, #ffdf40, #ff8359) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.progress-bar-5 {
|
||||||
|
height: 8px;
|
||||||
|
border-radius: 3px;
|
||||||
|
background: #ffdf40;
|
||||||
|
background: -webkit-linear-gradient(45deg, #ffdf40, #ff8359) !important;
|
||||||
|
background: linear-gradient(45deg, #ffdf40, #ff8359) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-bar-6 {
|
||||||
|
height: 8px;
|
||||||
|
border-radius: 3px;
|
||||||
|
background: #ffdf40;
|
||||||
|
background: -webkit-linear-gradient(45deg, #ffdf40, #ff8359) !important;
|
||||||
|
background: linear-gradient(45deg, #ffdf40, #ff8359) !important;
|
||||||
|
}
|
||||||
|
|
||||||
.border-top {
|
.border-top {
|
||||||
border-top: 1px solid #efefef;
|
border-top: 1px solid #efefef;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1040,7 +1040,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function selItem(item: any, col: IColGridTable, inmodif?: boolean) {
|
function selItem(item: any, col: IColGridTable, inmodif?: boolean) {
|
||||||
console.log('selItem', item, col)
|
// console.log('selItem', item, col)
|
||||||
if (inmodif) {
|
if (inmodif) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
import { computed, defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
||||||
import { useUserStore } from '@store/UserStore'
|
import { useUserStore } from '@store/UserStore'
|
||||||
import { ICircuit, IImgGallery, IUserFields, IUserProfile, IFriends } from 'model'
|
import { useCircuitStore } from '@store/CircuitStore'
|
||||||
|
|
||||||
|
import { ICircuit, IImgGallery, IUserFields, IUserProfile, IFriends, IAccount } from 'model'
|
||||||
import { costanti } from '@costanti'
|
import { costanti } from '@costanti'
|
||||||
import { shared_consts } from '@/common/shared_vuejs'
|
import { shared_consts } from '@/common/shared_vuejs'
|
||||||
import { tools } from '@store/Modules/tools'
|
import { tools } from '@store/Modules/tools'
|
||||||
@@ -8,12 +10,13 @@ import { useQuasar } from 'quasar'
|
|||||||
import { useI18n } from '@/boot/i18n'
|
import { useI18n } from '@/boot/i18n'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||||
|
import { CSaldo } from '@/components/CSaldo'
|
||||||
import { toolsext } from '@store/Modules/toolsext'
|
import { toolsext } from '@store/Modules/toolsext'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'CMyCircuit',
|
name: 'CMyCircuit',
|
||||||
emits: ['setCmd'],
|
emits: ['setCmd'],
|
||||||
components: {CUserNonVerif},
|
components: {CUserNonVerif, CSaldo},
|
||||||
props: {
|
props: {
|
||||||
mycircuit: {
|
mycircuit: {
|
||||||
type: Object as PropType<ICircuit | null>,
|
type: Object as PropType<ICircuit | null>,
|
||||||
@@ -34,12 +37,17 @@ export default defineComponent({
|
|||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
const circuitStore = useCircuitStore()
|
||||||
const $q = useQuasar()
|
const $q = useQuasar()
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const $router = useRouter()
|
const $router = useRouter()
|
||||||
const $route = useRoute()
|
const $route = useRoute()
|
||||||
|
|
||||||
const circuit = ref(<ICircuit | null>null)
|
const circuit = ref(<ICircuit | null>null)
|
||||||
|
const account = computed(() => circuit.value ? userStore.getAccountByCircuitId(circuit.value._id) : null )
|
||||||
|
|
||||||
|
const qtarem = computed(() => account.value ? circuitStore.getRemainingCoinsToSend(account.value) : 0)
|
||||||
|
const saldo = computed(() => account.value ? account.value.saldo : 0)
|
||||||
|
|
||||||
const table = ref(toolsext.TABCIRCUITS)
|
const table = ref(toolsext.TABCIRCUITS)
|
||||||
|
|
||||||
@@ -88,6 +96,11 @@ export default defineComponent({
|
|||||||
tools,
|
tools,
|
||||||
table,
|
table,
|
||||||
myusername,
|
myusername,
|
||||||
|
circuitStore,
|
||||||
|
t,
|
||||||
|
account,
|
||||||
|
qtarem,
|
||||||
|
saldo,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="tools.isUserOk()">
|
<div v-if="tools.isUserOk()">
|
||||||
<div v-if="circuit">
|
<div v-if="circuit">
|
||||||
<q-item class="q-my-sm" clickable>
|
<q-item class="q-my-sm bordo_stondato_circuiti" clickable>
|
||||||
<q-item-section avatar @click="naviga(tools.getPathByTableAndRec(table, circuit))">
|
<q-item-section avatar @click="naviga(tools.getPathByTableAndRec(table, circuit))">
|
||||||
<q-avatar size="60px">
|
<q-avatar size="60px">
|
||||||
<q-img :src="getImgCircuit(circuit)" :alt="circuit.name" img-class="imgprofile" height="60px"/>
|
<q-img :src="getImgCircuit(circuit)" :alt="circuit.name" img-class="imgprofile" height="60px"/>
|
||||||
@@ -9,40 +9,35 @@
|
|||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
||||||
<q-item-section @click="naviga(tools.getPathByTableAndRec(table, circuit))">
|
<q-item-section @click="naviga(tools.getPathByTableAndRec(table, circuit))">
|
||||||
<q-item-label><strong>{{ circuit.name }}</strong> ({{ circuit.subname }})
|
<q-item-label><strong>{{ circuit.name }}</strong> <span v-if="circuit.subname"> ({{ circuit.subname }})</span>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label v-if="circuit.longdescr" caption lines="3"><em>{{ circuit.longdescr }}</em></q-item-label>
|
<q-item-label v-if="circuit.longdescr" caption lines="3"><em>{{ circuit.longdescr }}</em></q-item-label>
|
||||||
</q-item-section>
|
<q-item-label lines="1">
|
||||||
|
<CSaldo
|
||||||
<q-item-section side v-if="visu === costanti.MY_CIRCUITS">
|
:symbol="circuit.symbol"
|
||||||
<q-item-label>
|
:color="circuit.color"
|
||||||
<q-btn rounded icon="fas fa-ellipsis-h">
|
:saldo="saldo"
|
||||||
<q-menu>
|
:qtarem="qtarem"
|
||||||
<q-list style="min-width: 150px">
|
>
|
||||||
<q-item clickable icon="fas fa-user-minus" v-close-popup
|
</CSaldo>
|
||||||
@click="tools.setCmd($q, shared_consts.CIRCUITCMD.REMOVE_FROM_MYLIST, myusername(), '', circuit.NAME)">
|
|
||||||
<q-item-section>{{ $t('circuit.remove_from_mylist') }}</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
<q-list v-if="tools.iAmAdminCircuit(circuit.name)" style="min-width: 200px">
|
|
||||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.CIRCUITCMD.DELETE, myusername(), '', circuit.name)">
|
|
||||||
<q-item-section>{{ $t('circuit.delete') }}</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
</q-menu>
|
|
||||||
</q-btn>
|
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
||||||
|
|
||||||
<q-item-section side v-if="visu === costanti.USER_CIRCUITS">
|
<q-item-section side v-if="visu === costanti.USER_CIRCUITS">
|
||||||
<q-item-label>
|
<q-item-label>
|
||||||
<q-btn rounded :icon="userStore.IsMyCircuitByName(circuit.name) ? `fas fa-ellipsis-h` : `fas fa-user`">
|
<q-btn rounded :icon="userStore.IsMyCircuitByName(circuit.name) ? `fas fa-ellipsis-h` : `fas fa-user`">
|
||||||
<q-menu>
|
<q-menu>
|
||||||
<q-list v-if="(!userStore.IsMyCircuitByName(circuit.name) && !userStore.IsAskedCircuitByName(circuit.name) && !userStore.IsRefusedCircuitByName(circuit.name))" style="min-width: 200px">
|
<q-list
|
||||||
|
v-if="(!userStore.IsMyCircuitByName(circuit.name) && !userStore.IsAskedCircuitByName(circuit.name) && !userStore.IsRefusedCircuitByName(circuit.name))"
|
||||||
|
style="min-width: 200px">
|
||||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.CIRCUITCMD.REQ, myusername(), true, circuitname)">
|
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.CIRCUITCMD.REQ, myusername(), true, circuitname)">
|
||||||
<q-item-section>{{ $t('circuit.ask') }}</q-item-section>
|
<q-item-section>{{ $t('circuit.ask') }}</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
<q-list v-else-if="(!userStore.IsMyCircuitByName(circuit.name) && userStore.IsAskedCircuitByName(circuit.name) && !userStore.IsRefusedCircuitByName(circuit.name))" style="min-width: 200px">
|
<q-list
|
||||||
|
v-else-if="(!userStore.IsMyCircuitByName(circuit.name) && userStore.IsAskedCircuitByName(circuit.name) && !userStore.IsRefusedCircuitByName(circuit.name))"
|
||||||
|
style="min-width: 200px">
|
||||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.CIRCUITCMD.REQ, myusername(), false, circuit.name)">
|
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.CIRCUITCMD.REQ, myusername(), false, circuit.name)">
|
||||||
<q-item-section>{{ $t('shared.refuse_ask') }}</q-item-section>
|
<q-item-section>{{ $t('shared.refuse_ask') }}</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
@@ -108,5 +103,5 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import './CMyCircuit.scss';
|
@import './CMyCircuit.scss';
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export default defineComponent({
|
|||||||
if (props.modelValue === costanti.CIRCUITS) {
|
if (props.modelValue === costanti.CIRCUITS) {
|
||||||
arr = circuitStore.listcircuits
|
arr = circuitStore.listcircuits
|
||||||
} else if (props.modelValue === costanti.MY_CIRCUITS ) {
|
} else if (props.modelValue === costanti.MY_CIRCUITS ) {
|
||||||
arr = userStore.my.profile.mycircuits
|
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) {
|
} else if (props.modelValue === costanti.MANAGE_CIRCUITS) {
|
||||||
// arr = userStore.my.profile.manage_mycircuits
|
// arr = userStore.my.profile.manage_mycircuits
|
||||||
} else if (props.modelValue === costanti.ASK_SENT_CIRCUIT) {
|
} else if (props.modelValue === costanti.ASK_SENT_CIRCUIT) {
|
||||||
@@ -72,8 +72,8 @@ export default defineComponent({
|
|||||||
|
|
||||||
const myoptions = computed(() => {
|
const myoptions = computed(() => {
|
||||||
const mybutt = []
|
const mybutt = []
|
||||||
mybutt.push({ label: t('mypages.find_circuit'), value: costanti.FIND_CIRCUIT })
|
|
||||||
mybutt.push({ label: t('mypages.follow_circuits') + ' (' + numMyCircuits.value + ')', value: costanti.MY_CIRCUITS })
|
mybutt.push({ label: t('mypages.follow_circuits') + ' (' + numMyCircuits.value + ')', value: costanti.MY_CIRCUITS })
|
||||||
|
mybutt.push({ label: t('mypages.find_circuit'), value: costanti.FIND_CIRCUIT })
|
||||||
// mybutt.push({ label: t('mypages.manage_my_circuits') + ' (' + numManageCircuits.value + ')', value: costanti.MANAGE_CIRCUITS })
|
// mybutt.push({ label: t('mypages.manage_my_circuits') + ' (' + numManageCircuits.value + ')', value: costanti.MANAGE_CIRCUITS })
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ export default defineComponent({
|
|||||||
lasts_notifs_req,
|
lasts_notifs_req,
|
||||||
num_notifs,
|
num_notifs,
|
||||||
clickNotif,
|
clickNotif,
|
||||||
|
userStore,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
color="primary q-title"
|
color="primary q-title"
|
||||||
style="text-align: center;">
|
style="text-align: center;">
|
||||||
<template v-slot:avatar>
|
<template v-slot:avatar>
|
||||||
<q-icon name="fas fa-exclamation-triangle" color="yellow" size="xs" />
|
<q-icon name="fas fa-exclamation-triangle" color="yellow" size="xs"/>
|
||||||
</template>
|
</template>
|
||||||
<q-item clickable v-for="(notif, index) in lasts_notifs_req" :key="index">
|
<q-item clickable v-for="(notif, index) in lasts_notifs_req" :key="index">
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<q-item-label lines="5" :class="(!notif.read) ? 'unread' : 'read'" @click="clickNotif(notif)">
|
<q-item-label lines="5" :class="(!notif.read) ? 'unread' : 'read'" @click="clickNotif(notif)">
|
||||||
<div v-html="getNotifText($t, notif, false)"></div>
|
<div v-html="getNotifText($t, notif, false)"></div>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label caption lines="2"
|
<q-item-label caption lines="18"
|
||||||
v-if="notif.typedir === shared_consts.TypeNotifs.TYPEDIR_CIRCUITS && notif.status === 0 && notif.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_SENDCOINSREQ"
|
v-if="notif.typedir === shared_consts.TypeNotifs.TYPEDIR_CIRCUITS && notif.status === 0 && notif.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_SENDCOINSREQ"
|
||||||
v-ripple>
|
v-ripple>
|
||||||
<div class="row no-wrap justify-evenly q-pa-sm">
|
<div class="row no-wrap justify-evenly q-pa-sm">
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
<q-btn
|
<q-btn
|
||||||
size="md"
|
size="md"
|
||||||
color="negative" :label="$t('circuit.refuse_coins_qty', {qty: notif.extrarec.qty, symbol: notif.extrarec.symbol})"
|
color="negative" :label="$t('circuit.refuse_coins_qty', {qty: notif.extrarec.qty, symbol: notif.extrarec.symbol})"
|
||||||
@click="tools.refuseCoins(q, notif.sender, notif.extrarec)"
|
@click="tools.refuseCoins(q, notif.sender, notif)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
|
|||||||
0
src/components/CSaldo/CSaldo.scss
Executable file
0
src/components/CSaldo/CSaldo.scss
Executable file
51
src/components/CSaldo/CSaldo.ts
Executable file
51
src/components/CSaldo/CSaldo.ts
Executable file
@@ -0,0 +1,51 @@
|
|||||||
|
import { defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
||||||
|
import { tools } from '@src/store/Modules/tools'
|
||||||
|
import { CCurrencyValue } from '../CCurrencyValue'
|
||||||
|
|
||||||
|
|
||||||
|
import { date, useQuasar } from 'quasar'
|
||||||
|
import { useI18n } from '@/boot/i18n'
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: 'CSaldo',
|
||||||
|
props: {
|
||||||
|
symbol: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
saldo: {
|
||||||
|
type: Number,
|
||||||
|
required: true,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
qtarem: {
|
||||||
|
type: Number,
|
||||||
|
required: false,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
color: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: { CCurrencyValue },
|
||||||
|
setup(props, { emit }) {
|
||||||
|
const $q = useQuasar()
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
|
const showingtooltip = ref(false)
|
||||||
|
|
||||||
|
function created() {
|
||||||
|
// created
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
onMounted(created)
|
||||||
|
|
||||||
|
return {
|
||||||
|
showingtooltip,
|
||||||
|
t,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
18
src/components/CSaldo/CSaldo.vue
Executable file
18
src/components/CSaldo/CSaldo.vue
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
<CCurrencyValue
|
||||||
|
:symbol="symbol"
|
||||||
|
:tips="t('account.saldo_tips')"
|
||||||
|
:color="color"
|
||||||
|
:value="saldo"
|
||||||
|
:label="t('account.saldo') + ` (max ` + qtarem + `)`">
|
||||||
|
|
||||||
|
</CCurrencyValue>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" src="./CSaldo.ts">
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import './CSaldo.scss';
|
||||||
|
</style>
|
||||||
1
src/components/CSaldo/index.ts
Executable file
1
src/components/CSaldo/index.ts
Executable file
@@ -0,0 +1 @@
|
|||||||
|
export {default as CSaldo} from './CSaldo.vue'
|
||||||
@@ -2,7 +2,7 @@ import { computed, defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
|||||||
|
|
||||||
import { IAccount, ICircuit, IOperators, ISendCoin, ISpecialField, IUserFields } from '../../model'
|
import { IAccount, ICircuit, IOperators, ISendCoin, ISpecialField, IUserFields } from '../../model'
|
||||||
import { tools } from '@store/Modules/tools'
|
import { tools } from '@store/Modules/tools'
|
||||||
import { CCurrencyValue } from '@/components/CCurrencyValue'
|
import { CSaldo } from '@/components/CSaldo'
|
||||||
import { useUserStore } from '@store/UserStore'
|
import { useUserStore } from '@store/UserStore'
|
||||||
import { useCircuitStore } from '@store/CircuitStore'
|
import { useCircuitStore } from '@store/CircuitStore'
|
||||||
import { useQuasar } from 'quasar'
|
import { useQuasar } from 'quasar'
|
||||||
@@ -23,7 +23,7 @@ export default defineComponent({
|
|||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: { CCurrencyValue, CMyUser },
|
components: { CSaldo, CMyUser },
|
||||||
|
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const $q = useQuasar()
|
const $q = useQuasar()
|
||||||
@@ -53,6 +53,7 @@ export default defineComponent({
|
|||||||
const qtyRef = ref(<any>null)
|
const qtyRef = ref(<any>null)
|
||||||
|
|
||||||
watch(() => circuitsel.value, (newval, oldval) => {
|
watch(() => circuitsel.value, (newval, oldval) => {
|
||||||
|
tools.setCookie(tools.CIRCUIT_USE, newval)
|
||||||
aggiorna()
|
aggiorna()
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -96,10 +97,6 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
console.log('circuitStore.listcircuits', circuitStore.listcircuits, 'aggiorna', circuitloaded.value)
|
|
||||||
console.log('userStore.my.profile.mycircuits', userStore.my.profile.mycircuits)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function mounted() {
|
function mounted() {
|
||||||
@@ -109,9 +106,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
bothcircuits.value = userStore.IsMyCircuitByUser(props.to_user)
|
bothcircuits.value = userStore.IsMyCircuitByUser(props.to_user)
|
||||||
|
|
||||||
if (bothcircuits.value.length === 1) {
|
circuitsel.value = tools.getCookie(tools.CIRCUIT_USE, bothcircuits.value[0])
|
||||||
circuitsel.value = bothcircuits.value[0]
|
|
||||||
}
|
|
||||||
|
|
||||||
aggiorna()
|
aggiorna()
|
||||||
|
|
||||||
|
|||||||
@@ -13,14 +13,14 @@
|
|||||||
<q-select rounded outlined v-model="circuitsel" :options="bothcircuits" label="Circuito">
|
<q-select rounded outlined v-model="circuitsel" :options="bothcircuits" label="Circuito">
|
||||||
</q-select>
|
</q-select>
|
||||||
|
|
||||||
<CCurrencyValue
|
<CSaldo
|
||||||
:symbol="circuitloaded.symbol"
|
:symbol="circuitloaded.symbol"
|
||||||
:tips="t('account.saldo_tips')"
|
|
||||||
:color="circuitloaded.color"
|
:color="circuitloaded.color"
|
||||||
:value="accountloaded ? accountloaded.saldo : 0"
|
:saldo="accountloaded ? accountloaded.saldo : 0"
|
||||||
:label="t('account.saldo')">
|
:qtarem="accountloaded ? circuitStore.getRemainingCoinsToSend(accountloaded) : 0"
|
||||||
|
>
|
||||||
|
|
||||||
</CCurrencyValue>
|
</CSaldo>
|
||||||
|
|
||||||
<q-input v-model="from_username" label="Mittente" class="full-width" readonly>
|
<q-input v-model="from_username" label="Mittente" class="full-width" readonly>
|
||||||
</q-input>
|
</q-input>
|
||||||
@@ -31,14 +31,14 @@
|
|||||||
labelextra="Destinatario"
|
labelextra="Destinatario"
|
||||||
>
|
>
|
||||||
</CMyUser>
|
</CMyUser>
|
||||||
<q-input v-model="causal" label="Note" class="full-width">
|
|
||||||
</q-input>
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<q-input
|
<q-input
|
||||||
|
mask="#.##"
|
||||||
|
reverse-fill-mask
|
||||||
ref="qtyRef"
|
ref="qtyRef"
|
||||||
class="q-py-sm text-h5"
|
class="q-py-sm text-h5"
|
||||||
outlined v-model="qty" type="number"
|
outlined v-model="qty" type="text"
|
||||||
:rules="[ val => val <= circuitStore.getRemainingCoinsToSend(accountloaded) || t('circuit.qta_remaining_to_send', { maxqta: circuitStore.getRemainingCoinsToSend(accountloaded), symbol: circuitloaded.symbol })]"
|
:rules="[ val => val <= circuitStore.getRemainingCoinsToSend(accountloaded) || t('circuit.qta_remaining_to_send', { maxqta: circuitStore.getRemainingCoinsToSend(accountloaded), symbol: circuitloaded.symbol })]"
|
||||||
:label="t('movement.amount_to_send', {qtamax: circuitStore.getRemainingCoinsToSend(accountloaded).toFixed(2) + ` ` + circuitloaded.symbol})"
|
:label="t('movement.amount_to_send', {qtamax: circuitStore.getRemainingCoinsToSend(accountloaded).toFixed(2) + ` ` + circuitloaded.symbol})"
|
||||||
>
|
>
|
||||||
@@ -52,6 +52,8 @@
|
|||||||
</q-input>
|
</q-input>
|
||||||
|
|
||||||
<q-slider
|
<q-slider
|
||||||
|
class="q-ma-xs"
|
||||||
|
v-if="(qty !== '') && circuitStore.getRemainingCoinsToSend(accountloaded) > 0"
|
||||||
v-model="qty"
|
v-model="qty"
|
||||||
color="green"
|
color="green"
|
||||||
markers
|
markers
|
||||||
@@ -68,6 +70,9 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<q-input v-model="causal" label="Note" class="q-my-sm full-width">
|
||||||
|
</q-input>
|
||||||
|
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-actions align="center">
|
<q-card-actions align="center">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|||||||
@@ -766,6 +766,17 @@ $heightBtn: 100%;
|
|||||||
border: solid 3px #49b502;
|
border: solid 3px #49b502;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bordo_stondato_circuiti{
|
||||||
|
margin: 4px;
|
||||||
|
border-radius: 1.15rem;
|
||||||
|
padding-left: 5px;
|
||||||
|
padding-right: 5px;
|
||||||
|
padding-top: 2px;
|
||||||
|
padding-bottom: 2px;
|
||||||
|
border: solid 2px #a5aacc;
|
||||||
|
box-shadow: 0 0 6px rgba(246, 246, 246, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
.bordo_quadrato{
|
.bordo_quadrato{
|
||||||
margin: 1px;
|
margin: 1px;
|
||||||
border-radius: 0.5rem;
|
border-radius: 0.5rem;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
import { func } from '@store/Modules/fieldsTable'
|
import { func } from '@store/Modules/fieldsTable'
|
||||||
|
|
||||||
const functionality: IFunctionality = {
|
const functionality: IFunctionality = {
|
||||||
PWA: true,
|
PWA: false,
|
||||||
SHOW_USER_MENU: true, // Cambiare con true
|
SHOW_USER_MENU: true, // Cambiare con true
|
||||||
SHOW_PROFILE: true,
|
SHOW_PROFILE: true,
|
||||||
SHOW_REG_BUTTON: false,
|
SHOW_REG_BUTTON: false,
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export default defineComponent({
|
|||||||
const notifStore = useNotifStore()
|
const notifStore = useNotifStore()
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const $q = useQuasar()
|
const q = useQuasar()
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
|
||||||
@@ -109,9 +109,9 @@ export default defineComponent({
|
|||||||
console.log('usernotifs.value', usernotifs.value, to)
|
console.log('usernotifs.value', usernotifs.value, to)
|
||||||
const ret = await userStore.setUserNotifs(usernotifs.value)
|
const ret = await userStore.setUserNotifs(usernotifs.value)
|
||||||
/*if (ret) {
|
/*if (ret) {
|
||||||
tools.showPositiveNotif($q, t('db.recupdated'))
|
tools.showPositiveNotif(q, t('db.recupdated'))
|
||||||
} else {
|
} else {
|
||||||
tools.showNegativeNotif($q, t('db.recfailed'))
|
tools.showNegativeNotif(q, t('db.recfailed'))
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -222,7 +222,7 @@ export default defineComponent({
|
|||||||
t,
|
t,
|
||||||
username,
|
username,
|
||||||
userStore,
|
userStore,
|
||||||
$q,
|
q,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<q-drawer v-model="open" side="right" elevated class="text-black"
|
<q-drawer v-model="open" side="right" elevated class="text-black"
|
||||||
:overlay="true"
|
:overlay="true"
|
||||||
:breakpoint="1200"
|
:breakpoint="1200"
|
||||||
:width="$q.screen.lt.sm ? tools.getwidth($q) : 450"
|
:width="q.screen.lt.sm ? tools.getwidth($q) : 450"
|
||||||
>
|
>
|
||||||
<q-bar class="bg-primary text-white">
|
<q-bar class="bg-primary text-white">
|
||||||
{{ $t('notifs.notifs') }}
|
{{ $t('notifs.notifs') }}
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
size="sm"
|
size="sm"
|
||||||
icon="fas fa-user-plus"
|
icon="fas fa-user-plus"
|
||||||
color="positive" :label="$t('friends.accept')"
|
color="positive" :label="$t('friends.accept')"
|
||||||
@click="tools.addToMyFriends($q, userStore.my.username, notif.sender)"
|
@click="tools.addToMyFriends(q, userStore.my.username, notif.sender)"
|
||||||
/>
|
/>
|
||||||
<q-btn
|
<q-btn
|
||||||
dense
|
dense
|
||||||
@@ -109,11 +109,13 @@
|
|||||||
size="sm"
|
size="sm"
|
||||||
icon="fas fa-user-minus"
|
icon="fas fa-user-minus"
|
||||||
color="negative" :label="$t('friends.refuse')"
|
color="negative" :label="$t('friends.refuse')"
|
||||||
@click="tools.refuseReqFriends($q, userStore.my.username, notif.sender)"
|
@click="tools.refuseReqFriends(q, userStore.my.username, notif.sender)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label caption lines="2" v-else-if="notif.typedir === shared_consts.TypeNotifs.TYPEDIR_GROUPS && notif.status === 0 && notif.typeid === shared_consts.TypeNotifs.ID_GROUP_REQUEST_TO_ENTER" v-ripple>
|
<q-item-label caption lines="2"
|
||||||
|
v-else-if="notif.typedir === shared_consts.TypeNotifs.TYPEDIR_GROUPS && notif.status === 0 && notif.typeid === shared_consts.TypeNotifs.ID_GROUP_REQUEST_TO_ENTER"
|
||||||
|
v-ripple>
|
||||||
<div class="row no-wrap justify-evenly" v-if="tools.iAmAdminGroup(notif.extrafield)">
|
<div class="row no-wrap justify-evenly" v-if="tools.iAmAdminGroup(notif.extrafield)">
|
||||||
<q-btn
|
<q-btn
|
||||||
dense
|
dense
|
||||||
@@ -121,7 +123,7 @@
|
|||||||
size="sm"
|
size="sm"
|
||||||
icon="fas fa-user-plus"
|
icon="fas fa-user-plus"
|
||||||
color="positive" :label="$t('friends.accept')"
|
color="positive" :label="$t('friends.accept')"
|
||||||
@click="tools.addToMyGroups($q, notif.sender, notif.extrafield)"
|
@click="tools.addToMyGroups(q, notif.sender, notif.extrafield)"
|
||||||
/>
|
/>
|
||||||
<q-btn
|
<q-btn
|
||||||
dense
|
dense
|
||||||
@@ -129,11 +131,13 @@
|
|||||||
size="sm"
|
size="sm"
|
||||||
icon="fas fa-user-minus"
|
icon="fas fa-user-minus"
|
||||||
color="negative" :label="$t('friends.refuse')"
|
color="negative" :label="$t('friends.refuse')"
|
||||||
@click="tools.refuseReqGroup($q, notif.sender, notif.extrafield)"
|
@click="tools.refuseReqGroup(q, notif.sender, notif.extrafield)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label caption lines="2" v-else-if="notif.typedir === shared_consts.TypeNotifs.TYPEDIR_CIRCUITS && notif.status === 0 && notif.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_REQUEST_TO_ENTER" v-ripple>
|
<q-item-label caption lines="2"
|
||||||
|
v-else-if="notif.typedir === shared_consts.TypeNotifs.TYPEDIR_CIRCUITS && notif.status === 0 && notif.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_REQUEST_TO_ENTER"
|
||||||
|
v-ripple>
|
||||||
|
|
||||||
<div class="row no-wrap justify-evenly" v-if="tools.iAmAdminCircuit(notif.extrafield)">
|
<div class="row no-wrap justify-evenly" v-if="tools.iAmAdminCircuit(notif.extrafield)">
|
||||||
<q-btn
|
<q-btn
|
||||||
@@ -142,7 +146,7 @@
|
|||||||
size="sm"
|
size="sm"
|
||||||
icon="fas fa-user-plus"
|
icon="fas fa-user-plus"
|
||||||
color="positive" :label="$t('circuit.accept')"
|
color="positive" :label="$t('circuit.accept')"
|
||||||
@click="tools.addToMyCircuits($q, notif.sender, notif.extrafield)"
|
@click="tools.addToMyCircuits(q, notif.sender, notif.extrafield)"
|
||||||
/>
|
/>
|
||||||
<q-btn
|
<q-btn
|
||||||
dense
|
dense
|
||||||
@@ -150,11 +154,12 @@
|
|||||||
size="sm"
|
size="sm"
|
||||||
icon="fas fa-user-minus"
|
icon="fas fa-user-minus"
|
||||||
color="negative" :label="$t('shared.refuse_ask')"
|
color="negative" :label="$t('shared.refuse_ask')"
|
||||||
@click="tools.refuseReqCircuit($q, notif.sender, notif.extrafield)"
|
@click="tools.refuseReqCircuit(q, notif.sender, notif.extrafield)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label caption lines="2" v-else-if="notif.typedir === shared_consts.TypeNotifs.TYPEDIR_CIRCUITS && notif.status === 0 && notif.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_SENDCOINSREQ" v-ripple>
|
<q-item-label caption lines="2"
|
||||||
|
v-else-if="notif.typedir === shared_consts.TypeNotifs.TYPEDIR_CIRCUITS && notif.status === 0 && notif.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_SENDCOINSREQ" v-ripple>
|
||||||
|
|
||||||
<div class="row no-wrap justify-evenly">
|
<div class="row no-wrap justify-evenly">
|
||||||
<q-btn
|
<q-btn
|
||||||
@@ -163,7 +168,7 @@
|
|||||||
size="sm"
|
size="sm"
|
||||||
icon="fas fa-user-plus"
|
icon="fas fa-user-plus"
|
||||||
color="positive" :label="$t('circuit.accept_coins')"
|
color="positive" :label="$t('circuit.accept_coins')"
|
||||||
@click="tools.acceptCoins($q, notif.sender, notif)"
|
@click="tools.acceptCoins(q, notif.sender, notif)"
|
||||||
/>
|
/>
|
||||||
<q-btn
|
<q-btn
|
||||||
dense
|
dense
|
||||||
@@ -171,7 +176,7 @@
|
|||||||
size="sm"
|
size="sm"
|
||||||
icon="fas fa-user-minus"
|
icon="fas fa-user-minus"
|
||||||
color="negative" :label="$t('circuit.refuse_coins')"
|
color="negative" :label="$t('circuit.refuse_coins')"
|
||||||
@click="tools.refuseCoins($q, notif.sender, notif.extrarec)"
|
@click="tools.refuseCoins(q, notif.sender, notif)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
|
|||||||
@@ -911,7 +911,7 @@ export interface ISendCoin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface ICircuit {
|
export interface ICircuit {
|
||||||
_id: number
|
_id: string
|
||||||
groupnameId: string
|
groupnameId: string
|
||||||
name: string
|
name: string
|
||||||
path: string
|
path: string
|
||||||
@@ -949,6 +949,7 @@ export interface ICircuit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface IMovement {
|
export interface IMovement {
|
||||||
|
_id: string
|
||||||
transactionDate: Date
|
transactionDate: Date
|
||||||
accountFromId: string
|
accountFromId: string
|
||||||
accountToId: string
|
accountToId: string
|
||||||
@@ -972,7 +973,7 @@ export interface IMovVisu {
|
|||||||
|
|
||||||
export interface IAccount {
|
export interface IAccount {
|
||||||
username: string
|
username: string
|
||||||
circuitId: number
|
circuitId: string
|
||||||
circuit: ICircuit[]
|
circuit: ICircuit[]
|
||||||
name: string
|
name: string
|
||||||
deperibile: boolean
|
deperibile: boolean
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import { useGlobalStore } from '@store/globalStore'
|
|||||||
import { useUserStore } from '@store/UserStore'
|
import { useUserStore } from '@store/UserStore'
|
||||||
import { static_data } from '@/db/static_data'
|
import { static_data } from '@/db/static_data'
|
||||||
import { useNotifStore } from '@store/NotifStore'
|
import { useNotifStore } from '@store/NotifStore'
|
||||||
|
import { CNotifAtTop } from '@src/components/CNotifAtTop'
|
||||||
|
|
||||||
import MixinBase from '@/mixins/mixin-base'
|
import MixinBase from '@/mixins/mixin-base'
|
||||||
import MixinUsers from '@/mixins/mixin-users'
|
import MixinUsers from '@/mixins/mixin-users'
|
||||||
@@ -25,7 +26,8 @@ import { CPresentazione } from '@/components'
|
|||||||
import MixinMetaTags from '@/mixins/mixin-metatags'
|
import MixinMetaTags from '@/mixins/mixin-metatags'
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'mainview',
|
name: 'mainview',
|
||||||
components: { CSkill, CChartMap, CMapsEsempio, CDashboard, CUserNonVerif, CMainView, CCopyBtn, LandingFooter, CCheckIfIsLogged, CStatusReg, CPresentazione },
|
components: { CSkill, CChartMap, CMapsEsempio, CDashboard, CUserNonVerif, CMainView, CCopyBtn,
|
||||||
|
CNotifAtTop, LandingFooter, CCheckIfIsLogged, CStatusReg, CPresentazione },
|
||||||
setup() {
|
setup() {
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<q-page class="">
|
<q-page class="">
|
||||||
|
<CNotifAtTop />
|
||||||
|
|
||||||
<span>{{
|
<span>{{
|
||||||
setmeta({
|
setmeta({
|
||||||
|
|||||||
@@ -1001,7 +1001,7 @@ const msg_it = {
|
|||||||
rejected: 'Rifiutati',
|
rejected: 'Rifiutati',
|
||||||
provapao: 'Prova pao',
|
provapao: 'Prova pao',
|
||||||
circuits: 'Circuiti',
|
circuits: 'Circuiti',
|
||||||
find_circuit: 'Cerca Circuito',
|
find_circuit: 'Cerca Circuiti',
|
||||||
follow_circuits: 'Circuiti di cui fai parte',
|
follow_circuits: 'Circuiti di cui fai parte',
|
||||||
},
|
},
|
||||||
friends: {
|
friends: {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import { serv_constants } from '@store/Modules/serv_constants'
|
|||||||
import { Api } from '@api'
|
import { Api } from '@api'
|
||||||
import { toolsext } from '@store/Modules/toolsext'
|
import { toolsext } from '@store/Modules/toolsext'
|
||||||
import { static_data } from '@src/db/static_data'
|
import { static_data } from '@src/db/static_data'
|
||||||
|
import { useUserStore } from '@store/UserStore'
|
||||||
|
|
||||||
|
|
||||||
import { shared_consts } from '@/common/shared_vuejs'
|
import { shared_consts } from '@/common/shared_vuejs'
|
||||||
@@ -31,10 +32,24 @@ export const useCircuitStore = defineStore('CircuitStore', {
|
|||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
getRemainingCoinsToSend(account: IAccount) {
|
getRemainingCoinsToSend(account: IAccount) {
|
||||||
|
if (account)
|
||||||
return tools.roundDec2(account.saldo + account.fidoConcesso)
|
return tools.roundDec2(account.saldo + account.fidoConcesso)
|
||||||
|
else
|
||||||
|
return 0
|
||||||
},
|
},
|
||||||
getMaxCoinsToSend(account: IAccount) {
|
getMaxCoinsToSend(account: IAccount) {
|
||||||
|
if (account)
|
||||||
return tools.roundDec2(account.qta_maxConcessa - account.saldo)
|
return tools.roundDec2(account.qta_maxConcessa - account.saldo)
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
},
|
||||||
|
getSaldoByCircuitId(circuitId: string): number {
|
||||||
|
const userStore = useUserStore()
|
||||||
|
const account = userStore.my.profile.useraccounts.find((rec: IAccount) => rec.circuitId === circuitId)
|
||||||
|
if (account)
|
||||||
|
return account.saldo
|
||||||
|
else
|
||||||
|
return 0
|
||||||
},
|
},
|
||||||
|
|
||||||
async loadCircuits() {
|
async loadCircuits() {
|
||||||
|
|||||||
@@ -34,9 +34,9 @@ export const DB = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function allTables() {
|
export function allTables() {
|
||||||
const myarr = OtherTables
|
const myarr = costanti.OtherTables
|
||||||
for (const tab of MainTables) {
|
for (const tab of costanti.MainTables) {
|
||||||
for (const method of allMethod) {
|
for (const method of costanti.allMethod) {
|
||||||
myarr.push(method + tab)
|
myarr.push(method + tab)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -161,6 +161,18 @@ export const costanti = {
|
|||||||
small: true,
|
small: true,
|
||||||
visuonstat: true,
|
visuonstat: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
visible: false,
|
||||||
|
title: 'Circuiti',
|
||||||
|
to: '/circuits',
|
||||||
|
table: 'circuits',
|
||||||
|
icon: 'fas fa-coins',
|
||||||
|
color: 'orange-6',
|
||||||
|
hint: '',
|
||||||
|
disable: true,
|
||||||
|
small: true,
|
||||||
|
visuonstat: true,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
BINARY_CHECK: 1,
|
BINARY_CHECK: 1,
|
||||||
|
|||||||
@@ -2417,7 +2417,6 @@ export const colTableSubCashCategory = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
export const colTableCircuitComplete = [
|
export const colTableCircuitComplete = [
|
||||||
AddCol({ name: 'Num', label_trans: 'circuit.num', fieldtype: costanti.FieldType.number }),
|
|
||||||
// AddCol({ name: 'groupnameId', label_trans: 'circuit.groupnameId', fieldtype: costanti.FieldType.select, jointable: 'mygroups' }), // da togliere poi
|
// AddCol({ name: 'groupnameId', label_trans: 'circuit.groupnameId', fieldtype: costanti.FieldType.select, jointable: 'mygroups' }), // da togliere poi
|
||||||
AddCol({ name: 'name', label_trans: 'circuit.name',
|
AddCol({ name: 'name', label_trans: 'circuit.name',
|
||||||
maxlength: 40,
|
maxlength: 40,
|
||||||
@@ -2521,8 +2520,8 @@ export const colTableCircuit = [
|
|||||||
fieldtype: costanti.FieldType.currency, required: true, visulabel: true }),
|
fieldtype: costanti.FieldType.currency, required: true, visulabel: true }),
|
||||||
AddCol({ name: 'qta_max_default', label_trans: 'circuit.qta_max_default',
|
AddCol({ name: 'qta_max_default', label_trans: 'circuit.qta_max_default',
|
||||||
fieldtype: costanti.FieldType.currency, required: true, visulabel: true }),
|
fieldtype: costanti.FieldType.currency, required: true, visulabel: true }),
|
||||||
AddCol({ name: 'regulation', label_trans: 'circuit.regulation', fieldtype: costanti.FieldType.html }),
|
AddCol({ name: 'regulation', label_trans: 'circuit.regulation', fieldtype: costanti.FieldType.html, required: true }),
|
||||||
AddCol({ name: 'deperimento', label_trans: 'circuit.deperimento', fieldtype: costanti.FieldType.boolean }),
|
// AddCol({ name: 'deperimento', label_trans: 'circuit.deperimento', fieldtype: costanti.FieldType.boolean }),
|
||||||
AddCol({ name: 'data_costituz', label_trans: 'circuit.data_costituz', fieldtype: costanti.FieldType.date }),
|
AddCol({ name: 'data_costituz', label_trans: 'circuit.data_costituz', fieldtype: costanti.FieldType.date }),
|
||||||
AddCol({
|
AddCol({
|
||||||
name: 'photos',
|
name: 'photos',
|
||||||
@@ -2537,7 +2536,7 @@ export const colTableCircuit = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
export const colmyUserCircuit = [
|
export const colmyUserCircuit = [
|
||||||
AddCol({ name: 'circuitId', label_trans: 'account.circuitId', fieldtype: costanti.FieldType.number }),
|
AddCol({ name: 'circuitId', label_trans: 'account.circuitId', fieldtype: costanti.FieldType.string }),
|
||||||
AddCol({ name: 'userId', label_trans: 'account.users', fieldtype: costanti.FieldType.select, jointable: 'users', }),
|
AddCol({ name: 'userId', label_trans: 'account.users', fieldtype: costanti.FieldType.select, jointable: 'users', }),
|
||||||
AddCol({ name: 'name', label_trans: 'circuit.name' }),
|
AddCol({ name: 'name', label_trans: 'circuit.name' }),
|
||||||
AddCol({ name: 'deperibile', label_trans: 'account.deperibile', fieldtype: costanti.FieldType.boolean }),
|
AddCol({ name: 'deperibile', label_trans: 'account.deperibile', fieldtype: costanti.FieldType.boolean }),
|
||||||
@@ -2552,8 +2551,8 @@ export const colmyUserCircuit = [
|
|||||||
|
|
||||||
export const colTableMovement = [
|
export const colTableMovement = [
|
||||||
AddCol({ name: 'transactionDate', label_trans: 'movement.transactionDate', fieldtype: costanti.FieldType.date }),
|
AddCol({ name: 'transactionDate', label_trans: 'movement.transactionDate', fieldtype: costanti.FieldType.date }),
|
||||||
AddCol({ name: 'accountFromId', label_trans: 'movement.accountFromId', fieldtype: costanti.FieldType.number, required: true }),
|
AddCol({ name: 'accountFromId', label_trans: 'movement.accountFromId', fieldtype: costanti.FieldType.string, required: true }),
|
||||||
AddCol({ name: 'accountToId', label_trans: 'movement.accountToId', fieldtype: costanti.FieldType.number, required: true }),
|
AddCol({ name: 'accountToId', label_trans: 'movement.accountToId', fieldtype: costanti.FieldType.string, required: true }),
|
||||||
AddCol({ name: 'amount', label_trans: 'movement.amount', fieldtype: costanti.FieldType.number, required: true }),
|
AddCol({ name: 'amount', label_trans: 'movement.amount', fieldtype: costanti.FieldType.number, required: true }),
|
||||||
AddCol({ name: 'causal', label_trans: 'movement.causal' }),
|
AddCol({ name: 'causal', label_trans: 'movement.causal' }),
|
||||||
AddCol({ name: 'causal_table', label_trans: 'movement.causal_table' }),
|
AddCol({ name: 'causal_table', label_trans: 'movement.causal_table' }),
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ export const tools = {
|
|||||||
FRIENDS_SEARCH: 'FR_SE',
|
FRIENDS_SEARCH: 'FR_SE',
|
||||||
GROUP_SEARCH: 'GR_SE',
|
GROUP_SEARCH: 'GR_SE',
|
||||||
CIRCUIT_SEARCH: 'CI_SE',
|
CIRCUIT_SEARCH: 'CI_SE',
|
||||||
|
CIRCUIT_USE: 'CIR_U',
|
||||||
|
|
||||||
getprefCountries: ['it', 'es', 'us'],
|
getprefCountries: ['it', 'es', 'us'],
|
||||||
|
|
||||||
@@ -4328,6 +4329,7 @@ export const tools = {
|
|||||||
'blue': '#0000ff',
|
'blue': '#0000ff',
|
||||||
'blue-3': '#90caf9',
|
'blue-3': '#90caf9',
|
||||||
'blue-4': '#64b5f6',
|
'blue-4': '#64b5f6',
|
||||||
|
'amber-10': '#ff6f00',
|
||||||
'blue-6': '#2196f3',
|
'blue-6': '#2196f3',
|
||||||
'blueviolet': '#8a2be2',
|
'blueviolet': '#8a2be2',
|
||||||
'brown': '#a52a2a',
|
'brown': '#a52a2a',
|
||||||
@@ -4796,6 +4798,10 @@ export const tools = {
|
|||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
if (res.cansend) {
|
if (res.cansend) {
|
||||||
|
if (res.user) {
|
||||||
|
userStore.my = res.user
|
||||||
|
}
|
||||||
|
console.log('useraccounts', userStore.my.profile.useraccounts)
|
||||||
tools.showPositiveNotif($q, t('circuit.coins_accepted'))
|
tools.showPositiveNotif($q, t('circuit.coins_accepted'))
|
||||||
} else {
|
} else {
|
||||||
tools.showNegativeNotif($q, res.errormsg)
|
tools.showNegativeNotif($q, res.errormsg)
|
||||||
@@ -4804,10 +4810,11 @@ export const tools = {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
refuseCoins($q: any, username: string, recsendcoin: ISendCoin) {
|
refuseCoins($q: any, username: string, notif: any) {
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
userStore.setCircuitCmd($q, t, username, recsendcoin.circuitname, shared_consts.CIRCUITCMD.SENDCOINS_REFUSE, recsendcoin)
|
notif.extrarec.notifId = notif._id
|
||||||
|
userStore.setCircuitCmd($q, t, username, notif.extrarec.circuitname, shared_consts.CIRCUITCMD.SENDCOINS_REFUSE, 0, notif.extrarec)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
tools.showPositiveNotif($q, t('circuit.coins_refused'))
|
tools.showPositiveNotif($q, t('circuit.coins_refused'))
|
||||||
@@ -5295,6 +5302,9 @@ export const tools = {
|
|||||||
if (res.useraccounts && res.useraccounts.length > 0) {
|
if (res.useraccounts && res.useraccounts.length > 0) {
|
||||||
userStore.my.profile.useraccounts = res.useraccounts
|
userStore.my.profile.useraccounts = res.useraccounts
|
||||||
}
|
}
|
||||||
|
if (res.user) {
|
||||||
|
userStore.my = res.user
|
||||||
|
}
|
||||||
tools.showPositiveNotif($q, t('circuit.coins_sendrequest_sent'))
|
tools.showPositiveNotif($q, t('circuit.coins_sendrequest_sent'))
|
||||||
} else {
|
} else {
|
||||||
tools.showNegativeNotif($q, res.errormsg)
|
tools.showNegativeNotif($q, res.errormsg)
|
||||||
@@ -5344,7 +5354,7 @@ export const tools = {
|
|||||||
if (username === userStore.my.username) {
|
if (username === userStore.my.username) {
|
||||||
userStore.my.profile.asked_circuits = userStore.my.profile.asked_circuits.filter((rec: ICircuit) => rec.name !== circuitname)
|
userStore.my.profile.asked_circuits = userStore.my.profile.asked_circuits.filter((rec: ICircuit) => rec.name !== circuitname)
|
||||||
}
|
}
|
||||||
tools.showPositiveNotif($q, t('db.refusedcircuit', { username }))
|
tools.showPositiveNotif($q, t('circuit.refusedcircuit', { username }))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -5653,8 +5663,18 @@ export const tools = {
|
|||||||
tools.addToMyCircuits($q, username, dest)
|
tools.addToMyCircuits($q, username, dest)
|
||||||
} else if (cmd === shared_consts.CIRCUITCMD.REQ) {
|
} else if (cmd === shared_consts.CIRCUITCMD.REQ) {
|
||||||
tools.setRequestCircuit($q, username, dest, value)
|
tools.setRequestCircuit($q, username, dest, value)
|
||||||
|
} else if (cmd === shared_consts.CIRCUITCMD.CANCEL_REQ) {
|
||||||
|
tools.cancelReqCircuit($q, username, dest)
|
||||||
|
} else if (cmd === shared_consts.CIRCUITCMD.REFUSE_REQ) {
|
||||||
|
tools.refuseReqCircuit($q, username, dest)
|
||||||
} else if (cmd === shared_consts.CIRCUITCMD.DELETE) {
|
} else if (cmd === shared_consts.CIRCUITCMD.DELETE) {
|
||||||
tools.DeleteCircuit($q, username, dest)
|
tools.DeleteCircuit($q, username, dest)
|
||||||
|
} else if (cmd === shared_consts.CIRCUITCMD.ADDADMIN) {
|
||||||
|
tools.addtoAdminOfCircuit($q, username, dest)
|
||||||
|
} else if (cmd === shared_consts.CIRCUITCMD.REMOVEADMIN) {
|
||||||
|
tools.removeAdminOfCircuit($q, username, dest)
|
||||||
|
} else if (cmd === shared_consts.CIRCUITCMD.REMOVE_FROM_MYLIST) {
|
||||||
|
tools.removeFromMyCircuits($q, username, dest)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isCallable(anything: any) {
|
isCallable(anything: any) {
|
||||||
@@ -6257,8 +6277,13 @@ export const tools = {
|
|||||||
|
|
||||||
// Function to return commonElements
|
// Function to return commonElements
|
||||||
getCommon(arr1: any, arr2: any, field: string): any[] {
|
getCommon(arr1: any, arr2: any, field: string): any[] {
|
||||||
arr1.sort((a: any, b: any) => b[field] - a[field]) // Sort both the arrays
|
// @ts-ignore
|
||||||
arr2.sort((a: any, b: any) => b[field] - a[field])
|
arr1.sort((a: any, b: any) => (a[field] > b[field]) - (a[field] < b[field])) // Sort both the arrays
|
||||||
|
// @ts-ignore
|
||||||
|
arr2.sort((a: any, b: any) => (a[field] > b[field]) - (a[field] < b[field]))
|
||||||
|
|
||||||
|
// console.log('arr1', arr1)
|
||||||
|
// console.log('arr2', arr2)
|
||||||
let common = [] // Array to contain common elements
|
let common = [] // Array to contain common elements
|
||||||
let i = 0, j = 0 // i points to arr1 and j to arr2
|
let i = 0, j = 0 // i points to arr1 and j to arr2
|
||||||
// Break if one of them runs out
|
// Break if one of them runs out
|
||||||
@@ -6284,9 +6309,9 @@ export const tools = {
|
|||||||
if (rec && rec.userfrom) {
|
if (rec && rec.userfrom) {
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
if (userStore.my.username === rec.userfrom.username) {
|
if (userStore.my.username === rec.userfrom.username) {
|
||||||
type = rec.amount > 0 ? costanti.TypeMov.Uscita : (rec.amount < 0 ? costanti.TypeMov.Entrata : costanti.TypeMov.Nessuno)
|
type = costanti.TypeMov.Uscita
|
||||||
} else if (userStore.my.username === rec.userto.username) {
|
} else if (userStore.my.username === rec.userto.username) {
|
||||||
type = rec.amount > 0 ? costanti.TypeMov.Entrata : (rec.amount < 0 ? costanti.TypeMov.Uscita : costanti.TypeMov.Nessuno)
|
type = costanti.TypeMov.Entrata
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -312,11 +312,11 @@ export const useUserStore = defineStore('UserStore', {
|
|||||||
|
|
||||||
if (!this.my.profile.mycircuits || !user.profile.mycircuits)
|
if (!this.my.profile.mycircuits || !user.profile.mycircuits)
|
||||||
return []
|
return []
|
||||||
return tools.getCommon(this.my.profile.mycircuits, user.profile.mycircuits, 'circuitname')
|
return tools.getCommon([...this.my.profile.mycircuits], [...user.profile.mycircuits], 'circuitname')
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
getAccountByCircuitId(circuitId: number): any {
|
getAccountByCircuitId(circuitId: string): any {
|
||||||
return this.my.profile.useraccounts.find((rec: IAccount) => rec.circuitId === circuitId)
|
return this.my.profile.useraccounts.find((rec: IAccount) => rec.circuitId === circuitId)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -692,9 +692,13 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
async clearDataAfterLogout() {
|
async clearDataAfterLogout() {
|
||||||
// console.log('clearDataAfterLogout')
|
// console.log('clearDataAfterLogout')
|
||||||
|
|
||||||
|
try {
|
||||||
for (const table of ApiTables.allTables()) {
|
for (const table of ApiTables.allTables()) {
|
||||||
await globalroutines('clearalldata', table, null)
|
await globalroutines('clearalldata', table, null)
|
||||||
}
|
}
|
||||||
|
}catch (e) {
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
if (static_data.functionality.PWA) {
|
if (static_data.functionality.PWA) {
|
||||||
if ('serviceWorker' in navigator) {
|
if ('serviceWorker' in navigator) {
|
||||||
@@ -1676,7 +1680,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
myserv = window.location.host
|
myserv = window.location.host
|
||||||
|
|
||||||
if (process.env.DEBUGGING) {
|
if (process.env.DEBUGGING) {
|
||||||
myserv = 'http://192.168.1.103:3000'; // 'http://192.168.1.54:3000'
|
myserv = 'http://localhost:3000'; // 'http://192.168.1.54:3000'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!myserv) {
|
if (!myserv) {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { CProfile } from '@/components/CProfile'
|
|||||||
import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
|
import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
|
||||||
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
||||||
import { CCurrencyValue } from '@/components/CCurrencyValue'
|
import { CCurrencyValue } from '@/components/CCurrencyValue'
|
||||||
|
import { CSaldo } from '@/components/CSaldo'
|
||||||
import { CSkill } from '@/components/CSkill'
|
import { CSkill } from '@/components/CSkill'
|
||||||
import { CDateTime } from '@/components/CDateTime'
|
import { CDateTime } from '@/components/CDateTime'
|
||||||
import { tools } from '@store/Modules/tools'
|
import { tools } from '@store/Modules/tools'
|
||||||
@@ -16,21 +17,24 @@ import { useGlobalStore } from '@store/globalStore'
|
|||||||
import { useI18n } from '@/boot/i18n'
|
import { useI18n } from '@/boot/i18n'
|
||||||
import { toolsext } from '@store/Modules/toolsext'
|
import { toolsext } from '@store/Modules/toolsext'
|
||||||
import { useQuasar } from 'quasar'
|
import { useQuasar } from 'quasar'
|
||||||
|
import { CNotifAtTop } from '@src/components/CNotifAtTop'
|
||||||
import { costanti } from '@costanti'
|
import { costanti } from '@costanti'
|
||||||
import { ICity, IFriends, ICircuit, ISearchList, IUserFields, IAccount } from 'model'
|
import { ICity, IFriends, ICircuit, ISearchList, IUserFields, IAccount } from 'model'
|
||||||
import { shared_consts } from '@/common/shared_vuejs'
|
import { shared_consts } from '@/common/shared_vuejs'
|
||||||
import { colmyUserPeople, colmyUserCircuit, colmyMovement } from '@store/Modules/fieldsTable'
|
import { colmyUserPeople, colmyUserCircuit, colmyMovement } from '@store/Modules/fieldsTable'
|
||||||
import { useNotifStore } from '@store/NotifStore'
|
import { useNotifStore } from '@store/NotifStore'
|
||||||
|
import { useCircuitStore } from '@store/CircuitStore'
|
||||||
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'mycircuit',
|
name: 'mycircuit',
|
||||||
components: { CProfile, CTitleBanner, CMyFieldRec, CSkill, CDateTime, CMyFriends,
|
components: { CProfile, CTitleBanner, CMyFieldRec, CSkill, CDateTime, CMyFriends,
|
||||||
CGridTableRec, CMyUser, CCheckIfIsLogged, CCurrencyValue },
|
CGridTableRec, CMyUser, CCheckIfIsLogged, CCurrencyValue, CSaldo, CNotifAtTop },
|
||||||
props: {},
|
props: {},
|
||||||
setup() {
|
setup() {
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const notifStore = useNotifStore()
|
const notifStore = useNotifStore()
|
||||||
|
const circuitStore = useCircuitStore()
|
||||||
const $route = useRoute()
|
const $route = useRoute()
|
||||||
const $q = useQuasar()
|
const $q = useQuasar()
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
@@ -44,10 +48,13 @@ export default defineComponent({
|
|||||||
const showPic = ref(false)
|
const showPic = ref(false)
|
||||||
|
|
||||||
const circuit = ref(<ICircuit|null>{})
|
const circuit = ref(<ICircuit|null>{})
|
||||||
const account = ref(<IAccount|null>{})
|
const account = computed(() => circuit.value ? userStore.getAccountByCircuitId(circuit.value._id) : null )
|
||||||
const mystatus = ref(<number>0)
|
const mystatus = ref(<number>0)
|
||||||
const users_in_circuit = ref(<IFriends[]>[])
|
const users_in_circuit = ref(<IFriends[]>[])
|
||||||
|
|
||||||
|
const qtarem = computed(() => account.value ? circuitStore.getRemainingCoinsToSend(account.value) : 0)
|
||||||
|
const saldo = computed(() => account.value ? account.value.saldo : 0)
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const requestToEnterCircuit = ref(false)
|
const requestToEnterCircuit = ref(false)
|
||||||
|
|
||||||
@@ -85,11 +92,6 @@ export default defineComponent({
|
|||||||
users_in_circuit.value = []
|
users_in_circuit.value = []
|
||||||
}
|
}
|
||||||
|
|
||||||
if (circuit.value) {
|
|
||||||
account.value = userStore.getAccountByCircuitId(circuit.value._id)
|
|
||||||
console.log('account', account.value)
|
|
||||||
}
|
|
||||||
|
|
||||||
mystatus.value = status
|
mystatus.value = status
|
||||||
|
|
||||||
loading.value = false
|
loading.value = false
|
||||||
@@ -225,6 +227,9 @@ export default defineComponent({
|
|||||||
cities,
|
cities,
|
||||||
path,
|
path,
|
||||||
requestToEnterCircuit,
|
requestToEnterCircuit,
|
||||||
|
circuitStore,
|
||||||
|
qtarem,
|
||||||
|
saldo,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<CNotifAtTop />
|
||||||
<div class="q-gutter-sm q-pa-sm q-pb-md">
|
<div class="q-gutter-sm q-pa-sm q-pb-md">
|
||||||
<div v-if="!circuit && !loading">
|
<div v-if="!circuit && !loading">
|
||||||
<div v-if="mystatus === 403">
|
<div v-if="mystatus === 403">
|
||||||
@@ -39,15 +39,12 @@
|
|||||||
<em style="font-weight: bold">{{ $t('db.youarerefusedcircuit') }}</em><br>
|
<em style="font-weight: bold">{{ $t('db.youarerefusedcircuit') }}</em><br>
|
||||||
</q-banner>
|
</q-banner>
|
||||||
|
|
||||||
<CCurrencyValue
|
<CSaldo
|
||||||
:symbol="circuit.symbol"
|
:symbol="circuit.symbol"
|
||||||
:tips="t('account.saldo_tips')"
|
|
||||||
:color="circuit.color"
|
:color="circuit.color"
|
||||||
:value="account ? account.saldo : 0"
|
:saldo="saldo"
|
||||||
:label="t('account.saldo')">
|
:qtarem="account ? qtarem : 0">
|
||||||
|
</CSaldo>
|
||||||
</CCurrencyValue>
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="!userStore.IsMyCircuitByName(circuit.name) && !userStore.IsAskedCircuitByName(circuit.name) && !userStore.IsRefusedCircuitByName(circuit.name)"
|
v-if="!userStore.IsMyCircuitByName(circuit.name) && !userStore.IsAskedCircuitByName(circuit.name) && !userStore.IsRefusedCircuitByName(circuit.name)"
|
||||||
@@ -210,7 +207,7 @@
|
|||||||
>
|
>
|
||||||
</CCurrencyValue>
|
</CCurrencyValue>
|
||||||
</div>
|
</div>
|
||||||
<div class="sezioni">
|
<div class="sezioni" v-if="circuit.deperimento !== undefined">
|
||||||
<q-icon name="fas fa-battery-full"></q-icon>
|
<q-icon name="fas fa-battery-full"></q-icon>
|
||||||
{{ t('circuit.deperimento') }}: <span class="text-section">{{ circuit.deperimento ? t('dialog.yes') : t('dialog.no') }} {{ }}</span>
|
{{ t('circuit.deperimento') }}: <span class="text-section">{{ circuit.deperimento ? t('dialog.yes') : t('dialog.no') }} {{ }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -22,15 +22,18 @@ export default defineComponent({
|
|||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
||||||
const filter = ref(costanti.FIND_CIRCUIT)
|
const filter = ref(costanti.MY_CIRCUITS)
|
||||||
|
|
||||||
const isfinishLoading = computed(() => globalStore.finishLoading)
|
const isfinishLoading = computed(() => globalStore.finishLoading)
|
||||||
|
|
||||||
function mounted() {
|
function mounted() {
|
||||||
|
|
||||||
const filt_loaded = tools.getCookie(tools.COOK_SEARCH + tools.CIRCUIT_SEARCH, costanti.FIND_CIRCUIT, true)
|
if (userStore.my.profile.mycircuits.length <= 0) {
|
||||||
console.log('filt_loaded', filt_loaded)
|
filter.value = costanti.FIND_CIRCUIT
|
||||||
filter.value = filt_loaded ? filt_loaded : costanti.FIND_CIRCUIT
|
}
|
||||||
|
// const filt_loaded = tools.getCookie(tools.COOK_SEARCH + tools.CIRCUIT_SEARCH, costanti.FIND_CIRCUIT, true)
|
||||||
|
// console.log('filt_loaded', filt_loaded)
|
||||||
|
// filter.value = filt_loaded ? filt_loaded : costanti.FIND_CIRCUIT
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(() => filter.value, (newval: any, oldval) => {
|
watch(() => filter.value, (newval: any, oldval) => {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { CSkill } from '@/components/CSkill'
|
|||||||
import { CDateTime } from '@/components/CDateTime'
|
import { CDateTime } from '@/components/CDateTime'
|
||||||
import { CMyGroup } from '@/components/CMyGroup'
|
import { CMyGroup } from '@/components/CMyGroup'
|
||||||
import { CMyCircuit } from '@/components/CMyCircuit'
|
import { CMyCircuit } from '@/components/CMyCircuit'
|
||||||
|
import { CNotifAtTop } from '@src/components/CNotifAtTop'
|
||||||
import { CSendCoins } from '@/components/CSendCoins'
|
import { CSendCoins } from '@/components/CSendCoins'
|
||||||
import { CMyUser } from '@/components/CMyUser'
|
import { CMyUser } from '@/components/CMyUser'
|
||||||
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||||
@@ -32,7 +33,7 @@ export default defineComponent({
|
|||||||
name: 'myprofile',
|
name: 'myprofile',
|
||||||
components: {
|
components: {
|
||||||
CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime, CCopyBtn, CUserNonVerif, CMyFieldRec, CMyUser,
|
CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime, CCopyBtn, CUserNonVerif, CMyFieldRec, CMyUser,
|
||||||
CMyGroup, CLabel, CMyCircuit, CSendCoins
|
CMyGroup, CLabel, CMyCircuit, CSendCoins, CNotifAtTop
|
||||||
},
|
},
|
||||||
props: {},
|
props: {},
|
||||||
setup() {
|
setup() {
|
||||||
@@ -113,7 +114,6 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
|
|
||||||
function mounted() {
|
function mounted() {
|
||||||
console.log('idnotif', idnotif)
|
|
||||||
loadProfile()
|
loadProfile()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-else-if="(tools.isUserOk() || (tools.isLogged()))">
|
<div v-else-if="(tools.isUserOk() || (tools.isLogged()))">
|
||||||
<div v-if="myuser">
|
<div v-if="myuser">
|
||||||
|
<CNotifAtTop />
|
||||||
<div class="q-gutter-sm q-pa-sm q-pb-md">
|
<div class="q-gutter-sm q-pa-sm q-pb-md">
|
||||||
<div v-if="myuser && myuser.date_reg" class="fit column no-wrap justify-evenly items-center content-start">
|
<div v-if="myuser && myuser.date_reg" class="fit column no-wrap justify-evenly items-center content-start">
|
||||||
|
|
||||||
@@ -152,7 +153,6 @@
|
|||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
userStore.IsMyCircuitByUser(myuser): {{ userStore.IsMyCircuitByUser(myuser) }}
|
|
||||||
<div class="col-md-6 col-sm-6 q-ma-xs col-xs-12">
|
<div class="col-md-6 col-sm-6 q-ma-xs col-xs-12">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="userStore.IsMyCircuitByUser(myuser).length > 0 && myuser.username !== myusername()"
|
v-if="userStore.IsMyCircuitByUser(myuser).length > 0 && myuser.username !== myusername()"
|
||||||
|
|||||||
Reference in New Issue
Block a user