diff --git a/src/components/CCardStat/CCardStat.scss b/src/components/CCardStat/CCardStat.scss new file mode 100644 index 0000000..0a37bb0 --- /dev/null +++ b/src/components/CCardStat/CCardStat.scss @@ -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; +} diff --git a/src/components/CCardStat/CCardStat.ts b/src/components/CCardStat/CCardStat.ts new file mode 100644 index 0000000..3035e4d --- /dev/null +++ b/src/components/CCardStat/CCardStat.ts @@ -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' + } +} diff --git a/src/components/CCardStat/CCardStat.vue b/src/components/CCardStat/CCardStat.vue new file mode 100644 index 0000000..0b2b88d --- /dev/null +++ b/src/components/CCardStat/CCardStat.vue @@ -0,0 +1,19 @@ + + + + + diff --git a/src/components/CCardStat/index.ts b/src/components/CCardStat/index.ts new file mode 100644 index 0000000..d457c1e --- /dev/null +++ b/src/components/CCardStat/index.ts @@ -0,0 +1 @@ +export {default as CCardStat} from './CCardStat.vue' diff --git a/src/components/CCopyBtn/CCopyBtn.scss b/src/components/CCopyBtn/CCopyBtn.scss new file mode 100644 index 0000000..02d3a55 --- /dev/null +++ b/src/components/CCopyBtn/CCopyBtn.scss @@ -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; +} diff --git a/src/components/CCopyBtn/CCopyBtn.ts b/src/components/CCopyBtn/CCopyBtn.ts new file mode 100644 index 0000000..5116673 --- /dev/null +++ b/src/components/CCopyBtn/CCopyBtn.ts @@ -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) + } + +} diff --git a/src/components/CCopyBtn/CCopyBtn.vue b/src/components/CCopyBtn/CCopyBtn.vue new file mode 100644 index 0000000..b7431b7 --- /dev/null +++ b/src/components/CCopyBtn/CCopyBtn.vue @@ -0,0 +1,20 @@ + + + + + diff --git a/src/components/CCopyBtn/index.ts b/src/components/CCopyBtn/index.ts new file mode 100644 index 0000000..2a6e569 --- /dev/null +++ b/src/components/CCopyBtn/index.ts @@ -0,0 +1 @@ +export {default as CCopyBtn} from './CCopyBtn.vue' diff --git a/src/components/CGallery/CGallery.ts b/src/components/CGallery/CGallery.ts index 076cb03..34f813b 100644 --- a/src/components/CGallery/CGallery.ts +++ b/src/components/CGallery/CGallery.ts @@ -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) { diff --git a/src/components/CGeoChart/CGeoChart.scss b/src/components/CGeoChart/CGeoChart.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/components/CGeoChart/CGeoChart.ts b/src/components/CGeoChart/CGeoChart.ts new file mode 100644 index 0000000..59ca234 --- /dev/null +++ b/src/components/CGeoChart/CGeoChart.ts @@ -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]] + } + +} diff --git a/src/components/CGeoChart/CGeoChart.vue b/src/components/CGeoChart/CGeoChart.vue new file mode 100644 index 0000000..34f9b48 --- /dev/null +++ b/src/components/CGeoChart/CGeoChart.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/src/components/CGeoChart/index.ts b/src/components/CGeoChart/index.ts new file mode 100644 index 0000000..d1c634e --- /dev/null +++ b/src/components/CGeoChart/index.ts @@ -0,0 +1 @@ +export {default as CGeoChart} from './CGeoChart.vue' diff --git a/src/components/CLineChart/CLineChart.scss b/src/components/CLineChart/CLineChart.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/components/CLineChart/CLineChart.ts b/src/components/CLineChart/CLineChart.ts new file mode 100644 index 0000000..207af34 --- /dev/null +++ b/src/components/CLineChart/CLineChart.ts @@ -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 + } + +} diff --git a/src/components/CLineChart/CLineChart.vue b/src/components/CLineChart/CLineChart.vue new file mode 100644 index 0000000..bf1246d --- /dev/null +++ b/src/components/CLineChart/CLineChart.vue @@ -0,0 +1,12 @@ + + + + + diff --git a/src/components/CLineChart/index.ts b/src/components/CLineChart/index.ts new file mode 100644 index 0000000..07de45a --- /dev/null +++ b/src/components/CLineChart/index.ts @@ -0,0 +1 @@ +export {default as CLineChart} from './CLineChart.vue' diff --git a/src/components/CListNationality/CListNationality.scss b/src/components/CListNationality/CListNationality.scss new file mode 100644 index 0000000..0e22f34 --- /dev/null +++ b/src/components/CListNationality/CListNationality.scss @@ -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; +} + diff --git a/src/components/CListNationality/CListNationality.ts b/src/components/CListNationality/CListNationality.ts new file mode 100644 index 0000000..1066d2c --- /dev/null +++ b/src/components/CListNationality/CListNationality.ts @@ -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' + } +} diff --git a/src/components/CListNationality/CListNationality.vue b/src/components/CListNationality/CListNationality.vue new file mode 100644 index 0000000..e020bf0 --- /dev/null +++ b/src/components/CListNationality/CListNationality.vue @@ -0,0 +1,45 @@ + + + + + diff --git a/src/components/CListNationality/index.ts b/src/components/CListNationality/index.ts new file mode 100644 index 0000000..a738156 --- /dev/null +++ b/src/components/CListNationality/index.ts @@ -0,0 +1 @@ +export {default as CListNationality} from './CListNationality.vue' diff --git a/src/components/CNextZoom/CNextZoom.vue b/src/components/CNextZoom/CNextZoom.vue index a2c88a9..92a1507 100644 --- a/src/components/CNextZoom/CNextZoom.vue +++ b/src/components/CNextZoom/CNextZoom.vue @@ -12,9 +12,6 @@ appear enter-active-class="animazione fadeIn" leave-active-class="animazione fadeOut"> -
- Mancano: {{ nextconf }} -
@@ -25,10 +22,17 @@ - - {{ confer.title }} - ID: {{ confer.id_conf_zoom }} - ID: {{ confer.note }} + + {{ confer.title }} + ID: {{ confer.id_conf_zoom }} + + {{ confer.note }} + + diff --git a/src/components/CSignIn/CSignIn.ts b/src/components/CSignIn/CSignIn.ts index ee6beb5..1c2dddc 100644 --- a/src/components/CSignIn/CSignIn.ts +++ b/src/components/CSignIn/CSignIn.ts @@ -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) { diff --git a/src/components/CSignUp/CSignUp.ts b/src/components/CSignUp/CSignUp.ts index aa10ab5..0f8801d 100644 --- a/src/components/CSignUp/CSignUp.ts +++ b/src/components/CSignUp/CSignUp.ts @@ -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 diff --git a/src/components/CSignUpNotevole/CSignUpNotevole.ts b/src/components/CSignUpNotevole/CSignUpNotevole.ts index f30089f..173bf86 100644 --- a/src/components/CSignUpNotevole/CSignUpNotevole.ts +++ b/src/components/CSignUpNotevole/CSignUpNotevole.ts @@ -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,12 +264,26 @@ export default class CSignUpNotevole extends MixinBase { this.signup.username = value.trim() } + get nuovareg() { + return (this.signup.aportador_solidario !== tools.APORTADOR_NONE) + } + get getplaceholdercell() { - return this.$t('reg.cellreg') + if (this.signup.aportador_solidario !== tools.APORTADOR_NONE) + return this.$t('reg.cell') + else + return this.$t('reg.cellreg') } get regvisibile() { 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') + } } diff --git a/src/components/CSignUpNotevole/CSignUpNotevole.vue b/src/components/CSignUpNotevole/CSignUpNotevole.vue index b2a2463..3195f02 100644 --- a/src/components/CSignUpNotevole/CSignUpNotevole.vue +++ b/src/components/CSignUpNotevole/CSignUpNotevole.vue @@ -2,20 +2,37 @@

- - + +

+ + + + +
+ + {{ $t('reg.nuove_registrazioni')}} + +
- - - - + + + + + + + + + Policy + + + + + + + + + + + +
diff --git a/src/components/CStatus/CStatus.scss b/src/components/CStatus/CStatus.scss index f2927ed..c74b8f3 100644 --- a/src/components/CStatus/CStatus.scss +++ b/src/components/CStatus/CStatus.scss @@ -19,3 +19,13 @@ } li {} + +.landing__footer-icons { + font-size: 3rem +} + +.icon_contact:hover { + // border-color: white; + border-width: .0625rem; +} + diff --git a/src/components/CStatus/CStatus.ts b/src/components/CStatus/CStatus.ts index b15151a..1d18b91 100644 --- a/src/components/CStatus/CStatus.ts +++ b/src/components/CStatus/CStatus.ts @@ -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 @@ -127,20 +158,20 @@ export default class CStatus extends MixinBase { }, }, -/* - 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', - enter_prog_long: 'entro in programmazione, e vengo aggiunto al Mandala, ed entro così nella chat corrispondente.', - collaborate: 'Collaborazione', - collaborate_long: 'Continuo a collaborare con il miei compagni, per arrivare al giorno della programmazione dove si attiverà il mio Mandala', - dono: 'Dono', - dono_long: 'Faccio il mio dono al proprietario della Bigliettera', - support: 'Sostengo il movimento', - support_long: 'Continuo a sostenere il movimento partecipando attivamente! Organizzando zoom e partecipando, sostenendo, informando, aiutando e diffondendo', - ricevo_dono: 'Ricevo il mio dono e CELEBRO', - ricevo_dono_long: 'Ricevo il mio dono e CELEBRO', -*/ + /* + 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', + enter_prog_long: 'entro in programmazione, e vengo aggiunto al Mandala, ed entro così nella chat corrispondente.', + collaborate: 'Collaborazione', + collaborate_long: 'Continuo a collaborare con il miei compagni, per arrivare al giorno della programmazione dove si attiverà il mio Mandala', + dono: 'Dono', + dono_long: 'Faccio il mio dono al proprietario della Bigliettera', + support: 'Sostengo il movimento', + support_long: 'Continuo a sostenere il movimento partecipando attivamente! Organizzando zoom e partecipando, sostenendo, informando, aiutando e diffondendo', + ricevo_dono: 'Ricevo il mio dono e CELEBRO', + ricevo_dono_long: 'Ricevo il mio dono e CELEBRO', + */ ] @@ -149,7 +180,7 @@ export default class CStatus extends MixinBase { this.step = 2 if (this.TelegVerificato) { this.step = 3 - for (let indstep = 0; indstep < this.arrsteps.length; indstep++){ + for (let indstep = 0; indstep < this.arrsteps.length; indstep++) { if (this.arrsteps[indstep].funccheck(indstep)) { this.step++ } @@ -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 + } + } diff --git a/src/components/CStatus/CStatus.vue b/src/components/CStatus/CStatus.vue index 2424e06..2ef62fd 100644 --- a/src/components/CStatus/CStatus.vue +++ b/src/components/CStatus/CStatus.vue @@ -4,6 +4,7 @@ mystyle="" myclass="myshad" :canopen="true">
+ - - {{ `Email ` + $t('pages.statusreg.verified') }} - - - {{ `Email ` + $t('pages.statusreg.nonverified') }} - -
+ -
+ @@ -47,28 +42,14 @@ {{ telegramtext }} - + {{ telegramtext }} -
- {{ $t('reg.teleg_auth') }} Telegram: {{TelegCode}} -
+ + + -
- {{ $t('components.authentication.telegram.open')}} -
- -
-
- {{ $t('components.authentication.telegram.ifclose')}} -
- - -
-
@@ -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,13 +71,25 @@
- - +
+ + + + + + + + +
@@ -109,6 +103,18 @@ >
+
+
+
+
+
Entra in Chat BiblioBacheca, cliccando qui: + + + +
@@ -147,19 +153,6 @@
- -
- -
-
-
-
-
- -
-
diff --git a/src/components/CStatusReg/CStatusReg.ts b/src/components/CStatusReg/CStatusReg.ts index f643d83..32d7348 100644 --- a/src/components/CStatusReg/CStatusReg.ts +++ b/src/components/CStatusReg/CStatusReg.ts @@ -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 + } } diff --git a/src/components/CStatusReg/CStatusReg.vue b/src/components/CStatusReg/CStatusReg.vue index c6d272f..ff0314a 100644 --- a/src/components/CStatusReg/CStatusReg.vue +++ b/src/components/CStatusReg/CStatusReg.vue @@ -10,8 +10,19 @@ +
+ + + + + +
+
-
Nuove Registrazioni:
+
{{$t('pages.statusreg.newreg')}}
- + @@ -39,6 +51,22 @@
+ + + + +
+ + + + + + + + + +
diff --git a/src/components/CVerifyEmail/CVerifyTelegram.scss b/src/components/CVerifyEmail/CVerifyTelegram.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/components/CVerifyEmail/CVerifyTelegram.ts b/src/components/CVerifyEmail/CVerifyTelegram.ts new file mode 100644 index 0000000..bbe942c --- /dev/null +++ b/src/components/CVerifyEmail/CVerifyTelegram.ts @@ -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 + } + +} diff --git a/src/components/CVerifyEmail/CVerifyTelegram.vue b/src/components/CVerifyEmail/CVerifyTelegram.vue new file mode 100644 index 0000000..db20c41 --- /dev/null +++ b/src/components/CVerifyEmail/CVerifyTelegram.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/src/components/CVerifyEmail/index.ts b/src/components/CVerifyEmail/index.ts new file mode 100644 index 0000000..692abd8 --- /dev/null +++ b/src/components/CVerifyEmail/index.ts @@ -0,0 +1 @@ +export {default as CVerifyTelegram} from './CVerifyTelegram.vue' diff --git a/src/components/CVerifyTelegram/CVerifyEmail.scss b/src/components/CVerifyTelegram/CVerifyEmail.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/components/CVerifyTelegram/CVerifyEmail.ts b/src/components/CVerifyTelegram/CVerifyEmail.ts new file mode 100644 index 0000000..1346e37 --- /dev/null +++ b/src/components/CVerifyTelegram/CVerifyEmail.ts @@ -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 + } + +} diff --git a/src/components/CVerifyTelegram/CVerifyEmail.vue b/src/components/CVerifyTelegram/CVerifyEmail.vue new file mode 100644 index 0000000..5d0faca --- /dev/null +++ b/src/components/CVerifyTelegram/CVerifyEmail.vue @@ -0,0 +1,25 @@ + + + + + diff --git a/src/components/CVerifyTelegram/index.ts b/src/components/CVerifyTelegram/index.ts new file mode 100644 index 0000000..e9dc541 --- /dev/null +++ b/src/components/CVerifyTelegram/index.ts @@ -0,0 +1 @@ +export {default as CVerifyEmail} from './CVerifyEmail.vue' diff --git a/src/components/PagePolicy/PagePolicy.vue b/src/components/PagePolicy/PagePolicy.vue index bf0845b..c66bd81 100644 --- a/src/components/PagePolicy/PagePolicy.vue +++ b/src/components/PagePolicy/PagePolicy.vue @@ -264,7 +264,6 @@ y solicite su transmisión a otro propietario, si es técnicamente posible.

