Notification: Set a new Friendship and Accepted Friendship

This commit is contained in:
Paolo Arena
2022-07-26 15:46:29 +02:00
parent e2006e683b
commit 43619ec719
15 changed files with 78 additions and 39 deletions

View File

@@ -18,8 +18,7 @@ export const useNotifStore = defineStore('NotifStore', {
getters: {
getlasts_notifs: (mystate: INotifState) => (): INotif[] => {
const ctrec = (mystate.last_notifs) ? mystate.last_notifs.slice(0, 10).filter((rec) => mystate.show_all ? true : !rec.read) : []
// const ctrec = (mystate.notifs) ? mystate.notifs.slice().reverse().slice(0, 5) : []
const ctrec = (mystate.last_notifs) ? mystate.last_notifs.slice(0, 20).filter((rec) => mystate.show_all ? true : !rec.read) : []
return (ctrec)
},
@@ -131,6 +130,7 @@ export const useNotifStore = defineStore('NotifStore', {
data.typeid = notif.typeid
data.sender = notif.sender
data.dest = notif.dest
data.title = notif.title
data.descr = notif.descr
data.datenotif = tools.getDateNow()
data.read = false