- Downline User
- Not registered if already exists. - Forgot Password
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="column q-pa-sm cursor-pointer" @click="copytoclip">
|
||||
<div class="q-ma-sm column cursor-pointer" @click="copytoclip">
|
||||
<q-field outlined bottom-slots :label="title" stack-label class="text-center">
|
||||
<template v-slot:prepend>
|
||||
<template v-slot:prepend v-if="!tools.isMobile()">
|
||||
<q-btn round dense flat icon="far fa-copy" />
|
||||
</template>
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ export default class CGeoChart extends Vue {
|
||||
|
||||
for (const rec of this.mydata) {
|
||||
alldata = []
|
||||
alldata.push(tools.getNationsByNationality(rec._id))
|
||||
alldata.push(tools.getNationsByNationality(rec._id, true))
|
||||
alldata.push(rec.count)
|
||||
|
||||
this.mydatafixed.push(alldata)
|
||||
|
||||
@@ -13,9 +13,10 @@ import { IParamsQuery } from '../../model/GlobalStore'
|
||||
import { fieldsTable } from '../../store/Modules/fieldsTable'
|
||||
import { CMyPopupEdit } from '../CMyPopupEdit'
|
||||
import { CTitleBanner } from '../CTitleBanner'
|
||||
import { CMyDashboard } from '../CMyDashboard'
|
||||
|
||||
@Component({
|
||||
components: { CMyPopupEdit, CTitleBanner }
|
||||
components: { CMyPopupEdit, CTitleBanner, CMyDashboard }
|
||||
})
|
||||
export default class CGridTableRec extends Vue {
|
||||
@Prop({ required: true }) public prop_mytitle: string
|
||||
@@ -384,6 +385,8 @@ export default class CGridTableRec extends Vue {
|
||||
public refresh() {
|
||||
this.serverData = []
|
||||
|
||||
this.search = this.search.trim()
|
||||
|
||||
// console.log('refresh')
|
||||
// console.log('this.search', this.search)
|
||||
if (!!this.search && this.search !== '')
|
||||
@@ -552,4 +555,14 @@ export default class CGridTableRec extends Vue {
|
||||
|
||||
console.log('this.rowclicksel', this.rowclicksel)
|
||||
}
|
||||
|
||||
get getusernamesel() {
|
||||
try {
|
||||
if (this.rowclicksel) {
|
||||
return this.rowclicksel.username
|
||||
}
|
||||
} catch (e) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,6 +143,13 @@
|
||||
</q-table>
|
||||
|
||||
<div v-if="rowclicksel">
|
||||
|
||||
<div v-if="(prop_mytable === 'users') && tools.appid() === '7'">
|
||||
<CMyDashboard :username="getusernamesel">
|
||||
|
||||
</CMyDashboard>
|
||||
</div>
|
||||
|
||||
<CTitleBanner title="Record:"></CTitleBanner>
|
||||
|
||||
<div class="q-ma-xs q-pa-xs text-center rounded-borders q-list--bordered"
|
||||
@@ -179,6 +186,6 @@
|
||||
<script lang="ts" src="./CGridTableRec.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" >
|
||||
<style lang="scss">
|
||||
@import './CGridTableRec.scss';
|
||||
</style>
|
||||
|
||||
@@ -21,6 +21,10 @@ export default class CLineChart extends Vue {
|
||||
return tools
|
||||
}
|
||||
|
||||
get mythis() {
|
||||
return this
|
||||
}
|
||||
|
||||
public mounted() {
|
||||
this.mydatafixed = {}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="q-pa-sm">
|
||||
<line-chart :title="title" :data="getmydata" :round="0" :colors="mycolors"></line-chart>
|
||||
<div>
|
||||
<line-chart :width="tools.getwidthscale(mythis, 350, 400)+`px`" :title="title" :data="getmydata" :round="0" :colors="mycolors"></line-chart>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label>{{ tools.getNationsByNationality(nat._id) }}</q-item-label>
|
||||
<q-item-label>{{ tools.getNationsByNationality(nat._id, false) }}</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section side>
|
||||
|
||||
@@ -201,8 +201,8 @@ export default class CSignUp extends MixinBase {
|
||||
|
||||
console.log(this.signup)
|
||||
return UserStore.actions.signup(tools.clone(this.signup))
|
||||
.then((riscode) => {
|
||||
if (tools.SignUpcheckErrors(this, riscode))
|
||||
.then((ris) => {
|
||||
if (tools.SignUpcheckErrors(this, ris.code, ris.msg))
|
||||
this.$q.loading.hide()
|
||||
}).catch((error) => {
|
||||
console.log('ERROR = ' + error)
|
||||
|
||||
@@ -238,8 +238,8 @@ export default class CSignUpNotevole extends MixinBase {
|
||||
|
||||
console.log(this.signup)
|
||||
return UserStore.actions.signup(tools.clone(this.signup))
|
||||
.then((riscode) => {
|
||||
if (tools.SignUpcheckErrors(this, riscode))
|
||||
.then((ris) => {
|
||||
if (tools.SignUpcheckErrors(this, ris.code, ris.msg))
|
||||
this.$q.loading.hide()
|
||||
}).catch((error) => {
|
||||
console.log('ERROR = ' + error)
|
||||
|
||||
@@ -10,10 +10,13 @@ import { CMyInnerPage } from '../CMyInnerPage'
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { CVerifyTelegram } from '../CVerifyEmail'
|
||||
import { CVerifyEmail } from '../CVerifyTelegram'
|
||||
import { CCopyBtn } from '../CCopyBtn'
|
||||
import { CVideo } from '../CVideo'
|
||||
import { CRequisiti } from '../CRequisiti'
|
||||
|
||||
|
||||
@Component({
|
||||
components: { CTitleBanner, CMyFieldDb, CMyInnerPage, CVerifyTelegram, CVerifyEmail }
|
||||
components: { CTitleBanner, CMyFieldDb, CMyInnerPage, CVerifyTelegram, CVerifyEmail, CCopyBtn, CVideo, CRequisiti }
|
||||
})
|
||||
|
||||
export default class CStatus extends MixinBase {
|
||||
@@ -47,7 +50,7 @@ export default class CStatus extends MixinBase {
|
||||
descr: 'steps.zoom_long',
|
||||
page: '/zoom',
|
||||
funccheck(index) {
|
||||
return UserStore.state.my.profile.saw_zoom_presentation
|
||||
return UserStore.getters.VistoZoom
|
||||
},
|
||||
funccheck_error(index) {
|
||||
return true
|
||||
@@ -68,18 +71,6 @@ export default class CStatus extends MixinBase {
|
||||
return true
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'steps.sharemovement',
|
||||
descr: 'steps.sharemovement_long',
|
||||
page: '/sharemovement',
|
||||
funccheck(index) {
|
||||
if (UserStore.state.my.calcstat)
|
||||
return UserStore.state.my.calcstat.numinvitati_attivi >= 2
|
||||
},
|
||||
funccheck_error(index) {
|
||||
return true
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'steps.paymenttype',
|
||||
descr: 'steps.paymenttype_long',
|
||||
@@ -102,6 +93,18 @@ export default class CStatus extends MixinBase {
|
||||
return true
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'steps.sharemovement',
|
||||
descr: 'steps.sharemovement_long',
|
||||
page: '/sharemovement',
|
||||
funccheck(index) {
|
||||
if (UserStore.state.my.calcstat)
|
||||
return UserStore.state.my.calcstat.numinvitati_attivi >= 2
|
||||
},
|
||||
funccheck_error(index) {
|
||||
return true
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'steps.enter_prog',
|
||||
descr: 'steps.enter_prog_long',
|
||||
@@ -238,6 +241,7 @@ export default class CStatus extends MixinBase {
|
||||
public getnuminvitati_attivi() {
|
||||
if (UserStore.state.my)
|
||||
if (UserStore.state.my.calcstat)
|
||||
console.log('numinvitati', UserStore.state.my.calcstat)
|
||||
return UserStore.state.my.calcstat.numinvitati_attivi
|
||||
|
||||
return 0
|
||||
@@ -256,7 +260,7 @@ export default class CStatus extends MixinBase {
|
||||
}
|
||||
|
||||
get getRefLink() {
|
||||
return UserStore.getters.getRefLink()
|
||||
return UserStore.getters.getRefLink('')
|
||||
}
|
||||
|
||||
public copylink() {
|
||||
@@ -317,4 +321,35 @@ export default class CStatus extends MixinBase {
|
||||
return UserStore.state.my.profile.teleg_checkcode
|
||||
}
|
||||
|
||||
get VistoZoom() {
|
||||
return UserStore.getters.VistoZoom
|
||||
}
|
||||
|
||||
get getLinkBotTelegram() {
|
||||
const link = this.getValDb('TELEG_BOT_LINK', false)
|
||||
// console.log('link', link)
|
||||
return link
|
||||
}
|
||||
|
||||
get CompletatoRequisiti() {
|
||||
return this.VistoZoom && this.getnuminvitati_attivi() >= 2 && this.RequisitoPayment
|
||||
}
|
||||
|
||||
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)
|
||||
return (UserStore.state.my.profile.paymenttypes.length >= 2) && ispaypal
|
||||
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -49,6 +49,13 @@
|
||||
<CVerifyTelegram v-if="TelegCode || !TelegVerificato">
|
||||
|
||||
</CVerifyTelegram>
|
||||
<div v-else>
|
||||
<br>
|
||||
<q-btn color="primary" icon="fab fa-telegram" :label="$t('components.authentication.telegram.openbot')"
|
||||
type="a"
|
||||
:href="getLinkBotTelegram" target="_blank"></q-btn>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
|
||||
<q-stepper-navigation>
|
||||
@@ -71,6 +78,33 @@
|
||||
<div v-if="mystep.descr">
|
||||
<div v-html="$t(mystep.descr)"></div>
|
||||
</div>
|
||||
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('steps.paymenttype_paypal')" bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
myclass="myshad" canopen="true" :visible="false">
|
||||
|
||||
<CVideo myvideokey="RqsWDlpnN3k">
|
||||
|
||||
</CVideo>
|
||||
|
||||
<q-btn class="q-ma-md" size="md" type="a" href="https://www.paypal.com/"
|
||||
target="_blank" rounded color="primary" icon="info" :label="$t('steps.paymenttype_paypal_link')">
|
||||
</q-btn>
|
||||
</CTitleBanner>
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('steps.paymenttype_revolut')" bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
myclass="myshad" canopen="true" :visible="false">
|
||||
|
||||
<CVideo myvideokey="">
|
||||
|
||||
</CVideo>
|
||||
|
||||
<q-btn class="q-ma-md" size="md" type="a" href="https://www.revolut.com/"
|
||||
target="_blank" rounded color="primary" icon="info"
|
||||
:label="$t('steps.paymenttype_revolut_link')">
|
||||
</q-btn>
|
||||
|
||||
</CTitleBanner>
|
||||
<div>
|
||||
|
||||
<CMyFieldDb :title="$t('reg.paymenttype')"
|
||||
@@ -103,7 +137,7 @@
|
||||
>
|
||||
</CMyFieldDb>
|
||||
</div>
|
||||
<div v-else-if="mystep.title === 'steps.chat_biblio'" >
|
||||
<div v-else-if="mystep.title === 'steps.chat_biblio'">
|
||||
<div v-if="mystep.descr">
|
||||
<div v-html="$t(mystep.descr)"></div>
|
||||
</div>
|
||||
@@ -116,10 +150,15 @@
|
||||
|
||||
</div>
|
||||
<div v-else-if="mystep.title === 'steps.zoom'">
|
||||
|
||||
<CRequisiti :statebool="VistoZoom" :msgTrue="$t('steps.zoom_si_partecipato')"
|
||||
:msgFalse="$t('steps.zoom_no_partecipato')">
|
||||
</CRequisiti>
|
||||
|
||||
<div v-if="mystep.descr">
|
||||
<div v-html="$t(mystep.descr)"></div>
|
||||
</div>
|
||||
<CTitleBanner class="q-pa-xs" title="Che cos'è Zoom e come funziona?" bgcolor="bg-primary"
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('steps.zoom_what')" bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
myclass="myshad" canopen="true" :visible="false">
|
||||
<div>
|
||||
@@ -156,10 +195,42 @@
|
||||
|
||||
</div>
|
||||
<div v-else-if="mystep.title === 'steps.sharemovement'">
|
||||
|
||||
<CRequisiti :statebool="getnuminvitati() >= 2" :msgTrue="$t('steps.sharemovement_hai_invitato')"
|
||||
:msgFalse="$t('steps.sharemovement_devi_invitare_almeno_2')">
|
||||
</CRequisiti>
|
||||
<CRequisiti v-if="getnuminvitati() > 0" :statebool="getnuminvitati_attivi() >= 2"
|
||||
:msgTrue="$t('steps.sharemovement_invitati_attivi_si')"
|
||||
:msgFalse="$t('steps.sharemovement_invitati_attivi_no')">
|
||||
</CRequisiti>
|
||||
|
||||
|
||||
<div v-if="mystep.descr">
|
||||
<div v-html="$t(mystep.descr)"></div>
|
||||
</div>
|
||||
{{ $t('reg.reflink') + ' ' + getRefLink }}
|
||||
|
||||
<CCopyBtn :title="$t('reg.reflink')" :texttocopy="getRefLink">
|
||||
|
||||
</CCopyBtn>
|
||||
|
||||
<q-btn class="q-mb-md" rounded size="md" color="primary" to="/dashboard"
|
||||
:label="$t('pages.dashboard')"></q-btn>
|
||||
|
||||
</div>
|
||||
<div v-else-if="mystep.title === 'steps.enter_prog'">
|
||||
|
||||
<div v-if="mystep.descr">
|
||||
<div v-html="$t(mystep.descr)"></div>
|
||||
</div>
|
||||
|
||||
<CRequisiti :statebool="CompletatoRequisiti" :msgTrue="$t('steps.enter_prog_requisiti_ok')"
|
||||
:msgFalse="$t('steps.enter_prog_completa_requisiti')">
|
||||
</CRequisiti>
|
||||
|
||||
<CRequisiti :statebool="CompletatoRequisiti" :msgTrue="$t('steps.enter_prog_status')"
|
||||
:msgFalse="$t('steps.enter_prog_status')">
|
||||
</CRequisiti>
|
||||
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="mystep.page">
|
||||
@@ -195,7 +266,6 @@
|
||||
|
||||
</CTitleBanner>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</q-banner>
|
||||
|
||||
<q-slide-transition>
|
||||
<div v-show="myvisible">
|
||||
<div v-show="myvisible" class="rounded-borders">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</q-slide-transition>
|
||||
|
||||
@@ -49,3 +49,5 @@ export * from './CCopyBtn'
|
||||
export * from './CVerifyTelegram'
|
||||
export * from './CVerifyEmail'
|
||||
export * from './CLineChart'
|
||||
export * from './CUserBadge'
|
||||
export * from './CMyDashboard'
|
||||
|
||||
@@ -74,6 +74,7 @@ export interface IUserState {
|
||||
tokenforgot?: string
|
||||
|
||||
servercode?: number
|
||||
msg?: string
|
||||
resStatus?: number
|
||||
x_auth_token?: string
|
||||
isLogged?: boolean
|
||||
|
||||
@@ -20,6 +20,7 @@ const msgglobal = {
|
||||
userlist: 'Lista Utenti',
|
||||
zoomlist: 'Calendario Zoom',
|
||||
extralist: 'Lista Extra',
|
||||
dbop: 'Db Operations',
|
||||
tableslist: 'Lista Tabelle',
|
||||
newsletter: 'Newsletter',
|
||||
pages: 'Pagine',
|
||||
@@ -39,16 +40,30 @@ const msgglobal = {
|
||||
write: 'scrive'
|
||||
},
|
||||
steps: {
|
||||
chat_biblio: 'Entro nella Chat AYNI BiblioBacheca',
|
||||
chat_biblio: 'Entra 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.',
|
||||
paymenttype_long: 'Scegliere <strong>almeno 2 Modalità di Pagamento</strong>, per permettere alle persone di poter scegliere come inviarsi il dono.<br><br>I <strong>metodi di Pagamento Super-Consigliati</strong> sono: <ul><li><strong>Paypal</strong> è indispensabile in quanto quasi tutti lo utilizzano ed è un\'ottima soluzione perchè potrai collegargli le tue carte di credito/debito.</li><li><strong>Revolut</strong>: La Carta Revolut è un conto Inglese (fuori dalla UE), pertanto è più libera e semplice da utilizzare, tramite il cellulare</strong></li>',
|
||||
paymenttype_paypal: 'Come Aprire un conto Paypal (in 2 minuti)',
|
||||
paymenttype_paypal_link: 'Apri il Conto con Paypal',
|
||||
paymenttype_revolut: 'Come Aprire il conto con Revolut (in 2 minuti)',
|
||||
paymenttype_revolut_link: 'Apri il Conto con Revolut',
|
||||
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.\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',
|
||||
zoom_si_partecipato: 'Hai partecipato ad almeno 1 Zoom',
|
||||
zoom_no_partecipato: 'Attualmente non hai ancora partecipato ad uno Zoom (è un requisito per poter entrare)',
|
||||
zoom_long: 'Si richiede di partecipare ad almeno 1 Zoom, ma è consigliato prendere parte al movimento in maniera più attiva.<br><br><strong>Partecipando agli Zoom lo Staff di AYNI controllerà le presenze e verrai così abilitato.</strong>',
|
||||
zoom_what:'Che cos\'è Zoom e come funziona?',
|
||||
sharemovement_devi_invitare_almeno_2: 'Ancora non hai invitato 2 persone',
|
||||
sharemovement_hai_invitato: 'Hai invitato almeno 2 persone',
|
||||
sharemovement_invitati_attivi_si: 'Hai almeno 2 persone invitate Attive',
|
||||
sharemovement_invitati_attivi_no: '<strong>Nota Bene:</strong>Le persone che hai invitato, per essere Attive, devono essere verificati Telegram ed aver <strong>partecipato ad almeno 1 Zoom</strong>',
|
||||
sharemovement: 'Condivido questo Movimento Economico Solidale',
|
||||
sharemovement_long: 'Condividi il Movimento AYNI con almeno 2 amici (<strong>consigliate 3 persone</strong>) e li inviti a partecipare agli Zoom di Benvenuto e a registrarsi.<br>',
|
||||
enter_prog_status: '<strong>NOTA BENE:</strong> La Programmazione partirà appena possibile. dopo che tutti si saranno registrati su questa piattaforma.<br>Comunicheremo noi le date in cui ognuno potrà partire ed effettuare così il proprio dono<br>',
|
||||
enter_prog_completa_requisiti: 'Completa tutti i requisiti richiesti, per poter entrare in programmazione.',
|
||||
enter_prog_requisiti_ok: 'Hai completato tutti i requisiti per poter accedere alla Programmazione',
|
||||
enter_prog: 'Entro in Programmazione',
|
||||
enter_prog_long: 'Entro in programmazione, e vengo aggiunto al Mandala, ed entro così nella chat corrispondente.',
|
||||
enter_prog_long: 'Una volta sottisfatti i requisiti richiesti, potrai entrare in Programmazione, e verrai aggiunto al Mandala, e così nella chat di gruppo corrispondente.<br>',
|
||||
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',
|
||||
@@ -202,6 +217,7 @@ const msgglobal = {
|
||||
terms: 'Devi accettare le condizioni, per continuare.',
|
||||
email_not_exist: 'l\'Email non è presente in archivio, verificare se è corretta',
|
||||
duplicate_email: 'l\'Email è già stata registrata',
|
||||
user_already_exist: 'La registrazione con questi dati (nome, cognome e cellulare) è stata già effettuata. Per accedere al sito, cliccare sul bottone LOGIN dalla HomePage.',
|
||||
user_extralist_not_found: 'Utente in archivio non trovato, inserire il Nome, Cognome e numero di cellulare inviato in precedenza',
|
||||
user_not_this_aportador: 'Stai utilizzando un link di una persona diversa dal tuo invitato originale.',
|
||||
duplicate_username: 'L\'Username è stato già utilizzato',
|
||||
@@ -241,6 +257,7 @@ const msgglobal = {
|
||||
incorso: 'Richiesta Nuova Email...',
|
||||
email_sent: 'Email inviata',
|
||||
check_email: 'Controlla la tua email, ti arriverà un messaggio con un link per reimpostare la tua password. Questo link, per sicurezza, scadrà dopo 4 ore.',
|
||||
token_scaduto: 'Il token è scaduto oppure è stato già usato. Ripetere la procedura di reset password',
|
||||
title_update_pwd: 'Aggiorna la tua password',
|
||||
update_password: 'Aggiorna Password',
|
||||
},
|
||||
@@ -604,6 +621,7 @@ const msgglobal = {
|
||||
terms: 'Debes aceptar las condiciones, para continuar..',
|
||||
email_not_exist: 'El correo electrónico no está presente en el archivo, verifique si es correcto',
|
||||
duplicate_email: 'La email ya ha sido registrada',
|
||||
user_already_exist: 'El registro con estos datos (nombre, apellido y teléfono móvil) ya se ha llevado a cabo. Para acceder al sitio, haga clic en el botón INICIAR SESIÓN desde la Página de inicio.',
|
||||
user_extralist_not_found: 'Usuario en el archivo no encontrado, inserte el nombre, apellido y número de teléfono enviado previamente',
|
||||
duplicate_username: 'El nombre de usuario ya ha sido utilizado',
|
||||
aportador_not_exist: 'El nombre de usuario de la persona que lo invitó no está presente. Contactanos.',
|
||||
@@ -995,6 +1013,7 @@ const msgglobal = {
|
||||
terms: 'Vous devez accepter les conditions, pour continuer..',
|
||||
email_not_exist: 'L\'email n\'est pas présent dans l\'archive, vérifiez s\'il est correct',
|
||||
duplicate_email: 'L\'email a déjà été enregistré',
|
||||
user_already_exist: 'L\'enregistrement avec ces données (nom, prénom et téléphone portable) a déjà été effectué. Pour accéder au site, cliquez sur le bouton CONNEXION de la page d\'accueil.',
|
||||
user_extralist_not_found: 'Utilisateur dans les archives introuvable, insérez le nom, le prénom et le numéro de téléphone portable envoyés précédemment',
|
||||
duplicate_username: 'Le nom d\'utilisateur a déjà été utilisé',
|
||||
aportador_not_exist: 'Le nom d\'utilisateur de la personne qui vous a invité n\'est pas présent. Contactez-nous.',
|
||||
@@ -1386,6 +1405,7 @@ const msgglobal = {
|
||||
terms: 'You need to agree with the terms & conditions.',
|
||||
email_not_exist: 'Email is not present in the archive, check if it is correct',
|
||||
duplicate_email: 'Email was already registered',
|
||||
user_already_exist: 'Registration with these data (name, surname and mobile phone) has already been created. To access the site, click on the LOGIN button from the HomePage.',
|
||||
user_extralist_not_found: 'User in archive not found, insert the Name, Surname and mobile phone sent previously',
|
||||
duplicate_username: 'Username is already taken',
|
||||
aportador_not_exist: 'The username of the person who invited you is not present. Contact us.',
|
||||
@@ -1777,6 +1797,7 @@ const msgglobal = {
|
||||
terms: 'You need to agree with the terms & conditions.',
|
||||
email_not_exist: 'Email is not present in the archive, check if it is correct',
|
||||
duplicate_email: 'Email was already registered',
|
||||
user_already_exist: 'La registrazione con questi dati (nome, cognome e cellulare) è stata già effettuata. Per accedere al sito, cliccare sul bottone LOGIN dalla HomePage.',
|
||||
user_extralist_not_found: 'User in archive not found, insert the Name, Surname and mobile phone sent previously',
|
||||
duplicate_username: 'Username is already taken',
|
||||
aportador_not_exist: 'The username of the person who invited you is not present in the archive. Verify that it is correct.',
|
||||
|
||||
@@ -40,6 +40,19 @@ export class AxiosError {
|
||||
|
||||
return this.msgerr
|
||||
}
|
||||
public getMsg() {
|
||||
try {
|
||||
if (this.code === 0) {
|
||||
if (this.data.code) {
|
||||
return this.data.msg
|
||||
}
|
||||
}
|
||||
}catch (e) {
|
||||
return ''
|
||||
}
|
||||
|
||||
return ''
|
||||
}
|
||||
public getCode() {
|
||||
if (this.code === 0) {
|
||||
if (this.data.code) {
|
||||
|
||||
@@ -230,12 +230,6 @@ namespace Actions {
|
||||
CancelEvent: b.dispatch(CancelEvent)
|
||||
}
|
||||
|
||||
// async function resetpwd(context, paramquery: ICalendarState) {
|
||||
// }
|
||||
//
|
||||
// export const actions = {
|
||||
// autologin_FromLocalStorage: b.dispatch(autologin_FromLocalStorage)
|
||||
// }
|
||||
}
|
||||
|
||||
// Module
|
||||
|
||||
@@ -37,7 +37,8 @@ export const DefaultUser: IUserFields = {
|
||||
made_gift: false,
|
||||
profile: {
|
||||
img: '',
|
||||
teleg_id: 0
|
||||
teleg_id: 0,
|
||||
saw_zoom_presentation: false,
|
||||
},
|
||||
downline: [],
|
||||
calcstat: DefaultCalc
|
||||
@@ -114,6 +115,13 @@ namespace Getters {
|
||||
// }
|
||||
// }, 'tok')
|
||||
|
||||
const VistoZoom = b.read((mystate) => {
|
||||
if (state.my && state.my.profile) {
|
||||
return (state.my.profile.saw_zoom_presentation)
|
||||
}
|
||||
return false
|
||||
}, 'VistoZoom')
|
||||
|
||||
const isServerError = b.read((mystate) => {
|
||||
return (state.servercode === tools.ERR_SERVERFETCH)
|
||||
}, 'isServerError')
|
||||
@@ -122,6 +130,10 @@ namespace Getters {
|
||||
return state.servercode
|
||||
}, 'getServerCode')
|
||||
|
||||
const getMsg = b.read((mystate) => {
|
||||
return state.msg
|
||||
}, 'getMsg')
|
||||
|
||||
const getNameSurnameByUserId = b.read((mystate: IUserState) => (userId: string) => {
|
||||
const user = UserStore.getters.getUserByUserId(userId)
|
||||
if (user)
|
||||
@@ -188,10 +200,12 @@ namespace Getters {
|
||||
return ''
|
||||
}
|
||||
}, 'getImgByUsername')
|
||||
const getRefLink = b.read((mystate: IUserState) => (): string => {
|
||||
const getRefLink = b.read((mystate: IUserState) => (username: string): string => {
|
||||
// console.log('myrec', myrec)
|
||||
|
||||
return tools.getUrlSite() + '/signup/' + mystate.my.username
|
||||
if (username === '')
|
||||
username = mystate.my.username
|
||||
return tools.getUrlSite() + '/signup/' + username
|
||||
|
||||
}, 'getRefLink')
|
||||
|
||||
@@ -214,9 +228,15 @@ namespace Getters {
|
||||
get isServerError() {
|
||||
return isServerError()
|
||||
},
|
||||
get VistoZoom() {
|
||||
return VistoZoom()
|
||||
},
|
||||
get getServerCode() {
|
||||
return getServerCode()
|
||||
},
|
||||
get getMsg() {
|
||||
return getMsg()
|
||||
},
|
||||
get IsMyFriend() {
|
||||
return IsMyFriend()
|
||||
},
|
||||
@@ -380,6 +400,7 @@ namespace Mutations {
|
||||
if (mystate.servercode !== tools.ERR_SERVERFETCH) {
|
||||
mystate.servercode = axerr.getCode()
|
||||
}
|
||||
mystate.msg = axerr.getMsg()
|
||||
console.log('Err catch: (servercode:', axerr.getCode(), axerr.getMsgError(), ')')
|
||||
} catch (e) {
|
||||
console.log('Err catch:', axerr)
|
||||
@@ -435,24 +456,23 @@ namespace Actions {
|
||||
}
|
||||
}
|
||||
|
||||
async function resetpwd(context, paramquery: IUserState) {
|
||||
async function resetpwd(context, paramquery) {
|
||||
|
||||
const usertosend = {
|
||||
email: paramquery.my.email,
|
||||
password: paramquery.my.password,
|
||||
tokenforgot: paramquery.tokenforgot
|
||||
}
|
||||
console.log(usertosend)
|
||||
const mydata = { ...paramquery }
|
||||
|
||||
Mutations.mutations.setServerCode(tools.CALLING)
|
||||
return bcrypt.hash(mydata.password, bcrypt.genSaltSync(12))
|
||||
.then((hashedPassword: string) => {
|
||||
mydata.repeatPassword = ''
|
||||
mydata.password = String(hashedPassword)
|
||||
|
||||
return await Api.SendReq('/updatepwd', 'POST', usertosend, true)
|
||||
.then((res) => {
|
||||
return { code: res.data.code, msg: res.data.msg }
|
||||
})
|
||||
.catch((error: Types.AxiosError) => {
|
||||
UserStore.mutations.setErrorCatch(error)
|
||||
return { code: UserStore.getters.getServerCode, msg: error.getMsgError() }
|
||||
return Api.SendReq('/updatepwd', 'POST', mydata, true)
|
||||
.then((res) => {
|
||||
return { code: res.data.code, msg: res.data.msg }
|
||||
})
|
||||
.catch((error: Types.AxiosError) => {
|
||||
UserStore.mutations.setErrorCatch(error)
|
||||
return { code: UserStore.getters.getServerCode, msg: error.getMsgError() }
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
@@ -540,6 +560,16 @@ namespace Actions {
|
||||
})
|
||||
}
|
||||
|
||||
async function execDbOp(context, paramquery) {
|
||||
|
||||
return await Api.SendReq('/users/dbop', 'POST', paramquery)
|
||||
.then((res) => {
|
||||
return res
|
||||
}).catch((error) => {
|
||||
return false
|
||||
})
|
||||
}
|
||||
|
||||
async function newsletterload(context, paramquery) {
|
||||
|
||||
return await Api.SendReq('/news/load', 'POST', paramquery)
|
||||
@@ -623,15 +653,15 @@ namespace Actions {
|
||||
// dispatch('storeUser', authData);
|
||||
// dispatch('setLogoutTimer', myres.data.expiresIn);
|
||||
|
||||
return tools.OK
|
||||
return { code: tools.OK, msg: '' }
|
||||
} else {
|
||||
return tools.ERR_GENERICO
|
||||
return { code: tools.ERR_GENERICO, msg: '' }
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log('Err', error)
|
||||
UserStore.mutations.setErrorCatch(error)
|
||||
return UserStore.getters.getServerCode
|
||||
return { code: UserStore.getters.getServerCode, msg: UserStore.getters.getMsg }
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -885,7 +915,6 @@ namespace Actions {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
async function refreshUserInfos(){
|
||||
let {token, refresh_token} = JWT.fetch();
|
||||
@@ -913,6 +942,7 @@ namespace Actions {
|
||||
unsubscribe: b.dispatch(unsubscribe),
|
||||
importemail: b.dispatch(importemail),
|
||||
importExtraList: b.dispatch(importExtraList),
|
||||
execDbOp: b.dispatch(execDbOp),
|
||||
newsletterload: b.dispatch(newsletterload),
|
||||
newsletter_setactivate: b.dispatch(newsletter_setactivate),
|
||||
getDashboard: b.dispatch(getDashboard),
|
||||
|
||||
@@ -410,6 +410,7 @@ export const fieldsTable = {
|
||||
// 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: 'date_temp_reg', label_trans: 'reg.date_temp_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' }),
|
||||
@@ -421,12 +422,12 @@ export const fieldsTable = {
|
||||
AddCol({ name: 'verified_email', label_trans: 'reg.verified_email', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'profile.saw_zoom_presentation', field: 'profile', subfield: 'saw_zoom_presentation', label_trans: 'reg.saw_zoom_presentation', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'profile.my_dream', field: 'profile', subfield: 'my_dream', label_trans: 'reg.my_dream' }),
|
||||
AddCol({ name: 'profile.nationality', field: 'profile', subfield: 'nationality', label_trans: 'reg.nationality', fieldtype: tools.FieldType.nationality }),
|
||||
AddCol({ name: 'profile.intcode_cell', field: 'profile', subfield: 'intcode_cell', label_trans: 'reg.intcode_cell', fieldtype: tools.FieldType.intcode }),
|
||||
AddCol({ name: 'profile.nationality', field: 'profile', subfield: 'nationality', label_trans: 'reg.nationality' }),
|
||||
AddCol({ name: 'profile.intcode_cell', field: 'profile', subfield: 'intcode_cell', label_trans: 'reg.intcode_cell' }),
|
||||
AddCol({ name: 'profile.iso2_cell', field: 'profile', subfield: 'iso2_cell', label_trans: 'reg.iso2_cell' }),
|
||||
AddCol({ name: 'profile.cell', field: 'profile', subfield: 'cell', label_trans: 'reg.cell', fieldtype: tools.FieldType.intcode }),
|
||||
AddCol({ name: 'profile.cell', field: 'profile', subfield: 'cell', label_trans: 'reg.cell' }),
|
||||
AddCol({ name: 'profile.email_paypal', field: 'profile', subfield: 'email_paypal', label_trans: 'reg.email_paypal' }),
|
||||
AddCol({ name: 'profile.country_pay', field: 'profile', subfield: 'country_pay', label_trans: 'reg.country_pay', fieldtype: tools.FieldType.nationality }),
|
||||
AddCol({ name: 'profile.country_pay', field: 'profile', subfield: 'country_pay', label_trans: 'reg.country_pay' }),
|
||||
AddCol({ name: 'profile.teleg_id', field: 'profile', subfield: 'teleg_id', label_trans: 'reg.teleg_id' }),
|
||||
AddCol({ name: 'profile.teleg_checkcode', field: 'profile', subfield: 'teleg_checkcode', label_trans: 'reg.teleg_checkcode' }),
|
||||
AddCol({ name: 'profile.manage_telegram', field: 'profile', subfield: 'manage_telegram', label_trans: 'reg.manage_telegram', fieldtype: tools.FieldType.boolean }),
|
||||
|
||||
@@ -10,8 +10,9 @@ export const serv_constants = {
|
||||
RIS_CODE_USER_EXTRALIST_NOTFOUND: -70,
|
||||
RIS_CODE_USERNAME_ALREADY_EXIST: -60,
|
||||
RIS_CODE_EMAIL_ALREADY_EXIST: -50,
|
||||
RIS_CODE_EMAIL_NOT_SENT: -40,
|
||||
RIS_CODE_USER_ALREADY_EXIST: -48,
|
||||
RIS_CODE_EMAIL_NOT_EXIST: -45,
|
||||
RIS_CODE_EMAIL_NOT_SENT: -40,
|
||||
RIS_CODE_ERR_UNAUTHORIZED: -30,
|
||||
|
||||
RIS_CODE_LOGIN_ERR_GENERIC: -20,
|
||||
@@ -21,6 +22,8 @@ export const serv_constants = {
|
||||
RIS_CODE_LOGIN_OK: 1,
|
||||
RIS_CODE__HTTP_FORBIDDEN_INVALID_TOKEN: 403,
|
||||
|
||||
RIS_CODE_TOKEN_RESETPASSWORD_NOT_FOUND: -23,
|
||||
|
||||
RIS_SUBSCRIBED_OK: 1,
|
||||
RIS_SUBSCRIBED_ALREADYEXIST: 2,
|
||||
RIS_SUBSCRIBED_ERR: -1,
|
||||
|
||||
@@ -1480,15 +1480,14 @@ export const tools = {
|
||||
},
|
||||
|
||||
showNegativeNotif(q: any, msg) {
|
||||
tools.showNotif(q, msg, { color: 'negative', icon: 'notifications' })
|
||||
tools.showNotif(q, msg, { color: 'negative', icon: 'notifications' }, 8000)
|
||||
},
|
||||
|
||||
showNeutralNotif(q: any, msg) {
|
||||
tools.showNotif(q, msg, { color: 'info', icon: 'notifications' })
|
||||
},
|
||||
|
||||
showNotif(q: any, msg, data ?: INotify | null
|
||||
) {
|
||||
showNotif(q: any, msg, data ?: INotify | null, time?) {
|
||||
let myicon = data ? data.icon : 'ion-add'
|
||||
if (!myicon) {
|
||||
myicon = 'ion-add'
|
||||
@@ -1502,7 +1501,7 @@ export const tools = {
|
||||
icon: myicon,
|
||||
classes: 'my-notif-class',
|
||||
color: mycolor,
|
||||
timeout: 3000
|
||||
timeout: time || 4000
|
||||
})
|
||||
}
|
||||
,
|
||||
@@ -2621,18 +2620,20 @@ export const tools = {
|
||||
}
|
||||
,
|
||||
|
||||
SignUpcheckErrors(mythis, riscode: number) {
|
||||
SignUpcheckErrors(mythis, riscode: number, msg: string) {
|
||||
console.log('SignUpcheckErrors', riscode)
|
||||
let endload = true
|
||||
|
||||
if (riscode === serv_constants.RIS_CODE_EMAIL_ALREADY_EXIST) {
|
||||
tools.showNotif(mythis.$q, mythis.$t('reg.err.duplicate_email'))
|
||||
} else if (riscode === serv_constants.RIS_CODE_USER_ALREADY_EXIST) {
|
||||
tools.showNegativeNotif(mythis.$q, mythis.$t('reg.err.user_already_exist'))
|
||||
} else if (riscode === serv_constants.RIS_CODE_USER_EXTRALIST_NOTFOUND) {
|
||||
|
||||
tools.showNegativeNotif(mythis.$q, mythis.$t('reg.err.user_extralist_not_found'))
|
||||
tools.showNegativeNotif(mythis.$q, mythis.$t('reg.err.user_extralist_not_found') + ' ' + msg)
|
||||
} else if (riscode === serv_constants.RIS_CODE_USER_NOT_THIS_APORTADOR) {
|
||||
|
||||
tools.showNegativeNotif(mythis.$q, mythis.$t('reg.err.user_not_this_aportador'))
|
||||
tools.showNegativeNotif(mythis.$q, mythis.$t('reg.err.user_not_this_aportador') + ' ' + msg)
|
||||
|
||||
} else if (riscode === serv_constants.RIS_CODE_USERNAME_ALREADY_EXIST) {
|
||||
tools.showNotif(mythis.$q, mythis.$t('reg.err.duplicate_username'))
|
||||
@@ -3016,6 +3017,10 @@ export const tools = {
|
||||
return 'https://www.youtube.com/embed/' + this.getvideourl(index, true)
|
||||
},
|
||||
|
||||
getvideobyidyoutube(key) {
|
||||
return 'https://www.youtube.com/embed/' + key
|
||||
},
|
||||
|
||||
getpath(myvideo) {
|
||||
return 'statics/video/' + func_tools.getLocale() + '/' + myvideo
|
||||
},
|
||||
@@ -3060,27 +3065,41 @@ export const tools = {
|
||||
},
|
||||
|
||||
geticon(langin) {
|
||||
let lang = langin.toUpperCase()
|
||||
if (lang === 'IT')
|
||||
return 'fa-flag-it'
|
||||
else if (lang === 'ES')
|
||||
return 'fa-flag-es'
|
||||
else if (lang === 'US')
|
||||
return 'fa-flag-us'
|
||||
else if ((lang === 'GB') || (lang === 'UK'))
|
||||
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'
|
||||
if (langin === '')
|
||||
return ''
|
||||
try {
|
||||
let lang = langin.toUpperCase()
|
||||
if (lang === 'IT')
|
||||
return 'fa-flag-it'
|
||||
else if (lang === 'ES')
|
||||
return 'fa-flag-es'
|
||||
else if (lang === 'US')
|
||||
return 'fa-flag-us'
|
||||
else if ((lang === 'GB') || (lang === 'UK'))
|
||||
return 'fa-flag-gb'
|
||||
else if (lang === 'DE')
|
||||
return 'fa-flag-de'
|
||||
else if (lang === 'FR')
|
||||
return 'fa-flag-fr'
|
||||
else if (lang === 'SI')
|
||||
return 'fa-flag-si'
|
||||
else if (lang === 'CH')
|
||||
return 'fa-flag-ch'
|
||||
else if (lang === 'CM')
|
||||
return 'fa-flag-cm'
|
||||
else if (lang === 'CO')
|
||||
return 'fa-flag-co'
|
||||
else if (lang === 'PE')
|
||||
return 'fa-flag-pe'
|
||||
else if (lang === 'SM')
|
||||
return 'fa-flag-sm'
|
||||
else if (lang === 'HR')
|
||||
return 'fa-flag-hr'
|
||||
|
||||
return ''
|
||||
return ''
|
||||
}catch (e) {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
|
||||
removespaces(mystr) {
|
||||
@@ -3094,7 +3113,7 @@ export const tools = {
|
||||
|
||||
},
|
||||
|
||||
getNationsByNationality(nat) {
|
||||
getNationsByNationality(nat, code) {
|
||||
if (nat === 'IT') {
|
||||
return 'Italy'
|
||||
} else if (nat === 'SI') {
|
||||
@@ -3103,6 +3122,8 @@ export const tools = {
|
||||
return 'Spain'
|
||||
} else if (nat === 'DE') {
|
||||
return 'Germany'
|
||||
} else if (nat === 'FR') {
|
||||
return 'France'
|
||||
} else if (nat === 'US') {
|
||||
return 'United States'
|
||||
} else if (nat === 'CA') {
|
||||
@@ -3117,10 +3138,16 @@ export const tools = {
|
||||
return 'Hungary'
|
||||
} else if (nat === 'CH') {
|
||||
return 'Switzerland'
|
||||
} else if (nat === 'CM') {
|
||||
return 'Cameroon'
|
||||
} else if (nat === 'CO') {
|
||||
return 'Colombia'
|
||||
} else if (nat === 'PE') {
|
||||
return 'Peru'
|
||||
} else if (nat === 'PL') {
|
||||
return 'Poland'
|
||||
} else if (nat === 'SM') {
|
||||
return 'San Marino'
|
||||
} else if (nat === 'PT') {
|
||||
return 'Portugal'
|
||||
} else if (nat === 'UK') {
|
||||
|
||||
@@ -1,139 +0,0 @@
|
||||
<template>
|
||||
<div class="mypanel">
|
||||
|
||||
<div v-if="!emailinviata">
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-primary text-white"
|
||||
style="text-align: center;">
|
||||
<span class="mybanner">{{ $t('reset.title_update_pwd')}}</span>
|
||||
</q-banner>
|
||||
<br>
|
||||
|
||||
<q-field
|
||||
:error="$v.form.password.$error"
|
||||
:error-label="`${errorMsg('password', $v.form.password)}`"
|
||||
>
|
||||
<q-input
|
||||
v-model="form.password"
|
||||
:before="[{icon: 'vpn_key', handler () {}}]"
|
||||
@blur="$v.form.password.$touch"
|
||||
:error="$v.form.password.$error"
|
||||
:float-label="$t('reg.password')"
|
||||
/>
|
||||
</q-field>
|
||||
|
||||
<q-field
|
||||
:error="$v.form.repeatPassword.$error"
|
||||
:error-label="`${errorMsg('repeatpassword', $v.form.repeatPassword)}`"
|
||||
>
|
||||
<q-input
|
||||
v-model="form.repeatPassword"
|
||||
:before="[{icon: 'vpn_key', handler () {}}]"
|
||||
@blur="$v.form.repeatPassword.$touch"
|
||||
:error="$v.form.repeatPassword.$error"
|
||||
:float-label="$t('reg.repeatPassword')"
|
||||
/>
|
||||
</q-field>
|
||||
|
||||
<div align="center">
|
||||
<q-btn rounded size="lg" color="primary" @click="submit" :disable="$v.$error">
|
||||
{{$t('reset.update_password')}}
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-primary text-white"
|
||||
style="text-align: center;">
|
||||
<span class="mybanner">{{ $t('reset.email_sent')}}</span>
|
||||
</q-banner>
|
||||
<br>
|
||||
|
||||
<div>
|
||||
{{ $t('reset.check_email')}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
|
||||
import { mapActions } from 'vuex'
|
||||
import * as types from '../../store/mutation-types'
|
||||
//import {tools} from '../../store/Modules/user'
|
||||
|
||||
import { serv_constants } from '../../store/Modules/serv_constants'
|
||||
|
||||
import Vue from 'vue'
|
||||
import { required } from "vuelidate/lib/validators"
|
||||
import { UserStore } from "../../store/Modules";
|
||||
import { IUserFields, IUserState } from "../../model"
|
||||
import { tools } from "../../store/Modules/tools";
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
export default class UpdatePassword extends Vue {
|
||||
emailsent = false
|
||||
form = {
|
||||
password: '',
|
||||
repeatPassword: '',
|
||||
tokenforgot: '',
|
||||
}
|
||||
|
||||
created() {
|
||||
// this.load()
|
||||
}
|
||||
get emailinviata() {
|
||||
return this.emailsent
|
||||
}
|
||||
// validations: {
|
||||
// form: {
|
||||
// password: {
|
||||
// required,
|
||||
// },
|
||||
// repeatPassword: {
|
||||
// required,
|
||||
// sameAsPassword: sameAs('password')
|
||||
// },
|
||||
// }
|
||||
// },
|
||||
|
||||
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.resetpwd(this.form)
|
||||
.then((ris) => {
|
||||
this.emailsent = ris.updatepwd
|
||||
this.$q.loading.hide()
|
||||
}).catch(error => {
|
||||
console.log("ERROR = " + error)
|
||||
this.$q.loading.hide()
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.mypanel {
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -1,81 +1,12 @@
|
||||
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'
|
||||
import { CMyDashboard } from '../../../components/CMyDashboard'
|
||||
|
||||
@Component({
|
||||
components: { CProfile, CTitleBanner, CMyFieldDb }
|
||||
components: { CMyDashboard }
|
||||
})
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,104 +1,8 @@
|
||||
<template>
|
||||
<div class="q-ma-xs q-gutter-xs q-pa-xs">
|
||||
<div>
|
||||
<CMyDashboard username="">
|
||||
|
||||
<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>
|
||||
-->
|
||||
</CMyDashboard>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user