Friends Notification
Starting Group Create Notification...
This commit is contained in:
@@ -862,6 +862,8 @@ export const shared_consts = {
|
|||||||
StatusNotifs: {
|
StatusNotifs: {
|
||||||
STATUS_FRIENDS_ACCEPTED: 1,
|
STATUS_FRIENDS_ACCEPTED: 1,
|
||||||
STATUS_FRIENDS_REFUSED: 2,
|
STATUS_FRIENDS_REFUSED: 2,
|
||||||
|
STATUS_GROUPS_ACCEPTED: 3,
|
||||||
|
STATUS_GROUPS_REFUSED: 4,
|
||||||
},
|
},
|
||||||
|
|
||||||
TypeNotifs: {
|
TypeNotifs: {
|
||||||
@@ -876,10 +878,13 @@ export const shared_consts = {
|
|||||||
TYPEDIR_FRIENDS: 3,
|
TYPEDIR_FRIENDS: 3,
|
||||||
ID_FRIENDS_NEW_REC: 1,
|
ID_FRIENDS_NEW_REC: 1,
|
||||||
ID_FRIENDS_ACCEPTED: 2,
|
ID_FRIENDS_ACCEPTED: 2,
|
||||||
|
ID_FRIENDS_REFUSED: 3,
|
||||||
|
ID_FRIENDS_ACCEPTED_MY_REQUEST: 4,
|
||||||
|
|
||||||
TYPEDIR_GROUPS: 4,
|
TYPEDIR_GROUPS: 4,
|
||||||
ID_GROUP_NEW_REC: 1,
|
ID_GROUP_NEW_REC: 1,
|
||||||
ID_GROUP_ACCEPTED: 2,
|
ID_GROUP_ACCEPTED: 2,
|
||||||
|
ID_GROUP_REFUSED: 3,
|
||||||
|
|
||||||
TYPEDIR_CIRCUITS: 5,
|
TYPEDIR_CIRCUITS: 5,
|
||||||
|
|
||||||
@@ -934,12 +939,24 @@ export const shared_consts = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 4, //
|
value: 4, //
|
||||||
|
labeltrans: 'typenotifs.groups',
|
||||||
|
descr: 'typenotifs.friends_descr',
|
||||||
|
icon:'fas fa-user-plus',
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
value: 1, // ID_GROUP_NEW_REC
|
||||||
|
labeltrans: 'notifsid.groups_new',
|
||||||
|
}
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 5, //
|
||||||
labeltrans: 'typenotifs.circuits',
|
labeltrans: 'typenotifs.circuits',
|
||||||
descr: 'typenotifs.circuits_descr',
|
descr: 'typenotifs.circuits_descr',
|
||||||
icon:'fas fa-coins',
|
icon:'fas fa-coins',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5, //
|
value: 6, //
|
||||||
labeltrans: 'typenotifs.booking',
|
labeltrans: 'typenotifs.booking',
|
||||||
descr: '',
|
descr: '',
|
||||||
icon:'fas fa-book-open',
|
icon:'fas fa-book-open',
|
||||||
@@ -989,6 +1006,11 @@ export const shared_consts = {
|
|||||||
labeltrans: 'notifs.new_friends',
|
labeltrans: 'notifs.new_friends',
|
||||||
directory: 3,
|
directory: 3,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
value: 1, //
|
||||||
|
labeltrans: 'notifsid.groups_new',
|
||||||
|
directory: 4,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -850,12 +850,12 @@ export default defineComponent({
|
|||||||
// refresh()
|
// refresh()
|
||||||
})
|
})
|
||||||
|
|
||||||
function isTutor() {
|
function isFacilitatore() {
|
||||||
return userStore.isTutor
|
return userStore.isFacilitatore
|
||||||
}
|
}
|
||||||
|
|
||||||
function disabilita() {
|
function disabilita() {
|
||||||
if ((mytable.value === 'users') && (isTutor())) {
|
if ((mytable.value === 'users') && (isFacilitatore() && !userStore.isAdmin && !userStore.isManager)) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -108,8 +108,8 @@ export default defineComponent({
|
|||||||
return isSocio.value ? 'green-7' : 'white'
|
return isSocio.value ? 'green-7' : 'white'
|
||||||
}
|
}
|
||||||
|
|
||||||
function isTutor() {
|
function isFacilitatore() {
|
||||||
return userStore.isTutor
|
return userStore.isFacilitatore
|
||||||
}
|
}
|
||||||
|
|
||||||
function isZoomeri() {
|
function isZoomeri() {
|
||||||
@@ -443,7 +443,7 @@ export default defineComponent({
|
|||||||
getClassColorHeader,
|
getClassColorHeader,
|
||||||
getcart,
|
getcart,
|
||||||
getnumItemsCart,
|
getnumItemsCart,
|
||||||
isTutor,
|
isFacilitatore,
|
||||||
isZoomeri,
|
isZoomeri,
|
||||||
isTratuttrici,
|
isTratuttrici,
|
||||||
getUsernameChatByMsg,
|
getUsernameChatByMsg,
|
||||||
|
|||||||
@@ -199,7 +199,7 @@
|
|||||||
<div v-if="isSocioResidente()" class="text-weight-bold text-user q-px-xs bg-amber">Residente</div>
|
<div v-if="isSocioResidente()" class="text-weight-bold text-user q-px-xs bg-amber">Residente</div>
|
||||||
<div v-if="isConsiglio()" class="text-weight-bold text-user q-px-xs bg-deep-orange-10">Consiglio</div>
|
<div v-if="isConsiglio()" class="text-weight-bold text-user q-px-xs bg-deep-orange-10">Consiglio</div>
|
||||||
<div v-if="isManager()" class="text-weight-bold text-user bg-blue q-px-xs">Segreteria</div>
|
<div v-if="isManager()" class="text-weight-bold text-user bg-blue q-px-xs">Segreteria</div>
|
||||||
<div v-if="isTutor()" class="text-weight-bold text-user q-px-xs">Facilitatore</div>
|
<div v-if="isFacilitatore()" class="text-weight-bold text-user q-px-xs">Facilitatore</div>
|
||||||
<div v-if="isTratuttrici()" class="text-weight-bold text-user q-px-xs">Editor</div>
|
<div v-if="isTratuttrici()" class="text-weight-bold text-user q-px-xs">Editor</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!tools.isLogged()" class="text-user text-italic bg-red">
|
<div v-if="!tools.isLogged()" class="text-user text-italic bg-red">
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
color: green !important;
|
color: green !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.isTutor {
|
.isFacilitatore {
|
||||||
color: #201a80;
|
color: #201a80;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ export default defineComponent({
|
|||||||
if (elem.onlySocioResidente) menu += ' isSocioResidente'
|
if (elem.onlySocioResidente) menu += ' isSocioResidente'
|
||||||
if (elem.onlyConsiglio) menu += ' isConsiglio'
|
if (elem.onlyConsiglio) menu += ' isConsiglio'
|
||||||
if (elem.onlyDepartment) menu += ' isDepartment'
|
if (elem.onlyDepartment) menu += ' isDepartment'
|
||||||
if (elem.onlyFacilitatore) menu += ' isTutor'
|
if (elem.onlyFacilitatore) menu += ' isFacilitatore'
|
||||||
if (elem.onlyEditor) menu += ' isEditor'
|
if (elem.onlyEditor) menu += ' isEditor'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -85,12 +85,11 @@
|
|||||||
</q-avatar>
|
</q-avatar>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
||||||
<q-item-section v-ripple @click="clickNotif(notif)">
|
<q-item-section v-ripple>
|
||||||
<q-item-label lines="3" :class="(!notif.read) ? 'unread' : 'read'">
|
<q-item-label lines="3" :class="(!notif.read) ? 'unread' : 'read'" @click="clickNotif(notif)">
|
||||||
<div v-html="getNotifText($t, notif, false)"></div>
|
<div v-html="getNotifText($t, notif, false)"></div>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
|
<q-item-label caption lines="2" v-if="notif.typedir === shared_consts.TypeNotifs.TYPEDIR_FRIENDS && notif.status === 0" v-ripple>
|
||||||
<q-item-label caption lines="2" v-if="notif.typedir === shared_consts.TypeNotifs.TYPEDIR_FRIENDS && notif.status === 0">
|
|
||||||
<div class="row no-wrap justify-evenly" v-if="userStore.IsReqFriendByUsername(notif.sender)">
|
<div class="row no-wrap justify-evenly" v-if="userStore.IsReqFriendByUsername(notif.sender)">
|
||||||
<q-btn
|
<q-btn
|
||||||
dense
|
dense
|
||||||
@@ -111,7 +110,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
|
|
||||||
<q-item-label caption lines="1" :class="(!notif.read) ? 'unread-date' : 'read-date'">
|
<q-item-label caption lines="1" :class="(!notif.read) ? 'unread-date' : 'read-date'" @click="clickNotif(notif)">
|
||||||
{{ tools.timeAgo(notif.datenotif) }}
|
{{ tools.timeAgo(notif.datenotif) }}
|
||||||
<!--{{ // getUsernameChatByNotif(notif) }}-->
|
<!--{{ // getUsernameChatByNotif(notif) }}-->
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ export interface IUserState {
|
|||||||
isAdmin?: boolean
|
isAdmin?: boolean
|
||||||
isManager?: boolean
|
isManager?: boolean
|
||||||
isDepartment?: boolean
|
isDepartment?: boolean
|
||||||
isTutor?: boolean
|
isFacilitatore?: boolean
|
||||||
isZoomeri?: boolean
|
isZoomeri?: boolean
|
||||||
isTratuttrici?: boolean
|
isTratuttrici?: boolean
|
||||||
isEditor?: boolean
|
isEditor?: boolean
|
||||||
|
|||||||
@@ -774,6 +774,7 @@ const msg_it = {
|
|||||||
new_rec_bacheca: 'Annunci',
|
new_rec_bacheca: 'Annunci',
|
||||||
new_rec_bacheca_descr: 'Avvisami se vengono aggiunti nuovi Annunci',
|
new_rec_bacheca_descr: 'Avvisami se vengono aggiunti nuovi Annunci',
|
||||||
friends: 'Richieste di Amicizia',
|
friends: 'Richieste di Amicizia',
|
||||||
|
groups: 'Gruppi',
|
||||||
friends_descr: 'Avvisami se:',
|
friends_descr: 'Avvisami se:',
|
||||||
events: 'Eventi',
|
events: 'Eventi',
|
||||||
events_descr: 'Avvisami se vengono aggiunti nuovi Eventi',
|
events_descr: 'Avvisami se vengono aggiunti nuovi Eventi',
|
||||||
@@ -786,6 +787,7 @@ const msg_it = {
|
|||||||
bacheca_new_service: 'Nuovo Servizio',
|
bacheca_new_service: 'Nuovo Servizio',
|
||||||
events_new: 'Nuovo Evento',
|
events_new: 'Nuovo Evento',
|
||||||
friends_new: 'Nuova Richiesta di Amicizia',
|
friends_new: 'Nuova Richiesta di Amicizia',
|
||||||
|
groups_new: 'Si creano Nuovi Gruppi',
|
||||||
},
|
},
|
||||||
event: {
|
event: {
|
||||||
_id: 'id',
|
_id: 'id',
|
||||||
|
|||||||
@@ -1736,7 +1736,7 @@ export const tools = {
|
|||||||
|| (elem.onlySocioResidente && userStore.my.profile.socioresidente)
|
|| (elem.onlySocioResidente && userStore.my.profile.socioresidente)
|
||||||
|| (elem.onlyConsiglio && userStore.my.profile.consiglio)
|
|| (elem.onlyConsiglio && userStore.my.profile.consiglio)
|
||||||
|| (elem.onlyNotSoci && !userStore.my.profile.socio)
|
|| (elem.onlyNotSoci && !userStore.my.profile.socio)
|
||||||
|| (elem.onlyFacilitatore && userStore.isTutor)
|
|| (elem.onlyFacilitatore && userStore.isFacilitatore)
|
||||||
|| (elem.onlyEditor && userStore.isEditor)
|
|| (elem.onlyEditor && userStore.isEditor)
|
||||||
|| (elem.onlyDepartment && userStore.isDepartment)
|
|| (elem.onlyDepartment && userStore.isDepartment)
|
||||||
|| ((!elem.onlyAdmin) && (!elem.onlyManager) && (!elem.onlyFacilitatore) && (!elem.onlyEditor) && (!elem.onlyDepartment)
|
|| ((!elem.onlyAdmin) && (!elem.onlyManager) && (!elem.onlyFacilitatore) && (!elem.onlyEditor) && (!elem.onlyDepartment)
|
||||||
@@ -2231,9 +2231,9 @@ export const tools = {
|
|||||||
return userStore.isAdmin
|
return userStore.isAdmin
|
||||||
},
|
},
|
||||||
|
|
||||||
isTutor() {
|
isFacilitatore() {
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
return userStore.isTutor
|
return userStore.isFacilitatore
|
||||||
},
|
},
|
||||||
|
|
||||||
isZoomeri() {
|
isZoomeri() {
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ export const useUserStore = defineStore('UserStore', {
|
|||||||
isAdmin: false,
|
isAdmin: false,
|
||||||
isManager: false,
|
isManager: false,
|
||||||
isDepartment: false,
|
isDepartment: false,
|
||||||
isTutor: false,
|
isFacilitatore: false,
|
||||||
isZoomeri: false,
|
isZoomeri: false,
|
||||||
isTratuttrici: false,
|
isTratuttrici: false,
|
||||||
isEditor: false,
|
isEditor: false,
|
||||||
@@ -540,7 +540,7 @@ export const useUserStore = defineStore('UserStore', {
|
|||||||
|
|
||||||
this.isAdmin = tools.isBitActive(this.my.perm, shared_consts.Permissions.Admin.value)
|
this.isAdmin = tools.isBitActive(this.my.perm, shared_consts.Permissions.Admin.value)
|
||||||
this.isManager = tools.isBitActive(this.my.perm, shared_consts.Permissions.Manager.value)
|
this.isManager = tools.isBitActive(this.my.perm, shared_consts.Permissions.Manager.value)
|
||||||
this.isTutor = tools.isBitActive(this.my.perm, shared_consts.Permissions.Facilitatore.value)
|
this.isFacilitatore = tools.isBitActive(this.my.perm, shared_consts.Permissions.Facilitatore.value)
|
||||||
this.isZoomeri = tools.isBitActive(this.my.perm, shared_consts.Permissions.Zoomeri.value)
|
this.isZoomeri = tools.isBitActive(this.my.perm, shared_consts.Permissions.Zoomeri.value)
|
||||||
this.isDepartment = tools.isBitActive(this.my.perm, shared_consts.Permissions.Department.value)
|
this.isDepartment = tools.isBitActive(this.my.perm, shared_consts.Permissions.Department.value)
|
||||||
this.isTeacher = tools.isBitActive(this.my.perm, shared_consts.Permissions.Teacher.value)
|
this.isTeacher = tools.isBitActive(this.my.perm, shared_consts.Permissions.Teacher.value)
|
||||||
|
|||||||
@@ -1387,7 +1387,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
// const isLogged = localStorage.getItem(toolsext.localStorage.username)
|
// const isLogged = localStorage.getItem(toolsext.localStorage.username)
|
||||||
console.log('isLogged', isLogged)
|
console.log('isLogged', isLogged)
|
||||||
|
|
||||||
// calendarStore.editable = userStore.isAdmin || userStore.isManager || userStore.isTutor
|
// calendarStore.editable = userStore.isAdmin || userStore.isManager || userStore.isFacilitatore
|
||||||
if (res.data.myuser === null) {
|
if (res.data.myuser === null) {
|
||||||
if (isLogged) {
|
if (isLogged) {
|
||||||
// Fai Logout
|
// Fai Logout
|
||||||
|
|||||||
Reference in New Issue
Block a user