-
diff --git a/src/components/index.ts b/src/components/index.ts index b698b46..0f97d63 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -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' diff --git a/src/components/logo/logo.ts b/src/components/logo/logo.ts index f0aa558..f0ca1d7 100644 --- a/src/components/logo/logo.ts +++ b/src/components/logo/logo.ts @@ -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() } diff --git a/src/components/logo/logo.vue b/src/components/logo/logo.vue index aaa2400..eacd7f2 100644 --- a/src/components/logo/logo.vue +++ b/src/components/logo/logo.vue @@ -1,6 +1,6 @@ + + diff --git a/src/views/admin/extralist/index.ts b/src/views/admin/extralist/index.ts new file mode 100644 index 0000000..b99701b --- /dev/null +++ b/src/views/admin/extralist/index.ts @@ -0,0 +1 @@ +export {default as extralist} from './extralist.vue' diff --git a/src/views/email/unsubscribe/unsubscribe.scss b/src/views/email/unsubscribe/unsubscribe.scss new file mode 100644 index 0000000..2cf4d13 --- /dev/null +++ b/src/views/email/unsubscribe/unsubscribe.scss @@ -0,0 +1,6 @@ +.mypanel { + padding: 10px; + margin: 10px; + +} + diff --git a/src/views/email/unsubscribe/unsubscribe.ts b/src/views/email/unsubscribe/unsubscribe.ts new file mode 100644 index 0000000..86a4f25 --- /dev/null +++ b/src/views/email/unsubscribe/unsubscribe.ts @@ -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) + }) + } +} diff --git a/src/views/email/unsubscribe/unsubscribe.vue b/src/views/email/unsubscribe/unsubscribe.vue new file mode 100644 index 0000000..2d0c787 --- /dev/null +++ b/src/views/email/unsubscribe/unsubscribe.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/src/views/login/regok/regok.scss b/src/views/login/regok/regok.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/views/login/regok/regok.ts b/src/views/login/regok/regok.ts new file mode 100644 index 0000000..5339610 --- /dev/null +++ b/src/views/login/regok/regok.ts @@ -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 + } + +} diff --git a/src/views/login/regok/regok.vue b/src/views/login/regok/regok.vue new file mode 100644 index 0000000..474575e --- /dev/null +++ b/src/views/login/regok/regok.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/src/views/login/signup_complete/signup_complete.scss b/src/views/login/signup_complete/signup_complete.scss new file mode 100644 index 0000000..6a3d233 --- /dev/null +++ b/src/views/login/signup_complete/signup_complete.scss @@ -0,0 +1,12 @@ +.signup { + width: 100%; + margin: 0 auto; + max-width: 450px; +} + + +.wrapper { + display: flex; + align-items: center; + justify-content: center; +} diff --git a/src/views/login/signup_complete/signup_complete.ts b/src/views/login/signup_complete/signup_complete.ts new file mode 100644 index 0000000..de65211 --- /dev/null +++ b/src/views/login/signup_complete/signup_complete.ts @@ -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) + } + +} diff --git a/src/views/login/signup_complete/signup_complete.vue b/src/views/login/signup_complete/signup_complete.vue new file mode 100644 index 0000000..abca6fc --- /dev/null +++ b/src/views/login/signup_complete/signup_complete.vue @@ -0,0 +1,14 @@ + + + + diff --git a/src/views/requestresetpwd/request-resetpwd-validate.ts b/src/views/requestresetpwd/request-resetpwd-validate.ts new file mode 100644 index 0000000..15ba13a --- /dev/null +++ b/src/views/requestresetpwd/request-resetpwd-validate.ts @@ -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 + } + } +} diff --git a/src/views/requestresetpwd/requestresetpwd.scss b/src/views/requestresetpwd/requestresetpwd.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/views/requestresetpwd/requestresetpwd.ts b/src/views/requestresetpwd/requestresetpwd.ts new file mode 100644 index 0000000..51a886e --- /dev/null +++ b/src/views/requestresetpwd/requestresetpwd.ts @@ -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); + } + } + +} diff --git a/src/views/requestresetpwd/requestresetpwd.vue b/src/views/requestresetpwd/requestresetpwd.vue new file mode 100644 index 0000000..14e7c68 --- /dev/null +++ b/src/views/requestresetpwd/requestresetpwd.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/src/views/user/dashboard/dashboard.scss b/src/views/user/dashboard/dashboard.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/views/user/dashboard/dashboard.ts b/src/views/user/dashboard/dashboard.ts new file mode 100644 index 0000000..a867371 --- /dev/null +++ b/src/views/user/dashboard/dashboard.ts @@ -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 + } + +} diff --git a/src/views/user/dashboard/dashboard.vue b/src/views/user/dashboard/dashboard.vue new file mode 100644 index 0000000..47be9cd --- /dev/null +++ b/src/views/user/dashboard/dashboard.vue @@ -0,0 +1,109 @@ + + + + diff --git a/src/views/user/profile/profile.scss b/src/views/user/profile/profile.scss new file mode 100644 index 0000000..eccfdb6 --- /dev/null +++ b/src/views/user/profile/profile.scss @@ -0,0 +1,5 @@ +.profile { + width: 100%; + margin: 0 auto; + max-width: 450px; +} diff --git a/src/views/user/profile/profile.ts b/src/views/user/profile/profile.ts new file mode 100644 index 0000000..4b06ee5 --- /dev/null +++ b/src/views/user/profile/profile.ts @@ -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 + } + +} diff --git a/src/views/user/profile/profile.vue b/src/views/user/profile/profile.vue new file mode 100644 index 0000000..0e7913c --- /dev/null +++ b/src/views/user/profile/profile.vue @@ -0,0 +1,103 @@ + + + + +