diff --git a/src/common/shared_vuejs.ts b/src/common/shared_vuejs.ts index 8ca0c13..7f3693d 100644 --- a/src/common/shared_vuejs.ts +++ b/src/common/shared_vuejs.ts @@ -6,8 +6,13 @@ export const shared_consts = { Manager: 2, }, + MessageOptions: { + Notify_ByEmail: 2, + Notify_ByPushNotification: 4 + }, + fieldsUserToChange() { - return ['username', 'email', 'name', 'surname', 'perm', 'date_reg', 'verified_email', 'img', 'ipaddr'] + return ['username', 'email', 'name', 'surname', 'perm', 'date_reg', 'verified_email', 'img', 'ipaddr', 'lasttimeonline'] } } diff --git a/src/components/CEventsCalendar/CEventsCalendar.ts b/src/components/CEventsCalendar/CEventsCalendar.ts index 92f32d9..c7621e0 100644 --- a/src/components/CEventsCalendar/CEventsCalendar.ts +++ b/src/components/CEventsCalendar/CEventsCalendar.ts @@ -28,10 +28,12 @@ import router from '@router' import { static_data } from '@src/db/static_data' import translate from '@src/globalroutines/util' import { lists } from '../../store/Modules/lists' -import { GlobalStore } from '../../store/Modules' -import { IMessagePage, IMessage, IIdentity } from '../../model' +import { GlobalStore, MessageStore } from '../../store/Modules' +import { IMessagePage, IMessage, IIdentity, MsgDefault } from '../../model' +import MixinUsers from '../../mixins/mixin-users' @Component({ + mixins: [MixinUsers], name: 'CEventsCalendar', components: { Logo, Footer, CTitle, CImgText, QDateTimeScroller, QDateScroller, CMySelect, CMyEditor } }) @@ -370,10 +372,6 @@ export default class CEventsCalendar extends Vue { } } - get mythis() { - return this - } - public $refs: { calendar: any } @@ -666,26 +664,17 @@ export default class CEventsCalendar extends Vue { const data: IMessage = { source: { - page: '', event_id: myevent._id, infoevent: tools.gettextevent(this, myevent) }, - idapp: process.env.APP_ID, - origin: { - idapp: process.env.APP_ID, - username: UserStore.state.username - }, dest: { idapp: process.env.APP_ID, username: myevent.teacher }, - read: false, - deleted: false, - message: this.askInfoForm.message, - datemsg: tools.getDateNow() + message: this.askInfoForm.message } - this.SendMsgEvent(data).then((ris) => { + MessageStore.actions.SendMsgEvent(data).then((ris) => { self.contextDay = null if (ris) tools.showPositiveNotif(self.$q, self.$t('cal.sendmsg_sent')) @@ -841,10 +830,6 @@ export default class CEventsCalendar extends Vue { return await CalendarStore.actions.BookEvent(eventparam) } - public async SendMsgEvent(param: IMessage) { - return await UserStore.actions.SendMsgEvent(param) - } - public isAlreadyBooked(eventparam: IEvents) { return CalendarStore.getters.findEventBooked(eventparam, true) } @@ -880,7 +865,7 @@ export default class CEventsCalendar extends Vue { public createContribType(value) { console.log('createContribType', value) tools.createNewRecord(this, 'contribtype', { label: value }).then((myrec) => { - console.log('myrec') + // console.log('myrec') CalendarStore.state.contribtype.push(myrec) }) } @@ -901,10 +886,6 @@ export default class CEventsCalendar extends Vue { return myprice } - public getTeacherName(teacherusername) { - return CalendarStore.getters.getTeacherName(teacherusername) - } - public getWhereIcon(where) { const whererec = CalendarStore.getters.getWhereRec(where) return (whererec) ? whererec.whereicon : '' @@ -915,11 +896,6 @@ export default class CEventsCalendar extends Vue { return (whererec) ? whererec.placename : '' } - public getTeacherImg(teacherusername) { - const teacher = CalendarStore.getters.getTeacher(teacherusername) - return (teacher) ? teacher.img : '' - } - public badgeClasses(eventparam, type) { const cssColor = tools.isCssColor(eventparam.bgcolor) const isHeader = type === 'header' diff --git a/src/components/CEventsCalendar/CEventsCalendar.vue b/src/components/CEventsCalendar/CEventsCalendar.vue index 84e40f4..c432b6e 100644 --- a/src/components/CEventsCalendar/CEventsCalendar.vue +++ b/src/components/CEventsCalendar/CEventsCalendar.vue @@ -39,17 +39,17 @@ - + - {{getTeacherName(myevent.teacher)}} + {{getUserByUsername(myevent.teacher)}} - - + - + - {{getTeacherName(myevent.teacher2)}} + {{getUserByUsername(myevent.teacher2)}} @@ -75,7 +75,7 @@
{{$t('cal.when')}}: - +

@@ -294,7 +294,7 @@

{{$t('cal.when')}}: - +
@@ -334,7 +334,7 @@ + @click="tools.CancelBookingEvent(mythis(), myevent, bookEventForm._id, true)">
{{$t('cal.when')}}: - +
@@ -560,7 +560,7 @@

- +
@@ -600,16 +600,16 @@ - + - {{getTeacherName(event.teacher)}} + {{getUserByUsername(event.teacher)}} - - + + - + - {{getTeacherName(event.teacher2)}} + {{getUserByUsername(event.teacher2)}} diff --git a/src/components/CGridTableRec/CGridTableRec.vue b/src/components/CGridTableRec/CGridTableRec.vue index 5dbaaa4..5e11dd2 100644 --- a/src/components/CGridTableRec/CGridTableRec.vue +++ b/src/components/CGridTableRec/CGridTableRec.vue @@ -39,7 +39,7 @@ :label="$t('grid.editvalues')"> - @@ -77,7 +77,7 @@ - + diff --git a/src/components/CMySelect/CMySelect.ts b/src/components/CMySelect/CMySelect.ts index 1edd9ae..cb3765f 100644 --- a/src/components/CMySelect/CMySelect.ts +++ b/src/components/CMySelect/CMySelect.ts @@ -39,7 +39,7 @@ export default class CMySelect extends Vue { public mounted() { const rec = this.options.find((myrec) => myrec[`${this.optval}`] === this.value) - console.log('rec', rec) + // console.log('rec', rec) if (!this.useinput) { this.myvalue = this.value } else { @@ -49,7 +49,7 @@ export default class CMySelect extends Vue { else this.myvalue = rec[`${this.optlab}`] - console.log('this.myvalue', this.myvalue, 'this.optval', this.optval, 'rec', rec[`${this.optval}`]) + // console.log('this.myvalue', this.myvalue, 'this.optval', this.optval, 'rec', rec[`${this.optval}`]) } } } diff --git a/src/components/projects/SingleProject/SingleProject.vue b/src/components/projects/SingleProject/SingleProject.vue index 6dae3ff..654e83e 100644 --- a/src/components/projects/SingleProject/SingleProject.vue +++ b/src/components/projects/SingleProject/SingleProject.vue @@ -9,6 +9,7 @@ v-model.trim="precDescr" autogrow borderless + debounce="1000" :label="getlabeltext" dense @focus="getFocus($event)" diff --git a/src/components/todos/CTodo/CTodo.vue b/src/components/todos/CTodo/CTodo.vue index 6f9c3db..eddfee8 100644 --- a/src/components/todos/CTodo/CTodo.vue +++ b/src/components/todos/CTodo/CTodo.vue @@ -54,6 +54,7 @@