- Aggiunto Step: i 7 Requisiti degli invitati.
- Aggiornata la Lavagna (anche sul BOT). - Zoom solo 3 visibili.
This commit is contained in:
@@ -16,14 +16,11 @@ import { CRequisito } from '../CRequisito'
|
||||
import translate from '../../globalroutines/util'
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { lists } from '../../store/Modules/lists'
|
||||
import { validations } from './CMyDashboard-validate'
|
||||
import { validationMixin } from 'vuelidate'
|
||||
import { shared_consts } from '../../common/shared_vuejs'
|
||||
import { CMyRequirement } from '../CMyRequirement'
|
||||
|
||||
@Component({
|
||||
mixins: [validationMixin],
|
||||
validations,
|
||||
components: { CProfile, CTitleBanner, CMyFieldDb, CCopyBtn, CUserBadge, CLegenda, CRequisito }
|
||||
components: { CProfile, CTitleBanner, CMyFieldDb, CCopyBtn, CUserBadge, CLegenda, CRequisito, CMyRequirement }
|
||||
})
|
||||
|
||||
export default class CMyDashboard extends MixinUsers {
|
||||
@@ -45,122 +42,6 @@ export default class CMyDashboard extends MixinUsers {
|
||||
|
||||
@Prop({ required: true }) public username
|
||||
|
||||
|
||||
public arrrequisiti = [
|
||||
{
|
||||
icon: 'email',
|
||||
textlang: 'reg.verified_email',
|
||||
textadd(user) {
|
||||
return ''
|
||||
},
|
||||
isok(user) {
|
||||
if (user)
|
||||
return user.verified_email
|
||||
else
|
||||
return false
|
||||
},
|
||||
info: '',
|
||||
},
|
||||
{
|
||||
icon: 'fab fa-telegram',
|
||||
textlang: 'reg.telegram',
|
||||
textadd(user) {
|
||||
return ''
|
||||
},
|
||||
isok(user) {
|
||||
if (user)
|
||||
if (user.profile)
|
||||
return user.profile.teleg_id > 0
|
||||
|
||||
return false
|
||||
},
|
||||
info: '',
|
||||
},
|
||||
{
|
||||
icon: 'fas fa-file-signature',
|
||||
textlang: 'steps.linee_guida',
|
||||
textadd(user) {
|
||||
return ''
|
||||
},
|
||||
isok(user) {
|
||||
if (user)
|
||||
if (user.profile)
|
||||
return tools.isBitActive(user.profile.saw_and_accepted, shared_consts.Accepted.CHECK_READ_GUIDELINES)
|
||||
return false
|
||||
},
|
||||
info: '',
|
||||
},
|
||||
{
|
||||
icon: 'fas fa-tv',
|
||||
textlang: 'steps.video_intro',
|
||||
textadd(user) {
|
||||
return ''
|
||||
},
|
||||
isok(user) {
|
||||
if (user)
|
||||
if (user.profile)
|
||||
return tools.isBitActive(user.profile.saw_and_accepted, shared_consts.Accepted.CHECK_SEE_VIDEO_PRINCIPI)
|
||||
return false
|
||||
},
|
||||
info: '',
|
||||
},
|
||||
{
|
||||
icon: 'fas fa-heart',
|
||||
textlang: 'steps.dream',
|
||||
textadd(user) {
|
||||
return ''
|
||||
},
|
||||
isok(user) {
|
||||
if (user)
|
||||
if (user.profile.my_dream)
|
||||
return user.profile.my_dream.length > 20
|
||||
else
|
||||
return false
|
||||
},
|
||||
info: '',
|
||||
},
|
||||
{
|
||||
icon: 'far fa-credit-card',
|
||||
textlang: 'steps.paymenttype',
|
||||
textadd(user) {
|
||||
return ''
|
||||
},
|
||||
isok(user) {
|
||||
let ispaypal = false
|
||||
if (user) {
|
||||
if (!!user.profile.paymenttypes) {
|
||||
if (user.profile.paymenttypes.includes('paypal')) {
|
||||
if (user.profile.email_paypal) {
|
||||
ispaypal = true
|
||||
}
|
||||
}
|
||||
if (!!user.profile)
|
||||
if (!!user.profile.paymenttypes) {
|
||||
const ris = (user.profile.paymenttypes.length >= 2) && ispaypal
|
||||
return ris
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return false
|
||||
},
|
||||
info: '',
|
||||
},
|
||||
{
|
||||
icon: 'fas fa-users',
|
||||
textlang: 'dashboard.numinvitati',
|
||||
textadd(user) {
|
||||
return ' (' + user.numinvitatiattivi + ' / ' + user.numinvitati + ')'
|
||||
},
|
||||
isok(user) {
|
||||
if (user) {
|
||||
return user.numinvitatiattivi >= 2
|
||||
}
|
||||
},
|
||||
info: '',
|
||||
},
|
||||
]
|
||||
|
||||
@Watch('UserStore.state.my.dashboard')
|
||||
public changedash() {
|
||||
console.log('changedash')
|
||||
@@ -209,85 +90,4 @@ export default class CMyDashboard extends MixinUsers {
|
||||
this.seluser = user
|
||||
}
|
||||
|
||||
public isextralist(user) {
|
||||
return !!user.cell_complete
|
||||
}
|
||||
|
||||
public ismyinvited_notreg(user) {
|
||||
return this.dashboard.downnotreg.find((rec) => rec.ind_order === user.ind_order)
|
||||
}
|
||||
|
||||
public ismydownline(user) {
|
||||
return this.dashboard.downline.find((rec) => rec.username === user.username)
|
||||
}
|
||||
|
||||
public async deleteUserFromExtraList(user) {
|
||||
|
||||
await tools.askConfirm(this.$q, translate('reg.cancella_invitato'), translate('reg.cancella_invitato') + ' ' + user.name + ' ' + user.surname + '?', translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.DELETE_EXTRALIST, 0, {
|
||||
param1: user,
|
||||
param2: true
|
||||
})
|
||||
}
|
||||
|
||||
public async deleteUserFromUsersList(user) {
|
||||
|
||||
await tools.askConfirm(this.$q, translate('reg.cancella_invitato'), translate('reg.cancella_invitato') + ' ' + user.name + ' ' + user.surname + '?', translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.DELETE_USERLIST, 0, {
|
||||
param1: user,
|
||||
param2: true
|
||||
})
|
||||
}
|
||||
|
||||
public async RegalaInvitato(user, aportador_solidario, notifBottxt) {
|
||||
let notiftxt = ''
|
||||
if (this.notifBot)
|
||||
notiftxt = notifBottxt
|
||||
|
||||
await tools.askConfirm(this.$q, translate('reg.regala_invitato'), translate('reg.regala_invitato') + ' ' + user.name + ' ' + user.surname + ' a ' + aportador_solidario + ' ?', translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.REGALA_INVITATO, 0, {
|
||||
param1: user,
|
||||
param2: aportador_solidario,
|
||||
param3: notiftxt
|
||||
})
|
||||
}
|
||||
|
||||
public errorMsg(cosa: string, item: any) {
|
||||
try {
|
||||
if (!item.$error) {
|
||||
return ''
|
||||
}
|
||||
|
||||
if (item.required !== undefined) {
|
||||
if (!item.required) {
|
||||
return this.$t('reg.err.required')
|
||||
}
|
||||
|
||||
} else if (cosa === 'aportador_solidario') {
|
||||
// console.log(item);
|
||||
if (!item.aportadorexist) {
|
||||
// console.log('!item.aportadorexist !')
|
||||
return this.$t('reg.err.aportador_regalare_not_exist')
|
||||
}
|
||||
}
|
||||
|
||||
return ''
|
||||
} catch (error) {
|
||||
// console.log("ERR : " + error);
|
||||
}
|
||||
}
|
||||
|
||||
get allowSubmit() {
|
||||
let error = this.$v.$error || this.$v.$invalid
|
||||
|
||||
error = error || (this.aportador_solidario === this.seluser.aportador_solidario)
|
||||
|
||||
return !error
|
||||
|
||||
}
|
||||
|
||||
get getnotifBotTxt() {
|
||||
return this.$t('dashboard.ricevuto_dono', {
|
||||
invitato: this.seluser.name + ' ' + this.seluser.surname,
|
||||
mittente: this.dashboard.myself.username
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user