- 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:
Paolo Arena
2020-02-02 04:07:24 +01:00
parent 4b54a9ce52
commit 20cd0f2e52
56 changed files with 881 additions and 132 deletions

View File

@@ -1,5 +1,15 @@
export const shared_consts = { export const shared_consts = {
FILTER_EXTRALIST_NOT_REGISTERED: 1,
FILTER_EXTRALIST_NOT_CONTACTED: 2,
FILTER_EXTRALIST_WITH_NOTE: 4,
FILTER_USER_NO_ZOOM: 8,
FILTER_USER_NO_INVITANTE: 16,
FILTER_USER_NO_TELEGRAM_ID: 32,
FILTER_USER_CODICE_AUTH_TELEGRAM: 64,
FILTER_USER_NO_EMAIL_VERIFICATA: 128,
FILTER_USER_NO_DREAM: 256,
Permissions: { Permissions: {
Admin: { Admin: {
value: 1, value: 1,

View File

@@ -16,7 +16,7 @@ import { CalendarStore } from '../../store/Modules'
components: { CMyTeacher } components: { CMyTeacher }
}) })
export default class CCardDiscipline extends Vue { export default class CCardDiscipline extends MixinBase {
@Prop({ required: true }) public discipline: IDiscipline @Prop({ required: true }) public discipline: IDiscipline
@Prop({ required: false, default: '' }) public mystyle: string @Prop({ required: false, default: '' }) public mystyle: string
@Prop({ required: false, default: false }) public autoplay: boolean @Prop({ required: false, default: false }) public autoplay: boolean

View File

@@ -1,14 +1,16 @@
<template> <template>
<div class="q-ma-sm column cursor-pointer" @click="copytoclip"> <div class="q-ma-sm">
<q-field outlined bottom-slots :label="title" stack-label class="text-center"> <div class="column cursor-pointer" @click="copytoclip">
<template v-slot:prepend v-if="!tools.isMobile()"> <q-field outlined :label="title" stack-label class="text-center cursor-pointer">
<q-btn round dense flat icon="far fa-copy" /> <template v-slot:prepend v-if="!tools.isMobile()">
</template> <q-btn round dense flat icon="far fa-copy"/>
</template>
<template v-slot:control> <template v-slot:control>
<div class="self-center full-width no-outline text-center wrapword text-h5" tabindex="0">{{texttocopy}}</div> <div class="self-center full-width no-outline text-center wrapword text-h5" tabindex="0">{{texttocopy}}</div>
</template> </template>
</q-field> </q-field>
</div>
</div> </div>
</template> </template>

View File

@@ -129,6 +129,14 @@ export default class CEventsCalendar extends MixinEvents {
public draggedEvent = null public draggedEvent = null
public ignoreNextSwipe = false public ignoreNextSwipe = false
get mythis() {
return this
}
set mythis(aa) {
}
public resources = [ public resources = [
{ {
label: 'John' label: 'John'

View File

@@ -80,7 +80,7 @@
</div> </div>
<div v-if="myevent.dateTimeStart" class="cal__when"> <div v-if="myevent.dateTimeStart" class="cal__when">
<span class="cal__where-title">{{$t('cal.when')}}: <span class="cal__where-title">{{$t('cal.when')}}:
<span v-html="tools.getstrDateTimeEvent(mythis(), myevent, true)"></span> <span v-html="tools.getstrDateTimeEvent(mythis, myevent, true)"></span>
</span> </span>
</div> </div>
<p v-if="myevent.linkpdf" style="margin-top: 10px; text-align: center"> <p v-if="myevent.linkpdf" style="margin-top: 10px; text-align: center">
@@ -295,7 +295,7 @@
</q-chip> </q-chip>
<div v-if="myevent.dateTimeStart" class="cal__when"> <div v-if="myevent.dateTimeStart" class="cal__when">
<span class="cal__where-title">{{$t('cal.when')}}: <span class="cal__where-title">{{$t('cal.when')}}:
<span v-html="tools.getstrDateTimeEvent(mythis(), myevent, true)"></span> <span v-html="tools.getstrDateTimeEvent(mythis, myevent, true)"></span>
</span> </span>
</div> </div>
<div class="q-pa-xs"> <div class="q-pa-xs">
@@ -339,7 +339,7 @@
<q-card-actions align="right"> <q-card-actions align="right">
<q-btn v-if="bookEventpage.state === EState.Modifying" flat :label="$t('cal.cancelbooking')" <q-btn v-if="bookEventpage.state === EState.Modifying" flat :label="$t('cal.cancelbooking')"
color="negative" color="negative"
@click="tools.CancelBookingEvent(mythis(), myevent, bookEventForm._id, true)"></q-btn> @click="tools.CancelBookingEvent(mythis, myevent, bookEventForm._id, true)"></q-btn>
<q-btn v-if="checkseinviaMsg" flat :label="$t('dialog.sendonlymsg')" color="primary" <q-btn v-if="checkseinviaMsg" flat :label="$t('dialog.sendonlymsg')" color="primary"
@click="sendMsg(myevent)"></q-btn> @click="sendMsg(myevent)"></q-btn>
<q-btn v-else flat :label="getTitleBtnBooking" color="primary" @click="saveBookEvent(myevent)" <q-btn v-else flat :label="getTitleBtnBooking" color="primary" @click="saveBookEvent(myevent)"
@@ -376,7 +376,7 @@
</q-chip> </q-chip>
<div v-if="myevent.dateTimeStart" class="cal__when"> <div v-if="myevent.dateTimeStart" class="cal__when">
<span class="cal__where-title">{{$t('cal.when')}}: <span class="cal__where-title">{{$t('cal.when')}}:
<span v-html="tools.getstrDateTimeEvent(mythis(), myevent, true)"></span> <span v-html="tools.getstrDateTimeEvent(mythis, myevent, true)"></span>
</span> </span>
</div> </div>
<div class="q-pa-xs"> <div class="q-pa-xs">
@@ -631,7 +631,7 @@
</div> </div>
<div class="listaev__date listaev__align_center_mobile"> <div class="listaev__date listaev__align_center_mobile">
<span v-html="tools.getstrDateTimeEvent(mythis(), event, true)"></span> <span v-html="tools.getstrDateTimeEvent(mythis, event, true)"></span>
</div> </div>
<div class="listaev__align_center_mobile"> <div class="listaev__align_center_mobile">

View File

@@ -18,14 +18,31 @@ export default class CGallery extends MixinBase {
@Prop({ required: true }) public edit: boolean @Prop({ required: true }) public edit: boolean
@Prop({ required: true }) public gall: IGallery @Prop({ required: true }) public gall: IGallery
@Prop({ required: true }) public listimages: IImgGallery[] @Prop({ required: true }) public listimages: IImgGallery[]
public mygall: IGallery = {}
public mylistimages: IImgGallery[] = []
@Watch('gall')
public gallchanged() {
this.mygall = this.gall
}
@Watch('listimages')
public listimageschanged() {
this.mylistimages = this.listimages
}
public created() {
this.mygall = this.gall
this.mylistimages = this.listimages
}
get tools() { get tools() {
return tools return tools
} }
get getlistimages() { get getlistimages() {
if (this.listimages) if (this.mylistimages)
return this.listimages.sort((a, b) => a.order - b.order) return this.mylistimages.slice().sort((a, b) => a.order - b.order)
else else
return null return null
} }
@@ -77,13 +94,13 @@ export default class CGallery extends MixinBase {
return return
} }
const myindex = this.listimages.findIndex((rec) => rec._id === draggedId) const myindex = this.mylistimages.findIndex((rec) => rec._id === draggedId)
const myrec: IImgGallery = this.listimages[myindex] const myrec: IImgGallery = this.mylistimages[myindex]
let myrecprec: IImgGallery = null let myrecprec: IImgGallery = null
let myrecout: IImgGallery = null let myrecout: IImgGallery = null
const myindexout = this.listimages.findIndex((rec) => rec._id === dragout) const myindexout = this.mylistimages.findIndex((rec) => rec._id === dragout)
myrecout = this.listimages[myindexout] myrecout = this.mylistimages[myindexout]
let myindexprec = myindexout - 1 let myindexprec = myindexout - 1
if (myindexprec < 0) if (myindexprec < 0)
@@ -135,7 +152,7 @@ export default class CGallery extends MixinBase {
get getlastord() { get getlastord() {
let myord = 0 let myord = 0
for (const file of this.listimages) { for (const file of this.mylistimages) {
if (file.order > myord) if (file.order > myord)
myord = file.order myord = file.order
} }
@@ -146,29 +163,29 @@ export default class CGallery extends MixinBase {
public uploaded(info) { public uploaded(info) {
console.log(info) console.log(info)
for (const file of info.files) { for (const file of info.files) {
this.listimages.push({ imagefile: file.name, order: this.getlastord }) this.mylistimages.push({ imagefile: file.name, order: this.getlastord })
} }
this.save() this.save()
} }
public deleted(rec) { public deleted(rec) {
console.table(this.listimages) // console.table(this.mylistimages)
const index = this.listimages.findIndex((elem) => elem.imagefile === rec.imagefile) const index = this.mylistimages.findIndex((elem) => elem.imagefile === rec.imagefile)
if (index > -1) { if (index > -1) {
this.listimages.splice(index, 1) this.mylistimages.splice(index, 1)
} }
// this.listimages = this.listimages.pop((elem) => elem.imagefile !== rec.imagefile) // this.mylistimages = this.mylistimages.pop((elem) => elem.imagefile !== rec.imagefile)
console.table(this.listimages) // console.table(this.mylistimages)
this.save() this.save()
} }
public getfullname(rec) { public getfullname(rec) {
return 'statics/upload/' + this.gall.directory + `/` + rec.imagefile return 'statics/upload/' + this.mygall.directory + `/` + rec.imagefile
} }
public copytoclipboard(rec) { public copytoclipboard(rec) {
@@ -187,7 +204,7 @@ export default class CGallery extends MixinBase {
} }
public save() { public save() {
this.$emit('showandsave', this.listimages) this.$emit('showandsave', this.mylistimages)
} }
public getsrcimg(mygallery) { public getsrcimg(mygallery) {
@@ -195,7 +212,7 @@ export default class CGallery extends MixinBase {
if (tools.getextfile(mygallery.imagefile) === 'pdf') if (tools.getextfile(mygallery.imagefile) === 'pdf')
return 'statics/images/images/pdf.jpg' return 'statics/images/images/pdf.jpg'
else else
return 'statics/upload/' + this.gall.directory + `/` + mygallery.imagefile return 'statics/upload/' + this.mygall.directory + `/` + mygallery.imagefile
} }
} }

View File

@@ -1,11 +1,11 @@
import Vue from 'vue' import Vue from 'vue'
import { Component, Prop } from 'vue-property-decorator' import { Component, Prop, Watch } from 'vue-property-decorator'
import { GlobalStore, UserStore } from '../../store/Modules/index' import { GlobalStore, UserStore } from '../../store/Modules/index'
import { tools } from '../../store/Modules/tools' import { tools } from '../../store/Modules/tools'
import { shared_consts } from '../../common/shared_vuejs' import { shared_consts } from '../../common/shared_vuejs'
import { ICategory, IColGridTable, ITableRec } from '../../model' import { ICategory, IColGridTable, IFilter, ITableRec } from '../../model'
import { CTodo } from '../todos/CTodo' import { CTodo } from '../todos/CTodo'
import { SingleProject } from '../projects/SingleProject' import { SingleProject } from '../projects/SingleProject'
import { lists } from '../../store/Modules/lists' import { lists } from '../../store/Modules/lists'
@@ -26,6 +26,7 @@ export default class CGridTableRec extends Vue {
@Prop({ required: false, default: '' }) public nodataLabel: string @Prop({ required: false, default: '' }) public nodataLabel: string
@Prop({ required: false, default: '' }) public noresultLabel: string @Prop({ required: false, default: '' }) public noresultLabel: string
@Prop({ required: false, default: null }) public tablesList: ITableRec[] @Prop({ required: false, default: null }) public tablesList: ITableRec[]
@Prop({ required: false, default: null }) public arrfilters: IFilter[]
public mytable: string public mytable: string
public mytitle: string public mytitle: string
@@ -55,6 +56,7 @@ export default class CGridTableRec extends Vue {
public separator: 'horizontal' public separator: 'horizontal'
public myfilter = undefined public myfilter = undefined
public myfilterand = []
public rowsel: any public rowsel: any
public dark: boolean = true public dark: boolean = true
public canEdit: boolean = false public canEdit: boolean = false
@@ -190,6 +192,7 @@ export default class CGridTableRec extends Vue {
// console.log('onRequest', 'myfilter = ', this.myfilter) // console.log('onRequest', 'myfilter = ', this.myfilter)
const { page, rowsPerPage, rowsNumber, sortBy, descending } = props.pagination const { page, rowsPerPage, rowsNumber, sortBy, descending } = props.pagination
const myfilter = this.myfilter const myfilter = this.myfilter
const myfilterand = this.myfilterand
if (!this.mytable) if (!this.mytable)
return return
@@ -212,7 +215,7 @@ export default class CGridTableRec extends Vue {
this.serverData = [] this.serverData = []
// fetch data from "server" // fetch data from "server"
this.fetchFromServer(startRow, endRow, myfilter, sortBy, descending).then((ris) => { this.fetchFromServer(startRow, endRow, myfilter, myfilterand, sortBy, descending).then((ris) => {
this.pagination.rowsNumber = this.getRowsNumberCount(myfilter) this.pagination.rowsNumber = this.getRowsNumberCount(myfilter)
@@ -244,7 +247,7 @@ export default class CGridTableRec extends Vue {
// emulate ajax call // emulate ajax call
// SELECT * FROM ... WHERE...LIMIT... // SELECT * FROM ... WHERE...LIMIT...
public async fetchFromServer(startRow, endRow, myfilter, sortBy, descending) { public async fetchFromServer(startRow, endRow, myfilter, myfilterand, sortBy, descending) {
let myobj = null let myobj = null
if (sortBy) { if (sortBy) {
@@ -260,6 +263,7 @@ export default class CGridTableRec extends Vue {
startRow, startRow,
endRow, endRow,
filter: myfilter, filter: myfilter,
filterand: myfilterand,
sortBy: myobj, sortBy: myobj,
descending descending
} }
@@ -565,4 +569,9 @@ export default class CGridTableRec extends Vue {
return '' return ''
} }
} }
@Watch('myfilterand')
public changemyfilterand() {
this.refresh()
}
} }

View File

@@ -24,6 +24,7 @@
> >
<template v-slot:header="props"> <template v-slot:header="props">
<q-tr :props="props"> <q-tr :props="props">
<q-th> <q-th>
@@ -99,6 +100,11 @@
<q-spinner-tail size="2em" color="primary"/> <q-spinner-tail size="2em" color="primary"/>
</q-inner-loading> </q-inner-loading>
<div class="row">
<q-toggle v-for="(filter, index) of arrfilters" :key="index" v-model="myfilterand" :val="filter.value" :label="filter.label"></q-toggle>
</div>
</template> </template>
<template v-slot:body="props"> <template v-slot:body="props">

View File

View File

@@ -0,0 +1,15 @@
import Vue from 'vue'
import { Component, Prop, Watch } from 'vue-property-decorator'
import { tools } from '../../store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import MixinBase from '@src/mixins/mixin-base'
@Component({
})
export default class CLegenda extends MixinBase {
@Prop({ required: true }) public icon: string
@Prop({ required: true }) public text: string
}

View File

@@ -0,0 +1,15 @@
<template>
<div>
<div class="row q-ml-sm q-pa-xs items-center">
<q-icon size="sm" :name="icon" color="green"></q-icon>
<q-chip dense color="blue" text-color="white" class="q-ml-md">{{text}}</q-chip>
</div>
</div>
</template>
<script lang="ts" src="./CLegenda.ts">
</script>
<style lang="scss" scoped>
@import './CLegenda.scss';
</style>

View File

@@ -0,0 +1 @@
export {default as CLegenda} from './CLegenda.vue'

View File

@@ -25,6 +25,10 @@ export default class CLineChart extends Vue {
return this return this
} }
set mythis(my) {
//
}
public mounted() { public mounted() {
this.mydatafixed = {} this.mydatafixed = {}

View File

@@ -0,0 +1,12 @@
import { ISignupOptions } from 'model'
import { email, minLength, required, sameAs } from 'vuelidate/lib/validators'
// import { ValidationRuleset } from 'vuelidate'
import { complexity, registeredemail, registereduser, aportadorexist } from '../../validation'
export const validations = {
aportador_solidario: {
aportadorexist,
required
}
}

View File

@@ -9,19 +9,110 @@ import { CTitleBanner } from '../CTitleBanner'
import { CMyFieldDb } from '../CMyFieldDb' import { CMyFieldDb } from '../CMyFieldDb'
import { CCopyBtn } from '../CCopyBtn' import { CCopyBtn } from '../CCopyBtn'
import { CUserBadge } from '../CUserBadge' import { CUserBadge } from '../CUserBadge'
import { CLegenda } from '../CLegenda'
import { IDashboard, IUserProfile } from '../../model'
import { IUserFields } from '../../model/UserStore'
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'
@Component({ @Component({
components: { CProfile, CTitleBanner, CMyFieldDb, CCopyBtn, CUserBadge } mixins: [validationMixin],
validations,
components: { CProfile, CTitleBanner, CMyFieldDb, CCopyBtn, CUserBadge, CLegenda, CRequisito }
}) })
export default class CMyDashboard extends MixinUsers { export default class CMyDashboard extends MixinUsers {
@Prop({ required: true }) public username
public $v public $v
public $q public $q
public dashboard = { aportador: DefaultUser, numpeople_aportador: 0, downline: [], downbyuser: [] } public myusername: string = ''
public showuserinfo: boolean = false
public notifBot: boolean = true
public seluser: IUserFields = null
public aportador_solidario: string = ''
public dashboard: IDashboard = {
myself: DefaultUser,
aportador: DefaultUser,
numpeople_aportador: 0,
downline: [],
downnotreg: [],
downbyuser: []
}
public mythis() { @Prop({ required: true }) public username
public arrrequisiti = [
{
icon: 'email',
textlang: 'reg.verified_email',
isok(user) {
if (user)
return user.verified_email
else
return false
},
info: '',
},
{
icon: 'fab fa-telegram',
textlang: 'reg.telegram',
isok(user) {
if (user)
if (user.profile)
return user.profile.teleg_id > 0
return false
},
info: '',
},
{
icon: 'fas fa-video',
textlang: 'steps.zoom_partecipa',
isok(user) {
if (user)
if (user.profile)
return user.profile.saw_zoom_presentation
return false
},
info: '',
},
{
icon: 'fas fa-heart',
textlang: 'steps.dream',
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',
isok(user) {
if (user)
if (user.profile.paymenttypes)
return user.profile.paymenttypes.length > 20
else
return false
},
info: '',
},
]
@Watch('UserStore.state.my.dashboard')
public changedash() {
console.log('changedash')
this.dashboard = UserStore.state.my.dashboard
}
get mythis() {
return this return this
} }
@@ -34,40 +125,106 @@ export default class CMyDashboard extends MixinUsers {
this.update_username() this.update_username()
} }
public update_username() {
public async update_username() {
// console.log('update_username')
if (this.username === '') if (this.username === '')
this.username = this.getMyUsername() this.myusername = this.getMyUsername()
else
this.myusername = this.username
UserStore.actions.getDashboard({ username: this.username }).then((ris) => { await UserStore.actions.getDashboard({ username: this.myusername }).then((ris) => {
// console.log('getDashboard', ris) this.dashboard = UserStore.state.my.dashboard
if (ris.aportador === undefined) {
this.dashboard.aportador = DefaultUser
} else {
this.dashboard.aportador = ris.aportador
}
if (ris.numpeople_aportador === undefined) {
this.dashboard.numpeople_aportador = 0
} else {
this.dashboard.numpeople_aportador = ris.numpeople_aportador
}
if (ris.downline === undefined) {
this.dashboard.downline = []
} else {
this.dashboard.downline = ris.downline
}
if (ris.downbyuser === undefined) {
this.dashboard.downbyuser = []
} else {
this.dashboard.downbyuser = ris.downbyuser
}
// console.log('this.dashboard', this.dashboard)
}) })
} }
get getRefLink() { get getRefLink() {
return UserStore.getters.getRefLink(this.username) return UserStore.getters.getRefLink(this.myusername)
}
get invitatinotreg() {
if (this.dashboard)
if (this.dashboard.downnotreg)
return this.dashboard.downnotreg.length > 0
return false
}
public selectclick(user) {
this.showuserinfo = true
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 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
})
} }
} }

View File

@@ -1,18 +1,16 @@
<template> <template>
<div class="q-ma-xs q-gutter-xs q-pa-xs" v-if="username !== ''"> <div class="q-ma-xs q-gutter-xs q-pa-xs" v-if="myusername !== ''">
<CTitleBanner class="q-pa-xs" :title="$t('pages.dashboard') +` (`+ username + `)`" bgcolor="bg-info" clcolor="text-white" <CTitleBanner class="q-pa-xs" :title="$t('pages.dashboard')" bgcolor="bg-info" clcolor="text-white"
mystyle=" " myclass="myshad"> mystyle=" " myclass="myshad">
<CCopyBtn :title="$t('reg.reflink')" :texttocopy="getRefLink">
</CCopyBtn>
<CTitleBanner class="shadow-2" :title="$t('reg.aportador_solidario')" bgcolor="bg-accent" <CTitleBanner class="shadow-2" :title="$t('reg.aportador_solidario')" bgcolor="bg-accent"
clcolor="text-white" clcolor="text-white"
mystyle=" " myclass="myshad" :canopen="true"> mystyle=" " myclass="myshad" :canopen="true">
<CUserBadge v-if="!!dashboard.aportador.name" :user="dashboard.aportador" :index="0" :numpeople="dashboard.numpeople_aportador" <CUserBadge v-if="!!dashboard.aportador" :user="dashboard.aportador" :index="0"
mycolor="accent"> :numpeople="dashboard.numpeople_aportador"
mycolor="accent" @myclick="selectclick">
</CUserBadge> </CUserBadge>
<div v-else class="q-pa-sm text-center"> <div v-else class="q-pa-sm text-center">
@@ -20,17 +18,35 @@
</div> </div>
</CTitleBanner> </CTitleBanner>
<CTitleBanner class="shadow-2" :title="$t('reg.you')" bgcolor="bg-blue"
clcolor="text-white"
mystyle=" " myclass="myshad" :canopen="true">
<CUserBadge v-if="!!dashboard.myself" :user="dashboard.myself" :index="0"
:numpeople="dashboard.downline.length"
@myclick="selectclick"
mycolor="blue">
</CUserBadge>
</CTitleBanner>
<CTitleBanner class="shadow-2 rounded-borders" :title="$t('dashboard.downline')" bgcolor="bg-positive" <CTitleBanner class="shadow-2 rounded-borders" :title="$t('dashboard.downline')" bgcolor="bg-positive"
clcolor="text-white" clcolor="text-white"
mystyle=" " myclass="myshad" :canopen="true"> mystyle=" " myclass="myshad" :canopen="true">
<q-list bordered v-if="!!dashboard.downline && dashboard.downline.length > 0" class="rounded-borders"> <q-list bordered v-if="!!dashboard.downline && dashboard.downline.length > 0" class="rounded-borders">
<div v-for="(user, index) in dashboard.downline" :key="index"> <div v-for="(user, index) in dashboard.downline" :key="index">
<CUserBadge :yourinvite="true" :user="user" mycolor="primary" :index="index" :numpeople="dashboard.downbyuser[user.username].length"> <CUserBadge :yourinvite="true" :user="user" mycolor="positive" :index="index"
:numpeople="dashboard.downbyuser[user.username].length"
@myclick="selectclick"
>
</CUserBadge> </CUserBadge>
<div style="margin-left:10px;" v-for="(user2, index2) in dashboard.downbyuser[user.username]" :key="index2"> <div style="margin-left:10px;" v-for="(user2, index2) in dashboard.downbyuser[user.username]" :key="index2">
<CUserBadge :yourinvite="false" :user="user2" mycolor="orange" :index="index2" :numpeople="dashboard.downbyuser[user2.username].length"> <CUserBadge :yourinvite="false" :user="user2" mycolor="orange" :index="index2"
:numpeople="dashboard.downbyuser[user2.username].length"
@myclick="selectclick"
>
</CUserBadge> </CUserBadge>
</div> </div>
@@ -41,6 +57,21 @@
</div> </div>
</CTitleBanner> </CTitleBanner>
<CTitleBanner v-if="invitatinotreg" class="shadow-2 rounded-borders" :title="$t('dashboard.downnotreg')"
bgcolor="bg-grey"
clcolor="text-white"
mystyle=" " myclass="myshad" :canopen="true">
<q-list bordered v-if="!!dashboard.downnotreg" class="rounded-borders">
<div v-for="(user, index) in dashboard.downnotreg" :key="index">
<CUserBadge :yourinvite="true" :user="user" mycolor="grey" :index="index" :numpeople="user.num_invitati"
@myclick="selectclick">
</CUserBadge>
</div>
</q-list>
</CTitleBanner>
</CTitleBanner> </CTitleBanner>
<!-- <!--
@@ -60,6 +91,103 @@
</div> </div>
</CTitleBanner> </CTitleBanner>
--> -->
<CCopyBtn :title="$t('reg.reflink')" :texttocopy="getRefLink">
</CCopyBtn>
<CTitleBanner class="shadow-2 rounded-borders" :title="$t('reg.legenda')"
bgcolor="bg-primary"
clcolor="text-white"
mystyle=" " myclass="myshad" :canopen="true">
<q-list bordered class="rounded-borders row justify-between">
<CLegenda icon="fab fa-telegram" :text="`Telegram ` + $t('pages.statusreg.verified')"></CLegenda>
<CLegenda icon="fas fa-video" :text="$t('pages.statusreg.seezoom')"></CLegenda>
<CLegenda icon="fas fa-user-friends" :text="$t('dashboard.numinvitati')"></CLegenda>
<CLegenda icon="fab fa-whatsapp" :text="$t('dashboard.telefono_wa')"></CLegenda>
</q-list>
</CTitleBanner>
<br>
<q-dialog v-model="showuserinfo">
<q-card v-if="seluser" :style="`min-width: `+ tools.myheight_dialog() + `px;`">
<q-toolbar class="bg-primary text-white">
<q-toolbar-title>
Info:
</q-toolbar-title>
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
</q-toolbar>
<q-card-section class="inset-shadow">
<CTitleBanner class="shadow-2 rounded-borders" :title="seluser.name + ` ` + seluser.surname"
bgcolor="bg-primary"
clcolor="text-white"
mystyle=" " myclass="myshad" :canopen="true">
<div v-if="!ismyinvited_notreg(seluser)" class="text-center">
<div v-if="!isextralist(seluser)">
<div v-for="req of arrrequisiti">
<CRequisito :icon="req.icon" :text="$t(req.textlang)" :isok="req.isok(seluser)"
:info="req.info"></CRequisito>
</div>
</div>
<div v-if="ismydownline(seluser)">
<CTitleBanner class="shadow-2 rounded-borders" :title="$t('reg.regala_invitato')"
bgcolor="bg-positive"
clcolor="text-white"
:visible="false"
mystyle=" " myclass="myshad" :canopen="true">
<div class="column q-gutter-sm justify-center text-center">
<q-input
bg-color="lightblue"
v-model="aportador_solidario"
rounded outlined
@blur="$v.aportador_solidario.$touch"
:error="$v.aportador_solidario.$error"
:error-message="errorMsg('aportador_solidario', $v.aportador_solidario)"
maxlength="20"
debounce="1000"
:label="$t('reg.username_regala_invitato')">
<template v-slot:prepend>
<q-icon name="person"/>
</template>
</q-input>
<q-toggle v-model="notifBot" :label="$t('dashboard.sendnotification')"/>
<q-btn class="q-ma-sm" rounded color="positive" text-color="white" icon="fas fa-gift" :label="$t('reg.regala_invitato')"
:disabled='!allowSubmit'
@click="RegalaInvitato(seluser, aportador_solidario, getnotifBotTxt)"></q-btn>
</div>
</CTitleBanner>
</div>
</div>
<div v-else>
<div class="column justify-center q-gutter-sm q-pa-sm">
<CRequisito icon="fas fa-user" text="dashboard.notreg" :isok="false"
info=""></CRequisito>
<q-btn rounded text-color="red" icon="delete" :label="$t('reg.cancella_invitato')"
@click="deleteUserFromExtraList(seluser)"></q-btn>
</div>
</div>
</CTitleBanner>
</q-card-section>
</q-card>
</q-dialog>
</div> </div>
</template> </template>

View File

@@ -30,6 +30,14 @@ export default class CMySingleEvent extends MixinEvents {
public $t public $t
public selected: boolean = false public selected: boolean = false
get mythis() {
return this
}
set mythis(aa) {
}
public selectEvent(eventparam: IEvents) { public selectEvent(eventparam: IEvents) {
this.selected = !this.selected this.selected = !this.selected
} }

View File

@@ -50,7 +50,7 @@
</div> </div>
<div class="listaev__date listaev__align_center_mobile"> <div class="listaev__date listaev__align_center_mobile">
<span v-html="tools.getstrDateTimeEvent(mythis(), myevent, true)"></span> <span v-html="tools.getstrDateTimeEvent(mythis, myevent, true)"></span>
</div> </div>
<div class="listaev__align_center_mobile"> <div class="listaev__align_center_mobile">

View File

@@ -9,10 +9,13 @@ import { CTitleBanner } from '@components'
import { CCardState } from '../CCardState' import { CCardState } from '../CCardState'
import { UserStore } from '../../store/Modules' import { UserStore } from '../../store/Modules'
import { GlobalStore } from '../../store' import { GlobalStore } from '../../store'
import { CCopyBtn } from '../CCopyBtn'
import { date } from 'quasar'
@Component({ @Component({
name: 'CStatusReg', name: 'CStatusReg',
components: { CTitleBanner, CCardState } components: { CTitleBanner, CCardState, CCopyBtn }
}) })
export default class CNextZoom extends MixinBase { export default class CNextZoom extends MixinBase {
@@ -27,4 +30,18 @@ export default class CNextZoom extends MixinBase {
return tools.getstrTime(this.listacalzoom[0].date_start) return tools.getstrTime(this.listacalzoom[0].date_start)
} }
} }
get showzoom() {
if (GlobalStore.state.calzoom.length > 0) {
const mydate = GlobalStore.state.calzoom.slice(-1)[0].date_start
const mydate_end = GlobalStore.state.calzoom.slice(-1)[0].date_end
const datenow = tools.getDateNow()
console.log('date.getDateDiff(datenow, mydate, \'minutes\')', date.getDateDiff(datenow, mydate, 'minutes'))
// if begin is in the past, take the day now
if ((date.getDateDiff(datenow, mydate, 'minutes') > -10) && (date.getDateDiff(datenow, mydate_end, 'minutes') < 0)) {
return true
}
}
return false
}
} }

View File

@@ -7,12 +7,16 @@
<div class="flex flex-center"> <div class="flex flex-center">
<div class="column animazione"> <div class="row animazione justify-center q-gutter-md">
<q-btn v-if="showzoom" size="md" type="a" :href="tools.getLinkZoom()"
target="_blank" rounded color="white" text-color="primary" icon="fas fa-video" :label="$t('steps.entra_zoom')">
</q-btn>
<transition-group name="fade" mode="out-in" <transition-group name="fade" mode="out-in"
appear appear
enter-active-class="animazione fadeIn" enter-active-class="animazione fadeIn"
leave-active-class="animazione fadeOut"> leave-active-class="animazione fadeOut">
<q-item v-for="(confer, index) in listacalzoom" :key="confer._id" class="q-mb-xs animated" v-ripple> <q-item v-for="(confer, index) in listacalzoom" :key="confer._id" class="q-mb-xs animated clBorderZoom q-pa-sm" v-ripple>
<q-item-section avatar> <q-item-section avatar>
<q-avatar v-if="tools.geticon(confer.lang)" :class="tools.geticon(confer.lang)" size="xs"> <q-avatar v-if="tools.geticon(confer.lang)" :class="tools.geticon(confer.lang)" size="xs">

View File

@@ -15,7 +15,6 @@ import MixinBase from '../../mixins/mixin-base'
}) })
export default class CProfile extends MixinBase { export default class CProfile extends MixinBase {
@Prop({ required: true }) public mythis: any
public $v public $v
public $t: any public $t: any

View File

@@ -0,0 +1,16 @@
.req_icon{
flex: 0 0 40px;
align-self: center;
}
.req_text{
flex: 1 1;
align-self: center;
}
.response {
flex: 0 0 40px;
font-weight: bold;
align-self: center;
}

View File

@@ -0,0 +1,29 @@
import Vue from 'vue'
import { Component, Prop, Watch } from 'vue-property-decorator'
import { tools } from '../../store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import MixinBase from '@src/mixins/mixin-base'
@Component({
})
export default class CRequisito extends MixinBase {
@Prop({ required: true }) public icon: string
@Prop({ required: true }) public text: string
@Prop({ required: true }) public isok: boolean
@Prop({ required: true }) public info: string
get checkifok() {
return this.isok ? 'green' : 'red'
}
get getris() {
return (this.isok) ? this.$t('dialog.yes') : this.$t('dialog.no')
}
get iconris() {
return (this.isok) ? 'fas fa-check' : 'fas fa-exclamation-triangle'
}
}

View File

@@ -0,0 +1,14 @@
<template>
<div class="row no-wrap clBorderSmall">
<q-icon size="sm" :name="icon" color="blue" class="column req_icon"></q-icon>
<q-chip dense color="white" text-color="blue" class="q-ml-md column req_text">{{text}}</q-chip>
<q-icon size="sm" :name="iconris" :color="checkifok" class="column req_icon"></q-icon>
</div>
</template>
<script lang="ts" src="./CRequisito.ts">
</script>
<style lang="scss" scoped>
@import './CRequisito.scss';
</style>

View File

@@ -0,0 +1 @@
export {default as CRequisito} from './CRequisito.vue'

View File

@@ -25,7 +25,6 @@ import { static_data } from '../../db/static_data'
}) })
export default class CSignIn extends Vue { export default class CSignIn extends Vue {
@Prop({ required: true }) public mythis: any
public $v public $v
public loading: boolean public loading: boolean
public $t: any public $t: any

View File

@@ -14,7 +14,6 @@ import { CCopyBtn } from '../CCopyBtn'
import { CVideo } from '../CVideo' import { CVideo } from '../CVideo'
import { CRequisiti } from '../CRequisiti' import { CRequisiti } from '../CRequisiti'
@Component({ @Component({
components: { CTitleBanner, CMyFieldDb, CMyInnerPage, CVerifyTelegram, CVerifyEmail, CCopyBtn, CVideo, CRequisiti } components: { CTitleBanner, CMyFieldDb, CMyInnerPage, CVerifyTelegram, CVerifyEmail, CCopyBtn, CVideo, CRequisiti }
}) })
@@ -241,7 +240,7 @@ export default class CStatus extends MixinBase {
public getnuminvitati_attivi() { public getnuminvitati_attivi() {
if (UserStore.state.my) if (UserStore.state.my)
if (UserStore.state.my.calcstat) if (UserStore.state.my.calcstat)
console.log('numinvitati', UserStore.state.my.calcstat) // console.log('numinvitati', UserStore.state.my.calcstat)
return UserStore.state.my.calcstat.numinvitati_attivi return UserStore.state.my.calcstat.numinvitati_attivi
return 0 return 0

View File

@@ -213,6 +213,10 @@
</CCopyBtn> </CCopyBtn>
<CCopyBtn :title="$t('reg.linkzoom')" :texttocopy="tools.getLinkZoom()">
</CCopyBtn>
<q-btn class="q-mb-md" rounded size="md" color="primary" to="/dashboard" <q-btn class="q-mb-md" rounded size="md" color="primary" to="/dashboard"
:label="$t('pages.dashboard')"></q-btn> :label="$t('pages.dashboard')"></q-btn>

View File

@@ -5,3 +5,7 @@
border-radius: 1rem; border-radius: 1rem;
padding: 2px; padding: 2px;
} }
.notreg {
color: red;
}

View File

@@ -24,7 +24,12 @@ export default class CUserBadge extends MixinBase {
public $t: any public $t: any
public getletter(user) { 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) { public getnumber(user, index) {
@@ -32,11 +37,21 @@ export default class CUserBadge extends MixinBase {
} }
public getstatecolor(user) { 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) { public getmoneycolor(user) {
return (user.made_gift) ? 'green' : 'gray' return (user.made_gift) ? 'green' : 'grey'
} }
get madegift() { get madegift() {
@@ -44,15 +59,37 @@ export default class CUserBadge extends MixinBase {
} }
public getzoomcolor(user) { 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() { public get2peoplecolor(user) {
return (this.getnumpeople() >= 2) ? 'green' : 'gray' if (this.isextralist(user))
return 'grey'
else
return (this.getnumpeople() >= 2) ? 'green' : 'grey'
}
public isextralist(user) {
return !!user.cell_complete
} }
public getnumpeople() { public getnumpeople() {
return this.numpeople 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)
}
} }

View File

@@ -1,6 +1,6 @@
<template> <template>
<div> <div v-if="!!user">
<q-item class="q-my-sm q-pa-sm myuserbadge shadow-5" clickable v-ripple> <q-item class="q-my-sm q-pa-sm myuserbadge shadow-5" clickable v-ripple @click="execclick(user)">
<q-item-section avatar> <q-item-section avatar>
<div class="row" style="margin-left: 4px;"> <div class="row" style="margin-left: 4px;">
<q-avatar v-if="yourinvite" :text-color="mycolor" size="md"> <q-avatar v-if="yourinvite" :text-color="mycolor" size="md">
@@ -13,23 +13,31 @@
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label>{{ user.name }} {{ user.surname }}<br> <q-item-label>{{ user.name }} {{ user.surname }} {{ getindorder(user) }}<br>
<span class="text-grey">({{ user.username }})</span> <span class="text-grey">({{ getusername(user) }})</span>
<br><span v-if="isextralist(user)" class="notreg">{{$t('dashboard.notreg')}}</span>
</q-item-label> </q-item-label>
<!--<q-item-label caption lines="1">{{ user.email }}</q-item-label>--> <!--<q-item-label caption lines="1">{{ user.email }}</q-item-label>-->
</q-item-section> </q-item-section>
<q-item-section side> <q-item-section side>
<div class="row q-gutter-xs justify-center items-center"> <div class="row q-gutter-xs justify-center items-center">
<q-icon size="xs" name="fab fa-telegram" :color="getstatecolor(user)"></q-icon> <q-btn v-if="isextralist(user)" fab-mini
<q-icon size="xs" name="fas fa-video" :color="getzoomcolor(user)"></q-icon> icon="fab fa-whatsapp"
color="green" type="a"
size="sm"
:href="tools.getHttpForWhatsapp(user.cell_complete)" target="__blank">
</q-btn>
<q-icon v-if="!isextralist(user)" size="sm" name="fab fa-telegram" :color="getstatecolor(user)"></q-icon>
<q-icon v-if="!isextralist(user)" size="sm" name="fas fa-video" :color="getzoomcolor(user)"></q-icon>
<q-avatar :text-color="mycolor" size="md"> <q-avatar :text-color="mycolor" size="md">
{{ getnumpeople() }} {{ getnumpeople() }}
</q-avatar> </q-avatar>
<q-icon size="xs" name="fas fa-user-friends" :color="get2peoplecolor()"></q-icon> <q-icon size="xs" name="fas fa-user-friends" :color="get2peoplecolor(user)"></q-icon>
</div> </div>
</q-item-section> </q-item-section>
</q-item> </q-item>
</div> </div>
</template> </template>

View File

@@ -6,8 +6,8 @@
<div class="subtitle_small text-blue" v-html="getvideotit"></div> <div class="subtitle_small text-blue" v-html="getvideotit"></div>
<div class=""> <div class="">
<iframe <iframe
:width="tools.getwidthscale(mythis(), getValDb('YT_W', false), 800)" :width="tools.getwidthscale(mythis, getValDb('YT_W', false), 800)"
:height="tools.getheightbywidth(mythis(), getValDb('YT_W', false), getValDb('YT_H', false), 800)" :height="tools.getheightbywidth(mythis, getValDb('YT_W', false), getValDb('YT_H', false), 800)"
:src="tools.getvideobyidyoutube(myvideokey)" :src="tools.getvideobyidyoutube(myvideokey)"
frameborder="0" frameborder="0"
allowfullscreen allowfullscreen

View File

@@ -361,7 +361,7 @@ export default class Header extends Vue {
tools.showNotif(this.$q, this.$t(msgcode)) tools.showNotif(this.$q, this.$t(msgcode))
} }
public mythis() { get mythis() {
return this return this
} }

View File

@@ -51,3 +51,5 @@ export * from './CVerifyEmail'
export * from './CLineChart' export * from './CLineChart'
export * from './CUserBadge' export * from './CUserBadge'
export * from './CMyDashboard' export * from './CMyDashboard'
export * from './CLegenda'
export * from './CRequisito'

View File

@@ -36,6 +36,10 @@ export default class MenuOne extends Vue {
return this return this
} }
set mythis(my) {
//
}
get getmenu() { get getmenu() {
return GlobalStore.getters.getmenu return GlobalStore.getters.getmenu
} }

View File

@@ -12,7 +12,7 @@ import MixinMetaTags from '@src/mixins/mixin-metatags'
// You can declare a mixin as the same style as components. // You can declare a mixin as the same style as components.
@Component @Component
export default class MixinBase extends MixinMetaTags { export default class MixinBase extends MixinMetaTags {
public mythis() { get mythis() {
return this return this
} }
@@ -130,8 +130,8 @@ export default class MixinBase extends MixinMetaTags {
try { try {
if (myval) { if (myval) {
const myrec = JSON.parse(myval) const myrec = JSON.parse(myval)
console.log('*************** getarrValDb') // console.log('*************** getarrValDb')
console.table(myrec) // console.table(myrec)
return myrec return myrec
} else { } else {
return [] return []

View File

@@ -11,6 +11,13 @@ import translate from '@src/globalroutines/util'
// You can declare a mixin as the same style as components. // You can declare a mixin as the same style as components.
@Component @Component
export default class MixinEvents extends Vue { export default class MixinEvents extends Vue {
get tools() {
return tools
}
get mythis() {
return this
}
public getImgEvent(event: IEvents) { public getImgEvent(event: IEvents) {
if (!!event.img) if (!!event.img)
@@ -19,7 +26,6 @@ export default class MixinEvents extends Vue {
return 'statics/images/noimg.png' return 'statics/images/noimg.png'
} }
public getStyleByEvent(event: IEvents, visu: boolean) { public getStyleByEvent(event: IEvents, visu: boolean) {
let myst = 'border: inset; border-color: darkblue; border-width: 3px; padding: 5px !important; ' let myst = 'border: inset; border-color: darkblue; border-width: 3px; padding: 5px !important; '

View File

@@ -8,6 +8,14 @@ import { tools } from '@src/store/Modules/tools'
export default class MixinMetaTags extends Vue { export default class MixinMetaTags extends Vue {
public mymeta: IMetaTags = {title: '', description: '', keywords: ''} public mymeta: IMetaTags = {title: '', description: '', keywords: ''}
get mythis() {
return this
}
set mythis(aa) {
}
public setmeta(mymeta: IMetaTags) { public setmeta(mymeta: IMetaTags) {
this.mymeta = mymeta this.mymeta = mymeta
} }

View File

@@ -19,6 +19,10 @@ export default class MixinOperator extends MixinMetaTags {
return this return this
} }
set mythis(my) {
//
}
get tools() { get tools() {
return tools return tools
} }

View File

@@ -9,7 +9,7 @@ import { IMessage } from '@src/model'
// You can declare a mixin as the same style as components. // You can declare a mixin as the same style as components.
@Component @Component
export default class MixinUsers extends Vue { export default class MixinUsers extends Vue {
public mythis() { get mythis() {
return this return this
} }

View File

@@ -289,10 +289,10 @@ export interface IImgGallery {
export interface IGallery { export interface IGallery {
_id?: string _id?: string
author_username: string author_username?: string
title: string title?: string
directory: string directory?: string
list: IImgGallery[] list?: IImgGallery[]
} }
export interface IColl { export interface IColl {
@@ -337,6 +337,7 @@ export interface IParamsQuery {
startRow: number startRow: number
endRow: number endRow: number
filter: string filter: string
filterand: string
sortBy: any sortBy: any
descending: number descending: number
} }
@@ -374,6 +375,11 @@ export interface ITableRec {
noshow: boolean noshow: boolean
} }
export interface IFilter {
label: string
value: string
}
export interface IDataPass { export interface IDataPass {
id: string id: string
table: string table: string

View File

@@ -30,6 +30,15 @@ export interface IPaymentType {
label: string label: string
} }
export interface IDashboard {
myself?: IUserFields
aportador?: IUserFields,
numpeople_aportador?: number
downline: any[],
downnotreg: any[],
downbyuser: any[]
}
export interface ICalcStat { export interface ICalcStat {
numinvitati?: number numinvitati?: number
numinvitati_attivi?: number numinvitati_attivi?: number
@@ -45,6 +54,7 @@ export interface IUserFields {
ipaddr?: string ipaddr?: string
perm?: number perm?: number
verified_email?: boolean verified_email?: boolean
aportador_solidario?: string
date_temp_reg?: Date date_temp_reg?: Date
made_gift?: boolean made_gift?: boolean
tokens?: IToken[] tokens?: IToken[]
@@ -52,6 +62,7 @@ export interface IUserFields {
profile?: IUserProfile profile?: IUserProfile
downline?: IUserFields[] downline?: IUserFields[]
calcstat?: ICalcStat calcstat?: ICalcStat
dashboard?: IDashboard
} }
/* /*
@@ -84,4 +95,5 @@ export interface IUserState {
usersList?: IUserFields[] usersList?: IUserFields[]
permissionsList?: IPerm[] permissionsList?: IPerm[]
countusers?: number countusers?: number
lastparamquery?: any
} }

View File

@@ -127,6 +127,10 @@ export default class Eventlist extends Vue {
return this return this
} }
set mythis(my) {
//
}
get mostra() { get mostra() {
return this.$route.name return this.$route.name
} }

View File

@@ -4,6 +4,7 @@ import { Component } from 'vue-property-decorator'
import { CGridTableRec } from '@components' import { CGridTableRec } from '@components'
import { CMyPage } from '../../../components/CMyPage/index' import { CMyPage } from '../../../components/CMyPage/index'
import { fieldsTable } from '@src/store/Modules/fieldsTable' import { fieldsTable } from '@src/store/Modules/fieldsTable'
import { shared_consts } from '@src/common/shared_vuejs'
@Component({ @Component({
components: { CGridTableRec, CMyPage } components: { CGridTableRec, CMyPage }
@@ -11,7 +12,24 @@ import { fieldsTable } from '@src/store/Modules/fieldsTable'
export default class ExtraList extends Vue { export default class ExtraList extends Vue {
public arrfilterand = [
{
label: 'Non Registrati',
value: shared_consts.FILTER_EXTRALIST_NOT_REGISTERED
},
{
label: 'Non Contattati',
value: shared_consts.FILTER_EXTRALIST_NOT_CONTACTED
},
{
label: 'Con Note',
value: shared_consts.FILTER_EXTRALIST_WITH_NOTE
}
]
get db_fieldsTable() { get db_fieldsTable() {
return fieldsTable return fieldsTable
} }
} }

View File

@@ -5,7 +5,9 @@
:prop_mycolumns="db_fieldsTable.colTableExtraList" :prop_mycolumns="db_fieldsTable.colTableExtraList"
prop_colkey="_id" prop_colkey="_id"
nodataLabel="Nessun Utente" nodataLabel="Nessun Utente"
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"> noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
:arrfilters="arrfilterand"
>
</CGridTableRec> </CGridTableRec>
</CMyPage> </CMyPage>

View File

@@ -3,7 +3,8 @@
<CGridTableRec :prop_mytitle="$t('otherpages.admin.tableslist')" <CGridTableRec :prop_mytitle="$t('otherpages.admin.tableslist')"
nodataLabel="Nessun Dato" nodataLabel="Nessun Dato"
noresultLabel="Il filtro selezionato non ha trovato nessun risultato" noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
:tablesList="gettablesList"> :tablesList="gettablesList"
>
</CGridTableRec> </CGridTableRec>
</CMyPage> </CMyPage>

View File

@@ -4,12 +4,46 @@ import { Component } from 'vue-property-decorator'
import { CGridTableRec } from '@components' import { CGridTableRec } from '@components'
import { CMyPage } from '../../../components/CMyPage/index' import { CMyPage } from '../../../components/CMyPage/index'
import { fieldsTable } from '@src/store/Modules/fieldsTable' import { fieldsTable } from '@src/store/Modules/fieldsTable'
import { shared_consts } from '@src/common/shared_vuejs'
import { tools } from '../../../store/Modules/tools'
@Component({ @Component({
components: { CGridTableRec, CMyPage } components: { CGridTableRec, CMyPage }
}) })
export default class UsersList extends Vue { export default class UsersList extends Vue {
public arrfilterand = []
public mounted() {
if (tools.appid() === '7')
this.arrfilterand = [
{
label: 'Non hanno visto Zoom',
value: shared_consts.FILTER_USER_NO_ZOOM
},
{
label: 'Non hanno l\'Invitante',
value: shared_consts.FILTER_USER_NO_INVITANTE
},
{
label: 'No Telegram ID',
value: shared_consts.FILTER_USER_NO_TELEGRAM_ID
},
{
label: 'Verifica Telegram interrotta',
value: shared_consts.FILTER_USER_CODICE_AUTH_TELEGRAM
},
{
label: 'Email non Verificata',
value: shared_consts.FILTER_USER_NO_EMAIL_VERIFICATA
},
{
label: 'Non hanno compilato il sogno',
value: shared_consts.FILTER_USER_NO_DREAM
}
]
}
get db_fieldsTable() { get db_fieldsTable() {
return fieldsTable return fieldsTable

View File

@@ -5,7 +5,8 @@
:prop_mycolumns="db_fieldsTable.colTableUsers" :prop_mycolumns="db_fieldsTable.colTableUsers"
prop_colkey="_id" prop_colkey="_id"
nodataLabel="Nessun Utente" nodataLabel="Nessun Utente"
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"> noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
:arrfilters="arrfilterand">
</CGridTableRec> </CGridTableRec>
</CMyPage> </CMyPage>

View File

@@ -10,6 +10,12 @@ const msgglobal = {
tableslist: 'Tabelle', tableslist: 'Tabelle',
nodata: 'Nessun Dato' nodata: 'Nessun Dato'
}, },
gallery: {
author_username: 'Utente',
title: 'Titolo',
directory: 'Directory',
list: 'Lista',
},
otherpages: { otherpages: {
error404: 'error404', error404: 'error404',
error404def: 'error404def', error404def: 'error404def',
@@ -48,8 +54,10 @@ const msgglobal = {
paymenttype_paypal_link: 'Apri il Conto con Paypal', paymenttype_paypal_link: 'Apri il Conto con Paypal',
paymenttype_revolut: 'Come Aprire il conto con Revolut (in 2 minuti)', paymenttype_revolut: 'Come Aprire il conto con Revolut (in 2 minuti)',
paymenttype_revolut_link: 'Apri il Conto con Revolut', paymenttype_revolut_link: 'Apri il Conto con Revolut',
entra_zoom: 'Entra in Zoom',
zoom: 'Partecipo agli Zoom (Video Conferenza)', zoom: 'Partecipo agli Zoom (Video Conferenza)',
zoom_si_partecipato: 'Hai partecipato ad almeno 1 Zoom', zoom_si_partecipato: 'Hai partecipato ad almeno 1 Zoom',
zoom_partecipa: 'Partecipato ad almeno 1 Zoom',
zoom_no_partecipato: 'Attualmente non hai ancora partecipato ad uno Zoom (è un requisito per poter entrare)', 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_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?', zoom_what:'Che cos\'è Zoom e come funziona?',
@@ -58,7 +66,7 @@ const msgglobal = {
sharemovement_invitati_attivi_si: 'Hai almeno 2 persone invitate Attive', 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_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: '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>', sharemovement_long: 'Condividi il Movimento AYNI con almeno 2 amici (<strong>consigliate 3 persone</strong>) e invitali a partecipare agli Zoom di Benvenuto, inviandogli il link per entrare.<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_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_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_requisiti_ok: 'Hai completato tutti i requisiti per poter accedere alla Programmazione',
@@ -129,8 +137,8 @@ const msgglobal = {
verify_email: 'Verifica la tua email', verify_email: 'Verifica la tua email',
go_login: 'Torna al Login', go_login: 'Torna al Login',
incorrect_input: 'Inserimento incorretto.', incorrect_input: 'Inserimento incorretto.',
link_sent: 'Ora leggi la tua casella email e trova "Confermare la Registrazione a Ayni" e clicca su "Verifica Registrazione"', link_sent: 'Ora leggi la tua casella email e trova "Confermare la Registrazione" e clicca su "Verifica Registrazione"',
se_non_ricevo: 'Se non dovessi ricevere la email, controlla nella spam, oppure contatta l\'HelpDesk', se_non_ricevo: 'Se non dovessi ricevere la email, controlla nella spam, oppure contattaci',
title_unsubscribe: 'Disiscrizione alla newsletter', title_unsubscribe: 'Disiscrizione alla newsletter',
title_unsubscribe_done: 'Disiscrizione completata correttamente', title_unsubscribe_done: 'Disiscrizione completata correttamente',
} }
@@ -156,18 +164,42 @@ const msgglobal = {
}, },
dashboard: { dashboard: {
downline: 'Persone che hai Invitato', downline: 'Persone che hai Invitato',
downnotreg: 'Invitati non Registrati',
notreg: 'Non Registrato',
numinvitati: 'Numero di Invitati',
telefono_wa: 'Contatta su Whatsapp chi non si è registrato',
sendnotification: 'Invia Notifica al Destinatario su Telegram BOT',
ricevuto_dono: 'Hai ricevuto in Regalo un Invitato {invitato} da parte di {mittente} !'
}, },
reg: { reg: {
registered: 'Registrato',
contacted: 'Contattato',
name_complete: 'Nome Completo',
num_invitati: 'Num.Invitati',
is_in_whatsapp: 'In Whatsapp',
is_in_telegram: 'In Telegram',
cell_complete: 'Cellulare',
failed: 'Fallito',
ind_order: 'Num',
ipaddr: 'IP',
verified_email: 'Email Verificata', verified_email: 'Email Verificata',
reg_lista_prec: 'Inserire il Nome, Cognome e numero di cellulare che avete lasciato in passato quando vi siete iscritti alla Chat!<br>In questo modo il sistema vi riconosce e vi mantiene la posizione della lista.', reg_lista_prec: 'Inserire il Nome, Cognome e numero di cellulare che avete lasciato in passato quando vi siete iscritti alla Chat!<br>In questo modo il sistema vi riconosce e vi mantiene la posizione della lista.',
nuove_registrazioni: 'Se questa è una NUOVA registrazione, dovete contattare la persona che vi ha INVITATO, che vi lascerà il LINK CORRETTO per fare la Registrazione sotto di lui/lei', nuove_registrazioni: 'Se questa è una NUOVA registrazione, dovete contattare la persona che vi ha INVITATO, che vi lascerà il LINK CORRETTO per fare la Registrazione sotto di lui/lei',
you: 'Tu',
cancella_invitato: 'Elimina Invitato',
regala_invitato: 'Regala Invitato',
invitato_regalato: 'Invitato Regalato',
legenda: 'Legenda',
aportador_solidario: 'Chi ti ha Invitato', aportador_solidario: 'Chi ti ha Invitato',
username_regala_invitato: 'Username del Destinatario del regalo',
aportador_solidario_nome_completo:'A.S. Nome', aportador_solidario_nome_completo:'A.S. Nome',
aportador_solidario_ind_order:'A.S.Ind', aportador_solidario_ind_order:'A.S.Ind',
already_registered: 'Mi sono già Iscritto sulla Chat Ayni, prima del 13 Gennaio', already_registered: 'Mi sono già Iscritto sulla Chat Ayni, prima del 13 Gennaio',
reflink: 'Link da condividere:', reflink: 'Link per registrarsi da condividere ai tuoi invitati:',
linkzoom: 'Link per entrare in Zoom',
page_title: 'Registrazione', page_title: 'Registrazione',
made_gift: 'Dono', made_gift: 'Dono',
note: 'Note',
incorso: 'Registrazione in corso...', incorso: 'Registrazione in corso...',
richiesto: 'Campo Richiesto', richiesto: 'Campo Richiesto',
email: 'Email', email: 'Email',
@@ -178,6 +210,7 @@ const msgglobal = {
email_paypal: 'Email Paypal', email_paypal: 'Email Paypal',
country_pay: 'Paese di Destinazione Pagamenti', country_pay: 'Paese di Destinazione Pagamenti',
username_telegram: 'Username Telegram', username_telegram: 'Username Telegram',
telegram: 'Telegram BOT',
teleg_id: 'Telegram ID', teleg_id: 'Telegram ID',
teleg_auth:'Codice Autorizzazione', teleg_auth:'Codice Autorizzazione',
click_per_copiare:'Cliccaci sopra per copiarlo sugli appunti', click_per_copiare:'Cliccaci sopra per copiarlo sugli appunti',
@@ -222,6 +255,7 @@ const msgglobal = {
user_not_this_aportador: 'Stai utilizzando un link di una persona diversa dal tuo invitato originale.', user_not_this_aportador: 'Stai utilizzando un link di una persona diversa dal tuo invitato originale.',
duplicate_username: 'L\'Username è stato già utilizzato', duplicate_username: 'L\'Username è stato già utilizzato',
aportador_not_exist: 'L\'Username di chi ti ha invitato non è presente. Contattaci.', aportador_not_exist: 'L\'Username di chi ti ha invitato non è presente. Contattaci.',
aportador_regalare_not_exist: 'Inserire l\'Username della persona che si vuole regalare l\'invitato',
sameaspassword: 'Le password devono essere identiche', sameaspassword: 'Le password devono essere identiche',
}, },
tips: { tips: {
@@ -568,13 +602,18 @@ const msgglobal = {
downline: 'Personas que has invitado', downline: 'Personas que has invitado',
}, },
reg: { reg: {
you: 'Tu',
cancella_invitato: 'Eliminar Invitado',
regala_invitato: 'Dar Invitado',
aportador_solidario: 'Aportador Solidario', aportador_solidario: 'Aportador Solidario',
aportador_solidario_nome_completo:'A.S. Nombre', aportador_solidario_nome_completo:'A.S. Nombre',
aportador_solidario_ind_order:'A.S.Ind', aportador_solidario_ind_order:'A.S.Ind',
already_registered: 'Ya me he registrado en el chat Ayni', already_registered: 'Ya me he registrado en el chat Ayni',
reflink: 'Enlaces para compartir con tus amigos:', reflink: 'Enlaces para compartir con tus amigos:',
linkzoom: 'Enlace para ingresar en Zoom',
page_title: 'Registro', page_title: 'Registro',
made_gift: 'Don', made_gift: 'Don',
note: 'Notas',
incorso: 'Registro en curso...', incorso: 'Registro en curso...',
richiesto: 'Campo requerido', richiesto: 'Campo requerido',
email: 'Email', email: 'Email',
@@ -961,13 +1000,18 @@ const msgglobal = {
downline: 'Les personnes que vous avez invitées', downline: 'Les personnes que vous avez invitées',
}, },
reg: { reg: {
you: 'Tu',
cancella_invitato: 'Supprimer invité',
regala_invitato: 'Donner invité',
aportador_solidario: 'Contributeur de solidarité', aportador_solidario: 'Contributeur de solidarité',
aportador_solidario_nome_completo:'A.S. Nom', aportador_solidario_nome_completo:'A.S. Nom',
aportador_solidario_ind_order:'A.S.Ind', aportador_solidario_ind_order:'A.S.Ind',
already_registered: 'Je me suis déjà inscrit sur le chat Ayni', already_registered: 'Je me suis déjà inscrit sur le chat Ayni',
reflink: 'Liens à partager avec vos amis:', reflink: 'Liens à partager avec vos amis:',
linkzoom: 'Lien pour entrer en Zoom',
incorso: 'Inscription en cours...', incorso: 'Inscription en cours...',
made_gift: 'Doné', made_gift: 'Doné',
note: 'Notes',
richiesto: 'Champ obligatoire', richiesto: 'Champ obligatoire',
email: 'Email', email: 'Email',
intcode_cell: 'Préfixe int.', intcode_cell: 'Préfixe int.',
@@ -1353,13 +1397,18 @@ const msgglobal = {
downline: 'People you\'ve invited', downline: 'People you\'ve invited',
}, },
reg: { reg: {
you: 'You',
cancella_invitato: 'Delete Invited',
regala_invitato: 'Give invited',
aportador_solidario: 'Solidarity Contributor', aportador_solidario: 'Solidarity Contributor',
aportador_solidario_nome_completo:'A.S. Name', aportador_solidario_nome_completo:'A.S. Name',
aportador_solidario_ind_order:'A.S.Ind', aportador_solidario_ind_order:'A.S.Ind',
already_registered: 'I have already registered on the Ayni Chat', already_registered: 'I have already registered on the Ayni Chat',
reflink: 'Links to share to your friends:', reflink: 'Links to share to your friends:',
linkzoom: 'Link to enter in Zoom',
incorso: 'Registration please wait...', incorso: 'Registration please wait...',
made_gift: 'Donated', made_gift: 'Donated',
note: 'Note',
richiesto: 'Field Required', richiesto: 'Field Required',
email: 'Email', email: 'Email',
intcode_cell: 'International Code', intcode_cell: 'International Code',
@@ -1744,13 +1793,18 @@ const msgglobal = {
downline: 'People you\'ve invited', downline: 'People you\'ve invited',
}, },
reg: { reg: {
you: 'You',
cancella_invitato: 'Delete Invited',
regala_invitato: 'Give invited',
aportador_solidario: 'Solidarity Contributor', aportador_solidario: 'Solidarity Contributor',
aportador_solidario_nome_completo:'A.S. Name', aportador_solidario_nome_completo:'A.S. Name',
aportador_solidario_ind_order:'A.S.Ind', aportador_solidario_ind_order:'A.S.Ind',
already_registered: 'I have already registered on the Ayni Chat', already_registered: 'I have already registered on the Ayni Chat',
reflink: 'Links to share to your friends:', reflink: 'Links to share to your friends:',
linkzoom: 'Link to enter in Zoom',
page_title: 'Registration', page_title: 'Registration',
made_gift: 'Donated', made_gift: 'Donated',
note: 'Note',
incorso: 'Registration please wait...', incorso: 'Registration please wait...',
richiesto: 'Field Required', richiesto: 'Field Required',
email: 'Email', email: 'Email',

View File

@@ -125,8 +125,8 @@ namespace Actions {
data.options = tools.SetBit(data.options, shared_consts.MessageOptions.Notify_ByEmail) data.options = tools.SetBit(data.options, shared_consts.MessageOptions.Notify_ByEmail)
data.options = tools.SetBit(data.options, shared_consts.MessageOptions.Notify_ByPushNotification) data.options = tools.SetBit(data.options, shared_consts.MessageOptions.Notify_ByPushNotification)
console.log('DOPO:') // console.log('DOPO:')
console.table(data) // console.table(data)
return await Api.SendReq('/sendmsg', 'POST', data) return await Api.SendReq('/sendmsg', 'POST', data)
.then((res) => { .then((res) => {

View File

@@ -34,6 +34,7 @@ export const DefaultUser: IUserFields = {
password: '', password: '',
tokens: [], tokens: [],
verified_email: false, verified_email: false,
aportador_solidario: '',
made_gift: false, made_gift: false,
profile: { profile: {
img: '', img: '',
@@ -41,7 +42,8 @@ export const DefaultUser: IUserFields = {
saw_zoom_presentation: false, saw_zoom_presentation: false,
}, },
downline: [], downline: [],
calcstat: DefaultCalc calcstat: DefaultCalc,
dashboard: null
} }
export const DefaultProfile: IUserProfile = { export const DefaultProfile: IUserProfile = {
@@ -75,7 +77,8 @@ const state: IUserState = {
isManager: false, isManager: false,
usersList: [], usersList: [],
permissionsList: [], permissionsList: [],
countusers: 0 countusers: 0,
lastparamquery: {}
} }
const b = storeBuilder.module<IUserState>('UserModule', state) const b = storeBuilder.module<IUserState>('UserModule', state)
@@ -732,7 +735,7 @@ namespace Actions {
const myuser: IUserFields = res.data.usertosend const myuser: IUserFields = res.data.usertosend
if (myuser) { if (myuser) {
console.table(myuser) // console.table(myuser)
Mutations.mutations.authUser(myuser) Mutations.mutations.authUser(myuser)
@@ -902,10 +905,20 @@ namespace Actions {
async function getDashboard(context, paramquery) { async function getDashboard(context, paramquery) {
if (paramquery === null)
paramquery = state.lastparamquery
else
state.lastparamquery = paramquery
return await Api.SendReq('/dashboard', 'POST', paramquery) return await Api.SendReq('/dashboard', 'POST', paramquery)
.then((res) => { .then((res) => {
if (res.status === 200) { if (res.status === 200) {
return res.data.dashboard state.my.dashboard = res.data.dashboard
state.my.dashboard.myself = (res.data.dashboard.myself === undefined) ? DefaultUser : res.data.dashboard.myself
state.my.dashboard.aportador = (res.data.dashboard.aportador === undefined) ? DefaultUser : res.data.dashboard.aportador
state.my.dashboard.numpeople_aportador = (res.data.dashboard.numpeople_aportador === undefined) ? 0 : res.data.dashboard.numpeople_aportador
return state.my.dashboard
} }
}).catch((error) => { }).catch((error) => {
return { return {

View File

@@ -416,6 +416,7 @@ export const fieldsTable = {
AddCol({ name: 'surname', label_trans: 'reg.surname' }), AddCol({ name: 'surname', label_trans: 'reg.surname' }),
AddCol({ name: 'email', label_trans: 'reg.email' }), AddCol({ name: 'email', label_trans: 'reg.email' }),
AddCol({ name: 'made_gift', label_trans: 'reg.made_gift', fieldtype: tools.FieldType.boolean }), AddCol({ name: 'made_gift', label_trans: 'reg.made_gift', fieldtype: tools.FieldType.boolean }),
AddCol({ name: 'note', label_trans: 'reg.note' }),
AddCol({ name: 'aportador_solidario_ind_order', label_trans: 'reg.aportador_solidario_ind_order' }), AddCol({ name: 'aportador_solidario_ind_order', label_trans: 'reg.aportador_solidario_ind_order' }),
AddCol({ name: 'aportador_solidario_nome_completo', label_trans: 'reg.aportador_solidario_nome_completo' }), AddCol({ name: 'aportador_solidario_nome_completo', label_trans: 'reg.aportador_solidario_nome_completo' }),
AddCol({ name: 'aportador_solidario', label_trans: 'reg.aportador_solidario' }), AddCol({ name: 'aportador_solidario', label_trans: 'reg.aportador_solidario' }),
@@ -449,6 +450,8 @@ export const fieldsTable = {
AddCol({ name: 'name_complete', label_trans: 'reg.name_complete' }), AddCol({ name: 'name_complete', label_trans: 'reg.name_complete' }),
AddCol({ name: 'name', label_trans: 'reg.name' }), AddCol({ name: 'name', label_trans: 'reg.name' }),
AddCol({ name: 'surname', label_trans: 'reg.surname' }), AddCol({ name: 'surname', label_trans: 'reg.surname' }),
AddCol({ name: 'note', label_trans: 'reg.note' }),
AddCol({ name: 'contacted', label_trans: 'reg.contacted', fieldtype: tools.FieldType.boolean }),
AddCol({ name: 'saw_zoom_presentation', label_trans: 'reg.saw_zoom_presentation', fieldtype: tools.FieldType.boolean }), AddCol({ name: 'saw_zoom_presentation', label_trans: 'reg.saw_zoom_presentation', fieldtype: tools.FieldType.boolean }),
AddCol({ name: 'num_invitati', label_trans: 'reg.num_invitati', fieldtype: tools.FieldType.number }), AddCol({ name: 'num_invitati', label_trans: 'reg.num_invitati', fieldtype: tools.FieldType.number }),
AddCol({ name: 'is_in_whatsapp', label_trans: 'reg.is_in_whatsapp', fieldtype: tools.FieldType.boolean }), AddCol({ name: 'is_in_whatsapp', label_trans: 'reg.is_in_whatsapp', fieldtype: tools.FieldType.boolean }),
@@ -458,7 +461,6 @@ export const fieldsTable = {
AddCol({ name: 'aportador_solidario_name_surname', label_trans: 'reg.aportador_solidario_nome_completo' }), AddCol({ name: 'aportador_solidario_name_surname', label_trans: 'reg.aportador_solidario_nome_completo' }),
AddCol({ name: 'aportador_solidario_ind_order', label_trans: 'reg.aportador_solidario_ind_order' }), AddCol({ name: 'aportador_solidario_ind_order', label_trans: 'reg.aportador_solidario_ind_order' }),
AddCol({ name: 'aportador_solidario_originale_name_surname', label_trans: 'reg.aportador_solidario_nome_completo' }), AddCol({ name: 'aportador_solidario_originale_name_surname', label_trans: 'reg.aportador_solidario_nome_completo' }),
AddCol({ name: 'note', label_trans: 'reg.note' }),
AddCol({ name: 'col_b', label_trans: 'reg.col_b', fieldtype: tools.FieldType.number }), AddCol({ name: 'col_b', label_trans: 'reg.col_b', fieldtype: tools.FieldType.number }),
AddCol({ name: 'col_h', label_trans: 'reg.col_h', fieldtype: tools.FieldType.number }), AddCol({ name: 'col_h', label_trans: 'reg.col_h', fieldtype: tools.FieldType.number }),
AddCol(DeleteRec), AddCol(DeleteRec),

View File

@@ -18,6 +18,8 @@ export const lists = {
DELETE_RECTABLE: 300, DELETE_RECTABLE: 300,
DUPLICATE_RECTABLE: 310, DUPLICATE_RECTABLE: 310,
DELETE_EVENT: 320, DELETE_EVENT: 320,
DELETE_EXTRALIST: 330,
REGALA_INVITATO: 340,
CAN_EDIT_TABLE: 400, CAN_EDIT_TABLE: 400,
SHOW_PREV_REC: 401 SHOW_PREV_REC: 401

View File

@@ -34,6 +34,8 @@ import { shared_consts } from '@src/common/shared_vuejs'
import { dom } from 'quasar' import { dom } from 'quasar'
const printf = require('util').format;
const { height, width } = dom const { height, width } = dom
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
@@ -72,7 +74,9 @@ export const tools = {
'yellow' 'yellow'
], ],
TABUSER: 'users',
TABEVENTS: 'myevents', TABEVENTS: 'myevents',
TABEXTRALIST: 'extralist',
TABNEWSLETTER: 'newstosent', TABNEWSLETTER: 'newstosent',
TABGALLERY: 'gallery', TABGALLERY: 'gallery',
TABMAILINGLIST: 'mailinglist', TABMAILINGLIST: 'mailinglist',
@@ -153,7 +157,7 @@ export const tools = {
image: 2048, image: 2048,
nationality: 4096, nationality: 4096,
intcode: 5000, intcode: 5000,
multioption: 6000, multioption: 6000
}, },
FieldTypeArr: [ FieldTypeArr: [
@@ -1433,6 +1437,35 @@ export const tools = {
} else } else
tools.showNegativeNotif(myself.$q, myself.$t('cal.cancelederrorevent')) tools.showNegativeNotif(myself.$q, myself.$t('cal.cancelederrorevent'))
}) })
} else if (func === lists.MenuAction.DELETE_EXTRALIST) {
// console.log('param1', par.param1, 'id', par.param1._id)
GlobalStore.actions.DeleteRec({ table: tools.TABEXTRALIST, id: par.param1._id }).then((ris) => {
if (ris) {
myself.update_username()
tools.showPositiveNotif(myself.$q, myself.$t('reg.cancella_invitato') + ' "' + par.param1.name + ' ' + par.param1.surname + '"')
} else
tools.showNegativeNotif(myself.$q, myself.$t('db.recfailed'))
})
} else if (func === lists.MenuAction.REGALA_INVITATO) {
// console.log('param1', par.param1, 'id', par.param1._id)
const mydatatosave = {
id: par.param1._id,
table: tools.TABUSER,
fieldsvalue: { aportador_solidario: par.param2 },
notifBot: {}
}
if (par.param3) {
mydatatosave.notifBot = { un: par.param2, txt: par.param3 }
}
GlobalStore.actions.saveFieldValue(mydatatosave).then((ris) => {
if (ris) {
myself.update_username()
tools.showPositiveNotif(myself.$q, myself.$t('reg.invitato_regalato') + ' "' + par.param1.name + ' ' + par.param1.surname + '"')
} else
tools.showNegativeNotif(myself.$q, myself.$t('db.recfailed'))
})
} else if (func === lists.MenuAction.DELETE_RECTABLE) { } else if (func === lists.MenuAction.DELETE_RECTABLE) {
console.log('param1', par.param1) console.log('param1', par.param1)
GlobalStore.actions.DeleteRec({ table, id: par.param1 }).then((ris) => { GlobalStore.actions.DeleteRec({ table, id: par.param1 }).then((ris) => {
@@ -1899,7 +1932,6 @@ export const tools = {
return '' return ''
}, },
getstrDateTimeShort(mytimestamp) { getstrDateTimeShort(mytimestamp) {
// console.log('getstrDate', mytimestamp) // console.log('getstrDate', mytimestamp)
if (!!mytimestamp) if (!!mytimestamp)
@@ -2705,7 +2737,7 @@ export const tools = {
const mydata = { const mydata = {
table, table,
data, data
} }
return await return await
@@ -2902,7 +2934,7 @@ export const tools = {
} }
}, },
isObject(anything) { isObject(anything) {
//Object.create(null) instanceof Object → false // Object.create(null) instanceof Object → false
return Object(anything) === anything return Object(anything) === anything
}, },
isDebug() { isDebug() {
@@ -3056,7 +3088,7 @@ export const tools = {
return '' return ''
}, },
clone(obj) { clone(obj) {
if (null == obj || 'object' != typeof obj) return obj if (null === obj || 'object' !== typeof obj) return obj
const copy = obj.constructor() const copy = obj.constructor()
for (const attr in obj) { for (const attr in obj) {
if (obj.hasOwnProperty(attr)) copy[attr] = obj[attr] if (obj.hasOwnProperty(attr)) copy[attr] = obj[attr]
@@ -3095,9 +3127,13 @@ export const tools = {
return 'fa-flag-sm' return 'fa-flag-sm'
else if (lang === 'HR') else if (lang === 'HR')
return 'fa-flag-hr' return 'fa-flag-hr'
else if (lang === 'RO')
return 'fa-flag-ro'
else if (lang === 'CL')
return 'fa-flag-cl'
return '' return ''
}catch (e) { } catch (e) {
return '' return ''
} }
}, },
@@ -3154,9 +3190,26 @@ export const tools = {
return 'United Kingdom' return 'United Kingdom'
} else if (nat === 'UA') { } else if (nat === 'UA') {
return 'Ukraine' return 'Ukraine'
} else if (nat === 'RO') {
return 'Romania'
} else if (nat === 'CL') {
return 'Chile'
} }
}, },
getLinkZoom() {
let id = ''
if (GlobalStore.state.calzoom.length > 0) {
id = GlobalStore.state.calzoom.slice(-1)[0].id_conf_zoom.toString()
} else {
id = '6668882000'
}
return 'https://zoom.us/j/' + id
},
myprintf( ) {
}
// getLocale() { // getLocale() {
// if (navigator.languages && navigator.languages.length > 0) { // if (navigator.languages && navigator.languages.length > 0) {

View File

@@ -32,7 +32,7 @@ export default class Signin extends Vue {
tools.showNotif(this.$q, this.$t(msgcode)) tools.showNotif(this.$q, this.$t(msgcode))
} }
public mythis() { get mythis() {
return this return this
} }

View File

@@ -11,7 +11,7 @@ export default class Profile extends MixinBase {
public $v public $v
public $q public $q
public mythis() { get mythis() {
return this return this
} }