- Sistemato problema del Circuito ITALIA, quando veniva fatta la richiesta di entrare, ancora non si era entrati nel circuito territoriale.
- Ora pertanto viene inviata la richiesta agli admin solo dopo che l'utente viene abilitato al Circuito provinciale.
This commit is contained in:
@@ -2309,7 +2309,9 @@ export const shared_consts = {
|
||||
nome_valuta: 1,
|
||||
fido_scoperto_default: 1,
|
||||
deperimento: 1,
|
||||
showAlways: 1,
|
||||
circuitiExtraProv: 1,
|
||||
isCircItalia: 1,
|
||||
enableOnlyIf1CircuitExist: 1,
|
||||
ignoreLimits: 1,
|
||||
askManagerToEnter: 1,
|
||||
sendEmailAfterAskingToEnter: 1,
|
||||
|
||||
@@ -44,7 +44,7 @@ export default defineComponent({
|
||||
function load() {
|
||||
non_hai_circuito_nazionale.value = !circuitStore.sonoDentroAlCircuitoNazionale()
|
||||
if (props.to_user) {
|
||||
destin_non_ha_circuito_naz.value = !circuitStore.EDentroAlCircuitoNazionale(props.to_user)
|
||||
destin_non_ha_circuito_naz.value = !circuitStore.EDentroAlCircuitoItalia(props.to_user)
|
||||
if (userStore.getMyCircuitsInCommonByUser(props.to_user).length > 0) {
|
||||
destin_non_ha_circuito_naz.value = false
|
||||
}
|
||||
|
||||
@@ -254,9 +254,7 @@ export default defineComponent({
|
||||
filterextra2: {
|
||||
type: Array,
|
||||
required: false,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
default: () => [] as any[],
|
||||
},
|
||||
extraparams: {
|
||||
required: false,
|
||||
|
||||
@@ -1472,7 +1472,6 @@
|
||||
</q-field>
|
||||
</div>
|
||||
<div
|
||||
class="q-ma-sm q-pa-sm colmodif col-grow popupedit"
|
||||
@click="colclicksel = mycol"
|
||||
>
|
||||
<CMyPopupEdit
|
||||
@@ -1558,7 +1557,6 @@
|
||||
"
|
||||
>
|
||||
<div class="">
|
||||
MODIF_B: {{col.field2}}
|
||||
<CMyPopupEdit
|
||||
:table="mytable"
|
||||
:canEdit="true"
|
||||
@@ -1651,7 +1649,6 @@
|
||||
class="tdclass"
|
||||
>
|
||||
<div>
|
||||
MODIF_C: {{col.field2}}
|
||||
<CMyPopupEdit
|
||||
:table="mytable"
|
||||
:canEdit="true"
|
||||
|
||||
@@ -142,7 +142,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
if (visu === costanti.MY_CIRCUITS) {
|
||||
const arrtoinsert: any = circuitStore.listcircuits.filter((circ: any) => circ.showAlways)
|
||||
const arrtoinsert: any = circuitStore.listcircuits.filter((circ: any) => circ.isCircItalia)
|
||||
for (const rec of arrtoinsert) {
|
||||
if (arr.findIndex(myrec => myrec._id === rec._id) < 0) {
|
||||
// Se non c'è il circuito Nazionale, glielo aggiungo
|
||||
|
||||
@@ -280,7 +280,7 @@ export default defineComponent({
|
||||
checkOk: function () {
|
||||
if (circuititalia.value) {
|
||||
return ((userStore.IsMyCircuitByName(circuititalia.value.name) ||
|
||||
userStore.IsAskedCircuitByName(circuititalia.value.name))) || userStore.my.profile.noCircIta
|
||||
userStore.IsAskedCircuitByName(circuititalia.value.name))) || userStore.my.profile.noCircIta || userStore.my.profile.insert_circuito_ita
|
||||
}
|
||||
return false
|
||||
},
|
||||
|
||||
@@ -1464,7 +1464,9 @@ export interface ICircuit {
|
||||
qta_max_default_contocom?: number
|
||||
data_costituz?: Date
|
||||
deperimento: boolean
|
||||
showAlways: boolean
|
||||
circuitiExtraProv: boolean
|
||||
isCircItalia?: boolean
|
||||
enableOnlyIf1CircuitExist?: boolean
|
||||
ignoreLimits: boolean
|
||||
askManagerToEnter?: boolean
|
||||
sendEmailAfterAskingToEnter?: boolean
|
||||
|
||||
@@ -164,6 +164,7 @@ export interface IUserProfile {
|
||||
noNameSurname: boolean
|
||||
noCircuit: boolean
|
||||
noCircIta: boolean
|
||||
insert_circuito_ita?: boolean
|
||||
noFoto: boolean
|
||||
reaction: IReaction[]
|
||||
// bookmark: IBookmark[]
|
||||
|
||||
@@ -1,159 +0,0 @@
|
||||
import { defineComponent, onMounted, ref } from 'vue'
|
||||
|
||||
import { CImgText } from '../../../components/CImgText/index'
|
||||
import { CCard } from '@src/components/CCard'
|
||||
import { CMyPage } from '@src/components/CMyPage'
|
||||
import { CTitleBanner } from '@src/components/CTitleBanner'
|
||||
import { CGridTableRec } from '@src/components/CGridTableRec'
|
||||
|
||||
import { colTableGestoreOrdini } from '@src/store/Modules/fieldsTable'
|
||||
import MixinMetaTags from '@src/mixins/mixin-metatags'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Gestoreordini',
|
||||
components: { CImgText, CCard, CMyPage, CTitleBanner, CGridTableRec },
|
||||
setup() {
|
||||
|
||||
const { setmeta } = MixinMetaTags()
|
||||
const filtroOrdini = ref(<any[]>[])
|
||||
const idGasordine = ref(null)
|
||||
|
||||
function mounted() {
|
||||
let queryord = []
|
||||
|
||||
filtroOrdini.value = []
|
||||
|
||||
if (idGasordine.value) {
|
||||
const gasordine = {
|
||||
$match: {
|
||||
idGasordine: idGasordine.value
|
||||
},
|
||||
}
|
||||
queryord.push(gasordine)
|
||||
}
|
||||
|
||||
|
||||
const query = [
|
||||
{
|
||||
$lookup: {
|
||||
from: 'products',
|
||||
localField: 'idProduct',
|
||||
foreignField: '_id',
|
||||
as: 'product',
|
||||
},
|
||||
},
|
||||
{
|
||||
$unwind: {
|
||||
path: '$product',
|
||||
preserveNullAndEmptyArrays: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
$unwind: {
|
||||
path: '$productInfo',
|
||||
},
|
||||
},
|
||||
{
|
||||
$lookup: {
|
||||
from: 'gasordines',
|
||||
localField: 'idGasordine',
|
||||
foreignField: '_id',
|
||||
as: 'gasordine',
|
||||
},
|
||||
},
|
||||
{
|
||||
$unwind: {
|
||||
path: '$gasordine',
|
||||
preserveNullAndEmptyArrays: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
$match: {
|
||||
$or: [
|
||||
{
|
||||
'gasordine.active': true,
|
||||
},
|
||||
{
|
||||
gasordine: {
|
||||
$exists: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
$match: {
|
||||
$or: [
|
||||
{
|
||||
quantity: {
|
||||
$gt: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
quantitypreordered: {
|
||||
$gt: 0,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
$group: {
|
||||
_id: '$product._id',
|
||||
name: {
|
||||
$first: '$product.productInfo.name',
|
||||
},
|
||||
weight: {
|
||||
$first: '$product.productInfo.weight',
|
||||
},
|
||||
price_acquistato: {
|
||||
$first: '$product.price_acquistato',
|
||||
},
|
||||
totalQuantity: {
|
||||
$sum: {
|
||||
$add: [
|
||||
'$quantity',
|
||||
'$quantitypreordered',
|
||||
],
|
||||
},
|
||||
},
|
||||
totalPrice_acquistato: {
|
||||
$sum: {
|
||||
$multiply: [
|
||||
'$product.price_acquistato',
|
||||
{
|
||||
$add: [
|
||||
'$quantity',
|
||||
'$quantitypreordered',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
count: {
|
||||
$sum: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
$sort: {
|
||||
name: 1,
|
||||
},
|
||||
}
|
||||
]
|
||||
|
||||
queryord.push(query)
|
||||
|
||||
filtroOrdini.value = queryord
|
||||
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
colTableGestoreOrdini,
|
||||
setmeta,
|
||||
filtroOrdini,
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -1,28 +0,0 @@
|
||||
<template>
|
||||
<CMyPage :title="t('mypages.totaliordini')" imgbackground="/images/prodotti.jpg" sizes="max-height: 120px">
|
||||
<span>{{
|
||||
setmeta({
|
||||
title: t('mypages.totaliordini'),
|
||||
description: '',
|
||||
keywords: '',
|
||||
})
|
||||
}}
|
||||
</span>
|
||||
|
||||
|
||||
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||
<CTitleBanner :title="t('mypages.totaliordini')"></CTitleBanner>
|
||||
<CGridTableRec prop_mytable="orders" :prop_mytitle="t('mypages.totaliordini')" :prop_mycolumns="colTableGestoreOrdini"
|
||||
:filtercustom="filtroOrdini" prop_colkey="name" nodataLabel="Nessun Totale Ordine"
|
||||
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
|
||||
|
||||
</CGridTableRec>
|
||||
</div>
|
||||
</CMyPage>
|
||||
</template>
|
||||
<script lang="ts" src="./gestoreordini.ts">
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import 'gestoreordini.scss';
|
||||
</style>
|
||||
@@ -1550,7 +1550,9 @@ const msg_it = {
|
||||
qta_max_default_tips_contocom: 'Rappresenta quanto credito ti è concesso accumulare al Conto Comunitario. Incentiviamo così a frequenti scambi tra i partecipanti',
|
||||
data_costituz: 'Data Costituzione',
|
||||
deperimento: 'Deperimento',
|
||||
showAlways: 'Mostra Sempre',
|
||||
circuitiExtraProv: 'Circuito Extra Provinciale (Nazionale o altri)',
|
||||
isCircItalia: 'Circuito Italia',
|
||||
enableOnlyIf1CircuitExist: 'Abilita solo se l\'Utente è stato ammesso ad un Circuito Territoriale',
|
||||
freq_deper: 'Frequenza Deperimento',
|
||||
minuto_deper: 'Minuto Dep.',
|
||||
ora_deper: 'Ora Dep.',
|
||||
|
||||
@@ -59,7 +59,7 @@ export const useCircuitStore = defineStore('CircuitStore', {
|
||||
sonoDentroAlCircuitoNazionale() {
|
||||
const userStore = useUserStore()
|
||||
|
||||
const circNazionali: any = this.listcircuits.filter((circ: any) => circ.showAlways)
|
||||
const circNazionali: any = this.listcircuits.filter((circ: any) => circ.isCircItalia)
|
||||
|
||||
for (const circ of circNazionali) {
|
||||
const trovato = userStore.my.profile.mycircuits.findIndex((mycirc: any) => mycirc.circuitname === circ.name) >= 0
|
||||
@@ -74,7 +74,7 @@ export const useCircuitStore = defineStore('CircuitStore', {
|
||||
|
||||
getCircuitoNazionale(arrCircuiti: any): any {
|
||||
|
||||
const circNazionali: any = this.listcircuits.filter((circ: any) => circ.showAlways)
|
||||
const circNazionali: any = this.listcircuits.filter((circ: any) => circ.isCircItalia)
|
||||
|
||||
for (const circ of circNazionali) {
|
||||
const reccirc = arrCircuiti.find((mycirc: any) => mycirc.circuitname === circ.name)
|
||||
@@ -87,9 +87,9 @@ export const useCircuitStore = defineStore('CircuitStore', {
|
||||
|
||||
},
|
||||
|
||||
EDentroAlCircuitoNazionale(user: IUserFields) {
|
||||
EDentroAlCircuitoItalia(user: IUserFields) {
|
||||
|
||||
const circNazionali: any = this.listcircuits.filter((circ: any) => circ.showAlways)
|
||||
const circNazionali: any = this.listcircuits.filter((circ: any) => circ.isCircItalia)
|
||||
|
||||
if (user && user.profile && user.profile.mycircuits && user.profile.mycircuits.length > 0) {
|
||||
for (const circ of circNazionali) {
|
||||
@@ -105,12 +105,12 @@ export const useCircuitStore = defineStore('CircuitStore', {
|
||||
},
|
||||
|
||||
isCircuitNational(circuitname: string): boolean {
|
||||
return this.listcircuits.findIndex((rec: ICircuit) => rec.name === circuitname && rec.showAlways) >= 0
|
||||
return this.listcircuits.findIndex((rec: ICircuit) => rec.name === circuitname && rec.isCircItalia) >= 0
|
||||
},
|
||||
|
||||
getCircuitsNational(): any[] {
|
||||
const userStore = useUserStore()
|
||||
let arrcircnaz = this.listcircuits.filter((rec: ICircuit) => rec.showAlways)
|
||||
let arrcircnaz = this.listcircuits.filter((rec: ICircuit) => rec.isCircItalia)
|
||||
|
||||
for (const circ of arrcircnaz) {
|
||||
if (userStore.my.profile.useraccounts)
|
||||
@@ -145,7 +145,7 @@ export const useCircuitStore = defineStore('CircuitStore', {
|
||||
|
||||
for (const account of accountsConFido) {
|
||||
const mycircuit = this.listcircuits.find((circ: ICircuit) => circ._id === account.circuitId)
|
||||
if (mycircuit && !mycircuit.showAlways) {
|
||||
if (mycircuit && !mycircuit.circuitiExtraProv) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -162,7 +162,7 @@ export const useCircuitStore = defineStore('CircuitStore', {
|
||||
|
||||
for (const account of accountsConFido) {
|
||||
const mycircuit = this.listcircuits.find((circ: ICircuit) => circ._id === account.circuitId)
|
||||
if (mycircuit && !mycircuit.showAlways) {
|
||||
if (mycircuit && !mycircuit.circuitiExtraProv) {
|
||||
return mycircuit
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6387,8 +6387,20 @@ export const colTableCircuitComplete = [
|
||||
fieldtype: costanti.FieldType.boolean,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'showAlways',
|
||||
label_trans: 'circuit.showAlways',
|
||||
name: 'circuitiExtraProv',
|
||||
label_trans: 'circuit.circuitiExtraProv',
|
||||
fieldtype: costanti.FieldType.boolean,
|
||||
onlyforAdmin: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'isCircItalia',
|
||||
label_trans: 'circuit.isCircItalia',
|
||||
fieldtype: costanti.FieldType.boolean,
|
||||
onlyforAdmin: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'enableOnlyIf1CircuitExist',
|
||||
label_trans: 'circuit.enableOnlyIf1CircuitExist',
|
||||
fieldtype: costanti.FieldType.boolean,
|
||||
onlyforAdmin: true,
|
||||
}),
|
||||
@@ -6688,8 +6700,20 @@ export const colTableCircuit = [
|
||||
disable: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'showAlways',
|
||||
label_trans: 'circuit.showAlways',
|
||||
name: 'circuitiExtraProv',
|
||||
label_trans: 'circuit.circuitiExtraProv',
|
||||
fieldtype: costanti.FieldType.boolean,
|
||||
onlyforAdmin: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'isCircItalia',
|
||||
label_trans: 'circuit.isCircItalia',
|
||||
fieldtype: costanti.FieldType.boolean,
|
||||
onlyforAdmin: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'enableOnlyIf1CircuitExist',
|
||||
label_trans: 'circuit.enableOnlyIf1CircuitExist',
|
||||
fieldtype: costanti.FieldType.boolean,
|
||||
onlyforAdmin: true,
|
||||
}),
|
||||
|
||||
@@ -8219,7 +8219,8 @@ export const tools = {
|
||||
admins: [],
|
||||
color: '#ff5500',
|
||||
deperimento: false,
|
||||
showAlways: false,
|
||||
circuitiExtraProv: false,
|
||||
isCircItalia: false,
|
||||
transactionsEnabled: false,
|
||||
status: shared_consts.CIRCUIT_STATUS.FASE1_CREAZIONE_GRUPPO,
|
||||
symbol: 'RIS',
|
||||
|
||||
@@ -113,6 +113,7 @@ export const DefaultUser: IUserFields = {
|
||||
noNameSurname: false,
|
||||
noCircuit: false,
|
||||
noCircIta: false,
|
||||
insert_circuito_ita: false,
|
||||
noFoto: false,
|
||||
asked_circuits: [],
|
||||
refused_circuits: [],
|
||||
@@ -186,6 +187,7 @@ export const DefaultProfile: IUserProfile = {
|
||||
noNameSurname: false,
|
||||
noCircuit: false,
|
||||
noCircIta: false,
|
||||
insert_circuito_ita: false,
|
||||
noFoto: false,
|
||||
asked_circuits: [],
|
||||
refused_circuits: [],
|
||||
@@ -612,15 +614,15 @@ export const useUserStore = defineStore('UserStore', {
|
||||
// controlla che il circuito sia Abilitato e Territoriale !
|
||||
for (const circuitname of arrout) {
|
||||
const circuit = circuitStore.getCircuitByName(circuitname);
|
||||
if (circuit && circuit.transactionsEnabled && !circuit.showAlways) {
|
||||
if (circuit && circuit.transactionsEnabled && !circuit.circuitiExtraProv) {
|
||||
arrfinale.push(circuitname);
|
||||
}
|
||||
}
|
||||
|
||||
// Poi aggiungi i Circuiti ITALIA
|
||||
// Poi aggiungi i Circuiti Nazionali
|
||||
for (const circuitname of arrout) {
|
||||
const circuit = circuitStore.getCircuitByName(circuitname);
|
||||
if (circuit && circuit.transactionsEnabled && circuit.showAlways) {
|
||||
if (circuit && circuit.transactionsEnabled && circuit.circuitiExtraProv) {
|
||||
arrfinale.push(circuitname);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,385 +1,412 @@
|
||||
import { CGridTableRec } from '@src/components/CGridTableRec'
|
||||
import { CMyFriends } from '@src/components/CMyFriends'
|
||||
import { CMyUser } from '@src/components/CMyUser'
|
||||
import { CTitleBanner } from '@src/components/CTitleBanner'
|
||||
import { CProfile } from '@src/components/CProfile'
|
||||
import { CCheckIfIsLogged } from '@src/components/CCheckIfIsLogged'
|
||||
import { CMyFieldRec } from '@src/components/CMyFieldRec'
|
||||
import { CCurrencyValue } from '@src/components/CCurrencyValue'
|
||||
import { CSaldo } from '@src/components/CSaldo'
|
||||
import { CSendCoins } from '@src/components/CSendCoins'
|
||||
import { CUserNonVerif } from '@src/components/CUserNonVerif'
|
||||
import { CTitleSec } from '@src/components/CTitleSec'
|
||||
import { CSkill } from '@src/components/CSkill'
|
||||
import { CFinder } from '@src/components/CFinder'
|
||||
import { CDateTime } from '@src/components/CDateTime'
|
||||
import { tools } from '@tools'
|
||||
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { CNotifAtTop } from '@src/components/CNotifAtTop'
|
||||
import { costanti } from '@costanti'
|
||||
import { CGridTableRec } from '@src/components/CGridTableRec';
|
||||
import { CMyFriends } from '@src/components/CMyFriends';
|
||||
import { CMyUser } from '@src/components/CMyUser';
|
||||
import { CTitleBanner } from '@src/components/CTitleBanner';
|
||||
import { CProfile } from '@src/components/CProfile';
|
||||
import { CCheckIfIsLogged } from '@src/components/CCheckIfIsLogged';
|
||||
import { CMyFieldRec } from '@src/components/CMyFieldRec';
|
||||
import { CCurrencyValue } from '@src/components/CCurrencyValue';
|
||||
import { CSaldo } from '@src/components/CSaldo';
|
||||
import { CSendCoins } from '@src/components/CSendCoins';
|
||||
import { CUserNonVerif } from '@src/components/CUserNonVerif';
|
||||
import { CTitleSec } from '@src/components/CTitleSec';
|
||||
import { CSkill } from '@src/components/CSkill';
|
||||
import { CFinder } from '@src/components/CFinder';
|
||||
import { CDateTime } from '@src/components/CDateTime';
|
||||
import { tools } from '@tools';
|
||||
import { computed, defineComponent, onMounted, ref, watch } from 'vue';
|
||||
import { useUserStore } from '@store/UserStore';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useGlobalStore } from '@store/globalStore';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { toolsext } from '@store/Modules/toolsext';
|
||||
import { useQuasar } from 'quasar';
|
||||
import { CNotifAtTop } from '@src/components/CNotifAtTop';
|
||||
import { costanti } from '@costanti';
|
||||
import type { ICity, IFriends, ICircuit, ISearchList, IAccount, IMyGroup } from 'model';
|
||||
import { IUserFields } from 'model'
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
import { colmyUserPeople, colmyUserPeopleSaldi, colmyUserCircuit, colmyMovement, colmyMovementTable, colmyUserGroup } from '@store/Modules/fieldsTable'
|
||||
import { useNotifStore } from '@store/NotifStore'
|
||||
import { useCircuitStore } from '@store/CircuitStore'
|
||||
|
||||
import { IUserFields } from 'model';
|
||||
import { shared_consts } from '@src/common/shared_vuejs';
|
||||
import {
|
||||
colmyUserPeople,
|
||||
colmyUserPeopleSaldi,
|
||||
colmyUserCircuit,
|
||||
colmyMovement,
|
||||
colmyMovementTable,
|
||||
colmyUserGroup,
|
||||
} from '@store/Modules/fieldsTable';
|
||||
import { useNotifStore } from '@store/NotifStore';
|
||||
import { useCircuitStore } from '@store/CircuitStore';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'mycircuit',
|
||||
components: {
|
||||
CProfile, CTitleBanner, CMyFieldRec, CSkill, CTitleSec, CDateTime, CMyFriends,
|
||||
CGridTableRec, CMyUser, CCheckIfIsLogged, CCurrencyValue, CSaldo, CNotifAtTop,
|
||||
CSendCoins, CUserNonVerif, CFinder,
|
||||
CProfile,
|
||||
CTitleBanner,
|
||||
CMyFieldRec,
|
||||
CSkill,
|
||||
CTitleSec,
|
||||
CDateTime,
|
||||
CMyFriends,
|
||||
CGridTableRec,
|
||||
CMyUser,
|
||||
CCheckIfIsLogged,
|
||||
CCurrencyValue,
|
||||
CSaldo,
|
||||
CNotifAtTop,
|
||||
CSendCoins,
|
||||
CUserNonVerif,
|
||||
CFinder,
|
||||
},
|
||||
props: {},
|
||||
setup() {
|
||||
const userStore = useUserStore()
|
||||
const globalStore = useGlobalStore()
|
||||
const notifStore = useNotifStore()
|
||||
const circuitStore = useCircuitStore()
|
||||
const $route = useRoute()
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const userStore = useUserStore();
|
||||
const globalStore = useGlobalStore();
|
||||
const notifStore = useNotifStore();
|
||||
const circuitStore = useCircuitStore();
|
||||
const $route = useRoute();
|
||||
const $q = useQuasar();
|
||||
const { t } = useI18n();
|
||||
|
||||
const showwhommov = ref(1)
|
||||
const showwhommov = ref(1);
|
||||
const optionsmov = [
|
||||
{ label: t('movement.onlymymov'), value: 1 },
|
||||
{ label: t('movement.allmov'), value: 2 },
|
||||
]
|
||||
const tabellare = ref(false)
|
||||
const groupsListAdmin = ref(<IMyGroup[]>[])
|
||||
const groupnameSel = ref(<any>null)
|
||||
];
|
||||
const tabellare = ref(false);
|
||||
const groupsListAdmin = ref(<IMyGroup[]>[]);
|
||||
const groupnameSel = ref(<any>null);
|
||||
|
||||
const showsendCoinTo = ref(false)
|
||||
const showrules = ref(false)
|
||||
const showMov = ref(false)
|
||||
const showsendCoinTo = ref(false);
|
||||
const showrules = ref(false);
|
||||
const showMov = ref(false);
|
||||
|
||||
const animation = ref('fade')
|
||||
const animation = ref('fade');
|
||||
|
||||
const path = computed(() => $route.params.path ? $route.params.path.toString() : '')
|
||||
const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '')
|
||||
const path = computed(() =>
|
||||
$route.params.path ? $route.params.path.toString() : ''
|
||||
);
|
||||
const idnotif = computed(() =>
|
||||
$route.query.idnotif ? $route.query.idnotif.toString() : ''
|
||||
);
|
||||
|
||||
const circuitpath_loaded = ref('')
|
||||
const circuitpath_loaded = ref('');
|
||||
|
||||
const filtroutente = ref([] as any[])
|
||||
const showPic = ref(false)
|
||||
const loadSaldo = ref(false)
|
||||
const filtroutente = ref([] as any[]);
|
||||
const showPic = ref(false);
|
||||
const loadSaldo = ref(false);
|
||||
|
||||
const card = ref(<any>{})
|
||||
const card = ref(<any>{});
|
||||
|
||||
const circuit = ref(<ICircuit | undefined>undefined)
|
||||
const account = ref(<IAccount | null>null)
|
||||
const mystatus = ref(0 as number)
|
||||
const users_in_circuit = ref([] as IFriends[])
|
||||
const circuit = ref(<ICircuit | undefined>undefined);
|
||||
const account = ref(<IAccount | null>null);
|
||||
const mystatus = ref(0 as number);
|
||||
const users_in_circuit = ref([] as IFriends[]);
|
||||
|
||||
const qtarem = ref(0)
|
||||
const saldo = ref(0)
|
||||
const saldo_pend = ref(0)
|
||||
const qtarem = ref(0);
|
||||
const saldo = ref(0);
|
||||
const saldo_pend = ref(0);
|
||||
|
||||
const loading = ref(false)
|
||||
const requestToEnterCircuit = ref(false)
|
||||
const loading = ref(false);
|
||||
const requestToEnterCircuit = ref(false);
|
||||
|
||||
const tabcircuit = ref('info')
|
||||
const tabmembers = ref('all')
|
||||
const showsaldi = ref(false)
|
||||
const tab = ref('membri')
|
||||
const tabcircuit = ref('info');
|
||||
const tabmembers = ref('all');
|
||||
const showsaldi = ref(false);
|
||||
const tab = ref('membri');
|
||||
|
||||
const arrfilterand: any = ref([])
|
||||
const filterextra: any = ref([])
|
||||
const filterextra_group: any = ref([])
|
||||
const filterextra2: any = ref([])
|
||||
const filtercustom: any = ref([])
|
||||
const filtercustom_rich: any = ref([])
|
||||
const searchList = ref([] as ISearchList[])
|
||||
const arrfilterand: any = ref([]);
|
||||
const filterextra: any = ref([]);
|
||||
const filterextra_group: any = ref([]);
|
||||
const filterextra2: any = ref([]);
|
||||
const filtercustom: any = ref([]);
|
||||
const filtercustom_rich: any = ref([]);
|
||||
const searchList = ref([] as ISearchList[]);
|
||||
|
||||
const cities = ref([] as ICity[])
|
||||
const cities = ref([] as ICity[]);
|
||||
|
||||
const fidoConcesso = ref(<any>0)
|
||||
const qtaMax = ref(<any>0)
|
||||
const fidoConcesso = ref(<any>0);
|
||||
const qtaMax = ref(<any>0);
|
||||
|
||||
const mycards_annunci = computed(() => {
|
||||
return costanti.MAINCARDS.filter((rec: any) => rec.table && rec.annuncio)
|
||||
})
|
||||
return costanti.MAINCARDS.filter((rec: any) => rec.table && rec.annuncio);
|
||||
});
|
||||
|
||||
watch(() => path.value, (to: any, from: any) => {
|
||||
if (circuitpath_loaded.value !== path.value)
|
||||
loadCircuit()
|
||||
})
|
||||
|
||||
watch(() => tabcircuit.value, (to: any, from: any) => {
|
||||
tools.setCookie(tools.COOK_TAB_CIRCUIT + path.value, tabcircuit.value)
|
||||
})
|
||||
|
||||
watch(() => circuit.value, (to: any, from: any) => {
|
||||
if (to) {
|
||||
loadAccount()
|
||||
watch(
|
||||
() => path.value,
|
||||
(to: any, from: any) => {
|
||||
if (circuitpath_loaded.value !== path.value) loadCircuit();
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
watch(
|
||||
() => tabcircuit.value,
|
||||
(to: any, from: any) => {
|
||||
tools.setCookie(tools.COOK_TAB_CIRCUIT + path.value, tabcircuit.value);
|
||||
}
|
||||
);
|
||||
|
||||
watch(
|
||||
() => circuit.value,
|
||||
(to: any, from: any) => {
|
||||
if (to) {
|
||||
loadAccount();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
function getParamCircuitsToView() {
|
||||
return {
|
||||
'circuit.name': 1,
|
||||
'circuit._id': 1,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function loadAccount() {
|
||||
// console.log('loadAccount')
|
||||
account.value = circuit.value ? userStore.getAccountByCircuitId(circuit.value._id) : null
|
||||
account.value = circuit.value
|
||||
? userStore.getAccountByCircuitId(circuit.value._id)
|
||||
: null;
|
||||
// console.log('saldo', account.value!.saldo)
|
||||
|
||||
fidoConcesso.value = account.value ? account.value.fidoConcesso : (circuit.value ? circuit.value.fido_scoperto_default : 0)
|
||||
qtaMax.value = account.value ? account.value.qta_maxConcessa : (circuit.value ? circuit.value.qta_max_default : 0)
|
||||
qtarem.value = account.value ? circuitStore.getRemainingCoinsToSend(account.value) : 0
|
||||
saldo.value = account.value ? account.value.saldo : 0
|
||||
saldo_pend.value = account.value ? account.value.saldo_pend : 0
|
||||
fidoConcesso.value = account.value
|
||||
? account.value.fidoConcesso
|
||||
: circuit.value
|
||||
? circuit.value.fido_scoperto_default
|
||||
: 0;
|
||||
qtaMax.value = account.value
|
||||
? account.value.qta_maxConcessa
|
||||
: circuit.value
|
||||
? circuit.value.qta_max_default
|
||||
: 0;
|
||||
qtarem.value = account.value
|
||||
? circuitStore.getRemainingCoinsToSend(account.value)
|
||||
: 0;
|
||||
saldo.value = account.value ? account.value.saldo : 0;
|
||||
saldo_pend.value = account.value ? account.value.saldo_pend : 0;
|
||||
}
|
||||
|
||||
|
||||
function profile() {
|
||||
return userStore.my.profile
|
||||
return userStore.my.profile;
|
||||
}
|
||||
|
||||
async function loadCircuit() {
|
||||
console.log(' *** INIZIO loadCircuit')
|
||||
console.log(' *** INIZIO loadCircuit');
|
||||
|
||||
if (!loading.value) {
|
||||
loading.value = true
|
||||
loading.value = true;
|
||||
// Carica il profilo di quest'utente
|
||||
if (path.value) {
|
||||
circuitpath_loaded.value = path.value
|
||||
circuit.value = null
|
||||
users_in_circuit.value = []
|
||||
await userStore.loadCircuit(path.value, idnotif.value).then(({ data, status }: { data: any, status: number }) => {
|
||||
// console.log('data', data)
|
||||
if (data) {
|
||||
notifStore.setAsRead(idnotif.value)
|
||||
users_in_circuit.value = data.users_in_circuit
|
||||
circuit.value = data.circuit
|
||||
circuitpath_loaded.value = path.value;
|
||||
circuit.value = null;
|
||||
users_in_circuit.value = [];
|
||||
await userStore
|
||||
.loadCircuit(path.value, idnotif.value)
|
||||
.then(({ data, status }: { data: any; status: number }) => {
|
||||
// console.log('data', data)
|
||||
if (data) {
|
||||
notifStore.setAsRead(idnotif.value);
|
||||
users_in_circuit.value = data.users_in_circuit;
|
||||
circuit.value = data.circuit;
|
||||
|
||||
if (circuit.value!.circuitoIndipendente) {
|
||||
showrules.value = true
|
||||
if (circuit.value!.circuitoIndipendente) {
|
||||
showrules.value = true;
|
||||
}
|
||||
} else {
|
||||
circuit.value = null;
|
||||
users_in_circuit.value = [];
|
||||
}
|
||||
} else {
|
||||
circuit.value = null
|
||||
users_in_circuit.value = []
|
||||
}
|
||||
|
||||
loadAccount()
|
||||
loadAccount();
|
||||
|
||||
mystatus.value = status
|
||||
mystatus.value = status;
|
||||
|
||||
searchList.value = []
|
||||
if (circuit.value) {
|
||||
const addquerysingle = [
|
||||
searchList.value = [];
|
||||
if (circuit.value) {
|
||||
const addquerysingle = [];
|
||||
|
||||
];
|
||||
|
||||
filterextra.value = [{
|
||||
$match: {
|
||||
idapp: tools.getEnv('VITE_APP_ID'),
|
||||
'profile.mycircuits': {
|
||||
$elemMatch: { circuitname: { $eq: circuit.value.name } },
|
||||
filterextra.value = [
|
||||
{
|
||||
$match: {
|
||||
idapp: tools.getEnv('VITE_APP_ID'),
|
||||
'profile.mycircuits': {
|
||||
$elemMatch: { circuitname: { $eq: circuit.value.name } },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
$lookup: {
|
||||
from: 'circuits',
|
||||
as: 'circuit',
|
||||
let: { circuitname: circuit.value.name, idapp: '$idapp' },
|
||||
pipeline: [
|
||||
{
|
||||
$match:
|
||||
{
|
||||
$expr:
|
||||
{
|
||||
$lookup: {
|
||||
from: 'circuits',
|
||||
as: 'circuit',
|
||||
let: { circuitname: circuit.value.name, idapp: '$idapp' },
|
||||
pipeline: [
|
||||
{
|
||||
$and:
|
||||
[
|
||||
{ $eq: ['$name', '$$circuitname'] },
|
||||
{ $eq: ['$idapp', '$$idapp'] },
|
||||
|
||||
],
|
||||
$match: {
|
||||
$expr: {
|
||||
$and: [
|
||||
{ $eq: ['$name', '$$circuitname'] },
|
||||
{ $eq: ['$idapp', '$$idapp'] },
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{ $unwind: '$circuit' },
|
||||
{
|
||||
$project: {
|
||||
username: 1,
|
||||
verified_by_aportador: 1,
|
||||
name: 1,
|
||||
surname: 1,
|
||||
date_reg: 1,
|
||||
profile: 1,
|
||||
idapp: 1,
|
||||
...getParamCircuitsToView(),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
},
|
||||
{ $unwind: '$circuit' },
|
||||
{
|
||||
$project: {
|
||||
username: 1,
|
||||
verified_by_aportador: 1,
|
||||
name: 1,
|
||||
surname: 1,
|
||||
date_reg: 1,
|
||||
profile: 1,
|
||||
idapp: 1,
|
||||
...getParamCircuitsToView(),
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
$lookup: {
|
||||
from: 'accounts',
|
||||
as: 'account',
|
||||
let: { username: '$username', idapp: '$idapp', circuitId: '$circuit._id' },
|
||||
pipeline: [
|
||||
{
|
||||
$match:
|
||||
{
|
||||
$expr:
|
||||
{
|
||||
$and:
|
||||
[
|
||||
{ $eq: ['$$username', '$username'] },
|
||||
{ $eq: ['$$idapp', '$idapp'] },
|
||||
{ $eq: ['$$circuitId', '$circuitId'] },
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{ $unwind: '$account' },
|
||||
]
|
||||
|
||||
filterextra_group.value = [{
|
||||
$match: {
|
||||
idapp: tools.getEnv('VITE_APP_ID'),
|
||||
'mycircuits': {
|
||||
$elemMatch: { circuitname: { $eq: circuit.value.name } },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
$lookup: {
|
||||
from: 'circuits',
|
||||
as: 'circuit',
|
||||
let: { circuitname: circuit.value.name, idapp: '$idapp' },
|
||||
pipeline: [
|
||||
{
|
||||
$match:
|
||||
{
|
||||
$expr:
|
||||
{
|
||||
$lookup: {
|
||||
from: 'accounts',
|
||||
as: 'account',
|
||||
let: {
|
||||
username: '$username',
|
||||
idapp: '$idapp',
|
||||
circuitId: '$circuit._id',
|
||||
},
|
||||
pipeline: [
|
||||
{
|
||||
$and:
|
||||
[
|
||||
{ $eq: ['$name', '$$circuitname'] },
|
||||
{ $eq: ['$idapp', '$$idapp'] },
|
||||
|
||||
],
|
||||
$match: {
|
||||
$expr: {
|
||||
$and: [
|
||||
{ $eq: ['$$username', '$username'] },
|
||||
{ $eq: ['$$idapp', '$idapp'] },
|
||||
{ $eq: ['$$circuitId', '$circuitId'] },
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{ $unwind: '$account' },
|
||||
];
|
||||
|
||||
filterextra_group.value = [
|
||||
{
|
||||
$match: {
|
||||
idapp: tools.getEnv('VITE_APP_ID'),
|
||||
mycircuits: {
|
||||
$elemMatch: { circuitname: { $eq: circuit.value.name } },
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
},
|
||||
{ $unwind: '$circuit' },
|
||||
{
|
||||
$project: {
|
||||
groupname: 1,
|
||||
title: 1,
|
||||
descr: 1,
|
||||
photos: 1,
|
||||
surname: 1,
|
||||
verified_by_aportador: 1,
|
||||
admins: 1,
|
||||
idapp: 1,
|
||||
...getParamCircuitsToView(),
|
||||
}
|
||||
},
|
||||
{
|
||||
$lookup: {
|
||||
from: 'accounts',
|
||||
as: 'account',
|
||||
let: { groupname: '$groupname', idapp: '$idapp', circuitId: '$circuit._id' },
|
||||
pipeline: [
|
||||
{
|
||||
$match:
|
||||
{
|
||||
$expr:
|
||||
{
|
||||
$lookup: {
|
||||
from: 'circuits',
|
||||
as: 'circuit',
|
||||
let: { circuitname: circuit.value.name, idapp: '$idapp' },
|
||||
pipeline: [
|
||||
{
|
||||
$and:
|
||||
[
|
||||
{ $eq: ['$groupname', '$$groupname'] },
|
||||
{ $eq: ['$idapp', '$$idapp'] },
|
||||
{ $eq: ['$circuitId', '$$circuitId'] },
|
||||
|
||||
],
|
||||
$match: {
|
||||
$expr: {
|
||||
$and: [
|
||||
{ $eq: ['$name', '$$circuitname'] },
|
||||
{ $eq: ['$idapp', '$$idapp'] },
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{ $unwind: '$circuit' },
|
||||
{
|
||||
$project: {
|
||||
groupname: 1,
|
||||
title: 1,
|
||||
descr: 1,
|
||||
photos: 1,
|
||||
surname: 1,
|
||||
verified_by_aportador: 1,
|
||||
admins: 1,
|
||||
idapp: 1,
|
||||
...getParamCircuitsToView(),
|
||||
},
|
||||
},
|
||||
{
|
||||
$lookup: {
|
||||
from: 'accounts',
|
||||
as: 'account',
|
||||
let: {
|
||||
groupname: '$groupname',
|
||||
idapp: '$idapp',
|
||||
circuitId: '$circuit._id',
|
||||
},
|
||||
pipeline: [
|
||||
{
|
||||
$match: {
|
||||
$expr: {
|
||||
$and: [
|
||||
{ $eq: ['$groupname', '$$groupname'] },
|
||||
{ $eq: ['$idapp', '$$idapp'] },
|
||||
{ $eq: ['$circuitId', '$$circuitId'] },
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
$unwind: '$account',
|
||||
},
|
||||
{
|
||||
$match: { 'account.groupname': { $exists: true, $ne: '' } },
|
||||
},
|
||||
];
|
||||
}
|
||||
arrfilterand.value = [];
|
||||
filtercustom_rich.value = [];
|
||||
|
||||
},
|
||||
{
|
||||
$unwind: '$account',
|
||||
},
|
||||
{
|
||||
$match: { 'account.groupname': { $exists: true, $ne: '' } }
|
||||
},
|
||||
]
|
||||
}
|
||||
arrfilterand.value = []
|
||||
filtercustom_rich.value = []
|
||||
|
||||
if (userStore.my.username && circuit.value)
|
||||
groupsListAdmin.value = userStore.GroupsListWhereIAmAdmin()
|
||||
|
||||
// filtroutente.value = [{ userId: userStore.my._id }]
|
||||
})
|
||||
if (userStore.my.username && circuit.value)
|
||||
groupsListAdmin.value = userStore.GroupsListWhereIAmAdmin();
|
||||
|
||||
// filtroutente.value = [{ userId: userStore.my._id }]
|
||||
});
|
||||
}
|
||||
loading.value = false
|
||||
console.log(' ___ FINE loadCircuit')
|
||||
loading.value = false;
|
||||
console.log(' ___ FINE loadCircuit');
|
||||
}
|
||||
}
|
||||
|
||||
function mounted() {
|
||||
tabcircuit.value = tools.getCookie(tools.COOK_TAB_CIRCUIT + path.value, 'info')
|
||||
tabcircuit.value = tools.getCookie(tools.COOK_TAB_CIRCUIT + path.value, 'info');
|
||||
|
||||
loadCircuit()
|
||||
|
||||
if (mycards_annunci.value)
|
||||
card.value = mycards_annunci.value[0]
|
||||
loadCircuit();
|
||||
|
||||
if (mycards_annunci.value) card.value = mycards_annunci.value[0];
|
||||
}
|
||||
|
||||
function getImgCircuit() {
|
||||
if (circuit.value)
|
||||
return userStore.getImgByCircuit(circuit.value)
|
||||
else
|
||||
return ''
|
||||
if (circuit.value) return userStore.getImgByCircuit(circuit.value);
|
||||
else return '';
|
||||
}
|
||||
|
||||
function checkifShow(col: string) {
|
||||
// ++Todo: checkifShow Permessi !
|
||||
return true
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function extraparams() {
|
||||
const lk_tab = 'users'
|
||||
const lk_LF = 'userId'
|
||||
const lk_FF = '_id'
|
||||
const lk_as = 'user'
|
||||
const af_objId_tab = 'myId'
|
||||
const lk_tab = 'users';
|
||||
const lk_LF = 'userId';
|
||||
const lk_FF = '_id';
|
||||
const lk_as = 'user';
|
||||
const af_objId_tab = 'myId';
|
||||
|
||||
return {
|
||||
lookup1: {
|
||||
@@ -411,17 +438,17 @@ export default defineComponent({
|
||||
username_who_report: 1,
|
||||
namecomplete: 1,
|
||||
date_reg: 1,
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function extraparams_groups() {
|
||||
const lk_tab = 'mygroups'
|
||||
const lk_LF = 'userId'
|
||||
const lk_FF = '_id'
|
||||
const lk_as = 'group'
|
||||
const af_objId_tab = 'myId'
|
||||
const lk_tab = 'mygroups';
|
||||
const lk_LF = 'userId';
|
||||
const lk_FF = '_id';
|
||||
const lk_as = 'group';
|
||||
const af_objId_tab = 'myId';
|
||||
|
||||
return {
|
||||
lookup1: {
|
||||
@@ -435,90 +462,93 @@ export default defineComponent({
|
||||
title: 1,
|
||||
descr: 1,
|
||||
photos: 1,
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function extraparams_rich() {
|
||||
return {
|
||||
querytype: shared_consts.QUERYTYPE_CIRCUIT,
|
||||
myid: circuit.value ? circuit.value._id : '',
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function extraparams_rich_groups() {
|
||||
return {
|
||||
querytype: shared_consts.QUERYTYPE_GROUP_CIRCUIT,
|
||||
myid: circuit.value ? circuit.value._id : '',
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const extraparams_movs = (() => {
|
||||
const extraparams_movs = () => {
|
||||
if (showwhommov.value === 1) {
|
||||
return {
|
||||
querytype: shared_consts.QUERYTYPE_LIST_MOVEMENTS,
|
||||
myid: circuit.value ? circuit.value._id : '',
|
||||
username: userStore.my.username,
|
||||
}
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
querytype: shared_consts.QUERYTYPE_LIST_ALLMOVEMENTS,
|
||||
myid: circuit.value ? circuit.value._id : '',
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
function extraparams_refused() {
|
||||
return {
|
||||
querytype: shared_consts.QUERYTYPE_REFUSED_USER_CIRCUIT,
|
||||
myid: circuit.value ? circuit.value._id : '',
|
||||
}
|
||||
};
|
||||
}
|
||||
function extraparams_refused_groups() {
|
||||
return {
|
||||
querytype: shared_consts.QUERYTYPE_REFUSED_GROUP_CIRCUIT,
|
||||
myid: circuit.value ? circuit.value._id : '',
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function numUsers() {
|
||||
return users_in_circuit.value ? users_in_circuit.value.length : 0
|
||||
return users_in_circuit.value ? users_in_circuit.value.length : 0;
|
||||
}
|
||||
|
||||
function numAdmins() {
|
||||
let quanti = (circuit.value && circuit.value.admins) ? circuit.value.admins.length : 0
|
||||
if (quanti === 0)
|
||||
quanti = 1
|
||||
let quanti =
|
||||
circuit.value && circuit.value.admins ? circuit.value.admins.length : 0;
|
||||
if (quanti === 0) quanti = 1;
|
||||
|
||||
return quanti
|
||||
return quanti;
|
||||
}
|
||||
|
||||
function listaAdmins() {
|
||||
return (circuit.value && circuit.value.admins) ? circuit.value.admins.map((rec) => rec.username).join(', ') : ''
|
||||
return circuit.value && circuit.value.admins
|
||||
? circuit.value.admins.map((rec) => rec.username).join(', ')
|
||||
: '';
|
||||
}
|
||||
|
||||
function getRegulation(reg: string) {
|
||||
const strreg = reg + ''
|
||||
const strreg = reg + '';
|
||||
if (!reg) {
|
||||
const mystringa = t('circuit.regolamento', { nomecircuito: circuit.value!.name })
|
||||
return mystringa
|
||||
const mystringa = t('circuit.regolamento', { nomecircuito: circuit.value!.name });
|
||||
return mystringa;
|
||||
} else {
|
||||
return reg
|
||||
return reg;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async function aggiornaSaldo() {
|
||||
loadSaldo.value = true
|
||||
loadSaldo.value = true;
|
||||
await circuitStore.aggiornaSaldo(circuit.value!._id, '');
|
||||
loadAccount()
|
||||
loadSaldo.value = false
|
||||
loadAccount();
|
||||
loadSaldo.value = false;
|
||||
}
|
||||
|
||||
function myusername() {
|
||||
return userStore.my.username;
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
onMounted(mounted);
|
||||
|
||||
return {
|
||||
profile,
|
||||
@@ -589,6 +619,7 @@ export default defineComponent({
|
||||
saldo_pend,
|
||||
mycards_annunci,
|
||||
card,
|
||||
}
|
||||
}
|
||||
})
|
||||
myusername,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -647,7 +647,7 @@
|
||||
shared_consts.GROUPSCMD.REQGROUP,
|
||||
myusername(),
|
||||
true,
|
||||
grp.groupname
|
||||
groupnameSel ? groupnameSel.groupname : ''
|
||||
)
|
||||
"
|
||||
></q-item>
|
||||
|
||||
Reference in New Issue
Block a user