|
|
@@ -29,13 +29,69 @@ class AccountMenu extends BaseMenu implements Menu {
|
|
|
getHeaderMenu (): ItemMenu | null {
|
|
|
const children: ItemsMenu = []
|
|
|
|
|
|
- if (this.$ability.can('display', 'organization_page')) {
|
|
|
- children.push(this.constructMenu('organization_page', undefined, '/organization/edit'))
|
|
|
+ if (this.$ability.can('display', 'my_schedule_page')) {
|
|
|
+ children.push(this.constructMenu('my_schedule_page', undefined, '/my_calendar', true))
|
|
|
}
|
|
|
|
|
|
- children.push(this.constructMenu('my_subscription', undefined, '/organization/subscription'))
|
|
|
+ if (this.$ability.can('display', 'attendance_bookings_page')) {
|
|
|
+ children.push(this.constructMenu('attendance_bookings_menu', undefined, '/attendance_bookings', true))
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.$ability.can('display', 'my_attendance_page')) {
|
|
|
+ children.push(this.constructMenu('my_attendance', undefined, '/my_attendances/list', true))
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.$ability.can('display', 'my_invitation_page')) {
|
|
|
+ children.push(this.constructMenu('my_invitation', undefined, '/my_invitations/list', true))
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.$ability.can('display', 'my_students_page')) {
|
|
|
+ children.push(this.constructMenu('my_students', undefined, '/my_students/list', true))
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.$ability.can('display', 'my_students_education_students_page')) {
|
|
|
+ children.push(this.constructMenu('my_students_education_students', undefined, '/my_students_education_students/list', true))
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.$ability.can('display', 'criteria_notations_page') || this.$ability.can('display', 'criteria_notations_page_from_account_menu')) {
|
|
|
+ children.push(this.constructMenu('criteria_notations', undefined, '/criteria_notations/list', true))
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.$ability.can('display', 'my_education_students_page')) {
|
|
|
+ children.push(this.constructMenu('my_education_students', undefined, `/main/my_profile/${this.$store.state.profile.access.id}/dashboard/my_education_students/list`, true))
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.$ability.can('display', 'send_an_email_page')) {
|
|
|
+ children.push(this.constructMenu('send_an_email', undefined, `/list/create/emails`, true))
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.$ability.can('display', 'my_documents_page')) {
|
|
|
+ children.push(this.constructMenu('my_documents', undefined, `/main/my_profile/${this.$store.state.profile.access.id}/dashboard/show/my_access_file`, true))
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.$ability.can('display', 'my_profile_page')) {
|
|
|
+ children.push(this.constructMenu('my_profile', undefined, `/main/my_profile/${this.$store.state.profile.access.id}/dashboard`, true))
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.$ability.can('display', 'adherent_list_page')) {
|
|
|
+ children.push(this.constructMenu('adherent_list', undefined, `/adherent_contacts/list/`, true))
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.$ability.can('display', 'subscription_page')) {
|
|
|
+ children.push(this.constructMenu('my_subscription', undefined, `/subscription`, true))
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.$ability.can('display', 'my_bills_page')) {
|
|
|
+ children.push(this.constructMenu('my_bills', undefined, `/main/my_profile/${this.$store.state.profile.access.id}/dashboard/show/my_bills`, true))
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.$ability.can('display', 'cmf_licence_page')) {
|
|
|
+ children.push(this.constructMenu('print_my_licence', undefined, `/licence-cmf`, true))
|
|
|
+ }
|
|
|
+
|
|
|
+ children.push(this.constructMenu('logout', undefined, `/logout`, true))
|
|
|
|
|
|
- return children.length > 0 ? this.constructMenu('configuration', 'fa-user', undefined, undefined, children) : null
|
|
|
+ return children.length > 0 ? this.constructMenu('my_account', 'fa-user', undefined, undefined, children) : null;
|
|
|
}
|
|
|
}
|
|
|
|