- Chart Maps Nationality
- Username lowercase - Statistics - Telegram
This commit is contained in:
13
src/components/CCardStat/CCardStat.scss
Normal file
13
src/components/CCardStat/CCardStat.scss
Normal file
@@ -0,0 +1,13 @@
|
||||
.my-card-stat {
|
||||
width: 100%;
|
||||
max-width: 200px;
|
||||
min-width: 120px;
|
||||
padding: 1rem 1rem;
|
||||
@media (max-width: 718px) {
|
||||
// PER VERSIONE MOBILE
|
||||
max-width: 150px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
box-shadow: none;
|
||||
}
|
||||
23
src/components/CCardStat/CCardStat.ts
Normal file
23
src/components/CCardStat/CCardStat.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import MixinBase from '@src/mixins/mixin-base'
|
||||
|
||||
@Component({
|
||||
name: 'CCardState'
|
||||
})
|
||||
|
||||
export default class CCardStat extends MixinBase {
|
||||
@Prop({ required: true, default: '' }) public mytext
|
||||
@Prop({ required: true, default: 0 }) public myval
|
||||
@Prop({ required: false, default: 'primary' }) public mycol
|
||||
|
||||
get getsize() {
|
||||
if (tools.isMobile())
|
||||
return '130px'
|
||||
else
|
||||
return '150px'
|
||||
}
|
||||
}
|
||||
19
src/components/CCardStat/CCardStat.vue
Normal file
19
src/components/CCardStat/CCardStat.vue
Normal file
@@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<div class="row justify-between q-pa-xs-sm">
|
||||
<div style="font-size:1rem; padding-right: 8px;">
|
||||
{{mytext}}
|
||||
</div>
|
||||
<div>
|
||||
<q-badge :color="mycol">{{ myval }}</q-badge>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CCardStat.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CCardStat.scss';
|
||||
</style>
|
||||
1
src/components/CCardStat/index.ts
Normal file
1
src/components/CCardStat/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export {default as CCardStat} from './CCardStat.vue'
|
||||
47
src/components/CCopyBtn/CCopyBtn.scss
Normal file
47
src/components/CCopyBtn/CCopyBtn.scss
Normal file
@@ -0,0 +1,47 @@
|
||||
$heightBtn: 100%;
|
||||
$grayshadow: #555;
|
||||
|
||||
.text-subtitle-gallery {
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.75rem;
|
||||
letter-spacing: .00937em;
|
||||
text-shadow: .1rem .1rem .1rem $grayshadow;
|
||||
}
|
||||
|
||||
@media (max-width: 718px) {
|
||||
// PER VERSIONE MOBILE
|
||||
.text-subtitle-gallery {
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.myimg {
|
||||
border-radius: 10px !important;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.myimg-view {
|
||||
border-radius: 5px !important;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.q-img {
|
||||
&__image {
|
||||
border-radius: 10px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.my-card-gallery {
|
||||
width: 100%;
|
||||
max-width: 300px;
|
||||
min-width: 200px;
|
||||
padding: 1rem 1rem;
|
||||
height: 350px;
|
||||
}
|
||||
|
||||
.my-card-gallery-view {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 0.5rem 0.5rem;
|
||||
}
|
||||
25
src/components/CCopyBtn/CCopyBtn.ts
Normal file
25
src/components/CCopyBtn/CCopyBtn.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
@Component({
|
||||
name: 'CCopyBtn'
|
||||
})
|
||||
|
||||
export default class CCopyBtn extends Vue {
|
||||
public $t
|
||||
public $q
|
||||
@Prop({ required: false, default: '' }) public title: string
|
||||
@Prop({ required: true }) public texttocopy: string
|
||||
|
||||
get tools() {
|
||||
return tools
|
||||
}
|
||||
|
||||
public copytoclip() {
|
||||
tools.copyStringToClipboard(this, this.texttocopy)
|
||||
}
|
||||
|
||||
}
|
||||
20
src/components/CCopyBtn/CCopyBtn.vue
Normal file
20
src/components/CCopyBtn/CCopyBtn.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<div class="column q-pa-sm cursor-pointer" @click="copytoclip">
|
||||
<q-field outlined bottom-slots :label="title" stack-label class="text-center">
|
||||
<template v-slot:prepend>
|
||||
<q-btn 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">{{texttocopy}}</div>
|
||||
</template>
|
||||
</q-field>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CCopyBtn.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CCopyBtn.scss';
|
||||
</style>
|
||||
1
src/components/CCopyBtn/index.ts
Normal file
1
src/components/CCopyBtn/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export {default as CCopyBtn} from './CCopyBtn.vue'
|
||||
@@ -7,14 +7,14 @@ import { IGallery, IImgGallery } from '../../model/GlobalStore'
|
||||
import { CMyPage } from '../CMyPage'
|
||||
import GlobalModule from '../../store/Modules/GlobalStore'
|
||||
import { GlobalStore } from '../../store/Modules'
|
||||
import { copyToClipboard } from 'quasar'
|
||||
import MixinBase from '../../mixins/mixin-base'
|
||||
|
||||
@Component({
|
||||
name: 'CGallery',
|
||||
components: { CMyPage }
|
||||
})
|
||||
|
||||
export default class CGallery extends Vue {
|
||||
export default class CGallery extends MixinBase {
|
||||
@Prop({ required: true }) public edit: boolean
|
||||
@Prop({ required: true }) public gall: IGallery
|
||||
@Prop({ required: true }) public listimages: IImgGallery[]
|
||||
@@ -173,9 +173,7 @@ export default class CGallery extends Vue {
|
||||
|
||||
public copytoclipboard(rec) {
|
||||
const filename = this.getfullname(rec)
|
||||
copyToClipboard(filename).then(() => {
|
||||
tools.showNotif(this.$q, this.$t('dialog.copyclipboard') + ' \'' + filename + '\'')
|
||||
})
|
||||
tools.copyStringToClipboard(this, filename)
|
||||
}
|
||||
|
||||
public async deleteFile(rec) {
|
||||
|
||||
0
src/components/CGeoChart/CGeoChart.scss
Normal file
0
src/components/CGeoChart/CGeoChart.scss
Normal file
69
src/components/CGeoChart/CGeoChart.ts
Normal file
69
src/components/CGeoChart/CGeoChart.ts
Normal file
@@ -0,0 +1,69 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
@Component({})
|
||||
|
||||
/**
|
||||
*
|
||||
* 150 - Europe 154 - Northern Europe GG, JE, AX, DK, EE, FI, FO, GB, IE, IM, IS, LT, LV, NO, SE, SJ
|
||||
* 155 - Western Europe AT, BE, CH, DE, DD, FR, FX, LI, LU, MC, NL
|
||||
* 151 - Eastern Europe BG, BY, CZ, HU, MD, PL, RO, RU, SU, SK, UA
|
||||
* 039 - Southern Europe AD, AL, BA, ES, GI, GR, HR, IT, ME, MK, MT, RS, PT, SI, SM, VA, YU
|
||||
* 019 - Americas 021 - Northern America BM, CA, GL, PM, US
|
||||
* 029 - Caribbean AG, AI, AN, AW, BB, BL, BS, CU, DM, DO, GD, GP, HT, JM, KN, KY, LC, MF, MQ, MS, PR, TC, TT, VC, VG, VI
|
||||
* 013 - Central America BZ, CR, GT, HN, MX, NI, PA, SV
|
||||
* 005 - South America AR, BO, BR, CL, CO, EC, FK, GF, GY, PE, PY, SR, UY, VE
|
||||
*
|
||||
*/
|
||||
|
||||
export default class CGeoChart extends Vue {
|
||||
|
||||
public $t
|
||||
public $q
|
||||
public data: any[] = []
|
||||
public mydatafixed: any[] = []
|
||||
public tab = 'world'
|
||||
|
||||
public myoptionsWorld = {
|
||||
legend: { textStyle: { color: 'blue', fontSize: 16 } },
|
||||
backgroundColor: '#81d4fa',
|
||||
colorAxis: { colors: ['#ffd986', '#009524'] },
|
||||
|
||||
}
|
||||
public myoptionsEurope = {
|
||||
region: '039',
|
||||
legend: { textStyle: { color: 'blue', fontSize: 16 } },
|
||||
backgroundColor: '#81d4fa',
|
||||
colorAxis: { colors: ['#ffd986', '#009524'] },
|
||||
}
|
||||
|
||||
@Prop({ required: true }) public mydata: any []
|
||||
|
||||
get tools() {
|
||||
return tools
|
||||
}
|
||||
|
||||
public mounted() {
|
||||
this.mydatafixed = []
|
||||
let alldata: any[]
|
||||
|
||||
for (const rec of this.mydata) {
|
||||
alldata = []
|
||||
alldata.push(tools.getNationsByNationality(rec._id))
|
||||
alldata.push(rec.count)
|
||||
|
||||
this.mydatafixed.push(alldata)
|
||||
}
|
||||
}
|
||||
|
||||
get getmydatafixed() {
|
||||
if (!!this.mydatafixed)
|
||||
return this.mydatafixed
|
||||
else
|
||||
return [['Italy', 1]]
|
||||
}
|
||||
|
||||
}
|
||||
41
src/components/CGeoChart/CGeoChart.vue
Normal file
41
src/components/CGeoChart/CGeoChart.vue
Normal file
@@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<div class="q-pa-sm" style="width: 100%;">
|
||||
<!--<line-chart :data="mydata"></line-chart>-->
|
||||
|
||||
<div class="q-gutter-y-md" style="max-width: 1200px">
|
||||
<q-tabs
|
||||
v-model="tab"
|
||||
dense
|
||||
class="text-grey"
|
||||
active-color="primary"
|
||||
indicator-color="primary"
|
||||
align="justify"
|
||||
narrow-indicator
|
||||
>
|
||||
<q-tab name="world" label="World"></q-tab>
|
||||
<q-tab name="europe" label="Europe"></q-tab>
|
||||
|
||||
</q-tabs>
|
||||
|
||||
<q-tab-panels v-model="tab" animated>
|
||||
<q-tab-panel name="world">
|
||||
<geo-chart :data="getmydatafixed" :library="myoptionsWorld"></geo-chart>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="europe">
|
||||
<geo-chart :data="getmydatafixed" :library="myoptionsEurope"></geo-chart>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</div>
|
||||
|
||||
|
||||
<!--<line-chart :data="chartData"></line-chart>-->
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CGeoChart.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CGeoChart.scss';
|
||||
</style>
|
||||
1
src/components/CGeoChart/index.ts
Normal file
1
src/components/CGeoChart/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export {default as CGeoChart} from './CGeoChart.vue'
|
||||
0
src/components/CLineChart/CLineChart.scss
Normal file
0
src/components/CLineChart/CLineChart.scss
Normal file
43
src/components/CLineChart/CLineChart.ts
Normal file
43
src/components/CLineChart/CLineChart.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
@Component({
|
||||
|
||||
})
|
||||
|
||||
export default class CLineChart extends Vue {
|
||||
public $t
|
||||
public $q
|
||||
public mydatafixed = {}
|
||||
@Prop({ required: false, default: '' }) public mydata: any[]
|
||||
@Prop({ required: false, default: false }) public sum: boolean
|
||||
@Prop({ required: false, default: '' }) public title: string
|
||||
@Prop({ required: false, default: null }) public mycolors
|
||||
|
||||
get tools() {
|
||||
return tools
|
||||
}
|
||||
|
||||
public mounted() {
|
||||
this.mydatafixed = {}
|
||||
|
||||
let somma = 0
|
||||
|
||||
for (const rec of this.mydata) {
|
||||
if (this.sum) {
|
||||
somma += rec.count
|
||||
} else {
|
||||
somma = rec.count
|
||||
}
|
||||
this.mydatafixed[rec._id] = somma
|
||||
}
|
||||
}
|
||||
|
||||
get getmydata() {
|
||||
return this.mydatafixed
|
||||
}
|
||||
|
||||
}
|
||||
12
src/components/CLineChart/CLineChart.vue
Normal file
12
src/components/CLineChart/CLineChart.vue
Normal file
@@ -0,0 +1,12 @@
|
||||
<template>
|
||||
<div class="q-pa-sm">
|
||||
<line-chart :title="title" :data="getmydata" :round="0" :colors="mycolors"></line-chart>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CLineChart.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CLineChart.scss';
|
||||
</style>
|
||||
1
src/components/CLineChart/index.ts
Normal file
1
src/components/CLineChart/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export {default as CLineChart} from './CLineChart.vue'
|
||||
15
src/components/CListNationality/CListNationality.scss
Normal file
15
src/components/CListNationality/CListNationality.scss
Normal file
@@ -0,0 +1,15 @@
|
||||
.flag_icon{
|
||||
max-height: 40px;
|
||||
}
|
||||
|
||||
.label_count{
|
||||
font-size: 1.15rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
.clitemnat{
|
||||
height: 40px;
|
||||
padding: 2px 2px !important;
|
||||
}
|
||||
|
||||
21
src/components/CListNationality/CListNationality.ts
Normal file
21
src/components/CListNationality/CListNationality.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import MixinBase from '@src/mixins/mixin-base'
|
||||
|
||||
@Component({
|
||||
|
||||
})
|
||||
|
||||
export default class CListNationality extends MixinBase {
|
||||
@Prop({ required: true }) public mydata: any []
|
||||
|
||||
get getsize() {
|
||||
if (tools.isMobile())
|
||||
return '130px'
|
||||
else
|
||||
return '150px'
|
||||
}
|
||||
}
|
||||
45
src/components/CListNationality/CListNationality.vue
Normal file
45
src/components/CListNationality/CListNationality.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<div class="row">
|
||||
<div class="column animazione">
|
||||
<div class="text-center">{{$t('pages.statusreg.nationality')}}</div>
|
||||
<transition-group name="fade" mode="out-in"
|
||||
appear
|
||||
enter-active-class="animazione fadeIn"
|
||||
leave-active-class="animazione fadeOut">
|
||||
<q-item v-for="(nat, index) in mydata" :key="nat._id" class="clitemnat">
|
||||
<q-item-section avatar>
|
||||
<q-avatar v-if="tools.geticon(nat._id)"
|
||||
:class="tools.geticon(nat._id)" class="flag_icon">
|
||||
|
||||
</q-avatar>
|
||||
<q-avatar v-else color="primary" text-color="white" class="text-center">
|
||||
{{ tools.capitalize(nat._id) }}
|
||||
</q-avatar>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label>{{ tools.getNationsByNationality(nat._id) }}</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section side>
|
||||
<q-item-label class="label_count">
|
||||
<div class="justify-center">{{ nat.count }}
|
||||
<q-chip outline color="green" text-color="white" icon-right="fas fa-user-plus" size="xs"></q-chip>
|
||||
</div>
|
||||
</q-item-label>
|
||||
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
</transition-group>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CListNationality.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CListNationality.scss';
|
||||
</style>
|
||||
1
src/components/CListNationality/index.ts
Normal file
1
src/components/CListNationality/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export {default as CListNationality} from './CListNationality.vue'
|
||||
@@ -12,9 +12,6 @@
|
||||
appear
|
||||
enter-active-class="animazione fadeIn"
|
||||
leave-active-class="animazione fadeOut">
|
||||
<div>
|
||||
Mancano: {{ nextconf }}
|
||||
</div>
|
||||
<q-item v-for="(confer, index) in listacalzoom" :key="confer._id" class="q-mb-xs animated" v-ripple>
|
||||
|
||||
<q-item-section avatar>
|
||||
@@ -25,10 +22,17 @@
|
||||
</q-avatar>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-section class="text-center">
|
||||
<q-item-label class="title">{{ confer.title }}</q-item-label>
|
||||
<q-item-label class="id_conf">ID: {{ confer.id_conf_zoom }}</q-item-label>
|
||||
<q-item-label class="note">ID: {{ confer.note }} </q-item-label>
|
||||
<q-item-label class="note">
|
||||
<q-chip
|
||||
style="background-color: lightblue !important;"
|
||||
text-color="black"
|
||||
|
||||
>{{ confer.note }}
|
||||
</q-chip>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section side>
|
||||
|
||||
@@ -107,6 +107,8 @@ export default class CSignIn extends Vue {
|
||||
public submit() {
|
||||
// console.log('submit LOGIN')
|
||||
|
||||
this.signin.username = tools.removespaces(this.signin.username)
|
||||
|
||||
this.$v.signin.$touch()
|
||||
|
||||
if (this.$v.signin.$error) {
|
||||
|
||||
@@ -16,9 +16,9 @@ import 'vue-country-code/dist/vue-country-code.css'
|
||||
import { serv_constants } from '@src/store/Modules/serv_constants'
|
||||
|
||||
import VueCountryCode from 'vue-country-code'
|
||||
import { CTitleBanner } from '../CTitleBanner'
|
||||
import { registereduser } from '../../validation'
|
||||
import MixinBase from '../../mixins/mixin-base'
|
||||
import { CTitleBanner } from '../CTitleBanner'
|
||||
|
||||
Vue.use(VueCountryCode)
|
||||
// import {Loading, QSpinnerFacebook, QSpinnerGears} from 'quasar'
|
||||
@@ -179,6 +179,8 @@ export default class CSignUp extends MixinBase {
|
||||
public submitOk() {
|
||||
this.$v.signup.$touch()
|
||||
|
||||
this.signup.username = tools.removespaces(this.signup.username)
|
||||
|
||||
this.duplicate_email = false
|
||||
this.duplicate_username = false
|
||||
|
||||
|
||||
@@ -16,9 +16,10 @@ import 'vue-country-code/dist/vue-country-code.css'
|
||||
import { serv_constants } from '@src/store/Modules/serv_constants'
|
||||
|
||||
import VueCountryCode from 'vue-country-code'
|
||||
import { CTitleBanner } from '../CTitleBanner'
|
||||
import { registereduser } from '../../validation'
|
||||
import MixinBase from '../../mixins/mixin-base'
|
||||
import { CTitleBanner } from '../CTitleBanner'
|
||||
import { PagePolicy } from '../PagePolicy'
|
||||
|
||||
Vue.use(VueCountryCode)
|
||||
// import {Loading, QSpinnerFacebook, QSpinnerGears} from 'quasar'
|
||||
@@ -27,7 +28,7 @@ Vue.use(VueCountryCode)
|
||||
name: 'CSignUp',
|
||||
mixins: [validationMixin],
|
||||
validations,
|
||||
components: { Logo, CTitleBanner }
|
||||
components: { Logo, CTitleBanner, PagePolicy }
|
||||
})
|
||||
|
||||
export default class CSignUpNotevole extends MixinBase {
|
||||
@@ -35,6 +36,7 @@ export default class CSignUpNotevole extends MixinBase {
|
||||
@Prop({ required: false, default: false }) public showcell: boolean
|
||||
@Prop({ required: false, default: false }) public showaportador: boolean
|
||||
@Prop({ required: false, default: false }) public shownationality: boolean
|
||||
|
||||
public $v
|
||||
public $q
|
||||
public $t: any
|
||||
@@ -43,6 +45,7 @@ export default class CSignUpNotevole extends MixinBase {
|
||||
|
||||
public duplicate_email: boolean = false
|
||||
public duplicate_username: boolean = false
|
||||
public showdisclaimer: boolean = false
|
||||
|
||||
public options = [
|
||||
{ label: 'Sono già registrato sulla Chat di Ayni', value: true, color: 'green' },
|
||||
@@ -211,6 +214,8 @@ export default class CSignUpNotevole extends MixinBase {
|
||||
public submitOk() {
|
||||
this.$v.signup.$touch()
|
||||
|
||||
this.signup.username = tools.removespaces(this.signup.username)
|
||||
|
||||
this.duplicate_email = false
|
||||
this.duplicate_username = false
|
||||
|
||||
@@ -224,8 +229,10 @@ export default class CSignUpNotevole extends MixinBase {
|
||||
return
|
||||
}
|
||||
|
||||
this.signup.name = tools.CapitalizeAllWords(this.signup.name)
|
||||
this.signup.surname = tools.CapitalizeAllWords(this.signup.surname)
|
||||
this.signup.name = tools.CapitalizeAllWords(this.signup.name).trim()
|
||||
this.signup.surname = tools.CapitalizeAllWords(this.signup.surname).trim()
|
||||
this.signup.profile.cell = tools.removespaces(this.signup.profile.cell).trim()
|
||||
this.signup.profile.intcode_cell = this.signup.profile.intcode_cell.trim()
|
||||
|
||||
this.$q.loading.show({ message: this.$t('reg.incorso') })
|
||||
|
||||
@@ -257,7 +264,14 @@ export default class CSignUpNotevole extends MixinBase {
|
||||
this.signup.username = value.trim()
|
||||
}
|
||||
|
||||
get nuovareg() {
|
||||
return (this.signup.aportador_solidario !== tools.APORTADOR_NONE)
|
||||
}
|
||||
|
||||
get getplaceholdercell() {
|
||||
if (this.signup.aportador_solidario !== tools.APORTADOR_NONE)
|
||||
return this.$t('reg.cell')
|
||||
else
|
||||
return this.$t('reg.cellreg')
|
||||
}
|
||||
|
||||
@@ -265,4 +279,11 @@ export default class CSignUpNotevole extends MixinBase {
|
||||
return true
|
||||
// return this.signup.already_registered || (!this.signup.already_registered && this.signup.aportador_solidario)
|
||||
}
|
||||
|
||||
get gettitlereg() {
|
||||
if (!this.nuovareg)
|
||||
return this.$t('pages.SignUp_alreadylista')
|
||||
else
|
||||
return this.$t('pages.SignUp')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,11 +2,28 @@
|
||||
<div>
|
||||
<div class="text-center">
|
||||
<p>
|
||||
<logo></logo>
|
||||
<CTitleBanner :title="$t('pages.SignUp')"></CTitleBanner>
|
||||
<logo mystyle="height:200px;"></logo>
|
||||
<CTitleBanner :title="gettitlereg"></CTitleBanner>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<q-banner
|
||||
v-if="!nuovareg"
|
||||
rounded
|
||||
class="bg-primary text-white"
|
||||
style="text-align: center; font-size:1rem;">
|
||||
<span class="mybanner" v-html="$t('reg.reg_lista_prec')"></span>
|
||||
</q-banner>
|
||||
|
||||
<br>
|
||||
<q-banner
|
||||
v-if="!nuovareg"
|
||||
rounded
|
||||
class="bg-warning text-black"
|
||||
style="text-align: center; font-size:1rem;">
|
||||
<span class="mybanner">{{ $t('reg.nuove_registrazioni')}}</span>
|
||||
</q-banner>
|
||||
|
||||
<!--Prova URL : {{env('PROVA_PAOLO')}}-->
|
||||
|
||||
<div class="q-gutter-sm">
|
||||
@@ -51,6 +68,7 @@
|
||||
@blur="$v.signup.email.$touch"
|
||||
:error="$v.signup.email.$error"
|
||||
:error-message="errorMsg('email', $v.signup.email)"
|
||||
@keydown.space="(event) => event.preventDefault()"
|
||||
maxlength="50"
|
||||
debounce="1000"
|
||||
:label="$t('reg.email')">
|
||||
@@ -175,11 +193,19 @@
|
||||
:preferredCountries="tools.getprefCountries"
|
||||
:placeholder="getplaceholdercell"
|
||||
maxlength="20"
|
||||
:enabledCountryCode="true"
|
||||
autocomplete="off"
|
||||
mode="international"
|
||||
:enabledCountryCode="false"
|
||||
inputClasses="clCell"
|
||||
wrapperClasses="clCellCode">
|
||||
</vue-tel-input>
|
||||
|
||||
<br>
|
||||
<div class="text-center">
|
||||
<q-btn rounded size="sm" color="positive" @click="showdisclaimer = true">
|
||||
{{$t('privacy_policy')}}
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
<q-checkbox
|
||||
v-model="signup.terms"
|
||||
@@ -220,6 +246,32 @@
|
||||
|
||||
-->
|
||||
|
||||
<q-dialog v-model="showdisclaimer">
|
||||
<q-card :style="`min-width: `+ tools.myheight_dialog() + `px;`">
|
||||
<q-toolbar class="bg-primary text-white">
|
||||
<q-toolbar-title>
|
||||
Policy
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow">
|
||||
<PagePolicy
|
||||
owneremail="ayni.gifteconomy@gmail.com"
|
||||
SiteName="Ayni"
|
||||
ownerDataName="Ayni"
|
||||
managerData="Ayni"
|
||||
includeData="dati anagrafici (ragione sociale, nome, cognome), recapiti (telefono, indirizzo email)"
|
||||
url="ayni.gifteconomy@gmail.com"
|
||||
lastdataupdate="16 Gennaio 2020"
|
||||
country="Italia"
|
||||
>
|
||||
|
||||
</PagePolicy>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
||||
</q-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -19,3 +19,13 @@
|
||||
}
|
||||
|
||||
li {}
|
||||
|
||||
.landing__footer-icons {
|
||||
font-size: 3rem
|
||||
}
|
||||
|
||||
.icon_contact:hover {
|
||||
// border-color: white;
|
||||
border-width: .0625rem;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,11 +8,12 @@ import MixinBase from '../../mixins/mixin-base'
|
||||
import { CTitleBanner, CMyFieldDb } from '@components'
|
||||
import { CMyInnerPage } from '../CMyInnerPage'
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { CVerifyTelegram } from '../CVerifyEmail'
|
||||
import { CVerifyEmail } from '../CVerifyTelegram'
|
||||
|
||||
import { copyToClipboard } from 'quasar'
|
||||
|
||||
@Component({
|
||||
components: { CTitleBanner, CMyFieldDb, CMyInnerPage }
|
||||
components: { CTitleBanner, CMyFieldDb, CMyInnerPage, CVerifyTelegram, CVerifyEmail }
|
||||
})
|
||||
|
||||
export default class CStatus extends MixinBase {
|
||||
@@ -21,7 +22,26 @@ export default class CStatus extends MixinBase {
|
||||
public step = 1
|
||||
public NUMSTEP_START = 3
|
||||
|
||||
get numpayment() {
|
||||
if (UserStore.state.my.profile)
|
||||
if (UserStore.state.my.profile.paymenttypes)
|
||||
return UserStore.state.my.profile.paymenttypes.length
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
public arrsteps = [
|
||||
{
|
||||
title: 'steps.chat_biblio',
|
||||
descr: 'steps.chat_biblio_long',
|
||||
page: '',
|
||||
funccheck(index) {
|
||||
return true
|
||||
},
|
||||
funccheck_error(index) {
|
||||
return false
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'steps.zoom',
|
||||
descr: 'steps.zoom_long',
|
||||
@@ -39,7 +59,7 @@ export default class CStatus extends MixinBase {
|
||||
page: '/mydream',
|
||||
funccheck(index) {
|
||||
if (UserStore.state.my.profile.my_dream)
|
||||
if (UserStore.state.my.profile.my_dream.length > 10)
|
||||
if (UserStore.state.my.profile.my_dream.length > 20)
|
||||
return true
|
||||
|
||||
return false
|
||||
@@ -65,7 +85,18 @@ export default class CStatus extends MixinBase {
|
||||
descr: 'steps.paymenttype_long',
|
||||
page: '',
|
||||
funccheck(index) {
|
||||
return this.numpayment >= 2
|
||||
let ispaypal = false
|
||||
if (UserStore.state.my.profile.paymenttypes) {
|
||||
if (UserStore.state.my.profile.paymenttypes.includes('paypal')) {
|
||||
if (UserStore.state.my.profile.email_paypal)
|
||||
ispaypal = true
|
||||
}
|
||||
if (UserStore.state.my.profile)
|
||||
if (UserStore.state.my.profile.paymenttypes)
|
||||
return (UserStore.state.my.profile.paymenttypes.length >= 2) && ispaypal
|
||||
|
||||
}
|
||||
return false
|
||||
},
|
||||
funccheck_error(index) {
|
||||
return true
|
||||
@@ -159,16 +190,13 @@ export default class CStatus extends MixinBase {
|
||||
// }
|
||||
}
|
||||
}
|
||||
console.log('step', this.step)
|
||||
// console.log('step', this.step)
|
||||
}
|
||||
|
||||
public mounted() {
|
||||
this.setstep()
|
||||
}
|
||||
|
||||
get TelegCode() {
|
||||
return UserStore.state.my.profile.teleg_checkcode
|
||||
}
|
||||
get TelegVerificato() {
|
||||
return UserStore.state.my.profile.teleg_id > 0
|
||||
}
|
||||
@@ -195,20 +223,6 @@ export default class CStatus extends MixinBase {
|
||||
return ' (' + this.numpayment + ' ' + this.$t('reg.selected') + ')'
|
||||
}
|
||||
|
||||
get numpayment() {
|
||||
if (UserStore.state.my.profile)
|
||||
if (UserStore.state.my.profile.paymenttypes)
|
||||
return UserStore.state.my.profile.paymenttypes.length
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
get getLinkBotTelegram() {
|
||||
const link = this.getValDb('TELEG_BOT_LINK', false)
|
||||
// console.log('link', link)
|
||||
return link
|
||||
}
|
||||
|
||||
get getlaststep() {
|
||||
return this.arrsteps.length + this.NUMSTEP_START - 1
|
||||
}
|
||||
@@ -220,6 +234,7 @@ export default class CStatus extends MixinBase {
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
public getnuminvitati_attivi() {
|
||||
if (UserStore.state.my)
|
||||
if (UserStore.state.my.calcstat)
|
||||
@@ -245,10 +260,7 @@ export default class CStatus extends MixinBase {
|
||||
}
|
||||
|
||||
public copylink() {
|
||||
copyToClipboard(this.getRefLink).then(() => {
|
||||
tools.showNotif(this.$q, this.$t('dialog.copyclipboard') + ' \'' + this.getRefLink + '\'')
|
||||
})
|
||||
|
||||
tools.copyStringToClipboard(this, this.getRefLink)
|
||||
}
|
||||
|
||||
public getiferror(checkerror, value) {
|
||||
@@ -263,4 +275,46 @@ export default class CStatus extends MixinBase {
|
||||
return 'fas fa-exclamation-triangle'
|
||||
}
|
||||
|
||||
get listasel() {
|
||||
return UserStore.state.my.profile.paymenttypes
|
||||
}
|
||||
|
||||
get isselectPaypal() {
|
||||
if (UserStore.state.my.profile) {
|
||||
// console.log('pay', UserStore.state.my.profile.paymenttypes)
|
||||
if (UserStore.state.my.profile.paymenttypes) {
|
||||
if (UserStore.state.my.profile.paymenttypes.includes('paypal')) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
get TelegramBiblio() {
|
||||
return 'https://t.me/joinchat/AL2qKExZKvenLgpVhOyefQ'
|
||||
}
|
||||
|
||||
public geticonstep(title) {
|
||||
if (title === 'steps.chat_biblio') {
|
||||
return 'settings'
|
||||
} else {
|
||||
return 'check-circle'
|
||||
}
|
||||
}
|
||||
|
||||
public geticoncolor(title) {
|
||||
if (title === 'steps.chat_biblio') {
|
||||
return 'blue'
|
||||
} else {
|
||||
return 'green'
|
||||
}
|
||||
}
|
||||
|
||||
get TelegCode() {
|
||||
return UserStore.state.my.profile.teleg_checkcode
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
mystyle="" myclass="myshad" :canopen="true">
|
||||
|
||||
<div class="q-pa-xs">
|
||||
|
||||
<q-stepper
|
||||
v-model="step"
|
||||
vertical
|
||||
@@ -21,15 +22,9 @@
|
||||
:error="!isEmailVerified"
|
||||
:error-icon="geterricon(true)"
|
||||
>
|
||||
<q-chip v-if="isEmailVerified" color="positive" text-color="white" icon="mail">
|
||||
{{ `Email ` + $t('pages.statusreg.verified') }}
|
||||
</q-chip>
|
||||
<q-chip v-else color="negative" text-color="white" icon="">
|
||||
{{ `Email ` + $t('pages.statusreg.nonverified') }}
|
||||
</q-chip>
|
||||
<div v-if="!isEmailVerified" v-html="$t('components.authentication.email_verification.link_sent')">
|
||||
<CVerifyEmail>
|
||||
|
||||
</div>
|
||||
</CVerifyEmail>
|
||||
|
||||
<q-stepper-navigation v-if="isEmailVerified">
|
||||
<q-btn @click="step = 2" color="primary" :label="$t('dialog.avanti')"></q-btn>
|
||||
@@ -47,28 +42,14 @@
|
||||
<q-chip v-if="TelegVerificato" color="positive" text-color="white" icon="fab fa-telegram">
|
||||
{{ telegramtext }}
|
||||
</q-chip>
|
||||
<q-chip v-else color="negative" text-color="white" icon="">
|
||||
<q-chip v-else color="negative" text-color="white" icon="email">
|
||||
{{ telegramtext }}
|
||||
</q-chip>
|
||||
|
||||
<div v-if="TelegCode" class="text-h4 text-center">
|
||||
{{ $t('reg.teleg_auth') }} Telegram: {{TelegCode}}
|
||||
</div>
|
||||
<CVerifyTelegram v-if="TelegCode || !TelegVerificato">
|
||||
|
||||
</CVerifyTelegram>
|
||||
|
||||
<div v-if="!TelegVerificato" class="q-pa-sm q-gutter-sm">
|
||||
<strong>{{ $t('components.authentication.telegram.open')}}</strong>
|
||||
<div class="q-ma-sm">
|
||||
<q-btn color="primary" icon="fab fa-telegram" :label="$t('components.authentication.telegram.openbot')"
|
||||
type="a"
|
||||
:href="getLinkBotTelegram" target="_blank"></q-btn>
|
||||
<br>
|
||||
</div>
|
||||
<strong>{{ $t('components.authentication.telegram.ifclose')}}</strong>
|
||||
<div class="q-my-sm">
|
||||
<q-img src="statics/images/ayni_bot.jpg" class="" alt="AYNI BOT" style="height: 100px; width: 250px;">
|
||||
</q-img>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<q-stepper-navigation>
|
||||
<q-btn v-if="TelegVerificato" @click="step = 3" color="primary" :label="$t('dialog.avanti')"></q-btn>
|
||||
@@ -80,7 +61,8 @@
|
||||
:key="mystep.title"
|
||||
:name="NUMSTEP_START + index"
|
||||
:title="gettextstep(mystep)"
|
||||
icon="check-circle"
|
||||
:icon="geticonstep(mystep.title)"
|
||||
:done-color="geticoncolor(mystep.title)"
|
||||
:done="mystep.funccheck(index)"
|
||||
:error="getiferror(mystep.funccheck_error(index), mystep.funccheck(index))"
|
||||
:error-icon="geterricon(mystep.funccheck(index))"
|
||||
@@ -89,6 +71,8 @@
|
||||
<div v-if="mystep.descr">
|
||||
<div v-html="$t(mystep.descr)"></div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<CMyFieldDb :title="$t('reg.paymenttype')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
@@ -96,6 +80,16 @@
|
||||
:type="tools.FieldType.multiselect"
|
||||
jointable="paymenttypes">
|
||||
</CMyFieldDb>
|
||||
|
||||
<CMyFieldDb v-if="isselectPaypal" :title="$t('reg.email_paypal')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="email_paypal"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="mystep.title === 'steps.dream'">
|
||||
<div v-if="mystep.descr">
|
||||
@@ -109,6 +103,18 @@
|
||||
>
|
||||
</CMyFieldDb>
|
||||
</div>
|
||||
<div v-else-if="mystep.title === 'steps.chat_biblio'" >
|
||||
<div v-if="mystep.descr">
|
||||
<div v-html="$t(mystep.descr)"></div>
|
||||
</div>
|
||||
<br><strong>Entra in Chat BiblioBacheca, cliccando qui:</strong>
|
||||
|
||||
<div class="landing__footer-icons row flex-center margin_buttons">
|
||||
<a v-if="!!TelegramBiblio" :href="TelegramBiblio" target="_blank">
|
||||
<i aria-hidden="true" class="q-icon fab fa-telegram icon_contact links"></i></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-else-if="mystep.title === 'steps.zoom'">
|
||||
<div v-if="mystep.descr">
|
||||
<div v-html="$t(mystep.descr)"></div>
|
||||
@@ -147,19 +153,6 @@
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
|
||||
<CTitleBanner class="q-pa-xs" title="Prossimi Incontri" bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
myclass="myshad" canopen="true" :visible="false">
|
||||
<div v-if="mystep.page">
|
||||
<CMyInnerPage :path=mystep.page>
|
||||
<div v-if="mystep.descr">
|
||||
<div v-html="$t(mystep.descr)"></div>
|
||||
</div>
|
||||
</CMyInnerPage>
|
||||
</div>
|
||||
|
||||
</CTitleBanner>
|
||||
|
||||
|
||||
</div>
|
||||
<div v-else-if="mystep.title === 'steps.sharemovement'">
|
||||
|
||||
@@ -8,10 +8,14 @@ import { validations } from '../CSignUpNotevole/CSignUp-validate'
|
||||
import { CTitleBanner } from '@components'
|
||||
import { CCardState } from '../CCardState'
|
||||
import { UserStore } from '../../store/Modules'
|
||||
import { CCardStat } from '../CCardStat'
|
||||
import { CLineChart } from '../CLineChart'
|
||||
import { CGeoChart } from '../CGeoChart'
|
||||
import { CListNationality } from '../CListNationality'
|
||||
|
||||
@Component({
|
||||
name: 'CStatusReg',
|
||||
components: { CTitleBanner, CCardState }
|
||||
components: { CTitleBanner, CCardState, CCardStat, CLineChart, CGeoChart, CListNationality }
|
||||
})
|
||||
|
||||
export default class CStatusReg extends MixinBase {
|
||||
@@ -26,6 +30,9 @@ export default class CStatusReg extends MixinBase {
|
||||
num_tot_lista: 0,
|
||||
num_reg_lista: 0,
|
||||
num_reg: 0,
|
||||
num_teleg_attivo: 0,
|
||||
email_non_verif: 0,
|
||||
num_teleg_pending: 0,
|
||||
lastsreg: [],
|
||||
checkuser: { verified_email: false }
|
||||
}
|
||||
@@ -124,9 +131,14 @@ export default class CStatusReg extends MixinBase {
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
get visustat() {
|
||||
return this.datastat.num_reg > 0 || this.datastat.num_reg_lista > 0
|
||||
}
|
||||
|
||||
get telegnonattivi() {
|
||||
return this.datastat.num_reg - this.datastat.num_teleg_attivo
|
||||
}
|
||||
get emailnonverif() {
|
||||
return this.datastat.email_non_verif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,8 +10,19 @@
|
||||
<CCardState :mytext="$t('pages.statusreg.reg')" :myval="datastat.num_reg" :myperc="100"></CCardState>
|
||||
<CCardState :mytext="$t('pages.statusreg.giainlista')" :isperc="true" :myval="datastat.num_reg_lista"
|
||||
:myperc="perc_reg" :textadd="` / ` + datastat.num_tot_lista"></CCardState>
|
||||
<div class="q-pa-xs ">
|
||||
<CCardStat mytext="Partecipato in Zoom" :myval="datastat.num_part_zoom"></CCardStat>
|
||||
<CCardStat mytext="Hanno scritto il Sogno" :myval="datastat.num_users_dream"></CCardStat>
|
||||
<CCardStat v-if="emailnonverif" mytext="Email non Verificate" :myval="emailnonverif"
|
||||
mycol="negative"></CCardStat>
|
||||
<CCardStat v-if="telegnonattivi" mytext="Telegram Non Attivi" :myval="telegnonattivi"
|
||||
mycol="negative"></CCardStat>
|
||||
<CCardStat v-if="datastat.num_teleg_pending > 0" mytext="Telegram Pendenti"
|
||||
:myval="datastat.num_teleg_pending" mycol="negative"></CCardStat>
|
||||
</div>
|
||||
|
||||
<div class="column animazione">
|
||||
<div class="text-center">Nuove Registrazioni:</div>
|
||||
<div class="text-center">{{$t('pages.statusreg.newreg')}}</div>
|
||||
<transition-group name="fade" mode="out-in"
|
||||
appear
|
||||
enter-active-class="animazione fadeIn"
|
||||
@@ -19,7 +30,8 @@
|
||||
<q-item v-for="(user, index) in lastsreg" :key="user.username" class="q-mb-xs animated" v-ripple>
|
||||
|
||||
<q-item-section avatar>
|
||||
<q-avatar v-if="tools.geticon(user.profile.nationality)" :class="tools.geticon(user.profile.nationality)">
|
||||
<q-avatar v-if="tools.geticon(user.profile.nationality)"
|
||||
:class="tools.geticon(user.profile.nationality)">
|
||||
|
||||
</q-avatar>
|
||||
<q-avatar v-else color="primary" text-color="white" class="text-center">
|
||||
@@ -39,6 +51,22 @@
|
||||
</q-item>
|
||||
</transition-group>
|
||||
</div>
|
||||
|
||||
<CGeoChart :mydata="datastat.arr_nations">
|
||||
|
||||
</CGeoChart>
|
||||
<div class="row text-center justify-center">
|
||||
<CListNationality :mydata="datastat.arr_nations">
|
||||
|
||||
</CListNationality>
|
||||
<CLineChart :mydata="datastat.reg_daily" title="Registrazioni Giornaliere">
|
||||
|
||||
</CLineChart>
|
||||
<CLineChart :mydata="datastat.reg_daily" title="Registrazioni Totali" :sum="true"
|
||||
:mycolors="['#0b0', '#666']">
|
||||
|
||||
</CLineChart>
|
||||
</div>
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
</div>
|
||||
|
||||
0
src/components/CVerifyEmail/CVerifyTelegram.scss
Normal file
0
src/components/CVerifyEmail/CVerifyTelegram.scss
Normal file
40
src/components/CVerifyEmail/CVerifyTelegram.ts
Normal file
40
src/components/CVerifyEmail/CVerifyTelegram.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import MixinBase from '@src/mixins/mixin-base'
|
||||
import { UserStore } from '../../store'
|
||||
import { CCopyBtn } from '../CCopyBtn'
|
||||
|
||||
@Component({
|
||||
name: 'CCardState',
|
||||
components: { CCopyBtn }
|
||||
})
|
||||
|
||||
export default class CVerifyTelegram extends MixinBase {
|
||||
public $t
|
||||
public $q
|
||||
|
||||
get TelegCode() {
|
||||
if (UserStore.state.my.profile) {
|
||||
return UserStore.state.my.profile.teleg_checkcode
|
||||
}else {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
get TelegVerificato() {
|
||||
return UserStore.state.my.profile.teleg_id > 0
|
||||
}
|
||||
|
||||
get getLinkBotTelegram() {
|
||||
const link = this.getValDb('TELEG_BOT_LINK', false)
|
||||
// console.log('link', link)
|
||||
return link
|
||||
}
|
||||
get isEmailVerified() {
|
||||
return UserStore.state.my.verified_email
|
||||
}
|
||||
|
||||
}
|
||||
39
src/components/CVerifyEmail/CVerifyTelegram.vue
Normal file
39
src/components/CVerifyEmail/CVerifyTelegram.vue
Normal file
@@ -0,0 +1,39 @@
|
||||
<template>
|
||||
<div class="text-center q-gutter-sm q-ma-sm clBorderWarning">
|
||||
<div v-if="TelegCode > 0">
|
||||
<div class="text-h5 text-center text-red">
|
||||
{{ $t('reg.teleg_auth') }} Telegram:
|
||||
</div>
|
||||
|
||||
<CCopyBtn :title="$t('reg.click_per_copiare')" :texttocopy="TelegCode">
|
||||
|
||||
</CCopyBtn>
|
||||
|
||||
<div class="text-h6 text-center" v-html="$t('reg.teleg_torna_sul_bot')">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="!TelegVerificato" class="q-pa-sm q-gutter-sm">
|
||||
<div v-if="!TelegCode"><strong>{{ $t('components.authentication.telegram.open')}}</strong></div>
|
||||
<div class="q-ma-md">
|
||||
<q-btn color="primary" icon="fab fa-telegram" :label="$t('components.authentication.telegram.openbot')"
|
||||
type="a"
|
||||
:href="getLinkBotTelegram" target="_blank"></q-btn>
|
||||
<br>
|
||||
</div>
|
||||
<strong>{{ $t('components.authentication.telegram.ifclose')}}</strong>
|
||||
<div class="q-my-sm">
|
||||
<q-img src="statics/images/ayni_bot.jpg" class="" alt="AYNI BOT" style="height: 100px; width: 250px;">
|
||||
</q-img>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CVerifyTelegram.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CVerifyTelegram.scss';
|
||||
</style>
|
||||
1
src/components/CVerifyEmail/index.ts
Normal file
1
src/components/CVerifyEmail/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export {default as CVerifyTelegram} from './CVerifyTelegram.vue'
|
||||
0
src/components/CVerifyTelegram/CVerifyEmail.scss
Normal file
0
src/components/CVerifyTelegram/CVerifyEmail.scss
Normal file
21
src/components/CVerifyTelegram/CVerifyEmail.ts
Normal file
21
src/components/CVerifyTelegram/CVerifyEmail.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import MixinBase from '@src/mixins/mixin-base'
|
||||
import { UserStore } from '../../store'
|
||||
|
||||
@Component({
|
||||
components: { }
|
||||
})
|
||||
|
||||
export default class CVerifyEmail extends MixinBase {
|
||||
public $t
|
||||
public $q
|
||||
|
||||
get isEmailVerified() {
|
||||
return UserStore.state.my.verified_email
|
||||
}
|
||||
|
||||
}
|
||||
25
src/components/CVerifyTelegram/CVerifyEmail.vue
Normal file
25
src/components/CVerifyTelegram/CVerifyEmail.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<div class="text-center q-gutter-sm q-ma-sm clBorderWarning">
|
||||
<q-chip v-if="isEmailVerified" color="positive" text-color="white" icon="email">
|
||||
{{ `Email ` + $t('pages.statusreg.verified') }}
|
||||
</q-chip>
|
||||
<q-chip v-else color="negative" text-color="white" icon="email">
|
||||
{{ `Email ` + $t('pages.statusreg.nonverified') }}
|
||||
</q-chip>
|
||||
<div v-if="!isEmailVerified" v-html="$t('components.authentication.email_verification.link_sent')">
|
||||
|
||||
</div>
|
||||
<div v-if="!isEmailVerified" v-html="$t('components.authentication.email_verification.se_non_ricevo')">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CVerifyEmail.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CVerifyEmail.scss';
|
||||
</style>
|
||||
1
src/components/CVerifyTelegram/index.ts
Normal file
1
src/components/CVerifyTelegram/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export {default as CVerifyEmail} from './CVerifyEmail.vue'
|
||||
@@ -264,7 +264,6 @@ y solicite su transmisión a otro propietario, si es técnicamente posible. </p>
|
||||
</div>
|
||||
|
||||
|
||||
<Footer></Footer>
|
||||
</q-page>
|
||||
|
||||
</template>
|
||||
|
||||
@@ -44,3 +44,8 @@ export * from './CStatusReg'
|
||||
export * from './CCardState'
|
||||
export * from './CMyInnerPage'
|
||||
export * from './CNextZoom'
|
||||
export * from './CCardStat'
|
||||
export * from './CCopyBtn'
|
||||
export * from './CVerifyTelegram'
|
||||
export * from './CVerifyEmail'
|
||||
export * from './CLineChart'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Vue from 'vue'
|
||||
import { Component } from 'vue-property-decorator'
|
||||
import { Component, Prop } from 'vue-property-decorator'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
@@ -7,6 +7,8 @@ import { toolsext } from '@src/store/Modules/toolsext'
|
||||
name: 'Logo'
|
||||
})
|
||||
export default class Logo extends Vue {
|
||||
@Prop({ required: false, default: '' }) public mystyle: boolean
|
||||
|
||||
get logoimg() {
|
||||
return '../../' + tools.getimglogo()
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div id="logo">
|
||||
<img id="logoimg" :alt="logoalt" :src=logoimg>
|
||||
<img id="logoimg" :alt="logoalt" :src=logoimg :style="mystyle">
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" src="./logo.ts">
|
||||
|
||||
@@ -39,10 +39,12 @@ const msgglobal = {
|
||||
write: 'scrive'
|
||||
},
|
||||
steps: {
|
||||
chat_biblio: 'Entro nella Chat AYNI BiblioBacheca',
|
||||
chat_biblio_long: 'Occorre entrare in questa Chat per ricevere le ultime notizie e rimanere in contatto con noi',
|
||||
paymenttype: 'Modalità di Pagamento',
|
||||
paymenttype_long: 'Scegliere almeno 2 Modalità di Pagamento, per permettere alle persone di poter scegliere come inviare il dono.',
|
||||
zoom: 'Partecipo agli Zoom (Video Conferenza)',
|
||||
zoom_long: 'Si richiede di partecipare ad almeno 1 Zoom, ma è consigliato prendere parte al movimento in maniera più attiva.',
|
||||
zoom_long: 'Si richiede di partecipare ad almeno 1 Zoom, ma è consigliato prendere parte al movimento in maniera più attiva.\n\n<strong>Partecipando agli Zoom verrete attivati dallo Staff che controllerà la vostra presenza.</strong>',
|
||||
sharemovement: 'Condivido il Movimento',
|
||||
sharemovement_long: 'Condivido il Movimento con almeno 2 amici e li guido alla registrazione e agli zoom',
|
||||
enter_prog: 'Entro in Programmazione',
|
||||
@@ -50,7 +52,7 @@ const msgglobal = {
|
||||
collaborate: 'Collaborazione',
|
||||
collaborate_long: 'Continuo a collaborare con il miei compagni, per arrivare al giorno della programmazione dove si attiverà il mio Mandala',
|
||||
dream: 'Scrivi il tuo Sogno',
|
||||
dream_long: 'Scrivi qui il tuo Sogno che vuoi realizzare!',
|
||||
dream_long: 'Scrivi qui il tuo Sogno che vuoi realizzare, sarà condiviso insieme a quello di tutti gli altri!',
|
||||
dono: 'Dono',
|
||||
dono_long: 'Faccio il mio dono al proprietario della Bigliettera',
|
||||
support: 'Sostengo il movimento',
|
||||
@@ -98,8 +100,8 @@ const msgglobal = {
|
||||
authentication: {
|
||||
telegram: {
|
||||
open: 'Clicca qui per aprire il BOT Telegram e segui le istruzioni',
|
||||
ifclose: 'Se non si apre oppure l\'avevi chiuso: cerca \'AYNI BOT\' nella ricerca di Telegram e premi Start',
|
||||
openbot: 'Apri BOT Telegram',
|
||||
ifclose: 'Se non si apre cliccando sul bottone, oppure l\'avevi eliminato: cerca \'AYNI BOT\' nella ricerca di Telegram e premi Start',
|
||||
openbot: 'Apri \'AYNI BOT\' su Telegram',
|
||||
},
|
||||
login: {
|
||||
facebook: 'Facebook'
|
||||
@@ -112,7 +114,8 @@ const msgglobal = {
|
||||
verify_email: 'Verifica la tua email',
|
||||
go_login: 'Torna al Login',
|
||||
incorrect_input: 'Inserimento incorretto.',
|
||||
link_sent: 'leggi la tua casella email e trova "Confermare la Registrazione a Ayni" e clicca su "Verifica Registrazione"',
|
||||
link_sent: 'Ora leggi la tua casella email e trova "Confermare la Registrazione a Ayni" e clicca su "Verifica Registrazione"',
|
||||
se_non_ricevo: 'Se non dovessi ricevere la email, controlla nella spam, oppure contatta l\'HelpDesk',
|
||||
title_unsubscribe: 'Disiscrizione alla newsletter',
|
||||
title_unsubscribe_done: 'Disiscrizione completata correttamente',
|
||||
}
|
||||
@@ -140,6 +143,9 @@ const msgglobal = {
|
||||
downline: 'Persone che hai Invitato',
|
||||
},
|
||||
reg: {
|
||||
verified_email: 'Email Verificata',
|
||||
reg_lista_prec: 'Inserire il Nome, Cognome e numero di cellulare che avete lasciato in passato quando vi siete iscritti alla Chat!<br>In questo modo il sistema vi riconosce e vi mantiene la posizione della lista.',
|
||||
nuove_registrazioni: 'Se questa è una NUOVA registrazione, dovete contattare la persona che vi ha INVITATO, che vi lascerà il LINK CORRETTO per fare la Registrazione sotto di lui/lei',
|
||||
aportador_solidario: 'Chi ti ha Invitato',
|
||||
aportador_solidario_nome_completo:'A.S. Nome',
|
||||
aportador_solidario_ind_order:'A.S.Ind',
|
||||
@@ -152,13 +158,15 @@ const msgglobal = {
|
||||
email: 'Email',
|
||||
intcode_cell: 'Prefisso Int.',
|
||||
cell: 'Cellulare Telegram',
|
||||
cellreg: 'Cellulare con cui ti eri registrato sulla Chat Notevole',
|
||||
cellreg: 'Cellulare con cui ti eri registrato',
|
||||
nationality: 'Nazionalità',
|
||||
email_paypal: 'Email Paypal',
|
||||
country_pay: 'Paese di Destinazione Pagamenti',
|
||||
username_telegram: 'Username Telegram',
|
||||
teleg_id: 'Telegram ID',
|
||||
teleg_auth:'Codice Autorizzazione',
|
||||
click_per_copiare:'Cliccaci sopra per copiarlo sugli appunti',
|
||||
teleg_torna_sul_bot:'1) Copia questo codice cliccando sul bottone qui sopra<br>2) ora torna su Telegram ed incolla (o scrivi) questo numero',
|
||||
teleg_checkcode: 'Codice Telegram',
|
||||
my_dream: 'Il mio Sogno',
|
||||
saw_zoom_presentation: 'Ha visto Zoom',
|
||||
@@ -175,10 +183,11 @@ const msgglobal = {
|
||||
username_login: 'Nome Utente o email',
|
||||
password: 'Password',
|
||||
repeatPassword: 'Ripeti password',
|
||||
terms: "Accetto i termini e le condizioni",
|
||||
terms: "Accetto i termini della privacy",
|
||||
onlyadult: "Confermo di essere Maggiorenne",
|
||||
submit: "Registrati",
|
||||
title_verif_reg: "Verifica Registrazione",
|
||||
reg_ok: "Registrazione Effettuata con Successo",
|
||||
verificato: "Verificato",
|
||||
non_verificato: "Non Verificato",
|
||||
forgetpassword: "Password dimenticata?",
|
||||
@@ -554,7 +563,7 @@ const msgglobal = {
|
||||
email: 'Email',
|
||||
intcode_cell: 'Prefijo Int.',
|
||||
cell: 'Móvil Telegram',
|
||||
cellreg: 'Cellulare con cui ti eri registrato sulla Chat Notevole',
|
||||
cellreg: 'Cellulare con cui ti eri registrato',
|
||||
nationality: 'Nacionalidad',
|
||||
email_paypal: 'Email Paypal',
|
||||
country_pay: 'País del Pagos de destino',
|
||||
@@ -577,7 +586,7 @@ const msgglobal = {
|
||||
username_login: 'Nombre usuario o email',
|
||||
password: 'contraseña',
|
||||
repeatPassword: 'Repetir contraseña',
|
||||
terms: "Acepto los términos y condiciones",
|
||||
terms: "Acepto los términos por la privacidad",
|
||||
onlyadult: "Confirmo que soy mayor de edad",
|
||||
submit: "Registrarse",
|
||||
title_verif_reg: "Verifica registro",
|
||||
@@ -945,7 +954,7 @@ const msgglobal = {
|
||||
email: 'Email',
|
||||
intcode_cell: 'Préfixe int.',
|
||||
cell: 'Téléphone Telegram',
|
||||
cellreg: 'Cellulare con cui ti eri registrato sulla Chat Notevole',
|
||||
cellreg: 'Cellulare con cui ti eri registrato',
|
||||
nationality: 'Nationalité',
|
||||
email_paypal: 'Email Paypal',
|
||||
country_pay: 'Pays de destination Paiements',
|
||||
@@ -968,7 +977,7 @@ const msgglobal = {
|
||||
username_login: 'Nom d\'utilisateur ou email',
|
||||
password: 'mot de passe',
|
||||
repeatPassword: 'Répéter le mot de passe',
|
||||
terms: "J'accepte les termes et conditions",
|
||||
terms: "J'accepte les conditions de confidentialité",
|
||||
onlyadult: "Je confirme que je suis majeur",
|
||||
submit: "S'inscrire",
|
||||
title_verif_reg: "Vérifier l'inscription",
|
||||
@@ -1336,7 +1345,7 @@ const msgglobal = {
|
||||
email: 'Email',
|
||||
intcode_cell: 'International Code',
|
||||
cell: 'Mobile Telegram',
|
||||
cellreg: 'Cellulare con cui ti eri registrato sulla Chat Notevole',
|
||||
cellreg: 'Cellulare con cui ti eri registrato',
|
||||
nationality: 'Nationality',
|
||||
email_paypal: 'Email Paypal',
|
||||
country_pay: 'Country of Destination Payments',
|
||||
@@ -1359,7 +1368,7 @@ const msgglobal = {
|
||||
surname: 'Surname',
|
||||
password: 'Password',
|
||||
repeatPassword: 'Repeat password',
|
||||
terms: "I agree with the terms and conditions",
|
||||
terms: "I agree with the terms and privacy",
|
||||
onlyadult: "I confirm that I'm at least 18 years old",
|
||||
submit: "Submit",
|
||||
title_verif_reg: "Verify Registration",
|
||||
@@ -1727,7 +1736,7 @@ const msgglobal = {
|
||||
email: 'Email',
|
||||
intcode_cell: 'International Code',
|
||||
cell: 'Mobile Telegram',
|
||||
cellreg: 'Cellulare con cui ti eri registrato sulla Chat Notevole',
|
||||
cellreg: 'Cellulare con cui ti eri registrato',
|
||||
nationality: 'Nationality',
|
||||
email_paypal: 'Email Paypal',
|
||||
country_pay: 'Country of Destination Payments',
|
||||
@@ -1750,7 +1759,7 @@ const msgglobal = {
|
||||
surname: 'Surname',
|
||||
password: 'Password',
|
||||
repeatPassword: 'Repeat password',
|
||||
terms: "I agree with the terms and conditions",
|
||||
terms: "I agree with the terms and privacy",
|
||||
onlyadult: "I confirm that I'm at least 18 years old",
|
||||
submit: "Submit",
|
||||
title_verif_reg: "Verify Registration",
|
||||
|
||||
@@ -818,7 +818,7 @@ namespace Actions {
|
||||
GlobalStore.state.mypage = (res.data.mypage) ? [...res.data.mypage] : []
|
||||
}
|
||||
|
||||
console.log('res.data.myuser', res.data.myuser)
|
||||
// console.log('res.data.myuser', res.data.myuser)
|
||||
if (res.data.myuser) {
|
||||
UserStore.mutations.authUser(res.data.myuser)
|
||||
|
||||
|
||||
@@ -36,7 +36,8 @@ export const DefaultUser: IUserFields = {
|
||||
verified_email: false,
|
||||
made_gift: false,
|
||||
profile: {
|
||||
img: ''
|
||||
img: '',
|
||||
teleg_id: 0
|
||||
},
|
||||
downline: [],
|
||||
calcstat: DefaultCalc
|
||||
@@ -305,6 +306,7 @@ namespace Mutations {
|
||||
localStorage.setItem(tools.localStorage.expirationDate, expirationDate.toString())
|
||||
localStorage.setItem(tools.localStorage.isLogged, String(true))
|
||||
localStorage.setItem(tools.localStorage.verified_email, String(myuser.verified_email))
|
||||
localStorage.setItem(tools.localStorage.teleg_id, String(myuser.profile.teleg_id))
|
||||
localStorage.setItem(tools.localStorage.made_gift, String(myuser.made_gift))
|
||||
localStorage.setItem(tools.localStorage.wasAlreadySubOnDb, String(GlobalStore.state.wasAlreadySubOnDb))
|
||||
|
||||
@@ -743,6 +745,7 @@ namespace Actions {
|
||||
localStorage.removeItem(tools.localStorage.isLogged)
|
||||
// localStorage.removeItem(rescodes.localStorage.leftDrawerOpen)
|
||||
localStorage.removeItem(tools.localStorage.verified_email)
|
||||
localStorage.removeItem(tools.localStorage.teleg_id)
|
||||
localStorage.removeItem(tools.localStorage.made_gift)
|
||||
localStorage.removeItem(tools.localStorage.categorySel)
|
||||
localStorage.removeItem(tools.localStorage.wasAlreadySubOnDb)
|
||||
@@ -833,6 +836,7 @@ namespace Actions {
|
||||
const made_gift = localStorage.getItem(tools.localStorage.made_gift) === 'true'
|
||||
const perm = parseInt(localStorage.getItem(tools.localStorage.perm), 10)
|
||||
const img = String(localStorage.getItem(tools.localStorage.img))
|
||||
const teleg_id = parseInt(localStorage.getItem(tools.localStorage.teleg_id), 10)
|
||||
|
||||
GlobalStore.state.wasAlreadySubOnDb = localStorage.getItem(tools.localStorage.wasAlreadySubOnDb) === 'true'
|
||||
|
||||
@@ -848,7 +852,7 @@ namespace Actions {
|
||||
verified_email,
|
||||
made_gift,
|
||||
perm,
|
||||
profile: { img }
|
||||
profile: { img, teleg_id }
|
||||
})
|
||||
|
||||
isLogged = true
|
||||
|
||||
@@ -153,6 +153,7 @@ const colcontribtype = [
|
||||
]
|
||||
|
||||
const colpaymenttype = [
|
||||
AddCol({ name: '_id', label_trans: 'others.value' }),
|
||||
AddCol({ name: 'key', label_trans: 'reg.key' }),
|
||||
AddCol({ name: 'label', label_trans: 'proj.longdescr' }),
|
||||
AddCol(DeleteRec)
|
||||
@@ -407,6 +408,8 @@ export const fieldsTable = {
|
||||
// IColGridTable
|
||||
colTableUsers: [
|
||||
// AddCol({ name: '_id', label_trans: 'reg.id' }),
|
||||
AddCol({ name: 'ind_order', label_trans: 'reg.ind_order' }),
|
||||
AddCol({ name: 'date_reg', label_trans: 'reg.date_reg', fieldtype: tools.FieldType.date }),
|
||||
AddCol({ name: 'username', label_trans: 'reg.username_short' }),
|
||||
AddCol({ name: 'name', label_trans: 'reg.name' }),
|
||||
AddCol({ name: 'surname', label_trans: 'reg.surname' }),
|
||||
@@ -429,9 +432,9 @@ export const fieldsTable = {
|
||||
AddCol({ name: 'profile.manage_telegram', field: 'profile', subfield: 'manage_telegram', label_trans: 'reg.manage_telegram', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'profile.paymenttypes', field: 'profile', subfield: 'paymenttypes', label_trans: 'reg.paymenttype', fieldtype: tools.FieldType.multiselect, jointable: 'paymenttypes' }),
|
||||
AddCol({ name: 'profile.img', field: 'profile', subfield: 'img', label_trans: 'reg.img', sortable: false }),
|
||||
AddCol({ name: 'date_reg', label_trans: 'reg.date_reg', fieldtype: tools.FieldType.date }),
|
||||
// AddCol({ name: 'idapp', label_trans: 'reg.idapp', fieldtype: tools.FieldType.string }),
|
||||
AddCol({ name: 'perm', label_trans: 'reg.perm', fieldtype: tools.FieldType.binary, jointable: 'permissions' }),
|
||||
AddCol({ name: 'ipaddr', label_trans: 'reg.ipaddr' }),
|
||||
AddCol(DeleteRec),
|
||||
AddCol(DuplicateRec)
|
||||
],
|
||||
@@ -494,7 +497,7 @@ export const fieldsTable = {
|
||||
value: 'paymenttypes',
|
||||
label: 'Tipi di Pagamenti',
|
||||
columns: colpaymenttype,
|
||||
colkey: '_id',
|
||||
colkey: 'key',
|
||||
collabel: 'label'
|
||||
},
|
||||
{
|
||||
|
||||
@@ -6,6 +6,8 @@ import { translation } from './translation'
|
||||
import Quasar, { colors, date, Screen } from 'quasar'
|
||||
import { scroll } from 'quasar'
|
||||
|
||||
import { copyToClipboard } from 'quasar'
|
||||
|
||||
const { getScrollTarget, setScrollPosition } = scroll
|
||||
|
||||
import {
|
||||
@@ -47,7 +49,7 @@ export interface INotify {
|
||||
export const tools = {
|
||||
CAN_EDIT: 'q-ce',
|
||||
|
||||
getprefCountries: ['it', 'us', 'es', 'uk', 'fr', 'de', 'ch'],
|
||||
getprefCountries: ['it', 'si', 'us', 'es', 'uk', 'fr', 'de', 'ch'],
|
||||
|
||||
APORTADOR_NONE: '------',
|
||||
|
||||
@@ -106,6 +108,7 @@ export const tools = {
|
||||
SERVKEY_VERS: 'vers',
|
||||
|
||||
localStorage: {
|
||||
teleg_id: 'ti',
|
||||
verified_email: 'vf',
|
||||
made_gift: 'mg',
|
||||
wasAlreadySubOnDb: 'sb',
|
||||
@@ -1901,7 +1904,7 @@ export const tools = {
|
||||
getstrDateTimeShort(mytimestamp) {
|
||||
// console.log('getstrDate', mytimestamp)
|
||||
if (!!mytimestamp)
|
||||
return date.formatDate(mytimestamp, 'DD/MM HH:mm');
|
||||
return date.formatDate(mytimestamp, 'DD/MM HH:mm')
|
||||
else
|
||||
return ''
|
||||
},
|
||||
@@ -2639,7 +2642,7 @@ export const tools = {
|
||||
const msg = mythis.$t('fetch.errore_generico') + UserStore.mutations.getMsgError(riscode)
|
||||
tools.showNotif(mythis.$q, msg)
|
||||
} else if (riscode === tools.OK) {
|
||||
mythis.$router.push('/signin')
|
||||
mythis.$router.push('/regok')
|
||||
tools.showNotif(mythis.$q, mythis.$t('components.authentication.email_verification.link_sent'), {
|
||||
color: 'green',
|
||||
textColor: 'black'
|
||||
@@ -3068,10 +3071,65 @@ export const tools = {
|
||||
return 'fa-flag-gb'
|
||||
else if (lang === 'DE')
|
||||
return 'fa-flag-de'
|
||||
else if (lang === 'SI')
|
||||
return 'fa-flag-si'
|
||||
else if (lang === 'CH')
|
||||
return 'fa-flag-ch'
|
||||
else if (lang === 'PE')
|
||||
return 'fa-flag-pe'
|
||||
else if (lang === 'HR')
|
||||
return 'fa-flag-hr'
|
||||
|
||||
return ''
|
||||
},
|
||||
|
||||
removespaces(mystr) {
|
||||
return mystr.replace(/\s+/g, '')
|
||||
},
|
||||
|
||||
copyStringToClipboard(mythis, mystr) {
|
||||
copyToClipboard(mystr).then(() => {
|
||||
tools.showNotif(mythis.$q, mythis.$t('dialog.copyclipboard') + ' \'' + mystr + '\'')
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
getNationsByNationality(nat) {
|
||||
if (nat === 'IT') {
|
||||
return 'Italy'
|
||||
} else if (nat === 'SI') {
|
||||
return 'Slovenia'
|
||||
} else if (nat === 'ES') {
|
||||
return 'Spain'
|
||||
} else if (nat === 'DE') {
|
||||
return 'Germany'
|
||||
} else if (nat === 'US') {
|
||||
return 'United States'
|
||||
} else if (nat === 'CA') {
|
||||
return 'Canada'
|
||||
} else if (nat === 'MA') {
|
||||
return 'Morocco'
|
||||
} else if (nat === 'LT') {
|
||||
return 'Lithuania'
|
||||
} else if (nat === 'HR') {
|
||||
return 'Croatia'
|
||||
} else if (nat === 'HU') {
|
||||
return 'Hungary'
|
||||
} else if (nat === 'CH') {
|
||||
return 'Switzerland'
|
||||
} else if (nat === 'PE') {
|
||||
return 'Peru'
|
||||
} else if (nat === 'PL') {
|
||||
return 'Poland'
|
||||
} else if (nat === 'PT') {
|
||||
return 'Portugal'
|
||||
} else if (nat === 'UK') {
|
||||
return 'United Kingdom'
|
||||
} else if (nat === 'UA') {
|
||||
return 'Ukraine'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// getLocale() {
|
||||
// if (navigator.languages && navigator.languages.length > 0) {
|
||||
|
||||
0
src/views/admin/extralist/extralist.scss
Normal file
0
src/views/admin/extralist/extralist.scss
Normal file
46
src/views/admin/extralist/extralist.ts
Normal file
46
src/views/admin/extralist/extralist.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
import Vue from 'vue'
|
||||
import { Component } from 'vue-property-decorator'
|
||||
|
||||
import { GlobalStore } from '@store'
|
||||
import { tools } from '../../../store/Modules/tools'
|
||||
import { UserStore } from '../../../store/Modules'
|
||||
import { CTitleBanner } from '../../../components/CTitleBanner'
|
||||
|
||||
@Component({
|
||||
components: { CTitleBanner }
|
||||
})
|
||||
export default class Extralist extends Vue {
|
||||
public users_imported: string = ''
|
||||
private myloadingImport: boolean = false
|
||||
private errimport: boolean = false
|
||||
private okimport: boolean = false
|
||||
private myrisimport: string = ''
|
||||
|
||||
public async importExtraList() {
|
||||
this.myloadingImport = true
|
||||
this.errimport = false
|
||||
this.okimport = false
|
||||
|
||||
const mydata = {
|
||||
strdata: this.users_imported,
|
||||
locale: tools.getLocale()
|
||||
}
|
||||
|
||||
const res = await UserStore.actions.importExtraList(mydata)
|
||||
|
||||
let esistiti = ''
|
||||
if (res.data.numalreadyexisted > 0)
|
||||
esistiti = ` ${res.data.numalreadyexisted} email già esistenti`
|
||||
|
||||
if (res.data.numadded > 0) {
|
||||
this.okimport = true
|
||||
this.myrisimport = `(${res.data.numadded} / ${res.data.numtot}) utenti extra importati !` + esistiti
|
||||
} else {
|
||||
this.errimport = true
|
||||
this.myrisimport = `Nessun utente extra importato (trovate ${res.data.numtot})` + esistiti
|
||||
}
|
||||
|
||||
this.myloadingImport = false
|
||||
}
|
||||
|
||||
}
|
||||
44
src/views/admin/extralist/extralist.vue
Normal file
44
src/views/admin/extralist/extralist.vue
Normal file
@@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<div>
|
||||
<CTitleBanner title="Importa Lista Utenti Extra:"></CTitleBanner>
|
||||
<div class="q-ma-md q-pa-sm text-center rounded-borders q-list--bordered">
|
||||
|
||||
<q-input v-model="users_imported"
|
||||
autofocus
|
||||
filled
|
||||
bordered
|
||||
color="blue-12"
|
||||
@keyup.enter.stop
|
||||
type="textarea"
|
||||
>
|
||||
</q-input>
|
||||
<div class="q-ma-md q-pa-sm text-center">
|
||||
<q-btn :loading="myloadingImport" rounded outline :disable="users_imported === ''"
|
||||
@click="importExtraList" color="primary" icon="email">
|
||||
Importa Lista Utenti Extra
|
||||
<template v-slot:loading>
|
||||
<q-spinner-hourglass class="on-left"/>
|
||||
Importazione Utenti in corso ...
|
||||
</template>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
<transition
|
||||
enter-active-class="animated fadeIn"
|
||||
leave-active-class="animated fadeOut"
|
||||
appear
|
||||
|
||||
>
|
||||
<CTitleBanner v-if="errimport" bgcolor="bg-warning" :title="myrisimport"></CTitleBanner>
|
||||
<CTitleBanner v-if="okimport" :title="myrisimport"></CTitleBanner>
|
||||
</transition>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" src="./extralist.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './extralist';
|
||||
</style>
|
||||
1
src/views/admin/extralist/index.ts
Normal file
1
src/views/admin/extralist/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export {default as extralist} from './extralist.vue'
|
||||
6
src/views/email/unsubscribe/unsubscribe.scss
Normal file
6
src/views/email/unsubscribe/unsubscribe.scss
Normal file
@@ -0,0 +1,6 @@
|
||||
.mypanel {
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
|
||||
}
|
||||
|
||||
57
src/views/email/unsubscribe/unsubscribe.ts
Normal file
57
src/views/email/unsubscribe/unsubscribe.ts
Normal file
@@ -0,0 +1,57 @@
|
||||
import Vue from 'vue'
|
||||
import { Component } from 'vue-property-decorator' // Questo va messo SEMPRE ! (ed anche $t ....) altrimenti non carica !
|
||||
|
||||
import { UserStore } from '@store'
|
||||
|
||||
import { serv_constants } from '../../../store/Modules/serv_constants'
|
||||
|
||||
import { ILinkReg } from '../../../model/other'
|
||||
import { tools } from '../../../store/Modules/tools'
|
||||
|
||||
@Component({})
|
||||
export default class Unsubscribe extends Vue {
|
||||
public risultato: string = '...'
|
||||
public riscode: number = 0
|
||||
public $t: any
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
console.log('Vreg constructor...')
|
||||
}
|
||||
|
||||
public created() {
|
||||
console.log('vreg created')
|
||||
this.load()
|
||||
}
|
||||
|
||||
get disiscritto() {
|
||||
return this.riscode === serv_constants.RIS_UNSUBSCRIBED_OK
|
||||
}
|
||||
|
||||
get errore() {
|
||||
return this.riscode !== serv_constants.RIS_UNSUBSCRIBED_OK
|
||||
}
|
||||
|
||||
get myrisultato() {
|
||||
return this.risultato
|
||||
}
|
||||
|
||||
get email() {
|
||||
return this.$route.query.email
|
||||
}
|
||||
|
||||
public load() {
|
||||
// console.log('load')
|
||||
let param
|
||||
param = { em: this.$route.query.em, mc: this.$route.query.mc, locale: tools.getLocale() }
|
||||
console.log('idlink = ', param)
|
||||
return UserStore.actions.unsubscribe(param)
|
||||
.then((ris) => {
|
||||
this.riscode = ris.code
|
||||
this.risultato = ris.msg
|
||||
|
||||
}).catch((err) => {
|
||||
console.log('ERR = ' + err)
|
||||
})
|
||||
}
|
||||
}
|
||||
48
src/views/email/unsubscribe/unsubscribe.vue
Normal file
48
src/views/email/unsubscribe/unsubscribe.vue
Normal file
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<q-page padding class="vreg">
|
||||
<div class="q-pa-md q-gutter-sm">
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-primary text-white"
|
||||
color="primary q-title"
|
||||
style="text-align: center;">
|
||||
<span class="mybanner">{{ $t('components.authentication.email_verification.title_unsubscribe')}}: {{email}}</span>
|
||||
</q-banner>
|
||||
<br>
|
||||
|
||||
<transition
|
||||
enter-active-class="animated fadeIn"
|
||||
leave-active-class="animated fadeOut"
|
||||
appear
|
||||
|
||||
>
|
||||
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-warning text-black"
|
||||
style="text-align: center;"
|
||||
v-if="errore"
|
||||
>
|
||||
<span class="mybanner">{{ myrisultato}}</span>
|
||||
</q-banner>
|
||||
<q-banner
|
||||
class="bg-positive text-white"
|
||||
style="text-align: center;"
|
||||
rounded
|
||||
v-if="disiscritto"
|
||||
>
|
||||
<span class="mybanner">{{ $t('components.authentication.email_verification.title_unsubscribe_done') }}</span>
|
||||
</q-banner>
|
||||
</transition>
|
||||
|
||||
|
||||
</div>
|
||||
</q-page>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./unsubscribe.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './unsubscribe.scss';
|
||||
</style>
|
||||
0
src/views/login/regok/regok.scss
Normal file
0
src/views/login/regok/regok.scss
Normal file
20
src/views/login/regok/regok.ts
Normal file
20
src/views/login/regok/regok.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import Vue from 'vue'
|
||||
import { Component } from 'vue-property-decorator' // Questo va messo SEMPRE ! (ed anche $t ....) altrimenti non carica !
|
||||
|
||||
import { UserStore } from '@store'
|
||||
import { Footer } from '../../../components/Footer'
|
||||
|
||||
@Component({
|
||||
components: { Footer }
|
||||
})
|
||||
export default class Regok extends Vue {
|
||||
public $t
|
||||
|
||||
get isEmailVerified() {
|
||||
if (UserStore.state.my)
|
||||
return UserStore.state.my.verified_email
|
||||
else
|
||||
return false
|
||||
}
|
||||
|
||||
}
|
||||
55
src/views/login/regok/regok.vue
Normal file
55
src/views/login/regok/regok.vue
Normal file
@@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<q-page padding class="vreg">
|
||||
<div class="q-">
|
||||
<div class="q-pa-md q-gutter-sm">
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-primary text-white"
|
||||
color="primary q-title"
|
||||
style="text-align: center;">
|
||||
<span class="mybanner">{{ $t('reg.reg_ok')}}</span>
|
||||
</q-banner>
|
||||
<br>
|
||||
<div class="text-center">
|
||||
<q-icon name="fas fa-exclamation-triangle" color="warning" size="md"></q-icon>
|
||||
</div>
|
||||
</div>
|
||||
<q-banner
|
||||
v-if="!isEmailVerified"
|
||||
rounded
|
||||
class="bg-warning text-black"
|
||||
color="primary q-title"
|
||||
style="text-align: center;">
|
||||
<div class="mybanner" v-html="$t('components.authentication.email_verification.link_sent')">
|
||||
|
||||
</div>
|
||||
|
||||
</q-banner>
|
||||
<br>
|
||||
<q-banner
|
||||
v-if="!isEmailVerified"
|
||||
rounded
|
||||
class="bg-warning text-black"
|
||||
color="primary q-title"
|
||||
style="text-align: center;">
|
||||
<div class="mybanner" v-html="$t('components.authentication.email_verification.se_non_ricevo')">
|
||||
|
||||
</div>
|
||||
|
||||
</q-banner>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<Footer></Footer>
|
||||
</q-page>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./regok.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './regok.scss';
|
||||
</style>
|
||||
12
src/views/login/signup_complete/signup_complete.scss
Normal file
12
src/views/login/signup_complete/signup_complete.scss
Normal file
@@ -0,0 +1,12 @@
|
||||
.signup {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
max-width: 450px;
|
||||
}
|
||||
|
||||
|
||||
.wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
27
src/views/login/signup_complete/signup_complete.ts
Normal file
27
src/views/login/signup_complete/signup_complete.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
import { UserStore } from '@store'
|
||||
import { tools } from '../../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { CSignUpNotevole } from '../../../components/CSignUpNotevole'
|
||||
|
||||
@Component({
|
||||
components: { CSignUpNotevole }
|
||||
})
|
||||
|
||||
export default class SignupComplete extends Vue {
|
||||
public $t: any
|
||||
public adult: boolean = false
|
||||
|
||||
@Watch('$route.params.invited')
|
||||
public changeadult() {
|
||||
console.log('$route.params.invited')
|
||||
this.adult = !!this.$route.params.invited
|
||||
}
|
||||
|
||||
public created() {
|
||||
if (!tools.getCookie(tools.APORTADOR_SOLIDARIO, ''))
|
||||
tools.setCookie(tools.APORTADOR_SOLIDARIO, this.$route.params.invited)
|
||||
}
|
||||
|
||||
}
|
||||
14
src/views/login/signup_complete/signup_complete.vue
Normal file
14
src/views/login/signup_complete/signup_complete.vue
Normal file
@@ -0,0 +1,14 @@
|
||||
<template>
|
||||
<q-page padding class="signup">
|
||||
<CSignUpNotevole :showadultcheck="true" :showcell="true" :showaportador="true" :shownationality="true">
|
||||
|
||||
</CSignUpNotevole>
|
||||
</q-page>
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./signup_complete.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './signup_complete.scss';
|
||||
</style>
|
||||
13
src/views/requestresetpwd/request-resetpwd-validate.ts
Normal file
13
src/views/requestresetpwd/request-resetpwd-validate.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { ISignupOptions } from 'model'
|
||||
import { email, minLength, required, sameAs } from 'vuelidate/lib/validators'
|
||||
// import { ValidationRuleset } from 'vuelidate'
|
||||
import { complexity, registeredemail, registereduser, aportadorexist } from '../../validation'
|
||||
|
||||
export const validations = {
|
||||
form: {
|
||||
email: {
|
||||
email,
|
||||
required
|
||||
}
|
||||
}
|
||||
}
|
||||
0
src/views/requestresetpwd/requestresetpwd.scss
Normal file
0
src/views/requestresetpwd/requestresetpwd.scss
Normal file
88
src/views/requestresetpwd/requestresetpwd.ts
Normal file
88
src/views/requestresetpwd/requestresetpwd.ts
Normal file
@@ -0,0 +1,88 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
import { serv_constants } from '../../store/Modules/serv_constants'
|
||||
|
||||
import { UserStore } from '../../store/Modules/index'
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { Logo } from '../../components/logo'
|
||||
import { validationMixin } from 'vuelidate'
|
||||
import { CTitleBanner } from '../../components/CTitleBanner'
|
||||
import { validations } from './request-resetpwd-validate'
|
||||
|
||||
@Component({
|
||||
name: 'RequestResetPwd',
|
||||
mixins: [validationMixin],
|
||||
validations,
|
||||
components: { Logo, CTitleBanner }
|
||||
})
|
||||
|
||||
export default class RequestResetPwd extends Vue {
|
||||
public $q
|
||||
public $t
|
||||
public $v
|
||||
|
||||
public emailsent = false
|
||||
public form = {
|
||||
email: '',
|
||||
tokenforgot: ''
|
||||
}
|
||||
|
||||
get emailinviata() {
|
||||
return this.emailsent
|
||||
}
|
||||
|
||||
public submit() {
|
||||
this.$v.form.$touch()
|
||||
|
||||
if (this.$v.form.$error) {
|
||||
tools.showNotif(this.$q, this.$t('reg.err.errore_generico'))
|
||||
return
|
||||
}
|
||||
|
||||
this.$q.loading.show({ message: this.$t('reset.incorso') })
|
||||
|
||||
this.form.tokenforgot = ''
|
||||
|
||||
console.log(this.form)
|
||||
UserStore.actions.requestpwd(this.form)
|
||||
.then((ris) => {
|
||||
if (ris.code === serv_constants.RIS_CODE_OK)
|
||||
this.emailsent = true
|
||||
else if (ris.code === serv_constants.RIS_CODE_EMAIL_NOT_EXIST)
|
||||
tools.showNegativeNotif(this.$q, this.$t('reg.err.email_not_exist'))
|
||||
this.$q.loading.hide()
|
||||
}).catch((err) => {
|
||||
console.log('ERROR = ' + err.error)
|
||||
this.$q.loading.hide()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
public errorMsg(cosa: string, item: any) {
|
||||
try {
|
||||
if (!item.$error) {
|
||||
return ''
|
||||
}
|
||||
if (item.$params.email && !item.email) {
|
||||
return this.$t('reg.err.email')
|
||||
}
|
||||
|
||||
if (item.required !== undefined) {
|
||||
if (!item.required) {
|
||||
return this.$t('reg.err.required')
|
||||
}
|
||||
}
|
||||
|
||||
if (cosa === 'email') {
|
||||
if (!item.isUnique) {
|
||||
return this.$t('reg.err.duplicate_email')
|
||||
}
|
||||
}
|
||||
|
||||
return ''
|
||||
} catch (error) {
|
||||
// console.log("ERR : " + error);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
65
src/views/requestresetpwd/requestresetpwd.vue
Normal file
65
src/views/requestresetpwd/requestresetpwd.vue
Normal file
@@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<div class="row justify-center text-center padding">
|
||||
<div class="q-gutter-sm q-ma-sm" style="max-width: 800px; margin: auto;">
|
||||
|
||||
<div v-if="!emailinviata">
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-primary text-white"
|
||||
style="text-align: center;">
|
||||
<span class="mybanner">{{ $t('reset.title_reset_pwd')}}</span>
|
||||
</q-banner>
|
||||
<br>
|
||||
|
||||
<q-input
|
||||
v-model="form.email"
|
||||
rounded outlined
|
||||
autocomplete="email"
|
||||
@blur="$v.form.email.$touch"
|
||||
:error="$v.form.email.$error"
|
||||
:error-message="errorMsg('email', $v.form.email)"
|
||||
maxlength="50"
|
||||
debounce="1000"
|
||||
:label="$t('reg.email')">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="email"/>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
|
||||
<br>
|
||||
|
||||
<div align="center q-ma-sm">
|
||||
<q-btn rounded size="lg" color="primary" @click="submit" :disable="$v.$error">
|
||||
{{$t('reset.send_reset_pwd')}}
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-positive text-white"
|
||||
style="text-align: center;">
|
||||
<span class="mybanner">{{ $t('reset.email_sent')}}</span>
|
||||
</q-banner>
|
||||
<br>
|
||||
|
||||
<div>
|
||||
<strong>{{ $t('reset.check_email')}}</strong>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./requestresetpwd.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './requestresetpwd';
|
||||
</style>
|
||||
0
src/views/user/dashboard/dashboard.scss
Normal file
0
src/views/user/dashboard/dashboard.scss
Normal file
81
src/views/user/dashboard/dashboard.ts
Normal file
81
src/views/user/dashboard/dashboard.ts
Normal file
@@ -0,0 +1,81 @@
|
||||
import { Component, Mixins, Prop, Watch } from 'vue-property-decorator'
|
||||
import MixinBase from '../../../mixins/mixin-base'
|
||||
import { CMyFieldDb, CTitleBanner, CProfile } from '@components'
|
||||
import { UserStore } from '../../../store/Modules'
|
||||
import { tools } from '../../../store/Modules/tools'
|
||||
import { DefaultUser } from '@src/store/Modules/UserStore'
|
||||
|
||||
@Component({
|
||||
components: { CProfile, CTitleBanner, CMyFieldDb }
|
||||
})
|
||||
|
||||
export default class Dashboard extends MixinBase {
|
||||
public $v
|
||||
public $q
|
||||
public dashboard = {aportador: DefaultUser, downline: []}
|
||||
|
||||
public mythis() {
|
||||
return this
|
||||
}
|
||||
|
||||
public created() {
|
||||
|
||||
UserStore.actions.getDashboard({}).then((ris) => {
|
||||
console.log('getDashboard', ris)
|
||||
if (ris.aportador === undefined) {
|
||||
this.dashboard.aportador = DefaultUser
|
||||
} else {
|
||||
this.dashboard.aportador = ris.aportador
|
||||
}
|
||||
if (ris.downline === undefined) {
|
||||
this.dashboard.downline = []
|
||||
} else {
|
||||
this.dashboard.downline = [...ris.downline]
|
||||
}
|
||||
|
||||
// console.log('this.dashboard', this.dashboard)
|
||||
})
|
||||
}
|
||||
|
||||
public getletter(user) {
|
||||
return user.name[0].toUpperCase()
|
||||
}
|
||||
|
||||
public getnumber(user, index) {
|
||||
return index
|
||||
}
|
||||
|
||||
public getstatecolor(user) {
|
||||
return (this.dashboard.aportador.verified_email) ? 'green' : 'gray'
|
||||
}
|
||||
|
||||
public getmoneycolor(user) {
|
||||
return (this.dashboard.aportador.made_gift) ? 'green' : 'gray'
|
||||
}
|
||||
|
||||
public get2peoplecolor(user, index) {
|
||||
if (!!user.downline)
|
||||
return (user.downline.length >= 2) ? 'green' : 'gray'
|
||||
else
|
||||
return 'grey'
|
||||
}
|
||||
public getnumpeople(user) {
|
||||
if (!!user.downline)
|
||||
return (user.downline.length)
|
||||
else
|
||||
return 0
|
||||
}
|
||||
|
||||
get getRefLink() {
|
||||
return UserStore.getters.getRefLink()
|
||||
}
|
||||
|
||||
public copylink() {
|
||||
tools.copyStringToClipboard(this, this.getRefLink)
|
||||
}
|
||||
|
||||
get madegift() {
|
||||
return UserStore.state.my.made_gift
|
||||
}
|
||||
|
||||
}
|
||||
109
src/views/user/dashboard/dashboard.vue
Normal file
109
src/views/user/dashboard/dashboard.vue
Normal file
@@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<div class="q-ma-xs q-gutter-xs q-pa-xs">
|
||||
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('pages.dashboard')" bgcolor="bg-info" clcolor="text-white"
|
||||
mystyle=" " myclass="myshad">
|
||||
|
||||
<q-field outlined bottom-slots :label="$t('reg.reflink')" stack-label class="text-center">
|
||||
<template v-slot:prepend>
|
||||
<q-btn round dense flat icon="far fa-copy" @click="copylink"/>
|
||||
</template>
|
||||
|
||||
<template v-slot:control>
|
||||
<div class="self-center full-width no-outline text-center wrapword" tabindex="0">{{getRefLink}}</div>
|
||||
</template>
|
||||
</q-field>
|
||||
|
||||
<!--<q-toolbar class="bg-primary text-white shadow-2">-->
|
||||
<!--<q-toolbar-title class="text-center">{{ $t('reg.aportador_solidario')}}</q-toolbar-title>-->
|
||||
<!--</q-toolbar>-->
|
||||
|
||||
<!--
|
||||
<q-list bordered v-if="!!dashboard.aportador.name">
|
||||
<q-item class="q-my-sm" clickable v-ripple>
|
||||
<q-item-section avatar>
|
||||
<q-avatar color="primary" text-color="white">
|
||||
{{ getletter(dashboard.aportador) }}
|
||||
</q-avatar>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label>{{ dashboard.aportador.username }} ({{ dashboard.aportador.name }} {{ dashboard.aportador.surname }})</q-item-label>
|
||||
<q-item-label caption lines="1">{{ dashboard.aportador.email }}</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section side>
|
||||
<q-icon name="fas fa-user-check" color="green"></q-icon>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<div v-else class="q-pa-md text-center">
|
||||
Nessun Dato
|
||||
</div>
|
||||
-->
|
||||
|
||||
<q-toolbar class="bg-positive text-white shadow-2">
|
||||
<q-toolbar-title class="text-center">{{ $t('dashboard.downline')}}</q-toolbar-title>
|
||||
</q-toolbar>
|
||||
|
||||
<q-list bordered v-if="!!dashboard.downline && dashboard.downline.length > 0">
|
||||
<q-item class="q-my-sm" clickable v-ripple v-for="(user, index) in dashboard.downline" :key="index">
|
||||
<q-item-section avatar>
|
||||
<div class="row">
|
||||
<q-avatar text-color="primary">
|
||||
{{ getnumber(user, index + 1) }}°
|
||||
</q-avatar>
|
||||
<q-avatar color="primary" text-color="white">
|
||||
{{ getletter(user) }}
|
||||
</q-avatar>
|
||||
</div>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label>{{ user.username }} ({{ user.name }} {{ user.surname }})</q-item-label>
|
||||
<q-item-label caption lines="1">{{ user.email }}</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section side>
|
||||
<div class="row q-gutter-md justify-center items-center">
|
||||
<q-icon size="sm" name="fas fa-user-check" :color="getstatecolor(user)"></q-icon>
|
||||
<q-icon size="sm" name="fas fa-gift" :color="getmoneycolor(user)"></q-icon>
|
||||
<q-avatar text-color="primary">
|
||||
{{ getnumpeople(user) }}
|
||||
</q-avatar>
|
||||
<q-icon size="sm" name="fas fa-user-friends" :color="get2peoplecolor(user)"></q-icon>
|
||||
</div>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<div v-else class="q-pa-md text-center">
|
||||
Nessun Dato
|
||||
</div>
|
||||
|
||||
</CTitleBanner>
|
||||
|
||||
<!--
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('text.dashboard.madegift')" bgcolor="bg-info" clcolor="text-white"
|
||||
mystyle=" " myclass="myshad">
|
||||
<div class="q-pa-sm text-center">
|
||||
|
||||
<div v-if="madegift" class="q-gutter-md">
|
||||
<q-icon name="fas fa-gift" size="lg" color="green"></q-icon>
|
||||
<q-icon name="fas fa-thumbs-up" size="lg" color="green"></q-icon>
|
||||
</div>
|
||||
<div v-else class="q-gutter-md">
|
||||
<q-icon name="fas fa-gift" size="lg" color="grey"></q-icon>
|
||||
<q-icon name="fas fa-exclamation-triangle" size="lg" color="orange"></q-icon>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./dashboard.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './dashboard.scss';
|
||||
</style>
|
||||
5
src/views/user/profile/profile.scss
Normal file
5
src/views/user/profile/profile.scss
Normal file
@@ -0,0 +1,5 @@
|
||||
.profile {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
max-width: 450px;
|
||||
}
|
||||
25
src/views/user/profile/profile.ts
Normal file
25
src/views/user/profile/profile.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { Component, Mixins, Prop, Watch } from 'vue-property-decorator'
|
||||
import MixinBase from '../../../mixins/mixin-base'
|
||||
import { CMyFieldDb, CTitleBanner, CProfile, CStatus } from '@components'
|
||||
import { UserStore } from '../../../store/Modules'
|
||||
|
||||
@Component({
|
||||
components: { CProfile, CTitleBanner, CMyFieldDb, CStatus }
|
||||
})
|
||||
|
||||
export default class Profile extends MixinBase {
|
||||
public $v
|
||||
public $q
|
||||
|
||||
public mythis() {
|
||||
return this
|
||||
}
|
||||
|
||||
get getpayment() {
|
||||
return UserStore.state.my.profile.paymenttypes
|
||||
}
|
||||
get profile() {
|
||||
return UserStore.state.my.profile
|
||||
}
|
||||
|
||||
}
|
||||
103
src/views/user/profile/profile.vue
Normal file
103
src/views/user/profile/profile.vue
Normal file
@@ -0,0 +1,103 @@
|
||||
<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
|
||||
<div class="q-gutter-sm q-pa-xs q-pb-md">
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('pages.profile')" bgcolor="bg-primary" clcolor="text-white"
|
||||
myclass="myshad" :canopen="true">
|
||||
|
||||
|
||||
<div class="column">
|
||||
<div class="row">
|
||||
<CMyFieldDb :title="$t('reg.name')"
|
||||
table="users"
|
||||
mykey="name"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
<CMyFieldDb :title="$t('reg.surname')"
|
||||
table="users"
|
||||
mykey="surname"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
</div>
|
||||
<div class="row">
|
||||
<CMyFieldDb :title="$t('reg.username')"
|
||||
table="users"
|
||||
mykey="username"
|
||||
disable="true"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
<CMyFieldDb :title="$t('reg.email')"
|
||||
table="users"
|
||||
mykey="email"
|
||||
disable="true"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
</div>
|
||||
<CMyFieldDb :title="$t('reg.nationality')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="nationality"
|
||||
:type="tools.FieldType.nationality">
|
||||
</CMyFieldDb>
|
||||
<div class="row">
|
||||
<CMyFieldDb :title="$t('reg.intcode_cell')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="intcode_cell"
|
||||
:type="tools.FieldType.intcode">
|
||||
</CMyFieldDb>
|
||||
<CMyFieldDb :title="$t('reg.cell')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="cell"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
</div>
|
||||
<!--<CMyFieldDb :title="$t('reg.username_telegram')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="username_telegram"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>-->
|
||||
<!--<CMyFieldDb title="Telegram Id"
|
||||
table="users"
|
||||
:readonly="true"
|
||||
mykey="profile"
|
||||
mysubkey="teleg_id"
|
||||
:type="tools.FieldType.number">
|
||||
</CMyFieldDb>-->
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('pages.payment')" bgcolor="bg-primary" clcolor="text-white"
|
||||
myclass="myshad" :canopen="true">
|
||||
<div class="row fa-border justify-center items-center">
|
||||
<CMyFieldDb :title="$t('reg.country_pay')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="country_pay"
|
||||
:type="tools.FieldType.nationality">
|
||||
</CMyFieldDb>
|
||||
<CMyFieldDb :title="$t('reg.email_paypal')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="email_paypal"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
</div>
|
||||
|
||||
<CMyFieldDb :title="$t('reg.paymenttype')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="paymenttypes"
|
||||
:type="tools.FieldType.multiselect"
|
||||
jointable="paymenttypes">
|
||||
</CMyFieldDb>
|
||||
|
||||
</CTitleBanner>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./profile.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './profile.scss';
|
||||
</style>
|
||||
Reference in New Issue
Block a user