Explorar el Código

v8-4454 after tests fixes 2

Olivier Massot hace 2 años
padre
commit
8c87c594cb

+ 1 - 1
components/Layout/Header/UniversalCreation/GenerateCardsSteps.vue

@@ -240,6 +240,6 @@
   const isLaw1901: ComputedRef<boolean> = organizationProfile.isAssociation
 
   const makeAdminUrl = (tail: string) => {
-    return UrlUtils.join(runtimeConfig.baseUrlAdminLegacy, tail)
+    return UrlUtils.join(runtimeConfig.baseUrlAdminLegacy, '#', tail)
   }
 </script>

+ 1 - 1
config/abilities/pages/educational.yaml

@@ -13,7 +13,7 @@
   seizure_period_page:
     action: 'display'
     conditions:
-      - {function: organizationHasAnyModule, parameters: ['PedagogicsAdministation']}
+      - {function: organizationHasAnyModule, parameters: ['PeriodValidation']}
       - {function: accessHasAnyRoleAbility, parameters: [{action: 'read', subject: 'pedagogics-administration'}]}
 
   test_seizure_page:

+ 1 - 0
lang/fr.json

@@ -428,6 +428,7 @@
   "stats": "Statistiques",
   "report_activity": "Rapport d'activité",
   "educations_quotas_by_education": "Quotas par enseignement",
+  "accesses_quotas_courses_hebdos": "Quotas hebdomadaires",
   "fede_stats": "Fédérations",
   "structure_stats": "Structures",
   "rate_cotisation": "Saisie du tarif",

+ 33 - 5
services/layout/menuBuilder/configurationMenuBuilder.ts

@@ -1,6 +1,7 @@
 import AbstractMenuBuilder from '~/services/layout/menuBuilder/abstractMenuBuilder'
 import {MenuGroup, MenuItem, MenuItems} from "~/types/layout";
 import {MENU_LINK_TYPE} from "~/types/enum/layout";
+import UrlUtils from "~/services/utils/urlUtils";
 
 /**
  * Classe pour la construction du Menu Paramètres
@@ -15,15 +16,28 @@ export default class ConfigurationMenuBuilder extends AbstractMenuBuilder {
     const children: MenuItems = []
 
     if (this.ability.can('display', 'organization_page')) {
-      children.push(this.createItem('organization_page', undefined, `/organization`, MENU_LINK_TYPE.V1))
+      children.push(
+          this.createItem(
+            'organization_page',
+            undefined,
+            UrlUtils.join('/main/organizations', this.organizationProfile.id ?? '', '/dashboard'),
+            MENU_LINK_TYPE.V1)
+      )
     }
 
     if (this.ability.can('display', 'cmf_licence_page')) {
-      children.push(this.createItem('cmf_licence_generate', undefined, '/cmf_licence/organization', MENU_LINK_TYPE.V1))
+      children.push(this.createItem('cmf_licence_generate', undefined, '/licence_cmf/organization', MENU_LINK_TYPE.V1))
     }
 
     if (this.ability.can('display', 'parameters_page')) {
-      children.push(this.createItem('parameters', undefined,`/parameters`, MENU_LINK_TYPE.V1))
+      children.push(
+          this.createItem(
+              'parameters',
+              undefined,
+              UrlUtils.join('/main/edit/parameters', this.organizationProfile.id ?? ''),
+              MENU_LINK_TYPE.V1
+          )
+      )
     }
 
     if (this.ability.can('display', 'place_page')) {
@@ -47,11 +61,25 @@ export default class ConfigurationMenuBuilder extends AbstractMenuBuilder {
     }
 
     if (this.ability.can('display', 'billing_settings_page')) {
-      children.push(this.createItem('billing_settings', undefined, '/main/edit/billing_settings/' + this.organizationProfile.id, MENU_LINK_TYPE.V1))
+      children.push(
+          this.createItem(
+            'billing_settings',
+            undefined,
+              UrlUtils.join('/main/edit/billing_settings/', this.organizationProfile.id ?? ''),
+            MENU_LINK_TYPE.V1
+          )
+      )
     }
 
     if (this.ability.can('display', 'online_registration_settings_page')) {
-      children.push(this.createItem('online_registration_settings', undefined, '/main/edit/online_registration_settings/' + this.organizationProfile.id, MENU_LINK_TYPE.V1))
+      children.push(
+          this.createItem(
+              'online_registration_settings',
+              undefined,
+              UrlUtils.join('/main/edit/online_registration_settings/', this.organizationProfile.id ?? ''),
+              MENU_LINK_TYPE.V1
+          )
+      )
     }
 
     if (this.ability.can('display', 'transition_next_year_page')) {

+ 5 - 0
services/layout/menuBuilder/statsMenuBuilder.ts

@@ -20,6 +20,7 @@ export default class StatsMenuBuilder extends AbstractMenuBuilder {
 
     if (this.ability.can('display', 'education_quotas_page')) {
       children.push(this.createItem('educations_quotas_by_education', {name: 'fas fa-user-circle'}, '/educations_quotas_by_education_year/list/', MENU_LINK_TYPE.V1))
+      children.push(this.createItem('accesses_quotas_courses_hebdos', {name: 'fas fa-user-circle'}, '/accesses_quotas_courses_hebdos/list/', MENU_LINK_TYPE.V1))
     }
 
     if (this.ability.can('display', 'fede_stats_page')) {
@@ -30,6 +31,10 @@ export default class StatsMenuBuilder extends AbstractMenuBuilder {
       children.push(this.createItem('structure_stats', {name: 'fas fa-chart-bar'}, '/statistic/membersfedeassos', MENU_LINK_TYPE.V1))
     }
 
+    if (this.ability.can('display', 'structure_stats_page')) {
+      children.push(this.createItem('structure_stats', {name: 'fas fa-chart-bar'}, '/statistic/membersfedeassos', MENU_LINK_TYPE.V1))
+    }
+
     if (children.length > 1) {
       // Plusieurs éléments, on retourne un groupe
       return this.createGroup('stats', {name: 'fas fa-chart-bar'}, children)