fix bug list circuits and transactionsenabled

This commit is contained in:
Paolo Arena
2022-09-24 20:21:29 +02:00
parent bc2080c42c
commit 201d148e31
29 changed files with 299 additions and 332 deletions

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.16" APP_VERSION="0.5.19"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13" APP_ID="13"
DIRECTORY_LOCAL="newfreeplanet" DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.16" APP_VERSION="0.5.19"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13" APP_ID="13"
DIRECTORY_LOCAL=newfreeplanet DIRECTORY_LOCAL=newfreeplanet

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.16" APP_VERSION="0.5.19"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="12" APP_ID="12"
DIRECTORY_LOCAL="newfreeplanet" DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.16" APP_VERSION="0.5.19"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13" APP_ID="13"
DIRECTORY_LOCAL="newfreeplanet" DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.16" APP_VERSION="0.5.19"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13" APP_ID="13"
DIRECTORY_LOCAL=newfreeplanet DIRECTORY_LOCAL=newfreeplanet

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.16" APP_VERSION="0.5.19"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="14" APP_ID="14"
DIRECTORY_LOCAL="newfreeplanet" DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.16" APP_VERSION="0.5.19"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="14" APP_ID="14"
DIRECTORY_LOCAL=newfreeplanet DIRECTORY_LOCAL=newfreeplanet

View File

