Notifications

Settings Notifications
User Panel
This commit is contained in:
Paolo Arena
2022-07-23 17:44:44 +02:00
parent 6ae82f14cc
commit e2006e683b
18 changed files with 328 additions and 69 deletions

View File

@@ -5,6 +5,8 @@ import {
IMessage, IMsgUsers, INotif,
} from '@model'
import { date } from 'quasar'
import { tools } from '@src/store/Modules/tools'
import { useRouter } from 'vue-router'
@@ -53,7 +55,7 @@ export default defineComponent({
datenotif: new Date()
})
const { getNumNotifUnread, getNumNotif, getUsernameChatByNotif, getImgByNotif, getNotifText, getTypeNotif } = MixinUsers()
const { getNumNotifUnread, getNumNotif, getUsernameChatByNotif, getImgByNotif, getNotifText, getTypeDirNotif, getTypeIdNotif } = MixinUsers()
// function lasts_notifs (state: IUserState) => IMessage[] {
//
@@ -79,8 +81,8 @@ export default defineComponent({
})
function clickNotif(notif: INotif) {
if (notif.link) {
let mylink = tools.updateQueryStringParameter(notif.link, 'idnotif', notif._id)
if (notif.openUrl) {
let mylink = tools.updateQueryStringParameter(notif.openUrl, 'idnotif', notif._id)
console.log('mylink', mylink, notif._id)
if (mylink) {
$router.replace(mylink)
@@ -155,7 +157,8 @@ export default defineComponent({
getUsernameChatByNotif,
getImgByNotif,
getNotifText,
getTypeNotif,
getTypeDirNotif,
getTypeIdNotif,
tools,
usernotifs,
shared_consts,