From 20cd0f2e525975679ddec4d2a0f1bad3133af325 Mon Sep 17 00:00:00 2001 From: Paolo Arena Date: Sun, 2 Feb 2020 04:07:24 +0100 Subject: [PATCH] =?UTF-8?q?-=20Nella=20Lavagna,=20cliccando=20sul=20nome?= =?UTF-8?q?=20dell'invitato,=20compaiono=20le=20sue=20informazioni=20sugli?= =?UTF-8?q?=20step=20rimasti,=20in=20dettaglio.=20-=20Ogni=20utente=20puo'?= =?UTF-8?q?=20cosi=20scegliere=20di=20regalare=20un=20proprio=20invitato,?= =?UTF-8?q?=20cliccando=20sull'invitato,=20scrivendo=20l'username=20del=20?= =?UTF-8?q?destinatario=20e=20premendo=20il=20bottone=20'Regala=20Invitato?= =?UTF-8?q?'.=20Al=20destinatario=20gli=20arriver=C3=A0=20un=20messaggio?= =?UTF-8?q?=20sul=20Bot=20Telegram=20che=20indica=20che=20gli=20=C3=A8=20s?= =?UTF-8?q?tato=20regalato=20un'invitato.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/shared_vuejs.ts | 10 + .../CCardDiscipline/CCardDiscipline.ts | 2 +- src/components/CCopyBtn/CCopyBtn.vue | 20 +- .../CEventsCalendar/CEventsCalendar.ts | 8 + .../CEventsCalendar/CEventsCalendar.vue | 10 +- src/components/CGallery/CGallery.ts | 49 ++-- src/components/CGridTableRec/CGridTableRec.ts | 17 +- .../CGridTableRec/CGridTableRec.vue | 6 + src/components/CLegenda/CLegenda.scss | 0 src/components/CLegenda/CLegenda.ts | 15 ++ src/components/CLegenda/CLegenda.vue | 15 ++ src/components/CLegenda/index.ts | 1 + src/components/CLineChart/CLineChart.ts | 4 + .../CMyDashboard/CMyDashboard-validate.ts | 12 + src/components/CMyDashboard/CMyDashboard.ts | 223 +++++++++++++++--- src/components/CMyDashboard/CMyDashboard.vue | 146 +++++++++++- .../CMySingleEvent/CMySingleEvent.ts | 8 + .../CMySingleEvent/CMySingleEvent.vue | 2 +- src/components/CNextZoom/CNextZoom.ts | 19 +- src/components/CNextZoom/CNextZoom.vue | 8 +- src/components/CProfile/CProfile.ts | 1 - src/components/CRequisito/CRequisito.scss | 16 ++ src/components/CRequisito/CRequisito.ts | 29 +++ src/components/CRequisito/CRequisito.vue | 14 ++ src/components/CRequisito/index.ts | 1 + src/components/CSignIn/CSignIn.ts | 1 - src/components/CStatus/CStatus.ts | 3 +- src/components/CStatus/CStatus.vue | 4 + src/components/CUserBadge/CUserBadge.scss | 4 + src/components/CUserBadge/CUserBadge.ts | 49 +++- src/components/CUserBadge/CUserBadge.vue | 22 +- src/components/CVideo/CVideo.vue | 4 +- src/components/Header/Header.ts | 2 +- src/components/index.ts | 2 + src/layouts/menuone/menuOne.ts | 4 + src/mixins/mixin-base.ts | 6 +- src/mixins/mixin-events.ts | 8 +- src/mixins/mixin-metatags.ts | 8 + src/mixins/mixin-operator.ts | 4 + src/mixins/mixin-users.ts | 2 +- src/model/GlobalStore.ts | 14 +- src/model/UserStore.ts | 12 + src/rootgen/admin/eventlist/eventlist.ts | 4 + src/rootgen/admin/extraList/extraList.ts | 18 ++ src/rootgen/admin/extraList/extraList.vue | 4 +- src/rootgen/admin/tablesList/tablesList.vue | 3 +- src/rootgen/admin/usersList/usersList.ts | 34 +++ src/rootgen/admin/usersList/usersList.vue | 3 +- src/statics/i18n.js | 62 ++++- src/store/Modules/MessageStore.ts | 4 +- src/store/Modules/UserStore.ts | 21 +- src/store/Modules/fieldsTable.ts | 4 +- src/store/Modules/lists.ts | 2 + src/store/Modules/tools.ts | 65 ++++- src/views/login/signin/signin.ts | 2 +- src/views/user/profile/profile.ts | 2 +- 56 files changed, 881 insertions(+), 132 deletions(-) create mode 100644 src/components/CLegenda/CLegenda.scss create mode 100644 src/components/CLegenda/CLegenda.ts create mode 100644 src/components/CLegenda/CLegenda.vue create mode 100644 src/components/CLegenda/index.ts create mode 100644 src/components/CMyDashboard/CMyDashboard-validate.ts create mode 100644 src/components/CRequisito/CRequisito.scss create mode 100644 src/components/CRequisito/CRequisito.ts create mode 100644 src/components/CRequisito/CRequisito.vue create mode 100644 src/components/CRequisito/index.ts diff --git a/src/common/shared_vuejs.ts b/src/common/shared_vuejs.ts index 05de598..e776b50 100644 --- a/src/common/shared_vuejs.ts +++ b/src/common/shared_vuejs.ts @@ -1,5 +1,15 @@ 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: { Admin: { value: 1, diff --git a/src/components/CCardDiscipline/CCardDiscipline.ts b/src/components/CCardDiscipline/CCardDiscipline.ts index 99a4f25..04d3fa9 100644 --- a/src/components/CCardDiscipline/CCardDiscipline.ts +++ b/src/components/CCardDiscipline/CCardDiscipline.ts @@ -16,7 +16,7 @@ import { CalendarStore } from '../../store/Modules' components: { CMyTeacher } }) -export default class CCardDiscipline extends Vue { +export default class CCardDiscipline extends MixinBase { @Prop({ required: true }) public discipline: IDiscipline @Prop({ required: false, default: '' }) public mystyle: string @Prop({ required: false, default: false }) public autoplay: boolean diff --git a/src/components/CCopyBtn/CCopyBtn.vue b/src/components/CCopyBtn/CCopyBtn.vue index 9119fce..06295a3 100644 --- a/src/components/CCopyBtn/CCopyBtn.vue +++ b/src/components/CCopyBtn/CCopyBtn.vue @@ -1,14 +1,16 @@ diff --git a/src/components/CEventsCalendar/CEventsCalendar.ts b/src/components/CEventsCalendar/CEventsCalendar.ts index 8989008..663fa43 100644 --- a/src/components/CEventsCalendar/CEventsCalendar.ts +++ b/src/components/CEventsCalendar/CEventsCalendar.ts @@ -129,6 +129,14 @@ export default class CEventsCalendar extends MixinEvents { public draggedEvent = null public ignoreNextSwipe = false + get mythis() { + return this + } + + set mythis(aa) { + + } + public resources = [ { label: 'John' diff --git a/src/components/CEventsCalendar/CEventsCalendar.vue b/src/components/CEventsCalendar/CEventsCalendar.vue index 54f94a2..fc39f17 100644 --- a/src/components/CEventsCalendar/CEventsCalendar.vue +++ b/src/components/CEventsCalendar/CEventsCalendar.vue @@ -80,7 +80,7 @@
{{$t('cal.when')}}: - +