@@ -87,32 +87,42 @@ export default defineComponent({
*/ */
watch(() => myrecfiltertoggle.value, (value: any, oldval: any) => {
if (value === tools.FILTER_MYREC) {
if (props.table === toolsext.TABMYGROUPS) {
filtercustom.value = [{
'admins': {
$elemMatch: { username: { $eq: userStore.my.username } }
},
}]
} else if (props.table === toolsext.TABCIRCUITS) {
filtercustom.value = [{
'admins': {
$elemMatch: { username: { $eq: userStore.my.username } }
},
}]
} else { function updatefilter(value: any) {
filtercustom.value = [{ userId: userStore.my._id }] if (value === tools.FILTER_MYREC) {
} if (props.table === toolsext.TABMYGROUPS) {
filtercustom.value = [{
'admins': {
$elemMatch: { username: { $eq: userStore.my.username } }
},
}]
} else if (props.table === toolsext.TABCIRCUITS) {
filtercustom.value = [{
'admins': {
$elemMatch: { username: { $eq: userStore.my.username } }
},
}]
} else if (value === tools.FILTER_MYFOLLOW) {
if (props.table === toolsext.TABMYGROUPS) {
}
} else { } else {
filtercustom.value = [] filtercustom.value = [{ userId: userStore.my._id }]
} }
} else if (value === tools.FILTER_MYFOLLOW) {
if (props.table === toolsext.TABMYGROUPS) {
}
} else {
filtercustom.value = []
}
}
watch(() => filtercustom.value, (value: any, oldval: any) => {
updatefilter(myrecfiltertoggle.value)
})
watch(() => myrecfiltertoggle.value, (value: any, oldval: any) => {
updatefilter(value)
}, },
) )

View File

@@ -1,10 +1,9 @@
import { defineComponent, ref, computed, PropType, toRef, onMounted, onBeforeUnmount } from 'vue' import { defineComponent, ref, computed, PropType, toRef, onMounted, onBeforeUnmount } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore' import { useGlobalStore } from '@store/globalStore'
import { useI18n } from '@/boot/i18n' import { useI18n } from '@/boot/i18n'
import { tools } from '@store/Modules/tools' import { tools } from '@store/Modules/tools'
import { LandingFooter, Logo } from '@components' import { LandingFooter, Logo } from '@components'
import { IMyPage } from 'model'
export default defineComponent({ export default defineComponent({
@@ -13,116 +12,23 @@ export default defineComponent({
props: {}, props: {},
setup() { setup() {
const { t } = useI18n(); const { t } = useI18n();
const $router = useRouter() const rec = ref<IMyPage | null>(null)
const visibile = ref(false)
const cardvisible = ref('hidden')
const displaycard = ref('block')
const firstClassSection = ref('fade homep-cover-img animate-fade homep-cover-img-1')
const polling: any = ref()
const slide = ref('first')
const animare = ref(0)
function initprompt() { const globalStore = useGlobalStore()
window.addEventListener('beforeinstallprompt', (event) => {
// console.log('******************************** beforeinstallprompt fired')
event.preventDefault()
// console.log('§§§§§§§§§§§§§§§§§§§§ IMPOSTA DEFERRED PROMPT !!!!!!!!!!!!!!!!! ')
// #Todo++ IMPOSTA DEFERRED PROMPT
return false
})
}
function created() {
initprompt()
animare.value = process.env.DEV ? 0 : 8000 async function created() {
}
onMounted(() => { rec.value = await globalStore.loadPage('/sostieni_il_progetto')
let primo = true
const mytime = 10000
polling.value = setInterval(() => {
firstClassSection.value = `landing_background fade homep-cover-img ${primo ? 'homep-cover-img-2' : 'homep-cover-img-1'}`
primo = !primo
// console.log('this.firstClassSection', this.firstClassSection)
}, mytime)
})
function appname() {
return t('msg.myAppName')
}
onBeforeUnmount(() => {
console.log('beforeDestroy')
clearInterval(polling.value)
})
function meta() {
return {
keywords: { name: 'keywords', content: 'Quasar website' },
// meta tags
meta: {
mykey: { name: 'mykey', content: 'Key 1' },
description: { name: 'description', content: 'Page 1' },
keywords: { name: 'keywords', content: 'Quasar website' },
equiv: { 'http-equiv': 'Content-Type', content: 'text/html; charset=UTF-8' },
},
}
}
function mystilecard() {
return {
visibility: cardvisible.value,
display: displaycard.value,
}
}
function getPermission() {
return Notification.permission
}
function NotServiceWorker() {
return (!('serviceWorker' in navigator))
}
function PagLogin() {
$router.replace('/signin')
}
function PagReg() {
$router.replace('/signup')
}
function openCreatePostModal() {
console.log('APERTO ! openCreatePostModal')
visibile.value = !visibile.value
if (visibile.value) {
displaycard.value = 'block'
cardvisible.value = 'visible'
} else {
displaycard.value = 'block'
cardvisible.value = 'hidden'
}
} }
created() created()
return { return {
t, t,
appname,
meta,
mystilecard,
getPermission,
NotServiceWorker,
PagLogin,
PagReg,
openCreatePostModal,
slide,
tools, tools,
animare, rec,
} }
}, },
}) })

View File

@@ -1,21 +1,7 @@
<template> <template>
<q-page class="text-black"> <div v-if="rec" class="landing">
<p class="feat-descr" v-html="rec.content"></p>
<div class="landing"> </div>
<section class="bg-white">
<div class=" row justify-between items-start q-col-gutter-sm">
<div class="col-12">
<div class="feature-item" style="margin-top: 0px !important;">
<div class="text-big" style="margin: 0px !important; padding: 2px !important;" v-html="t('homepage.freesostieni.title')"></div>
<p class="feat-descr" v-html="t('homepage.freesostieni.descr')"></p></div>
</div>
</div>
</section>
<LandingFooter></LandingFooter>
</div>
</q-page>
</template> </template>
<script lang="ts" src="./CFundRaising.ts"> <script lang="ts" src="./CFundRaising.ts">

View File

@@ -1039,11 +1039,6 @@ export default defineComponent({
refresh() refresh()
})*/ })*/
watch(() => props.filtercustom, (newval, oldval) => {
// console.log('myfiltercustom change')
// refresh()
})
function isFacilitatore() { function isFacilitatore() {
return userStore.isFacilitatore return userStore.isFacilitatore
} }

View File

@@ -12,6 +12,10 @@
<q-item-label><strong>{{ circuit.name }}</strong> <span v-if="circuit.subname"> ({{ circuit.subname }})</span> <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-label v-if="!circuit.transactionsEnabled" caption lines="1">
<q-icon name="fas fa-lock">
</q-icon></q-item-label>
<q-item-label lines="1"> <q-item-label lines="1">
<CSaldo <CSaldo
:account="account" :account="account"

View File

@@ -18,6 +18,7 @@
</q-item-label> </q-item-label>
<q-item-label v-if="myrec.subname" lines="1" class="text_title"> <q-item-label v-if="myrec.subname" lines="1" class="text_title">
<span>{{ myrec.subname }}</span> <span>{{ myrec.subname }}</span>
<span v-if="!myrec.transactionsEnabled"><q-icon name="fas fa-lock"></q-icon></span>
</q-item-label> </q-item-label>
<q-item-label lines="3" v-if="myrec.longdescr">{{ myrec.longdescr }}<br> <q-item-label lines="3" v-if="myrec.longdescr">{{ myrec.longdescr }}<br>
</q-item-label> </q-item-label>

View File

@@ -84,7 +84,6 @@ export default defineComponent({
} }
function mounted() { function mounted() {
initprompt()
let primo = true let primo = true
const mytime = 10000 const mytime = 10000
@@ -131,17 +130,6 @@ export default defineComponent({
} }
} }
function initprompt() {
window.addEventListener('beforeinstallprompt', function (event) {
// console.log('******************************** beforeinstallprompt fired')
event.preventDefault()
// console.log('§§§§§§§§§§§§§§§§§§§§ IMPOSTA DEFERRED PROMPT !!!!!!!!!!!!!!!!! ')
// #Todo++ IMPOSTA DEFERRED PROMPT
return false
})
}
function getPermission() { function getPermission() {
return Notification.permission return Notification.permission
} }

View File

@@ -5,11 +5,13 @@ import { useGlobalStore } from '@store/globalStore'
import { useI18n } from '@/boot/i18n' import { useI18n } from '@/boot/i18n'
import { tools } from '@store/Modules/tools' import { tools } from '@store/Modules/tools'
import { LandingFooter, Logo } from '@components' import { LandingFooter, Logo } from '@components'
import { CFundRaising } from '@/components/CFundRaising'
import { CShowContentPage } from '@/components/CShowContentPage'
export default defineComponent({ export default defineComponent({
name: 'CPresentazione', name: 'CPresentazione',
components: {Logo, LandingFooter}, components: {Logo, LandingFooter, CFundRaising, CShowContentPage},
props: {}, props: {},
setup() { setup() {
const { t } = useI18n(); const { t } = useI18n();

View File

@@ -278,14 +278,14 @@
aria-hidden="true" aria-hidden="true"
class="q-icon fas fa-street-view"> </i><h4> class="q-icon fas fa-street-view"> </i><h4>
{{ t('homepage.freeliving.title') }}</h4> {{ t('homepage.freeliving.title') }}</h4>
<p class="feat-descr" v-html="t('homepage.freeliving.descr')"></p></div> <p class="feat-descr"><CShowContentPage path="/gruppi_territoriali_testo"></CShowContentPage></p></div>
</div> </div>
<div class="col-12 col-sm-5"> <div class="col-12 col-sm-5">
<div class="feature-item"><i <div class="feature-item"><i
aria-hidden="true" aria-hidden="true"
class="q-icon fas fa-universal-access"> </i><h4> class="q-icon fas fa-universal-access"> </i><h4>
{{ t('homepage.coin.title') }}</h4> {{ t('homepage.coin.title') }}</h4>
<p class="feat-descr" v-html="t('homepage.coin.descr')"></p></div> <p class="feat-descr"><CShowContentPage path="/creditoris"></CShowContentPage></p></div>
</div> </div>
</div> </div>
</section> </section>
@@ -299,11 +299,8 @@
<p class="feat-descr" v-html="t('homepage.freecollabora.descr')"></p></div> <p class="feat-descr" v-html="t('homepage.freecollabora.descr')"></p></div>
</div> </div>
<div class="col-12 col-sm-5"> <div class="col-12 col-sm-5">
<CFundRaising></CFundRaising>
<div class="feature-item" style="margin-top: 0px !important;">
<div class="text-big" style="margin: 0px !important; padding: 2px !important;" v-html="t('homepage.freesostieni.title')"></div>
<p class="feat-descr" v-html="t('homepage.freesostieni.descr')"></p>
</div>
</div> </div>
<div class="col-12 col-sm-5"> <div class="col-12 col-sm-5">
<div class="feature-item"><i <div class="feature-item"><i

View File

@@ -0,0 +1,38 @@
import { defineComponent, ref, computed, PropType, toRef, onMounted, onBeforeUnmount } from 'vue'
import { useGlobalStore } from '@store/globalStore'
import { useI18n } from '@/boot/i18n'
import { tools } from '@store/Modules/tools'
import { LandingFooter, Logo } from '@components'
import { IMyPage } from 'model'
export default defineComponent({
name: 'CShowContentPage',
components: {Logo, LandingFooter},
props: {
path: {
type: String,
required: true,
},
},
setup(props) {
const { t } = useI18n();
const rec = ref<IMyPage | null>(null)
const globalStore = useGlobalStore()
async function created() {
rec.value = await globalStore.loadPage(props.path)
}
created()
return {
t,
tools,
rec,
}
},
})

View File

@@ -0,0 +1,12 @@
<template>
<div v-if="rec">
<div v-html="rec.content"></div>
</div>
</template>
<script lang="ts" src="./CShowContentPage.ts">
</script>
<style lang="scss" scoped>
@import './CShowContentPage.scss';
</style>

View File

@@ -0,0 +1 @@
export {default as CShowContentPage} from './CShowContentPage.vue'

View File

@@ -64,3 +64,4 @@ export * from './CNotifSettings'
export * from './CSendCoins' export * from './CSendCoins'
export * from './CCurrencyValue' export * from './CCurrencyValue'
export * from './CNotifAtTop' export * from './CNotifAtTop'
export * from './CShowContentPage'

View File

@@ -1132,3 +1132,7 @@ $heightBtn: 100%;
padding-left: 1px !important; padding-left: 1px !important;
padding-right: 1px !important; padding-right: 1px !important;
} }
.feat-descr {
font-size: 1.15rem;
}

View File

@@ -37,147 +37,150 @@
<q-btn flat round color="white" icon="close" @click="open = false"></q-btn> <q-btn flat round color="white" icon="close" @click="open = false"></q-btn>
</q-bar> </q-bar>
<CMyCircuits <div v-if="tools.isLogged()">
v-model="filter" <CMyCircuits
:finder="true" v-model="filter"
:showfinder="true" :finder="true"
> :showfinder="true"
>
<CFinder <CFinder
:table="toolsext.TABCIRCUITS" :table="toolsext.TABCIRCUITS"
:noButtAdd="true" :noButtAdd="true"
:showFilterPersonal="false" :showFilterPersonal="false"
/> />
</CMyCircuits> </CMyCircuits>
<div class="row justify-center margin_buttons q-gutter-lg"> <div class="row justify-center margin_buttons q-gutter-lg">
<q-btn-toggle <q-btn-toggle
v-model="show_all" v-model="show_all"
class="my-custom-toggle" class="my-custom-toggle"
no-caps no-caps
rounded rounded
dense dense
unelevated unelevated
toggle-color="primary" toggle-color="primary"
color="white" color="white"
text-color="primary" text-color="primary"
:options="[ :options="[
{label: t('notifs.all'), value: true}, {label: t('notifs.all'), value: true},
{label: t('notifs.notread'), value: false} {label: t('notifs.notread'), value: false}
]" ]"
/> />
</div> </div>
<div class="clBorderSperator"></div> <div class="clBorderSperator"></div>
<div class="q-ma-xs"> <div class="q-ma-xs">
<q-list bordered class="rounded-borders"> <q-list bordered class="rounded-borders">
<div v-if="num_notifs_unread === 0"> <div v-if="num_notifs_unread === 0">
<q-item> <q-item>
<q-item-label lines="1">{{ $t('notifs.nocoins') }}</q-item-label> <q-item-label lines="1">{{ $t('notifs.nocoins') }}</q-item-label>
</q-item>
</div>
<q-item clickable v-for="(notif, index) in getlasts_coins" :key="index">
<!--<q-item-section avatar>
<q-avatar>
<q-item-label lines="1">{{ getTypeDirNotif(notif) }}</q-item-label>
</q-avatar>
</q-item-section>-->
<q-item-section avatar>
<q-avatar>
<img :src="notif.myimgsender" :alt="notif.sender">
</q-avatar>
</q-item-section>
<q-item-section v-ripple>
<q-item-label lines="5" :class="(!notif.read) ? 'unread' : 'read'" @click="clickNotif(notif)">
<div v-html="getNotifText($t, notif, false)"></div>
</q-item-label>
<q-item-label caption lines="2"
v-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)">
<q-btn
dense
rounded
size="sm"
icon="fas fa-user-plus"
color="positive" :label="$t('circuit.accept')"
@click="tools.addToMyCircuits(q, notif.sender, notif.extrafield)"
/>
<q-btn
dense
rounded
size="sm"
icon="fas fa-user-minus"
color="negative" :label="$t('shared.refuse_ask')"
@click="tools.refuseReqCircuit(q, notif.sender, notif.extrafield)"
/>
</div>
</q-item-label>
<q-item-label caption lines="2"
v-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">
<q-btn
dense
rounded
size="sm"
icon="fas fa-user-plus"
color="positive" :label="$t('circuit.accept_coins')"
@click="tools.acceptCoins(q, notif.sender, notif)"
/>
<q-btn
dense
rounded
size="sm"
icon="fas fa-user-minus"
color="negative" :label="$t('circuit.refuse_coins')"
@click="tools.refuseCoins(q, notif.sender, notif)"
/>
</div>
</q-item-label>
<q-item-label caption lines="1" :class="(!notif.read) ? 'unread-date' : 'read-date'" @click="clickNotif(notif)">
{{ tools.timeAgo(notif.datenotif) }}
<!--{{ // getUsernameChatByNotif(notif) }}-->
</q-item-label>
</q-item-section>
<q-item-section side>
<q-item-label>
<q-btn dense rounded icon="fas fa-ellipsis-h">
<q-menu>
<q-list style="min-width: 150px">
<q-item clickable v-close-popup @click="notifStore.setRead(notif._id)">
<q-item-section side>
<q-icon name="fas fa-trash-alt"/>
</q-item-section>
<q-item-section>{{ $t('notifs.read') }}</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="notifStore.deleteRec(username, notif._id)">
<q-item-section side>
<q-icon name="fas fa-trash-alt"/>
</q-item-section>
<q-item-section>{{ $t('notifs.delete_notif') }}</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-item-label>
</q-item-section>
</q-item> </q-item>
</div> <q-separator/>
</q-list>
</div>
<q-item clickable v-for="(notif, index) in getlasts_coins" :key="index">
<!--<q-item-section avatar>
<q-avatar>
<q-item-label lines="1">{{ getTypeDirNotif(notif) }}</q-item-label>
</q-avatar>
</q-item-section>-->
<q-item-section avatar>
<q-avatar>
<img :src="notif.myimgsender" :alt="notif.sender">
</q-avatar>
</q-item-section>
<q-item-section v-ripple>
<q-item-label lines="5" :class="(!notif.read) ? 'unread' : 'read'" @click="clickNotif(notif)">
<div v-html="getNotifText($t, notif, false)"></div>
</q-item-label>
<q-item-label caption lines="2"
v-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)">
<q-btn
dense
rounded
size="sm"
icon="fas fa-user-plus"
color="positive" :label="$t('circuit.accept')"
@click="tools.addToMyCircuits(q, notif.sender, notif.extrafield)"
/>
<q-btn
dense
rounded
size="sm"
icon="fas fa-user-minus"
color="negative" :label="$t('shared.refuse_ask')"
@click="tools.refuseReqCircuit(q, notif.sender, notif.extrafield)"
/>
</div>
</q-item-label>
<q-item-label caption lines="2"
v-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">
<q-btn
dense
rounded
size="sm"
icon="fas fa-user-plus"
color="positive" :label="$t('circuit.accept_coins')"
@click="tools.acceptCoins(q, notif.sender, notif)"
/>
<q-btn
dense
rounded
size="sm"
icon="fas fa-user-minus"
color="negative" :label="$t('circuit.refuse_coins')"
@click="tools.refuseCoins(q, notif.sender, notif)"
/>
</div>
</q-item-label>
<q-item-label caption lines="1" :class="(!notif.read) ? 'unread-date' : 'read-date'" @click="clickNotif(notif)">
{{ tools.timeAgo(notif.datenotif) }}
<!--{{ // getUsernameChatByNotif(notif) }}-->
</q-item-label>
</q-item-section>
<q-item-section side>
<q-item-label>
<q-btn dense rounded icon="fas fa-ellipsis-h">
<q-menu>
<q-list style="min-width: 150px">
<q-item clickable v-close-popup @click="notifStore.setRead(notif._id)">
<q-item-section side>
<q-icon name="fas fa-trash-alt"/>
</q-item-section>
<q-item-section>{{ $t('notifs.read') }}</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="notifStore.deleteRec(username, notif._id)">
<q-item-section side>
<q-icon name="fas fa-trash-alt"/>
</q-item-section>
<q-item-section>{{ $t('notifs.delete_notif') }}</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-item-label>
</q-item-section>
</q-item>
<q-separator/>
</q-list>
</div> </div>
</q-drawer> </q-drawer>
</div> </div>

View File

@@ -43,7 +43,7 @@
<q-btn flat round color="white" icon="close" @click="open = false"></q-btn> <q-btn flat round color="white" icon="close" @click="open = false"></q-btn>
</q-bar> </q-bar>
<div class="row justify-center margin_buttons q-gutter-lg"> <div v-if="tools.isLogged()" class="row justify-center margin_buttons q-gutter-lg">
<q-btn-toggle <q-btn-toggle
v-model="show_all" v-model="show_all"
class="my-custom-toggle" class="my-custom-toggle"

View File

@@ -4,12 +4,13 @@ import {
defineComponent, ref, onBeforeUnmount, onMounted, defineComponent, ref, onBeforeUnmount, onMounted,
} from 'vue' } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { CFundRaising } from '@/components' import { CFundRaising } from '@/components/CFundRaising'
import { LandingFooter } from '@/components'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
export default defineComponent({ export default defineComponent({
name: 'FundRaising', name: 'FundRaising',
components: { CFundRaising }, components: { CFundRaising, LandingFooter },
setup() { setup() {
const { t } = useI18n(); const { t } = useI18n();

View File

@@ -1,5 +1,17 @@
<template> <template>
<CFundRaising></CFundRaising> <q-page class="text-black">
<section class="bg-white">
<div class=" row justify-between items-start q-col-gutter-sm">
<div class="col-12">
<div class="feature-item" style="margin-top: 0px !important;">
<CFundRaising></CFundRaising>
</div>
</div>
</div>
</section>
</q-page>
<LandingFooter></LandingFooter>
</template> </template>
<script lang="ts" src="./fundraising.ts"> <script lang="ts" src="./fundraising.ts">

View File

@@ -5898,7 +5898,7 @@ export const tools = {
admins: [], admins: [],
color: '#ff5500', color: '#ff5500',
deperimento: false, deperimento: false,
transactionsEnabled: true, transactionsEnabled: false,
symbol: 'RIS', symbol: 'RIS',
fido_scoperto_default: 100, fido_scoperto_default: 100,
qta_max_default: 200, qta_max_default: 200,

View File

@@ -85,14 +85,17 @@ export default defineComponent({
} }
async function loadCircuit() { async function loadCircuit() {
loading.value = true
// Carica il profilo di quest'utente // Carica il profilo di quest'utente
if (path.value) { if (path.value) {
circuit.value = null
users_in_circuit.value = []
await userStore.loadCircuit(path.value, idnotif.value).then(({ data, status }: {data: any, status: number}) => { await userStore.loadCircuit(path.value, idnotif.value).then(({ data, status }: {data: any, status: number}) => {
console.log('data', data) console.log('data', data)
if (data) { if (data) {
circuit.value = data.circuit
notifStore.setAsRead(idnotif.value) notifStore.setAsRead(idnotif.value)
users_in_circuit.value = data.users_in_circuit users_in_circuit.value = data.users_in_circuit
circuit.value = data.circuit
} else { } else {
circuit.value = null circuit.value = null
users_in_circuit.value = [] users_in_circuit.value = []
@@ -100,34 +103,32 @@ export default defineComponent({
mystatus.value = status mystatus.value = status
loading.value = false searchList.value = []
if (circuit.value) {
filtercustom.value = [
{
'profile.mycircuits':
{
$elemMatch: {
circuitname:
{ $eq: circuit.value.name }
}
}
},
]
}
arrfilterand.value = []
filtercustom_rich.value = []
// filtroutente.value = [{ userId: userStore.my._id }] // filtroutente.value = [{ userId: userStore.my._id }]
}) })
} }
loading.value = false
} }
async function mounted() { async function mounted() {
loading.value = true
await loadCircuit() await loadCircuit()
searchList.value = []
if (circuit.value) {
filtercustom.value = [
{
'profile.mycircuits':
{
$elemMatch: {
circuitname:
{ $eq: circuit.value.name }
}
}
},
]
}
arrfilterand.value = []
filtercustom_rich.value = []
} }
function getImgCircuit() { function getImgCircuit() {

View File

@@ -22,7 +22,7 @@
<div v-if="!tools.isLogged()"> <div v-if="!tools.isLogged()">
<CCheckIfIsLogged></CCheckIfIsLogged> <CCheckIfIsLogged></CCheckIfIsLogged>
</div> </div>
<div> <div v-if="circuit">
<div v-if="circuit.name" class="fit column no-wrap justify-evenly items-center content-start"> <div v-if="circuit.name" class="fit column no-wrap justify-evenly items-center content-start">
@@ -100,10 +100,10 @@
<q-tabs v-model="tabgrp" class="text-blue"> <q-tabs v-model="tabgrp" class="text-blue">
<q-tab :label="t('shared.info1')" name="info" icon="fas fa-info"></q-tab> <q-tab :label="t('shared.info1')" name="info" icon="fas fa-info"></q-tab>
<q-tab v-if="userStore.IsMyCircuitByName(circuit.name)" :label="t('circuit.movements')" name="mov" icon="fas fa-coins"></q-tab>
<q-tab v-if="!!circuit.note" :label="t('circuit.page')" name="page" icon="fas fa-file-word"></q-tab>
<q-tab v-if="tools.iCanShowCircuitsMember(circuit) || tools.iAmAdminCircuit(circuit.name)" <q-tab v-if="tools.iCanShowCircuitsMember(circuit) || tools.iAmAdminCircuit(circuit.name)"
:label="t('shared.subscribes')" name="members" icon="fas fa-users"></q-tab> :label="t('shared.subscribes')" name="members" icon="fas fa-users"></q-tab>
<q-tab v-if="userStore.IsMyCircuitByName(circuit.name)" :label="t('circuit.movements')" name="mov" icon="fas fa-coins"></q-tab>
<q-tab v-if="!!circuit.note" :label="t('circuit.page')" name="page" icon="fas fa-file-word"></q-tab>
</q-tabs> </q-tabs>
<q-tab-panels v-model="tabgrp" animated> <q-tab-panels v-model="tabgrp" animated>
@@ -113,7 +113,7 @@
<q-toggle v-model="tabellare" label="Tabella"></q-toggle> <q-toggle v-model="tabellare" label="Tabella"></q-toggle>
<CGridTableRec <CGridTableRec
v-if="tabellare" v-if="tabellare && !loading"
prop_mytable="movements" prop_mytable="movements"
prop_mytitle="" prop_mytitle=""
:prop_mycolumns="colmyMovementTable" :prop_mycolumns="colmyMovementTable"
@@ -145,7 +145,7 @@
</CGridTableRec> </CGridTableRec>
<CGridTableRec <CGridTableRec
v-else v-else-if="!loading"
prop_mytable="movements" prop_mytable="movements"
prop_mytitle="" prop_mytitle=""
:prop_mycolumns="colmyMovement" :prop_mycolumns="colmyMovement"
@@ -256,8 +256,11 @@
</CCurrencyValue> </CCurrencyValue>
</div> </div>
</div> </div>
<div :class="$q.screen.lt.sm ? '' : 'row'"> <div class="sezioni">
<q-icon name="fas fa-stats" class="iconcirc"></q-icon>
{{ t('circuit.stats') }}:<br> {{ t('circuit.stats') }}:<br>
</div>
<div :class="$q.screen.lt.sm ? '' : 'row'">
<div v-if="circuit.totTransato" class="sezioni"> <div v-if="circuit.totTransato" class="sezioni">
<CCurrencyValue <CCurrencyValue
:symbol="tools.getSymbolByCircuit(circuit)" :symbol="tools.getSymbolByCircuit(circuit)"
@@ -340,7 +343,7 @@
<q-tabs <q-tabs
v-show="tools.iAmAdminCircuit(circuit.name)" v-show="tools.iAmAdminCircuit(circuit.name)"
v-model="tabmembers" class="text-blue"> v-model="tabmembers" class="text-blue">
<q-tab label="Tutti" name="all" icon="fas fa-users"></q-tab> <q-tab label="Iscritti" name="all" icon="fas fa-users"></q-tab>
<q-tab v-if="tools.iAmAdminCircuit(circuit.name)" label="Richieste" name="rich" icon="fas fa-user-plus"></q-tab> <q-tab v-if="tools.iAmAdminCircuit(circuit.name)" label="Richieste" name="rich" icon="fas fa-user-plus"></q-tab>
<q-tab v-if="tools.iAmAdminCircuit(circuit.name)" label="Rifiutati" name="refused" icon="fas fa-user-minus"></q-tab> <q-tab v-if="tools.iAmAdminCircuit(circuit.name)" label="Rifiutati" name="refused" icon="fas fa-user-minus"></q-tab>
</q-tabs> </q-tabs>
@@ -351,6 +354,7 @@
<!--<q-toggle v-model="showsaldi" :label="t('movement.showsaldi')"></q-toggle>--> <!--<q-toggle v-model="showsaldi" :label="t('movement.showsaldi')"></q-toggle>-->
<CGridTableRec <CGridTableRec
v-if="!loading"
ref="tabMembri" ref="tabMembri"
prop_mytable="users" prop_mytable="users"
prop_mytitle="" prop_mytitle=""
@@ -382,6 +386,7 @@
<q-tab-panel name="rich"> <q-tab-panel name="rich">
<CGridTableRec <CGridTableRec
v-if="!loading"
prop_mytable="circuits" prop_mytable="circuits"
prop_mytitle="" prop_mytitle=""
:prop_mycolumns="colmyUserPeople" :prop_mycolumns="colmyUserPeople"