- 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.
62 lines
1.3 KiB
TypeScript
62 lines
1.3 KiB
TypeScript
import Vue from 'vue'
|
|
|
|
import Component from 'vue-class-component'
|
|
import { CalendarStore } from '../store/Modules'
|
|
import { UserStore } from '@modules'
|
|
import MixinMetaTags from './mixin-metatags'
|
|
import { CImgText, CTitle, CCardOperator } from '@components'
|
|
import { tools } from '@src/store/Modules/tools'
|
|
|
|
@Component({
|
|
components: { CImgText, CTitle, CCardOperator }
|
|
})
|
|
|
|
export default class MixinOperator extends MixinMetaTags {
|
|
public $q
|
|
public $t: any
|
|
|
|
get mythis() {
|
|
return this
|
|
}
|
|
|
|
set mythis(my) {
|
|
//
|
|
}
|
|
|
|
get tools() {
|
|
return tools
|
|
}
|
|
|
|
get isEstate(){
|
|
const now = new Date()
|
|
return (now.getMonth() === 5) || (now.getMonth() === 6) || (now.getMonth() === 7) || (now.getMonth() === 8)
|
|
}
|
|
|
|
get isEstateRiprenderanno(){
|
|
const now = new Date()
|
|
return (now.getMonth() === 9)
|
|
}
|
|
|
|
public getOperators() {
|
|
return CalendarStore.state.operators
|
|
}
|
|
|
|
public getOperatorByUsername(username) {
|
|
return CalendarStore.getters.getOperatorByUsername(username)
|
|
}
|
|
|
|
public getImgTeacherByUsername(username) {
|
|
return `statics/images/` + CalendarStore.getters.getImgTeacherByUsername(username)
|
|
}
|
|
|
|
public getTeacherByUsername(username) {
|
|
const op = this.getOperatorByUsername(username)
|
|
if (!!op) {
|
|
return op.name + ' ' + op.surname
|
|
} else {
|
|
return ''
|
|
}
|
|
}
|
|
|
|
}
|