2020-01-20 01:50:45 +01:00
|
|
|
import Vue from 'vue'
|
|
|
|
|
import { GlobalStore } from '@store'
|
|
|
|
|
import { NotevoleStore, UserStore } from '../../store/Modules'
|
|
|
|
|
import { Component, Prop, Watch } from 'vue-property-decorator'
|
|
|
|
|
import { toolsext } from '@src/store/Modules/toolsext'
|
|
|
|
|
|
|
|
|
|
import MixinBase from '../../mixins/mixin-base'
|
|
|
|
|
import { CTitleBanner, CMyFieldDb } from '@components'
|
|
|
|
|
import { CMyInnerPage } from '../CMyInnerPage'
|
|
|
|
|
import { tools } from '../../store/Modules/tools'
|
2020-01-27 15:09:11 +01:00
|
|
|
import { CVerifyTelegram } from '../CVerifyEmail'
|
|
|
|
|
import { CVerifyEmail } from '../CVerifyTelegram'
|
2020-01-30 01:20:23 +01:00
|
|
|
import { CCopyBtn } from '../CCopyBtn'
|
|
|
|
|
import { CVideo } from '../CVideo'
|
|
|
|
|
import { CRequisiti } from '../CRequisiti'
|
2020-02-07 22:08:01 +01:00
|
|
|
import { shared_consts } from '../../common/shared_vuejs'
|
|
|
|
|
import { CGuidelines } from '../CGuidelines'
|
|
|
|
|
import { CVideoPromo } from '../CVideoPromo'
|
2020-01-20 01:50:45 +01:00
|
|
|
|
|
|
|
|
@Component({
|
2020-03-10 21:42:30 +01:00
|
|
|
components: {
|
|
|
|
|
CTitleBanner,
|
|
|
|
|
CMyFieldDb,
|
|
|
|
|
CMyInnerPage,
|
|
|
|
|
CVerifyTelegram,
|
|
|
|
|
CVerifyEmail,
|
|
|
|
|
CCopyBtn,
|
|
|
|
|
CVideo,
|
|
|
|
|
CRequisiti,
|
|
|
|
|
CGuidelines,
|
|
|
|
|
CVideoPromo
|
|
|
|
|
}
|
2020-01-20 01:50:45 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
export default class CStatus extends MixinBase {
|
2020-02-07 22:08:01 +01:00
|
|
|
@Prop({ required: false, default: false }) public dense: boolean
|
2020-01-20 01:50:45 +01:00
|
|
|
public $v
|
|
|
|
|
public $t: any
|
2020-02-07 22:08:01 +01:00
|
|
|
public step = 0
|
|
|
|
|
public steptodo = 0
|
2020-03-10 21:42:30 +01:00
|
|
|
public NUMSTEP_OBBLIGATORI = 7
|
2020-02-12 20:41:57 +01:00
|
|
|
public my_dream: string = ''
|
2020-01-20 01:50:45 +01:00
|
|
|
|
2020-01-27 15:09:11 +01:00
|
|
|
get numpayment() {
|
|
|
|
|
if (UserStore.state.my.profile)
|
|
|
|
|
if (UserStore.state.my.profile.paymenttypes)
|
|
|
|
|
return UserStore.state.my.profile.paymenttypes.length
|
|
|
|
|
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2020-01-20 01:50:45 +01:00
|
|
|
public arrsteps = [
|
2020-02-07 22:08:01 +01:00
|
|
|
// {
|
|
|
|
|
// title: 'steps.chat_biblio',
|
|
|
|
|
// descr: 'steps.chat_biblio_long',
|
|
|
|
|
// page: '',
|
|
|
|
|
// funccheck(index) {
|
|
|
|
|
// return true
|
|
|
|
|
// },
|
|
|
|
|
// funccheck_error(index) {
|
|
|
|
|
// return false
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
|
2020-01-27 15:09:11 +01:00
|
|
|
{
|
2020-02-07 22:08:01 +01:00
|
|
|
title: 'reg.email',
|
|
|
|
|
descr: '',
|
2020-01-27 15:09:11 +01:00
|
|
|
page: '',
|
2020-02-07 22:08:01 +01:00
|
|
|
icon: 'mail',
|
2020-01-27 15:09:11 +01:00
|
|
|
funccheck(index) {
|
2020-02-07 22:08:01 +01:00
|
|
|
return UserStore.state.my.verified_email
|
|
|
|
|
},
|
|
|
|
|
funccheck_error(index) {
|
2020-01-27 15:09:11 +01:00
|
|
|
return true
|
|
|
|
|
},
|
2020-02-07 22:08:01 +01:00
|
|
|
funcok() {
|
|
|
|
|
return 'pages.statusreg.verified'
|
|
|
|
|
},
|
|
|
|
|
funcko() {
|
|
|
|
|
return 'pages.statusreg.nonverified'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'reg.telegram',
|
|
|
|
|
descr: '',
|
|
|
|
|
page: '',
|
|
|
|
|
icon: 'fab fa-telegram',
|
|
|
|
|
funccheck(index) {
|
|
|
|
|
return UserStore.state.my.profile.teleg_id > 0
|
|
|
|
|
},
|
2020-01-27 15:09:11 +01:00
|
|
|
funccheck_error(index) {
|
2020-02-07 22:08:01 +01:00
|
|
|
return true
|
|
|
|
|
},
|
|
|
|
|
funcok() {
|
|
|
|
|
return 'pages.statusreg.verified'
|
|
|
|
|
},
|
|
|
|
|
funcko() {
|
|
|
|
|
return 'pages.statusreg.nonverified'
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'steps.linee_guida',
|
|
|
|
|
descr: '',
|
|
|
|
|
page: '',
|
|
|
|
|
funccheck(index) {
|
2020-03-10 21:42:30 +01:00
|
|
|
return tools.isBitActive(UserStore.state.my.profile.saw_and_accepted, shared_consts.Accepted.CHECK_READ_GUIDELINES.value)
|
2020-02-07 22:08:01 +01:00
|
|
|
},
|
|
|
|
|
funccheck_error(index) {
|
|
|
|
|
return true
|
|
|
|
|
},
|
|
|
|
|
funcok() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
|
|
|
|
funcko() {
|
|
|
|
|
return ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'steps.video_intro',
|
|
|
|
|
descr: '',
|
|
|
|
|
page: '',
|
|
|
|
|
funccheck(index) {
|
2020-03-10 21:42:30 +01:00
|
|
|
return tools.isBitActive(UserStore.state.my.profile.saw_and_accepted, shared_consts.Accepted.CHECK_SEE_VIDEO_PRINCIPI.value)
|
2020-02-07 22:08:01 +01:00
|
|
|
},
|
|
|
|
|
funccheck_error(index) {
|
|
|
|
|
return true
|
|
|
|
|
},
|
|
|
|
|
funcok() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
|
|
|
|
funcko() {
|
|
|
|
|
return ''
|
2020-01-27 15:09:11 +01:00
|
|
|
}
|
|
|
|
|
},
|
2020-01-20 01:50:45 +01:00
|
|
|
{
|
|
|
|
|
title: 'steps.zoom',
|
|
|
|
|
descr: 'steps.zoom_long',
|
|
|
|
|
page: '/zoom',
|
|
|
|
|
funccheck(index) {
|
2020-01-30 01:20:23 +01:00
|
|
|
return UserStore.getters.VistoZoom
|
2020-01-20 01:50:45 +01:00
|
|
|
},
|
|
|
|
|
funccheck_error(index) {
|
|
|
|
|
return true
|
2020-02-07 22:08:01 +01:00
|
|
|
},
|
|
|
|
|
funcok() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
|
|
|
|
funcko() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
2020-01-20 01:50:45 +01:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'steps.dream',
|
|
|
|
|
descr: 'steps.dream_long',
|
|
|
|
|
page: '/mydream',
|
|
|
|
|
funccheck(index) {
|
|
|
|
|
if (UserStore.state.my.profile.my_dream)
|
2020-02-19 16:10:05 +01:00
|
|
|
if (UserStore.state.my.profile.my_dream.length >= 10)
|
2020-01-20 01:50:45 +01:00
|
|
|
return true
|
|
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
},
|
|
|
|
|
funccheck_error(index) {
|
|
|
|
|
return true
|
|
|
|
|
},
|
2020-02-07 22:08:01 +01:00
|
|
|
funcok() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
|
|
|
|
funcko() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
2020-01-20 01:50:45 +01:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'steps.paymenttype',
|
|
|
|
|
descr: 'steps.paymenttype_long',
|
|
|
|
|
page: '',
|
|
|
|
|
funccheck(index) {
|
2020-01-27 15:09:11 +01:00
|
|
|
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)
|
2020-02-12 20:41:57 +01:00
|
|
|
return (UserStore.state.my.profile.paymenttypes.length >= 1) && ispaypal
|
2020-01-27 15:09:11 +01:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return false
|
2020-01-20 01:50:45 +01:00
|
|
|
},
|
|
|
|
|
funccheck_error(index) {
|
|
|
|
|
return true
|
|
|
|
|
},
|
2020-02-07 22:08:01 +01:00
|
|
|
funcok() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
|
|
|
|
funcko() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
2020-01-20 01:50:45 +01:00
|
|
|
},
|
2020-01-30 01:20:23 +01:00
|
|
|
{
|
|
|
|
|
title: 'steps.sharemovement',
|
|
|
|
|
descr: 'steps.sharemovement_long',
|
|
|
|
|
page: '/sharemovement',
|
2020-02-12 20:41:57 +01:00
|
|
|
funccheck(index) {
|
|
|
|
|
if (UserStore.state.my.calcstat)
|
|
|
|
|
return UserStore.state.my.calcstat.numinvitati >= 2
|
|
|
|
|
},
|
|
|
|
|
funccheck_error(index) {
|
|
|
|
|
return true
|
|
|
|
|
},
|
|
|
|
|
funcok() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
|
|
|
|
funcko() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'dashboard.inv_attivi',
|
|
|
|
|
descr: 'steps.inv_attivi_long',
|
|
|
|
|
page: '',
|
2020-01-30 01:20:23 +01:00
|
|
|
funccheck(index) {
|
|
|
|
|
if (UserStore.state.my.calcstat)
|
|
|
|
|
return UserStore.state.my.calcstat.numinvitati_attivi >= 2
|
|
|
|
|
},
|
|
|
|
|
funccheck_error(index) {
|
|
|
|
|
return true
|
|
|
|
|
},
|
2020-02-07 22:08:01 +01:00
|
|
|
funcok() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
|
|
|
|
funcko() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
2020-01-30 01:20:23 +01:00
|
|
|
},
|
2020-01-20 01:50:45 +01:00
|
|
|
{
|
|
|
|
|
title: 'steps.enter_prog',
|
|
|
|
|
descr: 'steps.enter_prog_long',
|
|
|
|
|
page: '/enter_prog',
|
|
|
|
|
funccheck(index) {
|
2020-03-10 21:42:30 +01:00
|
|
|
return true
|
2020-01-20 01:50:45 +01:00
|
|
|
},
|
|
|
|
|
funccheck_error(index) {
|
2020-03-10 21:42:30 +01:00
|
|
|
return true
|
2020-01-20 01:50:45 +01:00
|
|
|
},
|
2020-02-07 22:08:01 +01:00
|
|
|
funcok() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
|
|
|
|
funcko() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
2020-01-20 01:50:45 +01:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'steps.collaborate',
|
|
|
|
|
descr: 'steps.collaborate_long',
|
|
|
|
|
page: '/collaborate',
|
|
|
|
|
funccheck(index) {
|
|
|
|
|
return false
|
|
|
|
|
},
|
|
|
|
|
funccheck_error(index) {
|
|
|
|
|
return false
|
|
|
|
|
},
|
2020-02-07 22:08:01 +01:00
|
|
|
funcok() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
|
|
|
|
funcko() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
2020-01-20 01:50:45 +01:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'steps.dono',
|
|
|
|
|
descr: 'steps.dono_long',
|
|
|
|
|
page: '/gift',
|
|
|
|
|
funccheck(index) {
|
|
|
|
|
return false
|
|
|
|
|
},
|
|
|
|
|
funccheck_error(index) {
|
|
|
|
|
return false
|
|
|
|
|
},
|
2020-02-07 22:08:01 +01:00
|
|
|
funcok() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
|
|
|
|
funcko() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
2020-01-20 01:50:45 +01:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'steps.support',
|
|
|
|
|
descr: 'steps.support_long',
|
|
|
|
|
page: '/support',
|
|
|
|
|
funccheck(index) {
|
|
|
|
|
return false
|
|
|
|
|
},
|
|
|
|
|
funccheck_error(index) {
|
|
|
|
|
return false
|
|
|
|
|
},
|
2020-02-07 22:08:01 +01:00
|
|
|
funcok() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
|
|
|
|
funcko() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
2020-01-20 01:50:45 +01:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'steps.ricevo_dono',
|
|
|
|
|
descr: 'steps.ricevo_dono_long',
|
|
|
|
|
page: '/receivegift',
|
|
|
|
|
funccheck(index) {
|
|
|
|
|
return false
|
|
|
|
|
},
|
|
|
|
|
funccheck_error(index) {
|
|
|
|
|
return false
|
|
|
|
|
},
|
2020-02-07 22:08:01 +01:00
|
|
|
funcok() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
|
|
|
|
funcko() {
|
|
|
|
|
return ''
|
|
|
|
|
},
|
2020-01-20 01:50:45 +01:00
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
public setstep() {
|
2020-02-07 22:08:01 +01:00
|
|
|
this.step = 0
|
|
|
|
|
for (let indstep = 0; indstep < this.arrsteps.length; indstep++) {
|
|
|
|
|
if (this.arrsteps[indstep].funccheck(indstep)) {
|
|
|
|
|
this.step++
|
|
|
|
|
} else {
|
|
|
|
|
return
|
2020-01-20 01:50:45 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-07 22:08:01 +01:00
|
|
|
public setsteptodo() {
|
|
|
|
|
this.steptodo = 0
|
|
|
|
|
for (let indstep = 0; indstep < this.arrsteps.length; indstep++) {
|
|
|
|
|
if (this.arrsteps[indstep].funccheck(indstep)) {
|
|
|
|
|
this.steptodo++
|
|
|
|
|
} else {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public created() {
|
2020-01-20 01:50:45 +01:00
|
|
|
this.setstep()
|
2020-02-07 22:08:01 +01:00
|
|
|
this.setsteptodo()
|
2020-02-12 20:41:57 +01:00
|
|
|
|
|
|
|
|
this.my_dream = UserStore.state.my.profile.my_dream
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public change_mydream() {
|
|
|
|
|
if (UserStore.state.my.profile.my_dream !== this.my_dream) {
|
|
|
|
|
UserStore.state.my.profile.my_dream = this.my_dream
|
|
|
|
|
|
|
|
|
|
const mydata = {
|
|
|
|
|
'profile.my_dream': UserStore.state.my.profile.my_dream
|
|
|
|
|
}
|
|
|
|
|
tools.saveFieldToServer(this, 'users', UserStore.state.my._id, mydata)
|
|
|
|
|
}
|
2020-01-20 01:50:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get TelegVerificato() {
|
|
|
|
|
return UserStore.state.my.profile.teleg_id > 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get isEmailVerified() {
|
|
|
|
|
return UserStore.state.my.verified_email
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get telegramtext() {
|
|
|
|
|
if (this.TelegVerificato)
|
2020-02-07 22:08:01 +01:00
|
|
|
return this.$t('reg.telegram') + ' ' + this.$t('pages.statusreg.verified')
|
2020-01-20 01:50:45 +01:00
|
|
|
else
|
2020-02-07 22:08:01 +01:00
|
|
|
return this.$t('reg.telegram') + ' ' + this.$t('pages.statusreg.nonverified')
|
2020-01-20 01:50:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get paymenttext() {
|
|
|
|
|
return ' (' + this.numpayment + ' ' + this.$t('reg.selected') + ')'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get getlaststep() {
|
2020-02-07 22:08:01 +01:00
|
|
|
return this.arrsteps.length - 1
|
2020-01-20 01:50:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public getnuminvitati() {
|
|
|
|
|
if (UserStore.state.my)
|
|
|
|
|
if (UserStore.state.my.calcstat)
|
|
|
|
|
return UserStore.state.my.calcstat.numinvitati
|
|
|
|
|
|
|
|
|
|
return 0
|
|
|
|
|
}
|
2020-01-27 15:09:11 +01:00
|
|
|
|
2020-01-20 01:50:45 +01:00
|
|
|
public getnuminvitati_attivi() {
|
|
|
|
|
if (UserStore.state.my)
|
|
|
|
|
if (UserStore.state.my.calcstat)
|
2020-02-07 22:08:01 +01:00
|
|
|
// console.log('numinvitati', UserStore.state.my.calcstat)
|
2020-01-20 01:50:45 +01:00
|
|
|
return UserStore.state.my.calcstat.numinvitati_attivi
|
|
|
|
|
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-12 20:41:57 +01:00
|
|
|
public gettextstep(step, index) {
|
2020-02-19 16:10:05 +01:00
|
|
|
let tit = (index + 1) + ' - ' + this.$t(step.title)
|
2020-01-20 01:50:45 +01:00
|
|
|
|
2020-02-07 22:08:01 +01:00
|
|
|
if (step.funcok())
|
|
|
|
|
tit += ' ' + this.$t(step.funcok())
|
|
|
|
|
|
2020-01-20 01:50:45 +01:00
|
|
|
if (step.title === 'steps.sharemovement') {
|
2020-02-12 20:41:57 +01:00
|
|
|
tit += ' (' + this.getnuminvitati() + ' ' + this.$t('dashboard.downline') + ')'
|
2020-01-20 01:50:45 +01:00
|
|
|
} else if (step.title === 'steps.paymenttype') {
|
|
|
|
|
tit += this.paymenttext
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return tit
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get getRefLink() {
|
2020-01-30 01:20:23 +01:00
|
|
|
return UserStore.getters.getRefLink('')
|
2020-01-20 01:50:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public copylink() {
|
2020-02-07 22:08:01 +01:00
|
|
|
tools.copyStringToClipboard(this, this.getRefLink, true)
|
2020-01-20 01:50:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public getiferror(checkerror, value) {
|
|
|
|
|
if (checkerror) {
|
|
|
|
|
return !value
|
|
|
|
|
} else {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-10 21:42:30 +01:00
|
|
|
public geterrcolor(mystep) {
|
|
|
|
|
if ((mystep.title === 'steps.sharemovement') || (mystep.title === 'dashboard.inv_attivi')) {
|
|
|
|
|
return 'blue'
|
|
|
|
|
} else {
|
|
|
|
|
return 'red'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public geterricon(value, mystep) {
|
|
|
|
|
if ((mystep.title === 'steps.sharemovement') || (mystep.title === 'dashboard.inv_attivi')) {
|
|
|
|
|
return 'fas fa-user'
|
|
|
|
|
} else {
|
|
|
|
|
return 'fas fa-exclamation-triangle'
|
|
|
|
|
}
|
2020-01-20 01:50:45 +01:00
|
|
|
}
|
|
|
|
|
|
2020-01-27 15:09:11 +01:00
|
|
|
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'
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-07 22:08:01 +01:00
|
|
|
public geticonstep(mystep) {
|
|
|
|
|
if (!!mystep.icon)
|
|
|
|
|
return mystep.icon
|
|
|
|
|
else
|
2020-01-27 15:09:11 +01:00
|
|
|
return 'check-circle'
|
2020-02-07 22:08:01 +01:00
|
|
|
|
2020-01-27 15:09:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public geticoncolor(title) {
|
2020-03-10 21:42:30 +01:00
|
|
|
if (title === 'steps.enter_prog') {
|
|
|
|
|
return this.CompletatoRequisiti ? 'blue' : (this.Completato9Req ? 'green' : 'blue')
|
|
|
|
|
}
|
|
|
|
|
|
2020-01-27 15:09:11 +01:00
|
|
|
if (title === 'steps.chat_biblio') {
|
|
|
|
|
return 'blue'
|
|
|
|
|
} else {
|
|
|
|
|
return 'green'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get TelegCode() {
|
|
|
|
|
return UserStore.state.my.profile.teleg_checkcode
|
|
|
|
|
}
|
|
|
|
|
|
2020-01-30 01:20:23 +01:00
|
|
|
get VistoZoom() {
|
|
|
|
|
return UserStore.getters.VistoZoom
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get getLinkBotTelegram() {
|
|
|
|
|
const link = this.getValDb('TELEG_BOT_LINK', false)
|
|
|
|
|
// console.log('link', link)
|
|
|
|
|
return link
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get CompletatoRequisiti() {
|
2020-03-10 21:42:30 +01:00
|
|
|
try {
|
|
|
|
|
return this.VistoZoom && this.RequisitoPayment &&
|
|
|
|
|
this.TelegVerificato &&
|
|
|
|
|
(UserStore.state.my.profile.my_dream.length >= 10) &&
|
|
|
|
|
tools.isBitActive(UserStore.state.my.profile.saw_and_accepted, shared_consts.Accepted.CHECK_SEE_VIDEO_PRINCIPI.value) &&
|
|
|
|
|
tools.isBitActive(UserStore.state.my.profile.saw_and_accepted, shared_consts.Accepted.CHECK_READ_GUIDELINES.value)
|
|
|
|
|
}catch (e) {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get Completato9Req() {
|
|
|
|
|
// return tools.Is9ReqOk(this.dashboard.myself)
|
|
|
|
|
return this.CompletatoRequisiti && (this.getnuminvitati_attivi() >= 2)
|
2020-01-30 01:20:23 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get RequisitoPayment() {
|
|
|
|
|
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)
|
2020-02-12 20:41:57 +01:00
|
|
|
return (UserStore.state.my.profile.paymenttypes.length >= 1) && ispaypal
|
2020-01-30 01:20:23 +01:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-07 22:08:01 +01:00
|
|
|
get percstep() {
|
|
|
|
|
return (this.getstep / this.NUMSTEP_OBBLIGATORI)
|
|
|
|
|
}
|
2020-01-30 01:20:23 +01:00
|
|
|
|
2020-02-07 22:08:01 +01:00
|
|
|
get getstep() {
|
|
|
|
|
let mystep = 0
|
|
|
|
|
for (let indstep = 0; indstep < this.arrsteps.length; indstep++) {
|
|
|
|
|
if (this.arrsteps[indstep].funccheck(indstep)) {
|
|
|
|
|
mystep++
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return mystep
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get progressstep() {
|
|
|
|
|
return this.$t(this.arrsteps[this.steptodo].title)
|
|
|
|
|
}
|
2020-01-30 01:20:23 +01:00
|
|
|
|
2020-02-07 22:08:01 +01:00
|
|
|
get strpercstep() {
|
2020-02-19 16:10:05 +01:00
|
|
|
return this.$t('steps.completed') + ' ' + (this.getstep) + ' ' + this.$t('steps.passi_su') + ' ' + this.NUMSTEP_OBBLIGATORI
|
2020-02-07 22:08:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get stepcompleti() {
|
2020-03-10 21:42:30 +01:00
|
|
|
return this.getstep >= this.NUMSTEP_OBBLIGATORI
|
2020-02-07 22:08:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public scrolltostep(mystep) {
|
|
|
|
|
this.step = mystep
|
2020-03-10 21:42:30 +01:00
|
|
|
if (mystep > 0)
|
2020-02-07 22:08:01 +01:00
|
|
|
mystep -= 1
|
|
|
|
|
const element = document.getElementById('step' + mystep)
|
|
|
|
|
tools.scrollToElement(element)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public nextstep(index) {
|
|
|
|
|
this.step = index + 1
|
|
|
|
|
this.setsteptodo()
|
|
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.scrolltostep(this.step)
|
|
|
|
|
}, 500)
|
|
|
|
|
|
|
|
|
|
}
|
2020-01-20 01:50:45 +01:00
|
|
|
}
|