Skip to content
Snippets Groups Projects
Commit a077f0d5 authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

Merge branch 'fix/structure-info' into 'dev'

Fix/structure info

See merge request web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client!108
parents b7f9f384 8f90f320
No related branches found
No related tags found
3 merge requests!178release V1.10.0,!111Dev,!108Fix/structure info
......@@ -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 -->
......
......@@ -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
......@@ -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) => {
......
......@@ -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';
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment