From bcded9a8238f113cb8fa330a14363344e4e00205 Mon Sep 17 00:00:00 2001 From: Antonin Coquet <ext.sopra.acoquet@grandlyon.com> Date: Mon, 22 Mar 2021 16:50:29 +0100 Subject: [PATCH 1/5] fix: workshop price and closures hours --- .../structure-details/structure-details.component.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 160c48a0b..475c4791b 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 @@ -159,6 +159,7 @@ <h2>Accueil</h2> </div> <!-- Openning Hours --> + <div *ngIf="structure.exceptionalClosures" class="bold-info">{{structure.exceptionalClosures}}</div> <div fxLayout="row" class="w-100 mobile-column"> <div *ngIf="structure.hours.hasData()" fxFlex="50%"> <h3 class="subtitle">Horaires d’ouverture au public</h3> @@ -243,7 +244,12 @@ <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 *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 fxLayout="row" class="w-100 mobile-column"> <div fxFlex="50%" *ngIf="isBaseSkills()"> <h3 class="subtitle">Compétences de base</h3> -- GitLab From 42d5b064b60481ffc203f1daedba98f63aefe5f5 Mon Sep 17 00:00:00 2001 From: Antonin Coquet <ext.sopra.acoquet@grandlyon.com> Date: Tue, 23 Mar 2021 11:33:37 +0100 Subject: [PATCH 2/5] fix: display all workshop categories --- .../structure-details.component.html | 18 +++++++++-- .../structure-details.component.scss | 7 +++++ .../structure-details.component.ts | 30 +++++++++++++++++++ .../structure-list/models/category.model.ts | 12 ++++++++ 4 files changed, 64 insertions(+), 3 deletions(-) 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 475c4791b..3847236f6 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 @@ -250,15 +250,27 @@ <div *ngIf="!structure.freeWorkShop"> <span class="bold-info">L'accès à ces ateliers est payant</span> </div> - <div fxLayout="row" class="w-100 mobile-column"> - <div fxFlex="50%" *ngIf="isBaseSkills()"> + <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 77a9025cc..3cd1e7184 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 2bea610b8..286c670b5 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 e08e40a15..2aa78bbf3 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'; + } } -- GitLab From 18c37001e2ea64f0d8ce7c8d5388d00243106e16 Mon Sep 17 00:00:00 2001 From: Antonin Coquet <ext.sopra.acoquet@grandlyon.com> Date: Tue, 23 Mar 2021 11:36:54 +0100 Subject: [PATCH 3/5] fix: new condition for display --- .../structure-details/structure-details.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 3847236f6..97c3836d5 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 @@ -234,7 +234,7 @@ </div> <!-- Ateliers --> <div - *ngIf="isBaseSkills() || isAccessRights()" + *ngIf="isBaseSkills() || isAccessRights() || isParentingHelp() || isSocialAndProfessional() || isDigitalSecurity()" fxLayout="column" class="structure-details-block" fxLayoutAlign="baseline baseline" -- GitLab From 1863e11588cd7ae7aec2cc4f8303ab9e42cab47d Mon Sep 17 00:00:00 2001 From: Antonin Coquet <ext.sopra.acoquet@grandlyon.com> Date: Thu, 25 Mar 2021 10:28:06 +0100 Subject: [PATCH 4/5] add label and chage position --- .../structure-details/structure-details.component.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 97c3836d5..b881da1ea 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 @@ -159,7 +159,6 @@ <h2>Accueil</h2> </div> <!-- Openning Hours --> - <div *ngIf="structure.exceptionalClosures" class="bold-info">{{structure.exceptionalClosures}}</div> <div fxLayout="row" class="w-100 mobile-column"> <div *ngIf="structure.hours.hasData()" fxFlex="50%"> <h3 class="subtitle">Horaires d’ouverture au public</h3> @@ -208,6 +207,8 @@ </div> </div> </div> + <h4 class="subtitle">Précisions sur les horaires:</h4> + <div *ngIf="structure.exceptionalClosures" class="bold-info">{{structure.exceptionalClosures}}</div> </div> <!-- Démarches en ligne --> <div -- GitLab From 8f90f320f020056f1a0230bef1c54fe9e590072a Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Mon, 29 Mar 2021 15:25:49 +0200 Subject: [PATCH 5/5] fix: update display of hours details title --- .../structure-details/structure-details.component.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 b881da1ea..8d9190266 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,8 +207,10 @@ </div> </div> </div> - <h4 class="subtitle">Précisions sur les horaires:</h4> - <div *ngIf="structure.exceptionalClosures" class="bold-info">{{structure.exceptionalClosures}}</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 -- GitLab