- Fare LISTA MOVIMENTI più comprensibile
- Grafica Circuiti
This commit is contained in:
@@ -1160,7 +1160,7 @@ export const shared_consts = {
|
||||
|
||||
ANNUNCI_FIELDS: {
|
||||
idMyGroup: 1,
|
||||
// **ADDFIELD_MYGROUPS
|
||||
// **ADDFIELD_ANNUNCI
|
||||
},
|
||||
|
||||
OrderStatusStr: [
|
||||
|
||||
@@ -41,9 +41,11 @@ export default defineComponent({
|
||||
|
||||
function load() {
|
||||
non_hai_circuito_nazionale.value = !circuitStore.sonoDentroAlCircuitoNazionale()
|
||||
destin_non_ha_circuito_naz.value = !circuitStore.EDentroAlCircuitoNazionale(props.to_user)
|
||||
if (userStore.getMyCircuitsInCommonByUser(props.to_user).length > 0) {
|
||||
destin_non_ha_circuito_naz.value = false
|
||||
if (props.to_user) {
|
||||
destin_non_ha_circuito_naz.value = !circuitStore.EDentroAlCircuitoNazionale(props.to_user)
|
||||
if (userStore.getMyCircuitsInCommonByUser(props.to_user).length > 0) {
|
||||
destin_non_ha_circuito_naz.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
userStore.hoContiCollettiviDaAmministrare() ||
|
||||
userStore.hoContiComunitariDaAmministrare())
|
||||
"
|
||||
icon="fas fa-coins"
|
||||
icon-right="img: images/1ris_rosso_100.png"
|
||||
color="green"
|
||||
size="md"
|
||||
rounded
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
<template>
|
||||
|
||||
<div v-if="small">
|
||||
|
||||
<q-chip
|
||||
dense
|
||||
class="cltexth4 chipbooked shadow-5 q-pa-sm2"
|
||||
size="md"
|
||||
:color="modelValue > 0 ? `green` : modelValue === 0 ? `gray` : `red`"
|
||||
text-color="white"
|
||||
icon="fas fa-coins"
|
||||
>
|
||||
{{ valueextra }} {{ tools.roundDec2(modelValue) }}
|
||||
<span class="text-currency"
|
||||
@@ -18,7 +15,14 @@
|
||||
>{{ symbol }}</em
|
||||
></span
|
||||
>
|
||||
<div v-if="myrecparam && myrecparam.fidoConcesso > 0 && !paramTypeAccount">
|
||||
<q-icon
|
||||
v-if="symbol === 'RIS'"
|
||||
name="img: images/1ris_rosso_100.png"
|
||||
:size="small ? `xs` : `sm`"
|
||||
/>
|
||||
<div
|
||||
v-if="myrecparam && myrecparam.fidoConcesso > 0 && !paramTypeAccount"
|
||||
>
|
||||
<q-icon
|
||||
:color="myrecparam.fidoConcesso > 0 ? 'blue' : 'grey'"
|
||||
name="fas fa-house-user"
|
||||
@@ -31,7 +35,7 @@
|
||||
<div
|
||||
v-if="modelValue !== null"
|
||||
:class="
|
||||
`text-h5 ` +
|
||||
`text-h6 ` +
|
||||
(small ? `bordo_stondato_small` : `bordo_stondato_stretto`) +
|
||||
` full-width`
|
||||
"
|
||||
@@ -66,7 +70,7 @@
|
||||
:readonly="readonly"
|
||||
type="number"
|
||||
rounded
|
||||
:class="!small ? `q-px-sm text-h5` : `q-px-xs text-h7`"
|
||||
:class="!small ? `q-px-sm text-h6` : `q-px-xs text-h7`"
|
||||
:color="modelValue > 0 ? `green` : `red`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
@@ -80,7 +84,23 @@
|
||||
@click="showingtooltip = !showingtooltip"
|
||||
>
|
||||
</q-btn>
|
||||
<q-icon v-else name="fas fa-coins" :size="small ? `xs` : `sm`" />
|
||||
<div v-else>
|
||||
<q-btn
|
||||
v-if="
|
||||
myrecparam &&
|
||||
myrecparam.fidoConcesso >= 0 &&
|
||||
!paramTypeAccount
|
||||
"
|
||||
icon="fas fa-house-user"
|
||||
class="q-ml-sm"
|
||||
:color="myrecparam.fidoConcesso > 0 ? 'primary' : 'grey'"
|
||||
text-color="white"
|
||||
round
|
||||
size="sm"
|
||||
@click="showinghouse = !showinghouse"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:control>
|
||||
<div class="text-h8 text-blue">
|
||||
@@ -113,17 +133,12 @@
|
||||
@click="$emit('changedParamValue', true)"
|
||||
></q-btn>
|
||||
</div>
|
||||
<q-btn
|
||||
v-if="myrecparam && myrecparam.fidoConcesso >= 0 && !paramTypeAccount"
|
||||
icon="fas fa-house-user"
|
||||
class="q-ml-sm"
|
||||
:color="myrecparam.fidoConcesso > 0 ? 'primary' : 'grey'"
|
||||
text-color="white"
|
||||
round
|
||||
size="sm"
|
||||
@click="showinghouse = !showinghouse"
|
||||
>
|
||||
</q-btn>
|
||||
<q-icon
|
||||
v-if="symbol === 'RIS'"
|
||||
name="img: images/1ris_rosso_100.png"
|
||||
:size="small ? `xs` : `sm`"
|
||||
/>
|
||||
<q-icon v-else name="img: images/1ris_rosso_100.png" :size="small ? `xs` : `sm`" />
|
||||
</template>
|
||||
</q-field>
|
||||
</div>
|
||||
|
||||
@@ -264,11 +264,15 @@ export default defineComponent({
|
||||
]
|
||||
|
||||
} else if (props.table === shared_consts.TABLES_CIRCUITS) {
|
||||
myoptions.value = [
|
||||
{ label: '🌎 Tutti', value: tools.FILTER_ALL },
|
||||
{ label: '👤 Circuiti che Gestisci', value: tools.FILTER_MYREC },
|
||||
// {label: 'Seguo', value: tools.FILTER_MYFOLLOW},
|
||||
]
|
||||
myoptions.value = []
|
||||
if (tools.gestiscoAlmeno1Circuito()) {
|
||||
myoptions.value = [
|
||||
{ label: '🌎 Tutti', value: tools.FILTER_ALL },
|
||||
{ label: '👤 Circuiti che Gestisci', value: tools.FILTER_MYREC },
|
||||
// {label: 'Seguo', value: tools.FILTER_MYFOLLOW},
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
/*
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<div class="q-ma-xs q-gutter-xs">
|
||||
<div v-if="showFilterPersonal" class="text-center">
|
||||
<q-btn-toggle
|
||||
v-if="myoptions.length > 0"
|
||||
v-model="myrecfiltertoggle"
|
||||
push
|
||||
glossy
|
||||
@@ -11,31 +12,13 @@
|
||||
:options="myoptions"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="false" class="q-mr-sm">
|
||||
<q-input
|
||||
v-model="search"
|
||||
filled
|
||||
type="search"
|
||||
debounce="500"
|
||||
:hint="t('finder.search_skill')"
|
||||
v-on:keyup.enter="doSearch"
|
||||
>
|
||||
<template v-slot:after>
|
||||
<q-btn
|
||||
label=""
|
||||
color="primary"
|
||||
@click="doSearch"
|
||||
icon="search"
|
||||
></q-btn>
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
|
||||
<CGridTableRec
|
||||
ref="myGridRef"
|
||||
v-if="searchList.length > 0"
|
||||
:prop_mytable="table"
|
||||
:options="tools.optionsTable(table)"
|
||||
:prop_mytitlenew="tools.getTitleAnnuncio(table)"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="col"
|
||||
:prop_colkey="prop_colkey"
|
||||
|
||||
@@ -41,6 +41,7 @@ import translate from '@/globalroutines/util'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { CMyCardPopup } from '@/components/CMyCardPopup'
|
||||
import { CMyCardService } from '@/components/CMyCardService'
|
||||
import { CSingleMovement } from '@/components/CSingleMovement'
|
||||
import { CMyCardGrpPopup } from '@/components/CMyCardGrpPopup'
|
||||
import { CMyCardCircuitPopup } from '@/components/CMyCardCircuitPopup'
|
||||
import { onBeforeRouteLeave, onBeforeRouteUpdate, useRouter } from 'vue-router'
|
||||
@@ -60,6 +61,10 @@ export default defineComponent({
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
prop_mytitlenew: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
subtitle: {
|
||||
type: String,
|
||||
required: false,
|
||||
@@ -315,7 +320,7 @@ export default defineComponent({
|
||||
components: {
|
||||
CMyPopupEdit, CTitleBanner, CMyFieldDb, CMySelect, CMyFriends, CMyGroups,
|
||||
CMyUser, CMyRecCard, CMyCardPopup, CMyRecGrpCard, CMyCardGrpPopup, CMyCardCircuitPopup,
|
||||
CMyRecCircuitCard, CMyCardService, CNotifSettings, CMapByTable,
|
||||
CMyRecCircuitCard, CMyCardService, CNotifSettings, CMapByTable, CSingleMovement,
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
@@ -348,6 +353,7 @@ export default defineComponent({
|
||||
|
||||
const mytable = ref('')
|
||||
const mytitle = ref('')
|
||||
const mytitlenew = ref('')
|
||||
const mycolumns = ref([] as any[])
|
||||
const colkey = ref('')
|
||||
const search = ref('')
|
||||
@@ -366,7 +372,7 @@ export default defineComponent({
|
||||
const editOn = computed({
|
||||
get: () => globalStore.editOn,
|
||||
set: val => {
|
||||
tools.updateEditOn(val)
|
||||
tools.updateEditOn(val!)
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1627,6 +1633,7 @@ export default defineComponent({
|
||||
try {
|
||||
mytable.value = props.prop_mytable
|
||||
mytitle.value = props.prop_mytitle
|
||||
mytitlenew.value = props.prop_mytitlenew
|
||||
mycolumns.value = props.prop_mycolumns
|
||||
colkey.value = props.prop_colkey
|
||||
pagination.value = props.prop_pagination
|
||||
@@ -2585,6 +2592,7 @@ export default defineComponent({
|
||||
visButtRow,
|
||||
mytable,
|
||||
mytitle,
|
||||
mytitlenew,
|
||||
mycolumns,
|
||||
colkey,
|
||||
search,
|
||||
|
||||
@@ -485,7 +485,8 @@
|
||||
showType === costanti.SHOW_MOVEMENTS && tablesel === 'movements'
|
||||
"
|
||||
>
|
||||
<div class="q-pa-xs row items-start q-gutter-xs">
|
||||
<CSingleMovement :mov="row" />
|
||||
<!--<div v-if="false" class="q-pa-xs row items-start q-gutter-xs">
|
||||
<q-card class="my-card text-black">
|
||||
<q-toolbar
|
||||
class="bg-primary text-white"
|
||||
@@ -557,7 +558,7 @@
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<template v-slot:loading>
|
||||
@@ -1312,18 +1313,19 @@
|
||||
<q-dialog
|
||||
v-model="newRecordBool"
|
||||
@hide="hidewindow"
|
||||
:maximized="$q.screen.lt.sm"
|
||||
class="dialog_class"
|
||||
permanent
|
||||
:maximized="false"
|
||||
>
|
||||
<q-card class="dialog_card">
|
||||
<q-bar dense class="bg-primary text-white">
|
||||
Aggiungi {{ mytitle }}:
|
||||
{{t('dialog.insert')}} {{ mytitlenew }}:
|
||||
<q-space />
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-bar>
|
||||
<q-card-section class="inset-shadow">
|
||||
<div
|
||||
:class="$q.screen.lt.sm ? `` : `row` + ` text-blue `"
|
||||
:class="$q.screen.lt.sm ? `` : `` + ` text-blue `"
|
||||
v-for="col in mycolumns"
|
||||
:key="col.name"
|
||||
>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.myfrom {
|
||||
.userfrom {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.myto {
|
||||
.userto {
|
||||
color: green;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@@ -5,22 +5,29 @@ import { useGlobalStore } from '@store/globalStore'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
|
||||
import { CMyImgUser } from '@/components/CMyImgUser'
|
||||
import { CSingleMovement } from '@/components/CSingleMovement'
|
||||
import { CCurrencyValue } from '@/components/CCurrencyValue'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { IMovQuery, IMovement } from '@src/model'
|
||||
import { IMovQuery, IMovVisu, IMovement } from '@src/model'
|
||||
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMovements',
|
||||
components: { CMyImgUser, CCurrencyValue },
|
||||
components: { CMyImgUser, CCurrencyValue, CSingleMovement },
|
||||
props: {
|
||||
numcol: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 3
|
||||
},
|
||||
username: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
emits: ['loaded'],
|
||||
setup(props, { emit }) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
@@ -28,16 +35,60 @@ export default defineComponent({
|
||||
const globalStore = useGlobalStore()
|
||||
const { t } = useI18n();
|
||||
|
||||
const datastat = ref(<any>{})
|
||||
const numtransaz = ref(0)
|
||||
const prectransaz = ref(0)
|
||||
|
||||
const tab = ref('tutti')
|
||||
|
||||
const mylist = computed(() => {
|
||||
if (globalStore.datastat)
|
||||
return globalStore.datastat.last_transactions
|
||||
else
|
||||
if (globalStore.datastat || userStore.my.profile) {
|
||||
let arrtransaz: any = []
|
||||
if (props.username) {
|
||||
numtransaz.value = userStore.my.profile.last_my_transactions!.length
|
||||
|
||||
arrtransaz = userStore.my.profile.last_my_transactions
|
||||
} else {
|
||||
if (globalStore.datastat) {
|
||||
numtransaz.value = globalStore.datastat.last_transactions!.length
|
||||
|
||||
arrtransaz = globalStore.datastat.last_transactions
|
||||
}
|
||||
}
|
||||
|
||||
if (prectransaz.value !== numtransaz.value) {
|
||||
emit('loaded', { numtransaz: numtransaz.value })
|
||||
prectransaz.value = numtransaz.value
|
||||
}
|
||||
|
||||
return arrtransaz
|
||||
} else
|
||||
return []
|
||||
})
|
||||
|
||||
const getInviati = computed(() => {
|
||||
if (props.username && mylist.value) {
|
||||
const list = mylist.value.filter((rec: IMovVisu) => {
|
||||
return (props.username && (rec.userfrom && (rec.userfrom.username === props.username)))
|
||||
})
|
||||
return list
|
||||
}
|
||||
})
|
||||
|
||||
const getRicevuti = computed(() => {
|
||||
if (props.username && mylist.value) {
|
||||
const list = mylist.value.filter((rec: IMovVisu) => {
|
||||
return (props.username && (rec.userto && (rec.userto.username === props.username)))
|
||||
})
|
||||
return list
|
||||
}
|
||||
return []
|
||||
})
|
||||
|
||||
async function mounted() {
|
||||
numtransaz.value = 0
|
||||
prectransaz.value = 0
|
||||
|
||||
emit('loaded', { numtransaz: 0 })
|
||||
|
||||
}
|
||||
|
||||
@@ -77,13 +128,18 @@ export default defineComponent({
|
||||
mounted()
|
||||
})
|
||||
|
||||
|
||||
return {
|
||||
userStore,
|
||||
getInviati,
|
||||
getRicevuti,
|
||||
tools,
|
||||
mylist,
|
||||
getFromToStr,
|
||||
t,
|
||||
navigabyMov,
|
||||
numtransaz,
|
||||
tab,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,63 +1,74 @@
|
||||
<template>
|
||||
<q-list bordered>
|
||||
<q-item
|
||||
v-for="(mov, index) in mylist"
|
||||
:key="mov._id"
|
||||
:class="[
|
||||
'm-mb-sm',
|
||||
{
|
||||
'background-even': index % 2 === 0,
|
||||
'background-odd': index % 2 !== 0,
|
||||
},
|
||||
]"
|
||||
clickable
|
||||
v-ripple
|
||||
<div v-if="username">
|
||||
<q-tabs
|
||||
v-model="tab"
|
||||
dense
|
||||
inline-label
|
||||
class="bg-primary text-white shadow-2"
|
||||
>
|
||||
<q-item-section avatar @click="navigabyMov(mov, true)">
|
||||
<CMyImgUser :mov="mov" :from="true"> </CMyImgUser>
|
||||
</q-item-section>
|
||||
<q-tab name="tutti" label="Tutti" />
|
||||
<q-tab
|
||||
name="inviati"
|
||||
:label="t('circuit.inviati') + ' (' + getInviati.length + ')'"
|
||||
/>
|
||||
<q-tab
|
||||
name="ricevuti"
|
||||
:label="t('circuit.ricevuti') + ' (' + getRicevuti.length + ')'"
|
||||
/>
|
||||
</q-tabs>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label class="causale" 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-tab-panels v-model="tab" animated>
|
||||
<q-tab-panel name="tutti">
|
||||
<div v-if="mylist.length === 0">
|
||||
{{ t('circuit.nessun_movimento_inviato') }}
|
||||
</div>
|
||||
<c-single-movement
|
||||
v-for="(mov, index) in mylist"
|
||||
:key="index"
|
||||
:index="index"
|
||||
:mov="mov"
|
||||
:visu="0"
|
||||
>
|
||||
<q-item-label
|
||||
caption
|
||||
lines="1"
|
||||
v-if="mov.circuitfrom"
|
||||
class="circuit"
|
||||
>{{ mov.circuitfrom.name }}</q-item-label
|
||||
</c-single-movement>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="inviati">
|
||||
<div v-if="getInviati.length === 0">
|
||||
{{ t('circuit.nessun_movimento_inviato') }}
|
||||
</div>
|
||||
<c-single-movement
|
||||
v-for="(mov2, index2) in getInviati"
|
||||
:key="index2"
|
||||
:index="index2"
|
||||
:mov="mov2"
|
||||
:visu="1"
|
||||
>
|
||||
<q-item-label
|
||||
caption
|
||||
lines="1"
|
||||
v-if="mov.transactionDate"
|
||||
class="date"
|
||||
>{{ tools.getstrDateTime(mov.transactionDate) }}</q-item-label
|
||||
</c-single-movement>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="ricevuti">
|
||||
<div v-if="getRicevuti.length === 0">
|
||||
{{ t('circuit.nessun_movimento_ricevuto') }}
|
||||
</div>
|
||||
<c-single-movement
|
||||
v-for="(mov3, index3) in getRicevuti"
|
||||
:key="index3"
|
||||
:index="index3"
|
||||
:mov="mov3"
|
||||
:visu="2"
|
||||
>
|
||||
<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>
|
||||
</c-single-movement>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
<slot></slot>
|
||||
<div style="margin-bottom: 50px"></div>
|
||||
</div>
|
||||
<q-list v-else bordered>
|
||||
<c-single-movement
|
||||
v-for="(mov, index) in mylist"
|
||||
:key="index"
|
||||
:index="index"
|
||||
:mov="mov"
|
||||
>
|
||||
</c-single-movement>
|
||||
</q-list>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { CMyCircuit } from '@/components/CMyCircuit'
|
||||
import { computed, defineComponent, onMounted, PropType, ref, toRef } from 'vue'
|
||||
import { computed, defineComponent, onMounted, PropType, ref, toRef, watch } from 'vue'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useCircuitStore } from '@store/CircuitStore'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { useQuasar } from 'quasar'
|
||||
@@ -9,12 +10,14 @@ import { ICircuit, ISearchList, IUserFields } from 'model'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||
import { CMyCircuits } from '@/components/CMyCircuits'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CMovements } from '@/components/CMovements'
|
||||
import { CSendRISTo } from '@/components/CSendRISTo'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyCircuits',
|
||||
components: { CMyCircuit, CUserNonVerif },
|
||||
components: { CMyCircuit, CUserNonVerif, CTitleBanner, CMovements, CSendRISTo },
|
||||
emits: ['update:modelValue'],
|
||||
props: {
|
||||
modelValue: {
|
||||
@@ -59,12 +62,32 @@ export default defineComponent({
|
||||
const { t } = useI18n()
|
||||
|
||||
const username = ref('')
|
||||
const visu = ref(0)
|
||||
const numtransaz = ref(0)
|
||||
const finishloading = ref(false)
|
||||
const loadingvalues = ref(false)
|
||||
|
||||
const init = ref(false)
|
||||
|
||||
const globalStore = useGlobalStore()
|
||||
const isfinishLoadingSite = computed(() => globalStore.finishLoading)
|
||||
|
||||
const filtroutente = ref(<any[]>[])
|
||||
|
||||
const nummovTodownload = ref(5)
|
||||
|
||||
const listcircuitsfind = computed(() => {
|
||||
// console.log('list modif')
|
||||
return updateListCircuit(costanti.FIND_CIRCUIT)
|
||||
})
|
||||
const listcircuitsmy = computed(() => {
|
||||
// console.log('list modif')
|
||||
return updateListCircuit(costanti.MY_CIRCUITS)
|
||||
})
|
||||
|
||||
const listcircuitsfiltered = computed(() => {
|
||||
// console.log('list modif')
|
||||
return updateListCircuit()
|
||||
return updateListCircuit(visu.value)
|
||||
})
|
||||
|
||||
const myoptions = computed(() => {
|
||||
@@ -73,7 +96,7 @@ export default defineComponent({
|
||||
mybutt.push({ label: t('mypages.find_circuit'), value: costanti.FIND_CIRCUIT })
|
||||
|
||||
|
||||
if (numAskSentCircuits.value > 0 || props.modelValue === costanti.ASK_SENT_CIRCUIT)
|
||||
if (numAskSentCircuits.value > 0 || visu.value === costanti.ASK_SENT_CIRCUIT)
|
||||
mybutt.push({
|
||||
label: t('mypages.request_sent') + ' (' + numAskSentCircuits.value + ')',
|
||||
value: costanti.ASK_SENT_CIRCUIT
|
||||
@@ -94,28 +117,32 @@ export default defineComponent({
|
||||
return (arr) ? arr.length : 0
|
||||
})
|
||||
|
||||
async function loadCircuits() {
|
||||
watch(() => globalStore.finishLoading, async (to: any, from: any) => {
|
||||
load()
|
||||
})
|
||||
|
||||
async function loadCircuits(nummovTodownload: number) {
|
||||
// Carica il profilo di quest'utente
|
||||
if (username.value) {
|
||||
filtroutente.value = await tools.loadCircuits()
|
||||
filtroutente.value = await tools.loadCircuits(nummovTodownload)
|
||||
}
|
||||
}
|
||||
|
||||
function updateListCircuit() {
|
||||
function updateListCircuit(visu: number) {
|
||||
let arr: any[] = []
|
||||
try {
|
||||
if (props.modelValue === costanti.CIRCUITS) {
|
||||
if (visu === costanti.CIRCUITS) {
|
||||
arr = circuitStore.listcircuits
|
||||
} else if (props.modelValue === costanti.MY_CIRCUITS) {
|
||||
} else if (visu === costanti.MY_CIRCUITS) {
|
||||
arr = circuitStore.listcircuits.filter((circ: any) => userStore.my.profile.mycircuits.findIndex((rec: any) => circ.name === rec.circuitname) >= 0)
|
||||
} else if (props.modelValue === costanti.ASK_SENT_CIRCUIT) {
|
||||
} else if (visu === costanti.ASK_SENT_CIRCUIT) {
|
||||
arr = userStore.my.profile.asked_circuits
|
||||
}
|
||||
} catch (e) {
|
||||
arr = []
|
||||
}
|
||||
|
||||
if (props.modelValue === costanti.MY_CIRCUITS) {
|
||||
if (visu === costanti.MY_CIRCUITS) {
|
||||
const arrtoinsert: any = circuitStore.listcircuits.filter((circ: any) => circ.showAlways)
|
||||
for (const rec of arrtoinsert) {
|
||||
if (arr.findIndex(myrec => myrec._id === rec._id) < 0) {
|
||||
@@ -129,10 +156,18 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
|
||||
async function mounted() {
|
||||
async function load() {
|
||||
if (init.value)
|
||||
return // Gia inizializzato
|
||||
|
||||
// console.log(' ## INIZIO MOUNT ')
|
||||
username.value = userStore.my.username
|
||||
await loadCircuits()
|
||||
visu.value = props.modelValue
|
||||
|
||||
await loadCircuits(nummovTodownload.value)
|
||||
|
||||
finishloading.value = true
|
||||
init.value = true
|
||||
// console.log(' -- FINE MOUNT ')
|
||||
}
|
||||
|
||||
@@ -140,6 +175,35 @@ export default defineComponent({
|
||||
emit('update:modelValue', val)
|
||||
}
|
||||
|
||||
function togglevisu() {
|
||||
if (visu.value !== costanti.FIND_CIRCUIT) {
|
||||
visu.value = costanti.FIND_CIRCUIT
|
||||
} else {
|
||||
visu.value = costanti.MY_CIRCUITS
|
||||
}
|
||||
}
|
||||
function movcaricati(params: any) {
|
||||
if (params.numtransaz) {
|
||||
numtransaz.value = params.numtransaz
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function mounted() {
|
||||
if (globalStore.finishLoading) {
|
||||
load()
|
||||
}
|
||||
}
|
||||
|
||||
async function addlastmov() {
|
||||
nummovTodownload.value += 5
|
||||
|
||||
loadingvalues.value = true
|
||||
await loadCircuits(nummovTodownload.value)
|
||||
loadingvalues.value = false
|
||||
}
|
||||
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
@@ -153,6 +217,16 @@ export default defineComponent({
|
||||
userStore,
|
||||
circuitStore,
|
||||
username,
|
||||
t,
|
||||
visu,
|
||||
listcircuitsfind,
|
||||
listcircuitsmy,
|
||||
togglevisu,
|
||||
movcaricati,
|
||||
numtransaz,
|
||||
finishloading,
|
||||
addlastmov,
|
||||
loadingvalues,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,54 +1,116 @@
|
||||
<template>
|
||||
<div v-if="tools.isUserOk()">
|
||||
<q-inner-loading id="spinner" :showing="!finishloading">
|
||||
<q-spinner-tail size="3em" color="primary" />
|
||||
</q-inner-loading>
|
||||
<div v-if="tools.isUserOk() && finishloading">
|
||||
<div v-if="finder && showfinder" class="q-gutter-sm q-pa-sm q-pb-sm">
|
||||
<q-btn-toggle
|
||||
:model-value="modelValue"
|
||||
@update:model-value="updateValue"
|
||||
class="my-custom-toggle"
|
||||
no-caps
|
||||
rounded
|
||||
unelevated
|
||||
push
|
||||
toggle-color="primary"
|
||||
color="white"
|
||||
text-color="primary"
|
||||
:options="myoptions"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="finder" class="">
|
||||
<div
|
||||
v-if="
|
||||
modelValue === costanti.FIND_CIRCUIT ||
|
||||
listcircuitsfiltered.length === 0
|
||||
"
|
||||
>
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div v-else>
|
||||
<!--
|
||||
mycircuits: {{userStore.my.profile.mycircuits}}<br><br>
|
||||
listcircuitsfiltered: {{listcircuitsfiltered}}
|
||||
<div class="q-mt-md">
|
||||
<CSendRISTo></CSendRISTo>
|
||||
|
||||
<q-btn label="test" @click="userStore.my.profile.mycircuits = [...userStore.my.profile.mycircuits, {circuitname: 'prova'}]; circuitStore.listcircuits = [...circuitStore.listcircuits, {name: 'prova', path: 'prova'}]"></q-btn>
|
||||
-->
|
||||
|
||||
<q-list>
|
||||
<CTitleBanner
|
||||
:class="`q-pa-xs `"
|
||||
:title="myoptions[0].label"
|
||||
bgcolor="white"
|
||||
bgcolor2="lightblue"
|
||||
:clcolor="`text-indigo`"
|
||||
:canopen="true"
|
||||
:small="true"
|
||||
>
|
||||
<div v-if="listcircuitsmy.length === 0" class="q-ma-sm q-pa-sm">
|
||||
{{ t('circuit.nessun_circuito_attivo') }}
|
||||
</div>
|
||||
<div v-else style="max-height: 250px; overflow-y: auto">
|
||||
<span
|
||||
v-for="(circuit, index) in listcircuitsfiltered"
|
||||
v-for="(circuit, index) in listcircuitsmy"
|
||||
:key="index"
|
||||
class="q-my-sm"
|
||||
clickable
|
||||
>
|
||||
<CMyCircuit :mycircuit="circuit" :visu="modelValue"
|
||||
:username="username"> </CMyCircuit>
|
||||
<CMyCircuit
|
||||
:mycircuit="circuit"
|
||||
:visu="visu"
|
||||
:username="username"
|
||||
>
|
||||
</CMyCircuit>
|
||||
</span>
|
||||
</q-list>
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
|
||||
<CTitleBanner
|
||||
:class="`q-pa-xs `"
|
||||
:title="t('circuit.tuoi_ultimi_movimenti', { num: numtransaz })"
|
||||
bgcolor="white"
|
||||
bgcolor2="lightblue"
|
||||
:clcolor="`text-indigo`"
|
||||
:canopen="true"
|
||||
:small="true"
|
||||
:open="false"
|
||||
>
|
||||
<CMovements @loaded="movcaricati" :username="username">
|
||||
<div class="row justify-center"><q-btn
|
||||
rounded
|
||||
dense
|
||||
class="text-center"
|
||||
color="primary"
|
||||
:label="t('circuit.show_next_mov')"
|
||||
@click="addlastmov()"
|
||||
/>
|
||||
</div>
|
||||
</CMovements>
|
||||
|
||||
<q-inner-loading id="spinner" :showing="loadingvalues">
|
||||
<q-spinner-tail size="3em" color="primary" />
|
||||
</q-inner-loading>
|
||||
|
||||
<br />
|
||||
</CTitleBanner>
|
||||
<div class="row justify-center">
|
||||
<q-btn
|
||||
rounded
|
||||
toggle-color="primary"
|
||||
:label="
|
||||
visu === costanti.MY_CIRCUITS
|
||||
? t('circuit.find_others_circuit')
|
||||
: t('circuit.hide_others_circuit')
|
||||
"
|
||||
@click="togglevisu()"
|
||||
/>
|
||||
</div>
|
||||
<CTitleBanner
|
||||
v-if="visu === costanti.FIND_CIRCUIT"
|
||||
:class="`q-pa-xs `"
|
||||
:title="t('circuit.circuiti_territoriali')"
|
||||
bgcolor="bg-primary"
|
||||
:clcolor="`text-white`"
|
||||
:canopen="true"
|
||||
:small="true"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
v-for="(circuit, index) in listcircuitsfind"
|
||||
:key="index"
|
||||
class="q-my-sm"
|
||||
clickable
|
||||
>
|
||||
<CMyCircuit
|
||||
:mycircuit="circuit"
|
||||
:visu="visu"
|
||||
:username="username"
|
||||
>
|
||||
</CMyCircuit>
|
||||
</span>
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
</div>
|
||||
<div v-if="visu === costanti.FIND_CIRCUIT">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-list class="width-container">
|
||||
<span class="q-my-sm" clickable>
|
||||
<CMyCircuit :mycircuit="mycircuit" :visu="visu" :username="username"> </CMyCircuit>
|
||||
<CMyCircuit :mycircuit="mycircuit" :visu="visu" :username="username">
|
||||
</CMyCircuit>
|
||||
</span>
|
||||
</q-list>
|
||||
</div>
|
||||
@@ -56,6 +118,17 @@
|
||||
<div v-else>
|
||||
<CUserNonVerif></CUserNonVerif>
|
||||
</div>
|
||||
|
||||
<CTitleBanner
|
||||
v-if="visu === costanti.FIND_CIRCUIT"
|
||||
:class="`q-pa-xs `"
|
||||
:title="myoptions[0].label"
|
||||
bgcolor="bg-primary"
|
||||
:clcolor="`text-white`"
|
||||
:canopen="true"
|
||||
:small="true"
|
||||
>
|
||||
</CTitleBanner>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMyCircuits.ts">
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<q-item-label>
|
||||
<q-btn
|
||||
v-if="circuitname"
|
||||
icon="fas fa-coins"
|
||||
icon-right="img: images/1ris_rosso_100.png"
|
||||
color="green"
|
||||
size="md"
|
||||
dense
|
||||
@@ -125,7 +125,7 @@
|
||||
@click="showsendCoinTo = true"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="positive" name="fas fa-coins" />
|
||||
<q-icon color="positive" name="img: images/1ris_rosso_100.png" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{
|
||||
$t('circuit.sendcoins')
|
||||
@@ -378,7 +378,7 @@
|
||||
@click="showsendCoinTo = true"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="positive" name="fas fa-coins" />
|
||||
<q-icon color="positive" name="img: images/1ris_rosso_100.png" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{
|
||||
$t('circuit.sendcoins')
|
||||
@@ -552,7 +552,7 @@
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="positive" name="fas fa-coins" />
|
||||
<q-icon color="positive" name="img: images/1ris_rosso_100.png" />
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
{{ $t('circuit.enablefido') }}
|
||||
|
||||
@@ -203,7 +203,7 @@ export default defineComponent({
|
||||
|
||||
|
||||
watch(() => indstep.value, (newval: number, oldval: number) => {
|
||||
if (indstep.value >= 0)
|
||||
if (indstep.value >= 0 && arrStep.value.length >indstep.value && arrStep.value[indstep.value])
|
||||
step.value = arrStep.value[indstep.value].step
|
||||
else
|
||||
step.value = 0
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
}
|
||||
|
||||
|
||||
.actualdate{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.cardrec {
|
||||
/* Aggiungi un bordo sottile */
|
||||
|
||||
@@ -44,7 +44,7 @@ export default defineComponent({
|
||||
const userStore = useUserStore()
|
||||
const calendarStore = useCalendarStore()
|
||||
const globalStore = useGlobalStore()
|
||||
// const $q = useQuasar()
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const $router = useRouter()
|
||||
|
||||
@@ -109,6 +109,11 @@ export default defineComponent({
|
||||
return (props.table === shared_consts.TABLES_MYBACHECAS && calendarStore.isPartecipero(myrec.value._id, props.table))
|
||||
}
|
||||
|
||||
function computedWidth() {
|
||||
const width = tools.getwidth($q) - 20;
|
||||
return `${Math.min(width, 600)}px`; // Limita la larghezza massima a 600px
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
@@ -132,6 +137,7 @@ export default defineComponent({
|
||||
calendarStore,
|
||||
disabilita,
|
||||
globalStore,
|
||||
computedWidth,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
<!--suppress ALL -->
|
||||
<template>
|
||||
|
||||
<div
|
||||
class="q-py-xs centermydiv cardrec"
|
||||
:style="
|
||||
`max-width: ` +
|
||||
(tools.getwidth($q) - 20) +
|
||||
`px; ` +
|
||||
($q.screen.lt.sm
|
||||
? `min-width: ` + (tools.getwidth($q) - (20 + margin_right)) + `px;`
|
||||
: ``)
|
||||
"
|
||||
:style="{ maxWidth: computedWidth }"
|
||||
>
|
||||
<div v-if="myrec && table === shared_consts.TABLES_MYBACHECAS">
|
||||
<div class="row">
|
||||
|
||||
@@ -425,7 +425,7 @@
|
||||
@click="naviga(`/my/` + contact.username + '?sendris=0')"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="positive" name="fas fa-coins" />
|
||||
<q-icon color="positive" name="img: images/1ris_rosso_100.png" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('circuit.sendcoins') }}</q-item-section>
|
||||
</q-item>
|
||||
@@ -454,7 +454,7 @@
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="positive" name="fas fa-coins" />
|
||||
<q-icon color="positive" name="img: images/1ris_rosso_100.png" />
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
{{ $t('circuit.enablefido') }}
|
||||
@@ -814,7 +814,7 @@
|
||||
@click="naviga(`/my/` + contact.username + '?sendris=0')"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="positive" name="fas fa-coins" />
|
||||
<q-icon color="positive" name="img: images/1ris_rosso_100.png" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('circuit.sendcoins') }}</q-item-section>
|
||||
</q-item>
|
||||
|
||||
@@ -38,6 +38,8 @@ export default defineComponent({
|
||||
const lasts_notifs_req = computed(() => notifStore.getnotifs_coinsreq())
|
||||
const num_notifs = computed(() => lasts_notifs_req.value.length)
|
||||
|
||||
const hide = ref(false)
|
||||
|
||||
watch(() => num_notifs.value, (newval, oldval) => {
|
||||
if (num_notifs.value === 1)
|
||||
shownotif.value = true
|
||||
@@ -81,6 +83,7 @@ export default defineComponent({
|
||||
clickNotif,
|
||||
userStore,
|
||||
shownotif,
|
||||
hide,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<div class="q-ma-sm text-center">
|
||||
<div v-if="!hide && num_notifs > 0" class="q-ma-sm text-center">
|
||||
<q-btn
|
||||
v-if="num_notifs > 0"
|
||||
:label="
|
||||
num_notifs > 1
|
||||
? t('circuit.mov_in_arrivo', { mov: num_notifs })
|
||||
: t('circuit.ris_in_arrivo')
|
||||
"
|
||||
@click="shownotif = true"
|
||||
icon="fas fa-coins"
|
||||
icon-right="img: images/1ris_rosso_100.png"
|
||||
rounded
|
||||
color="positive"
|
||||
></q-btn>
|
||||
<q-btn flat round icon="close" @click="hide = true"></q-btn>
|
||||
</div>
|
||||
|
||||
<q-dialog v-model="shownotif" :maximized="$q.screen.lt.sm">
|
||||
@@ -64,7 +64,7 @@
|
||||
<div class="row no-wrap justify-evenly q-pa-sm">
|
||||
<q-btn
|
||||
size="md"
|
||||
icon="fas fa-coins"
|
||||
icon-right="img: images/1ris_rosso_100.png"
|
||||
:disable="notif.disablecoinclick"
|
||||
color="positive"
|
||||
:label="
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
"
|
||||
>
|
||||
</CCurrencyValue>
|
||||
<!--:tips="t('account.saldo_tips', { fido: qtarem, symbol })"-->
|
||||
<CCurrencyValue
|
||||
v-else
|
||||
:symbol="symbol"
|
||||
:tips="t('account.saldo_tips', { fido: qtarem, symbol })"
|
||||
:strfido="t('account.fido_casa', { fido: account ? account.fidoConcesso : '', symbol })"
|
||||
:color="color"
|
||||
v-model="saldo"
|
||||
|
||||
@@ -329,6 +329,7 @@ export default defineComponent({
|
||||
|
||||
function hide() {
|
||||
emit('close', true)
|
||||
showpage.value = false
|
||||
}
|
||||
|
||||
function sendCoin() {
|
||||
@@ -455,6 +456,7 @@ export default defineComponent({
|
||||
function clickIndietro(actualstep: number) {
|
||||
if (actualstep === 1) {
|
||||
step.value = 0
|
||||
hide()
|
||||
} else if (actualstep === 2) {
|
||||
step.value = 1
|
||||
} else if (actualstep === 0) {
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
</div>
|
||||
</template>
|
||||
</q-input>
|
||||
<div v-if="$q.platform.is.mobile" class="q-mt-md">
|
||||
<div class="q-mt-md">
|
||||
<CNumericKeyboard v-model="qty" :showInput="false" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -265,6 +265,8 @@
|
||||
v-model="causal"
|
||||
type="textarea"
|
||||
filled
|
||||
maxlength="500"
|
||||
counter
|
||||
:label="$t('circuit.note')"
|
||||
class="q-my-sm full-width"
|
||||
>
|
||||
@@ -313,7 +315,7 @@
|
||||
})
|
||||
"
|
||||
color="positive"
|
||||
:icon="
|
||||
:icon-right="
|
||||
step === 2 ? 'img: images/1ris_rosso_100.png' : 'navigate_next'
|
||||
"
|
||||
@click="clickAvanti(step)"
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
.my-custom-border {
|
||||
border: 1px solid #ccc; /* Imposta il colore del bordo (puoi personalizzare) */
|
||||
|
||||
background-color: #fff; /* Colore sfondo per il contenitore (puoi personalizzare) */
|
||||
border-radius: 10px;
|
||||
}
|
||||
@@ -11,7 +11,10 @@ import { shared_consts } from '@src/common/shared_vuejs'
|
||||
import { costanti, IMainCard } from '@store/Modules/costanti'
|
||||
|
||||
import { CMyUser } from '../CMyUser'
|
||||
import { CTitleBanner } from '../CTitleBanner'
|
||||
import { CMyGroup } from '../CMyGroup'
|
||||
import { CCopyBtn } from '../CCopyBtn'
|
||||
import { CContactUser } from '../CContactUser'
|
||||
import { CUserInfoAccount } from '../CUserInfoAccount'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { useQuasar } from 'quasar'
|
||||
@@ -19,7 +22,10 @@ import { useQuasar } from 'quasar'
|
||||
export default defineComponent({
|
||||
name: 'CSendRISTo',
|
||||
props: {},
|
||||
components: { CMyUser, CMyGroup, CUserInfoAccount },
|
||||
components: {
|
||||
CMyUser, CMyGroup, CUserInfoAccount, CCopyBtn,
|
||||
CTitleBanner, CContactUser
|
||||
},
|
||||
setup(props) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
@@ -36,6 +42,9 @@ export default defineComponent({
|
||||
|
||||
const tipoConto = ref(shared_consts.AccountType.USER)
|
||||
const loading = ref(false)
|
||||
const miolink = ref('')
|
||||
const sendRIS = ref(false)
|
||||
const riceviRIS = ref(false)
|
||||
const circuitpath = computed(() => {
|
||||
const circ = circuitStore.getCircuitByProvinceAndCard(userStore.my.profile.resid_province, userStore.my.profile.resid_card)
|
||||
return circ && circ.path ? circ.path : ''
|
||||
@@ -80,6 +89,12 @@ export default defineComponent({
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
function clickRiceviRIS() {
|
||||
miolink.value = 'my/'
|
||||
riceviRIS.value = true
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
userStore,
|
||||
tools,
|
||||
@@ -95,6 +110,10 @@ export default defineComponent({
|
||||
loading,
|
||||
contact,
|
||||
circuitpath,
|
||||
sendRIS,
|
||||
riceviRIS,
|
||||
miolink,
|
||||
clickRiceviRIS,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -4,16 +4,6 @@
|
||||
class="row text-center justify-evenly items-center"
|
||||
>
|
||||
<div class="q-mb-sm">
|
||||
<q-btn
|
||||
icon="fas fa-download"
|
||||
color="accent"
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('circuit.receive_coins')"
|
||||
@click="tools.receiveRis($q, $t)"
|
||||
>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
icon="fas fa-upload"
|
||||
color="positive"
|
||||
@@ -23,14 +13,40 @@
|
||||
@click="sendCoinsToClick"
|
||||
>
|
||||
</q-btn>
|
||||
<div class="q-mb-sm"></div>
|
||||
|
||||
<q-btn
|
||||
icon="fas fa-download"
|
||||
color="accent"
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('circuit.receive_coins')"
|
||||
@click="clickRiceviRIS"
|
||||
>
|
||||
</q-btn>
|
||||
|
||||
<CTitleBanner
|
||||
v-if="riceviRIS"
|
||||
:class="`q-pa-xs `"
|
||||
:title="$t('circuit.receive_coins')"
|
||||
bgcolor="white"
|
||||
bgcolor2="lightblue"
|
||||
:clcolor="`text-indigo`"
|
||||
:canopen="true"
|
||||
:small="true"
|
||||
:open="true"
|
||||
>
|
||||
<CCopyBtn :title="$t('reg.click_per_copiare')" :texttocopy="miolink">
|
||||
</CCopyBtn>
|
||||
</CTitleBanner>
|
||||
<!--<div class="q-mb-sm"></div>
|
||||
|
||||
|
||||
<CUserInfoAccount
|
||||
:user="contact"
|
||||
:circuitpath="circuitpath"
|
||||
:admin="false"
|
||||
:onlysaldo="true"
|
||||
/>
|
||||
/>-->
|
||||
</div>
|
||||
</div>
|
||||
<q-dialog v-model="usersList.show">
|
||||
@@ -77,12 +93,19 @@
|
||||
|
||||
<div v-if="tipoConto === shared_consts.AccountType.USER">
|
||||
<div v-for="(rec, i) in usersList.list" :key="i">
|
||||
<CMyUser
|
||||
:mycontact="rec"
|
||||
:visu="costanti.FIND_PEOPLE"
|
||||
@setCmd="tools.setCmd"
|
||||
>
|
||||
</CMyUser>
|
||||
<div class="q-pa-xs q-ma-xs q-border q-rounded my-custom-border">
|
||||
<CMyUser
|
||||
:mycontact="rec"
|
||||
:visu="costanti.FIND_PEOPLE"
|
||||
@setCmd="tools.setCmd"
|
||||
>
|
||||
</CMyUser>
|
||||
<CContactUser
|
||||
:myuser="rec"
|
||||
:showBtnActivities="false"
|
||||
:sendRIS="tools.isUserOk() ? sendRIS : false"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
|
||||
53
src/components/CSingleMovement/CSingleMovement.scss
Executable file
53
src/components/CSingleMovement/CSingleMovement.scss
Executable file
@@ -0,0 +1,53 @@
|
||||
.userfrom {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.userto {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.circuit {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.date {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.rigamov {
|
||||
background-color: lightgray;
|
||||
}
|
||||
|
||||
.causale {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.userto,
|
||||
.userfrom {
|
||||
white-space: pre-wrap;
|
||||
/* Impedisce il wrapping del testo */
|
||||
}
|
||||
|
||||
.q-item-section.d-flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
/* Allinea gli elementi al centro verticalmente */
|
||||
}
|
||||
|
||||
.q-item__section--main ~ .q-item__section--side{
|
||||
padding-left: 2px !important;
|
||||
}
|
||||
|
||||
.q-item__section--side{
|
||||
padding-right: 4px !important;
|
||||
}
|
||||
|
||||
.schede-mov{
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
|
||||
border: solid 1px blue;
|
||||
border-radius: 20px;
|
||||
}
|
||||
92
src/components/CSingleMovement/CSingleMovement.ts
Executable file
92
src/components/CSingleMovement/CSingleMovement.ts
Executable file
@@ -0,0 +1,92 @@
|
||||
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: 'CSingleMovement',
|
||||
components: { CMyImgUser, CCurrencyValue },
|
||||
props: {
|
||||
mov: {
|
||||
type: Object as PropType<IMovement>,
|
||||
required: true,
|
||||
},
|
||||
index: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
visu: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 0,
|
||||
}
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
const $router = useRouter()
|
||||
const globalStore = useGlobalStore()
|
||||
const { t } = useI18n();
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
function getUsername(user: any) {
|
||||
if (user && user.username) {
|
||||
return user.username
|
||||
}
|
||||
|
||||
return user
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
})
|
||||
|
||||
return {
|
||||
userStore,
|
||||
tools,
|
||||
getFromToStr,
|
||||
t,
|
||||
navigabyMov,
|
||||
getUsername,
|
||||
}
|
||||
}
|
||||
})
|
||||
73
src/components/CSingleMovement/CSingleMovement.vue
Executable file
73
src/components/CSingleMovement/CSingleMovement.vue
Executable file
@@ -0,0 +1,73 @@
|
||||
<template>
|
||||
<q-item
|
||||
v-if="mov"
|
||||
:class="[
|
||||
'm-mb-sm',
|
||||
'schede-mov',
|
||||
{
|
||||
'background-even': index % 2 === 0,
|
||||
'background-odd': index % 2 !== 0,
|
||||
},
|
||||
]"
|
||||
clickable
|
||||
v-ripple
|
||||
>
|
||||
<q-item-section v-if="visu !== 1" avatar @click="navigabyMov(mov, true)">
|
||||
<CMyImgUser :mov="mov" :from="true"> </CMyImgUser>
|
||||
</q-item-section>
|
||||
<q-item-section v-else side @click="navigabyMov(mov, false)">
|
||||
<CMyImgUser :mov="mov" :from="false"> </CMyImgUser>
|
||||
<CCurrencyValue
|
||||
:symbol="mov.circuitfrom.symbol"
|
||||
color="red"
|
||||
v-model="mov.amount"
|
||||
:small="true"
|
||||
label=""
|
||||
>
|
||||
</CCurrencyValue>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label class="causale" v-if="mov.causal">{{
|
||||
mov.causal
|
||||
}}</q-item-label>
|
||||
<q-item-label v-if="visu !== 1" lines="3">
|
||||
{{ t('movement.from') }}
|
||||
<span class="userfrom">{{
|
||||
tools.getUsernameOrGroupOrContoComByMov(mov, true)
|
||||
}}</span>
|
||||
</q-item-label>
|
||||
<q-item-label v-if="visu !== 2" lines="3">
|
||||
{{ t('movement.to') }}
|
||||
<span class="userto">{{
|
||||
tools.getUsernameOrGroupOrContoComByMov(mov, false)
|
||||
}}</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-section>
|
||||
|
||||
<q-item-section v-if="visu === 0" side @click="navigabyMov(mov, false)">
|
||||
<CMyImgUser :mov="mov" :from="false"> </CMyImgUser>
|
||||
<CCurrencyValue
|
||||
:symbol="mov.circuitfrom.symbol"
|
||||
color="red"
|
||||
v-model="mov.amount"
|
||||
:small="true"
|
||||
label=""
|
||||
>
|
||||
</CCurrencyValue>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CSingleMovement.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CSingleMovement.scss';
|
||||
</style>
|
||||
1
src/components/CSingleMovement/index.ts
Executable file
1
src/components/CSingleMovement/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export { default as CSingleMovement } from './CSingleMovement.vue'
|
||||
@@ -5,5 +5,10 @@
|
||||
.nonvisibile{
|
||||
border-radius: 16px;
|
||||
border: red solid 3px;
|
||||
border: rgba(0, 0, 255, 0.432);
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.q-banner--dense {
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { defineComponent, ref } from 'vue'
|
||||
import { defineComponent, onMounted, ref } from 'vue'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CTitleBanner',
|
||||
@@ -12,6 +13,16 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: 'bg-primary',
|
||||
},
|
||||
bgcolor2: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
bgcolor3: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
clcolor: {
|
||||
type: String,
|
||||
required: false,
|
||||
@@ -56,12 +67,18 @@ export default defineComponent({
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
small: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
components: {},
|
||||
emits: ['apri'],
|
||||
setup(props, { emit }) {
|
||||
const myvisible = ref(false)
|
||||
const gradient = ref('')
|
||||
|
||||
function created() {
|
||||
myvisible.value = props.visible
|
||||
@@ -89,13 +106,21 @@ export default defineComponent({
|
||||
return 'nonvisibile glossy'
|
||||
}
|
||||
|
||||
function mounted() {
|
||||
|
||||
gradient.value = tools.getGradientByColors(props.bgcolor, props.bgcolor2, props.bgcolor3)
|
||||
}
|
||||
|
||||
created()
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
myvisible,
|
||||
iconopen,
|
||||
apri,
|
||||
getclass,
|
||||
gradient,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
' ' +
|
||||
getclass()
|
||||
"
|
||||
style="text-align: center"
|
||||
:style="`text-align: center; `"
|
||||
@click="apri()"
|
||||
>
|
||||
<template v-slot:avatar>
|
||||
@@ -25,7 +25,7 @@
|
||||
<q-icon v-if="canopen" :name="iconopen()" color="white" />
|
||||
</div>
|
||||
</template>
|
||||
<span :class="`mybanner ` + myclasstext" :style="mystyle">{{
|
||||
<span :class="{'mybanner': !small, 'mybanner-small': small, myclasstext: true}" :style="mystyle">{{
|
||||
title
|
||||
}}</span>
|
||||
</q-banner>
|
||||
@@ -44,7 +44,7 @@
|
||||
' ' +
|
||||
getclass()
|
||||
"
|
||||
style="text-align: center"
|
||||
:style="`text-align: center ; ${gradient}`"
|
||||
@click="apri()"
|
||||
>
|
||||
<template v-slot:avatar>
|
||||
@@ -55,7 +55,7 @@
|
||||
<q-icon v-if="canopen" :name="iconopen()" color="white" />
|
||||
</div>
|
||||
</template>
|
||||
<span :class="`mybanner ` + myclasstext" :style="mystyle">{{
|
||||
<span :class="{'mybanner': !small, 'mybanner-small': small, myclasstext: true}" :style="mystyle">{{
|
||||
title
|
||||
}}</span>
|
||||
</q-banner>
|
||||
|
||||
@@ -12,9 +12,7 @@
|
||||
<span v-if="!table" class="mybanner">{{ mytitle }}</span>
|
||||
</q-banner>
|
||||
</div>
|
||||
<div
|
||||
v-else
|
||||
>
|
||||
<div v-else>
|
||||
<CBarSelection
|
||||
v-if="showBarSelection"
|
||||
:myicon="myicon"
|
||||
@@ -27,6 +25,9 @@
|
||||
>
|
||||
<slot />
|
||||
</CBarSelection>
|
||||
<div v-else>
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -33,4 +33,16 @@
|
||||
/* Centra il testo sotto l'immagine */
|
||||
font-size: 0.9rem;
|
||||
/* Dimensione del testo */
|
||||
}
|
||||
|
||||
|
||||
|
||||
.iconbig {
|
||||
font-size: 1.4em !important;
|
||||
}
|
||||
|
||||
.img_in_tab{
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
margin: 4px !important;
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import { tools } from '@store/Modules/tools'
|
||||
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
import { useI18n } from '@src/boot/i18n'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { static_data } from '@/db/static_data'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
@@ -23,6 +23,7 @@ export default defineComponent({
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const $router = useRouter()
|
||||
const $route = useRoute()
|
||||
|
||||
const userStore = useUserStore()
|
||||
const globalStore = useGlobalStore()
|
||||
@@ -32,10 +33,16 @@ export default defineComponent({
|
||||
|
||||
const { getMyUsername, Username, getMyImg } = MixinUsers()
|
||||
|
||||
const currentPath = computed(() => $route.path); // Uso di computed per la reattività
|
||||
|
||||
function mounted() {
|
||||
// mounted
|
||||
}
|
||||
|
||||
function naviga(path: string) {
|
||||
$router.push(path)
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
@@ -47,6 +54,8 @@ export default defineComponent({
|
||||
tools,
|
||||
site,
|
||||
getMyImg,
|
||||
naviga,
|
||||
currentPath,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
"
|
||||
style="padding: 0px !important"
|
||||
content-class="mysmalltabs"
|
||||
:active-color="$q.dark.isActive ? `primary` : `primary`"
|
||||
active-color="white"
|
||||
active-bg-color="blue"
|
||||
no-caps
|
||||
indicator-color="transparent"
|
||||
>
|
||||
@@ -40,13 +41,15 @@
|
||||
to="/events"
|
||||
icon="fas fa-calendar-week"
|
||||
/>
|
||||
<q-route-tab
|
||||
<q-img
|
||||
v-if="site.confpages.showViewCircuits"
|
||||
class="mylabfooter"
|
||||
:label="$t('tabdown.circuits')"
|
||||
:to="tools.updateLink('/circuits')"
|
||||
icon="img: images/1ris_rosso_100.png"
|
||||
/>
|
||||
src="images/1ris_rosso_100.png"
|
||||
round
|
||||
flat
|
||||
:style="currentPath === '/circuits' ? `background-color: lightblue`: ''"
|
||||
class="img_in_tab"
|
||||
@click="naviga(tools.updateLink('/circuits'))"
|
||||
></q-img>
|
||||
<q-route-tab
|
||||
v-if="site.confpages.showViewUsers"
|
||||
class="mylabfooter"
|
||||
|
||||
@@ -179,6 +179,14 @@ $heightBtn: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mybanner-small {
|
||||
font-weight: bold;
|
||||
font-size: 0.85rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.mybanner_left {
|
||||
padding: 4px;
|
||||
font-weight: bold;
|
||||
@@ -864,8 +872,8 @@ h3 {
|
||||
.bordo_stondato_stretto {
|
||||
margin: 4px;
|
||||
border-radius: 3rem;
|
||||
padding-left: 14px;
|
||||
padding-right: 14px;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
border: solid 3px #49b502;
|
||||
@@ -2279,26 +2287,40 @@ $coloreprincipale: lightblue;
|
||||
|
||||
}
|
||||
|
||||
:root {
|
||||
--background-even-light: rgba(211, 211, 211, 0.3);
|
||||
--background-odd-light: white;
|
||||
--background-even-dark: rgba(45, 45, 45, 0.7); /* Aggiustare per il tema dark */
|
||||
--background-odd-dark: rgba(30, 30, 30, 1); /* Aggiustare per il tema dark */
|
||||
}
|
||||
|
||||
.background-even {
|
||||
background-color: rgba(211, 211, 211, 0.3);
|
||||
}
|
||||
|
||||
.background-odd {
|
||||
background-color: white;
|
||||
/* O altro colore preferito */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
background-color: rgba(140, 140, 140, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
.q-stepper__tab {
|
||||
padding: 3px 3px !important;
|
||||
}
|
||||
|
||||
.q-stepper__step-inner{
|
||||
padding-left: 24px !important;
|
||||
padding-right: 4px !important;
|
||||
.q-stepper--horizontal .q-stepper__step-inner {
|
||||
padding: 16px !important;
|
||||
|
||||
@media (max-width: 600px) {
|
||||
padding-left: 16px !important;
|
||||
padding-right: 2px !important;
|
||||
padding: 8px !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.dialog_class{
|
||||
max-width: 800px;
|
||||
width: 100%;
|
||||
@media (max-width: 600px) {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
<q-btn flat round dense icon="fas fa-coins" class="q-mx-xs" @click="open = !open">
|
||||
<q-btn flat round dense icon="img: images/1ris_rosso_100.png" class="q-mx-xs" @click="open = !open">
|
||||
<q-badge v-if="num_notifs_unread > 0" floating color="red">{{ num_notifs_unread }}</q-badge>
|
||||
</q-btn>
|
||||
<q-btn v-if="false" flat round dense icon="fas fa-coins">
|
||||
<q-btn v-if="false" flat round dense icon="img: images/1ris_rosso_100.png">
|
||||
<q-badge v-if="num_notifs_unread > 0" floating color="red">{{ num_notifs_unread }}</q-badge>
|
||||
</q-btn>
|
||||
|
||||
@@ -37,26 +37,6 @@
|
||||
</q-bar>
|
||||
|
||||
<div v-if="tools.isLogged()">
|
||||
<CMyCircuits
|
||||
v-model="filter"
|
||||
:finder="true"
|
||||
:showfinder="false"
|
||||
:showBarSelection="false"
|
||||
:username="username"
|
||||
>
|
||||
|
||||
<CFinder
|
||||
:ind="tools.getIndMainCardsByTable(shared_consts.TABLES_MYBACHECAS)"
|
||||
:table="shared_consts.TABLES_CIRCUITS"
|
||||
:noButtAdd="true"
|
||||
:showFilterPersonal="false"
|
||||
:showBarSelection="false"
|
||||
/>
|
||||
|
||||
</CMyCircuits>
|
||||
|
||||
|
||||
|
||||
<div class="row justify-center margin_buttons q-gutter-lg">
|
||||
<q-btn-toggle
|
||||
v-model="show_all"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { IToken } from '@model/other'
|
||||
import { ICart, IOrderCart, IShareWithUs } from '@src/model/Products'
|
||||
import { IAccount, ICircuit, IGallery, IImgGallery, IMyCircuit } from '@model/GlobalStore'
|
||||
import { IAccount, ICircuit, IGallery, IImgGallery, IMovement, IMyCircuit } from '@model/GlobalStore'
|
||||
import { IBookedEvent } from './Calendar'
|
||||
|
||||
const enum ESexType {
|
||||
@@ -176,6 +176,7 @@ export interface IUserProfile {
|
||||
refused_circuits: any[]
|
||||
manage_mycircuits: ICircuit[]
|
||||
useraccounts: IAccount[]
|
||||
last_my_transactions: IMovement[]
|
||||
calc: ICalc
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ const msg_it = {
|
||||
},
|
||||
grid: {
|
||||
found: 'trovato',
|
||||
newrecord: 'Crea',
|
||||
newrecord: 'Aggiungi',
|
||||
table: 'Tabella',
|
||||
search: 'Cerca',
|
||||
order: 'Ordinamento:',
|
||||
@@ -1232,7 +1232,7 @@ const msg_it = {
|
||||
provapao: 'Prova pao',
|
||||
circuits: 'Circuiti',
|
||||
find_circuit: 'Cerca Circuiti',
|
||||
follow_circuits: 'Circuiti di cui fai parte',
|
||||
follow_circuits: 'I tuoi Circuiti RIS',
|
||||
},
|
||||
friends: {
|
||||
accept_trust: 'Accetta',
|
||||
@@ -1340,7 +1340,7 @@ const msg_it = {
|
||||
minlength: 'Compilare il campo "{name}" lungo almeno {minlength} caratteri',
|
||||
},
|
||||
hosps: {
|
||||
visibile: 'Pubblica',
|
||||
visibile: 'Pubblica (se spento sarà invisibile a tutti tranne a te)',
|
||||
typeHosp: 'Tipologia',
|
||||
numMaxPeopleHosp: 'N° max Ospiti',
|
||||
accomodation: {
|
||||
@@ -1352,6 +1352,14 @@ const msg_it = {
|
||||
preferences: 'Preferenze',
|
||||
},
|
||||
circuit: {
|
||||
show_next_mov: 'Vedi altri ...',
|
||||
nessun_movimento_ricevuto: 'Nessun movimento ricevuto. Proponi uno scambio in RIS e conosci altre persone!',
|
||||
nessun_movimento_inviato: 'Nessun movimento Inviato. Sperimenta l\'utilizzo dei RIS proponendoti in qualcosa!',
|
||||
nessun_circuito_attivo: 'Attualmente non sei ancora in nessun Circuito Territoriale:',
|
||||
tuoi_ultimi_movimenti: 'I tuoi ultimi movimenti ({num})',
|
||||
circuiti_territoriali: 'Circuiti Territoriali',
|
||||
find_others_circuit: 'Vedi tutti i Circuiti Territoriali',
|
||||
hide_others_circuit: 'Nascondi tutti i Circuiti Territoriali',
|
||||
apri: 'Entra !',
|
||||
invia_msg_dest: 'Invia la richiesta a {name}',
|
||||
non_hai_circuito_nazionale: 'Per poter inviare dei RIS ad una persona di un altro territorio, è necessario che entriate entrambi sul "Circuito RIS Italia"',
|
||||
@@ -1483,8 +1491,12 @@ const msg_it = {
|
||||
contocoll: 'Conto del Gruppo',
|
||||
user: 'Utente',
|
||||
sender: 'Mittente',
|
||||
da: 'Da',
|
||||
personale: 'Personale:',
|
||||
dest: 'Destinatario',
|
||||
a: 'A',
|
||||
inviati: 'Inviati',
|
||||
ricevuti: 'Ricevuti',
|
||||
descr_casuale: 'Per aiutare a farci conoscere, è utile lasciare un commento Pubblico sullo scambio effettuato.',
|
||||
note: 'Scrivi qui il tuo commento',
|
||||
enablefido: 'Abilita la Fiducia',
|
||||
@@ -1542,8 +1554,8 @@ const msg_it = {
|
||||
allmov: 'Vedi i movimenti di Tutto il Circuito',
|
||||
showsaldi: 'Mostra i Saldi dei membri',
|
||||
updatewallet: 'Aggiorna',
|
||||
from: 'Mittente:',
|
||||
to: 'Destinatario:',
|
||||
from: 'Da:',
|
||||
to: 'A:',
|
||||
},
|
||||
editor: {
|
||||
showtool: 'Mostra strumenti per formattare il testo',
|
||||
|
||||
@@ -3596,11 +3596,11 @@ export const tools = {
|
||||
|
||||
let myw = Screen.width
|
||||
if (!this.isMobile())
|
||||
if (globalStore.leftDrawerOpen)
|
||||
myw -= 300
|
||||
// if (globalStore.leftDrawerOpen)
|
||||
// myw -= 300
|
||||
if (!this.isMobile())
|
||||
if (globalStore.rightDrawerOpen)
|
||||
myw -= 300
|
||||
// if (globalStore.rightDrawerOpen)
|
||||
// myw -= 300
|
||||
|
||||
maxh2 = (myw / coeff) + 20
|
||||
if (maxh2 > 500)
|
||||
@@ -4201,13 +4201,13 @@ export const tools = {
|
||||
// return height()
|
||||
let myw = mythisq.screen.width
|
||||
if (withleft) {
|
||||
if (globalStore.leftDrawerOpen)
|
||||
myw -= 300
|
||||
//if (globalStore.leftDrawerOpen)
|
||||
// myw -= 300
|
||||
}
|
||||
|
||||
if (withright)
|
||||
if (globalStore.rightDrawerOpen)
|
||||
myw -= 300
|
||||
//if (globalStore.rightDrawerOpen)
|
||||
// myw -= 300
|
||||
return myw
|
||||
|
||||
},
|
||||
@@ -6687,6 +6687,17 @@ export const tools = {
|
||||
})
|
||||
},
|
||||
|
||||
gestiscoAlmeno1Circuito() {
|
||||
try {
|
||||
const userStore = useUserStore()
|
||||
|
||||
return userStore.my.profile.manage_mycircuits ? userStore.my.profile.manage_mycircuits.length > 0 : false
|
||||
} catch (e) {
|
||||
return false
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
addtoAdminOfCircuit($q: any, username: string, circuitname: string, domanda: any = '') {
|
||||
const userStore = useUserStore()
|
||||
|
||||
@@ -7270,6 +7281,14 @@ export const tools = {
|
||||
}
|
||||
},
|
||||
|
||||
getDateTomorrowByTime(ora: number) {
|
||||
const dateTimeStart = new Date();
|
||||
dateTimeStart.setDate(dateTimeStart.getDate() + 1); // Avanza al giorno successivo
|
||||
dateTimeStart.setHours(ora, 0, 0, 0);
|
||||
|
||||
return dateTimeStart
|
||||
},
|
||||
|
||||
|
||||
getdefaultnewrec_MyBacheca(extrarec: any): any {
|
||||
return {
|
||||
@@ -7277,8 +7296,8 @@ export const tools = {
|
||||
idSkill: tools.getSelectionByTable('skills', 0, true),
|
||||
idStatusSkill: tools.getSelectionByTable('statusSkills', []),
|
||||
idContribType: tools.getSelectionByTable('contribtypes', []),
|
||||
dateTimeStart: new Date(),
|
||||
dateTimeEnd: new Date(),
|
||||
dateTimeStart: this.getDateTomorrowByTime(21),
|
||||
dateTimeEnd: this.getDateTomorrowByTime(23),
|
||||
idCity: this.getCitySel(),
|
||||
NumLevel: 0,
|
||||
adType: tools.getSelectionByTable('adtypes', costanti.AdType.OFFRO),
|
||||
@@ -7566,12 +7585,12 @@ export const tools = {
|
||||
return []
|
||||
},
|
||||
|
||||
async loadCircuits() {
|
||||
async loadCircuits(nummovTodownload: number) {
|
||||
const userStore = useUserStore()
|
||||
const circuitStore = useCircuitStore()
|
||||
// Carica il profilo di quest'utente
|
||||
|
||||
await userStore.loadCircuits().then((ris) => {
|
||||
await userStore.loadCircuits(nummovTodownload).then((ris) => {
|
||||
// console.log('ris', ris)
|
||||
if (ris) {
|
||||
|
||||
@@ -7584,6 +7603,7 @@ export const tools = {
|
||||
|
||||
userStore.my.profile.asked_circuits = ris.asked_circuits ? ris.asked_circuits : []
|
||||
userStore.my.profile.refused_circuits = ris.refused_circuits ? ris.refused_circuits : []
|
||||
userStore.my.profile.last_my_transactions = ris.last_my_transactions ? ris.last_my_transactions : []
|
||||
return [{ userId: userStore.my._id }]
|
||||
}
|
||||
})
|
||||
@@ -8888,7 +8908,7 @@ export const tools = {
|
||||
}
|
||||
},
|
||||
|
||||
async saveInDBForTypes($q: any, mykey: string, newval: any, type: any, serv: boolean, table?: string, mysubkey: string, id: any, indrec?: number, mysubsubkey: string, specialField: ISpecialField): boolean {
|
||||
async saveInDBForTypes($q: any, mykey: string, newval: any, type: any, serv: boolean, table?: string, mysubkey: string, id: any, indrec?: number, mysubsubkey: string, specialField: ISpecialField) {
|
||||
|
||||
const { setValDb, getValDb } = MixinBase()
|
||||
|
||||
@@ -8975,6 +8995,63 @@ export const tools = {
|
||||
return { str: mystr.trim(), tipocontofrom, tipocontoto }
|
||||
},
|
||||
|
||||
getUsernameOrGroupOrContoComByMov(mov: IMovQuery, from: boolean) {
|
||||
|
||||
let mystrfrom = ''
|
||||
let mystrto = ''
|
||||
|
||||
if (from) {
|
||||
if (mov.contocomfrom && mov.contocomfrom.name) {
|
||||
mystrfrom = mov.contocomfrom.name
|
||||
}
|
||||
if (mov.groupfrom) {
|
||||
mystrfrom = mov.groupfrom.groupname
|
||||
}
|
||||
if (mov.userfrom) {
|
||||
mystrfrom = mov.userfrom.username
|
||||
}
|
||||
|
||||
return mystrfrom
|
||||
} else {
|
||||
|
||||
if (mov.contocomto && mov.contocomto.name) {
|
||||
mystrto = mov.contocomto.name
|
||||
}
|
||||
if (mov.groupto) {
|
||||
mystrto = mov.groupto.groupname
|
||||
}
|
||||
if (mov.userto) {
|
||||
mystrto = mov.userto.username
|
||||
}
|
||||
|
||||
return mystrto
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
getTitleAnnuncio(table: string) {
|
||||
const rec = costanti.MAINCARDS.find((rec: any) => rec.showinoptions && rec.table === table)
|
||||
return rec ? rec.strsingolo : ''
|
||||
},
|
||||
|
||||
getGradientByColors(col1: string, col2: string, col3: string): string {
|
||||
let mystr = ''
|
||||
if (col1) {
|
||||
mystr = `background: linear-gradient(${col1}`
|
||||
}
|
||||
if (col2) {
|
||||
mystr += `, ${col2}`
|
||||
}
|
||||
if (col3) {
|
||||
mystr += `, ${col3}`
|
||||
}
|
||||
|
||||
mystr += ') !important;'
|
||||
|
||||
return mystr
|
||||
|
||||
},
|
||||
|
||||
// FINE !
|
||||
|
||||
// getLocale() {
|
||||
|
||||
@@ -107,6 +107,7 @@ export const DefaultUser: IUserFields = {
|
||||
noFoto: false,
|
||||
asked_circuits: [],
|
||||
refused_circuits: [],
|
||||
last_my_transactions: [],
|
||||
manage_mycircuits: [],
|
||||
useraccounts: [],
|
||||
calc: { numGoodsAndServices: 0 },
|
||||
@@ -179,6 +180,7 @@ export const DefaultProfile: IUserProfile = {
|
||||
noFoto: false,
|
||||
asked_circuits: [],
|
||||
refused_circuits: [],
|
||||
last_my_transactions: [],
|
||||
manage_mycircuits: [],
|
||||
useraccounts: [],
|
||||
calc: { numGoodsAndServices: 0 },
|
||||
@@ -1762,8 +1764,8 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
},
|
||||
|
||||
async loadCircuits() {
|
||||
return Api.SendReq('/users/circuits', 'POST', null)
|
||||
async loadCircuits(nummovTodownload: number) {
|
||||
return Api.SendReq('/users/circuits', 'POST', { nummovTodownload })
|
||||
.then((res) => {
|
||||
return res.data
|
||||
}).catch((error) => {
|
||||
|
||||
@@ -176,10 +176,10 @@
|
||||
|
||||
<div style="align-self: center; vertical-align: middle">
|
||||
<q-btn
|
||||
label="Lista Circuiti"
|
||||
to="/circuits"
|
||||
rounded
|
||||
round
|
||||
icon="fas fa-arrow-circle-left"
|
||||
style="position: absolute;"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@@ -336,7 +336,7 @@
|
||||
v-if="userStore.IsMyCircuitByName(circuit.name)"
|
||||
:label="t('circuit.movements_made')"
|
||||
@click="showMov = !showMov"
|
||||
icon="fas fa-coins"
|
||||
icon="img: images/1ris_rosso_100.png"
|
||||
rounded
|
||||
color="primary"
|
||||
></q-btn>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
:table="shared_consts.TABLES_CIRCUITS"
|
||||
:noButtAdd="!tools.isManager()"
|
||||
:showFilterPersonal="true"
|
||||
:showBarSelection="true"
|
||||
:showBarSelection="false"
|
||||
/>
|
||||
</CMyCircuits>
|
||||
</div>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
<q-btn
|
||||
v-if="circuitslistOpt.length > 0"
|
||||
icon="fas fa-coins"
|
||||
icon-right="img: images/1ris_rosso_100.png"
|
||||
color="green"
|
||||
size="md"
|
||||
:label="t('circuit.sendcoins')"
|
||||
@@ -211,7 +211,7 @@
|
||||
"
|
||||
:label="t('groups.circuits')"
|
||||
name="circuits"
|
||||
icon="fas fa-coins"
|
||||
icon="img: images/1ris_rosso_100.png"
|
||||
></q-tab>
|
||||
<q-tab
|
||||
:label="t('groups.events')"
|
||||
@@ -507,7 +507,7 @@
|
||||
<q-tab
|
||||
:label="t('circuit.movements')"
|
||||
name="mov"
|
||||
icon="fas fa-coins"
|
||||
icon="img: images/1ris_rosso_100.png"
|
||||
></q-tab>
|
||||
</q-tabs>
|
||||
</q-tab-panel>
|
||||
|
||||
Reference in New Issue
Block a user