|
@@ -48,6 +48,9 @@ class Menu{
|
|
|
const billingMenu = this.billingMenu()
|
|
const billingMenu = this.billingMenu()
|
|
|
if(billingMenu) menu.push(billingMenu)
|
|
if(billingMenu) menu.push(billingMenu)
|
|
|
|
|
|
|
|
|
|
+ const communicationMenu = this.communicationMenu()
|
|
|
|
|
+ if(communicationMenu) menu.push(communicationMenu)
|
|
|
|
|
+
|
|
|
return ref(menu)
|
|
return ref(menu)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -198,6 +201,31 @@ class Menu{
|
|
|
return children.length > 0 ? this.constructMenu('fa-euro-sign', 'billing', undefined, undefined, children) : null;
|
|
return children.length > 0 ? this.constructMenu('fa-euro-sign', 'billing', undefined, undefined, children) : null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Construit le menu Communication ou null si aucune page accessible
|
|
|
|
|
+ * @return {ItemMenu | null}
|
|
|
|
|
+ */
|
|
|
|
|
+ communicationMenu():ItemMenu | null {
|
|
|
|
|
+ const children:ItemsMenu = [];
|
|
|
|
|
+
|
|
|
|
|
+ if (this.$ability().can('display', 'inbox_page')) {
|
|
|
|
|
+ children.push(this.constructMenu('fa-inbox', 'inbox', '/messages/list/', true))
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (this.$ability().can('display', 'message_send_page')) {
|
|
|
|
|
+ children.push(this.constructMenu('fa-paper-plane', 'message_send', '/messagessends/list/', true))
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (this.$ability().can('display', 'message_templates_page')) {
|
|
|
|
|
+ children.push(this.constructMenu('fa-edit', 'message_templates', '/templates/list/', true))
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(children.length === 1){
|
|
|
|
|
+ return children[0];
|
|
|
|
|
+ }
|
|
|
|
|
+ return children.length > 0 ? this.constructMenu('fa-comments', 'communication', undefined, undefined, children) : null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Construit un ItemMenu
|
|
* Construit un ItemMenu
|