- Nella Lavagna, cliccando sul nome dell'invitato, compaiono le sue informazioni sugli step rimasti, in dettaglio.
- Ogni utente puo' cosi scegliere di regalare un proprio invitato, cliccando sull'invitato, scrivendo l'username del destinatario e premendo il bottone 'Regala Invitato'. Al destinatario gli arriverà un messaggio sul Bot Telegram che indica che gli è stato regalato un'invitato.
This commit is contained in:
@@ -24,7 +24,12 @@ export default class CUserBadge extends MixinBase {
|
||||
public $t: any
|
||||
|
||||
public getletter(user) {
|
||||
return user.name[0].toUpperCase()
|
||||
if (!user)
|
||||
return ''
|
||||
if (!!user.name[0])
|
||||
return user.name[0].toUpperCase()
|
||||
else
|
||||
return ''
|
||||
}
|
||||
|
||||
public getnumber(user, index) {
|
||||
@@ -32,11 +37,21 @@ export default class CUserBadge extends MixinBase {
|
||||
}
|
||||
|
||||
public getstatecolor(user) {
|
||||
return (user.profile.teleg_id) ? 'green' : 'gray'
|
||||
if (user.profile)
|
||||
return (user.profile.teleg_id) ? 'green' : 'grey'
|
||||
else
|
||||
return 'grey'
|
||||
}
|
||||
|
||||
public getindorder(user) {
|
||||
if (!!user.ind_order)
|
||||
return ' (' + user.ind_order + ')'
|
||||
else
|
||||
return ''
|
||||
}
|
||||
|
||||
public getmoneycolor(user) {
|
||||
return (user.made_gift) ? 'green' : 'gray'
|
||||
return (user.made_gift) ? 'green' : 'grey'
|
||||
}
|
||||
|
||||
get madegift() {
|
||||
@@ -44,15 +59,37 @@ export default class CUserBadge extends MixinBase {
|
||||
}
|
||||
|
||||
public getzoomcolor(user) {
|
||||
return (user.profile.saw_zoom_presentation) ? 'green' : 'gray'
|
||||
if (user.profile)
|
||||
return (user.profile.saw_zoom_presentation) ? 'green' : 'grey'
|
||||
else
|
||||
return 'grey'
|
||||
}
|
||||
|
||||
public get2peoplecolor() {
|
||||
return (this.getnumpeople() >= 2) ? 'green' : 'gray'
|
||||
public get2peoplecolor(user) {
|
||||
if (this.isextralist(user))
|
||||
return 'grey'
|
||||
else
|
||||
return (this.getnumpeople() >= 2) ? 'green' : 'grey'
|
||||
}
|
||||
|
||||
public isextralist(user) {
|
||||
return !!user.cell_complete
|
||||
}
|
||||
|
||||
public getnumpeople() {
|
||||
return this.numpeople
|
||||
}
|
||||
|
||||
public getusername(user) {
|
||||
if (this.isextralist(user)) {
|
||||
return user.cell_complete
|
||||
} else {
|
||||
return user.username
|
||||
}
|
||||
}
|
||||
|
||||
public execclick(user) {
|
||||
this.$emit('myclick', user)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user