- Statistiche

- Menu e Sottomenu
- Lista ultimi Movimenti
This commit is contained in:
Surya Paolo
2024-09-26 02:14:50 +02:00
parent 4ac0acc2f3
commit 4c9e5ae991
101 changed files with 2215 additions and 9516 deletions

View File

@@ -3,6 +3,7 @@
max-width: 200px;
min-width: 120px;
padding: 1rem 1rem;
@media (max-width: 718px) {
// PER VERSIONE MOBILE
max-width: 150px;
@@ -16,6 +17,7 @@
width: 100%;
max-width: 60px;
min-width: 40px;
@media (max-width: 718px) {
// PER VERSIONE MOBILE
max-width: 50px;
@@ -28,7 +30,24 @@
.text-h5-short {
line-height: 1.25rem !important;
@media (max-width: 718px) {
line-height: 1rem !important;
}
}
.fixed-size {
width: 160px;
/* Larghezza fissa */
height: 150px;
/* Altezza fissa */
display: flex;
/* Assicura che il contenuto sia centralizzato */
flex-direction: column;
/* Impila gli elementi verticalmente */
justify-content: center;
/* Centra verticalmente */
align-items: center;
/* Centra orizzontalmente */
margin: 4px;
}

View File

@@ -12,6 +12,7 @@ export default defineComponent({
classColor: String,
colBack: String,
mystyle: String,
myclass: String,
},
components: {},
setup(props) {

View File

@@ -1,5 +1,5 @@
<template>
<q-card :class="` text-center`" :style="mystyle">
<q-card :class="myclass" :style="mystyle" class="fixed-size">
<div
:class="`column q-pa-sm text-center align-center ` + classColor"
style="align-items: center"
@@ -9,21 +9,18 @@
</div>
<q-icon :name="icon" size="xl" :class="classColor + ` elem `" />
<div>
<div>
</div>
<div></div>
</div>
<div
class="elem full-width elem-value text-h5 boldhigh"
>
<div class="elem full-width elem-value text-h5 boldhigh">
{{ mytextval }}
<q-badge
v-if="value_today > 0"
align="top"
:label="`+` + value_today + ` oggi`"
:color="colBack"
>
</q-badge>
<q-badge
v-if="value_today > 0"
align="top"
:label="`+` + value_today + ` oggi`"
:color="colBack"
>
</q-badge>
</div>
</div>
</q-card>

View File

@@ -52,6 +52,7 @@ export default defineComponent({
costanti,
slide,
autoplay,
t,
}
}
})

View File

@@ -29,7 +29,7 @@
:src="directory + '/' + selectedImage.imagefile"
:alt="selectedImage.imagefile"
/>
<q-btn color="primary" label="Close" @click="closeDialog" />
<q-btn color="primary" :label="t('dialog.close')" @click="closeDialog" />
</q-dialog>
</template>

View File

@@ -366,7 +366,7 @@ export default defineComponent({
const editOn = computed({
get: () => globalStore.editOn,
set: val => {
globalStore.editOn = val
tools.updateEditOn(val)
},
})
@@ -923,7 +923,7 @@ export default defineComponent({
objitem[item.key] = item.value
filtersearch.push(objitem)
} else if (item.arrvalue.length > 0) {
} else if (item.arrvalue && item.arrvalue.length > 0) {
const myarr = item.arrvalue.filter((value: any) => {
if (typeof value === 'number') {
@@ -1617,16 +1617,21 @@ export default defineComponent({
}
function created() {
mytable.value = props.prop_mytable
mytitle.value = props.prop_mytitle
mycolumns.value = props.prop_mycolumns
colkey.value = props.prop_colkey
pagination.value = props.prop_pagination
myvertical.value = props.vertical
// myvertical.value = tools.getCookie('myv_' + props.prop_mytable, props.vertical)
try {
mytable.value = props.prop_mytable
mytitle.value = props.prop_mytitle
mycolumns.value = props.prop_mycolumns
colkey.value = props.prop_colkey
pagination.value = props.prop_pagination
showfilter.value = props.prop_showfilter || (tools.getCookie('s_adv', '0') !== '0')
myvertical.value = props.vertical
showfilter.value = props.prop_showfilter || (tools.getCookie('s_adv', '0') !== '0')
} catch (e) {
console.error('ERRORE', e)
}
}
function mounted() {
@@ -1919,7 +1924,8 @@ export default defineComponent({
} else if (visib === '0') {
// Se da togliere, lo togli
if (colVisib.value.includes(field))
colVisib.value = colVisib.value.filter((myrec: any) => myrec !== field)
if (colVisib.value)
colVisib.value = colVisib.value.filter((myrec: any) => myrec !== field)
}
}
}

View File

@@ -121,7 +121,7 @@
:optval="fieldsTable.getKeyByTable(item.table)"
:optlab="fieldsTable.getLabelByTable(item.table)"
:options="valoriopt(item, false, false)"
:filter="item.filter"
:filter="item && item.filter ? item.filter : ''"
:filter_extra="item.filter_extra"
:useinput="
item.useinput &&
@@ -568,7 +568,10 @@
</q-infinite-scroll>
<q-table
v-else-if="
!shared_consts.VERTIC_SHOW_GRID.includes(myvertical) && !loading
!shared_consts.VERTIC_SHOW_GRID.includes(myvertical) &&
!loading &&
serverData &&
mycolumns
"
:grid="shared_consts.VERTIC_SHOW_GRID.includes(myvertical)"
:grid-header="

View File

@@ -324,7 +324,7 @@ export default defineComponent({
const editOn = computed({
get: () => globalStore.editOn,
set: val => {
globalStore.editOn = val
tools.updateEditOn(val)
},
})

View File

@@ -0,0 +1,145 @@
.prova {
color: red;
}
.q-list-header {
min-height: 12px;
padding: 5px 8px;
}
.menu-hr {
border-color: #dedede;
height: 0.5px;
}
.router-link-active {
color: #027be3;
background-color: #dadada !important;
border-right: 2px solid #027be3;
}
.list-label:first-child {
line-height: 20px;
padding: 5px;
margin: 1px;
}
.router-link-active {
color: #027be3;
background-color: #dadada !important;
border-right: 2px solid #027be3;
}
.router-link-active .item-primary {
color: #027be3;
}
.menu_freccina {
position: absolute;
right: 10px;
display: inline-block;
padding: 0 0 0 0;
-webkit-transform: rotate(-180deg);
transform: rotate(-180deg);
}
.my-menu,
.my-menu>i {
min-height: 40px;
min-width: 26px;
font-size: 1rem;
}
.my-menu-small,
.my-menu-small>i {
min-height: 40px;
min-width: 26px;
font-size: 0.75rem;
}
.isAdmin {
color: red !important;
}
.isSocioResidente {
color: darkgreen;
}
.isCalendar {}
.isManager {
color: green !important;
}
.isFacilitatore {
color: #201a80;
}
.my-menu-icon {
min-width: 2px;
font-size: 1rem;
}
.my-menu-icon>i {
min-width: 26px;
font-size: 1.25rem;
}
.clexpansion {
min-width: 0 !important;
}
.my-menu-active {
background-color: rgba(174, 189, 241, 0.71);
}
.my-menu-separat>i {
min-width: 26px;
font-size: 1rem;
}
.my-menu-icon-none>i {
display: none;
}
.clicon img,
.clicon {
font-size: 16px;
}
.q-item__section--avatar {
min-width: 30px;
}
.OLD_q-item__section--side {
padding-right: 8px;
}
.imgicon img {
font-size: 2.5rem !important;
border-radius: 8px;
}
/*
.menu-enter-active, .scale-enter {
-webkit-animation: moveFromTopFade .5s ease both;
animation: moveFromTopFade .5s ease both;
}
.menu-leave-to, .scale-leave-active {
-webkit-animation: moveToBottom .5s ease both;
animation: moveToBottom .5s ease both;
}
*/
.bigmenu {
font-size: 1.25rem;
font-weight: bold;
text-shadow: 0.0512rem 0.052rem .01rem #555;
}
.subtitle {
font-style: italic;
}

View File

@@ -0,0 +1,61 @@
import { computed, defineComponent, onMounted, PropType, ref, toRef, watch } from 'vue'
import { useI18n } from '@src/boot/i18n'
import { useUserStore } from '@store/UserStore'
import { useGlobalStore } from '@store/globalStore'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
import { fieldsTable } from '@store/Modules/fieldsTable'
import { shared_consts } from '@/common/shared_vuejs'
import { IColGridTable, IOperators } from 'model'
import { tools } from '@store/Modules/tools'
import { static_data } from '@/db/static_data'
export default defineComponent({
name: 'CMenuItem',
props: {
item: Object,
getroute: Function,
getmymenuclass: Function,
getimgiconclass: Function,
clBase: String,
mainMenu: Boolean,
level: {
type: Number,
default: 0
},
},
components: {},
setup(props, { emit }) {
const $q = useQuasar()
const { t } = useI18n()
const userStore = useUserStore()
const globalStore = useGlobalStore()
function mounted() {
// ...
}
function getmenuByPath(pathoobj: any) {
let mymenufind = null
if (tools.isObject(pathoobj)) {
mymenufind = pathoobj
} else {
mymenufind = static_data.routes.find((menu: any) => menu.path === '/' + pathoobj)
}
return mymenufind
}
onMounted(mounted)
return {
tools,
getmenuByPath,
}
}
})

View File

@@ -0,0 +1,64 @@
<template>
<div :style="{ paddingLeft: `${level * 4}px` }">
<q-separator v-if="item.isseparator" />
<q-expansion-item
v-else-if="item.routes2 || item.sottoMenu"
:content-inset-level="item.level_parent"
:header-class="getmymenuclass(item)"
:header-inset-level="item.level_parent"
:icon="item.materialIcon"
:label="tools.getLabelByItem(item)"
active-class="my-menu-active"
:expand-icon-class="item.mainMenu ? 'my-menu-separat' : ''"
:expand-icon="
item.mainMenu || item.routes2 ? 'fas fa-chevron-down' : 'none'
"
>
<c-menu-item
v-for="(childItem, childIndex) in item.routes2 || item.sottoMenu"
:key="childIndex"
:item="getmenuByPath(childItem)"
:tools="tools"
:getroute="getroute"
:getmymenuclass="getmymenuclass"
:getimgiconclass="getimgiconclass"
:clBase="clBase"
:mainMenu="item.mainMenu"
:level="level + 1"
/>
</q-expansion-item>
<q-item
v-else
clickable
:to="getroute(item)"
:content-inset-level="item.level_parent"
:header-inset-level="item.level_parent"
active-class="my-menu-active"
expand-icon="none"
>
<q-item-section thumbnail>
<q-avatar
:icon="item.materialIcon"
:size="!!item.iconsize ? item.iconsize : '2rem'"
:font-size="!!item.iconsize ? item.iconsize : '2rem'"
text-color="primary"
square
rounded
>
</q-avatar>
</q-item-section>
<q-item-section>
<span :class="item.extraclass">{{ tools.getLabelByItem(item) }}</span>
<span v-if="item.subtitle" class="subtitle">{{ item.subtitle }}</span>
</q-item-section>
</q-item>
</div>
</template>
<script lang="ts" src="./CMenuItem.ts">
</script>
<style lang="scss" scoped>
@import './CMenuItem.scss';
</style>

View File

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

View File

@@ -0,0 +1,17 @@
.myfrom {
color: green;
font-weight: bold;
}
.myto {
color: red;
font-weight: bold;
}
.circuit {
color: blue;
}
.date {
color: gray;
}

View File

@@ -0,0 +1,89 @@
import { defineComponent, ref, computed, PropType, toRef, onMounted } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useI18n } from '@/boot/i18n'
import { CMyImgUser } from '@/components/CMyImgUser'
import { CCurrencyValue } from '@/components/CCurrencyValue'
import { tools } from '@store/Modules/tools'
import { IMovQuery, IMovement } from '@src/model'
import { shared_consts } from '@src/common/shared_vuejs'
export default defineComponent({
name: 'CMovements',
components: { CMyImgUser, CCurrencyValue },
props: {
numcol: {
type: Number,
required: false,
default: 3
},
},
setup(props, { emit }) {
const userStore = useUserStore()
const $router = useRouter()
const globalStore = useGlobalStore()
const { t } = useI18n();
const datastat = ref(<any>{})
const mylist = computed(() => {
if (globalStore.datastat)
return globalStore.datastat.last_transactions
else
return []
})
async function mounted() {
}
function getFromToStr(mov: any) {
let mystr = ''
if (mov) {
mystr += mov.str
}
return mystr
}
function navigabyMov(mov: IMovQuery, from: boolean) {
let link = ''
if (from) {
if (mov.tipocontofrom === shared_consts.AccountType.USER) {
link = `/my/` + mov.userfrom.username
} else if (mov.tipocontofrom === shared_consts.AccountType.COLLECTIVE_ACCOUNT) {
link = tools.getPathByGroup(mov.groupfrom)
} else if (mov.tipocontofrom === shared_consts.AccountType.COMMUNITY_ACCOUNT) {
link = '' // mov.contocomfrom.name
}
} else {
if (mov.tipocontoto === shared_consts.AccountType.USER) {
link = `/my/` + mov.userto.username
} else if (mov.tipocontoto === shared_consts.AccountType.COLLECTIVE_ACCOUNT) {
link = tools.getPathByGroup(mov.groupto)
} else if (mov.tipocontoto === shared_consts.AccountType.COMMUNITY_ACCOUNT) {
link = ''
}
}
$router.push(link)
}
onMounted(() => {
mounted()
})
return {
userStore,
tools,
mylist,
getFromToStr,
t,
navigabyMov,
}
}
})

View File

@@ -0,0 +1,61 @@
<template>
<q-list bordered>
<q-item
v-for="mov in mylist"
:key="mov._id"
class="q-mb-sm"
clickable
v-ripple
>
<q-item-section avatar @click="navigabyMov(mov, true)">
<CMyImgUser :mov="mov" :from="true"> </CMyImgUser>
</q-item-section>
<q-item-section>
<q-item-label v-if="mov.causal">{{ mov.causal }}</q-item-label>
<q-item-label lines="1">
{{ t('movement.from') }} <span class="myfrom">{{ mov.myfrom }}</span>
</q-item-label>
<q-item-label lines="1">
{{ t('movement.to') }}
<span class="myto">{{ mov.myto }}</span></q-item-label
>
<q-item-label
caption
lines="1"
v-if="mov.circuitfrom"
class="circuit"
>{{ mov.circuitfrom.name }}</q-item-label
>
<q-item-label
caption
lines="1"
v-if="mov.transactionDate"
class="date"
>{{ tools.getstrDateTime(mov.transactionDate) }}</q-item-label
>
<q-item-label caption lines="1" style="text-align: center">
<CCurrencyValue
:symbol="mov.circuitfrom.symbol"
color="red"
v-model="mov.amount"
:small="true"
label=""
>
</CCurrencyValue
></q-item-label>
</q-item-section>
<q-item-section side @click="navigabyMov(mov, false)">
<CMyImgUser :mov="mov" :from="false"> </CMyImgUser>
</q-item-section>
</q-item>
</q-list>
</template>
<script lang="ts" src="./CMovements.ts">
</script>
<style lang="scss" scoped>
@import './CMovements.scss';
</style>

View File

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

View File

@@ -83,7 +83,7 @@ export default defineComponent({
}
function condividipag() {
const msg = self.location.host + tools.getPathByGroup(myrec.value, props.table)
const msg = self.location.host + tools.getPathByGroup(myrec.value)
return tools.copyStringToClipboard($q, msg, true)
}

View File

@@ -1,7 +1,9 @@
<template>
<div
v-if="myrec && myrec._id"
:class="$q.screen.lt.sm ? ' fulldiv ' : ' well-positioned-dialog'"
:class="
$q.screen.lt.md || nopopup ? ' fulldiv ' : ' well-positioned-dialog'
"
>
<div
:class="'items-start ' + (!isSmall ? ' q-gutter-xs full-height ' : '')"
@@ -553,14 +555,7 @@
"
class="my-card clBorderUser"
bordered
@click="
naviga(
tools.getPathByGroup(
myrec.mygrp,
shared_consts.TABLES_MYGROUPS
)
)
"
@click="naviga(tools.getPathByGroup(myrec.mygrp))"
>
<CMyGroup
:mygrp="myrec.mygrp"

View File

@@ -92,6 +92,8 @@ export default defineComponent({
const visuadd = ref(false)
const direzadd = ref(1)
const selectedClasses = ref(<any>[])
watch(() => myel.value.order, (value, oldval) => {
mounted()
})
@@ -222,6 +224,11 @@ export default defineComponent({
if (props.myelem)
newtype.value = props.myelem.type
if (myel.value.class4) {
selectedClasses.value = myel.value.class4.split(' ').filter(Boolean)
}
}
function clickOnElem() {
@@ -237,6 +244,27 @@ export default defineComponent({
modifElem()
}
function dupNewCard() {
if (!myel.value.listcards)
return
const myfindcard = myel.value.listcards[tabCard.value]
if (myfindcard) {
let mycard = { ...myfindcard }
delete mycard._id
mycard._id = objectId()
const bakcard = [...myel.value.listcards]
myel.value.listcards = []
myel.value.listcards = [...bakcard, mycard]
modifElem()
}
}
function addNewElemText() {
@@ -284,7 +312,12 @@ export default defineComponent({
if (props.myelem.listcards) {
props.myelem.listcards.forEach((rec: IMyCard) => {
if (recpass._id === rec._id) {
rec.imagefile = myval
if (myval.imagefile) {
rec.imagefile = myval.imagefile
rec.vers_img = tools.getGenerateVersionImage()
} else {
rec.imagefile = myval
}
}
})
}
@@ -292,7 +325,11 @@ export default defineComponent({
if (props.myelem.elemsText) {
props.myelem.elemsText.forEach((rec: IElemText) => {
if (recpass._id === rec._id) {
rec.text = myval
if (myval.imagefile) {
rec.text = myval.imagefile
} else {
rec.text = myval
}
}
})
}
@@ -335,6 +372,11 @@ export default defineComponent({
modifElem()
}
function updateSizeHeight(value: any) {
myel.value.heightimg = value; // Aggiorna widthimg con il nuovo valore
modifElem()
}
function toggleSize() {
emit('toggleSize', null)
}
@@ -402,6 +444,30 @@ export default defineComponent({
emit('saveElem', myelem)
}
function classiImmagineOptions() {
// Ritorna l'array delle classi, ad esempio:
return [
{ label: 'Tonda', value: 'image-circle' },
{ label: 'Sbordata', value: 'image-round-bordered' },
{ label: 'Ombrata', value: 'image-ombra' },
// Aggiungi altre classi se necessario
];
}
function updateClass4(selectedOptions: any) {
// Aggiorna selectedClasses
selectedClasses.value = selectedOptions;
if (myel.value) {
// Imposta myel.class2 come stringa
myel.value.class4 = selectedOptions.join(' '); // Converte l'array in una stringa separata da spazi
saveElem()
}
}
onMounted(mounted)
return {
@@ -449,6 +515,11 @@ export default defineComponent({
orderOptions,
addOrder,
moveElem,
updateSizeHeight,
dupNewCard,
updateClass4,
selectedClasses,
classiImmagineOptions,
}
},

View File

@@ -173,16 +173,20 @@
dense
style="width: 150px"
/>
<q-input
<q-select
label="Altezza:"
@update:model-value="modifElem"
style="width: 100px"
v-model="myel.heightimg"
emit-value
map-options
:options="generateSizeOptions()"
use-input
use-chips
@input="saveElem"
filled
dense
v-on:keyup.enter="saveElem"
>
</q-input>
@new-value="updateSizeHeight"
style="width: 150px"
/>
</div>
</q-expansion-item>
@@ -281,6 +285,42 @@
>
</CSelectAnimation>
</q-expansion-item>
<q-expansion-item
dense
dense-toggle
expand-separator
label="Banner Iniziale"
icon="fas fa-play-circle"
>
<div>Banner:</div>
<q-input
dense
label="Titolo Banner:"
@update:model-value="modifElem"
v-model="myel.titleBanner"
filled
v-on:keyup.enter="saveElem"
>
</q-input>
<q-input
dense
label="Classe Banner:"
@update:model-value="modifElem"
v-model="myel.classBanner"
filled
v-on:keyup.enter="saveElem"
>
</q-input>
<CSelectColor
v-if="enableEdit"
style="min-width: 150px"
v-model="myel.color"
@update:model-value="modifElem"
title="Colore Titolo"
>
</CSelectColor>
</q-expansion-item>
<div v-if="myel.type === shared_consts.ELEMTYPE.TEXT">
<div v-if="enableEdit">
<q-input
@@ -302,16 +342,22 @@
dense
dense-toggle
expand-separator
label="Animazione"
label="Classi per l'Immagine"
icon="fas fa-expand-alt"
>
<CSelectAnimation
v-if="enableEdit && showAnimation"
v-model="myel.anim2"
@update:model-value="modifElem"
label="Animazione Immagini"
>
</CSelectAnimation>
<q-select
label="Classi:"
v-model="selectedClasses"
emit-value
map-options
:options="classiImmagineOptions()"
use-chips
multiple
@update:model-value="updateClass4"
filled
dense
style="width: 350px"
/>
</q-expansion-item>
<div class="row">
<q-input
@@ -333,6 +379,15 @@
@click="addNewCard"
>
</q-btn>
<q-btn
rounded
dense
color="primary"
label="Scheda"
icon="fas fa-copy"
@click="dupNewCard"
>
</q-btn>
<q-tabs
v-model="tabCard"
@@ -346,7 +401,7 @@
<q-tab
v-for="(rec, ind) in myel.listcards"
:key="ind"
:name="`card` + ind"
:name="ind"
:label="`Scheda ` + (ind + 1)"
icon="fas fa-pencil-alt"
/>
@@ -356,11 +411,11 @@
<q-tab-panel
v-for="(rec, ind) in myel.listcards"
:key="ind"
:name="`card` + ind"
:name="ind"
>
<div v-if="enableEdit" class="column bordered q-ma-xs">
<q-bar class="bg-primary text-white">
Card {{ ind + 1 }}
Scheda {{ ind + 1 }}
<q-space />
<q-btn
icon="fas fa-trash-alt"
@@ -411,6 +466,17 @@
v-on:keyup.enter="saveElem"
>
</q-input>
<q-input
dense
style="min-width: 450px"
label="Link:"
class="fa-border"
@update:model-value="modifElem"
v-model="rec.link"
filled
v-on:keyup.enter="saveElem"
>
</q-input>
<CSelectColor
v-if="enableEdit"
style="min-width: 150px"
@@ -602,15 +668,20 @@
style="width: 150px"
/>
<q-input
<q-select
label="Altezza Logo:"
@update:model-value="modifElem"
v-model="myel.height"
v-model="myel.heightimg"
emit-value
map-options
:options="generateSizeOptions()"
use-input
use-chips
@input="saveElem"
filled
dense
v-on:keyup.enter="saveElem"
>
</q-input>
@new-value="updateSizeHeight"
style="width: 150px"
/>
</div>
<q-btn
@@ -869,27 +940,34 @@
>
</q-input>
<div class="col-12 col-sm-6 col-md-6 col-lg-6 col-xl-6 col-sticky">
<q-input
dense
<q-select
label="Lunghezza:"
type="number"
@update:model-value="modifElem"
debounce="1000"
v-model="myel.widthimg"
emit-value
map-options
:options="generateSizeOptions()"
use-input
use-chips
@input="saveElem"
filled
v-on:keyup.enter="saveElem"
>
</q-input>
<q-input
dense
@new-value="updateSizeWidth"
style="width: 150px"
/>
<q-select
label="Altezza:"
type="number"
@update:model-value="modifElem"
debounce="1000"
v-model="myel.heightimg"
emit-value
map-options
:options="generateSizeOptions()"
use-input
use-chips
@input="saveElem"
filled
v-on:keyup.enter="saveElem"
>
</q-input>
dense
@new-value="updateSizeHeight"
style="width: 150px"
/>
<q-input
dense
label="Link:"

View File

@@ -1,6 +1,6 @@
import {
computed,
defineComponent, onMounted, PropType, ref, toRef, watch,
defineComponent, onMounted, PropType, ref, toRef, watch, nextTick,
} from 'vue'
import { ICoordGPS, IMyCard, IMyElem, IMyPage, IOperators, ISocial } from '@src/model'
@@ -34,6 +34,7 @@ import { CMyProfileTutorial } from '@src/components/CMyProfileTutorial'
import { CSendRISTo } from '@src/components/CSendRISTo'
import { CDashboard } from '@src/components/CDashboard'
import { CDashGroup } from '@src/components/CDashGroup'
import { CMovements } from '@src/components/CMovements'
import { CCheckAppRunning } from '@src/components/CCheckAppRunning'
import { CStatusReg } from '@src/components/CStatusReg'
import { CTitleBanner } from '@src/components/CTitleBanner'
@@ -65,7 +66,7 @@ export default defineComponent({
CTitleBanner, CShareSocial, CCheckAppRunning, CRegistration,
CVisuVideoPromoAndPDF, CECommerce, CCatalogo, CAITools,
CMapComuni, CMapUsers, CMapGetCoordinates, CMapEditAddressByCoord,
CDashGroup,
CDashGroup, CMovements,
// , //CMapMarker,
},
emits: ['selElemClick'],
@@ -125,6 +126,11 @@ export default defineComponent({
const coordaddr = ref(<ICoordGPS>{ address: '', coordinates: [0, 0] })
const carouselRef = ref(<any>null)
const isAtStart = ref(true)
const isAtEnd = ref(false)
const activeIndex = ref(0)
watch(() => myel.value.order, (value, oldval) => {
mounted()
})
@@ -173,14 +179,28 @@ export default defineComponent({
disableSave.value = false
}
const checkScrollPosition = () => {
const container = carouselRef.value
if (!container || !myel.value || !myel.value.listcards) return
isAtStart.value = container.scrollLeft <= 0
isAtEnd.value = container.scrollLeft + container.clientWidth >= container.scrollWidth - 1
const cardWidth = container.scrollWidth / myel.value.listcards.length
activeIndex.value = Math.round(container.scrollLeft / cardWidth)
}
function mounted() {
//console.log('mounted elem ')
//console.log(props.myelem.type)
myel.value = props.myelem
neworder.value = props.myelem.order
if (props.myelem)
newtype.value = props.myelem.type
nextTick(() => {
checkScrollPosition()
carouselRef.value?.addEventListener('scroll', checkScrollPosition)
})
}
function clickOnElem() {
@@ -271,6 +291,10 @@ export default defineComponent({
clickshare,
isAppRunning,
coordaddr,
isAtStart,
isAtEnd,
activeIndex,
carouselRef,
}
},

View File

@@ -31,65 +31,71 @@
</div>
<div
v-if="myel.type === shared_consts.ELEMTYPE.CARD"
:class="myel.span ? '' : ''"
class="card-carousel-container"
>
<div
:class="myel.class + (editOn ? ` clEdit` : ``) + getClass()"
@click="clickOnElem"
class="card-carousel"
ref="carouselRef"
>
<div v-for="(rec, ind) in myel.listcards" :key="ind">
<q-card
:class="`my-card center_img bordered ` + myel.class3"
:style="rec.style"
<q-card
v-for="(rec, ind) in myel.listcards"
:key="ind"
:class="
`my-card-elem center_img bordered ` +
myel.class3 +
(rec.link ? ' titolo_card' : '')
"
:style="
rec.style +
`; height: ${myel.heightimg || `300px`} !important; width: ${
myel.widthimg || `300px`
} !important;`
"
@click="rec.link ? tools.openUrl(rec.link) : undefined"
>
<div
class="img-container"
:style="`height: ${
myel.heightimg.replace('px', '') * 0.7
}px; overflow: hidden;`"
>
<q-img
:class="tools.getClassAnim(myel.anim2)"
:class="tools.getClassAnim(myel.anim2) + ` ` + myel.class4"
:src="tools.getImgFileByElem(myel, rec)"
/>
<q-card-section>
<div :class="rec.size" :style="`color: ` + rec.color">
{{ rec.alt }}
</div>
<div
:class="`q-mt-sm q-mb-xs ` + tools.getClassAnim(myel.anim)"
v-html="rec.content"
></div>
<div
v-if="rec.description"
class="text-caption"
:style="`color: ` + rec.colorsub"
>
{{ rec.description }}
</div>
</q-card-section>
<!--<q-card-actions>
<q-btn flat color="dark" label="Share"/>
<q-btn flat color="primary" label="Book"/>
<q-space/>
<q-btn
color="grey"
round
flat
dense
:icon="expanded ? 'keyboard_arrow_up' : 'keyboard_arrow_down'"
@click="expanded = !expanded"
/>
</q-card-actions>-->
<!--<q-slide-transition>
<div v-show="expanded">
<q-separator />
<q-card-section class="text-subtitle2">
</q-card-section>
</div>
</q-slide-transition>
-->
</q-card>
</div>
<q-card-section>
<div :class="rec.size" :style="`color: ` + rec.color">
{{ tools.getText(rec.alt) }}
</div>
<div
:class="`q-mt-sm q-mb-xs ` + tools.getClassAnim(myel.anim)"
v-html="rec.content"
></div>
<div
v-if="rec.description"
class="text-caption"
:style="`color: ` + rec.colorsub"
>
{{ rec.description }}
</div>
</q-card-section>
</q-card>
</div>
<div class="swipe-indicator left" v-if="!isAtStart">
<q-icon name="chevron_left" size="2rem" color="white" />
</div>
<div class="swipe-indicator right" v-if="!isAtEnd">
<q-icon name="chevron_right" size="2rem" color="white" />
</div>
<div class="scroll-indicator">
<div
v-for="(_, index) in myel.listcards"
:key="index"
:class="['dot', { active: index === activeIndex }]"
></div>
</div>
</div>
@@ -468,6 +474,10 @@
<div v-if="editOn" class="elemEdit">CDashGroup</div>
<CDashGroup></CDashGroup>
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.MOVEMENTS">
<div v-if="editOn" class="elemEdit">Lista Movimenti</div>
<CMovements></CMovements>
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CSENDRISTO">
<div v-if="editOn" class="elemEdit">CSendRISTo</div>
<CSendRISTo></CSendRISTo>

View File

@@ -1,12 +1,8 @@
<template>
<div v-if="tools.isUserOk()">
<div v-if="grp">
<q-item class="q-my-sm" clickable>
<q-item-section
avatar
@click="naviga(tools.getPathByGroup(grp, table))"
>
<q-item-section avatar @click="naviga(tools.getPathByGroup(grp))">
<q-avatar size="60px">
<q-img
:src="getImgGroup(grp)"
@@ -17,7 +13,7 @@
</q-avatar>
</q-item-section>
<q-item-section @click="naviga(tools.getPathByGroup(grp, table))">
<q-item-section @click="naviga(tools.getPathByGroup(grp))">
<q-item-label
><strong>{{ grp.title }}</strong> ({{ grp.groupname }})
</q-item-label>
@@ -33,7 +29,6 @@
:saldo="grp.account.saldo"
>
</CSaldo>
</q-item-label>
</q-item-section>

View File

@@ -2,10 +2,7 @@
<div v-if="tools.isUserOk()">
<div v-if="grp">
<q-item class="q-my-sm" clickable>
<q-item-section
avatar
@click="naviga(tools.getPathByGroup(grp, table))"
>
<q-item-section avatar @click="naviga(tools.getPathByGroup(grp))">
<q-item-label v-if="labelextra"
><strong>{{ labelextra }}</strong></q-item-label
>
@@ -19,7 +16,7 @@
</q-avatar>
</q-item-section>
<q-item-section @click="naviga(tools.getPathByGroup(grp, table))">
<q-item-section @click="naviga(tools.getPathByGroup(grp))">
<q-item-label
><strong>{{ grp.title }}</strong> ({{ grp.groupname }})
</q-item-label>

View File

@@ -0,0 +1,4 @@
.myflex{
display: flex;
flex: 1;
}

View File

@@ -0,0 +1,100 @@
import { defineComponent, onMounted, PropType, ref, watch } from 'vue'
import { useUserStore } from '@store/UserStore'
import { ICircuit, IImgGallery, IMovQuery, IUserFields, IUserProfile } from 'model'
import { costanti } from '@costanti'
import { shared_consts } from '@/common/shared_vuejs'
import { tools } from '@store/Modules/tools'
import { useQuasar } from 'quasar'
import { CSendCoins } from '@/components/CSendCoins'
import { CSaldo } from '@/components/CSaldo'
import { CUserInfoAccount } from '@/components/CUserInfoAccount'
import { useI18n } from '@/boot/i18n'
import { useRoute, useRouter } from 'vue-router'
import { useCircuitStore } from '@store/CircuitStore'
export default defineComponent({
name: 'CMyImgUser',
components: { CSendCoins, CSaldo, CUserInfoAccount },
emits: ['setCmd', 'showInnerDialog'],
props: {
mycontact: {
type: Object as PropType<IUserFields | null>,
required: false,
default: null,
},
mov: {
type: Object as PropType<IMovQuery | null>,
required: false,
default: null,
},
from: {
type: Boolean,
required: false,
default: false,
},
myusername: {
type: String,
required: false,
default: null,
},
groupname: {
type: String,
required: false,
default: '',
},
},
setup(props, { emit }) {
const userStore = useUserStore()
const $q = useQuasar()
const { t } = useI18n()
const $router = useRouter()
const $route = useRoute()
const showsendCoinTo = ref(false)
const showAccountInfo = ref(false)
const contact = ref(<IUserFields | null>null)
const circuit = ref(<ICircuit | null | undefined>null)
watch(() => props.mycontact, (newval, oldval) => {
mounted()
})
function mounted() {
if (props.mycontact) {
contact.value = props.mycontact
}
}
function getImgUser(profile: IUserFields) {
return userStore.getImgByProfile(profile)
}
function getImgUserMov(tipoconto: number, from: boolean) {
return userStore.getImgByMov(props.mov!, tipoconto, from, true)
}
function naviga(path: string) {
$router.push(path)
}
onMounted(mounted)
return {
contact,
costanti,
getImgUser,
getImgUserMov,
naviga,
shared_consts,
userStore,
tools,
circuit,
showAccountInfo,
showsendCoinTo,
}
},
})

View File

@@ -0,0 +1,22 @@
<template>
<q-avatar size="60px">
<q-img
v-if="contact || mov"
:src="
mov
? getImgUserMov(from ? mov.tipocontofrom : mov.tipocontoto, from)
: getImgUser(contact)
"
:alt="contact ? contact.username : ''"
img-class="imgprofile"
height="60px"
/>
</q-avatar>
</template>
<script lang="ts" src="./CMyImgUser.ts">
</script>
<style lang="scss" scoped>
@import './CMyImgUser.scss';
</style>

View File

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

View File

@@ -7,6 +7,7 @@ import { IMyElem, IMyPage } from '@src/model'
import { useGlobalStore } from '@store/globalStore'
import { LandingFooter } from '@/components/LandingFooter'
import { CMyElem } from '@/components/CMyElem'
import { CTitleBanner } from '@/components/CTitleBanner'
import { CMyEditElem } from '@/components/CMyEditElem'
import { CMyPageElem2 } from '@/components/CMyPageElem2'
@@ -21,7 +22,10 @@ import { useRouter } from 'vue-router'
export default defineComponent({
name: 'CMyPageElem',
components: { LandingFooter, CImgTitle, CTitle, CMyElem, CMyEditElem, CMyPageElem2 },
components: {
LandingFooter, CImgTitle, CTitle, CMyElem,
CMyEditElem, CMyPageElem2, CTitleBanner,
},
props: {
title: String,
mypath: {
@@ -73,7 +77,7 @@ export default defineComponent({
},
set(value: boolean) {
return globalStore.editOn = value
return tools.updateEditOn(value)
}
})
const visuEditor = ref(false)

View File

@@ -83,8 +83,32 @@
<div v-for="myelem in myelems" :key="myelem._id">
<div>
<transition :duration="1000" appear>
<CTitleBanner
v-if="
(myelem.active || editOn) && !!rec.path && myelem.titleBanner
"
:class="`q-pa-xs `"
:title="myelem.titleBanner"
bgcolor="bg-primary"
:clcolor="myelem.color ? `` : `text-white`"
:mystyle="
myelem.color ? `color: ${myelem.color} !important;` : ``
"
:myclass="myelem.classBanner"
:canopen="true"
>
<CMyElem
:myelem="myelem"
:editOn="editOn"
:addOn="addOn"
:path="!!rec.path ? rec.path : ''"
:selElem="selElem"
@selElemClick="selElemClick"
>
</CMyElem>
</CTitleBanner>
<CMyElem
v-if="(myelem.active || editOn) && !!rec.path"
v-else-if="(myelem.active || editOn) && !!rec.path"
:myelem="myelem"
:editOn="editOn"
:addOn="addOn"

View File

@@ -41,7 +41,9 @@
>
<q-item-label caption lines="1"></q-item-label>
<div v-if="visu === costanti.ASK_TRUST">
<span class="text-italic">Reg: {{ tools.getstrDateShort(contact.date_reg) }}</span>
<span class="text-italic"
>Reg: {{ tools.getstrDateShort(contact.date_reg) }}</span
>
</div>
<q-item-label v-if="labelFooter" lines="1"
@@ -63,7 +65,9 @@
:symbol="tools.getSymbolByCircuit(circuit)"
:color="tools.getColorByCircuit(circuit)"
:saldo="contact.account.saldo_pend"
:valueextra="contact.account.saldo_pend !== contact.account.saldo ? '*': ''"
:valueextra="
contact.account.saldo_pend !== contact.account.saldo ? '*' : ''
"
>
</CSaldo>
</div>
@@ -418,7 +422,7 @@
clickable
v-close-popup
dense
@click="naviga(`/my/` + contact.username + '?sendris=1')"
@click="naviga(`/my/` + contact.username + '?sendris=0')"
>
<q-item-section avatar>
<q-icon color="positive" name="fas fa-coins" />
@@ -807,7 +811,7 @@
clickable
v-close-popup
dense
@click="naviga(`/my/` + contact.username + '?sendris=1')"
@click="naviga(`/my/` + contact.username + '?sendris=0')"
>
<q-item-section avatar>
<q-icon color="positive" name="fas fa-coins" />

View File

@@ -92,10 +92,10 @@ export default defineComponent({
const arrTypesAccounts = ref(<any>[
{
label: t('circuit.user'),
value: costanti.AccountType.USER,
value: shared_consts.AccountType.USER,
},
])
const tipoConto = ref(costanti.AccountType.USER)
const tipoConto = ref(shared_consts.AccountType.USER)
const priceLabel = computed(() => circuitloaded.value ? `${qty.value} ` + circuitloaded.value.symbol : '')
const arrayMarkerLabel = ref(<any>[])
@@ -114,7 +114,7 @@ export default defineComponent({
watch(() => tipoConto.value, (newval, oldval) => {
if (tipoConto.value === costanti.AccountType.COLLECTIVE_ACCOUNT) {
if (tipoConto.value === shared_consts.AccountType.COLLECTIVE_ACCOUNT) {
if (arrGroupsList.value.length >= 1)
from_groupname.value = arrGroupsList.value[0].value
}
@@ -157,7 +157,7 @@ export default defineComponent({
arrTypesAccounts.value = [
{
label: t('circuit.user'),
value: costanti.AccountType.USER,
value: shared_consts.AccountType.USER,
},
]
@@ -165,13 +165,13 @@ export default defineComponent({
if (!!datasaved.value.circuit) {
circuitloaded.value = datasaved.value.circuit
if (tipoConto.value === costanti.AccountType.USER) {
if (tipoConto.value === shared_consts.AccountType.USER) {
accountloaded.value = userStore.getAccountByCircuitId(circuitloaded.value._id)
} else if (tipoConto.value === costanti.AccountType.COLLECTIVE_ACCOUNT) {
} else if (tipoConto.value === shared_consts.AccountType.COLLECTIVE_ACCOUNT) {
groupSel.value = userStore.my.profile.manage_mygroups.find((group: IMyGroup) => from_groupname.value === group.groupname)
accountloaded.value = groupSel.value ? groupSel.value.account : null
} else if (tipoConto.value === costanti.AccountType.COMMUNITY_ACCOUNT) {
} else if (tipoConto.value === shared_consts.AccountType.COMMUNITY_ACCOUNT) {
from_contocom.value = circuitloaded.value.path
accountloaded.value = circuitloaded.value ? circuitloaded.value.account : null
}
@@ -197,14 +197,14 @@ export default defineComponent({
arrTypesAccounts.value.push(
{
label: t('circuit.conticollettivi'),
value: costanti.AccountType.COLLECTIVE_ACCOUNT,
value: shared_consts.AccountType.COLLECTIVE_ACCOUNT,
})
}
if (tools.iCanSendCoinsSuperUserCircuit(circuitsel.value) && (!props.to_contocom)) {
arrTypesAccounts.value.push({
label: t('circuit.contocom'),
value: costanti.AccountType.COMMUNITY_ACCOUNT,
value: shared_consts.AccountType.COMMUNITY_ACCOUNT,
})
}
@@ -253,7 +253,7 @@ export default defineComponent({
arrTypesAccounts.value = [
{
label: t('circuit.user'),
value: costanti.AccountType.USER,
value: shared_consts.AccountType.USER,
},
]
@@ -341,8 +341,8 @@ export default defineComponent({
myrecsendcoin.groupdest = props.to_group ? props.to_group.groupname : ''
myrecsendcoin.contoComDest = props.to_contocom
myrecsendcoin.grouporig = tipoConto.value === costanti.AccountType.COLLECTIVE_ACCOUNT ? from_groupname.value : ''
myrecsendcoin.contoComOrig = tipoConto.value === costanti.AccountType.COMMUNITY_ACCOUNT ? from_contocom.value : ''
myrecsendcoin.grouporig = tipoConto.value === shared_consts.AccountType.COLLECTIVE_ACCOUNT ? from_groupname.value : ''
myrecsendcoin.contoComOrig = tipoConto.value === shared_consts.AccountType.COMMUNITY_ACCOUNT ? from_contocom.value : ''
myrecsendcoin.dest = props.to_user ? props.to_user.username : ''

View File

@@ -12,13 +12,9 @@
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
</q-bar>
<q-card-section class="q-px-xs inset-shadow">
<CCheckCircuitsEnabled
:to_user="to_user"
:to_group="to_group"
>
<CCheckCircuitsEnabled :to_user="to_user" :to_group="to_group">
</CCheckCircuitsEnabled>
<q-select
v-if="!circuitname"
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
@@ -69,14 +65,16 @@
/>
</div>
<q-input
v-if="tipoConto === costanti.AccountType.USER"
v-if="tipoConto === shared_consts.AccountType.USER"
v-model="from_username"
class="full-width"
readonly
>
</q-input>
<div
v-else-if="tipoConto === costanti.AccountType.COLLECTIVE_ACCOUNT"
v-else-if="
tipoConto === shared_consts.AccountType.COLLECTIVE_ACCOUNT
"
>
<q-select
v-model="from_groupname"
@@ -89,7 +87,11 @@
<!-- Mostra i gruppi su cui sei Admin -->
</q-select>
</div>
<div v-else-if="tipoConto === costanti.AccountType.COMMUNITY_ACCOUNT">
<div
v-else-if="
tipoConto === shared_consts.AccountType.COMMUNITY_ACCOUNT
"
>
<q-input
v-model="from_contocom"
:label="$t('circuit.contocom')"
@@ -247,16 +249,16 @@
? !(
qtyRef.hasError ||
!circuitloaded.transactionsEnabled ||
(tipoConto === costanti.AccountType.USER &&
(tipoConto === shared_consts.AccountType.USER &&
to_user &&
from_username === to_user.username) ||
(tipoConto === costanti.AccountType.COLLECTIVE_ACCOUNT &&
(tipoConto === shared_consts.AccountType.COLLECTIVE_ACCOUNT &&
!from_groupname) ||
(tipoConto === costanti.AccountType.COLLECTIVE_ACCOUT &&
(tipoConto === shared_consts.AccountType.COLLECTIVE_ACCOUT &&
to_group &&
from_groupname &&
to_group.groupname === from_groupname) ||
(tipoConto === costanti.AccountType.COMMUNITY_ACCOUNT &&
(tipoConto === shared_consts.AccountType.COMMUNITY_ACCOUNT &&
!from_contocom)
)
: true)

View File

@@ -34,7 +34,7 @@ export default defineComponent({
const usersList = ref(<any>{ show: false, title: '', list: [], listgroup: [] })
const tipoConto = ref(costanti.AccountType.USER)
const tipoConto = ref(shared_consts.AccountType.USER)
const loading = ref(false)
const circuitpath = computed(() => {
const circ = circuitStore.getCircuitByProvinceAndCard(userStore.my.profile.resid_province, userStore.my.profile.resid_card)
@@ -46,11 +46,11 @@ export default defineComponent({
const arrTypesAccounts = ref(<any>[
{
label: t('circuit.user'),
value: costanti.AccountType.USER,
value: shared_consts.AccountType.USER,
},
{
label: t('circuit.conticollettivi'),
value: costanti.AccountType.COLLECTIVE_ACCOUNT,
value: shared_consts.AccountType.COLLECTIVE_ACCOUNT,
}
])

View File

@@ -75,7 +75,7 @@
:options="arrTypesAccounts"
/>
<div v-if="tipoConto === costanti.AccountType.USER">
<div v-if="tipoConto === shared_consts.AccountType.USER">
<div v-for="(rec, i) in usersList.list" :key="i">
<CMyUser
:mycontact="rec"
@@ -86,7 +86,9 @@
</div>
</div>
<div
v-else-if="tipoConto === costanti.AccountType.COLLECTIVE_ACCOUNT"
v-else-if="
tipoConto === shared_consts.AccountType.COLLECTIVE_ACCOUNT
"
>
<div v-for="(grp, i) in usersList.listgroup" :key="i">
<CMyGroup :mygrp="grp" :visu="costanti.USER_GROUPS" :noaut="true">

View File

@@ -113,7 +113,7 @@ export default defineComponent({
tools.checkApp()
if ($q.screen.lt.sm) {
globalStore.setleftDrawerOpen(false)
// globalStore.setleftDrawerOpen(false)
}
if (riscode === tools.OK) {
if (userStore.isLogged) {

View File

@@ -1,3 +1,9 @@
.index_diffusore {
font-size: 1rem;
}
.flex-container {
display: flex;
justify-content: space-between;
/* Distribuisce gli elementi uniformemente */
}

View File

@@ -28,8 +28,10 @@ import { useRouter } from 'vue-router'
export default defineComponent({
name: 'CStatusReg',
props: {},
components: { CTitleBanner, CElemStat,
CCardState, CCardStat, CLineChart, CMyFieldRec, CTimeAgo },
components: {
CTitleBanner, CElemStat,
CCardState, CCardStat, CLineChart, CMyFieldRec, CTimeAgo
},
setup(props, { attrs, slots, emit }) {
const { t } = useI18n()
const $q = useQuasar()
@@ -52,6 +54,7 @@ export default defineComponent({
num_reg: 0,
num_reg_today: 0,
online_today: 0,
activeusers: 0,
num_passeggeri: 0,
num_imbarcati: 0,
num_teleg_attivo: 0,
@@ -66,7 +69,13 @@ export default defineComponent({
strettelist: [],
receiveRislist: [],
receiveRislistgroup: [],
checkuser: { verified_email: false }
checkuser: { verified_email: false },
num_transaz_tot: 0,
tot_RIS_transati: 0,
num_circuiti_attivi: 0,
num_circuiti: 0,
num_annunci: 0,
last_transactions: [],
})
const visustat = computed(() => {
@@ -113,7 +122,7 @@ export default defineComponent({
function checkifpolling() {
if (userStore.my.profile) {
//if (!tools.isUserOk() && tools.appid() === tools.IDAPP_RISO)
// NUMSEC_TO_POLLING.value = 10
// NUMSEC_TO_POLLING.value = 10
}
if (eseguipolling.value) {

View File

@@ -7,28 +7,78 @@
bgcolor="bg-primary"
clcolor="text-white"
mystyle=""
myclass="myshad"
myclass="sfondo_gradiente_blu myshad"
:canopen="true"
>
<div class="flex flex-center">
<CElemStat
myclass="fixed-size"
:title="$t('statusreg.reg')"
icon="fas fa-users"
:value_today="datastat.num_reg_today"
:mytextval="datastat.num_reg"
classColor="text-blue"
:mytextval="
datastat.activeusers + ' su ' + tools.numtostr(datastat.num_reg)
"
classColor="text-red"
colBack="green"
>
</CElemStat>
<CElemStat
v-if="true"
myclass="fixed-size"
:title="$t('statusreg.online_today')"
icon="fas fa-wifi"
:mytextval="datastat.online_today"
classColor="text-orange"
colBack="yellow"
>
</CElemStat>
<CElemStat
myclass="fixed-size"
v-f="datastat.num_annunci > 0"
:title="$t('statusreg.num_annunci')"
icon="fas fa-tshirt"
:value_today="0"
:mytextval="tools.numtostr(datastat.num_annunci)"
classColor="text-green"
colBack="orange"
>
</CElemStat>
<CElemStat
myclass="fixed-size"
v-f="datastat.num_circuiti_attivi > 0"
:title="$t('statusreg.num_circuiti_attivi')"
icon="fas fa-map-marker-alt"
:value_today="0"
:mytextval="
datastat.num_circuiti_attivi + ' su ' + datastat.num_circuiti
"
classColor="text-blue"
colBack="red"
>
</CElemStat>
<CElemStat
myclass="fixed-size"
v-f="datastat.num_transaz_tot > 0"
:title="$t('statusreg.numtransazioni')"
icon="fas fa-sync-alt"
:value_today="0"
:mytextval="tools.numtostr(datastat.num_transaz_tot)"
classColor="text-indigo"
colBack="green"
>
</CElemStat>
<CElemStat
myclass="fixed-size"
v-f="datastat.tot_RIS_transati > 0"
:title="$t('statusreg.totristransati')"
icon="img: images/1ris_rosso_100.png"
:value_today="0"
:mytextval="tools.numtostr(datastat.tot_RIS_transati) + ' RIS'"
classColor="text-blueviolet"
colBack="green"
>
</CElemStat>
<!--<CCardState :mytext="$t('statusreg.autorizzare')" :myval="datastat.num_autorizzare"
mycolor="yellow" :myperc="(datastat.num_autorizzare / datastat.num_teleg_attivo) * 100"></CCardState>
@@ -78,7 +128,7 @@
<q-tab-panels v-model="mytab" animated>
<q-tab-panel name="reg">
<div class="q-pa-md" style="max-width: 350px; margin: auto;">
<div class="q-pa-md" style="max-width: 350px; margin: auto">
<transition-group
name="fade"
mode="out-in"
@@ -117,7 +167,7 @@
</div>
</q-tab-panel>
<q-tab-panel name="online">
<div class="q-pa-md" style="max-width: 350px; margin: auto;">
<div class="q-pa-md" style="max-width: 350px; margin: auto">
<q-list bordered>
<transition-group
name="fade"
@@ -171,7 +221,7 @@
</div>
</q-tab-panel>
<q-tab-panel name="diffusori">
<div class="q-pa-md" style="max-width: 350px; margin: auto;">
<div class="q-pa-md" style="max-width: 350px; margin: auto">
<div class="text-center text-bold text-h6">
Aiuta RISO a crescere
</div>
@@ -234,7 +284,7 @@
</div>
</q-tab-panel>
<q-tab-panel name="strettelist">
<div class="q-pa-md" style="max-width: 350px; margin: auto;">
<div class="q-pa-md" style="max-width: 350px; margin: auto">
<div class="text-center text-bold text-h6">
Strette di Mano
</div>

View File

@@ -6,3 +6,31 @@
padding-left: 2px;
padding-right: 2px;
}
.profile-image {
width: 28px;
/* Puoi modificare la dimensione in base alle tue esigenze */
height: 28px;
/* Stesso valore per altezza */
border-radius: 50%;
/* Questo rende l'immagine rotonda */
object-fit: cover;
/* Questo mantiene le proporzioni dell'immagine */
margin-right: 8px;
/* Spazio tra l'immagine e il testo */
align-items: center;
}
.my-route-tab {
display: flex;
align-items: center;
/* Allineamento verticale */
}
.profile-label {
text-align: center;
/* Centra il testo sotto l'immagine */
font-size: 0.9rem;
/* Dimensione del testo */
}

View File

@@ -29,7 +29,8 @@ export default defineComponent({
const site = computed(() => globalStore.site)
const { getMyUsername, Username } = MixinUsers()
const { getMyUsername, Username, getMyImg } = MixinUsers()
function mounted() {
// mounted
@@ -45,6 +46,7 @@ export default defineComponent({
Username,
tools,
site,
getMyImg,
}
},

View File

@@ -1,7 +1,9 @@
<template>
<q-footer
v-if="tools.isUserOk() && site && site.confpages" :class="($q.dark.isActive
? `bg-black` : `bg-white`) + ` small-screen-only`" bordered >
v-if="tools.isUserOk() && site && site.confpages"
:class="($q.dark.isActive ? `bg-black` : `bg-white`) + ` small-screen-only`"
bordered
>
<q-toolbar>
<q-toolbar-title>
<q-tabs
@@ -77,8 +79,8 @@
v-if="site.confpages.showViewProfile"
class="mylabfooter"
:label="$t('tabdown.profile')"
:to="`/my/` + getMyUsername()"
icon="person"
@click="globalStore.rightDrawerOpen = true"
:icon="getMyImg() ? `img: ` + getMyImg() : `fas fa-user`"
/>
</q-tabs>
</q-toolbar-title>

View File

@@ -1,6 +1,6 @@
import { useQuasar } from 'quasar'
import {
defineComponent, onBeforeMount, onBeforeUnmount, onMounted, ref, toRefs, watch, inject, computed,
defineComponent, onBeforeMount, onBeforeUnmount, onMounted, ref, toRefs, watch, inject, computed, nextTick,
} from 'vue'
import { tools } from '@store/Modules/tools'
@@ -80,6 +80,8 @@ export default defineComponent({
const dark = ref(false)
const leftDrawerOpen = ref(globalStore.leftDrawerOpen)
const getClassColorHeader = computed(() => {
// if (tools.isTest()) return 'bg-light-blue'
// if (tools.isDebug()) return 'bg-info'
@@ -261,12 +263,13 @@ export default defineComponent({
globalStore.rightCoinsOpen = false
}
const leftDrawerOpen = computed({
/*const leftDrawerOpen = computed({
get: () => globalStore.leftDrawerOpen,
set: val => {
globalStore.leftDrawerOpen = val
},
})
})*/
const rightDrawerOpen = computed({
get: () => globalStore.rightDrawerOpen,
@@ -447,6 +450,7 @@ export default defineComponent({
// Test this by running the code snippet below and then
// use the "TableOnlyView" checkbox in DevTools Network panel
// console.log('Event LOAD')
if (window) {
window.addEventListener('load', () => {
@@ -470,6 +474,23 @@ export default defineComponent({
window.addEventListener('offline', updateOnlineStatus)
})
}
nextTick(() => {
if (tools.getCookie('menu3oriz') === '1') {
if ($q.screen.width < 800) {
leftDrawerOpen.value = false
// globalStore.leftDrawerOpen = false
} else {
leftDrawerOpen.value = true
globalStore.leftDrawerOpen = true
}
}
else if (tools.getCookie('menu3oriz') === '0') {
leftDrawerOpen.value = false
globalStore.leftDrawerOpen = false
}
})
}
function imglogo() {
@@ -535,6 +556,14 @@ export default defineComponent({
globalStore.changeCmdClick(value)
}
function clickMenu3Orizz() {
leftDrawerOpen.value = !leftDrawerOpen.value
globalStore.leftDrawerOpen = leftDrawerOpen.value
tools.setCookie('menu3oriz', globalStore.leftDrawerOpen ? '1' : '0')
}
onBeforeMount(BeforeMount)
onMounted(mounted)
@@ -600,6 +629,7 @@ export default defineComponent({
toHome,
products,
userStore,
clickMenu3Orizz,
}
},

View File

@@ -13,13 +13,7 @@
:inverted="$q.theme === 'ios'"
class="toolbar"
>
<q-btn
flat
dense
round
@click="leftDrawerOpen = !leftDrawerOpen"
aria-label="Menu"
>
<q-btn flat dense round @click="clickMenu3Orizz" aria-label="Menu">
<q-icon name="menu" />
</q-btn>
@@ -196,7 +190,8 @@
site.confpages &&
site.confpages.showUserMenu &&
tools.isLogged() &&
getMyImg()
getMyImg() &&
$q.screen.gt.sm
"
size="36px"
class="center_img cursor-pointer"
@@ -212,7 +207,7 @@
/>
</q-avatar>
<q-btn
v-else
v-else-if="$q.screen.gt.sm"
class="q-mx-xs iconprofile_small"
round
dense
@@ -228,7 +223,7 @@
<q-drawer
side="left"
bordered
show-if-above
:show-if-above="globalStore.leftDrawerOpen"
:breakpoint="800"
v-model="leftDrawerOpen"
:content-class="['bg-grey-1', 'q-pa-sm']"
@@ -257,7 +252,7 @@
</q-btn>
<CSelectUserActive></CSelectUserActive>
<div v-if="tools.isLogged()" class="text-weight-bold text-cart">
{{ $t('ecomm.carrello_di', { user: products.userActive.username }) }}
</div>
@@ -287,7 +282,7 @@
`text-center q-ma-xs boldhigh text-` + getColorText + ` text-h7`
"
>
Area Personale
{{ t('header.area_personale') }}
</div>
<q-avatar size="80px" class="center_img q-ma-md">
@@ -400,7 +395,7 @@
>
&nbsp;{{ t('otherpages.myactivities') }}
</q-btn>
<!--<q-btn round color="warning" icon="lock"></q-btn>-->
<q-btn
rounded
color="negative"