diff --git a/src/app/structure-list/components/structure-details/structure-details.component.ts b/src/app/structure-list/components/structure-details/structure-details.component.ts index cae5b0b60b3aae1e9ac58aa95f6371ad76f6da7e..5ccbc64f40a8bfc410b34233d07bbc201da618bb 100644 --- a/src/app/structure-list/components/structure-details/structure-details.component.ts +++ b/src/app/structure-list/components/structure-details/structure-details.component.ts @@ -94,6 +94,7 @@ export class StructureDetailsComponent implements OnInit { this.socialAndProfessionalsReferentiel = referentiel; } }); + this.setServiceCategories(); if (this.printMode) { this.printService.onDataReady(); } @@ -249,6 +250,24 @@ export class StructureDetailsComponent implements OnInit { } } + public setServiceCategories(): void { + this.baseSkills = this.structure.baseSkills.map((skill) => + _.find(this.baseSkillssReferentiel.modules, { id: skill }) + ); + this.accessRights = this.structure.accessRight.map((rights) => + _.find(this.accessRightsReferentiel.modules, { id: rights }) + ); + this.parentingHelp = this.structure.parentingHelp.map((help) => + _.find(this.parentingHelpsReferentiel.modules, { id: help }) + ); + this.socialAndProfessional = this.structure.socialAndProfessional.map((skill) => + _.find(this.socialAndProfessionalsReferentiel.modules, { id: skill }) + ); + this.digitalCultureSecurity = this.structure.digitalCultureSecurity.map((skill) => + _.find(this.digitalCultureSecuritysReferentiel.modules, { id: skill }) + ); + } + public keepOriginalOrder = (a, b) => a.key; public isBaseSkills(): boolean {