Friendship Accepted and Refused (notification updated)

This commit is contained in:
Paolo Arena
2022-07-27 20:55:47 +02:00
parent 43619ec719
commit 7f23fe6d05
10 changed files with 87 additions and 16 deletions

View File

@@ -5,6 +5,7 @@ import { useGlobalStore } from '@store/globalStore'
import { useProducts } from '@store/Products'
import { serv_constants } from '@store/Modules/serv_constants'
import { tools } from '@store/Modules/tools'
import { shared_consts } from '@src/common/shared_vuejs'
// You can declare a mixin as the same style as components.
export default function () {
@@ -156,9 +157,20 @@ export default function () {
return ris
}
function getNotifText(notif: INotif) {
function getNotifText($t: any, notif: INotif) {
let descr = notif.descr
if (notif.typedir === shared_consts.TypeNotifs.TYPEDIR_FRIENDS) {
if (notif.status === shared_consts.StatusNotifs.STATUS_FRIENDS_ACCEPTED) {
descr += '\n' + $t('friends.accepted')
} else if (notif.status === shared_consts.StatusNotifs.STATUS_FRIENDS_REFUSED) {
descr += '\n' + $t('friends.refused')
}
}
return descr
return notif.descr
}
function getNumNotif() {