Step 2: Creating page Messages: userlist last messages + a page for all the messages received and sent.
This commit is contained in:
@@ -65,18 +65,6 @@ namespace Getters {
|
||||
return mystate.bookedevent.filter((bookedevent) => (bookedevent.id_bookedevent === idevent) && (bookedevent.booked) && (showall || (!showall && bookedevent.userId === UserStore.state.my._id) ))
|
||||
}, 'getEventsBookedByIdEvent')
|
||||
|
||||
const getTeacherName = b.read((mystate: ICalendarState) => (teacherusername) => {
|
||||
const op = mystate.operators.find((myop) => myop.username === teacherusername)
|
||||
return (op) ? `${op.name} ${op.surname}` : ''
|
||||
|
||||
}, 'getTeacherName')
|
||||
|
||||
const getTeacher = b.read((mystate: ICalendarState) => (teacherusername) => {
|
||||
const op = mystate.operators.find((myop) => myop.username === teacherusername)
|
||||
return (op)
|
||||
|
||||
}, 'getTeacher')
|
||||
|
||||
const getWhereRec = b.read((mystate: ICalendarState) => (wherecode) => {
|
||||
const whererec = mystate.wheres.find((mywhere) => mywhere.code === wherecode)
|
||||
return (whererec)
|
||||
@@ -110,9 +98,6 @@ namespace Getters {
|
||||
get getEventsBookedByIdEvent() {
|
||||
return getEventsBookedByIdEvent()
|
||||
},
|
||||
get getTeacher() {
|
||||
return getTeacher()
|
||||
},
|
||||
get getWhereRec() {
|
||||
return getWhereRec()
|
||||
},
|
||||
@@ -124,12 +109,8 @@ namespace Getters {
|
||||
},
|
||||
get getContribtypeRecByLabel() {
|
||||
return getContribtypeRecByLabel()
|
||||
},
|
||||
get getTeacherName() {
|
||||
return getTeacherName()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace Mutations {
|
||||
|
||||
@@ -138,9 +138,11 @@ namespace Getters {
|
||||
}, 'getUserByUsername')
|
||||
|
||||
const getImgByUsername = b.read((mystate: IUserState) => (username): string => {
|
||||
if (username === '')
|
||||
return 'images/avatar/avatar3_small.png'
|
||||
// Check if is this User!
|
||||
const myrec = UserStore.getters.getUserByUsername(username)
|
||||
if (myrec && !!myrec.img) {
|
||||
if (myrec && !!myrec.img && myrec.img !== '' && myrec.img !== 'undefined') {
|
||||
return myrec.img
|
||||
} else {
|
||||
return 'images/avatar/avatar3_small.png'
|
||||
|
||||
@@ -27,6 +27,7 @@ import { serv_constants } from '@src/store/Modules/serv_constants'
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
|
||||
import { dom } from 'quasar'
|
||||
|
||||
const { height, width } = dom
|
||||
|
||||
export interface INotify {
|
||||
@@ -2470,12 +2471,41 @@ export const tools = {
|
||||
// return height()
|
||||
return mythis.$q.screen.height
|
||||
},
|
||||
getwidth(mythis) {
|
||||
// return height()
|
||||
return mythis.$q.screen.width
|
||||
},
|
||||
|
||||
isIsoDate(str) {
|
||||
if (!/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(str)) return false
|
||||
const d = new Date(str)
|
||||
return d.toISOString() === str
|
||||
},
|
||||
|
||||
getLastDateReadReset() {
|
||||
return new Date(1999, 1, 1, 0, 0, 0)
|
||||
},
|
||||
|
||||
isBitActive(bit, whattofind) {
|
||||
return ((bit & whattofind) === whattofind)
|
||||
},
|
||||
|
||||
SetBit(myval, bit) {
|
||||
myval = myval | bit
|
||||
return myval
|
||||
},
|
||||
getUnique(arr, comp) {
|
||||
|
||||
const unique = arr
|
||||
.map(e => e[comp])
|
||||
|
||||
// store the keys of the unique objects
|
||||
.map((e, i, final) => final.indexOf(e) === i && i)
|
||||
|
||||
// eliminate the dead keys & store unique objects
|
||||
.filter(e => arr[e]).map(e => arr[e])
|
||||
|
||||
return unique
|
||||
}
|
||||
|
||||
// getLocale() {
|
||||
|
||||
Reference in New Issue
Block a user