| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- import AbstractMenuBuilder from '~/services/layout/menuBuilder/abstractMenuBuilder'
- import type { MenuGroup, MenuItems } from '~/types/layout'
- /**
- * Menu Paramètres
- */
- export default class ParametersMenuBuilder extends AbstractMenuBuilder {
- static readonly menuName = 'Parameters'
- /**
- * Construit le menu Header Configuration, ou null si aucune page accessible
- */
- build(): MenuGroup | null {
- const children: MenuItems = []
- if (!this.ability.can('display', 'parameters_page')) {
- return null
- }
- children.push(
- this.createItem(
- 'general_parameters',
- { name: 'fas fa-gears' },
- `/parameters/general_parameters`,
- ),
- )
- children.push(
- this.createItem(
- 'website',
- { name: 'fas fa-globe-americas' },
- `/parameters/website`,
- ),
- )
- if (this.organizationProfile.isSchool) {
- children.push(
- this.createItem(
- 'teaching',
- { name: 'fas fa-school' },
- `/parameters/teaching`,
- ),
- )
- children.push(
- this.createItem(
- 'intranet_breadcrumbs',
- { name: 'fas fa-arrows-down-to-people' },
- `/parameters/intranet`,
- ),
- )
- children.push(
- this.createItem(
- 'educationNotations',
- { name: 'fas fa-graduation-cap' },
- `/parameters/education_notation`,
- ),
- )
- children.push(
- this.createItem(
- 'bulletin',
- { name: 'fas fa-file-lines' },
- `/parameters/bulletin`,
- ),
- )
- children.push(
- this.createItem(
- 'education_timings_breadcrumbs',
- { name: 'fas fa-clock' },
- `/parameters/education_timings`,
- ),
- )
- children.push(
- this.createItem(
- 'residenceAreas',
- { name: 'fas fa-location-dot' },
- `/parameters/residence_areas`,
- ),
- )
- }
- children.push(
- this.createItem(
- 'attendance',
- { name: 'fas fa-user-times' },
- `/parameters/attendances`,
- ),
- )
- if (this.organizationProfile.hasModule('Sms')) {
- children.push(
- this.createItem(
- 'sms_option',
- { name: 'fas fa-mobile' },
- `/parameters/sms`,
- ),
- )
- }
- children.push(
- this.createItem(
- 'super_admin',
- { name: 'fas fa-user-gear' },
- `/parameters/super_admin`,
- ),
- )
- // Voir nouveau découpage?
- // if (this.ability.can('display', 'parameters_page')) {
- // children.push(this.createItem('general_params', {name: 'fas fa-cogs'},`/parameters`, MENU_LINK_TYPE.V1))
- // }
- // if (this.ability.can('display', 'parameters_communication_page')) {
- // children.push(this.createItem('communication_params', {name: 'fas fa-comments'},`/parameters/communication`, MENU_LINK_TYPE.V1))
- // }
- // if (this.ability.can('display', 'parameters_student_page')) {
- // children.push(this.createItem('students_params', {name: 'fas fa-users'},`/parameters/student`, MENU_LINK_TYPE.V1))
- // }
- // if (this.ability.can('display', 'parameters_education_page')) {
- // children.push(this.createItem('education_params', {name: 'fas fa-graduation-cap'},`/parameters/education`, MENU_LINK_TYPE.V1))
- // }
- // if (this.ability.can('display', 'parameters_bills_page')) {
- // children.push(this.createItem('bills_params', {name: 'fas fa-euro-sign'},`/parameters/billing`, MENU_LINK_TYPE.V1))
- // }
- // if (this.ability.can('display', 'parameters_secure_page')) {
- // children.push(this.createItem('secure_params', {name: 'fas fa-lock'},`/parameters/secure`, MENU_LINK_TYPE.V1))
- // }
- if (children.length > 0) {
- return this.createGroup('parameters', undefined, children)
- }
- return null
- }
- }
|