|
|
@@ -14,25 +14,49 @@ export default class ParametersMenuBuilder extends AbstractMenuBuilder {
|
|
|
build(): MenuGroup | null {
|
|
|
const children: MenuItems = []
|
|
|
|
|
|
- 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_page')) {
|
|
|
+ return null
|
|
|
}
|
|
|
- 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))
|
|
|
+
|
|
|
+ children.push(this.createItem('general_parameters', {name: 'fas fa-gears'},`/parameters/general_parameters`))
|
|
|
+ children.push(this.createItem('website', {name: 'fas fa-gears'},`/parameters/website`))
|
|
|
+
|
|
|
+ if (this.organizationProfile.isSchool) {
|
|
|
+ children.push(this.createItem('teaching', {name: 'fas fa-gears'}, `/parameters/teaching`))
|
|
|
+ children.push(this.createItem('intranet_access', {name: 'fas fa-gears'}, `/parameters/intranet`))
|
|
|
+ children.push(this.createItem('educationNotations', {name: 'fas fa-gears'}, `/parameters/education_notation`))
|
|
|
+ children.push(this.createItem('bulletin', {name: 'fas fa-gears'}, `/parameters/bulletin`))
|
|
|
+ children.push(this.createItem('educationTimings', {name: 'fas fa-gears'}, `/parameters/education_timings`))
|
|
|
+ children.push(this.createItem('attendances', {name: 'fas fa-gears'}, `/parameters/attendances`))
|
|
|
+ children.push(this.createItem('residenceAreas', {name: 'fas fa-gears'}, `/parameters/residence_areas`))
|
|
|
}
|
|
|
- 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 (this.organizationProfile.hasModule('Sms')) {
|
|
|
+ children.push(this.createItem('sms_option', {name: 'fas fa-gears'}, `/parameters/sms`))
|
|
|
}
|
|
|
|
|
|
+ children.push(this.createItem('super_admin', {name: 'fas fa-gears'},`/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)
|
|
|
}
|