fix: non riuscivi ad acquistare i RIS al gruppo
- lista linkREG
This commit is contained in:
@@ -53,6 +53,7 @@ export default defineComponent({
|
||||
|
||||
const receiveRislist = computed(() => globalStore.datastat ? globalStore.datastat.receiveRislist : [])
|
||||
const receiveRislistgroup = computed(() => globalStore.datastat ? globalStore.datastat.receiveRislistgroup : [])
|
||||
const listlinksreg = computed(() => globalStore.datastat ? globalStore.datastat.listlinksreg : [])
|
||||
|
||||
const arrfilterand: any = ref([])
|
||||
const filtercustom: any = ref([])
|
||||
@@ -107,6 +108,8 @@ export default defineComponent({
|
||||
|
||||
function mounted() {
|
||||
|
||||
usersList.value.listlinkreg = listlinksreg
|
||||
|
||||
searchList.value = [
|
||||
{
|
||||
visible: true,
|
||||
@@ -190,6 +193,7 @@ export default defineComponent({
|
||||
|
||||
usersList.value.list = receiveRislist
|
||||
usersList.value.listgroup = receiveRislistgroup
|
||||
// usersList.value.listlinkreg = listlinksreg
|
||||
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</CGridTableRec>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="receivers">
|
||||
<div class="row centeritems">
|
||||
<div class="column centeritems">
|
||||
<q-btn-toggle
|
||||
v-if="arrTypesAccounts.length > 0"
|
||||
v-model="tipoConto"
|
||||
@@ -69,7 +69,7 @@
|
||||
:myuser="rec"
|
||||
:showBtnActivities="false"
|
||||
:sendRIS="tools.isUserOk() ? sendRIS : false"
|
||||
:actionType="actionType"
|
||||
:actionType="actionType"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -83,6 +83,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column"> </div>
|
||||
<br />
|
||||
<div class="row centeritems justify-evenly items-center">
|
||||
<q-btn
|
||||
|
||||
@@ -277,6 +277,8 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
async function clickshare() {
|
||||
tools.addToTemporaryLinkReg()
|
||||
|
||||
const mytext = await tools.sendMsgTelegramCmd(
|
||||
$q,
|
||||
t,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PropType} from 'vue';
|
||||
import type { PropType } from 'vue';
|
||||
import { defineComponent, onMounted, ref, watch } from 'vue'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import type { ICircuit, IUserFields} from 'model';
|
||||
import type { ICircuit, IUserFields } from 'model';
|
||||
import { IImgGallery, IUserProfile } from 'model'
|
||||
import { costanti } from '@costanti'
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
@@ -123,6 +123,15 @@ export default defineComponent({
|
||||
emit('showInnerDialog', showsendCoinTo.value)
|
||||
}
|
||||
|
||||
function clickToUser(username: string) {
|
||||
if (props.actionType === costanti.ACTIONTYPE.SEND_RIS)
|
||||
naviga(`/my/` + username + '?sr=0')
|
||||
else if (props.actionType === costanti.ACTIONTYPE.LINK_REG)
|
||||
naviga(`/registrati/` + username)
|
||||
else
|
||||
naviga(`/my/` + username)
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
@@ -138,6 +147,7 @@ export default defineComponent({
|
||||
showAccountInfo,
|
||||
showsendCoinTo,
|
||||
showsendCoin,
|
||||
clickToUser,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -3,11 +3,7 @@
|
||||
<q-item class="q-my-sm" clickable>
|
||||
<q-item-section
|
||||
avatar
|
||||
@click="
|
||||
actionType === costanti.ACTIONTYPE.SEND_RIS
|
||||
? naviga(`/my/` + contact.username + '?sr=0')
|
||||
: naviga(`/my/` + contact.username)
|
||||
"
|
||||
@click="clickToUser(contact.username)"
|
||||
>
|
||||
<q-avatar size="60px">
|
||||
<q-img
|
||||
@@ -20,11 +16,7 @@
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section
|
||||
@click="
|
||||
actionType === costanti.ACTIONTYPE.SEND_RIS
|
||||
? naviga(`/my/` + contact.username + '?sr=0')
|
||||
: naviga(`/my/` + contact.username)
|
||||
"
|
||||
@click="clickToUser(contact.username)"
|
||||
>
|
||||
<q-item-label v-if="labelextra && labelextra !== contact.username"
|
||||
><strong>{{ labelextra }}</strong></q-item-label
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import { tools } from '@tools'
|
||||
import { costanti } from '@costanti'
|
||||
import { computed, defineComponent, onMounted, reactive, ref, watch } from 'vue'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { CContactUser } from '@src/components/CContactUser'
|
||||
import { CMyUser } from '@src/components/CMyUser'
|
||||
import { DefaultProfile, useUserStore } from '@store/UserStore'
|
||||
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
@@ -11,7 +14,7 @@ import { useGlobalStore } from '@store/globalStore'
|
||||
export default defineComponent({
|
||||
name: 'CRegistration',
|
||||
emits: ['regEventEmail'],
|
||||
components: {},
|
||||
components: { CMyUser, CContactUser },
|
||||
props: {
|
||||
invited: {
|
||||
type: String,
|
||||
@@ -43,8 +46,12 @@ export default defineComponent({
|
||||
const noInvited = ref(false)
|
||||
const start = ref(false)
|
||||
|
||||
const listlinksreg = computed(() => globalStore.datastat ? globalStore.datastat.listlinksreg : [])
|
||||
|
||||
const slide = ref('start')
|
||||
|
||||
const actionType = ref(costanti.ACTIONTYPE.LINK_REG)
|
||||
|
||||
function clickToRegister() {
|
||||
|
||||
//if (site.value.confpages.enableRegByBot) {
|
||||
@@ -59,6 +66,8 @@ export default defineComponent({
|
||||
const invitante = tools.getInvitante()
|
||||
console.log('invitante', invitante)
|
||||
|
||||
|
||||
|
||||
if (props.invited) {
|
||||
start.value = true
|
||||
chooseReg.value = true
|
||||
@@ -99,6 +108,9 @@ export default defineComponent({
|
||||
slide,
|
||||
regEventEmail,
|
||||
buttRegistrati,
|
||||
costanti,
|
||||
listlinksreg,
|
||||
actionType,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
class="row q-ma-sm centermydiv2 q-pa-sm justify-center align-center"
|
||||
>
|
||||
<div v-if="!start">
|
||||
|
||||
<q-btn
|
||||
rounded
|
||||
glossy
|
||||
@@ -28,8 +27,14 @@
|
||||
height="500px"
|
||||
:class="`text-white bg-primary shadow-1 rounded-borders`"
|
||||
>
|
||||
<q-carousel-slide name="start" class="column no-wrap flex-center">
|
||||
<q-icon name="fas fa-user-plus" size="56px" />
|
||||
<q-carousel-slide
|
||||
name="start"
|
||||
class="column no-wrap flex-center"
|
||||
>
|
||||
<q-icon
|
||||
name="fas fa-user-plus"
|
||||
size="56px"
|
||||
/>
|
||||
<div class="q-mt-md text-center">
|
||||
<span class="text-h6 text-white"> {{ $t('reg.invitante') }}</span>
|
||||
<q-card class="dialog_card q-mb-lg">
|
||||
@@ -40,7 +45,7 @@
|
||||
size="lg"
|
||||
color="positive"
|
||||
@click="
|
||||
slide = 'second';
|
||||
listlinksreg.length > 0 ? slide = 'sceglilink' : slide = 'second';
|
||||
noInvited = false;
|
||||
chooseReg = true;
|
||||
"
|
||||
@@ -65,11 +70,49 @@
|
||||
</q-card>
|
||||
</div>
|
||||
</q-carousel-slide>
|
||||
<q-carousel-slide name="sceglilink">
|
||||
<q-card class="dialog_card q-mb-lg">
|
||||
<q-card-section class="column q-ma-sm q-pa-sm q-col-gutter-sm">
|
||||
<div
|
||||
v-for="(rec, i) in listlinksreg"
|
||||
: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="false"
|
||||
:actionType="actionType"
|
||||
/>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
<q-btn
|
||||
rounded
|
||||
glossy
|
||||
size="md"
|
||||
color="primary"
|
||||
@click="slide = 'start'"
|
||||
:label="$t('dialog.indietro')"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-carousel-slide>
|
||||
<q-carousel-slide name="second">
|
||||
<div v-if="noInvited" class="text-h7">
|
||||
<div class="text-center text-bold text-h6">
|
||||
Se ancora non sei stato invitato:
|
||||
</div>
|
||||
<div
|
||||
v-if="noInvited"
|
||||
class="text-h7"
|
||||
>
|
||||
<div class="text-center text-bold text-h6">Se ancora non sei stato invitato:</div>
|
||||
<br />
|
||||
1️⃣ 👉🏻 Entra nei gruppi Territoriali su Telegram:<br />
|
||||
<div class="text-center">
|
||||
@@ -86,14 +129,17 @@
|
||||
</div>
|
||||
<br />
|
||||
|
||||
2️⃣ 👉🏻 sul post del canale fissato in alto, troverai tutte le info sul
|
||||
progetto e su come entrare nel gruppo della tua provincia.<br />
|
||||
Potrai cosi richiedere il link una volta entrato nella chat di
|
||||
gruppo.<br />
|
||||
2️⃣ 👉🏻 sul post del canale fissato in alto, troverai tutte le info sul progetto e su come entrare nel gruppo
|
||||
della tua provincia.<br />
|
||||
Potrai cosi richiedere il link una volta entrato nella chat di gruppo.<br />
|
||||
</div>
|
||||
<div v-else-if="chooseReg">
|
||||
<div class="row justify-center items-center">
|
||||
<q-icon name="fas fa-user-plus" size="27px" class="q-mx-md" />
|
||||
<q-icon
|
||||
name="fas fa-user-plus"
|
||||
size="27px"
|
||||
class="q-mx-md"
|
||||
/>
|
||||
<span class="text-h6 text-white"> {{ $t('reg.page_title') }}</span>
|
||||
<q-card class="q-mt-sm dialog_card q-mb-sm">
|
||||
<q-card-section>
|
||||
@@ -109,31 +155,22 @@
|
||||
icon="fab fa-telegram"
|
||||
size="md"
|
||||
color="primary"
|
||||
:href="
|
||||
invited
|
||||
? tools.getLinkBotTelegram(invited, regexpire)
|
||||
: `/bot`
|
||||
"
|
||||
:href="invited ? tools.getLinkBotTelegram(invited, regexpire) : `/bot`"
|
||||
:label="$t('reg.bytelegram')"
|
||||
>
|
||||
<q-badge color="red" align="bottom" floating
|
||||
<q-badge
|
||||
color="red"
|
||||
align="bottom"
|
||||
floating
|
||||
>Consigliato</q-badge
|
||||
>
|
||||
</q-btn>
|
||||
<br>
|
||||
<div
|
||||
:class="
|
||||
$q.dark.isActive
|
||||
? `text-white`
|
||||
: `text-black` + ` col-12 text-center`
|
||||
"
|
||||
>
|
||||
<br />
|
||||
<div :class="$q.dark.isActive ? `text-white` : `text-black` + ` col-12 text-center`">
|
||||
<div class="bg-grey-4">
|
||||
<br />
|
||||
se non hai Telegram puoi registrarti con solo l'email ma
|
||||
<span style="text-decoration: underline"
|
||||
>non potrai contattare gli iscritti</span
|
||||
>.
|
||||
<span style="text-decoration: underline">non potrai contattare gli iscritti</span>.
|
||||
<q-btn
|
||||
rounded
|
||||
class="flex-item-btn col-xs-12 col-sm-6"
|
||||
@@ -149,7 +186,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else style="margin-top: 10px; text-align: center">
|
||||
<div
|
||||
v-else
|
||||
style="margin-top: 10px; text-align: center"
|
||||
>
|
||||
Registrati<br />
|
||||
<q-btn
|
||||
rounded
|
||||
@@ -169,8 +209,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CRegistration.ts">
|
||||
</script>
|
||||
<script lang="ts" src="./CRegistration.ts"></script>
|
||||
<style lang="scss" scoped>
|
||||
@import './CRegistration.scss';
|
||||
</style>
|
||||
|
||||
@@ -297,7 +297,6 @@ export default defineComponent({
|
||||
await aggiorna()
|
||||
|
||||
showpage.value = true
|
||||
loading.value = false
|
||||
|
||||
}
|
||||
|
||||
@@ -305,6 +304,8 @@ export default defineComponent({
|
||||
console.log('group', props.to_group)
|
||||
bothcircuits.value = userStore.getMyCircuitsInCommonByGroup(props.to_group)
|
||||
|
||||
console.log('bothcircuits', bothcircuits.value)
|
||||
|
||||
if (props.circuitname) {
|
||||
circuitsel.value = props.circuitname
|
||||
} else {
|
||||
@@ -318,6 +319,7 @@ export default defineComponent({
|
||||
|
||||
showpage.value = true
|
||||
}
|
||||
|
||||
if (props.to_contocom) {
|
||||
bothcircuits.value = userStore.getMyCircuits()
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
<q-img ratio="1" fit="cover" :src="getMyImg()" :alt="Username()" img-class="imgprofile_small"
|
||||
stretch="false" />
|
||||
</q-avatar>
|
||||
<q-btn v-else-if="$q.screen.gt.sm" class="q-mx-xs iconprofile_small" round dense flat
|
||||
<q-btn v-else-if="$q.screen.gt.xs" class="q-mx-xs iconprofile_small" round dense flat
|
||||
@click="rightDrawerOpen = !rightDrawerOpen" :icon="getMyImgforIcon()" :color="getcolormenu()">
|
||||
</q-btn>
|
||||
</q-toolbar>
|
||||
|
||||
@@ -16,12 +16,14 @@ export default defineComponent({
|
||||
},
|
||||
|
||||
setup() {
|
||||
const { t } = useI18n()
|
||||
|
||||
function logoimg() {
|
||||
return `${tools.getimglogo()}`
|
||||
}
|
||||
|
||||
function logoalt() {
|
||||
const { t } = useI18n();
|
||||
|
||||
return t('ws.sitename')
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
const msg_website_it = {
|
||||
ws: {
|
||||
sitename: 'Gruppo Macro',
|
||||
siteshortname: 'Gruppo Macro',
|
||||
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,20 +16,29 @@ 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',
|
||||
productslist: 'Lista Prodotti',
|
||||
collabora: 'Collabora',
|
||||
storehouses: 'Magazzino',
|
||||
departments: 'Uffici',
|
||||
orders: 'Ordini Ricevuti',
|
||||
orders2: 'Ordini Ricevuti',
|
||||
sharewithus: 'Condividi con Noi',
|
||||
checkout: 'Carrello',
|
||||
payment: 'Pagamenti',
|
||||
regok: 'Registrazione Confermata',
|
||||
presentazione: 'Presentazione',
|
||||
presentazione2: 'Presentazione',
|
||||
@@ -80,6 +89,9 @@ const msg_website_it = {
|
||||
projectsShared: 'Condivisi da me',
|
||||
myprojects: 'Privati',
|
||||
favproj: 'Favoriti',
|
||||
admin_ecommerce: 'ECommerce',
|
||||
ecommerce: 'Prodotti',
|
||||
ecommerce_menu: 'ECommerce1',
|
||||
hours: 'Ore',
|
||||
department: 'Uffici',
|
||||
title: 'Titolo',
|
||||
@@ -109,9 +121,15 @@ const msg_website_it = {
|
||||
only_residenti: 'Solo Residenti',
|
||||
only_consiglio: 'Solo Consiglieri',
|
||||
color: 'Colore',
|
||||
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: '',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* GRUPPOMACRO APP
|
||||
/* RISO APP
|
||||
*/
|
||||
import {
|
||||
import type {
|
||||
IListRoutes,
|
||||
ILang,
|
||||
IPreloadImages,
|
||||
@@ -68,6 +68,39 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
inmenu: false,
|
||||
infooter: false,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 12,
|
||||
path: '/goods',
|
||||
materialIcon: 'fas fa-tshirt',
|
||||
name: 'mypages.goods',
|
||||
component: () => import('@src/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('@src/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('@src/root/activities/activities.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: false,
|
||||
infooter: false,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 15,
|
||||
@@ -79,6 +112,17 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
inmenu: false,
|
||||
infooter: false,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 15,
|
||||
path: '/hosps',
|
||||
materialIcon: 'fas fa-bed',
|
||||
name: 'mypages.hosp',
|
||||
component: () => import('@src/root/hosp/hosp.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
},
|
||||
{
|
||||
active: site.confpages && site.confpages.enableCircuits,
|
||||
order: 16,
|
||||
@@ -91,7 +135,7 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
infooter: true,
|
||||
},
|
||||
{
|
||||
active: site.confpages && site.confpages.enableEvents,
|
||||
active: true,
|
||||
order: 20,
|
||||
path: '/events',
|
||||
materialIcon: 'fas fa-bullhorn',
|
||||
@@ -113,7 +157,7 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
infooter: false,
|
||||
},
|
||||
{
|
||||
active: site.confpages && site.confpages.showProfile,
|
||||
active: true,
|
||||
order: 120,
|
||||
path: '/myprofile',
|
||||
materialIcon: 'fas fa-user',
|
||||
@@ -124,7 +168,7 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
infooter: true,
|
||||
},
|
||||
{
|
||||
active: site.confpages && site.confpages.showProfile,
|
||||
active: true,
|
||||
order: 120,
|
||||
path: '/editprofile',
|
||||
materialIcon: 'fas fa-user',
|
||||
@@ -135,7 +179,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',
|
||||
@@ -230,6 +274,16 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
inmenu: false,
|
||||
infooter: false,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 150,
|
||||
path: '/sostieniilprogetto',
|
||||
materialIcon: 'fas fa-hand-holding-heart',
|
||||
name: 'pages.fundraising',
|
||||
component: () => import('@src/root/fundraising/fundraising.vue'),
|
||||
inmenu: false,
|
||||
infooter: false,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 80,
|
||||
@@ -248,7 +302,7 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
|
||||
export function firstimagehome() {
|
||||
|
||||
let img = 'statics/images/background.jpg'
|
||||
const img = 'statics/images/background.jpg'
|
||||
return img
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ export interface INotData {
|
||||
lastsonline?: IUserFields[]
|
||||
lastssharedlink?: IUserFields[]
|
||||
diffusorilist?: IUserFields[]
|
||||
listlinksreg?: IUserFields[]
|
||||
receiveRislist?: IUserFields[]
|
||||
receiveRislistgroup?: IMyGroup[]
|
||||
strettelist?: IUserFields[]
|
||||
|
||||
@@ -151,6 +151,7 @@ export interface IUserProfile {
|
||||
mycircuits: IMyCircuit[]
|
||||
last_circuitpath: string
|
||||
lastdate_reqRis?: Date
|
||||
lastdate_LinkReg?: Date
|
||||
userstoverify: IFriends[]
|
||||
manage_mygroups: IMyGroup[]
|
||||
notifs: IUserNotifType[]
|
||||
|
||||
@@ -1463,6 +1463,7 @@ const msg_it = {
|
||||
iscritti: 'iscritti trovati',
|
||||
addtothereceiverlist: 'Aggiungiti alla Lista dei Riceventi',
|
||||
coins_requestedris: 'Il tuo profilo {username} è ora visibile dalla "lista dei Riceventi di oggi".',
|
||||
listlinkreg: 'Il tuo profilo {username} è ora visibile dalla "lista degli invitanti di oggi".',
|
||||
coins_requestedrisgroup: 'Il Conto dell\'Organizzazione {groupname} sarà visibile sulla lista dei riceventi per 8 ore. Fai cliccare \'Invia RIS a..\' a chi ti deve inviare i RIS.',
|
||||
lista_ricev_title: 'Questa è la lista degli Utenti che hanno cliccato su "Ricevi RIS" nelle ultime 8 ore',
|
||||
info: 'Informazioni su questo Circuito',
|
||||
|
||||
@@ -60,6 +60,7 @@ export const costanti = {
|
||||
ACTIONTYPE: {
|
||||
NONE: 0,
|
||||
SEND_RIS: 1,
|
||||
LINK_REG: 2,
|
||||
},
|
||||
|
||||
Lang: {
|
||||
|
||||
@@ -8002,61 +8002,77 @@ export const tools = {
|
||||
return arr1.some((item: any) => arr2.includes(item))
|
||||
},
|
||||
|
||||
// Function to return commonElements
|
||||
getCommon(arr1: any, arr2: any, field: string): any[] {
|
||||
// @ts-ignore
|
||||
arr1.sort((a: any, b: any) => (a[field] > b[field]) - (a[field] < b[field])) // Sort both the arrays
|
||||
// @ts-ignore
|
||||
arr2.sort((a: any, b: any) => (a[field] > b[field]) - (a[field] < b[field]))
|
||||
// Function to return common elements between two arrays
|
||||
getCommon(arr1: any[], arr2: any[], field1: string, field2: string): any[] {
|
||||
// Assicurati che gli array non siano null o undefined
|
||||
if (!Array.isArray(arr1) || !Array.isArray(arr2)) {
|
||||
console.error("Entrambi gli input devono essere array.");
|
||||
return [];
|
||||
}
|
||||
|
||||
// console.log('arr1', arr1)
|
||||
// console.log('arr2', arr2)
|
||||
const common = [] // Array to contain common elements
|
||||
let i = 0, j = 0 // i points to arr1 and j to arr2
|
||||
// Break if one of them runs out
|
||||
// Ordina entrambi gli array in base ai campi specificati
|
||||
arr1.sort((a, b) => (a[field1] > b[field1] ? 1 : a[field1] < b[field1] ? -1 : 0));
|
||||
arr2.sort((a, b) => (a[field2] > b[field2] ? 1 : a[field2] < b[field2] ? -1 : 0));
|
||||
|
||||
const common: any[] = []; // Array per contenere gli elementi comuni
|
||||
let i = 0, j = 0; // Indici per iterare sugli array
|
||||
|
||||
// Itera finché non si esaurisce uno dei due array
|
||||
while (i < arr1.length && j < arr2.length) {
|
||||
const value1 = arr1[i][field1];
|
||||
const value2 = arr2[j][field2];
|
||||
|
||||
if (arr1[i][field] == arr2[j][field]) { // If both are same, add it to result
|
||||
common.push(arr1[i][field])
|
||||
i++
|
||||
j++
|
||||
} else if (arr1[i][field] < arr2[j][field]) { // Increment the smaller value so that
|
||||
i++ // it could be matched with the larger
|
||||
} // element
|
||||
else {
|
||||
j++
|
||||
if (value1 === value2) {
|
||||
// Se i valori sono uguali, aggiungi l'elemento al risultato
|
||||
common.push(value1);
|
||||
i++;
|
||||
j++;
|
||||
} else if (value1 < value2) {
|
||||
// Incrementa l'indice dell'array con il valore minore
|
||||
i++;
|
||||
} else {
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
||||
return common
|
||||
return common;
|
||||
},
|
||||
|
||||
// Function to return commonElements
|
||||
getCommonAllRecord(arr1: any, arr2: any, field: string): any[] {
|
||||
// @ts-ignore
|
||||
arr1.sort((a: any, b: any) => (a[field] > b[field]) - (a[field] < b[field])) // Sort both the arrays
|
||||
// @ts-ignore
|
||||
arr2.sort((a: any, b: any) => (a[field] > b[field]) - (a[field] < b[field]))
|
||||
// Function to return common objects between two arrays based on a specific field
|
||||
getCommonAllRecord(arr1: any[], arr2: any[], field: string): any[] {
|
||||
// Assicurati che gli array non siano null o undefined
|
||||
if (!Array.isArray(arr1) || !Array.isArray(arr2)) {
|
||||
console.error("Entrambi gli input devono essere array.");
|
||||
return [];
|
||||
}
|
||||
|
||||
// console.log('arr1', arr1)
|
||||
// console.log('arr2', arr2)
|
||||
const common = [] // Array to contain common elements
|
||||
let i = 0, j = 0 // i points to arr1 and j to arr2
|
||||
// Break if one of them runs out
|
||||
// Ordina entrambi gli array in base al campo specificato
|
||||
arr1.sort((a, b) => (a[field] > b[field] ? 1 : a[field] < b[field] ? -1 : 0));
|
||||
arr2.sort((a, b) => (a[field] > b[field] ? 1 : a[field] < b[field] ? -1 : 0));
|
||||
|
||||
const common: any[] = []; // Array per contenere gli oggetti comuni
|
||||
let i = 0, j = 0; // Indici per iterare sugli array
|
||||
|
||||
// Itera finché non si esaurisce uno dei due array
|
||||
while (i < arr1.length && j < arr2.length) {
|
||||
const value1 = arr1[i][field];
|
||||
const value2 = arr2[j][field];
|
||||
|
||||
if (arr1[i][field] == arr2[j][field]) { // If both are same, add it to result
|
||||
common.push(arr1[i])
|
||||
i++
|
||||
j++
|
||||
} else if (arr1[i][field] < arr2[j][field]) { // Increment the smaller value so that
|
||||
i++ // it could be matched with the larger
|
||||
} // element
|
||||
else {
|
||||
j++
|
||||
if (value1 === value2) {
|
||||
// Se i valori sono uguali, aggiungi l'intero oggetto di arr1 al risultato
|
||||
common.push(arr1[i]);
|
||||
i++;
|
||||
j++;
|
||||
} else if (value1 < value2) {
|
||||
// Incrementa l'indice dell'array con il valore minore
|
||||
i++;
|
||||
} else {
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
||||
return common
|
||||
return common;
|
||||
},
|
||||
|
||||
isTypeByRecMov(rec: IMovVisu) {
|
||||
@@ -8439,6 +8455,23 @@ export const tools = {
|
||||
|
||||
},
|
||||
|
||||
async addToTemporaryLinkReg(t: any) {
|
||||
const userStore = useUserStore()
|
||||
|
||||
const username = userStore.my.username
|
||||
|
||||
return await userStore.seListLinkReg(username, '')
|
||||
.then((data) => {
|
||||
if (data.code === serv_constants.RIS_CODE_OK) {
|
||||
return { msg: t('circuit.listlinkreg', { username }), ris: true }
|
||||
} else {
|
||||
return { msg: t('db.recfailed'), ris: false }
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
async receiveRisGroup(groupname: string, $q: any, t: any) {
|
||||
const userStore = useUserStore()
|
||||
|
||||
@@ -9499,14 +9532,14 @@ export const tools = {
|
||||
rec.testo_right = tools.resetIText(rec?.testo_right)
|
||||
rec.testo_bottom = tools.resetIText(rec?.testo_bottom)
|
||||
|
||||
rec.dimensioni = {pagina: null, riga: null, scheda_prodotto: {}, immagine_prodotto: {}}
|
||||
rec.dimensioni = { pagina: null, riga: null, scheda_prodotto: {}, immagine_prodotto: {} }
|
||||
rec.dimensioni.pagina = tools.resetRecIPagina({})
|
||||
rec.testo_right_attaccato = tools.resetIText({})
|
||||
rec.testo_right = tools.resetIText({})
|
||||
rec.testo_bottom = tools.resetIText({})
|
||||
|
||||
return rec
|
||||
},
|
||||
},
|
||||
|
||||
resetIBorder(rec: IBorder | null) {
|
||||
if (!rec) {
|
||||
@@ -9777,7 +9810,7 @@ export const tools = {
|
||||
keycookie: '',
|
||||
addall: true,
|
||||
arrvalue: [],
|
||||
filter: () => {},
|
||||
filter: () => { },
|
||||
useinput: false,
|
||||
icon: 'fas fa-user'
|
||||
}]
|
||||
|
||||
@@ -86,6 +86,7 @@ export const DefaultUser: IUserFields = {
|
||||
mygroups: [],
|
||||
mycircuits: [],
|
||||
last_circuitpath: '',
|
||||
lastdate_LinkReg: tools.getLastDateReadReset(),
|
||||
lastdate_reqRis: tools.getLastDateReadReset(),
|
||||
manage_mygroups: [],
|
||||
userstoverify: [],
|
||||
@@ -550,20 +551,10 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
},
|
||||
|
||||
getMyCircuitsInCommonByUser(user: IUserFields): any[] {
|
||||
let arrout = []
|
||||
addarrfinale(arrout: any): any[] {
|
||||
let arrfinale = []
|
||||
let vuoto = false
|
||||
|
||||
const circuitStore = useCircuitStore()
|
||||
|
||||
if (!this.my.profile.mycircuits || (!user || !user.profile || !user.profile.mycircuits))
|
||||
vuoto = true // ok
|
||||
else
|
||||
arrout = tools.getCommon([...this.my.profile.mycircuits], [...user.profile.mycircuits], 'circuitname')
|
||||
|
||||
|
||||
|
||||
// controlla che il circuito sia Abilitato e Territoriale !
|
||||
for (const circuitname of arrout) {
|
||||
const circuit = circuitStore.getCircuitByName(circuitname)
|
||||
@@ -580,22 +571,30 @@ export const useUserStore = defineStore('UserStore', {
|
||||
}
|
||||
}
|
||||
|
||||
// se non ho neanche 1 circuito in comune, metto il mio preferito
|
||||
/*if (arrfinale.length <= 0) {
|
||||
const circuit = circuitStore.getCircuitByProvince(this.my.profile.resid_province)
|
||||
if (circuit)
|
||||
arrfinale.push(circuit.name)
|
||||
else {
|
||||
if (this.my.profile.mycircuits.length > 0) {
|
||||
arrfinale.push(this.my.profile.mycircuits[0].circuitname)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} */
|
||||
|
||||
// console.log('arrout', arrfinale)
|
||||
|
||||
return arrfinale
|
||||
|
||||
},
|
||||
|
||||
getMyCircuitsInCommonByUser(user: IUserFields): any[] {
|
||||
let arrout = []
|
||||
let vuoto = false
|
||||
|
||||
if (!this.my.profile.mycircuits || (!user || !user.profile || !user.profile.mycircuits))
|
||||
vuoto = true // ok
|
||||
else
|
||||
arrout = tools.getCommon([...this.my.profile.mycircuits], [...user.profile.mycircuits], 'circuitname', 'circuitname')
|
||||
|
||||
return this.addarrfinale(arrout)
|
||||
},
|
||||
|
||||
getMyCircuitsInCommonByGroup(group: IMyGroup): any[] {
|
||||
console.log('this.my.profile.mycircuits', this.my.profile.mycircuits)
|
||||
|
||||
if (!this.my.profile.mycircuits || (!group || !group.mycircuits))
|
||||
return []
|
||||
const arrout = tools.getCommon([...this.my.profile.mycircuits], [...group.mycircuits], 'circuitname', 'name')
|
||||
|
||||
return this.addarrfinale(arrout)
|
||||
},
|
||||
|
||||
getMyCircuits(): any[] {
|
||||
@@ -605,12 +604,6 @@ export const useUserStore = defineStore('UserStore', {
|
||||
return this.my.profile.mycircuits.map(item => item.circuitname)
|
||||
},
|
||||
|
||||
getMyCircuitsInCommonByGroup(group: IMyGroup): any[] {
|
||||
|
||||
if (!this.my.profile.mycircuits || (!group || !group.mycircuits))
|
||||
return []
|
||||
return tools.getCommon([...this.my.profile.mycircuits], [...group.mycircuits], 'circuitname')
|
||||
},
|
||||
|
||||
getMyHandshakeInCommon(myuser: IUserFields): any[] {
|
||||
|
||||
@@ -1727,6 +1720,21 @@ export const useUserStore = defineStore('UserStore', {
|
||||
return {}
|
||||
})
|
||||
|
||||
},
|
||||
async seListLinkReg(username: string, groupname: string) {
|
||||
const data = {
|
||||
username,
|
||||
groupname,
|
||||
}
|
||||
|
||||
return Api.SendReq('/users/listlinkreg', 'POST', data)
|
||||
.then((ris) => {
|
||||
console.log('out:', ris)
|
||||
return ris.data
|
||||
}).catch((error) => {
|
||||
return {}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
async loadGroup(groupname: string, idnotif: string) {
|
||||
|
||||
Reference in New Issue
Block a user