@@ -295,7 +295,7 @@

{{$t('cal.when')}}: - +
@@ -339,7 +339,7 @@ + @click="tools.CancelBookingEvent(mythis, myevent, bookEventForm._id, true)">
{{$t('cal.when')}}: - +
@@ -631,7 +631,7 @@
- +
diff --git a/src/components/CGallery/CGallery.ts b/src/components/CGallery/CGallery.ts index 34f813b..f8d1ef3 100644 --- a/src/components/CGallery/CGallery.ts +++ b/src/components/CGallery/CGallery.ts @@ -18,14 +18,31 @@ export default class CGallery extends MixinBase { @Prop({ required: true }) public edit: boolean @Prop({ required: true }) public gall: IGallery @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() { return tools } get getlistimages() { - if (this.listimages) - return this.listimages.sort((a, b) => a.order - b.order) + if (this.mylistimages) + return this.mylistimages.slice().sort((a, b) => a.order - b.order) else return null } @@ -77,13 +94,13 @@ export default class CGallery extends MixinBase { return } - const myindex = this.listimages.findIndex((rec) => rec._id === draggedId) - const myrec: IImgGallery = this.listimages[myindex] + const myindex = this.mylistimages.findIndex((rec) => rec._id === draggedId) + const myrec: IImgGallery = this.mylistimages[myindex] let myrecprec: IImgGallery = null let myrecout: IImgGallery = null - const myindexout = this.listimages.findIndex((rec) => rec._id === dragout) - myrecout = this.listimages[myindexout] + const myindexout = this.mylistimages.findIndex((rec) => rec._id === dragout) + myrecout = this.mylistimages[myindexout] let myindexprec = myindexout - 1 if (myindexprec < 0) @@ -135,7 +152,7 @@ export default class CGallery extends MixinBase { get getlastord() { let myord = 0 - for (const file of this.listimages) { + for (const file of this.mylistimages) { if (file.order > myord) myord = file.order } @@ -146,29 +163,29 @@ export default class CGallery extends MixinBase { public uploaded(info) { console.log(info) 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() } 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) { - 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() } public getfullname(rec) { - return 'statics/upload/' + this.gall.directory + `/` + rec.imagefile + return 'statics/upload/' + this.mygall.directory + `/` + rec.imagefile } public copytoclipboard(rec) { @@ -187,7 +204,7 @@ export default class CGallery extends MixinBase { } public save() { - this.$emit('showandsave', this.listimages) + this.$emit('showandsave', this.mylistimages) } public getsrcimg(mygallery) { @@ -195,7 +212,7 @@ export default class CGallery extends MixinBase { if (tools.getextfile(mygallery.imagefile) === 'pdf') return 'statics/images/images/pdf.jpg' else - return 'statics/upload/' + this.gall.directory + `/` + mygallery.imagefile + return 'statics/upload/' + this.mygall.directory + `/` + mygallery.imagefile } } diff --git a/src/components/CGridTableRec/CGridTableRec.ts b/src/components/CGridTableRec/CGridTableRec.ts index 7b2389b..0919d61 100644 --- a/src/components/CGridTableRec/CGridTableRec.ts +++ b/src/components/CGridTableRec/CGridTableRec.ts @@ -1,11 +1,11 @@ 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 { tools } from '../../store/Modules/tools' 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 { SingleProject } from '../projects/SingleProject' 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 noresultLabel: string @Prop({ required: false, default: null }) public tablesList: ITableRec[] + @Prop({ required: false, default: null }) public arrfilters: IFilter[] public mytable: string public mytitle: string @@ -55,6 +56,7 @@ export default class CGridTableRec extends Vue { public separator: 'horizontal' public myfilter = undefined + public myfilterand = [] public rowsel: any public dark: boolean = true public canEdit: boolean = false @@ -190,6 +192,7 @@ export default class CGridTableRec extends Vue { // console.log('onRequest', 'myfilter = ', this.myfilter) const { page, rowsPerPage, rowsNumber, sortBy, descending } = props.pagination const myfilter = this.myfilter + const myfilterand = this.myfilterand if (!this.mytable) return @@ -212,7 +215,7 @@ export default class CGridTableRec extends Vue { this.serverData = [] // 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) @@ -244,7 +247,7 @@ export default class CGridTableRec extends Vue { // emulate ajax call // SELECT * FROM ... WHERE...LIMIT... - public async fetchFromServer(startRow, endRow, myfilter, sortBy, descending) { + public async fetchFromServer(startRow, endRow, myfilter, myfilterand, sortBy, descending) { let myobj = null if (sortBy) { @@ -260,6 +263,7 @@ export default class CGridTableRec extends Vue { startRow, endRow, filter: myfilter, + filterand: myfilterand, sortBy: myobj, descending } @@ -565,4 +569,9 @@ export default class CGridTableRec extends Vue { return '' } } + + @Watch('myfilterand') + public changemyfilterand() { + this.refresh() + } } diff --git a/src/components/CGridTableRec/CGridTableRec.vue b/src/components/CGridTableRec/CGridTableRec.vue index ea6d3ea..278e54d 100644 --- a/src/components/CGridTableRec/CGridTableRec.vue +++ b/src/components/CGridTableRec/CGridTableRec.vue @@ -24,6 +24,7 @@ >