diff --git a/src/app/structure-list/components/structure-details/structure-details.component.html b/src/app/structure-list/components/structure-details/structure-details.component.html index 160c48a0b30d7d0a7d4442e9d6e546c97bf10a8d..8d9190266c447c4cc1bcf153707c2b7e724a819f 100644 --- a/src/app/structure-list/components/structure-details/structure-details.component.html +++ b/src/app/structure-list/components/structure-details/structure-details.component.html @@ -207,6 +207,10 @@ </div> </div> </div> + <div *ngIf="structure.exceptionalClosures" class="bold-info"> + <h3 class="subtitle">Précisions sur les horaires</h3> + <p>{{ structure.exceptionalClosures }}</p> + </div> </div> <!-- Démarches en ligne --> <div @@ -233,7 +237,7 @@ </div> <!-- Ateliers --> <div - *ngIf="isBaseSkills() || isAccessRights()" + *ngIf="isBaseSkills() || isAccessRights() || isParentingHelp() || isSocialAndProfessional() || isDigitalSecurity()" fxLayout="column" class="structure-details-block" fxLayoutAlign="baseline baseline" @@ -243,16 +247,33 @@ <app-svg-icon [type]="'ico'" [icon]="'services'" [iconClass]="'icon-32'"></app-svg-icon> <h2>Ateliers</h2> </div> - <span class="bold-info">L'accès à ces ateliers peut être payant</span> - <div fxLayout="row" class="w-100 mobile-column"> - <div fxFlex="50%" *ngIf="isBaseSkills()"> + <div *ngIf="structure.freeWorkShop"> + <span class="bold-info">L'accès à ces ateliers est gratuit</span> + </div> + <div *ngIf="!structure.freeWorkShop"> + <span class="bold-info">L'accès à ces ateliers est payant</span> + </div> + <div class="wrapper"> + <div *ngIf="isBaseSkills()"> <h3 class="subtitle">Compétences de base</h3> <p *ngFor="let skill of baseSkills">{{ skill.text }}</p> </div> - <div fxFlex="50%" *ngIf="isAccessRights()"> + <div *ngIf="isAccessRights()"> <h3 class="subtitle">Accès aux droits</h3> <p *ngFor="let rights of accessRights">{{ rights.text }}</p> </div> + <div *ngIf="isParentingHelp()"> + <h3 class="subtitle">Aide à la parentalité</h3> + <p *ngFor="let help of parentingHelp">{{ help.text }}</p> + </div> + <div *ngIf="isSocialAndProfessional()"> + <h3 class="subtitle">Insertion sociale et professionnelle</h3> + <p *ngFor="let skill of socialAndProfessional">{{ skill.text }}</p> + </div> + <div *ngIf="isDigitalSecurity()"> + <h3 class="subtitle">Culture et sécurité numérique</h3> + <p *ngFor="let skill of digitalCultureSecurity">{{ skill.text }}</p> + </div> </div> </div> <!-- Equipements --> diff --git a/src/app/structure-list/components/structure-details/structure-details.component.scss b/src/app/structure-list/components/structure-details/structure-details.component.scss index 77a9025cc2ea1a08097687f61b7cfa76d1b9acda..3cd1e7184f8b0d477f59c30eae24560e9c68f09f 100644 --- a/src/app/structure-list/components/structure-details/structure-details.component.scss +++ b/src/app/structure-list/components/structure-details/structure-details.component.scss @@ -119,3 +119,10 @@ p, .info { color: $ram-hover-principal; } + +.wrapper { + width: 100%; + display: grid; + gap: 20px 30px; + grid-template-columns: 1fr 1fr; +} \ No newline at end of file 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 2bea610b866f383a497841222d6c0497d8b063ae..286c670b546355071898ec2e35b9b2875598f51e 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 @@ -27,8 +27,14 @@ export class StructureDetailsComponent implements OnInit { public baseSkillssReferentiel: Category; public accessRightsReferentiel: Category; + public digitalCultureSecuritysReferentiel: Category; + public socialAndProfessionalsReferentiel: Category; + public parentingHelpsReferentiel: Category; public baseSkills: Module[]; public accessRights: Module[]; + public parentingHelp: Module[]; + public socialAndProfessional: Module[]; + public digitalCultureSecurity: Module[]; public tclStopPoints: TclStopPoint[] = []; public printMode = false; public isClaimed: boolean = null; @@ -70,6 +76,12 @@ export class StructureDetailsComponent implements OnInit { this.baseSkillssReferentiel = referentiel; } else if (referentiel.isRigthtsAccess()) { this.accessRightsReferentiel = referentiel; + } else if (referentiel.isDigitalCultureSecurity()) { + this.digitalCultureSecuritysReferentiel = referentiel; + } else if (referentiel.isParentingHelp()) { + this.parentingHelpsReferentiel = referentiel; + } else if (referentiel.isSocialAndProfessional()) { + this.socialAndProfessionalsReferentiel = referentiel; } }); this.setServiceCategories(); @@ -223,6 +235,15 @@ export class StructureDetailsComponent implements OnInit { 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; @@ -233,6 +254,15 @@ export class StructureDetailsComponent implements OnInit { public isAccessRights(): boolean { return this.accessRights && this.accessRights[0] !== undefined; } + public isParentingHelp(): boolean { + return this.parentingHelp && this.parentingHelp[0] !== undefined; + } + public isSocialAndProfessional(): boolean { + return this.socialAndProfessional && this.socialAndProfessional[0] !== undefined; + } + public isDigitalSecurity(): boolean { + return this.digitalCultureSecurity && this.digitalCultureSecurity[0] !== undefined; + } public getTclStopPoints(): void { this.tclService.getTclStopPointBycoord(this.structure.getLon(), this.structure.getLat()).subscribe((res) => { diff --git a/src/app/structure-list/models/category.model.ts b/src/app/structure-list/models/category.model.ts index e08e40a1507b5a5eda8de1b98503271759509df8..2aa78bbf3c1c2628005ce2c2fa5c5c829492e726 100644 --- a/src/app/structure-list/models/category.model.ts +++ b/src/app/structure-list/models/category.model.ts @@ -21,4 +21,16 @@ export class Category { public isRigthtsAccess(): boolean { return this.name === 'Accès aux droits'; } + + public isParentingHelp(): boolean { + return this.name === 'Aide à la parentalité'; + } + + public isDigitalCultureSecurity(): boolean { + return this.name === 'Culture et sécurité numérique'; + } + + public isSocialAndProfessional(): boolean { + return this.name === 'Insertion sociale et professionnelle'; + } }