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