From 7fc682580d715b3e74b5b870f166bda0daea42a1 Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Thu, 3 Dec 2020 10:58:52 +0100 Subject: [PATCH 1/8] refacto(structure) : change model of structure --- src/app/models/structure.model.ts | 7 +++---- .../modal-filter/modal-filter.component.html | 12 ++---------- .../modal-filter/modal-filter.component.ts | 4 ++-- .../components/search/search.component.ts | 4 ++-- 4 files changed, 9 insertions(+), 18 deletions(-) diff --git a/src/app/models/structure.model.ts b/src/app/models/structure.model.ts index 597234630..7f1161600 100644 --- a/src/app/models/structure.model.ts +++ b/src/app/models/structure.model.ts @@ -30,14 +30,13 @@ export class Structure { public accompagnementDesDemarches: string[]; public modalitesDacces: string[]; public labelsEtQualifications: string[]; - public wifi: boolean; - public ordinateurs: boolean; - public nombre: number; + public ordinateurs: number; public hours: Week; public isOpen: boolean; public openedOn: OpeningDay; public lesCompetencesDeBase: string[]; public accesAuxDroits: string[]; + public equipementsEtServicesProposes: string[]; public distance?: number; public address?: string; public coord?: number[]; @@ -83,7 +82,7 @@ export class Structure { * Check if a structure has equipments */ public hasEquipments(): boolean { - if (this.wifi || this.ordinateurs) { + if (this.equipementsEtServicesProposes) { return true; } return false; diff --git a/src/app/structure-list/components/modal-filter/modal-filter.component.html b/src/app/structure-list/components/modal-filter/modal-filter.component.html index ca72316c5..fe0b096e2 100644 --- a/src/app/structure-list/components/modal-filter/modal-filter.component.html +++ b/src/app/structure-list/components/modal-filter/modal-filter.component.html @@ -15,17 +15,9 @@ <label> <input type="checkbox" - [checked]=" - c.name !== 'Équipements et services proposés' - ? searchService.getIndex(checkedModules, module.id, c.name) > -1 - : searchService.getIndex(checkedModules, 'True', module.id) > -1 - " + [checked]="searchService.getIndex(checkedModules, module.id, c.name) > -1" [value]="module.id" - (change)=" - c.name !== 'Équipements et services proposés' - ? onCheckboxChange($event, c.name, false) - : onCheckboxChange($event, module.id, true) - " + (change)="onCheckboxChange($event, c.name)" /> <span class="customCheck"></span> <div class="label">{{ module.text }}</div> diff --git a/src/app/structure-list/components/modal-filter/modal-filter.component.ts b/src/app/structure-list/components/modal-filter/modal-filter.component.ts index e71cbd329..0cb812448 100644 --- a/src/app/structure-list/components/modal-filter/modal-filter.component.ts +++ b/src/app/structure-list/components/modal-filter/modal-filter.component.ts @@ -31,8 +31,8 @@ export class ModalFilterComponent implements OnInit { } // Management of the checkbox event (Check / Uncheck) - public onCheckboxChange(event, categ: string, isSpecial: boolean): void { - const checkValue: string = isSpecial ? 'True' : event.target.value; + public onCheckboxChange(event, categ: string): void { + const checkValue: string = event.target.value; if (event.target.checked) { this.checkedModules.push(new Module(checkValue, categ)); } else { diff --git a/src/app/structure-list/components/search/search.component.ts b/src/app/structure-list/components/search/search.component.ts index 6149a0fd9..485ad2e50 100644 --- a/src/app/structure-list/components/search/search.component.ts +++ b/src/app/structure-list/components/search/search.component.ts @@ -68,7 +68,7 @@ export class SearchComponent implements OnInit { } // Add checked box filter this.checkedModulesFilter.forEach((cm) => { - filters.push(new Filter(this.fromStringToIdExcel(cm.text), this.mockApiNumber(cm.id))); + filters.push(new Filter(this.fromStringToId(cm.text), this.mockApiNumber(cm.id))); }); // Send filters this.searchEvent.emit(filters); @@ -139,7 +139,7 @@ export class SearchComponent implements OnInit { this.modalTypeOpened = undefined; } - private fromStringToIdExcel(categ: string): string { + private fromStringToId(categ: string): string { const splitStr = categ.toLowerCase().split(' '); for (let i = 1; i < splitStr.length; i++) { splitStr[i] = splitStr[i].charAt(0).toUpperCase() + splitStr[i].substring(1); -- GitLab From 6c7a3c1d794527e95697615ecfa38d274e28b601 Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Thu, 3 Dec 2020 12:02:23 +0100 Subject: [PATCH 2/8] fix(model) : fix condition --- src/app/models/structure.model.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/models/structure.model.ts b/src/app/models/structure.model.ts index 7f1161600..6edf9098c 100644 --- a/src/app/models/structure.model.ts +++ b/src/app/models/structure.model.ts @@ -82,7 +82,7 @@ export class Structure { * Check if a structure has equipments */ public hasEquipments(): boolean { - if (this.equipementsEtServicesProposes) { + if (this.equipementsEtServicesProposes.length) { return true; } return false; -- GitLab From 90ee2a54765d8bff164b80a12e88c38989601fb7 Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Thu, 3 Dec 2020 12:03:11 +0100 Subject: [PATCH 3/8] fix(details) : fix and add enum to correct display --- src/app/shared/enum/demarches.enum.ts | 16 +++--- src/app/shared/enum/labels.emum.ts | 8 +-- .../structure-details.component.html | 20 +++++--- .../structure-details.component.ts | 50 +++++++++++++++++++ .../enum/access-modality.enum.ts | 6 +-- src/app/structure-list/enum/equipment.enum.ts | 7 +++ 6 files changed, 84 insertions(+), 23 deletions(-) create mode 100644 src/app/structure-list/enum/equipment.enum.ts diff --git a/src/app/shared/enum/demarches.enum.ts b/src/app/shared/enum/demarches.enum.ts index 27df79051..662046e3b 100644 --- a/src/app/shared/enum/demarches.enum.ts +++ b/src/app/shared/enum/demarches.enum.ts @@ -1,11 +1,11 @@ export enum Demarches { - caf = 'Accompagnant CAF', - carsat = 'CARSAT', - cpam = 'CPAM', - epn = 'Espace public numérique (EPN)', - impots = 'Impôts', - logements = 'Logement', + caf = 'accompagnantCaf', + carsat = 'carsat', + cpam = 'cpam', + epn = 'espacePublicNumeriqueepn', + impots = 'impots', + logements = 'logement', gd_lyon = 'Grand lyon', - pole_emploi = 'Pôle Emploi', - other = 'Autres', + pole_emploi = 'poleEmploi', + other = 'autres', } diff --git a/src/app/shared/enum/labels.emum.ts b/src/app/shared/enum/labels.emum.ts index 627e7c7a4..00a766110 100644 --- a/src/app/shared/enum/labels.emum.ts +++ b/src/app/shared/enum/labels.emum.ts @@ -1,6 +1,6 @@ export enum Labels { - pass_numerique = 'Pass numérique', - maison_france_service = 'Maison France Service', - aidants_connect = 'Aidants Connect', - territoire = 'Fabrique de territoire', + pass_numerique = 'passNumerique', + maison_france_service = 'maisonFranceService', + aidants_connect = 'aidantsConnect', + territoire = 'fabriqueDeTerritoire', } 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 0fd98a06c..824e1b12e 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 @@ -145,7 +145,7 @@ fxLayoutGap="20px" > <app-svg-icon [type]="'ico'" [icon]="getAccessIcon(acces)"></app-svg-icon> - <p>{{ acces }}</p> + <p>{{ getAccessLabel(acces) }}</p> </div> </div> </div> @@ -161,13 +161,17 @@ <app-svg-icon [type]="'ico'" [icon]="'equipement'" [iconClass]="'icon-32'"></app-svg-icon> <h2>Équipements</h2> </div> - <div *ngIf="structure.wifi" fxLayout="row" fxLayoutAlign="none flex-end" fxLayoutGap="13px"> - <app-svg-icon [type]="'ico'" [icon]="'wifi'"></app-svg-icon> - <p>Wifi en accès libre</p> - </div> - <div *ngIf="structure.ordinateurs" fxLayout="row" fxLayoutAlign="none flex-end" fxLayoutGap="13px"> - <app-svg-icon [type]="'ico'" [icon]="'computer'"></app-svg-icon> - <p>Ordinateurs à disposition : {{ structure.nombre }}</p> + <div + fxLayout="row" + fxLayoutAlign="none flex-end" + fxLayoutGap="13px" + *ngFor="let equipement of structure.equipementsEtServicesProposes" + > + <app-svg-icon [type]="'ico'" [icon]="getEquipmentsIcon(equipement)"></app-svg-icon> + <p> + {{ getEquipmentsLabel(equipement) }} + <span *ngIf="equipement == 'ordinateurs'; else otherEquipments"> : {{ structure.ordinateurs }}</span> + </p> </div> </div> <!-- Labels --> 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 82fbf41c8..7a9dd35df 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 @@ -7,6 +7,7 @@ import { SearchService } from '../../services/search.service'; import * as _ from 'lodash'; import { ActivatedRoute } from '@angular/router'; import { PrintService } from '../../../shared/service/print.service'; +import { Equipment } from '../../enum/equipment.enum'; @Component({ selector: 'app-structure-details', templateUrl: './structure-details.component.html', @@ -54,6 +55,40 @@ export class StructureDetailsComponent implements OnInit { } } + public getEquipmentsIcon(equipment: Equipment): string { + switch (equipment) { + case Equipment.wifi: + return 'wifi'; + case Equipment.bornes: + return 'tel'; + case Equipment.printer: + return 'print'; + case Equipment.tablet: + return 'tel'; + case Equipment.computer: + return 'computer'; + default: + return null; + } + } + + public getEquipmentsLabel(equipment: Equipment): string { + switch (equipment) { + case Equipment.wifi: + return 'Wifi'; + case Equipment.bornes: + return 'Bornes numériques'; + case Equipment.printer: + return 'Imprimantes'; + case Equipment.tablet: + return 'Téléphone'; + case Equipment.computer: + return 'Ordinateurs à disposition'; + default: + return null; + } + } + public close(): void { this.closeDetails.emit(true); } @@ -77,6 +112,21 @@ export class StructureDetailsComponent implements OnInit { } } + public getAccessLabel(accessModality: AccessModality): string { + switch (accessModality) { + case AccessModality.free: + return 'Accès libre'; + case AccessModality.meeting: + return 'Sur rendez-vous'; + case AccessModality.meetingOnly: + return 'Uniquement sur RDV'; + case AccessModality.numeric: + return 'Téléphone / Visio'; + default: + return null; + } + } + public setServiceCategories(): void { this.baseSkills = this.structure.lesCompetencesDeBase.map((skill) => _.find(this.baseSkillssReferentiel.modules, { id: skill }) diff --git a/src/app/structure-list/enum/access-modality.enum.ts b/src/app/structure-list/enum/access-modality.enum.ts index 684da963f..41eacfdad 100644 --- a/src/app/structure-list/enum/access-modality.enum.ts +++ b/src/app/structure-list/enum/access-modality.enum.ts @@ -1,6 +1,6 @@ export enum AccessModality { - free = 'Accès libre', - numeric = 'Téléphone / Visio', - meetingOnly = 'Uniquement sur RDV', + free = 'accesLibre', + numeric = 'telephoneVisio', + meetingOnly = 'uniquementSurRdv', meeting = 'Sur RDV', } diff --git a/src/app/structure-list/enum/equipment.enum.ts b/src/app/structure-list/enum/equipment.enum.ts new file mode 100644 index 000000000..fa3dfc6f1 --- /dev/null +++ b/src/app/structure-list/enum/equipment.enum.ts @@ -0,0 +1,7 @@ +export enum Equipment { + wifi = 'wifiEnAccesLibre', + bornes = 'bornesNumeriques', + printer = 'imprimantes', + tablet = 'tablettes', + computer = 'ordinateurs', +} -- GitLab From 1b56d8f667efd87ab73bb710b74e882b6b2016fa Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Thu, 3 Dec 2020 12:08:44 +0100 Subject: [PATCH 4/8] fix(svg) : fix wifi icon --- src/assets/ico/sprite.svg | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/assets/ico/sprite.svg b/src/assets/ico/sprite.svg index af9782587..de56cb143 100644 --- a/src/assets/ico/sprite.svg +++ b/src/assets/ico/sprite.svg @@ -116,17 +116,16 @@ <path fill-rule="evenodd" clip-rule="evenodd" d="M2.84054 5.57617C1.72559 6.04339 1 7.13416 1 8.34305V23H8V18.5C8 17.6716 8.67157 17 9.5 17C10.3284 17 11 17.6716 11 18.5V23H18V8.40362C18 7.1644 17.2381 6.05271 16.0823 5.60565L14.5555 5.01505C14.1291 4.85011 13.746 4.5899 13.4355 4.2543L10.9183 1.5332C10.1451 0.6974 8.83121 0.674761 8.0297 1.48343L5.19821 4.34018C4.92065 4.62023 4.5906 4.84281 4.22694 4.9952L2.84054 5.57617ZM11 4.5C11 5.32843 10.3284 6 9.5 6C8.67157 6 8 5.32843 8 4.5C8 3.67157 8.67157 3 9.5 3C10.3284 3 11 3.67157 11 4.5ZM4.25 15.9354C3.54057 16.0544 3 16.6714 3 17.4146V18.75H4.25V15.9354ZM3 21.9146V19.25H4.25V21.9146H3ZM4.75 21.9146V19.25H6V21.9146H4.75ZM6 17.4146V18.75H4.75V15.9354C5.45943 16.0544 6 16.6714 6 17.4146ZM13 17.4146C13 16.6714 13.5406 16.0544 14.25 15.9354V18.75H13V17.4146ZM13 19.25V21.9146H14.25V19.25H13ZM14.75 19.25V21.9146H16V19.25H14.75ZM16 18.75V17.4146C16 16.6714 15.4594 16.0544 14.75 15.9354V18.75H16ZM14.25 8C13.5406 8.11902 13 8.73601 13 9.47926V10.8146H14.25V8ZM13 13.9793V11.3146H14.25V13.9793H13ZM14.75 13.9793V11.3146H16V13.9793H14.75ZM16 9.47926V10.8146H14.75V8C15.4594 8.11902 16 8.73601 16 9.47926ZM8 9.47926C8 8.73601 8.54057 8.11902 9.25 8V10.8146H8V9.47926ZM8 11.3146V13.9793H9.25V11.3146H8ZM9.75 11.3146V13.9793H11V11.3146H9.75ZM11 10.8146V9.47926C11 8.73601 10.4594 8.11902 9.75 8V10.8146H11ZM4.25 8C3.54057 8.11902 3 8.73601 3 9.47926V10.8146H4.25V8ZM3 13.9793V11.3146H4.25V13.9793H3ZM4.75 13.9793V11.3146H6V13.9793H4.75ZM6 9.47926V10.8146H4.75V8C5.45943 8.11902 6 8.73601 6 9.47926Z" fill="#BD9E6A"/> </symbol> - -<symbol id="wifi" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/symbol"> +<symbol id="wifi" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg"> <g clip-path="url(#clip0)"> -<path d="M1.08488 8.63175C3.61838 6.09825 7.11838 4.53125 10.9844 4.53125C14.8504 4.53125 18.3504 6.09825 20.8839 8.63175L19.4697 10.046C17.2981 7.87439 14.2981 6.53125 10.9844 6.53125C7.67067 6.53125 4.67067 7.8744 2.4991 10.046L1.08488 8.63175Z" fill="#333333"/> -<path d="M0.987882 8.72971C-1.46518 11.2313 -2.98671 14.6496 -3.01522 18.4233C-3.00846 17.5465 -2.91931 16.6682 -2.74662 15.8C-2.21539 13.1293 -0.917109 10.6726 0.987882 8.72971Z" fill="#333333"/> -<path d="M-3.0153 18.6274C-2.99021 22.3568 -1.50692 25.7399 0.892926 28.235C-0.3114 26.9826 -1.27828 25.5103 -1.94994 23.8888C-2.64453 22.2119 -3.00294 20.4247 -3.0153 18.6274Z" fill="#333333"/> -<path d="M1.20434 28.5488C3.72785 31.0128 7.17879 32.5312 10.9844 32.5312C14.7486 32.5312 18.1659 31.0457 20.6818 28.6288C20.0912 29.196 19.4494 29.7127 18.7624 30.1718C16.4601 31.7102 13.7533 32.5312 10.9844 32.5312C8.21544 32.5312 5.50868 31.7102 3.20639 30.1718C2.48717 29.6913 1.81752 29.1474 1.20434 28.5488Z" fill="#333333"/> +<path d="M1.08488 8.63175C3.61838 6.09825 7.11838 4.53125 10.9844 4.53125C14.8504 4.53125 18.3504 6.09825 20.8839 8.63175L19.4697 10.046C17.2981 7.87439 14.2981 6.53125 10.9844 6.53125C7.67066 6.53125 4.67066 7.8744 2.49909 10.046L1.08488 8.63175Z" fill="#333333"/> +<path d="M0.987878 8.72971C-1.46519 11.2313 -2.98672 14.6496 -3.01522 18.4233C-3.00846 17.5465 -2.91931 16.6682 -2.74662 15.8C-2.2154 13.1293 -0.917113 10.6726 0.987878 8.72971Z" fill="#333333"/> +<path d="M-3.0153 18.6274C-2.99021 22.3568 -1.50692 25.7399 0.892922 28.235C-0.311404 26.9826 -1.27828 25.5103 -1.94994 23.8888C-2.64453 22.2119 -3.00294 20.4247 -3.0153 18.6274Z" fill="#333333"/> +<path d="M1.20434 28.5488C3.72784 31.0128 7.17878 32.5312 10.9844 32.5312C14.7486 32.5312 18.1658 31.0457 20.6818 28.6288C20.0912 29.196 19.4494 29.7127 18.7624 30.1718C16.4601 31.7102 13.7533 32.5312 10.9844 32.5312C8.21543 32.5312 5.50867 31.7102 3.20639 30.1718C2.48717 29.6913 1.81751 29.1474 1.20434 28.5488Z" fill="#333333"/> <path d="M21.0019 28.3113C23.4506 25.8035 24.9655 22.3797 24.9842 18.6022C24.975 20.408 24.6165 22.2041 23.9187 23.8888C23.2333 25.5434 22.2406 27.0425 21.0019 28.3113Z" fill="#333333"/> -<path d="M24.9841 18.4483C24.9621 14.6515 23.4287 11.2129 20.9551 8.70353C22.8742 10.6505 24.1818 13.1173 24.7154 15.8C24.8897 16.6764 24.9789 17.5632 24.9841 18.4483Z" fill="#333333"/> -<path d="M18.0554 11.4602C16.2458 9.65054 13.7458 8.53125 10.9844 8.53125C8.22295 8.53125 5.72295 9.65054 3.91331 11.4602L5.32752 12.8744C6.77524 11.4267 8.77524 10.5312 10.9844 10.5312C13.1935 10.5312 15.1935 11.4267 16.6412 12.8744L18.0554 11.4602Z" fill="#333333"/> -<path d="M15.227 14.2886C14.1412 13.2028 12.6412 12.5312 10.9844 12.5312C9.32752 12.5312 7.82752 13.2028 6.74174 14.2886L8.15595 15.7028C8.87981 14.979 9.87981 14.5312 10.9844 14.5312C12.0889 14.5312 13.0889 14.979 13.8128 15.7028L15.227 14.2886Z" fill="#333333"/> +<path d="M24.9841 18.4483C24.9621 14.6515 23.4287 11.2129 20.9551 8.70353C22.8742 10.6505 24.1817 13.1173 24.7154 15.8C24.8897 16.6764 24.9789 17.5632 24.9841 18.4483Z" fill="#333333"/> +<path d="M18.0554 11.4602C16.2458 9.65054 13.7458 8.53125 10.9844 8.53125C8.22295 8.53125 5.72295 9.65054 3.91331 11.4602L5.32752 12.8744C6.77523 11.4267 8.77523 10.5312 10.9844 10.5312C13.1935 10.5312 15.1935 11.4267 16.6412 12.8744L18.0554 11.4602Z" fill="#333333"/> +<path d="M15.227 14.2886C14.1412 13.2028 12.6412 12.5312 10.9844 12.5312C9.32752 12.5312 7.82752 13.2028 6.74173 14.2886L8.15595 15.7028C8.8798 14.979 9.8798 14.5312 10.9844 14.5312C12.0889 14.5312 13.0889 14.979 13.8128 15.7028L15.227 14.2886Z" fill="#333333"/> <path d="M12.3986 17.117C12.0367 16.7551 11.5367 16.5312 10.9844 16.5312C10.4321 16.5312 9.93209 16.7551 9.57016 17.117L10.9844 18.5312L12.3986 17.117Z" fill="#333333"/> </g> <defs> -- GitLab From 2f1ff653ac3c49c5772c9d4b5d92dc00f6a0e0f5 Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Thu, 3 Dec 2020 12:14:18 +0100 Subject: [PATCH 5/8] fix(demarche) : fix other section --- .../components/structure-details/structure-details.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 7a9dd35df..e856e426a 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 @@ -48,7 +48,7 @@ export class StructureDetailsComponent implements OnInit { this.printService.onDataReady(); } }); - const index = this.structure.accompagnementDesDemarches.indexOf('Autres'); + const index = this.structure.accompagnementDesDemarches.indexOf('autres'); if (index > -1) { this.structure.accompagnementDesDemarches.splice(index, 1); this.isOtherSection = true; -- GitLab From 0d6c1360ff52f13de5ccc58af5c809dce8a190bb Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Thu, 3 Dec 2020 12:18:47 +0100 Subject: [PATCH 6/8] fix(details) : update text for Wifi --- .../components/structure-details/structure-details.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 e856e426a..89c31ac9a 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 @@ -75,7 +75,7 @@ export class StructureDetailsComponent implements OnInit { public getEquipmentsLabel(equipment: Equipment): string { switch (equipment) { case Equipment.wifi: - return 'Wifi'; + return 'Wifi en accès libre'; case Equipment.bornes: return 'Bornes numériques'; case Equipment.printer: -- GitLab From 2d948b79a7ead65b573e5f1c1c8e2717ef816476 Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Thu, 3 Dec 2020 12:45:04 +0100 Subject: [PATCH 7/8] fix(details) : add icon borne + fix print icon color --- .../structure-details.component.ts | 2 +- src/assets/ico/borne.svg | 8 ++++++++ src/assets/ico/sprite.svg | 17 +++++++++++++---- 3 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 src/assets/ico/borne.svg 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 89c31ac9a..cd0f92dc1 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 @@ -60,7 +60,7 @@ export class StructureDetailsComponent implements OnInit { case Equipment.wifi: return 'wifi'; case Equipment.bornes: - return 'tel'; + return 'borne'; case Equipment.printer: return 'print'; case Equipment.tablet: diff --git a/src/assets/ico/borne.svg b/src/assets/ico/borne.svg new file mode 100644 index 000000000..bd4fe0036 --- /dev/null +++ b/src/assets/ico/borne.svg @@ -0,0 +1,8 @@ +<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"> +<mask id="path-1-inside-1" fill="white"> +<rect x="5" width="12" height="9" rx="1"/> +</mask> +<rect x="5" width="12" height="9" rx="1" stroke="#333333" stroke-width="4" mask="url(#path-1-inside-1)"/> +<path d="M6 14H16L14.6364 22H7.36364L6 14Z" fill="#333333"/> +<path d="M5.04692 10.1658C5.12212 10.0617 5.24275 10 5.37119 10H16.6288C16.7573 10 16.8779 10.0617 16.9531 10.1658L18.542 12.3658C18.733 12.6303 18.544 13 18.2177 13H3.7823C3.45599 13 3.26698 12.6303 3.45803 12.3658L5.04692 10.1658Z" fill="#333333"/> +</svg> diff --git a/src/assets/ico/sprite.svg b/src/assets/ico/sprite.svg index de56cb143..dcf1c0f29 100644 --- a/src/assets/ico/sprite.svg +++ b/src/assets/ico/sprite.svg @@ -81,10 +81,10 @@ <path d="M26.1416 18.2344C26.3994 18.349 26.4854 18.5495 26.3994 18.8359C25.9124 20.3542 25.1247 21.7005 24.0361 22.875C23.8643 23.0755 23.6637 23.1185 23.4346 23.0039L21.5869 21.9297C20.8135 22.5885 19.9398 23.0898 18.9658 23.4336V25.5391C18.9658 25.8255 18.8369 25.9974 18.5791 26.0547C17.0036 26.3984 15.4424 26.3984 13.8955 26.0547C13.609 25.9974 13.4658 25.8255 13.4658 25.5391V23.4336C12.4919 23.0898 11.6182 22.5885 10.8447 21.9297L9.04004 23.0039C8.78223 23.1185 8.56738 23.0755 8.39551 22.875C7.30697 21.7005 6.51921 20.3542 6.03223 18.8359C5.94629 18.5781 6.03223 18.3776 6.29004 18.2344L8.09473 17.1602C8.00879 16.6732 7.96582 16.1719 7.96582 15.6562C7.96582 15.1406 8.00879 14.6393 8.09473 14.1523L6.29004 13.0781C6.03223 12.9635 5.94629 12.763 6.03223 12.4766C6.51921 10.9583 7.30697 9.61198 8.39551 8.4375C8.56738 8.23698 8.78223 8.20833 9.04004 8.35156L10.8447 9.38281C11.6182 8.72396 12.4919 8.22266 13.4658 7.87891V5.77344C13.4658 5.48698 13.5947 5.3151 13.8525 5.25781C15.4281 4.91406 17.0036 4.91406 18.5791 5.25781C18.8369 5.3151 18.9658 5.48698 18.9658 5.77344V7.87891C19.9398 8.22266 20.8135 8.72396 21.5869 9.38281L23.3916 8.30859C23.6494 8.19401 23.8643 8.23698 24.0361 8.4375C25.1247 9.61198 25.9124 10.9583 26.3994 12.4766C26.4854 12.763 26.3994 12.9635 26.1416 13.0781L24.3369 14.1523C24.5088 15.1549 24.5088 16.1576 24.3369 17.1602L26.1416 18.2344ZM13.7666 18.1055C14.4541 18.7643 15.2705 19.0938 16.2158 19.0938C17.1611 19.0938 17.9632 18.7643 18.6221 18.1055C19.3096 17.418 19.6533 16.6016 19.6533 15.6562C19.6533 14.7109 19.3096 13.9089 18.6221 13.25C17.9632 12.5625 17.1611 12.2188 16.2158 12.2188C15.2705 12.2188 14.4541 12.5625 13.7666 13.25C13.1077 13.9089 12.7783 14.7109 12.7783 15.6562C12.7783 16.6016 13.1077 17.418 13.7666 18.1055Z" fill="black"/> </symbol> -<symbol id="print" fill="none" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> -<rect x="10" y="8" width="12" height="5" stroke="black" stroke-width="2"/> -<rect x="10" y="17" width="12" height="8" stroke="black" stroke-width="2"/> -<path fill-rule="evenodd" clip-rule="evenodd" d="M6 12C5.44772 12 5 12.4477 5 13V21H9V17H23V21H27V13C27 12.4477 26.5523 12 26 12H6Z" fill="black"/> +<symbol id="print" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> +<rect x="10" y="8" width="12" height="5" stroke="currentColor" stroke-width="2"/> +<rect x="10" y="17" width="12" height="8" stroke="currentColor" stroke-width="2"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M6 12C5.44772 12 5 12.4477 5 13V21H9V17H23V21H27V13C27 12.4477 26.5523 12 26 12H6Z" fill="currentColor"/> </symbol> <symbol id="calendar" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg"> @@ -116,6 +116,15 @@ <path fill-rule="evenodd" clip-rule="evenodd" d="M2.84054 5.57617C1.72559 6.04339 1 7.13416 1 8.34305V23H8V18.5C8 17.6716 8.67157 17 9.5 17C10.3284 17 11 17.6716 11 18.5V23H18V8.40362C18 7.1644 17.2381 6.05271 16.0823 5.60565L14.5555 5.01505C14.1291 4.85011 13.746 4.5899 13.4355 4.2543L10.9183 1.5332C10.1451 0.6974 8.83121 0.674761 8.0297 1.48343L5.19821 4.34018C4.92065 4.62023 4.5906 4.84281 4.22694 4.9952L2.84054 5.57617ZM11 4.5C11 5.32843 10.3284 6 9.5 6C8.67157 6 8 5.32843 8 4.5C8 3.67157 8.67157 3 9.5 3C10.3284 3 11 3.67157 11 4.5ZM4.25 15.9354C3.54057 16.0544 3 16.6714 3 17.4146V18.75H4.25V15.9354ZM3 21.9146V19.25H4.25V21.9146H3ZM4.75 21.9146V19.25H6V21.9146H4.75ZM6 17.4146V18.75H4.75V15.9354C5.45943 16.0544 6 16.6714 6 17.4146ZM13 17.4146C13 16.6714 13.5406 16.0544 14.25 15.9354V18.75H13V17.4146ZM13 19.25V21.9146H14.25V19.25H13ZM14.75 19.25V21.9146H16V19.25H14.75ZM16 18.75V17.4146C16 16.6714 15.4594 16.0544 14.75 15.9354V18.75H16ZM14.25 8C13.5406 8.11902 13 8.73601 13 9.47926V10.8146H14.25V8ZM13 13.9793V11.3146H14.25V13.9793H13ZM14.75 13.9793V11.3146H16V13.9793H14.75ZM16 9.47926V10.8146H14.75V8C15.4594 8.11902 16 8.73601 16 9.47926ZM8 9.47926C8 8.73601 8.54057 8.11902 9.25 8V10.8146H8V9.47926ZM8 11.3146V13.9793H9.25V11.3146H8ZM9.75 11.3146V13.9793H11V11.3146H9.75ZM11 10.8146V9.47926C11 8.73601 10.4594 8.11902 9.75 8V10.8146H11ZM4.25 8C3.54057 8.11902 3 8.73601 3 9.47926V10.8146H4.25V8ZM3 13.9793V11.3146H4.25V13.9793H3ZM4.75 13.9793V11.3146H6V13.9793H4.75ZM6 9.47926V10.8146H4.75V8C5.45943 8.11902 6 8.73601 6 9.47926Z" fill="#BD9E6A"/> </symbol> +<symbol id="borne" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg"> +<mask id="path-1-inside-1" fill="white"> +<rect x="5" width="12" height="9" rx="1"/> +</mask> +<rect x="5" width="12" height="9" rx="1" stroke="#333333" stroke-width="4" mask="url(#path-1-inside-1)"/> +<path d="M6 14H16L14.6364 22H7.36364L6 14Z" fill="#333333"/> +<path d="M5.04692 10.1658C5.12212 10.0617 5.24275 10 5.37119 10H16.6288C16.7573 10 16.8779 10.0617 16.9531 10.1658L18.542 12.3658C18.733 12.6303 18.544 13 18.2177 13H3.7823C3.45599 13 3.26698 12.6303 3.45803 12.3658L5.04692 10.1658Z" fill="#333333"/> +</symbol> + <symbol id="wifi" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg"> <g clip-path="url(#clip0)"> <path d="M1.08488 8.63175C3.61838 6.09825 7.11838 4.53125 10.9844 4.53125C14.8504 4.53125 18.3504 6.09825 20.8839 8.63175L19.4697 10.046C17.2981 7.87439 14.2981 6.53125 10.9844 6.53125C7.67066 6.53125 4.67066 7.8744 2.49909 10.046L1.08488 8.63175Z" fill="#333333"/> -- GitLab From e6b30b9b2eb64c77927aec493821c0be03f10a51 Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Mon, 7 Dec 2020 14:46:15 +0100 Subject: [PATCH 8/8] fix var name --- src/app/models/structure.model.ts | 2 +- src/app/structure-list/components/card/card.component.spec.ts | 2 +- .../structure-details/structure-details.component.html | 2 +- src/app/structure-list/structure-list.component.spec.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/models/structure.model.ts b/src/app/models/structure.model.ts index 6edf9098c..7fbbbde2a 100644 --- a/src/app/models/structure.model.ts +++ b/src/app/models/structure.model.ts @@ -30,7 +30,7 @@ export class Structure { public accompagnementDesDemarches: string[]; public modalitesDacces: string[]; public labelsEtQualifications: string[]; - public ordinateurs: number; + public nbComputers: number; public hours: Week; public isOpen: boolean; public openedOn: OpeningDay; diff --git a/src/app/structure-list/components/card/card.component.spec.ts b/src/app/structure-list/components/card/card.component.spec.ts index f3a5672df..afcb110c0 100644 --- a/src/app/structure-list/components/card/card.component.spec.ts +++ b/src/app/structure-list/components/card/card.component.spec.ts @@ -53,7 +53,7 @@ describe('CardComponent', () => { aideALaParentalite: '', cultureEtSecuriteNumerique: 264, wifiEnAccesLibre: 'True', - ordinateurs: '', + nbComputers: '', nombre: '', tablettes: '', bornesNumeriques: '', 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 824e1b12e..b21461bce 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 @@ -170,7 +170,7 @@ <app-svg-icon [type]="'ico'" [icon]="getEquipmentsIcon(equipement)"></app-svg-icon> <p> {{ getEquipmentsLabel(equipement) }} - <span *ngIf="equipement == 'ordinateurs'; else otherEquipments"> : {{ structure.ordinateurs }}</span> + <span *ngIf="equipement == 'ordinateurs'; else otherEquipments"> : {{ structure.nbComputers }}</span> </p> </div> </div> diff --git a/src/app/structure-list/structure-list.component.spec.ts b/src/app/structure-list/structure-list.component.spec.ts index 2cae39e9c..bffca76c3 100644 --- a/src/app/structure-list/structure-list.component.spec.ts +++ b/src/app/structure-list/structure-list.component.spec.ts @@ -53,7 +53,7 @@ describe('StructureListComponent', () => { aideALaParentalite: '', cultureEtSecuriteNumerique: 264, wifiEnAccesLibre: 'True', - ordinateurs: '', + nbComputers: '', nombre: '', tablettes: '', bornesNumeriques: '', -- GitLab