- Invia e Ricevi RIS (grafica aggiornata)
- Visualizzazione Movimenti (ultimi e successivi), per singolo e di tutti
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
{{ $t('circuit.destin_non_ha_circuito_naz') }}
|
||||
<br />
|
||||
</q-banner>
|
||||
<br />
|
||||
|
||||
<div class="text-center" v-if="to_user">
|
||||
<q-btn
|
||||
|
||||
@@ -24,7 +24,12 @@ export default defineComponent({
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
}
|
||||
},
|
||||
causalDest: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
components: { CLabel, CSendCoins },
|
||||
setup(props) {
|
||||
|
||||
@@ -1,26 +1,9 @@
|
||||
<template>
|
||||
<div class="row justify-evenly items-center q-pa-sm q-ma-sm">
|
||||
<div v-if="(getLinkUserTelegram() && tools.isUserOk()) || showBtnActivities"
|
||||
class="row justify-evenly items-center q-pa-sm q-ma-sm">
|
||||
<q-inner-loading id="spinner" :showing="loading">
|
||||
<q-spinner-tail color="primary" size="4em"> </q-spinner-tail>
|
||||
</q-inner-loading>
|
||||
<div>
|
||||
<q-btn
|
||||
v-if="
|
||||
tools.isUserOk() &&
|
||||
userStore.showButtonSendCoin(myuser) &&
|
||||
(myuser.username !== userStore.my.username ||
|
||||
userStore.hoContiCollettiviDaAmministrare() ||
|
||||
userStore.hoContiComunitariDaAmministrare())
|
||||
"
|
||||
icon-right="img: images/1ris_rosso_100.png"
|
||||
color="green"
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('circuit.sendcoins')"
|
||||
@click="clickOpenSendCoin"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-if="showBtnActivities">
|
||||
<q-btn
|
||||
v-if="site.confpages && site.confpages.showCompetenze"
|
||||
@@ -76,6 +59,7 @@
|
||||
:showprop="showsendCoinTo"
|
||||
:to_user="myuser"
|
||||
:sendRIS="sendRIS"
|
||||
:causalDest="causalDest"
|
||||
@close="showsendCoinTo = false; loading = false"
|
||||
@showed="loading = false"
|
||||
>
|
||||
|
||||
@@ -40,3 +40,8 @@ $grayshadow: #555;
|
||||
height: 100px;
|
||||
padding: 0.5rem 0.5rem;
|
||||
}
|
||||
|
||||
.wrapword {
|
||||
max-width: 100%; /* Assicurati che il wrapping non superi il contenitore */
|
||||
overflow: hidden; /* Nasconde eventuali overflow */
|
||||
}
|
||||
|
||||
@@ -17,6 +17,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
small: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
setup(props) {
|
||||
@@ -26,9 +31,18 @@ export default defineComponent({
|
||||
tools.copyStringToClipboard($q, props.texttocopy, true)
|
||||
}
|
||||
|
||||
function getclass() {
|
||||
if (props.small) {
|
||||
return 'text-h7'
|
||||
} else {
|
||||
return 'text-h5'
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
copytoclip,
|
||||
tools,
|
||||
getclass,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1,22 +1,53 @@
|
||||
<template>
|
||||
<div class="q-ma-sm">
|
||||
<div :class="($q.dark.isActive ? `bg-black` : `bg-white`) + ` column cursor-pointer`" @click="copytoclip">
|
||||
<q-field outlined :label="title" stack-label class="text-center cursor-pointer" label-color="blue">
|
||||
<template v-slot:prepend v-if="!tools.isMobile()">
|
||||
<q-btn round dense flat icon="far fa-copy"/>
|
||||
<div
|
||||
:class="[
|
||||
$q.dark.isActive ? `bg-black text-white` : `bg-white text-black`,
|
||||
'column cursor-pointer',
|
||||
]"
|
||||
@click="copytoclip"
|
||||
style="max-width: 100%; width: auto; overflow: hidden"
|
||||
>
|
||||
<q-field
|
||||
outlined
|
||||
:label="title"
|
||||
stack-label
|
||||
class="text-center"
|
||||
style="max-width: 100%"
|
||||
label-color="blue"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-btn v-if="!$q.platform.is.mobile" round dense flat icon="far fa-copy" />
|
||||
</template>
|
||||
|
||||
<template v-slot:control>
|
||||
<div class="self-center full-width no-outline text-center wrapword text-h5" tabindex="0">{{tools.firstchars(texttocopy, 300)}}</div>
|
||||
<div
|
||||
class="self-center q-my-xs no-outline text-center wrapword"
|
||||
:class="getclass()"
|
||||
style="
|
||||
overflow-wrap: break-word;
|
||||
word-wrap: break-word;
|
||||
white-space: normal;
|
||||
max-width: 100%; /* Assicurati di limitare la larghezza */
|
||||
"
|
||||
>
|
||||
{{ tools.firstchars(texttocopy, 300) }}
|
||||
</div>
|
||||
</template>
|
||||
</q-field>
|
||||
<div class="row justify-center">
|
||||
<q-btn
|
||||
rounded
|
||||
label="Copia il link" color="primary" @click="copytoclip"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CCopyBtn.ts">
|
||||
</script>
|
||||
<script lang="ts" src="./CCopyBtn.ts"></script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CCopyBtn.scss';
|
||||
@import './CCopyBtn.scss';
|
||||
</style>
|
||||
|
||||
9
src/components/CCopyBtnSmall/CCopyBtnSmall.scss
Executable file
9
src/components/CCopyBtnSmall/CCopyBtnSmall.scss
Executable file
@@ -0,0 +1,9 @@
|
||||
.my-custom-container {
|
||||
max-width: 100%; /* Imposta la larghezza massima per il contenitore */
|
||||
}
|
||||
|
||||
.wrapword {
|
||||
overflow: hidden; /* Nasconde il contenuto in eccesso */
|
||||
white-space: nowrap; /* Impedisce il wrapping del testo */
|
||||
text-overflow: ellipsis; /* Mostra "..." se il testo è troppo lungo */
|
||||
}
|
||||
56
src/components/CCopyBtnSmall/CCopyBtnSmall.ts
Executable file
56
src/components/CCopyBtnSmall/CCopyBtnSmall.ts
Executable file
@@ -0,0 +1,56 @@
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@src/boot/i18n'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { defineComponent } from 'vue'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CCopyBtnSmall',
|
||||
props: {
|
||||
texttocopy: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
small: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
setup(props) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
|
||||
async function copytoclipandsend() {
|
||||
tools.copyStringToClipboard($q, props.texttocopy, true)
|
||||
|
||||
let msg = 'Questo è il link che puoi condividere per farti inviare i RIS:<br><br>👉🏻 ' + props.texttocopy
|
||||
|
||||
tools.sendMsgTelegramCmd($q, t, shared_consts.MsgTeleg.SHARE_TEXT, false, msg)
|
||||
|
||||
}
|
||||
|
||||
function getclass() {
|
||||
if (props.small) {
|
||||
return 'text-h7'
|
||||
} else {
|
||||
return 'text-h5'
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
copytoclipandsend,
|
||||
tools,
|
||||
getclass,
|
||||
t,
|
||||
}
|
||||
},
|
||||
})
|
||||
16
src/components/CCopyBtnSmall/CCopyBtnSmall.vue
Executable file
16
src/components/CCopyBtnSmall/CCopyBtnSmall.vue
Executable file
@@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<div class="" style="width: 100%; overflow: hidden;">
|
||||
<div class="row justify-center">
|
||||
{{ tools.firstchars(texttocopy, 80) }}
|
||||
</div>
|
||||
<div class="row justify-center q-mt-sm">
|
||||
<q-btn rounded label="Condividi link" color="primary" @click="copytoclipandsend" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CCopyBtnSmall.ts"></script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CCopyBtnSmall.scss';
|
||||
</style>
|
||||
1
src/components/CCopyBtnSmall/index.ts
Executable file
1
src/components/CCopyBtnSmall/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CCopyBtnSmall} from './CCopyBtnSmall.vue'
|
||||
6
src/components/CFindUsers/CFindUsers.scss
Executable file
6
src/components/CFindUsers/CFindUsers.scss
Executable file
@@ -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;
|
||||
}
|
||||
222
src/components/CFindUsers/CFindUsers.ts
Executable file
222
src/components/CFindUsers/CFindUsers.ts
Executable file
@@ -0,0 +1,222 @@
|
||||
import { computed, defineComponent, onMounted, PropType, ref, watch, reactive, toRefs } from 'vue'
|
||||
|
||||
import { ICalcStat, IOperators, ISearchList } from '../../model'
|
||||
import { useUserStore } from '../../store/UserStore'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useGlobalStore } from '../../store/globalStore'
|
||||
import { useCircuitStore } from '../../store/CircuitStore'
|
||||
import { useI18n } from '../../boot/i18n'
|
||||
|
||||
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 { CQRCode } from '../CQRCode'
|
||||
import { CCopyBtnSmall } from '../CCopyBtnSmall'
|
||||
import { CContactUser } from '../CContactUser'
|
||||
import { CGridTableRec } from '../CGridTableRec'
|
||||
import { CUserInfoAccount } from '../CUserInfoAccount'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { useQuasar } from 'quasar'
|
||||
|
||||
import { colmyUserPeople } from '@store/Modules/fieldsTable'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CFindUsers',
|
||||
props: {
|
||||
actionType: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: costanti.ACTIONTYPE.SEND_RIS,
|
||||
},
|
||||
sendRIS: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
components: {
|
||||
CMyUser, CMyGroup, CUserInfoAccount, CCopyBtnSmall,
|
||||
CTitleBanner, CContactUser, CGridTableRec, CQRCode
|
||||
},
|
||||
setup(props) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
const globalStore = useGlobalStore()
|
||||
const circuitStore = useCircuitStore()
|
||||
const { t } = useI18n()
|
||||
const $q = useQuasar()
|
||||
const $router = useRouter()
|
||||
|
||||
const receiveRislist = computed(() => globalStore.datastat ? globalStore.datastat.receiveRislist : [])
|
||||
const receiveRislistgroup = computed(() => globalStore.datastat ? globalStore.datastat.receiveRislistgroup : [])
|
||||
|
||||
const arrfilterand: any = ref([])
|
||||
const filtercustom: any = ref([])
|
||||
const searchList = ref(<ISearchList[]>[])
|
||||
|
||||
const filter = ref(costanti.FIND_PEOPLE)
|
||||
|
||||
const loading = ref(false)
|
||||
const tipoConto = ref(0)
|
||||
|
||||
const contact = computed(() => userStore.my)
|
||||
|
||||
const searchType = ref('username')
|
||||
|
||||
const usersList = ref(<any>{ show: false, title: '', list: [], listgroup: [] })
|
||||
|
||||
const options = ref([
|
||||
{
|
||||
label: 'Cerca per Nome o Username',
|
||||
value: 'username'
|
||||
},
|
||||
{
|
||||
label: 'Lista dei Riceventi di oggi',
|
||||
value: 'receivers'
|
||||
},
|
||||
{
|
||||
label: 'Scansiona il QRCode del Destinatario',
|
||||
value: 'qrcode'
|
||||
},
|
||||
])
|
||||
|
||||
const arrTypesAccounts = ref(<any>[
|
||||
{
|
||||
label: t('circuit.user'),
|
||||
value: shared_consts.AccountType.USER,
|
||||
},
|
||||
{
|
||||
label: t('circuit.conticollettivi'),
|
||||
value: shared_consts.AccountType.COLLECTIVE_ACCOUNT,
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
function getFilterProvinceByRegion(recProvince: any, index: number, arr: any) {
|
||||
const recreg: any = searchList.value.find((rec) => rec.table === 'regions')
|
||||
if (recreg) {
|
||||
return recProvince.reg === recreg.value
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
function mounted() {
|
||||
|
||||
searchList.value = [
|
||||
{
|
||||
label: 'Regione',
|
||||
table: 'regions',
|
||||
key: 'idReg',
|
||||
type: costanti.FieldType.select,
|
||||
value: tools.getCookie(tools.COOK_SEARCH + 'regions_fr', costanti.FILTER_TUTTI),
|
||||
keycookie: '_fr',
|
||||
addall: true,
|
||||
arrvalue: [],
|
||||
filter: null,
|
||||
useinput: false,
|
||||
icon: 'fas fa-globe-europe'
|
||||
},
|
||||
{
|
||||
label: 'Provincia',
|
||||
table: 'provinces',
|
||||
key: 'profile.resid_province',
|
||||
type: costanti.FieldType.select,
|
||||
value: tools.getCookie(tools.COOK_SEARCH + 'provinces_fr', costanti.FILTER_TUTTI),
|
||||
keycookie: '_fr',
|
||||
addall: true,
|
||||
arrvalue: [],
|
||||
filter: getFilterProvinceByRegion,
|
||||
useinput: true,
|
||||
icon: 'flag',
|
||||
tablesel: 'provinces',
|
||||
},
|
||||
]
|
||||
|
||||
filtercustom.value = []
|
||||
arrfilterand.value = []
|
||||
|
||||
const filt_loaded = tools.getCookie(tools.COOK_SEARCH + tools.FRIENDS_SEARCH, costanti.FIND_PEOPLE, true)
|
||||
filter.value = filt_loaded ? filt_loaded : costanti.FIND_PEOPLE
|
||||
|
||||
updateUserListRIS()
|
||||
|
||||
sendCoinsToClick()
|
||||
}
|
||||
|
||||
function extraparams() {
|
||||
|
||||
return {
|
||||
lookup1: {
|
||||
lk_tab: 'provinces',
|
||||
lk_LF: 'profile.resid_province',
|
||||
lk_FF: 'prov',
|
||||
lk_as: 'mycities',
|
||||
lk_proj: {
|
||||
username: 1,
|
||||
name: 1,
|
||||
surname: 1,
|
||||
verified_by_aportador: 1,
|
||||
'profile.handshake': 1,
|
||||
'profile.img': 1,
|
||||
'profile.mygroups': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
'mycities.reg': 1,
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
async function updateUserListRIS() {
|
||||
const userStore = useUserStore()
|
||||
|
||||
loading.value = true
|
||||
|
||||
await globalStore.getStatSite()
|
||||
|
||||
usersList.value.list = receiveRislist
|
||||
usersList.value.listgroup = receiveRislistgroup
|
||||
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
async function sendCoinsToClick() {
|
||||
|
||||
usersList.value.show = true;
|
||||
usersList.value.title = t('circuit.sendcoins');
|
||||
usersList.value.list = receiveRislist
|
||||
usersList.value.listgroup = receiveRislistgroup
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
userStore,
|
||||
tools,
|
||||
costanti,
|
||||
shared_consts,
|
||||
arrTypesAccounts,
|
||||
loading,
|
||||
contact,
|
||||
t,
|
||||
extraparams,
|
||||
colmyUserPeople,
|
||||
searchList,
|
||||
options,
|
||||
searchType,
|
||||
updateUserListRIS,
|
||||
usersList,
|
||||
receiveRislist,
|
||||
receiveRislistgroup,
|
||||
tipoConto,
|
||||
CQRCode,
|
||||
}
|
||||
},
|
||||
})
|
||||
116
src/components/CFindUsers/CFindUsers.vue
Executable file
116
src/components/CFindUsers/CFindUsers.vue
Executable file
@@ -0,0 +1,116 @@
|
||||
<template>
|
||||
<q-option-group
|
||||
class="q-ma-xs"
|
||||
style="text-align: left !important"
|
||||
v-model="searchType"
|
||||
:options="options"
|
||||
color="primary"
|
||||
/>
|
||||
<q-tab-panels v-model="searchType" animated class="shadow-2 rounded-borders">
|
||||
<q-tab-panel name="username">
|
||||
<CGridTableRec
|
||||
prop_mytable="users"
|
||||
prop_mytitle=""
|
||||
subtitle=""
|
||||
:prop_mycolumns="colmyUserPeople"
|
||||
prop_colkey="_id"
|
||||
col_title="username"
|
||||
:vertical="costanti.VISUTABLE_LISTA"
|
||||
nodataLabel=" "
|
||||
:prop_search="true"
|
||||
:prop_showfilter="true"
|
||||
hint="Cerca il nome o Username"
|
||||
:hintinbtnsearch="true"
|
||||
:findByDebounce="true"
|
||||
:showSearchOnTop="false"
|
||||
:finder="true"
|
||||
:choose_visutype="false"
|
||||
:finder_noNull="false"
|
||||
:finder_noNullFilters="true"
|
||||
:options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS"
|
||||
:butt_modif_new="false"
|
||||
noresultLabel="Username, Nome o Cognome non trovato"
|
||||
:arrfilters="arrfilterand"
|
||||
:filtercustom="filtercustom"
|
||||
:prop_searchList="searchList"
|
||||
:showType="costanti.SHOW_USERINFO"
|
||||
:showCol="false"
|
||||
:extraparams="extraparams()"
|
||||
:actionType="actionType"
|
||||
>
|
||||
</CGridTableRec>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="receivers">
|
||||
<div class="row centeritems">
|
||||
<q-btn-toggle
|
||||
v-if="arrTypesAccounts.length > 0"
|
||||
v-model="tipoConto"
|
||||
class="my-custom-toggle"
|
||||
no-caps
|
||||
rounded
|
||||
unelevated
|
||||
toggle-color="primary"
|
||||
color="white"
|
||||
text-color="primary"
|
||||
:options="arrTypesAccounts"
|
||||
/>
|
||||
|
||||
<div v-if="tipoConto === shared_consts.AccountType.USER">
|
||||
<div v-for="(rec, i) in usersList.list" :key="i">
|
||||
<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"
|
||||
:actionType="actionType"
|
||||
>
|
||||
</CMyUser>
|
||||
<CContactUser
|
||||
:myuser="rec"
|
||||
:showBtnActivities="false"
|
||||
:sendRIS="tools.isUserOk() ? sendRIS : false"
|
||||
:actionType="actionType"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="tipoConto === shared_consts.AccountType.COLLECTIVE_ACCOUNT"
|
||||
>
|
||||
<div v-for="(grp, i) in usersList.listgroup" :key="i">
|
||||
<CMyGroup :mygrp="grp" :visu="costanti.USER_GROUPS" :noaut="true">
|
||||
</CMyGroup>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row centeritems justify-evenly items-center">
|
||||
<q-btn
|
||||
icon="autorenew"
|
||||
rounded
|
||||
glossy
|
||||
dense
|
||||
color="primary"
|
||||
:label="$t('dialog.update_receivers')"
|
||||
:disable="loading"
|
||||
@click="updateUserListRIS()"
|
||||
>
|
||||
</q-btn>
|
||||
|
||||
<q-spinner-radio v-if="loading" class="q-ma-sm" color="brown" />
|
||||
<div class="q-ma-sm"> </div>
|
||||
<br>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="qrcode">
|
||||
<CQRCode :read="true"></CQRCode>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CFindUsers.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CFindUsers.scss';
|
||||
</style>
|
||||
1
src/components/CFindUsers/index.ts
Executable file
1
src/components/CFindUsers/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CFindUsers} from './CFindUsers.vue'
|
||||
@@ -90,6 +90,21 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
hintinbtnsearch: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
findByDebounce: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
showSearchOnTop: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
hint: {
|
||||
type: String,
|
||||
required: false,
|
||||
@@ -145,6 +160,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
actionType: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 0,
|
||||
},
|
||||
/* keyMain: {
|
||||
type: String,
|
||||
required: false,
|
||||
@@ -1339,7 +1359,7 @@ export default defineComponent({
|
||||
serverData.value = []
|
||||
numRecLoaded.value = 0
|
||||
pagination.value.page = 0
|
||||
search.value = search.value.trim()
|
||||
search.value = search.value ? search.value.trim() : ''
|
||||
|
||||
// console.log('refresh')
|
||||
// console.log('search', search)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div v-if="tools.isDebugOn()"></div>
|
||||
<div :class="$q.screen.lt.sm ? `` : `q-pa-xs`" v-if="isfinishLoading">
|
||||
<q-toggle
|
||||
v-if="tools.isManager() && !showMap"
|
||||
v-if="tools.isManager() && !showMap && editOn"
|
||||
v-model="editOn"
|
||||
color="green"
|
||||
icon="fas fa-pencil-alt"
|
||||
@@ -241,21 +241,17 @@
|
||||
</div>
|
||||
</q-slide-transition>
|
||||
|
||||
<div v-if="prop_search || canEdit">
|
||||
<div
|
||||
v-if="searchList && finder"
|
||||
class="row justify-between q-mb-sm q-mx-sm"
|
||||
>
|
||||
<div v-if="prop_search || canEdit" class="q-gutter-sm">
|
||||
<div v-if="searchList && finder" class="row items-start">
|
||||
<q-btn
|
||||
class=""
|
||||
dense
|
||||
:label="
|
||||
!showfilter ? $t('grid.openfilter') : $t('grid.closefilter')
|
||||
"
|
||||
v-if="searchList && searchList.length > 0"
|
||||
:dense="search"
|
||||
class="q-mx-xs"
|
||||
color="positive"
|
||||
:icon="!showfilter ? 'fas fa-filter' : 'fas fa-arrow-up'"
|
||||
@click="showfilter = !showfilter"
|
||||
><q-badge
|
||||
>
|
||||
<q-badge
|
||||
v-if="getNumFilterSelected()"
|
||||
color="red"
|
||||
floating
|
||||
@@ -264,34 +260,53 @@
|
||||
{{ getNumFilterSelected() }}
|
||||
</q-badge>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="prop_search"
|
||||
class=""
|
||||
|
||||
<q-input
|
||||
v-model="search"
|
||||
filled
|
||||
dense
|
||||
:label="t('grid.search')"
|
||||
type="search"
|
||||
debounce="500"
|
||||
:hint="!hintinbtnsearch ? hint: ''"
|
||||
:error-message="noresultLabel"
|
||||
:error="(getNumRecFromQuery() === 0 && !startsearch) && myfilter !== ''"
|
||||
:label="hintinbtnsearch ? hint : $t('grid.search')"
|
||||
@keyup.enter="doSearch"
|
||||
@clear="myfilter = ''; doSearch()"
|
||||
@update:model-value="findByDebounce ? doSearch() : null"
|
||||
:clearable="!!myfilter"
|
||||
class="col q-mx-xs"
|
||||
style="max-width: 400px"
|
||||
>
|
||||
<template v-if="!search" v-slot:prepend>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<q-btn
|
||||
v-if="prop_search && myfilter || search"
|
||||
color="primary"
|
||||
icon="fas fa-search"
|
||||
@click="showSearchDialog = true"
|
||||
>
|
||||
</q-btn>
|
||||
@click="showSearchOnTop ? showSearchDialog = true : doSearch()"
|
||||
/>
|
||||
|
||||
<q-btn-toggle
|
||||
v-if="shared_consts.TABLES_VISU_MAP.includes(mytable)"
|
||||
v-model="showMap"
|
||||
push
|
||||
glossy
|
||||
dense
|
||||
spread
|
||||
no-caps
|
||||
toggle-color="secondary"
|
||||
:options="[
|
||||
{
|
||||
label: t('grid.showmap'),
|
||||
label: $t('grid.showmap'),
|
||||
value: true,
|
||||
icon: 'fas fa-map-marked-alt',
|
||||
},
|
||||
{ label: t('grid.showlist'), value: false, icon: 'fas fa-list' },
|
||||
{ label: $t('grid.showlist'), value: false, icon: 'fas fa-list' },
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<q-space></q-space>
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
@@ -448,6 +463,7 @@
|
||||
:visu="visufind"
|
||||
:groupname="extrafield"
|
||||
:circuitname="circuitname"
|
||||
:actionType="actionType"
|
||||
:labelextra="col_title ? row[col_title] : ''"
|
||||
:labelFooter="
|
||||
col_footer
|
||||
@@ -1319,7 +1335,7 @@
|
||||
>
|
||||
<q-card class="dialog_card">
|
||||
<q-bar dense class="bg-primary text-white">
|
||||
{{t('dialog.insert')}} {{ mytitlenew }}:
|
||||
{{ t('dialog.insert') }} {{ mytitlenew }}:
|
||||
<q-space />
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-bar>
|
||||
|
||||
@@ -26,6 +26,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
showbuttolastmov: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
emits: ['loaded'],
|
||||
setup(props, { emit }) {
|
||||
@@ -35,10 +40,12 @@ export default defineComponent({
|
||||
const globalStore = useGlobalStore()
|
||||
const { t } = useI18n();
|
||||
|
||||
const loadingvalues = ref(false)
|
||||
const numtransaz = ref(0)
|
||||
const prectransaz = ref(0)
|
||||
|
||||
const tab = ref('tutti')
|
||||
const nummovTodownload = ref(5)
|
||||
|
||||
const mylist = computed(() => {
|
||||
if (globalStore.datastat || userStore.my.profile) {
|
||||
@@ -128,6 +135,13 @@ export default defineComponent({
|
||||
mounted()
|
||||
})
|
||||
|
||||
async function addlastmov() {
|
||||
nummovTodownload.value += 5
|
||||
|
||||
loadingvalues.value = true
|
||||
await globalStore.loadLastMovements(nummovTodownload.value)
|
||||
loadingvalues.value = false
|
||||
}
|
||||
|
||||
return {
|
||||
userStore,
|
||||
@@ -140,6 +154,8 @@ export default defineComponent({
|
||||
navigabyMov,
|
||||
numtransaz,
|
||||
tab,
|
||||
loadingvalues,
|
||||
addlastmov,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -70,6 +70,19 @@
|
||||
>
|
||||
</c-single-movement>
|
||||
</q-list>
|
||||
<q-inner-loading id="spinner" :showing="loadingvalues">
|
||||
<q-spinner-tail size="3em" color="primary" />
|
||||
</q-inner-loading>
|
||||
<div v-if="showbuttolastmov" class="row justify-center">
|
||||
<q-btn
|
||||
rounded
|
||||
dense
|
||||
class="text-center"
|
||||
color="primary"
|
||||
:label="t('circuit.show_next_mov')"
|
||||
@click="addlastmov()"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMovements.ts">
|
||||
|
||||
@@ -94,6 +94,7 @@ export default defineComponent({
|
||||
const mystr = getlinkpage()
|
||||
tools.copyStringToClipboard($q, mystr, true)
|
||||
tools.sendMsgTelegramCmd($q, t, shared_consts.MsgTeleg.SHARE_TEXT, false, mystr)
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
:small="true"
|
||||
:open="false"
|
||||
>
|
||||
<CMovements @loaded="movcaricati" :username="username">
|
||||
<CMovements @loaded="movcaricati" :username="username" :showbuttolastmov="false">
|
||||
<div class="row justify-center"><q-btn
|
||||
rounded
|
||||
dense
|
||||
|
||||
@@ -476,7 +476,7 @@
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.MOVEMENTS">
|
||||
<div v-if="editOn" class="elemEdit">Lista Movimenti</div>
|
||||
<CMovements></CMovements>
|
||||
<CMovements :showbuttolastmov="true"></CMovements>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CSENDRISTO">
|
||||
<div v-if="editOn" class="elemEdit">CSendRISTo</div>
|
||||
|
||||
@@ -115,8 +115,8 @@ export default defineComponent({
|
||||
|
||||
if (numAskTrust.value > 0 || props.modelValue === costanti.ASK_TRUST)
|
||||
mybutt.push({ label: t('mypages.request_trust') + ' (' + numAskTrust.value + ')', value: costanti.ASK_TRUST })
|
||||
if (numTrusted.value > 0 || props.modelValue === costanti.TRUSTED)
|
||||
mybutt.push({ label: t('mypages.trusted') + ' (' + numTrusted.value + ')', value: costanti.TRUSTED })
|
||||
//if (numTrusted.value > 0 || props.modelValue === costanti.TRUSTED)
|
||||
// mybutt.push({ label: t('mypages.trusted') + ' (' + numTrusted.value + ')', value: costanti.TRUSTED })
|
||||
if (numRejected.value > 0 || props.modelValue === costanti.REJECTED)
|
||||
mybutt.push({ label: t('mypages.rejected') + ' (' + numRejected.value + ')', value: costanti.REJECTED })
|
||||
|
||||
|
||||
@@ -22,6 +22,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
actionType: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: costanti.ACTIONTYPE.NONE,
|
||||
},
|
||||
myusername: {
|
||||
type: String,
|
||||
required: false,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</q-avatar>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section @click="naviga(`/my/` + contact.username)">
|
||||
<q-item-section @click="actionType === costanti.ACTIONTYPE.SEND_RIS ? naviga(`/my/` + contact.username + '?sr=0') : naviga(`/my/` + contact.username)">
|
||||
<q-item-label v-if="labelextra && labelextra !== contact.username"
|
||||
><strong>{{ labelextra }}</strong></q-item-label
|
||||
>
|
||||
@@ -422,10 +422,13 @@
|
||||
clickable
|
||||
v-close-popup
|
||||
dense
|
||||
@click="naviga(`/my/` + contact.username + '?sendris=0')"
|
||||
@click="naviga(`/my/` + contact.username + '?sr=0')"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="positive" name="img: images/1ris_rosso_100.png" />
|
||||
<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 +457,10 @@
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="positive" name="img: images/1ris_rosso_100.png" />
|
||||
<q-icon
|
||||
color="positive"
|
||||
name="img: images/1ris_rosso_100.png"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
{{ $t('circuit.enablefido') }}
|
||||
@@ -787,203 +793,216 @@
|
||||
side
|
||||
v-else-if="visu === costanti.FIND_PEOPLE || visu === costanti.HANDSHAKE"
|
||||
>
|
||||
<q-item-label>
|
||||
<q-btn
|
||||
v-if="contact.username !== userStore.my.username"
|
||||
rounded
|
||||
dense
|
||||
icon="fas fa-ellipsis-h"
|
||||
>
|
||||
<!-- </q-btn></q-btn>:icon="
|
||||
<div v-if="actionType === costanti.ACTIONTYPE.SEND_RIS">
|
||||
<q-icon
|
||||
name="img: images/1ris_rosso_100.png"
|
||||
:size="`lg`"
|
||||
/>
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-item-label>
|
||||
<q-btn
|
||||
v-if="contact.username !== userStore.my.username"
|
||||
rounded
|
||||
dense
|
||||
icon="fas fa-ellipsis-h"
|
||||
>
|
||||
<!-- </q-btn></q-btn>:icon="
|
||||
userStore.IsMyFriendByUsername(contact.username)
|
||||
? `fas fa-ellipsis-h`
|
||||
: `fas fa-user`
|
||||
"-->
|
||||
<q-menu>
|
||||
<q-list style="min-width: 200px">
|
||||
<q-item
|
||||
v-if="
|
||||
userStore.showButtonSendCoin(contact) &&
|
||||
(contact.username !== userStore.my.username ||
|
||||
userStore.hoContiCollettiviDaAmministrare() ||
|
||||
userStore.hoContiComunitariDaAmministrare())
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
dense
|
||||
@click="naviga(`/my/` + contact.username + '?sendris=0')"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<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>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
dense
|
||||
@click="naviga(`/my/` + contact.username)"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="primary" name="fas fa-user" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('shared.profile') }}</q-item-section>
|
||||
</q-item>
|
||||
<q-menu>
|
||||
<q-list style="min-width: 200px">
|
||||
<q-item
|
||||
v-if="
|
||||
userStore.showButtonSendCoin(contact) &&
|
||||
(contact.username !== userStore.my.username ||
|
||||
userStore.hoContiCollettiviDaAmministrare() ||
|
||||
userStore.hoContiComunitariDaAmministrare())
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
dense
|
||||
@click="naviga(`/my/` + contact.username + '?sr=0')"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<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>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
dense
|
||||
@click="naviga(`/my/` + contact.username)"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="primary" name="fas fa-user" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('shared.profile') }}</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item
|
||||
v-if="
|
||||
costanti.ENABLE_FRIENDS &&
|
||||
!userStore.IsMyFriendByUsername(contact.username) &&
|
||||
!userStore.IsAskedFriendByUsername(contact.username)
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
setCmd(
|
||||
$q,
|
||||
shared_consts.FRIENDSCMD.REQFRIEND,
|
||||
userStore.my.username,
|
||||
true,
|
||||
contact.username
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="positive" name="fas fa-user-plus" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{
|
||||
$t('friends.ask_friend')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
v-else-if="
|
||||
costanti.ENABLE_FRIENDS &&
|
||||
!userStore.IsMyFriendByUsername(contact.username) &&
|
||||
userStore.IsAskedFriendByUsername(contact.username)
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
setCmd(
|
||||
$q,
|
||||
shared_consts.FRIENDSCMD.REQFRIEND,
|
||||
userStore.my.username,
|
||||
false,
|
||||
contact.username
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-user-minus" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{
|
||||
$t('friends.cancel_ask_friend')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
v-else-if="
|
||||
costanti.ENABLE_FRIENDS &&
|
||||
userStore.IsMyFriendByUsername(contact.username)
|
||||
"
|
||||
style="min-width: 200px"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
setCmd(
|
||||
$q,
|
||||
shared_consts.FRIENDSCMD.REMOVE_FROM_MYFRIENDS,
|
||||
userStore.my.username,
|
||||
'',
|
||||
contact.username
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-user-minus" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{
|
||||
$t('friends.remove_from_myfriends')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
v-if="
|
||||
costanti.ENABLE_FRIENDS &&
|
||||
!userStore.IsMyFriendByUsername(contact.username) &&
|
||||
!userStore.IsAskedFriendByUsername(contact.username)
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
setCmd(
|
||||
$q,
|
||||
shared_consts.FRIENDSCMD.REQFRIEND,
|
||||
userStore.my.username,
|
||||
true,
|
||||
contact.username
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="positive" name="fas fa-user-plus" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{
|
||||
$t('friends.ask_friend')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
v-else-if="
|
||||
costanti.ENABLE_FRIENDS &&
|
||||
!userStore.IsMyFriendByUsername(contact.username) &&
|
||||
userStore.IsAskedFriendByUsername(contact.username)
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
setCmd(
|
||||
$q,
|
||||
shared_consts.FRIENDSCMD.REQFRIEND,
|
||||
userStore.my.username,
|
||||
false,
|
||||
contact.username
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-user-minus" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{
|
||||
$t('friends.cancel_ask_friend')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
v-else-if="
|
||||
costanti.ENABLE_FRIENDS &&
|
||||
userStore.IsMyFriendByUsername(contact.username)
|
||||
"
|
||||
style="min-width: 200px"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
setCmd(
|
||||
$q,
|
||||
shared_consts.FRIENDSCMD.REMOVE_FROM_MYFRIENDS,
|
||||
userStore.my.username,
|
||||
'',
|
||||
contact.username
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-user-minus" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{
|
||||
$t('friends.remove_from_myfriends')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item
|
||||
v-if="!userStore.IsHandShakeByMe(contact)"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
setCmd(
|
||||
$q,
|
||||
shared_consts.FRIENDSCMD.SETHANDSHAKE,
|
||||
userStore.my.username,
|
||||
true,
|
||||
contact.username
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="positive" name="far fa-handshake" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{
|
||||
$t('handshake.ask_handshake')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
v-else
|
||||
style="min-width: 200px"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
setCmd(
|
||||
$q,
|
||||
shared_consts.FRIENDSCMD.REMOVE_FROM_MYHANDSHAKE,
|
||||
userStore.my.username,
|
||||
'',
|
||||
contact.username
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-handshake-slash" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{
|
||||
$t('handshake.remove_from_myhandshake')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
v-if="circuit"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="showAccountInfo = true"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon name="fas fa-info" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{
|
||||
$t('groups.infoaccount')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
tools.reportUser(
|
||||
$q,
|
||||
userStore.my.username,
|
||||
contact.username
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-flag" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{
|
||||
$t('friends.report_user')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
<q-item
|
||||
v-if="!userStore.IsHandShakeByMe(contact)"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
setCmd(
|
||||
$q,
|
||||
shared_consts.FRIENDSCMD.SETHANDSHAKE,
|
||||
userStore.my.username,
|
||||
true,
|
||||
contact.username
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="positive" name="far fa-handshake" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{
|
||||
$t('handshake.ask_handshake')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
v-else
|
||||
style="min-width: 200px"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
setCmd(
|
||||
$q,
|
||||
shared_consts.FRIENDSCMD.REMOVE_FROM_MYHANDSHAKE,
|
||||
userStore.my.username,
|
||||
'',
|
||||
contact.username
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-handshake-slash" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{
|
||||
$t('handshake.remove_from_myhandshake')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
v-if="circuit"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="showAccountInfo = true"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon name="fas fa-info" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{
|
||||
$t('groups.infoaccount')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
tools.reportUser(
|
||||
$q,
|
||||
userStore.my.username,
|
||||
contact.username
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-flag" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{
|
||||
$t('friends.report_user')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
</div>
|
||||
</q-item-section>
|
||||
<q-item-section side v-else-if="visu === costanti.REJECTED">
|
||||
<q-item-label>
|
||||
|
||||
17
src/components/CQRCode/CQRCode.scss
Executable file
17
src/components/CQRCode/CQRCode.scss
Executable file
@@ -0,0 +1,17 @@
|
||||
|
||||
.button_download{
|
||||
display: inline-block !important;
|
||||
padding: 10px 20px !important;
|
||||
font-size: 16px !important;
|
||||
font-weight: 500;
|
||||
color: #ffffff !important;
|
||||
background-color: #027be3 !important;
|
||||
/* Colore primario di Quasar */
|
||||
border: none !important;
|
||||
border-radius: 4px !important;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
transition: background-color 0.3s, box-shadow 0.3s;
|
||||
|
||||
}
|
||||
87
src/components/CQRCode/CQRCode.ts
Executable file
87
src/components/CQRCode/CQRCode.ts
Executable file
@@ -0,0 +1,87 @@
|
||||
import {
|
||||
computed,
|
||||
provide, defineComponent, onBeforeMount, onBeforeUnmount, onMounted, ref, toRef, toRefs, watch, reactive
|
||||
} from 'vue'
|
||||
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { costanti } from '@costanti'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { useQuasar } from 'quasar'
|
||||
|
||||
import QrcodeVue from 'qrcode-vue3'
|
||||
|
||||
import { QrStream, QrCapture, QrDropzone } from 'vue3-qr-reader'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CQRCode',
|
||||
emits: [''],
|
||||
props: {
|
||||
link: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
textlink: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
read: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
components: {
|
||||
QrcodeVue, QrStream,
|
||||
QrCapture,
|
||||
QrDropzone
|
||||
},
|
||||
setup(props, { attrs, slots, emit }) {
|
||||
const { t } = useI18n()
|
||||
const $q = useQuasar()
|
||||
const globalStore = useGlobalStore()
|
||||
const userStore = useUserStore()
|
||||
const $router = useRouter()
|
||||
|
||||
const state = reactive({
|
||||
data: null
|
||||
})
|
||||
|
||||
function onDecode(data: any) {
|
||||
if (data)
|
||||
state.data = data
|
||||
}
|
||||
|
||||
const text = ref('');
|
||||
|
||||
function naviga(path: string) {
|
||||
$router.push(path)
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
function mounted() {
|
||||
// ...
|
||||
}
|
||||
|
||||
return {
|
||||
t,
|
||||
tools,
|
||||
costanti,
|
||||
toolsext,
|
||||
text,
|
||||
userStore,
|
||||
...toRefs(state),
|
||||
onDecode,
|
||||
naviga,
|
||||
}
|
||||
},
|
||||
})
|
||||
70
src/components/CQRCode/CQRCode.vue
Executable file
70
src/components/CQRCode/CQRCode.vue
Executable file
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="read">
|
||||
<div class="stream">
|
||||
<qr-stream @decode="onDecode" class="mb">
|
||||
<div style="color: red" class="frame"></div>
|
||||
</qr-stream>
|
||||
|
||||
<br />
|
||||
<qr-capture @decode="onDecode" class="mb"></qr-capture>
|
||||
</div>
|
||||
<div class="row justify-center q-ma-sm">
|
||||
<q-btn
|
||||
v-if="data && data.startsWith('http')"
|
||||
class="q-ma-sm"
|
||||
dense
|
||||
color="positive"
|
||||
@click="tools.openUrl(data)"
|
||||
label="APRI PAGINA"
|
||||
>
|
||||
</q-btn>
|
||||
<br />
|
||||
<div v-if="data && data.startsWith('http')" class="result">
|
||||
Link: {{ data }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="q-ma-sm">
|
||||
{{textlink}}<br>
|
||||
{{link}}
|
||||
</div>
|
||||
<qrcode-vue
|
||||
:width="250"
|
||||
:height="250"
|
||||
:qrOptions="{ typeNumber: 0, mode: 'Byte', errorCorrectionLevel: 'H' }"
|
||||
:imageOptions="{ hideBackgroundDots: true, imageSize: 0.4, margin: 0 }"
|
||||
:dotsOptions="{
|
||||
type: 'dots',
|
||||
color: '#26249a',
|
||||
gradient: {
|
||||
type: 'linear',
|
||||
rotation: 0,
|
||||
colorStops: [
|
||||
{ offset: 0, color: '#26249a' },
|
||||
{ offset: 1, color: '#26249a' },
|
||||
],
|
||||
},
|
||||
}"
|
||||
:image="tools.getimglogo()"
|
||||
:cornersSquareOptions="{ type: 'dot', color: '#000000' }"
|
||||
:cornersDotOptions="{ type: undefined, color: '#000000' }"
|
||||
fileExt="png"
|
||||
:download="true"
|
||||
:value="link"
|
||||
downloadButton="button_download"
|
||||
:downloadOptions="{
|
||||
name: 'qrcode-riso-' + userStore.my.username,
|
||||
extension: 'png',
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CQRCode.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './CQRCode.scss';
|
||||
</style>
|
||||
1
src/components/CQRCode/index.ts
Executable file
1
src/components/CQRCode/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export { default as CQRCode } from './CQRCode.vue'
|
||||
@@ -130,6 +130,15 @@
|
||||
:canModify="false"
|
||||
>
|
||||
</CMyFieldRec>
|
||||
<CMyFieldRec
|
||||
table="sendnotifs"
|
||||
:id="myrec.result._id"
|
||||
:rec="myrec.result"
|
||||
field="extrarec.causalDest"
|
||||
:canEdit="false"
|
||||
:canModify="false"
|
||||
>
|
||||
</CMyFieldRec>
|
||||
|
||||
<!--<span v-for="(mycol, indcol) of colTableNotifCoins" :key="indcol">
|
||||
<div
|
||||
|
||||
@@ -80,3 +80,12 @@ $grayshadow: #555;
|
||||
border: blue solid 1px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.causalDest{
|
||||
color: black;
|
||||
font-style: italic;
|
||||
margin: 8px;
|
||||
padding: 8px;
|
||||
border: blue solid 1px;
|
||||
padding: 16px;
|
||||
}
|
||||
@@ -57,6 +57,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
causalDest: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
components: { CSaldo, CMyUserOnlyView, CMyGroupOnlyView, CCheckCircuitsEnabled, CNumericKeyboard },
|
||||
|
||||
@@ -75,6 +80,7 @@ export default defineComponent({
|
||||
const qty = ref(<string | number>'')
|
||||
const causal = ref('')
|
||||
const loading = ref(false)
|
||||
const visubanner = ref(true)
|
||||
const bothcircuits = ref(<any>[])
|
||||
|
||||
const showProvinceToSelect = ref(false)
|
||||
@@ -349,6 +355,7 @@ export default defineComponent({
|
||||
circuitname: circuitsel.value,
|
||||
causal: causal.value,
|
||||
symbol: circuitloaded.value.symbol,
|
||||
causalDest: props.causalDest,
|
||||
}
|
||||
|
||||
myrecsendcoin.groupdest = props.to_group ? props.to_group.groupname : ''
|
||||
@@ -506,6 +513,7 @@ export default defineComponent({
|
||||
getTitle,
|
||||
getIcon,
|
||||
sendCoinDialog,
|
||||
visubanner,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -33,128 +33,134 @@
|
||||
<CCheckCircuitsEnabled :to_user="to_user" :to_group="to_group">
|
||||
</CCheckCircuitsEnabled>
|
||||
|
||||
<q-select
|
||||
v-if="!circuitname"
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
rounded
|
||||
dense
|
||||
outlined
|
||||
v-model="circuitsel"
|
||||
:options="bothcircuits"
|
||||
label="Circuito"
|
||||
>
|
||||
</q-select>
|
||||
<div v-else>{{ circuitname }}</div>
|
||||
<div v-if="circuitloaded.length > 0">
|
||||
<q-select
|
||||
v-if="!circuitname"
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
rounded
|
||||
dense
|
||||
outlined
|
||||
v-model="circuitsel"
|
||||
:options="bothcircuits"
|
||||
label="Circuito"
|
||||
>
|
||||
</q-select>
|
||||
<div v-else>{{ circuitname }}</div>
|
||||
</div>
|
||||
|
||||
<q-banner
|
||||
v-if="showProvinceToSelect"
|
||||
rounded
|
||||
class="bg-red text-white"
|
||||
style="text-align: center"
|
||||
style="text-align: center;"
|
||||
>
|
||||
<em style="font-weight: bold">{{
|
||||
$t('circuit.insertprovince_text')
|
||||
}}</em
|
||||
><br />
|
||||
</q-banner>
|
||||
|
||||
<q-banner
|
||||
rounded
|
||||
dense
|
||||
class="shadow-5 q-my-sm"
|
||||
color="primary q-title"
|
||||
style="text-align: center"
|
||||
>
|
||||
<div class="mybanner_left q-mb-sm">
|
||||
<q-select
|
||||
v-if="arrTypesAccounts.length > 0"
|
||||
v-model="tipoConto"
|
||||
class="my-custom-select"
|
||||
outlined
|
||||
bg-color="light-blue-2"
|
||||
emit-value
|
||||
map-options
|
||||
:options="arrTypesAccounts"
|
||||
:label="$t('circuit.sender')"
|
||||
></q-select>
|
||||
<div>
|
||||
<em style="font-weight: bold">{{
|
||||
$t('circuit.insertprovince_text')
|
||||
}}</em>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
tipoConto === shared_consts.AccountType.COLLECTIVE_ACCOUNT
|
||||
"
|
||||
<br />
|
||||
</q-banner>
|
||||
<br />
|
||||
<div v-if="circuitsel">
|
||||
<q-banner
|
||||
rounded
|
||||
dense
|
||||
class="shadow-5 q-my-sm"
|
||||
color="primary q-title"
|
||||
style="text-align: center"
|
||||
>
|
||||
<q-select
|
||||
v-model="from_groupname"
|
||||
:options="arrGroupsList"
|
||||
:label="$t('circuit.choosecontocom')"
|
||||
rounded
|
||||
emit-value
|
||||
map-options
|
||||
<div class="mybanner_left q-mb-sm">
|
||||
<q-select
|
||||
v-if="arrTypesAccounts.length > 0"
|
||||
v-model="tipoConto"
|
||||
class="my-custom-select"
|
||||
outlined
|
||||
bg-color="light-blue-2"
|
||||
emit-value
|
||||
map-options
|
||||
:options="arrTypesAccounts"
|
||||
:label="$t('circuit.sender')"
|
||||
></q-select>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
tipoConto === shared_consts.AccountType.COLLECTIVE_ACCOUNT
|
||||
"
|
||||
>
|
||||
<!-- Mostra i gruppi su cui sei Admin -->
|
||||
</q-select>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
tipoConto === shared_consts.AccountType.COMMUNITY_ACCOUNT
|
||||
"
|
||||
>
|
||||
<q-input
|
||||
v-model="from_contocom"
|
||||
:label="$t('circuit.contocom')"
|
||||
readonly
|
||||
class="q-my-sm"
|
||||
<q-select
|
||||
v-model="from_groupname"
|
||||
:options="arrGroupsList"
|
||||
:label="$t('circuit.choosecontocom')"
|
||||
rounded
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
<!-- Mostra i gruppi su cui sei Admin -->
|
||||
</q-select>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
tipoConto === shared_consts.AccountType.COMMUNITY_ACCOUNT
|
||||
"
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
<q-input
|
||||
v-model="from_contocom"
|
||||
:label="$t('circuit.contocom')"
|
||||
readonly
|
||||
class="q-my-sm"
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
|
||||
<CSaldo
|
||||
v-if="circuitloaded && circuitloaded.symbol"
|
||||
:symbol="circuitloaded.symbol"
|
||||
:color="circuitloaded.color"
|
||||
:saldo="accountloaded ? accountloaded.saldo : 0"
|
||||
:qtarem="
|
||||
accountloaded
|
||||
? circuitStore.getRemainingCoinsToSend(accountloaded)
|
||||
: 0
|
||||
"
|
||||
>
|
||||
</CSaldo>
|
||||
</q-banner>
|
||||
<CSaldo
|
||||
v-if="circuitloaded && circuitloaded.symbol"
|
||||
:symbol="circuitloaded.symbol"
|
||||
:color="circuitloaded.color"
|
||||
:saldo="accountloaded ? accountloaded.saldo : 0"
|
||||
:qtarem="
|
||||
accountloaded
|
||||
? circuitStore.getRemainingCoinsToSend(accountloaded)
|
||||
: 0
|
||||
"
|
||||
>
|
||||
</CSaldo>
|
||||
</q-banner>
|
||||
|
||||
<q-banner
|
||||
rounded
|
||||
dense
|
||||
class="shadow-5 q-my-sm"
|
||||
color="primary q-title"
|
||||
>
|
||||
<div class="mybanner_left bg-green text-white q-mb-sm">
|
||||
{{ $t('circuit.dest') }}
|
||||
</div>
|
||||
<q-banner
|
||||
rounded
|
||||
dense
|
||||
class="shadow-5 q-my-sm"
|
||||
color="primary q-title"
|
||||
>
|
||||
<div class="mybanner_left bg-green text-white q-mb-sm">
|
||||
{{ $t('circuit.dest') }}
|
||||
</div>
|
||||
|
||||
<!-- Destination -->
|
||||
<CMyUserOnlyView
|
||||
v-if="to_user"
|
||||
:mycontact="to_user"
|
||||
:visu="costanti.FIND_PEOPLE"
|
||||
@setCmd="tools.setCmd"
|
||||
>
|
||||
</CMyUserOnlyView>
|
||||
<CMyGroupOnlyView
|
||||
v-if="to_group"
|
||||
:mygrp="to_group"
|
||||
:visu="costanti.USER_GROUPS"
|
||||
:circuitname="circuitloaded.name"
|
||||
>
|
||||
</CMyGroupOnlyView>
|
||||
<CMyGroupOnlyView
|
||||
v-if="circuitloaded && !!circuitloaded._id && to_contocom"
|
||||
:mygrp="{ groupname: to_contocom }"
|
||||
:visu="costanti.USER_GROUPS"
|
||||
:circuitname="circuitloaded.name"
|
||||
>
|
||||
</CMyGroupOnlyView>
|
||||
</q-banner>
|
||||
<!-- Destination -->
|
||||
<CMyUserOnlyView
|
||||
v-if="to_user"
|
||||
:mycontact="to_user"
|
||||
:visu="costanti.FIND_PEOPLE"
|
||||
@setCmd="tools.setCmd"
|
||||
>
|
||||
</CMyUserOnlyView>
|
||||
<CMyGroupOnlyView
|
||||
v-if="to_group"
|
||||
:mygrp="to_group"
|
||||
:visu="costanti.USER_GROUPS"
|
||||
:circuitname="circuitloaded.name"
|
||||
>
|
||||
</CMyGroupOnlyView>
|
||||
<CMyGroupOnlyView
|
||||
v-if="circuitloaded && !!circuitloaded._id && to_contocom"
|
||||
:mygrp="{ groupname: to_contocom }"
|
||||
:visu="costanti.USER_GROUPS"
|
||||
:circuitname="circuitloaded.name"
|
||||
>
|
||||
</CMyGroupOnlyView>
|
||||
</q-banner>
|
||||
</div>
|
||||
|
||||
<q-inner-loading id="spinner" :showing="loading">
|
||||
<q-spinner-tail size="6em" color="primary" />
|
||||
@@ -257,19 +263,59 @@
|
||||
>
|
||||
</CMyGroupOnlyView>
|
||||
|
||||
<q-field class="text-center text-bold">
|
||||
<div v-if="causalDest">
|
||||
<q-field
|
||||
rounded
|
||||
filled
|
||||
:label="t('circuit.descrizione_destinatario')"
|
||||
stack-label
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="description" />
|
||||
</template>
|
||||
<template v-slot:control>
|
||||
<div class="self-center full-width no-outline" tabindex="0">
|
||||
{{ causalDest }}
|
||||
</div>
|
||||
</template>
|
||||
</q-field>
|
||||
</div>
|
||||
|
||||
<!--<q-banner v-if="visubanner" rounded class="text-center text-bold">
|
||||
{{ $t('circuit.descr_casuale') }}
|
||||
</q-field>
|
||||
<template v-slot:action>
|
||||
<q-btn label="Chiudi" flat @click="visubanner = false"></q-btn>
|
||||
</template>
|
||||
</q-banner>-->
|
||||
<div class="q-mt-sm text-italic text-blue text-bold">
|
||||
{{ $t('circuit.descr_casuale') }}
|
||||
</div>
|
||||
<q-input
|
||||
ref="causalRef"
|
||||
v-model="causal"
|
||||
type="textarea"
|
||||
autogrow
|
||||
rounded
|
||||
filled
|
||||
maxlength="500"
|
||||
maxlength="200"
|
||||
counter
|
||||
:label="$t('circuit.note')"
|
||||
class="q-my-sm full-width"
|
||||
>
|
||||
<template v-slot:after>
|
||||
<q-avatar>
|
||||
<img
|
||||
:src="
|
||||
userStore.my.profile
|
||||
? userStore.getImgByProfile(userStore.my)
|
||||
: ''
|
||||
"
|
||||
:alt="userStore.my.username"
|
||||
/>
|
||||
</q-avatar>
|
||||
</template>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="comment" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<div class="sendris">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { computed, defineComponent, PropType, ref, watch } from 'vue'
|
||||
import { computed, defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
||||
|
||||
import { ICalcStat, IOperators } from '../../model'
|
||||
import { useUserStore } from '../../store/UserStore'
|
||||
@@ -13,8 +13,10 @@ import { costanti, IMainCard } from '@store/Modules/costanti'
|
||||
import { CMyUser } from '../CMyUser'
|
||||
import { CTitleBanner } from '../CTitleBanner'
|
||||
import { CMyGroup } from '../CMyGroup'
|
||||
import { CCopyBtn } from '../CCopyBtn'
|
||||
import { CCopyBtnSmall } from '../CCopyBtnSmall'
|
||||
import { CContactUser } from '../CContactUser'
|
||||
import { CQRCode } from '../CQRCode'
|
||||
import { CFindUsers } from '../CFindUsers'
|
||||
import { CUserInfoAccount } from '../CUserInfoAccount'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { useQuasar } from 'quasar'
|
||||
@@ -23,8 +25,8 @@ export default defineComponent({
|
||||
name: 'CSendRISTo',
|
||||
props: {},
|
||||
components: {
|
||||
CMyUser, CMyGroup, CUserInfoAccount, CCopyBtn,
|
||||
CTitleBanner, CContactUser
|
||||
CMyUser, CMyGroup, CUserInfoAccount, CCopyBtnSmall,
|
||||
CTitleBanner, CContactUser, CFindUsers, CQRCode
|
||||
},
|
||||
setup(props) {
|
||||
|
||||
@@ -35,21 +37,48 @@ export default defineComponent({
|
||||
const $q = useQuasar()
|
||||
const $router = useRouter()
|
||||
|
||||
const receiveRislist = computed(() => globalStore.datastat ? globalStore.datastat.receiveRislist : [])
|
||||
const receiveRislistgroup = computed(() => globalStore.datastat ? globalStore.datastat.receiveRislistgroup : [])
|
||||
const showSendCoin = ref(false)
|
||||
const showReceiveCoin = ref(false)
|
||||
const receiveType = ref('link')
|
||||
const riscallrec = ref(<string>'')
|
||||
|
||||
const optionsReceive = ref([
|
||||
{
|
||||
label: 'Condividi il tuo Link',
|
||||
value: 'link',
|
||||
},
|
||||
{
|
||||
label: 'Rendi visibile il tuo profilo per 8 ore',
|
||||
value: 'showonlist',
|
||||
},
|
||||
{
|
||||
label: 'Genera il QR Code',
|
||||
value: 'qrcode',
|
||||
},
|
||||
])
|
||||
|
||||
const usersList = ref(<any>{ show: false, title: '', list: [], listgroup: [] })
|
||||
|
||||
const tipoConto = ref(shared_consts.AccountType.USER)
|
||||
const loading = ref(false)
|
||||
const miolink = ref('')
|
||||
const sendRIS = ref(false)
|
||||
const riceviRIS = ref(false)
|
||||
const qtyRIS = ref('')
|
||||
const causal = ref('')
|
||||
const circuitpath = computed(() => {
|
||||
const circ = circuitStore.getCircuitByProvinceAndCard(userStore.my.profile.resid_province, userStore.my.profile.resid_card)
|
||||
return circ && circ.path ? circ.path : ''
|
||||
})
|
||||
|
||||
watch(() => qtyRIS.value, (to: any, from: any) => {
|
||||
limitQuantity()
|
||||
miolink.value = userStore.getLinkProfileAndRIS('', qtyRIS.value, causal.value)
|
||||
})
|
||||
watch(() => causal.value, (to: any, from: any) => {
|
||||
miolink.value = userStore.getLinkProfileAndRIS('', qtyRIS.value, causal.value)
|
||||
})
|
||||
|
||||
const showonreclist = ref(false)
|
||||
|
||||
const contact = computed(() => userStore.my)
|
||||
|
||||
const arrTypesAccounts = ref(<any>[
|
||||
@@ -63,36 +92,29 @@ export default defineComponent({
|
||||
}
|
||||
])
|
||||
|
||||
async function sendCoinsToClick() {
|
||||
await updateUserListRIS()
|
||||
function mounted() {
|
||||
miolink.value = userStore.getLinkProfileAndRIS('', qtyRIS.value)
|
||||
}
|
||||
|
||||
if ((globalStore.datastat!.receiveRislist!.length > 0 || (globalStore.datastat!.receiveRislistgroup!.length > 0))) {
|
||||
usersList.value.show = true;
|
||||
usersList.value.title = 'Lista Utenti Riceventi';
|
||||
usersList.value.list = globalStore.datastat!.receiveRislist
|
||||
usersList.value.listgroup = globalStore.datastat!.receiveRislistgroup
|
||||
} else {
|
||||
$router.push(tools.updateLink('/circuits'))
|
||||
function limitQuantity() {
|
||||
// Converte qtyRIS in stringa per verificare la lunghezza
|
||||
if (qtyRIS.value.length > 5) {
|
||||
qtyRIS.value = qtyRIS.value.substring(0, 5); // Limita a 5 caratteri
|
||||
}
|
||||
|
||||
qtyRIS.value = qtyRIS.value.replace(',', '.')
|
||||
}
|
||||
|
||||
async function clickAddtoRecList() {
|
||||
const risultato = await tools.addToTemporaryReceiverRIS(t)
|
||||
if (risultato) {
|
||||
riscallrec.value = risultato.msg
|
||||
showonreclist.value = risultato.ris
|
||||
}
|
||||
}
|
||||
|
||||
async function updateUserListRIS() {
|
||||
const userStore = useUserStore()
|
||||
|
||||
loading.value = true
|
||||
|
||||
await globalStore.getStatSite()
|
||||
|
||||
usersList.value.list = globalStore.datastat!.receiveRislist
|
||||
usersList.value.listgroup = globalStore.datastat!.receiveRislistgroup
|
||||
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
function clickRiceviRIS() {
|
||||
miolink.value = 'my/'
|
||||
riceviRIS.value = true
|
||||
}
|
||||
onMounted(mounted)
|
||||
|
||||
|
||||
return {
|
||||
@@ -100,20 +122,24 @@ export default defineComponent({
|
||||
tools,
|
||||
costanti,
|
||||
shared_consts,
|
||||
usersList,
|
||||
receiveRislist,
|
||||
receiveRislistgroup,
|
||||
sendCoinsToClick,
|
||||
arrTypesAccounts,
|
||||
tipoConto,
|
||||
updateUserListRIS,
|
||||
loading,
|
||||
contact,
|
||||
circuitpath,
|
||||
sendRIS,
|
||||
riceviRIS,
|
||||
miolink,
|
||||
clickRiceviRIS,
|
||||
qtyRIS,
|
||||
t,
|
||||
causal,
|
||||
limitQuantity,
|
||||
showSendCoin,
|
||||
optionsReceive,
|
||||
receiveType,
|
||||
showReceiveCoin,
|
||||
showonreclist,
|
||||
riscallrec,
|
||||
clickAddtoRecList,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -10,7 +10,10 @@
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('circuit.sendcoins_toso')"
|
||||
@click="sendCoinsToClick"
|
||||
@click="
|
||||
showSendCoin = !showSendCoin;
|
||||
showSendCoin ? (showReceiveCoin = false) : null;
|
||||
"
|
||||
>
|
||||
</q-btn>
|
||||
|
||||
@@ -20,24 +23,117 @@
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('circuit.receive_coins')"
|
||||
@click="clickRiceviRIS"
|
||||
@click="
|
||||
showReceiveCoin = !showReceiveCoin;
|
||||
showReceiveCoin ? (showSendCoin = false) : null;
|
||||
"
|
||||
>
|
||||
</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>
|
||||
<q-slide-transition>
|
||||
<CTitleBanner
|
||||
v-show="showReceiveCoin"
|
||||
:class="`q-pa-xs `"
|
||||
:title="$t('circuit.receive_coins')"
|
||||
bgcolor="white"
|
||||
bgcolor2="lightblue"
|
||||
:clcolor="`text-indigo`"
|
||||
:canopen="true"
|
||||
:small="true"
|
||||
:open="true"
|
||||
>
|
||||
<q-option-group
|
||||
class="q-ma-xs"
|
||||
style="text-align: left !important"
|
||||
v-model="receiveType"
|
||||
:options="optionsReceive"
|
||||
color="primary"
|
||||
/>
|
||||
<q-tab-panels
|
||||
v-model="receiveType"
|
||||
animated
|
||||
class="shadow-2 rounded-borders"
|
||||
>
|
||||
<q-tab-panel name="link">
|
||||
<div class="row justify-center">
|
||||
<div
|
||||
class="q-ma-xs q-pa-xs"
|
||||
v-html="t('circuit.compila_il_tuo_link_per_ricevere_ris')"
|
||||
></div>
|
||||
|
||||
<q-input
|
||||
v-model="causal"
|
||||
rounded
|
||||
filled
|
||||
maxlength="80"
|
||||
counter
|
||||
:label="$t('circuit.note_richiedente')"
|
||||
class="q-ma-sm full-width q-px-xs"
|
||||
autogrow
|
||||
dense
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="description" class="q-mr-xs" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
class="q-mb-sm text-h5"
|
||||
style="width: 180px"
|
||||
outlined
|
||||
dense
|
||||
v-model="qtyRIS"
|
||||
:type="'number'"
|
||||
@input="limitQuantity"
|
||||
:label="t('circuit.quantita')"
|
||||
input-class="text-right"
|
||||
input-style="padding-bottom: 14px !important;"
|
||||
v-on:keyup.enter="$event.target.nextElementSibling.focus()"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<div class="text-h6">
|
||||
<em
|
||||
class="q-px-sm text-white rounded-borders"
|
||||
style="background-color: #ff5500"
|
||||
>RIS</em
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
<CCopyBtnSmall :texttocopy="miolink" :small="true" :btn="true">
|
||||
</CCopyBtnSmall>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="showonlist">
|
||||
<q-btn
|
||||
v-if="!showonreclist"
|
||||
icon="fas fa-upload"
|
||||
color="positive"
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('circuit.addtothereceiverlist')"
|
||||
@click="clickAddtoRecList"
|
||||
>
|
||||
</q-btn>
|
||||
|
||||
<q-slide-transition>
|
||||
<q-banner
|
||||
v-show="riscallrec"
|
||||
rounded
|
||||
class="bg-blue text-white"
|
||||
style="text-align: center"
|
||||
>
|
||||
{{ riscallrec }}
|
||||
<br />
|
||||
</q-banner>
|
||||
</q-slide-transition>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="qrcode">
|
||||
<CQRCode :read="false" textlink="Link Profilo" :link="userStore.getLinkProfileAndRIS('', '', '')"></CQRCode>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</CTitleBanner>
|
||||
</q-slide-transition>
|
||||
<!--<div class="q-mb-sm"></div>
|
||||
|
||||
|
||||
@@ -49,95 +145,27 @@
|
||||
/>-->
|
||||
</div>
|
||||
</div>
|
||||
<q-dialog v-model="usersList.show">
|
||||
<q-card class="dialog_card">
|
||||
<q-toolbar class="bg-primary text-white">
|
||||
<q-toolbar-title>
|
||||
{{ usersList.title }}
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-toolbar>
|
||||
|
||||
<q-card-section class="inset-shadow">
|
||||
<div>{{ $t('circuit.lista_ricev_title') }}</div>
|
||||
|
||||
<div class="row centeritems justify-evenly items-center">
|
||||
<q-btn
|
||||
icon="fas fa-wifi"
|
||||
rounded
|
||||
glossy
|
||||
color="primary"
|
||||
:label="$t('dialog.update')"
|
||||
:disable="loading"
|
||||
@click="updateUserListRIS()"
|
||||
>
|
||||
</q-btn>
|
||||
|
||||
<q-spinner-radio v-if="loading" class="q-ma-sm" color="brown" />
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="row centeritems">
|
||||
<q-btn-toggle
|
||||
v-if="arrTypesAccounts.length > 0"
|
||||
v-model="tipoConto"
|
||||
class="my-custom-toggle"
|
||||
no-caps
|
||||
rounded
|
||||
unelevated
|
||||
toggle-color="primary"
|
||||
color="white"
|
||||
text-color="primary"
|
||||
:options="arrTypesAccounts"
|
||||
/>
|
||||
|
||||
<div v-if="tipoConto === shared_consts.AccountType.USER">
|
||||
<div v-for="(rec, i) in usersList.list" :key="i">
|
||||
<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
|
||||
v-else-if="
|
||||
tipoConto === shared_consts.AccountType.COLLECTIVE_ACCOUNT
|
||||
"
|
||||
>
|
||||
<div v-for="(grp, i) in usersList.listgroup" :key="i">
|
||||
<CMyGroup :mygrp="grp" :visu="costanti.USER_GROUPS" :noaut="true">
|
||||
</CMyGroup>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
|
||||
<q-card-actions align="center">
|
||||
<q-btn
|
||||
rounded
|
||||
icon="close"
|
||||
v-close-popup
|
||||
:label="$t('dialog.close')"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
rounded
|
||||
:label="$t('circuit.vaialcircuito')"
|
||||
color="primary"
|
||||
:to="tools.updateLink('/circuits')"
|
||||
<div>
|
||||
<q-slide-transition>
|
||||
<CTitleBanner
|
||||
v-show="showSendCoin"
|
||||
:class="`q-pa-xs `"
|
||||
:title="$t('circuit.sendcoins')"
|
||||
bgcolor="white"
|
||||
bgcolor2="lightblue"
|
||||
:clcolor="`text-indigo`"
|
||||
:canopen="true"
|
||||
:small="true"
|
||||
:open="true"
|
||||
>
|
||||
<CFindUsers
|
||||
:actionType="costanti.ACTIONTYPE.SEND_RIS"
|
||||
:sendRIS="sendRIS"
|
||||
>
|
||||
</q-btn>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</CFindUsers>
|
||||
</CTitleBanner>
|
||||
</q-slide-transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CSendRISTo.ts">
|
||||
|
||||
@@ -18,10 +18,18 @@
|
||||
background-color: lightgray;
|
||||
}
|
||||
|
||||
.causale {
|
||||
.causaleDest {
|
||||
margin-bottom: 8px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.causale {
|
||||
font-style: italic; /* Testo in corsivo */
|
||||
color: #555; /* Colore del testo (può essere un grigio o un altro colore per le citazioni) */
|
||||
border-left: 4px solid #ccc; /* Linea a sinistra per emulare lo stile di una citazione */
|
||||
padding-left: 10px; /* Spazi a sinistra per il padding */
|
||||
margin: 8px 0; /* Spaziatura sopra e sotto */
|
||||
}
|
||||
.userto,
|
||||
.userfrom {
|
||||
white-space: pre-wrap;
|
||||
|
||||
@@ -28,9 +28,12 @@
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label class="causale" v-if="mov.causal">{{
|
||||
mov.causal
|
||||
<q-item-label class="causalDest" v-if="mov.causalDest">{{
|
||||
mov.causalDest
|
||||
}}</q-item-label>
|
||||
<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">{{
|
||||
|
||||
@@ -25,9 +25,15 @@
|
||||
<q-icon v-if="canopen" :name="iconopen()" color="white" />
|
||||
</div>
|
||||
</template>
|
||||
<span :class="{'mybanner': !small, 'mybanner-small': small, myclasstext: true}" :style="mystyle">{{
|
||||
title
|
||||
}}</span>
|
||||
<span
|
||||
:class="{
|
||||
mybanner: !small,
|
||||
'mybanner-small': small,
|
||||
myclasstext: true,
|
||||
}"
|
||||
:style="mystyle"
|
||||
>{{ title }}</span
|
||||
>
|
||||
</q-banner>
|
||||
</q-header>
|
||||
<q-banner
|
||||
@@ -44,7 +50,7 @@
|
||||
' ' +
|
||||
getclass()
|
||||
"
|
||||
:style="`text-align: center ; ${gradient}`"
|
||||
:style="`text-align: center ; ${gradient}`"
|
||||
@click="apri()"
|
||||
>
|
||||
<template v-slot:avatar>
|
||||
@@ -55,26 +61,32 @@
|
||||
<q-icon v-if="canopen" :name="iconopen()" color="white" />
|
||||
</div>
|
||||
</template>
|
||||
<span :class="{'mybanner': !small, 'mybanner-small': small, myclasstext: true}" :style="mystyle">{{
|
||||
title
|
||||
}}</span>
|
||||
<span
|
||||
:class="{
|
||||
mybanner: !small,
|
||||
'mybanner-small': small,
|
||||
myclasstext: true,
|
||||
}"
|
||||
:style="mystyle"
|
||||
>{{ title }}</span
|
||||
>
|
||||
</q-banner>
|
||||
|
||||
<q-slide-transition>
|
||||
<div>
|
||||
<div v-if="myvisible" class="rounded-borders">
|
||||
<div>
|
||||
<q-slide-transition>
|
||||
<div v-show="myvisible" class="rounded-borders">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div
|
||||
v-if="imgpreview"
|
||||
class="text-center cursor-pointer clBorderSteps"
|
||||
style="opacity: 0.5"
|
||||
@click="myvisible = !myvisible"
|
||||
>
|
||||
<q-img :src="imgpreview" class="img"></q-img>
|
||||
</div>
|
||||
</q-slide-transition>
|
||||
<div
|
||||
v-if="imgpreview"
|
||||
class="text-center cursor-pointer clBorderSteps"
|
||||
style="opacity: 0.5"
|
||||
@click="myvisible = !myvisible"
|
||||
>
|
||||
<q-img :src="imgpreview" class="img"></q-img>
|
||||
</div>
|
||||
</q-slide-transition>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -709,6 +709,11 @@ h3 {
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
|
||||
.anim1 {
|
||||
animation-duration: 0.5s;
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
|
||||
.wrapword {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
@@ -1442,6 +1447,23 @@ h3 {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.accordion-enter-active, .accordion-leave-active {
|
||||
transition: max-height 0.3s ease;
|
||||
}
|
||||
|
||||
.accordion-enter, .accordion-leave-to /* .accordion-leave-active nella versione 2.1.8 e precedenti */ {
|
||||
max-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.accordion-enter-to, .accordion-leave {
|
||||
max-height: 500px; /* Imposta a quanto vuoi che si espanda */
|
||||
}
|
||||
|
||||
.accordion-content {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.fromsky-enter-active,
|
||||
.fromsky-leave-active {
|
||||
transition: opacity 2s ease;
|
||||
@@ -2323,4 +2345,5 @@ $coloreprincipale: lightblue;
|
||||
@media (max-width: 600px) {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@ const msg_website_enUs = {
|
||||
products: {
|
||||
quantity: 'Quantità',
|
||||
quantityAvailable: 'Disponibili',
|
||||
stockQty: 'In Magazzino',
|
||||
stockBloccatiQty: 'Bloccati In Magazzino',
|
||||
weight: 'Peso',
|
||||
stars: 'Voto',
|
||||
color: 'Colore',
|
||||
@@ -38,7 +36,6 @@ const msg_website_enUs = {
|
||||
productslist: 'Lista Prodotti',
|
||||
collabora: 'Collabora',
|
||||
storehouses: 'Magazzino',
|
||||
providers: 'Fornitori',
|
||||
departments: 'Uffici',
|
||||
orders: 'Ordini Ricevuti',
|
||||
orders2: 'Ordini Ricevuti',
|
||||
|
||||
@@ -8,7 +8,6 @@ const msg_website_es = {
|
||||
products: {
|
||||
quantity: 'Quantità',
|
||||
quantityAvailable: 'Disponibili',
|
||||
stockQty: 'In Magazzino',
|
||||
weight: 'Peso',
|
||||
stars: 'Voto',
|
||||
color: 'Colore',
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
const msg_website_it = {
|
||||
ws: {
|
||||
sitename: 'Più che Buono',
|
||||
siteshortname: 'Più che Buono',
|
||||
description: '',
|
||||
keywords: '',
|
||||
sitename: 'Riso',
|
||||
siteshortname: 'RISO',
|
||||
description: 'Siamo la Rete Italiana di Scambio Orizzontale, abbiamo creato questa piattaforma per metterla al servizio di chi vuole riscoprire il valore della condivisione e della cooperazione. Valori semplici e profondi che ci aiutano a ritrovare il Senso della Vita, perduto in questa società consumista, e riporti quei Sani Pricìpi Naturali ed Umani di Fratellanza che intere popolazioni antiche conoscevano bene.',
|
||||
keywords: 'riso, piattaforma di scambio, rete italiana scambio orizzontale, riso app, riso piattaforma, scambio e baratto, momenta RIS',
|
||||
},
|
||||
hours: {
|
||||
descr: 'Descrizione',
|
||||
@@ -16,35 +16,23 @@ const msg_website_it = {
|
||||
pages: {
|
||||
home: 'Home',
|
||||
profile: 'Profilo',
|
||||
install_site: 'Installa Sito',
|
||||
profile2: 'ProfiloU',
|
||||
mypage2: 'mypage2',
|
||||
myservice2: 'myservice2',
|
||||
myhosps2: 'myhosps2',
|
||||
mygood2: 'mygood2',
|
||||
catalogo: 'Catalogo',
|
||||
fundraising: 'Sostieni il Progetto',
|
||||
notifs: 'Configura le Notifiche',
|
||||
unsubscribe: 'Disiscriviti',
|
||||
unsubscribe_user: 'Disiscriviti User',
|
||||
test: 'Test',
|
||||
projects: 'Progetti',
|
||||
report: 'Report Ore',
|
||||
producer: 'Produttore',
|
||||
orderinfo: 'Ordini Effettuati',
|
||||
products: 'Prodotti',
|
||||
cash: 'Cassa',
|
||||
productInfos: 'Info Prodotti',
|
||||
listinoprodotti: 'Listino Prodotti',
|
||||
productslist: 'Lista Prodotti',
|
||||
collabora: 'Collabora',
|
||||
categories: 'Categorie',
|
||||
storehouses: 'Magazzino',
|
||||
providers: 'Fornitori',
|
||||
catprods: 'Categorie',
|
||||
subcatprods: 'Sotto-Categorie',
|
||||
gasordine: 'Gas Ordine',
|
||||
scontisticas: 'Scontistica',
|
||||
departments: 'Uffici',
|
||||
orders: 'Ordini Ricevuti',
|
||||
orders2: 'Ordini Ricevuti',
|
||||
@@ -133,11 +121,15 @@ const msg_website_it = {
|
||||
only_residenti: 'Solo Residenti',
|
||||
only_consiglio: 'Solo Consiglieri',
|
||||
color: 'Colore',
|
||||
gasordini: 'Gas Ordini',
|
||||
gestoreordini: 'Gestore Ordini',
|
||||
mainMenu: 'Menu Principale',
|
||||
subtitle: 'Sottotitolo',
|
||||
lang: 'Lingua',
|
||||
keywords: 'Parole Chiave',
|
||||
desctiption: 'Descrizione',
|
||||
heightimg: 'Altezza Immagine',
|
||||
},
|
||||
msg: {
|
||||
myAppName: 'Più che Buono',
|
||||
myAppName: 'Riso',
|
||||
myAppDescription: 'Il primo Vero Social Libero, Equo e Solidale, dove Vive Consapevolezza e Aiuto Comunitario. Gratuito',
|
||||
underconstruction: 'App in costruzione...',
|
||||
myDescriz: '',
|
||||
|
||||
@@ -7,6 +7,30 @@ import {
|
||||
import { func } from '@store/Modules/fieldsTable'
|
||||
|
||||
|
||||
// const SHOW_PROJINTHEMENU = false
|
||||
//
|
||||
// let arrlistafavourite = []
|
||||
// let arrlistaprojtutti = []
|
||||
// let arrlistaprojmiei = []
|
||||
// if (SHOW_PROJINTHEMENU) {
|
||||
// arrlistaprojtutti = Projects.getters.listaprojects(RouteNames.projectsall)
|
||||
// arrlistaprojmiei = Projects.getters.listaprojects(RouteNames.myprojects)
|
||||
// arrlistafavourite = Projects.getters.listaprojects(RouteNames.favouriteprojects)
|
||||
// }
|
||||
// PROGETTI -> FAVORITI :
|
||||
|
||||
// if (arrlistafavourite.length > 0) {
|
||||
// arrMenu.push({
|
||||
// icon: 'favorite_border',
|
||||
// nametranslate: 'pages.' + RouteNames.favouriteprojects,
|
||||
// urlroute: RouteNames.favouriteprojects,
|
||||
// level_parent: 0.0,
|
||||
// level_child: 0.5,
|
||||
// routes2: arrlistafavourite,
|
||||
// idelem: ''
|
||||
// })
|
||||
// }
|
||||
|
||||
const firstPage = {
|
||||
active: true,
|
||||
order: 5,
|
||||
@@ -33,7 +57,83 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
},
|
||||
/*{
|
||||
{
|
||||
active: true,
|
||||
order: 400,
|
||||
path: '/test',
|
||||
materialIcon: 'fas fa-test',
|
||||
name: 'mypages.test',
|
||||
component: () => import('@/views/testServer/testServer.vue'),
|
||||
inmenu: false,
|
||||
infooter: false,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 12,
|
||||
path: '/goods',
|
||||
materialIcon: 'fas fa-tshirt',
|
||||
name: 'mypages.goods',
|
||||
component: () => import('@/root/goods/goods.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 15,
|
||||
path: '/services',
|
||||
materialIcon: 'fas fa-house-user',
|
||||
name: 'mypages.services',
|
||||
component: () => import('@/root/services/services.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 15,
|
||||
path: '/activities',
|
||||
materialIcon: 'fas fa-house-user',
|
||||
name: 'mypages.activities',
|
||||
component: () => import('@/root/activities/activities.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: false,
|
||||
infooter: false,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 15,
|
||||
path: '/provapao',
|
||||
materialIcon: 'fas fa-house-user',
|
||||
name: 'mypages.provapao',
|
||||
component: () => import('@/root/provapao/provapao.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: false,
|
||||
infooter: false,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 15,
|
||||
path: '/hosps',
|
||||
materialIcon: 'fas fa-bed',
|
||||
name: 'mypages.hosp',
|
||||
component: () => import('@/root/hosp/hosp.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
},
|
||||
{
|
||||
active: site.confpages && site.confpages.enableCircuits,
|
||||
order: 16,
|
||||
path: '/circuits',
|
||||
materialIcon: 'fas fa-coins',
|
||||
name: 'mypages.circuits',
|
||||
component: () => import('@/views/user/mycircuits/mycircuits.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 20,
|
||||
path: '/events',
|
||||
@@ -43,17 +143,6 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
},*/
|
||||
{
|
||||
active: site.confpages && site.confpages.showProfile,
|
||||
order: 120,
|
||||
path: '/myprofile',
|
||||
materialIcon: 'fas fa-user',
|
||||
name: 'pages.profile',
|
||||
component: () => import('@/views/user/myprofile/myprofile.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
@@ -66,6 +155,17 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
inmenu: false,
|
||||
infooter: false,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 120,
|
||||
path: '/myprofile',
|
||||
materialIcon: 'fas fa-user',
|
||||
name: 'pages.profile',
|
||||
component: () => import('@/views/user/myprofile/myprofile.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 120,
|
||||
@@ -78,7 +178,7 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
infooter: false,
|
||||
},
|
||||
{
|
||||
active: site.confpages && site.confpages.showiscrittiMenu,
|
||||
active: true,
|
||||
order: 130,
|
||||
path: '/friends',
|
||||
materialIcon: 'fas fa-user-friends',
|
||||
@@ -88,19 +188,6 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
},
|
||||
{
|
||||
active: site.confpages && site.confpages.enableCircuits,
|
||||
order: 16,
|
||||
path: '/circuits',
|
||||
materialIcon: 'fas fa-coins',
|
||||
name: 'mypages.circuits',
|
||||
component: () => import('@/views/user/mycircuits/mycircuits.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
onlyAdmin: true,
|
||||
onlyManager: true,
|
||||
},
|
||||
{
|
||||
active: site.confpages && site.confpages.enableGroups,
|
||||
order: 132,
|
||||
@@ -111,8 +198,6 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: true,
|
||||
infooter: false,
|
||||
onlyAdmin: true,
|
||||
onlyManager: true,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
@@ -191,7 +276,7 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
{
|
||||
active: true,
|
||||
order: 150,
|
||||
path: '/fundraising',
|
||||
path: '/sostieniilprogetto',
|
||||
materialIcon: 'fas fa-hand-holding-heart',
|
||||
name: 'pages.fundraising',
|
||||
component: () => import('@src/root/fundraising/fundraising.vue'),
|
||||
|
||||
@@ -1154,6 +1154,7 @@ export interface ISendCoin {
|
||||
contoComOrig?: string
|
||||
contoComDest?: string
|
||||
causal: string
|
||||
causalDest: string
|
||||
symbol: string
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -29,6 +29,10 @@ export const costanti = {
|
||||
ENABLE_FRIENDS: false,
|
||||
ENABLE_CONTI_COLLETTIVI: true,
|
||||
|
||||
ACTIONTYPE: {
|
||||
NONE: 0,
|
||||
SEND_RIS: 1,
|
||||
},
|
||||
|
||||
Lang: {
|
||||
IT: 1,
|
||||
|
||||
@@ -3598,11 +3598,11 @@ export const tools = {
|
||||
if (!this.isMobile())
|
||||
// if (globalStore.leftDrawerOpen)
|
||||
// myw -= 300
|
||||
if (!this.isMobile())
|
||||
// if (globalStore.rightDrawerOpen)
|
||||
// myw -= 300
|
||||
if (!this.isMobile())
|
||||
// if (globalStore.rightDrawerOpen)
|
||||
// myw -= 300
|
||||
|
||||
maxh2 = (myw / coeff) + 20
|
||||
maxh2 = (myw / coeff) + 20
|
||||
if (maxh2 > 500)
|
||||
maxh2 = 500
|
||||
|
||||
@@ -4208,7 +4208,7 @@ export const tools = {
|
||||
if (withright)
|
||||
//if (globalStore.rightDrawerOpen)
|
||||
// myw -= 300
|
||||
return myw
|
||||
return myw
|
||||
|
||||
},
|
||||
|
||||
@@ -7356,7 +7356,7 @@ export const tools = {
|
||||
// console.log('arrimage', arrimage)
|
||||
|
||||
if (shared_consts.TABLES_IMAGEFILE_SINGOLO.includes(table)) {
|
||||
return costanti.DIR_UPLOAD + `products/` + imagefile
|
||||
return costanti.DIR_UPLOAD + `products/` + imagefile
|
||||
}
|
||||
return imagefile
|
||||
},
|
||||
@@ -8148,19 +8148,20 @@ export const tools = {
|
||||
return link
|
||||
},
|
||||
|
||||
async receiveRis($q: any, t: any) {
|
||||
async addToTemporaryReceiverRIS(t: any) {
|
||||
const userStore = useUserStore()
|
||||
|
||||
let username = userStore.my.username
|
||||
|
||||
await userStore.setUserReceiveRIS(username, '').then((data) => {
|
||||
if (data.code === serv_constants.RIS_CODE_OK) {
|
||||
this.showPositiveNotif($q, t('circuit.coins_requestedris', { username }), 6000)
|
||||
} else {
|
||||
this.showNegativeNotif($q, t('db.recfailed'))
|
||||
}
|
||||
return await userStore.setUserReceiveRIS(username, '')
|
||||
.then((data) => {
|
||||
if (data.code === serv_constants.RIS_CODE_OK) {
|
||||
return { msg: t('circuit.coins_requestedris', { username }), ris: true }
|
||||
} else {
|
||||
return { msg: t('db.recfailed'), ris: false }
|
||||
}
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
@@ -8519,10 +8520,6 @@ export const tools = {
|
||||
return Object.keys(obj).length === 0;
|
||||
},
|
||||
|
||||
strToVal(mystr: string) {
|
||||
return parseInt(mystr)
|
||||
},
|
||||
|
||||
pad(value: any) {
|
||||
// Helper function to pad single-digit values with leading zeros
|
||||
return value < 10 ? `0${value}` : value;
|
||||
@@ -9018,7 +9015,7 @@ export const tools = {
|
||||
if (mov.userfrom) {
|
||||
mystrfrom = mov.userfrom.username
|
||||
}
|
||||
|
||||
|
||||
return mystrfrom
|
||||
} else {
|
||||
|
||||
@@ -9034,7 +9031,7 @@ export const tools = {
|
||||
|
||||
return mystrto
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
getTitleAnnuncio(table: string) {
|
||||
@@ -9060,6 +9057,33 @@ export const tools = {
|
||||
|
||||
},
|
||||
|
||||
isNumeric(value: any) {
|
||||
// Controlla se il valore è un numero e non è NaN (Not-a-Number)
|
||||
return typeof value === 'number' && !isNaN(value) ||
|
||||
typeof value === 'string' && value.trim() !== '' && !isNaN(Number(value));
|
||||
},
|
||||
|
||||
strToVal(mystr: string, abs: boolean = false): number | null {
|
||||
try {
|
||||
if (this.isNumeric(mystr)) {
|
||||
let num = parseFloat(mystr);
|
||||
if (num) {
|
||||
num = Math.abs(num)
|
||||
}
|
||||
return num
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
} catch (e) {
|
||||
return null
|
||||
}
|
||||
},
|
||||
|
||||
convertStringToUrl(str: string) {
|
||||
return encodeURIComponent(str); // Codifica la stringa per URL
|
||||
}
|
||||
|
||||
|
||||
// FINE !
|
||||
|
||||
// getLocale() {
|
||||
|
||||
@@ -676,6 +676,33 @@ export const useUserStore = defineStore('UserStore', {
|
||||
return tools.getUrlSite() + '/registrati/' + username
|
||||
},
|
||||
|
||||
getLinkProfile(username: string): string {
|
||||
if (username === '')
|
||||
username = this.my.username
|
||||
return tools.getUrlSite() + '/my/' + username
|
||||
},
|
||||
|
||||
getLinkProfileAndRIS(username: string, qtyris: string, causale: string = ''): string {
|
||||
|
||||
let myparams = ''
|
||||
if (username === '')
|
||||
username = this.my.username
|
||||
let mylink = tools.getUrlSite() + '/my/' + username
|
||||
|
||||
let myval = tools.strToVal(qtyris, true)
|
||||
if (myval !== null) {
|
||||
if (myparams)
|
||||
myparams += `&`
|
||||
myparams += `sr=${myval}`
|
||||
}
|
||||
if (causale) {
|
||||
if (myparams)
|
||||
myparams += `&`
|
||||
myparams += `cd=${tools.convertStringToUrl(causale)}`
|
||||
}
|
||||
return mylink + (myparams ? '?' + myparams : '')
|
||||
},
|
||||
|
||||
isTelegIdOk(): boolean {
|
||||
return (this.my.profile.teleg_id! > 0 || this.my.profile.teleg_id_old! > 0)
|
||||
},
|
||||
|
||||
@@ -2258,6 +2258,19 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
})
|
||||
},
|
||||
|
||||
async loadLastMovements(nummov: number) {
|
||||
return Api.SendReq('/users/lastmovs', 'POST', {nummov})
|
||||
.then((res) => {
|
||||
if (res.data && res.data.last_transactions && this.datastat) {
|
||||
this.datastat.last_transactions = res.data.last_transactions
|
||||
}
|
||||
}).catch((error) => {
|
||||
return {}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -58,7 +58,8 @@ export default defineComponent({
|
||||
const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '')
|
||||
const isDebugOn = computed(() => tools.isDebugOn())
|
||||
|
||||
const sendRIS = computed(() => !!$route.query.sendris ? $route.query.sendris : '')
|
||||
const sendRIS = computed(() => !!$route.query.sr ? $route.query.sr : '')
|
||||
const causalDest = computed(() => !!$route.query.cd ? $route.query.cd : '')
|
||||
|
||||
const $router = useRouter()
|
||||
const filtroutente = ref(<any[]>[])
|
||||
@@ -81,8 +82,7 @@ export default defineComponent({
|
||||
|
||||
const listgroupsfiltered = ref(<IMyGroup[]>[])
|
||||
const listcircuitsfiltered = ref(<IMyCircuit[]>[])
|
||||
|
||||
|
||||
|
||||
function profile() {
|
||||
return userStore.my.profile
|
||||
}
|
||||
@@ -221,6 +221,7 @@ export default defineComponent({
|
||||
getLinkWebSite,
|
||||
gotoPage,
|
||||
sendRIS,
|
||||
causalDest,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -642,6 +642,7 @@
|
||||
:myuser="userStore.userprofile"
|
||||
:showBtnActivities="true"
|
||||
:sendRIS="tools.isUserOk() ? sendRIS : false"
|
||||
:causalDest="causalDest"
|
||||
/>
|
||||
|
||||
<div class="row text-center">
|
||||
|
||||
Reference in New Issue
Block a user