From 9d134a7943e5a91c462e0c209ca0036408e288a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Pailharey?= <rpailharey@grandlyon.com> Date: Wed, 19 Oct 2022 16:43:41 +0200 Subject: [PATCH 1/5] feat: updated structure-type-picker --- src/app/carto/carto.component.ts | 18 +- .../structure-type.component.html | 2 +- .../structure-type.component.ts | 2 +- src/app/models/structure-type.model.ts | 6 +- src/app/models/structure.model.ts | 4 +- src/app/services/geojson.service.ts | 4 +- src/app/services/structure-type.service.ts | 11 +- src/app/services/tcl.service.ts | 2 +- .../structure-type-picker.component.html | 206 ++++++++--------- .../structure-type-picker.component.scss | 25 +- .../structure-type-picker.component.ts | 89 +++---- .../shared/enum/structureTypeCategory.enum.ts | 5 + src/app/shared/enum/structureTypeIcon.enum.ts | 5 + src/app/shared/enum/typeStructure.enum.ts | 2 +- src/assets/form/sprite.svg | 217 ++++++++++-------- 15 files changed, 304 insertions(+), 294 deletions(-) create mode 100644 src/app/shared/enum/structureTypeCategory.enum.ts create mode 100644 src/app/shared/enum/structureTypeIcon.enum.ts diff --git a/src/app/carto/carto.component.ts b/src/app/carto/carto.component.ts index ede0edf85..29002a6fe 100644 --- a/src/app/carto/carto.component.ts +++ b/src/app/carto/carto.component.ts @@ -15,7 +15,7 @@ import { Observable } from 'rxjs'; @Component({ selector: 'app-carto', templateUrl: './carto.component.html', - styleUrls: ['./carto.component.scss'] + styleUrls: ['./carto.component.scss'], }) export class CartoComponent implements OnInit { public filters: Filter[] = []; @@ -54,7 +54,7 @@ export class CartoComponent implements OnInit { this.meta.updateTag({ name: 'description', - content: 'Recense tous les lieux, accompagnements et ateliers de médiation numérique de la Métropole de Lyon.' + content: 'Recense tous les lieux, accompagnements et ateliers de médiation numérique de la Métropole de Lyon.', }); } @@ -105,7 +105,12 @@ export class CartoComponent implements OnInit { * @param lat user latitde * @param sortByDistance if set to `true`, structures data is sort by distance. Default value is `true` */ - private updateStructuresdistance(structures: Structure[], lon: number, lat: number, sortByDistance: boolean = true): void { + private updateStructuresdistance( + structures: Structure[], + lon: number, + lat: number, + sortByDistance: boolean = true + ): void { Promise.all( structures.map(async (structure) => { if (this.geolocation) { @@ -125,7 +130,7 @@ export class CartoComponent implements OnInit { } /** - * Retrive GeoJson for a given address + * Retrieve GeoJson for a given address * @param address string */ private getCoordByAddress(address: string): Promise<GeoJson> { @@ -154,7 +159,10 @@ export class CartoComponent implements OnInit { * @param lat number */ private getStructurePosition(structure: Structure, lon: number, lat: number): Structure { - structure.distance = parseInt(this.geoJsonService.getDistance(structure.getLat(), structure.getLon(), lat, lon, 'M'), 10); + structure.distance = parseInt( + this.geoJsonService.getDistance(structure.getLat(), structure.getLon(), lat, lon, 'M'), + 10 + ); return structure; } diff --git a/src/app/form/form-view/structure-form/structure-type/structure-type.component.html b/src/app/form/form-view/structure-form/structure-type/structure-type.component.html index 0963d6d70..3e4ce07da 100644 --- a/src/app/form/form-view/structure-form/structure-type/structure-type.component.html +++ b/src/app/form/form-view/structure-form/structure-type/structure-type.component.html @@ -19,7 +19,7 @@ <div class="type-picker"> <app-structure-type-picker [isEditMode]="isEditMode" - [pickedChoice]="structureForm.get('structureType').valid ? structureForm.get('structureType').value : null" + [pickedTypeId]="structureForm.get('structureType').valid ? structureForm.get('structureType').value : null" (selectedType)="setTypeStructure($event)" ></app-structure-type-picker> </div> diff --git a/src/app/form/form-view/structure-form/structure-type/structure-type.component.ts b/src/app/form/form-view/structure-form/structure-type/structure-type.component.ts index cfb1f5add..99340cafe 100644 --- a/src/app/form/form-view/structure-form/structure-type/structure-type.component.ts +++ b/src/app/form/form-view/structure-form/structure-type/structure-type.component.ts @@ -15,7 +15,7 @@ export class StructureTypeComponent implements OnInit { this.validateForm.emit(); } - public setTypeStructure(value) { + public setTypeStructure(value: string) { this.typeStructure.emit(value); } public goBack(): void { diff --git a/src/app/models/structure-type.model.ts b/src/app/models/structure-type.model.ts index 91d50c378..a33bddf5a 100644 --- a/src/app/models/structure-type.model.ts +++ b/src/app/models/structure-type.model.ts @@ -1,6 +1,8 @@ export class StructureType { - values: string[]; - name: string; + _id: string; + category: string; + value: string; + private: boolean; constructor(obj?: any) { Object.assign(this, obj); diff --git a/src/app/models/structure.model.ts b/src/app/models/structure.model.ts index 344e442ea..7cc9159ea 100644 --- a/src/app/models/structure.model.ts +++ b/src/app/models/structure.model.ts @@ -1,5 +1,5 @@ import { Equipment } from '../structure-list/enum/equipment.enum'; -import { typeStructureEnum } from '../shared/enum/typeStructure.enum'; +import { TypeStructureEnum } from '../shared/enum/typeStructure.enum'; import { Weekday } from '../structure-list/enum/weekday.enum'; import { Address } from './address.model'; import { Day } from './day.model'; @@ -188,7 +188,7 @@ export class Structure { } public getLabelTypeStructure(): string { - return typeStructureEnum[this.structureType] ? typeStructureEnum[this.structureType] : ''; + return TypeStructureEnum[this.structureType] ? TypeStructureEnum[this.structureType] : ''; } public hasSocialNetwork(): boolean { diff --git a/src/app/services/geojson.service.ts b/src/app/services/geojson.service.ts index b598e926a..513314dca 100644 --- a/src/app/services/geojson.service.ts +++ b/src/app/services/geojson.service.ts @@ -12,7 +12,7 @@ export class GeojsonService { constructor(private http: HttpClient) {} /** - * Retrive an address by geolocation + * Retrieve an address by geolocation * @param idVoie Number */ public getAddressByCoord(longitude: number, latitude: number): Observable<any> { @@ -30,7 +30,7 @@ export class GeojsonService { } /** - * Retrive an address by geolocation + * Retrieve an address by geolocation * @param idVoie Number */ public getMDMGeoJson(): Observable<GeoJson[]> { diff --git a/src/app/services/structure-type.service.ts b/src/app/services/structure-type.service.ts index 0f18c3bca..186b52cc0 100644 --- a/src/app/services/structure-type.service.ts +++ b/src/app/services/structure-type.service.ts @@ -10,9 +10,16 @@ export class StructureTypeService { constructor(private http: HttpClient) {} /** - * Retrive all tcl stop point around given coord + * Retrieve all structure types */ - public getStructureTypes(): Observable<any> { + public getStructureTypes(): Observable<StructureType[]> { return this.http.get<StructureType[]>('/api/structure-type'); } + + /** + * Retrieve a structure type by its id + */ + public getStructureTypeById(id: string): Observable<StructureType> { + return this.http.get<StructureType>(`/api/structure-type/${id}`); + } } diff --git a/src/app/services/tcl.service.ts b/src/app/services/tcl.service.ts index 03cefff1f..af2383f0b 100644 --- a/src/app/services/tcl.service.ts +++ b/src/app/services/tcl.service.ts @@ -10,7 +10,7 @@ export class TclService { constructor(private http: HttpClient) {} /** - * Retrive all tcl stop point around given coord + * Retrieve all tcl stop point around given coord */ public getTclStopPointBycoord(longitude: number, latitude: number): Observable<any> { return this.http.post<TclStopPoint[]>('/api/tcl/closest', { coordinates: [longitude, latitude] }); diff --git a/src/app/shared/components/structure-type-picker/structure-type-picker.component.html b/src/app/shared/components/structure-type-picker/structure-type-picker.component.html index 06583e10d..22d570f4e 100644 --- a/src/app/shared/components/structure-type-picker/structure-type-picker.component.html +++ b/src/app/shared/components/structure-type-picker/structure-type-picker.component.html @@ -1,121 +1,109 @@ <div class="container"> - <div - class="boutonSection" - [ngClass]="{ selectedType: type.name == pickedType }" - *ngFor="let type of structureTypes" - fxLayout="column" - fxLayoutGap="8px" - > - <ng-container *ngIf="type.name === 'Publique'"> - <div fxLayout="column" class="collapse" [ngClass]="{ notCollapsed: !showPublic }"> - <div - class="collapseHeader" - fxLayoutAlign="flex-start center" - fxLayout="row" - (click)="toggleCollapse(type.name)" - > - <div class="svgContainer"> - <svg aria-hidden="true"> - <use [attr.xlink:href]="'assets/form/sprite.svg#' + getStructureTypeIcon(type.name)"></use> - </svg> - </div> - <div class="titleCollapse"> - {{ type.name }} - </div> - <div class="logo"> - <svg class="show" aria-hidden="true"> - <use [attr.xlink:href]="'assets/form/sprite.svg#show'"></use> - </svg> - <svg class="hide" aria-hidden="true"> - <use [attr.xlink:href]="'assets/form/sprite.svg#hide'"></use> - </svg> - </div> + <div class="boutonSection" fxLayout="column" fxLayoutGap="8px"> + <div fxLayout="column" class="collapse" [ngClass]="{ notCollapsed: !showPublic }"> + <div + class="collapseHeader" + fxLayoutAlign="flex-start center" + fxLayout="row" + (click)="toggleCollapse(structureTypeCategoryEnum.public)" + > + <div class="svgContainer"> + <svg aria-hidden="true"> + <use [attr.xlink:href]="'assets/form/sprite.svg#' + structureTypeIconEnum.public"></use> + </svg> </div> - <div *ngIf="showPublic" class="btn-grid"> - <span *ngFor="let choice of getChoices(pickedType)"> - <app-button - [extraClass]="choice == pickedChoice ? 'selected' : ''" - [style]="buttonTypeEnum.CheckButton" - [text]="getStructureTypeName(choice)" - (action)="pickChoice(choice)" - ></app-button> - </span> + <div class="titleCollapse"> + {{ structureTypeCategoryEnum.public }} </div> + <div class="logo"> + <svg class="show" aria-hidden="true"> + <use [attr.xlink:href]="'assets/form/sprite.svg#show'"></use> + </svg> + <svg class="hide" aria-hidden="true"> + <use [attr.xlink:href]="'assets/form/sprite.svg#hide'"></use> + </svg> + </div> + </div> + <div *ngIf="showPublic" class="btn-grid"> + <span *ngFor="let choice of getChoices(structureTypeCategoryEnum.public)"> + <app-button + [extraClass]="choice._id == pickedTypeId ? 'selected' : ''" + [style]="buttonTypeEnum.CheckButton" + [text]="getStructureTypeName(choice.value)" + (action)="pickChoice(choice._id)" + ></app-button> + </span> </div> - </ng-container> - <ng-container *ngIf="type.name === 'Privée à but non lucratif'"> - <div fxLayout="column" class="collapse" [ngClass]="{ notCollapsed: !showPrivate }"> - <div - class="collapseHeader" - fxLayoutAlign="flex-start center" - fxLayout="row" - (click)="toggleCollapse(type.name)" - > - <div class="svgContainer"> - <svg aria-hidden="true"> - <use [attr.xlink:href]="'assets/form/sprite.svg#' + getStructureTypeIcon(type.name)"></use> - </svg> - </div> - <div class="titleCollapse"> - {{ type.name }} - </div> - <div class="logo"> - <svg class="show" aria-hidden="true"> - <use [attr.xlink:href]="'assets/form/sprite.svg#show'"></use> - </svg> - <svg class="hide" aria-hidden="true"> - <use [attr.xlink:href]="'assets/form/sprite.svg#hide'"></use> - </svg> - </div> + </div> + <div fxLayout="column" class="collapse" [ngClass]="{ notCollapsed: !showPrivate }"> + <div + class="collapseHeader" + fxLayoutAlign="flex-start center" + fxLayout="row" + (click)="toggleCollapse(structureTypeCategoryEnum.private)" + > + <div class="svgContainer"> + <svg aria-hidden="true"> + <use [attr.xlink:href]="'assets/form/sprite.svg#' + structureTypeIconEnum.private"></use> + </svg> + </div> + <div class="titleCollapse"> + {{ structureTypeCategoryEnum.private }} </div> - <div *ngIf="showPrivate" class="btn-grid"> - <span *ngFor="let choice of getChoices(pickedType)"> - <app-button - [extraClass]="choice == pickedChoice ? 'selected' : ''" - [style]="buttonTypeEnum.CheckButton" - [text]="getStructureTypeName(choice)" - (action)="pickChoice(choice)" - ></app-button> - </span> + <div class="logo"> + <svg class="show" aria-hidden="true"> + <use [attr.xlink:href]="'assets/form/sprite.svg#show'"></use> + </svg> + <svg class="hide" aria-hidden="true"> + <use [attr.xlink:href]="'assets/form/sprite.svg#hide'"></use> + </svg> </div> </div> - </ng-container> - <ng-container *ngIf="type.name === 'Privée à but lucratif'"> - <div fxLayout="column" class="collapse" [ngClass]="{ notCollapsed: !showPrivateLucrative }"> - <div - class="collapseHeader" - fxLayoutAlign="flex-start center" - fxLayout="row" - (click)="toggleCollapse(type.name)" - > - <div class="svgContainer"> - <svg aria-hidden="true"> - <use [attr.xlink:href]="'assets/form/sprite.svg#' + getStructureTypeIcon(type.name)"></use> - </svg> - </div> - <div class="titleCollapse"> - {{ type.name }} - </div> - <div class="logo"> - <svg class="show" aria-hidden="true"> - <use [attr.xlink:href]="'assets/form/sprite.svg#show'"></use> - </svg> - <svg class="hide" aria-hidden="true"> - <use [attr.xlink:href]="'assets/form/sprite.svg#hide'"></use> - </svg> - </div> + <div *ngIf="showPrivate" class="btn-grid"> + <span *ngFor="let choice of getChoices(structureTypeCategoryEnum.private)"> + <app-button + [extraClass]="choice._id == pickedTypeId ? 'selected' : ''" + [style]="buttonTypeEnum.CheckButton" + [text]="getStructureTypeName(choice.value)" + (action)="pickChoice(choice._id)" + ></app-button> + </span> + </div> + </div> + <div fxLayout="column" class="collapse" [ngClass]="{ notCollapsed: !showPrivateLucrative }"> + <div + class="collapseHeader" + fxLayoutAlign="flex-start center" + fxLayout="row" + (click)="toggleCollapse(structureTypeCategoryEnum.privateLucrative)" + > + <div class="svgContainer"> + <svg aria-hidden="true"> + <use [attr.xlink:href]="'assets/form/sprite.svg#' + structureTypeIconEnum.privateLucrative"></use> + </svg> + </div> + <div class="titleCollapse"> + {{ structureTypeCategoryEnum.privateLucrative }} </div> - <div *ngIf="showPrivateLucrative" class="btn-grid"> - <span *ngFor="let choice of getChoices(pickedType)"> - <app-button - [extraClass]="choice == pickedChoice ? 'selected' : ''" - [style]="buttonTypeEnum.CheckButton" - [text]="getStructureTypeName(choice)" - (action)="pickChoice(choice)" - ></app-button> - </span> + <div class="logo"> + <svg class="show" aria-hidden="true"> + <use [attr.xlink:href]="'assets/form/sprite.svg#show'"></use> + </svg> + <svg class="hide" aria-hidden="true"> + <use [attr.xlink:href]="'assets/form/sprite.svg#hide'"></use> + </svg> </div> </div> - </ng-container> + <div *ngIf="showPrivateLucrative" class="btn-grid"> + <span *ngFor="let choice of getChoices(structureTypeCategoryEnum.privateLucrative)"> + <app-button + [extraClass]="choice._id == pickedTypeId ? 'selected' : ''" + [style]="buttonTypeEnum.CheckButton" + [text]="getStructureTypeName(choice.value)" + (action)="pickChoice(choice._id)" + ></app-button> + </span> + </div> + </div> </div> </div> diff --git a/src/app/shared/components/structure-type-picker/structure-type-picker.component.scss b/src/app/shared/components/structure-type-picker/structure-type-picker.component.scss index 54f998d04..c2aabd334 100644 --- a/src/app/shared/components/structure-type-picker/structure-type-picker.component.scss +++ b/src/app/shared/components/structure-type-picker/structure-type-picker.component.scss @@ -57,17 +57,6 @@ button { } } -svg { - width: 28px; - height: 40px; - &.validate { - width: 13px; - height: 10px; - margin-left: -17px; - stroke: $white; - } -} - .collapse { border: 1px solid $grey-5; border-radius: 4px; @@ -102,12 +91,16 @@ svg { color: $grey-1; } .svgContainer { - height: 48px; - width: 48px; + height: 52px; + width: 52px; + margin-right: 8px; svg { - margin-right: 8px; - stroke: $grey-1; - fill: $grey-1; + &.validate { + width: 13px; + height: 10px; + margin-left: -17px; + stroke: $white; + } } } } diff --git a/src/app/shared/components/structure-type-picker/structure-type-picker.component.ts b/src/app/shared/components/structure-type-picker/structure-type-picker.component.ts index f896a6258..8df95a664 100644 --- a/src/app/shared/components/structure-type-picker/structure-type-picker.component.ts +++ b/src/app/shared/components/structure-type-picker/structure-type-picker.component.ts @@ -1,15 +1,10 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { StructureType } from '../../../models/structure-type.model'; -import { Structure } from '../../../models/structure.model'; import { StructureTypeService } from '../../../services/structure-type.service'; -import { typeStructureEnum } from '../../enum/typeStructure.enum'; +import { StructureTypeCategory } from '../../enum/structureTypeCategory.enum'; +import { TypeStructureEnum } from '../../enum/typeStructure.enum'; import { ButtonType } from '../button/buttonType.enum'; - -export enum structureTypes { - public = 'Publique', - private = 'Privée à but non lucratif', - privateLucratif = 'Privée à but lucratif', -} +import { StructureTypeIcon } from './../../enum/structureTypeIcon.enum'; @Component({ selector: 'app-structure-type-picker', @@ -17,9 +12,11 @@ export enum structureTypes { styleUrls: ['./structure-type-picker.component.scss'], }) export class StructureTypePickerComponent implements OnInit { - public pickedType: string; - public structureTypes: StructureType[]; - @Input() public pickedChoice?: string; + public pickedCategory: string; + public publicTypes: StructureType[]; + public privateTypes: StructureType[]; + public privateLucrativeTypes: StructureType[]; + @Input() public pickedTypeId?: string; @Input() public isEditMode?: boolean; @Output() selectedType: EventEmitter<string> = new EventEmitter<string>(); @@ -29,17 +26,25 @@ export class StructureTypePickerComponent implements OnInit { public showPrivateLucrative: boolean; public buttonTypeEnum = ButtonType; + public structureTypeIconEnum = StructureTypeIcon; + public structureTypeCategoryEnum = StructureTypeCategory; constructor(private structureTypeService: StructureTypeService) {} ngOnInit() { this.structureTypeService.getStructureTypes().subscribe((types) => { - this.structureTypes = types; - if (this.pickedChoice) { - this.pickedType = this.getType(this.pickedChoice); + types = types.filter((type) => !type.private); + this.publicTypes = types.filter((type) => type.category === this.structureTypeCategoryEnum.public); + this.privateTypes = types.filter((type) => type.category === this.structureTypeCategoryEnum.private); + this.privateLucrativeTypes = types.filter( + (type) => type.category === this.structureTypeCategoryEnum.privateLucrative + ); + if (this.pickedTypeId) { + this.getType(this.pickedTypeId); } - if (this.isEditMode && this.pickedChoice) { - this.toggleCollapse(this.pickedType); + if (this.isEditMode && this.pickedTypeId) { + console.log('TOGGLE COLLAPSE'); + this.toggleCollapse(this.pickedCategory); } }); } @@ -60,52 +65,32 @@ export class StructureTypePickerComponent implements OnInit { this.showPublic = false; } - public getType(nameChoice: string): string { - return this.structureTypes.filter((type) => { - if (type.values.includes(nameChoice)) { - return type.name; - } - })[0].name; - } - - public getChoices(nameType: string): string[] { - return this.structureTypes.filter((type) => { - if (type.name == nameType) { - return type.values; - } - })[0].values; + public getType(pickedTypeId: string): void { + this.structureTypeService.getStructureTypeById(pickedTypeId).subscribe((structureType) => { + this.pickedCategory = structureType.category; + console.log(this.pickedCategory); + }); } - public toggleCollapse(structureName: string): void { - this.pickType(structureName); - if (structureName === 'Publique') this.togglePublic(); - if (structureName === 'Privée à but non lucratif') this.togglePrivate(); - if (structureName === 'Privée à but lucratif') this.togglePrivateLucrative(); + public getChoices(category: string): StructureType[] { + if (category === this.structureTypeCategoryEnum.public) return this.publicTypes; + if (category === this.structureTypeCategoryEnum.private) return this.privateTypes; + if (category === this.structureTypeCategoryEnum.privateLucrative) return this.privateLucrativeTypes; } - public pickType(type: string): void { - this.pickedType = type; + public toggleCollapse(category: string): void { + this.pickedCategory = category; + if (category === this.structureTypeCategoryEnum.public) this.togglePublic(); + if (category === this.structureTypeCategoryEnum.private) this.togglePrivate(); + if (category === this.structureTypeCategoryEnum.privateLucrative) this.togglePrivateLucrative(); } public pickChoice(choice: string): void { - this.pickedChoice = choice; + this.pickedTypeId = choice; this.selectedType.emit(choice); } - public getStructureTypeIcon(type: string): string { - switch (type) { - case structureTypes.public: - return 'typeStructure_public'; - case structureTypes.private: - return 'typeStructure_private'; - case structureTypes.privateLucratif: - return 'typeStructure_privateLucratif'; - default: - throw new Error('Structure type not handle'); - } - } - public getStructureTypeName(type: string): string { - return typeStructureEnum[type]; + return TypeStructureEnum[type]; } } diff --git a/src/app/shared/enum/structureTypeCategory.enum.ts b/src/app/shared/enum/structureTypeCategory.enum.ts new file mode 100644 index 000000000..407f28abd --- /dev/null +++ b/src/app/shared/enum/structureTypeCategory.enum.ts @@ -0,0 +1,5 @@ +export enum StructureTypeCategory { + public = 'Publique', + private = 'Privée à but non lucratif', + privateLucrative = 'Privée à but lucratif', +} diff --git a/src/app/shared/enum/structureTypeIcon.enum.ts b/src/app/shared/enum/structureTypeIcon.enum.ts new file mode 100644 index 000000000..a449ee9c8 --- /dev/null +++ b/src/app/shared/enum/structureTypeIcon.enum.ts @@ -0,0 +1,5 @@ +export enum StructureTypeIcon { + public = 'typeStructure_public', + private = 'typeStructure_private', + privateLucrative = 'typeStructure_privateLucrative', +} diff --git a/src/app/shared/enum/typeStructure.enum.ts b/src/app/shared/enum/typeStructure.enum.ts index a024b8b2a..d976175f9 100644 --- a/src/app/shared/enum/typeStructure.enum.ts +++ b/src/app/shared/enum/typeStructure.enum.ts @@ -1,4 +1,4 @@ -export enum typeStructureEnum { +export enum TypeStructureEnum { fablab = 'Fablab', // A supprimer ? diff --git a/src/assets/form/sprite.svg b/src/assets/form/sprite.svg index 602d921f8..816a517ea 100644 --- a/src/assets/form/sprite.svg +++ b/src/assets/form/sprite.svg @@ -23,106 +23,123 @@ stroke-linejoin="round" /> </symbol> - <symbol id="typeStructure_privateLucratif" viewBox="0 0 20 45" xmlns="http://www.w3.org/2000/svg"> - <path d="M3.56201 15.4203L16.562 10V43H3.56201V15.4203Z" stroke="none" /> - <rect x="0.562012" y="44" width="19" height="1" stroke="none" /> - <path d="M7.06201 0L7.56201 15H6.56201L7.06201 0Z" stroke="none" /> - <rect x="5.56201" y="17" width="4" height="1" fill="white" stroke="none" /> - <rect x="10.562" y="17" width="4" height="1" fill="white" stroke="none" /> - <rect x="3.56201" y="17" width="1" height="1" fill="white" stroke="none" /> - <rect x="3.56201" y="19" width="1" height="1" fill="white" stroke="none" /> - <rect x="3.56201" y="21" width="1" height="1" fill="white" stroke="none" /> - <rect x="3.56201" y="23" width="1" height="1" fill="white" stroke="none" /> - <rect x="3.56201" y="25" width="1" height="1" fill="white" stroke="none" /> - <rect x="3.56201" y="27" width="1" height="1" fill="white" stroke="none" /> - <rect x="3.56201" y="29" width="1" height="1" fill="white" stroke="none" /> - <rect x="3.56201" y="31" width="1" height="1" fill="white" stroke="none" /> - <rect x="3.56201" y="33" width="1" height="1" fill="white" stroke="none" /> - <rect x="3.56201" y="35" width="1" height="1" fill="white" stroke="none" /> - <rect x="3.56201" y="37" width="1" height="1" fill="white" stroke="none" /> - <rect x="3.56201" y="39" width="1" height="1" fill="white" stroke="none" /> - <rect x="15.562" y="17" width="1" height="1" fill="white" stroke="none" /> - <rect x="15.562" y="19" width="1" height="1" fill="white" stroke="none" /> - <rect x="15.562" y="21" width="1" height="1" fill="white" stroke="none" /> - <rect x="15.562" y="23" width="1" height="1" fill="white" stroke="none" /> - <rect x="15.562" y="25" width="1" height="1" fill="white" stroke="none" /> - <rect x="15.562" y="27" width="1" height="1" fill="white" stroke="none" /> - <rect x="15.562" y="29" width="1" height="1" fill="white" stroke="none" /> - <rect x="15.562" y="31" width="1" height="1" fill="white" stroke="none" /> - <rect x="15.562" y="33" width="1" height="1" fill="white" stroke="none" /> - <rect x="15.562" y="35" width="1" height="1" fill="white" stroke="none" /> - <rect x="15.562" y="37" width="1" height="1" fill="white" stroke="none" /> - <rect x="15.562" y="39" width="1" height="1" fill="white" stroke="none" /> - <rect x="5.56201" y="19" width="4" height="1" fill="white" stroke="none" /> - <rect x="10.562" y="19" width="4" height="1" fill="white" stroke="none" /> - <rect x="5.56201" y="21" width="4" height="1" fill="white" stroke="none" /> - <rect x="10.562" y="21" width="4" height="1" fill="white" stroke="none" /> - <rect x="5.56201" y="23" width="4" height="1" fill="white" stroke="none" /> - <rect x="10.562" y="23" width="4" height="1" fill="white" stroke="none" /> - <rect x="5.56201" y="25" width="4" height="1" fill="white" stroke="none" /> - <rect x="10.562" y="25" width="4" height="1" fill="white" stroke="none" /> - <rect x="5.56201" y="27" width="4" height="1" fill="white" stroke="none" /> - <rect x="10.562" y="27" width="4" height="1" fill="white" stroke="none" /> - <rect x="5.56201" y="29" width="4" height="1" fill="white" stroke="none" /> - <rect x="10.562" y="29" width="4" height="1" fill="white" stroke="none" /> - <rect x="5.56201" y="31" width="4" height="1" fill="white" stroke="none" /> - <rect x="10.562" y="31" width="4" height="1" fill="white" stroke="none" /> - <rect x="5.56201" y="33" width="4" height="1" fill="white" stroke="none" /> - <rect x="10.562" y="33" width="4" height="1" fill="white" stroke="none" /> - <rect x="5.56201" y="35" width="4" height="1" fill="white" stroke="none" /> - <rect x="10.562" y="35" width="4" height="1" fill="white" stroke="none" /> - <rect x="5.56201" y="37" width="4" height="1" fill="white" stroke="none" /> - <rect x="10.562" y="37" width="4" height="1" fill="white" stroke="none" /> - <rect x="5.56201" y="39" width="4" height="1" fill="white" stroke="none" /> - <rect x="10.562" y="39" width="4" height="1" fill="white" stroke="none" /> - </symbol> - - <symbol id="typeStructure_private" viewBox="0 0 20 25" xmlns="http://www.w3.org/2000/svg"> - <path d="M3.12402 8H16.124V23H3.12402V8Z" stroke="none" /> - <path d="M9.79077 10.5L9.79077 1" fill="none" stroke-linecap="round" stroke-linejoin="round" /> - <path - d="M9.79077 1.44444C9.79077 1.44444 9.40188 1 8.6241 1C7.84633 1 7.45744 1.44444 7.45744 1.44444V4.11111C7.45744 4.11111 7.84633 3.66667 8.6241 3.66667C9.40188 3.66667 9.79077 4.11111 9.79077 4.11111V1.44444Z" - stroke="none" /> - <path - d="M7.45728 4.44444C7.45728 4.44444 7.06839 4.88889 6.29061 4.88889C5.51283 4.88889 5.12394 4.44444 5.12394 4.44444V1.77777C5.12394 1.77777 5.51283 2.22222 6.29061 2.22222C7.06839 2.22222 7.45728 1.77777 7.45728 1.77777V4.44444Z" - stroke="none" /> - <rect x="0.124023" y="24" width="19" height="1" stroke="none" /> - <rect x="4.12402" y="11" width="2" height="1" fill="white" stroke="none" /> - <rect x="7.12402" y="11" width="2" height="1" fill="white" stroke="none" /> - <rect x="10.124" y="11" width="2" height="1" fill="white" stroke="none" /> - <rect x="13.124" y="11" width="2" height="1" fill="white" stroke="none" /> - <rect x="4.12402" y="14" width="2" height="1" fill="white" stroke="none" /> - <rect x="7.12402" y="14" width="2" height="1" fill="white" stroke="none" /> - <rect x="10.124" y="14" width="2" height="1" fill="white" stroke="none" /> - <rect x="13.124" y="14" width="2" height="1" fill="white" stroke="none" /> - <rect x="4.12402" y="17" width="2" height="1" fill="white" stroke="none" /> - <rect x="7.12402" y="17" width="2" height="1" fill="white" stroke="none" /> - <rect x="10.124" y="17" width="2" height="1" fill="white" stroke="none" /> - <rect x="13.124" y="17" width="2" height="1" fill="white" stroke="none" /> - <rect x="4.12402" y="20" width="2" height="1" fill="white" stroke="none" /> - <rect x="7.12402" y="20" width="2" height="1" fill="white" stroke="none" /> - <rect x="10.124" y="20" width="2" height="1" fill="white" stroke="none" /> - <rect x="13.124" y="20" width="2" height="1" fill="white" stroke="none" /> - </symbol> - - <symbol id="typeStructure_public" viewBox="0 0 28 31" xmlns="http://www.w3.org/2000/svg"> - <path d="M14.0002 6.44446L25.6668 13.4445H2.3335L14.0002 6.44446Z" stroke="none" /> - <path - d="M2.3335 13.4445H25.6668V14C25.6668 14.5523 25.2191 15 24.6668 15H3.3335C2.78121 15 2.3335 14.5523 2.3335 14V13.4445Z" - stroke="none" /> - <path d="M2.3335 26.6667H25.6668V28.2222H2.3335V26.6667Z" stroke="none" /> - <path d="M0 29H28V30.5556H0V29Z" stroke="none" /> - <rect x="4.6665" y="15.7778" width="2.33333" height="10.1111" stroke="none" /> - <rect x="10.1113" y="15.7778" width="2.33333" height="10.1111" stroke="none" /> - <rect x="15.5557" y="15.7778" width="2.33333" height="10.1111" stroke="none" /> - <rect x="21" y="15.7778" width="2.33333" height="10.1111" stroke="none" /> - <path d="M13.667 7.22222L13.667 1" stroke-linecap="round" stroke-linejoin="round" fill="none" /> - <path - d="M13.667 1.44444C13.667 1.44444 13.2781 1 12.5003 1C11.7225 1 11.3337 1.44444 11.3337 1.44444V4.11111C11.3337 4.11111 11.7225 3.66667 12.5003 3.66667C13.2781 3.66667 13.667 4.11111 13.667 4.11111V1.44444Z" - stroke="none" /> - <path - d="M11.3335 4.44447C11.3335 4.44447 10.9446 4.88892 10.1668 4.88892C9.38905 4.88892 9.00016 4.44447 9.00016 4.44447V1.7778C9.00016 1.7778 9.38905 2.22225 10.1668 2.22225C10.9446 2.22225 11.3335 1.7778 11.3335 1.7778V4.44447Z" - stroke="none" /> + <symbol id="typeStructure_privateLucrative" width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"> + <rect width="52" height="52" rx="4" fill="white"/> + <path d="M7.32104 39.6816C6.79673 39.9831 6.79461 40.4777 7.31467 40.7791L24.0607 50.5117C24.5828 50.8152 25.4319 50.8131 25.9562 50.5117L43.6044 40.3227C44.1287 40.0213 44.1329 39.5288 43.6107 39.2253L26.8647 29.4927C26.3447 29.1912 25.4935 29.1912 24.9692 29.4927L7.32104 39.6816Z" fill="#DFB74F"/> + <path d="M38.1703 24.863V39.6774L25.2197 47.0856V32.2691L38.1703 24.863Z" fill="white"/> + <path d="M38.1703 24.863V39.6774L25.2197 47.0856V32.2691L38.1703 24.863Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2197 32.2692L12.2861 24.8525L25.2197 17.4294L38.1703 24.8631L25.2197 32.2692Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2112 31.1761L14.2071 24.8653L25.2112 18.5503L36.228 24.8738L25.2112 31.1761Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M12.286 24.8528L12.2669 39.6777L25.2197 47.086V32.2695L12.286 24.8528Z" fill="white"/> + <path d="M12.286 24.8528L12.2669 39.6777L25.2197 47.086V32.2695L12.286 24.8528Z" fill="#BDBDBD" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2196 15.7334L38.1724 23.1692L25.2196 30.5753L12.286 23.1565L25.2196 15.7334ZM36.228 23.1819L25.2111 16.8563L14.2092 23.1735L25.2111 29.4842L36.228 23.1819Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M38.1703 23.1692V25.8247L25.2198 33.2329V30.5753L38.1703 23.1692Z" fill="white"/> + <path d="M38.1703 25.8247V23.1692L25.2198 30.5753V33.2329" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2197 30.5754V33.0866L12.2861 25.6677V23.1587L25.2197 30.5754Z" fill="#BDBDBD"/> + <path d="M25.2197 33.0866V30.5754L12.2861 23.1587V25.6677" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2112 16.8562V18.5501L15.6846 24.0182L14.2072 23.1734L25.2112 16.8562Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M36.228 23.1819L25.2112 16.8562V18.5501L34.7655 24.0182L36.228 23.1819Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M29 33.394L29.0328 45L35 41.606L34.9672 30L29 33.394Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M38.1702 8.85376V23.6702L25.2175 31.0763V16.2599L38.1702 8.85376Z" fill="white"/> + <path d="M38.1702 8.85376V23.6702L31.6939 27.3733L25.2175 31.0763V16.2599L38.1702 8.85376Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2175 16.2597L12.286 8.84301L25.2175 1.41992L38.1702 8.85362L25.2175 16.2597Z" fill="white"/> + <path d="M25.2175 16.2597L12.286 8.84301L25.2175 1.41992L38.1702 8.85362L25.2175 16.2597Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M12.286 8.84302L12.2669 23.6701L25.2175 31.0762V16.2597L12.286 8.84302Z" fill="white"/> + <path d="M12.286 8.84302L12.2669 23.6701L25.2175 31.0762V16.2597L12.286 8.84302Z" fill="#BDBDBD" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M32.6309 14.2322V18.8256L35.9467 16.922V12.3286L32.6309 14.2322Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M27.7376 16.9388V21.5322L31.0533 19.6315V15.0381L27.7376 16.9388Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M32.5775 20.5311V25.1273L35.8932 23.2238V18.6304L32.5775 20.5311Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M27.6868 23.2407V27.8341L31.0026 25.9306V21.3372L27.6868 23.2407Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M17.9226 14.0851V18.6786L14.5878 16.775V12.1843L17.9226 14.0851Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M22.8414 16.7919V21.3882L19.5066 19.4846V14.8911L22.8414 16.7919Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M17.9113 20.3837V24.98L14.5737 23.0764V18.4829L17.9113 20.3837Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M22.8301 23.0933V27.6896L19.4953 25.786V21.1897L22.8301 23.0933Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M17.9226 30.0272V34.6208L14.5878 32.7171V28.1265L17.9226 30.0272Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M22.8414 32.734V37.3303L19.5066 35.4268V30.8333L22.8414 32.734Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M17.9113 36.3258V40.9221L14.5737 39.0186V34.425L17.9113 36.3258Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M22.8301 39.0354V43.6318L19.4953 41.7282V37.1318L22.8301 39.0354Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M38.1702 8.08521V8.85362L25.1135 16.5633V15.7949L38.1702 8.08521Z" fill="white"/> + <path d="M38.1702 8.08521V8.85362L25.1135 16.5633V15.7949L38.1702 8.08521Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.1134 15.7948L12.3326 8.46727L25.3724 0.738525L38.1702 8.08519L25.1134 15.7948Z" fill="#E9E9E9"/> + <path d="M12.3328 8.46704L12.3137 9.24396L25.1136 16.563V15.7946L12.3328 8.46704Z" fill="white"/> + <path d="M12.3328 8.46704L12.3137 9.24396L25.1136 16.563V15.7946L12.3328 8.46704Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.7486 1.47656L12.1813 8.74474" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> + <path d="M37.8622 8.26004L25.9456 1.34131" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> + </symbol> + + <symbol id="typeStructure_private" width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"> + <rect width="52" height="52" rx="4" fill="white"/> + <path d="M7.32104 39.6816C6.79673 39.9831 6.79461 40.4777 7.31467 40.7791L24.0607 50.5117C24.5828 50.8152 25.4319 50.8131 25.9562 50.5117L43.6044 40.3227C44.1287 40.0213 44.1329 39.5288 43.6107 39.2253L26.8647 29.4927C26.3447 29.1912 25.4935 29.1912 24.9692 29.4927L7.32104 39.6816Z" fill="#1B7183"/> + <path d="M38.1703 24.863V39.6774L25.2197 47.0856V32.2691L38.1703 24.863Z" fill="white"/> + <path d="M38.1703 24.863V39.6774L25.2197 47.0856V32.2691L38.1703 24.863Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2197 32.2692L12.2861 24.8525L25.2197 17.4294L38.1703 24.8631L25.2197 32.2692Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2112 31.1761L14.2071 24.8653L25.2112 18.5503L36.228 24.8738L25.2112 31.1761Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M12.286 24.8528L12.2669 39.6777L25.2197 47.086V32.2695L12.286 24.8528Z" fill="white"/> + <path d="M12.286 24.8528L12.2669 39.6777L25.2197 47.086V32.2695L12.286 24.8528Z" fill="#BDBDBD" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2196 15.7334L38.1724 23.1692L25.2196 30.5753L12.286 23.1565L25.2196 15.7334ZM36.228 23.1819L25.2111 16.8563L14.2092 23.1735L25.2111 29.4842L36.228 23.1819Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M38.1703 23.1692V25.8247L25.2198 33.2329V30.5753L38.1703 23.1692Z" fill="white"/> + <path d="M38.1703 25.8247V23.1692L25.2198 30.5753V33.2329" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2197 30.5754V33.0866L12.2861 25.6677V23.1587L25.2197 30.5754Z" fill="#BDBDBD"/> + <path d="M25.2197 33.0866V30.5754L12.2861 23.1587V25.6677" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2112 16.8562V18.5501L15.6846 24.0182L14.2072 23.1734L25.2112 16.8562Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M36.228 23.1819L25.2112 16.8562V18.5501L34.7655 24.0182L36.228 23.1819Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M29 33.394L29.0328 45L35 41.606L34.9672 30L29 33.394Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M38.1702 8.85376V23.6702L25.2175 31.0763V16.2599L38.1702 8.85376Z" fill="white"/> + <path d="M38.1702 8.85376V23.6702L31.6939 27.3733L25.2175 31.0763V16.2599L38.1702 8.85376Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2175 16.2597L12.286 8.84301L25.2175 1.41992L38.1702 8.85362L25.2175 16.2597Z" fill="white"/> + <path d="M25.2175 16.2597L12.286 8.84301L25.2175 1.41992L38.1702 8.85362L25.2175 16.2597Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M12.286 8.84302L12.2669 23.6701L25.2175 31.0762V16.2597L12.286 8.84302Z" fill="white"/> + <path d="M12.286 8.84302L12.2669 23.6701L25.2175 31.0762V16.2597L12.286 8.84302Z" fill="#BDBDBD" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M32.6309 14.2322V18.8256L35.9467 16.922V12.3286L32.6309 14.2322Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M27.7376 16.9388V21.5322L31.0533 19.6315V15.0381L27.7376 16.9388Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M32.5775 20.5311V25.1273L35.8932 23.2238V18.6304L32.5775 20.5311Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M27.6868 23.2407V27.8341L31.0026 25.9306V21.3372L27.6868 23.2407Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M17.9226 14.0851V18.6786L14.5878 16.775V12.1843L17.9226 14.0851Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M22.8414 16.7919V21.3882L19.5066 19.4846V14.8911L22.8414 16.7919Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M17.9113 20.3837V24.98L14.5737 23.0764V18.4829L17.9113 20.3837Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M22.8301 23.0933V27.6896L19.4953 25.786V21.1897L22.8301 23.0933Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M17.9226 30.0272V34.6208L14.5878 32.7171V28.1265L17.9226 30.0272Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M22.8414 32.734V37.3303L19.5066 35.4268V30.8333L22.8414 32.734Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M17.9113 36.3258V40.9221L14.5737 39.0186V34.425L17.9113 36.3258Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M22.8301 39.0354V43.6318L19.4953 41.7282V37.1318L22.8301 39.0354Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M38.1702 8.08521V8.85362L25.1135 16.5633V15.7949L38.1702 8.08521Z" fill="white"/> + <path d="M38.1702 8.08521V8.85362L25.1135 16.5633V15.7949L38.1702 8.08521Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.1134 15.7948L12.3326 8.46727L25.3724 0.738525L38.1702 8.08519L25.1134 15.7948Z" fill="#E9E9E9"/> + <path d="M12.3328 8.46704L12.3137 9.24396L25.1136 16.563V15.7946L12.3328 8.46704Z" fill="white"/> + <path d="M12.3328 8.46704L12.3137 9.24396L25.1136 16.563V15.7946L12.3328 8.46704Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.7486 1.47656L12.1813 8.74474" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> + <path d="M37.8622 8.26004L25.9456 1.34131" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> + </symbol> + + <symbol id="typeStructure_public" width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"> + <rect width="52" height="52" rx="4" fill="white"/> + <path d="M7.39483 34.4973C6.87052 34.7987 6.8684 35.2933 7.38846 35.5948L24.1344 45.3273C24.6566 45.6309 25.5057 45.6288 26.03 45.3273L43.6782 35.1384C44.2025 34.8369 44.2067 34.3445 43.6845 34.0409L26.9385 24.3083C26.4185 24.0069 25.5673 24.0069 25.043 24.3083L7.39483 34.4973Z" fill="#DA3635"/> + <path d="M38.2441 19.6787V34.4931L25.2935 41.9013V27.0848L38.2441 19.6787Z" fill="white"/> + <path d="M38.2441 19.6787V34.4931L25.2935 41.9013V27.0848L38.2441 19.6787Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2935 27.0849L12.3599 19.6682L25.2935 12.2451L38.2441 19.6788L25.2935 27.0849Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2851 25.9918L14.281 19.681L25.2851 13.366L36.3019 19.6895L25.2851 25.9918Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M12.3599 19.6685L12.3408 34.4934L25.2935 41.9016V27.0852L12.3599 19.6685Z" fill="white"/> + <path d="M12.3599 19.6685L12.3408 34.4934L25.2935 41.9016V27.0852L12.3599 19.6685Z" fill="#BDBDBD" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2935 10.5491L38.2462 17.9849L25.2935 25.391L12.3599 17.9721L25.2935 10.5491ZM36.3018 17.9976L25.285 11.672L14.283 17.9891L25.285 24.2999L36.3018 17.9976Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M38.2442 17.9849V20.6404L25.2936 28.0486V25.391L38.2442 17.9849Z" fill="white"/> + <path d="M38.2442 20.6404V17.9849L25.2936 25.391V28.0486" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2936 25.3911V27.9022L12.36 20.4834V17.9744L25.2936 25.3911Z" fill="#BDBDBD"/> + <path d="M25.2936 27.9022V25.3911L12.36 17.9744V20.4834" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2851 11.6719V13.3658L15.7584 18.8339L14.281 17.989L25.2851 11.6719Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M36.3019 17.9975L25.2851 11.6719V13.3658L34.8393 18.8339L36.3019 17.9975Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M29.0739 28.2097L29.1066 39.8157L35.0739 36.4216L35.0411 24.8157L29.0739 28.2097Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M17.9965 24.8429V29.4364L14.6617 27.5328V22.9421L17.9965 24.8429Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M22.9153 27.5497V32.146L19.5805 30.2424V25.6489L22.9153 27.5497Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M17.9852 31.1415V35.7378L14.6476 33.8342V29.2407L17.9852 31.1415Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M22.904 33.8511V38.4474L19.5692 36.5438V31.9475L22.904 33.8511Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M38.244 17.9309L25.1873 25.6406" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M24.8546 25.1435L12.0738 17.8159L25.4462 9.81592L38.244 17.1626L24.8546 25.1435Z" fill="#E9E9E9"/> + <path d="M25.8224 10.554L12.2551 17.8221" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> + <path d="M37.936 17.3374L26.0194 10.4187" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> + <path d="M24.9904 25.7346L12.5738 18.3159" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> + <path d="M26.0738 27.8157L16.0922 16.083L32.0058 7.91253L41.5738 18.8157L26.0738 27.8157Z" fill="white" stroke="#696969" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M8.57379 17.8157L16.0922 16.0831L32.0058 7.91256L22.9568 9.60935L8.57379 17.8157Z" fill="#E9E9E9" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M8.57375 17.8157L16.6255 16.0773L26.0738 27.8157L8.57375 17.8157Z" fill="#BDBDBD" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> </symbol> <symbol id="accesLibre" width="44" height="44" viewBox="0 0 44 44" fill="none" xmlns="http://www.w3.org/2000/svg"> -- GitLab From 4dd87e223b7fa19385e75aadd30e388edf9ab8d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Pailharey?= <rpailharey@grandlyon.com> Date: Wed, 19 Oct 2022 17:53:34 +0200 Subject: [PATCH 2/5] feat: adapted structure icon to its category --- .../structure-type.component.html | 1 - src/app/models/structure.model.ts | 24 +++- .../profile-structure.component.html | 2 +- .../profile-structure.component.ts | 3 + .../structure-type-picker.component.ts | 11 +- src/app/shared/enum/typeStructure.enum.ts | 1 + .../structure-details.component.html | 2 +- .../structure-details.component.ts | 3 + src/assets/ico/sprite.svg | 119 ++++++++++++++++++ 9 files changed, 151 insertions(+), 15 deletions(-) diff --git a/src/app/form/form-view/structure-form/structure-type/structure-type.component.html b/src/app/form/form-view/structure-form/structure-type/structure-type.component.html index 3e4ce07da..1216871d0 100644 --- a/src/app/form/form-view/structure-form/structure-type/structure-type.component.html +++ b/src/app/form/form-view/structure-form/structure-type/structure-type.component.html @@ -18,7 +18,6 @@ </p> <div class="type-picker"> <app-structure-type-picker - [isEditMode]="isEditMode" [pickedTypeId]="structureForm.get('structureType').valid ? structureForm.get('structureType').value : null" (selectedType)="setTypeStructure($event)" ></app-structure-type-picker> diff --git a/src/app/models/structure.model.ts b/src/app/models/structure.model.ts index 7cc9159ea..e1102a1d0 100644 --- a/src/app/models/structure.model.ts +++ b/src/app/models/structure.model.ts @@ -1,11 +1,14 @@ -import { Equipment } from '../structure-list/enum/equipment.enum'; +import { StructureTypeCategory } from '../shared/enum/structureTypeCategory.enum'; +import { StructureTypeIcon } from '../shared/enum/structureTypeIcon.enum'; import { TypeStructureEnum } from '../shared/enum/typeStructure.enum'; +import { Equipment } from '../structure-list/enum/equipment.enum'; import { Weekday } from '../structure-list/enum/weekday.enum'; import { Address } from './address.model'; import { Day } from './day.model'; import { OpeningDay } from './openingDay.model'; -import { Week } from './week.model'; import { PersonalOffer } from './personalOffer.model'; +import { StructureType } from './structure-type.model'; +import { Week } from './week.model'; export class Structure { public _id: string = null; @@ -13,7 +16,7 @@ export class Structure { public createdAt: string = null; public updatedAt: string = null; public structureName: string = null; - public structureType: string = null; + public structureType: StructureType = null; public description: string = null; public address: Address = new Address(); public contactPhone: string = null; @@ -188,7 +191,20 @@ export class Structure { } public getLabelTypeStructure(): string { - return TypeStructureEnum[this.structureType] ? TypeStructureEnum[this.structureType] : ''; + return TypeStructureEnum[this.structureType.value] ? TypeStructureEnum[this.structureType.value] : ''; + } + + public getTypeStructureIcon(): string { + switch (this.structureType.category) { + case StructureTypeCategory.public: + return StructureTypeIcon['public']; + case StructureTypeCategory.private: + return StructureTypeIcon['private']; + case StructureTypeCategory.privateLucrative: + return StructureTypeIcon['privateLucrative']; + default: + return 'structureAvatar'; + } } public hasSocialNetwork(): boolean { diff --git a/src/app/profile/profile-structure/profile-structure.component.html b/src/app/profile/profile-structure/profile-structure.component.html index 05ee4b955..6243322cd 100644 --- a/src/app/profile/profile-structure/profile-structure.component.html +++ b/src/app/profile/profile-structure/profile-structure.component.html @@ -7,7 +7,7 @@ (click)="toggleDetails()" > <div fxLayout="row" fxLayoutAlign="space-between center" fxLayoutGap="16px"> - <app-svg-icon [type]="'ico'" [icon]="'structureAvatar'" [iconClass]="'icon-52'"></app-svg-icon> + <app-svg-icon [type]="'ico'" [icon]="getStructureTypeIcon()" [iconClass]="'icon-52'"></app-svg-icon> <div fxLayout="column" fxLayoutAlign="space-between start"> <p class="structureName">{{ structureWithOwners.structure.structureName }}</p> <p class="structureType">{{ getStructureTypeLabel() }}</p> diff --git a/src/app/profile/profile-structure/profile-structure.component.ts b/src/app/profile/profile-structure/profile-structure.component.ts index 6013cf705..d72ce08f5 100644 --- a/src/app/profile/profile-structure/profile-structure.component.ts +++ b/src/app/profile/profile-structure/profile-structure.component.ts @@ -65,6 +65,9 @@ export class ProfileStructureComponent implements OnInit { public getStructureTypeLabel(): string { return new Structure(this.structureWithOwners.structure).getLabelTypeStructure(); } + public getStructureTypeIcon(): string { + return new Structure(this.structureWithOwners.structure).getTypeStructureIcon(); + } public toggleDetails(): void { this.showDetails = !this.showDetails; } diff --git a/src/app/shared/components/structure-type-picker/structure-type-picker.component.ts b/src/app/shared/components/structure-type-picker/structure-type-picker.component.ts index 8df95a664..01d93d902 100644 --- a/src/app/shared/components/structure-type-picker/structure-type-picker.component.ts +++ b/src/app/shared/components/structure-type-picker/structure-type-picker.component.ts @@ -17,7 +17,6 @@ export class StructureTypePickerComponent implements OnInit { public privateTypes: StructureType[]; public privateLucrativeTypes: StructureType[]; @Input() public pickedTypeId?: string; - @Input() public isEditMode?: boolean; @Output() selectedType: EventEmitter<string> = new EventEmitter<string>(); // Collapse var @@ -40,11 +39,7 @@ export class StructureTypePickerComponent implements OnInit { (type) => type.category === this.structureTypeCategoryEnum.privateLucrative ); if (this.pickedTypeId) { - this.getType(this.pickedTypeId); - } - if (this.isEditMode && this.pickedTypeId) { - console.log('TOGGLE COLLAPSE'); - this.toggleCollapse(this.pickedCategory); + this.initPickedType(this.pickedTypeId); } }); } @@ -65,10 +60,10 @@ export class StructureTypePickerComponent implements OnInit { this.showPublic = false; } - public getType(pickedTypeId: string): void { + public initPickedType(pickedTypeId: string): void { this.structureTypeService.getStructureTypeById(pickedTypeId).subscribe((structureType) => { this.pickedCategory = structureType.category; - console.log(this.pickedCategory); + this.toggleCollapse(this.pickedCategory); }); } diff --git a/src/app/shared/enum/typeStructure.enum.ts b/src/app/shared/enum/typeStructure.enum.ts index d976175f9..92c30c1da 100644 --- a/src/app/shared/enum/typeStructure.enum.ts +++ b/src/app/shared/enum/typeStructure.enum.ts @@ -20,6 +20,7 @@ export enum TypeStructureEnum { bijPij = 'BIJ/PIJ', logement = 'Logement', MaisonFranceService = 'Maison France Service', + autre = 'Autre', association = 'Association', centreSocio = 'Centre socio-culturel', 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 f83335702..2e5cf0e46 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 @@ -2,7 +2,7 @@ <div class="structure-details-container"> <!-- Header info --> <div class="structure-details-title" fxLayout="row" fxLayoutGap="8px" fxLayoutAlign="space-evenly center"> - <app-svg-icon [type]="'ico'" [icon]="'structureAvatar'" [iconClass]="'icon-52'"></app-svg-icon> + <app-svg-icon [type]="'ico'" [icon]="getStructureTypeIcon()" [iconClass]="'icon-52'"></app-svg-icon> <h1 class="bold">{{ structure.structureName }}</h1> <div class="ico-close"> <div (click)="close()" class="ico-close-details"></div> 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 e7375bc58..f53e0e9d0 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 @@ -405,4 +405,7 @@ export class StructureDetailsComponent implements OnInit { public displayJobEmployer(profile: User): string { return new Utils().getJobEmployer(profile); } + public getStructureTypeIcon(): string { + return this.structure.getTypeStructureIcon(); + } } diff --git a/src/assets/ico/sprite.svg b/src/assets/ico/sprite.svg index ec13392a5..86497305c 100644 --- a/src/assets/ico/sprite.svg +++ b/src/assets/ico/sprite.svg @@ -581,6 +581,125 @@ <path d="m8.6 17.8 8-1.7 9.5 11.7-17.5-10Z" fill="#BDBDBD" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> </symbol> + <symbol id="typeStructure_privateLucrative" width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"> + <rect width="52" height="52" rx="4" fill="white"/> + <path d="M7.32104 39.6816C6.79673 39.9831 6.79461 40.4777 7.31467 40.7791L24.0607 50.5117C24.5828 50.8152 25.4319 50.8131 25.9562 50.5117L43.6044 40.3227C44.1287 40.0213 44.1329 39.5288 43.6107 39.2253L26.8647 29.4927C26.3447 29.1912 25.4935 29.1912 24.9692 29.4927L7.32104 39.6816Z" fill="#DFB74F"/> + <path d="M38.1703 24.863V39.6774L25.2197 47.0856V32.2691L38.1703 24.863Z" fill="white"/> + <path d="M38.1703 24.863V39.6774L25.2197 47.0856V32.2691L38.1703 24.863Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2197 32.2692L12.2861 24.8525L25.2197 17.4294L38.1703 24.8631L25.2197 32.2692Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2112 31.1761L14.2071 24.8653L25.2112 18.5503L36.228 24.8738L25.2112 31.1761Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M12.286 24.8528L12.2669 39.6777L25.2197 47.086V32.2695L12.286 24.8528Z" fill="white"/> + <path d="M12.286 24.8528L12.2669 39.6777L25.2197 47.086V32.2695L12.286 24.8528Z" fill="#BDBDBD" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2196 15.7334L38.1724 23.1692L25.2196 30.5753L12.286 23.1565L25.2196 15.7334ZM36.228 23.1819L25.2111 16.8563L14.2092 23.1735L25.2111 29.4842L36.228 23.1819Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M38.1703 23.1692V25.8247L25.2198 33.2329V30.5753L38.1703 23.1692Z" fill="white"/> + <path d="M38.1703 25.8247V23.1692L25.2198 30.5753V33.2329" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2197 30.5754V33.0866L12.2861 25.6677V23.1587L25.2197 30.5754Z" fill="#BDBDBD"/> + <path d="M25.2197 33.0866V30.5754L12.2861 23.1587V25.6677" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2112 16.8562V18.5501L15.6846 24.0182L14.2072 23.1734L25.2112 16.8562Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M36.228 23.1819L25.2112 16.8562V18.5501L34.7655 24.0182L36.228 23.1819Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M29 33.394L29.0328 45L35 41.606L34.9672 30L29 33.394Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M38.1702 8.85376V23.6702L25.2175 31.0763V16.2599L38.1702 8.85376Z" fill="white"/> + <path d="M38.1702 8.85376V23.6702L31.6939 27.3733L25.2175 31.0763V16.2599L38.1702 8.85376Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2175 16.2597L12.286 8.84301L25.2175 1.41992L38.1702 8.85362L25.2175 16.2597Z" fill="white"/> + <path d="M25.2175 16.2597L12.286 8.84301L25.2175 1.41992L38.1702 8.85362L25.2175 16.2597Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M12.286 8.84302L12.2669 23.6701L25.2175 31.0762V16.2597L12.286 8.84302Z" fill="white"/> + <path d="M12.286 8.84302L12.2669 23.6701L25.2175 31.0762V16.2597L12.286 8.84302Z" fill="#BDBDBD" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M32.6309 14.2322V18.8256L35.9467 16.922V12.3286L32.6309 14.2322Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M27.7376 16.9388V21.5322L31.0533 19.6315V15.0381L27.7376 16.9388Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M32.5775 20.5311V25.1273L35.8932 23.2238V18.6304L32.5775 20.5311Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M27.6868 23.2407V27.8341L31.0026 25.9306V21.3372L27.6868 23.2407Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M17.9226 14.0851V18.6786L14.5878 16.775V12.1843L17.9226 14.0851Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M22.8414 16.7919V21.3882L19.5066 19.4846V14.8911L22.8414 16.7919Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M17.9113 20.3837V24.98L14.5737 23.0764V18.4829L17.9113 20.3837Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M22.8301 23.0933V27.6896L19.4953 25.786V21.1897L22.8301 23.0933Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M17.9226 30.0272V34.6208L14.5878 32.7171V28.1265L17.9226 30.0272Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M22.8414 32.734V37.3303L19.5066 35.4268V30.8333L22.8414 32.734Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M17.9113 36.3258V40.9221L14.5737 39.0186V34.425L17.9113 36.3258Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M22.8301 39.0354V43.6318L19.4953 41.7282V37.1318L22.8301 39.0354Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M38.1702 8.08521V8.85362L25.1135 16.5633V15.7949L38.1702 8.08521Z" fill="white"/> + <path d="M38.1702 8.08521V8.85362L25.1135 16.5633V15.7949L38.1702 8.08521Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.1134 15.7948L12.3326 8.46727L25.3724 0.738525L38.1702 8.08519L25.1134 15.7948Z" fill="#E9E9E9"/> + <path d="M12.3328 8.46704L12.3137 9.24396L25.1136 16.563V15.7946L12.3328 8.46704Z" fill="white"/> + <path d="M12.3328 8.46704L12.3137 9.24396L25.1136 16.563V15.7946L12.3328 8.46704Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.7486 1.47656L12.1813 8.74474" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> + <path d="M37.8622 8.26004L25.9456 1.34131" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> + </symbol> + + <symbol id="typeStructure_private" width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"> + <rect width="52" height="52" rx="4" fill="white"/> + <path d="M7.32104 39.6816C6.79673 39.9831 6.79461 40.4777 7.31467 40.7791L24.0607 50.5117C24.5828 50.8152 25.4319 50.8131 25.9562 50.5117L43.6044 40.3227C44.1287 40.0213 44.1329 39.5288 43.6107 39.2253L26.8647 29.4927C26.3447 29.1912 25.4935 29.1912 24.9692 29.4927L7.32104 39.6816Z" fill="#1B7183"/> + <path d="M38.1703 24.863V39.6774L25.2197 47.0856V32.2691L38.1703 24.863Z" fill="white"/> + <path d="M38.1703 24.863V39.6774L25.2197 47.0856V32.2691L38.1703 24.863Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2197 32.2692L12.2861 24.8525L25.2197 17.4294L38.1703 24.8631L25.2197 32.2692Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2112 31.1761L14.2071 24.8653L25.2112 18.5503L36.228 24.8738L25.2112 31.1761Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M12.286 24.8528L12.2669 39.6777L25.2197 47.086V32.2695L12.286 24.8528Z" fill="white"/> + <path d="M12.286 24.8528L12.2669 39.6777L25.2197 47.086V32.2695L12.286 24.8528Z" fill="#BDBDBD" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2196 15.7334L38.1724 23.1692L25.2196 30.5753L12.286 23.1565L25.2196 15.7334ZM36.228 23.1819L25.2111 16.8563L14.2092 23.1735L25.2111 29.4842L36.228 23.1819Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M38.1703 23.1692V25.8247L25.2198 33.2329V30.5753L38.1703 23.1692Z" fill="white"/> + <path d="M38.1703 25.8247V23.1692L25.2198 30.5753V33.2329" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2197 30.5754V33.0866L12.2861 25.6677V23.1587L25.2197 30.5754Z" fill="#BDBDBD"/> + <path d="M25.2197 33.0866V30.5754L12.2861 23.1587V25.6677" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2112 16.8562V18.5501L15.6846 24.0182L14.2072 23.1734L25.2112 16.8562Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M36.228 23.1819L25.2112 16.8562V18.5501L34.7655 24.0182L36.228 23.1819Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M29 33.394L29.0328 45L35 41.606L34.9672 30L29 33.394Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M38.1702 8.85376V23.6702L25.2175 31.0763V16.2599L38.1702 8.85376Z" fill="white"/> + <path d="M38.1702 8.85376V23.6702L31.6939 27.3733L25.2175 31.0763V16.2599L38.1702 8.85376Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2175 16.2597L12.286 8.84301L25.2175 1.41992L38.1702 8.85362L25.2175 16.2597Z" fill="white"/> + <path d="M25.2175 16.2597L12.286 8.84301L25.2175 1.41992L38.1702 8.85362L25.2175 16.2597Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M12.286 8.84302L12.2669 23.6701L25.2175 31.0762V16.2597L12.286 8.84302Z" fill="white"/> + <path d="M12.286 8.84302L12.2669 23.6701L25.2175 31.0762V16.2597L12.286 8.84302Z" fill="#BDBDBD" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M32.6309 14.2322V18.8256L35.9467 16.922V12.3286L32.6309 14.2322Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M27.7376 16.9388V21.5322L31.0533 19.6315V15.0381L27.7376 16.9388Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M32.5775 20.5311V25.1273L35.8932 23.2238V18.6304L32.5775 20.5311Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M27.6868 23.2407V27.8341L31.0026 25.9306V21.3372L27.6868 23.2407Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M17.9226 14.0851V18.6786L14.5878 16.775V12.1843L17.9226 14.0851Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M22.8414 16.7919V21.3882L19.5066 19.4846V14.8911L22.8414 16.7919Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M17.9113 20.3837V24.98L14.5737 23.0764V18.4829L17.9113 20.3837Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M22.8301 23.0933V27.6896L19.4953 25.786V21.1897L22.8301 23.0933Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M17.9226 30.0272V34.6208L14.5878 32.7171V28.1265L17.9226 30.0272Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M22.8414 32.734V37.3303L19.5066 35.4268V30.8333L22.8414 32.734Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M17.9113 36.3258V40.9221L14.5737 39.0186V34.425L17.9113 36.3258Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M22.8301 39.0354V43.6318L19.4953 41.7282V37.1318L22.8301 39.0354Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M38.1702 8.08521V8.85362L25.1135 16.5633V15.7949L38.1702 8.08521Z" fill="white"/> + <path d="M38.1702 8.08521V8.85362L25.1135 16.5633V15.7949L38.1702 8.08521Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.1134 15.7948L12.3326 8.46727L25.3724 0.738525L38.1702 8.08519L25.1134 15.7948Z" fill="#E9E9E9"/> + <path d="M12.3328 8.46704L12.3137 9.24396L25.1136 16.563V15.7946L12.3328 8.46704Z" fill="white"/> + <path d="M12.3328 8.46704L12.3137 9.24396L25.1136 16.563V15.7946L12.3328 8.46704Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.7486 1.47656L12.1813 8.74474" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> + <path d="M37.8622 8.26004L25.9456 1.34131" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> + </symbol> + + <symbol id="typeStructure_public" width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"> + <rect width="52" height="52" rx="4" fill="white"/> + <path d="M7.39483 34.4973C6.87052 34.7987 6.8684 35.2933 7.38846 35.5948L24.1344 45.3273C24.6566 45.6309 25.5057 45.6288 26.03 45.3273L43.6782 35.1384C44.2025 34.8369 44.2067 34.3445 43.6845 34.0409L26.9385 24.3083C26.4185 24.0069 25.5673 24.0069 25.043 24.3083L7.39483 34.4973Z" fill="#DA3635"/> + <path d="M38.2441 19.6787V34.4931L25.2935 41.9013V27.0848L38.2441 19.6787Z" fill="white"/> + <path d="M38.2441 19.6787V34.4931L25.2935 41.9013V27.0848L38.2441 19.6787Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2935 27.0849L12.3599 19.6682L25.2935 12.2451L38.2441 19.6788L25.2935 27.0849Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2851 25.9918L14.281 19.681L25.2851 13.366L36.3019 19.6895L25.2851 25.9918Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M12.3599 19.6685L12.3408 34.4934L25.2935 41.9016V27.0852L12.3599 19.6685Z" fill="white"/> + <path d="M12.3599 19.6685L12.3408 34.4934L25.2935 41.9016V27.0852L12.3599 19.6685Z" fill="#BDBDBD" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2935 10.5491L38.2462 17.9849L25.2935 25.391L12.3599 17.9721L25.2935 10.5491ZM36.3018 17.9976L25.285 11.672L14.283 17.9891L25.285 24.2999L36.3018 17.9976Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M38.2442 17.9849V20.6404L25.2936 28.0486V25.391L38.2442 17.9849Z" fill="white"/> + <path d="M38.2442 20.6404V17.9849L25.2936 25.391V28.0486" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2936 25.3911V27.9022L12.36 20.4834V17.9744L25.2936 25.3911Z" fill="#BDBDBD"/> + <path d="M25.2936 27.9022V25.3911L12.36 17.9744V20.4834" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M25.2851 11.6719V13.3658L15.7584 18.8339L14.281 17.989L25.2851 11.6719Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M36.3019 17.9975L25.2851 11.6719V13.3658L34.8393 18.8339L36.3019 17.9975Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M29.0739 28.2097L29.1066 39.8157L35.0739 36.4216L35.0411 24.8157L29.0739 28.2097Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M17.9965 24.8429V29.4364L14.6617 27.5328V22.9421L17.9965 24.8429Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M22.9153 27.5497V32.146L19.5805 30.2424V25.6489L22.9153 27.5497Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M17.9852 31.1415V35.7378L14.6476 33.8342V29.2407L17.9852 31.1415Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M22.904 33.8511V38.4474L19.5692 36.5438V31.9475L22.904 33.8511Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M38.244 17.9309L25.1873 25.6406" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M24.8546 25.1435L12.0738 17.8159L25.4462 9.81592L38.244 17.1626L24.8546 25.1435Z" fill="#E9E9E9"/> + <path d="M25.8224 10.554L12.2551 17.8221" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> + <path d="M37.936 17.3374L26.0194 10.4187" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> + <path d="M24.9904 25.7346L12.5738 18.3159" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> + <path d="M26.0738 27.8157L16.0922 16.083L32.0058 7.91253L41.5738 18.8157L26.0738 27.8157Z" fill="white" stroke="#696969" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M8.57379 17.8157L16.0922 16.0831L32.0058 7.91256L22.9568 9.60935L8.57379 17.8157Z" fill="#E9E9E9" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + <path d="M8.57375 17.8157L16.6255 16.0773L26.0738 27.8157L8.57375 17.8157Z" fill="#BDBDBD" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> + </symbol> + <symbol id="profile" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M22.7499 24.492V21.3125C22.7499 20.4008 22.3878 19.5265 21.7431 18.8818C21.0985 18.2372 20.2241 17.875 19.3124 17.875H12.4375C11.5258 17.875 10.6515 18.2372 10.0068 18.8818C9.36216 19.5265 9 20.4008 9 21.3125V24.492" stroke="#333333" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> -- GitLab From 88d2face32a3a7073f176036ca01ef9522ba1e56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Pailharey?= <rpailharey@grandlyon.com> Date: Tue, 25 Oct 2022 13:16:52 +0200 Subject: [PATCH 3/5] fix: retours review --- .../profile/profile-structure/profile-structure.component.scss | 2 +- .../structure-type-picker/structure-type-picker.component.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/profile/profile-structure/profile-structure.component.scss b/src/app/profile/profile-structure/profile-structure.component.scss index f949c3e86..83aa6b653 100644 --- a/src/app/profile/profile-structure/profile-structure.component.scss +++ b/src/app/profile/profile-structure/profile-structure.component.scss @@ -4,7 +4,7 @@ @import '../../../assets/scss/shapes'; .structureCard { - padding: 5px 6px; + padding: 8px 16px 8px 8px; border: 1px solid $grey-5; border-radius: 4px; overflow: hidden; diff --git a/src/app/shared/components/structure-type-picker/structure-type-picker.component.scss b/src/app/shared/components/structure-type-picker/structure-type-picker.component.scss index c2aabd334..86db347c1 100644 --- a/src/app/shared/components/structure-type-picker/structure-type-picker.component.scss +++ b/src/app/shared/components/structure-type-picker/structure-type-picker.component.scss @@ -83,7 +83,7 @@ button { } .collapseHeader { height: 65px; - padding: 0 15px 0 12px; + padding: 0 16px 0 8px; cursor: pointer; .titleCollapse { width: 100%; -- GitLab From 2035c09b3b886f380752047ff978a61786dd5f01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Pailharey?= <rpailharey@grandlyon.com> Date: Tue, 25 Oct 2022 16:05:51 +0200 Subject: [PATCH 4/5] fix: retours review --- src/app/models/structure.model.ts | 28 ++--- ...e-type.model.ts => structureType.model.ts} | 0 .../profile-structure.component.html | 20 +-- .../profile-structure.component.ts | 8 +- src/app/services/structure-type.service.ts | 2 +- .../structure-type-picker.component.html | 45 +++---- .../structure-type-picker.component.ts | 47 ++++--- ...gory.enum.ts => structureCategory.enum.ts} | 2 +- .../shared/enum/structureCategoryIcon.enum.ts | 5 + ...tructure.enum.ts => structureType.enum.ts} | 5 +- src/app/shared/enum/structureTypeIcon.enum.ts | 5 - src/assets/form/sprite.svg | 119 +----------------- src/assets/ico/sprite.svg | 32 +---- 13 files changed, 86 insertions(+), 232 deletions(-) rename src/app/models/{structure-type.model.ts => structureType.model.ts} (100%) rename src/app/shared/enum/{structureTypeCategory.enum.ts => structureCategory.enum.ts} (76%) create mode 100644 src/app/shared/enum/structureCategoryIcon.enum.ts rename src/app/shared/enum/{typeStructure.enum.ts => structureType.enum.ts} (89%) delete mode 100644 src/app/shared/enum/structureTypeIcon.enum.ts diff --git a/src/app/models/structure.model.ts b/src/app/models/structure.model.ts index e1102a1d0..a1448c9e9 100644 --- a/src/app/models/structure.model.ts +++ b/src/app/models/structure.model.ts @@ -1,13 +1,13 @@ -import { StructureTypeCategory } from '../shared/enum/structureTypeCategory.enum'; -import { StructureTypeIcon } from '../shared/enum/structureTypeIcon.enum'; -import { TypeStructureEnum } from '../shared/enum/typeStructure.enum'; +import { StructureCategoryEnum } from '../shared/enum/structureCategory.enum'; +import { StructureCategoryIconEnum } from '../shared/enum/structureCategoryIcon.enum'; +import { StructureTypeEnum } from '../shared/enum/structureType.enum'; import { Equipment } from '../structure-list/enum/equipment.enum'; import { Weekday } from '../structure-list/enum/weekday.enum'; import { Address } from './address.model'; import { Day } from './day.model'; import { OpeningDay } from './openingDay.model'; import { PersonalOffer } from './personalOffer.model'; -import { StructureType } from './structure-type.model'; +import { StructureType } from './structureType.model'; import { Week } from './week.model'; export class Structure { @@ -190,20 +190,20 @@ export class Structure { } } - public getLabelTypeStructure(): string { - return TypeStructureEnum[this.structureType.value] ? TypeStructureEnum[this.structureType.value] : ''; + public getLabelTypeStructure(): StructureTypeEnum | '' { + return StructureTypeEnum[this.structureType.value] || ''; } - public getTypeStructureIcon(): string { + public getTypeStructureIcon(): StructureCategoryIconEnum { switch (this.structureType.category) { - case StructureTypeCategory.public: - return StructureTypeIcon['public']; - case StructureTypeCategory.private: - return StructureTypeIcon['private']; - case StructureTypeCategory.privateLucrative: - return StructureTypeIcon['privateLucrative']; + case StructureCategoryEnum.public: + return StructureCategoryIconEnum['public']; + case StructureCategoryEnum.private: + return StructureCategoryIconEnum['private']; + case StructureCategoryEnum.privateLucrative: + return StructureCategoryIconEnum['privateLucrative']; default: - return 'structureAvatar'; + return StructureCategoryIconEnum['public']; } } diff --git a/src/app/models/structure-type.model.ts b/src/app/models/structureType.model.ts similarity index 100% rename from src/app/models/structure-type.model.ts rename to src/app/models/structureType.model.ts diff --git a/src/app/profile/profile-structure/profile-structure.component.html b/src/app/profile/profile-structure/profile-structure.component.html index 6243322cd..322381c68 100644 --- a/src/app/profile/profile-structure/profile-structure.component.html +++ b/src/app/profile/profile-structure/profile-structure.component.html @@ -9,7 +9,7 @@ <div fxLayout="row" fxLayoutAlign="space-between center" fxLayoutGap="16px"> <app-svg-icon [type]="'ico'" [icon]="getStructureTypeIcon()" [iconClass]="'icon-52'"></app-svg-icon> <div fxLayout="column" fxLayoutAlign="space-between start"> - <p class="structureName">{{ structureWithOwners.structure.structureName }}</p> + <p class="structureName">{{ structure.structureName }}</p> <p class="structureType">{{ getStructureTypeLabel() }}</p> </div> </div> @@ -40,7 +40,7 @@ [text]="'Voir la structure'" [style]="buttonTypeEnum.SecondaryWide" routerLink="./" - [queryParams]="{ id: structureWithOwners.structure._id }" + [queryParams]="{ id: structure._id }" [routerLinkActive]="'active'" ></app-button> <app-button @@ -50,7 +50,7 @@ [iconType]="'form'" [style]="buttonTypeEnum.SecondaryOnlyIcon" routerLink="./" - [queryParams]="{ id: structureWithOwners.structure._id }" + [queryParams]="{ id: structure._id }" [routerLinkActive]="'active'" ></app-button> <app-button @@ -60,7 +60,7 @@ [iconBtn]="'edit'" [text]="'Modifier la structure'" [style]="buttonTypeEnum.SecondaryWide" - routerLink="./edit-structure/{{ structureWithOwners.structure._id }}" + routerLink="./edit-structure/{{ structure._id }}" [routerLinkActive]="'active'" [ngClass]="{ warning: !isValid() }" ></app-button> @@ -70,7 +70,7 @@ [type]="'button'" [iconBtn]="'edit'" [style]="buttonTypeEnum.SecondaryOnlyIcon" - routerLink="./edit-structure/{{ structureWithOwners.structure._id }}" + routerLink="./edit-structure/{{ structure._id }}" [routerLinkActive]="'active'" [ngClass]="{ warning: !isValid() }" ></app-button> @@ -81,11 +81,11 @@ <p>{{ getAddress() }}</p> </div> <div> - <p>{{ structureWithOwners.structure.contactPhone }}</p> + <p>{{ structure.contactPhone }}</p> </div> <div> - <a class="email" href="mailto:{{ structureWithOwners.structure.contactMail }}"> - {{ structureWithOwners.structure.contactMail }} + <a class="email" href="mailto:{{ structure.contactMail }}"> + {{ structure.contactMail }} </a> </div> </div> @@ -100,7 +100,7 @@ [iconBtn]="'edit'" [text]="'Gérer les membres'" [style]="buttonTypeEnum.SecondaryWide" - routerLink="./structure-members-management/{{ structureWithOwners.structure._id }}" + routerLink="./structure-members-management/{{ structure._id }}" [routerLinkActive]="'active'" ></app-button> <app-button @@ -109,7 +109,7 @@ [type]="'button'" [iconBtn]="'edit'" [style]="buttonTypeEnum.SecondaryOnlyIcon" - routerLink="./structure-members-management/{{ structureWithOwners.structure._id }}" + routerLink="./structure-members-management/{{ structure._id }}" [routerLinkActive]="'active'" ></app-button> </div> diff --git a/src/app/profile/profile-structure/profile-structure.component.ts b/src/app/profile/profile-structure/profile-structure.component.ts index d72ce08f5..c7781d299 100644 --- a/src/app/profile/profile-structure/profile-structure.component.ts +++ b/src/app/profile/profile-structure/profile-structure.component.ts @@ -33,6 +33,7 @@ export class ProfileStructureComponent implements OnInit { public buttonTypeEnum = ButtonType; public showDetails: boolean = false; public addMemberModalOpenned: boolean = false; + public structure: Structure; constructor( private router: Router, @@ -51,6 +52,7 @@ export class ProfileStructureComponent implements OnInit { this.members.push(res); }); }); + this.structure = new Structure(this.structureWithOwners.structure); } public goBack(): void { @@ -63,17 +65,17 @@ export class ProfileStructureComponent implements OnInit { return this.structureForm.valid; } public getStructureTypeLabel(): string { - return new Structure(this.structureWithOwners.structure).getLabelTypeStructure(); + return this.structure.getLabelTypeStructure(); } public getStructureTypeIcon(): string { - return new Structure(this.structureWithOwners.structure).getTypeStructureIcon(); + return this.structure.getTypeStructureIcon(); } public toggleDetails(): void { this.showDetails = !this.showDetails; } public getAddress(): string { - const address = this.structureWithOwners.structure.address; + const address = this.structure.address; return address.numero ? address.numero + ' ' + address.street + ' - ' + address.commune : address.street + ' - ' + address.commune; diff --git a/src/app/services/structure-type.service.ts b/src/app/services/structure-type.service.ts index 186b52cc0..18455b5f0 100644 --- a/src/app/services/structure-type.service.ts +++ b/src/app/services/structure-type.service.ts @@ -1,7 +1,7 @@ import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; -import { StructureType } from '../models/structure-type.model'; +import { StructureType } from '../models/structureType.model'; @Injectable({ providedIn: 'root', diff --git a/src/app/shared/components/structure-type-picker/structure-type-picker.component.html b/src/app/shared/components/structure-type-picker/structure-type-picker.component.html index 22d570f4e..8b7f405be 100644 --- a/src/app/shared/components/structure-type-picker/structure-type-picker.component.html +++ b/src/app/shared/components/structure-type-picker/structure-type-picker.component.html @@ -1,15 +1,10 @@ <div class="container"> <div class="boutonSection" fxLayout="column" fxLayoutGap="8px"> <div fxLayout="column" class="collapse" [ngClass]="{ notCollapsed: !showPublic }"> - <div - class="collapseHeader" - fxLayoutAlign="flex-start center" - fxLayout="row" - (click)="toggleCollapse(structureTypeCategoryEnum.public)" - > + <div class="collapseHeader" fxLayoutAlign="flex-start center" fxLayout="row" (click)="togglePublic()"> <div class="svgContainer"> <svg aria-hidden="true"> - <use [attr.xlink:href]="'assets/form/sprite.svg#' + structureTypeIconEnum.public"></use> + <use [attr.xlink:href]="'assets/ico/sprite.svg#' + structureTypeIconEnum.public"></use> </svg> </div> <div class="titleCollapse"> @@ -25,26 +20,21 @@ </div> </div> <div *ngIf="showPublic" class="btn-grid"> - <span *ngFor="let choice of getChoices(structureTypeCategoryEnum.public)"> + <span *ngFor="let choice of getStructureTypes(structureTypeCategoryEnum.public)"> <app-button [extraClass]="choice._id == pickedTypeId ? 'selected' : ''" [style]="buttonTypeEnum.CheckButton" - [text]="getStructureTypeName(choice.value)" - (action)="pickChoice(choice._id)" + [text]="getStructureTypeLabel(choice.value)" + (action)="pickStructureType(choice._id)" ></app-button> </span> </div> </div> <div fxLayout="column" class="collapse" [ngClass]="{ notCollapsed: !showPrivate }"> - <div - class="collapseHeader" - fxLayoutAlign="flex-start center" - fxLayout="row" - (click)="toggleCollapse(structureTypeCategoryEnum.private)" - > + <div class="collapseHeader" fxLayoutAlign="flex-start center" fxLayout="row" (click)="togglePrivate()"> <div class="svgContainer"> <svg aria-hidden="true"> - <use [attr.xlink:href]="'assets/form/sprite.svg#' + structureTypeIconEnum.private"></use> + <use [attr.xlink:href]="'assets/ico/sprite.svg#' + structureTypeIconEnum.private"></use> </svg> </div> <div class="titleCollapse"> @@ -60,26 +50,21 @@ </div> </div> <div *ngIf="showPrivate" class="btn-grid"> - <span *ngFor="let choice of getChoices(structureTypeCategoryEnum.private)"> + <span *ngFor="let choice of getStructureTypes(structureTypeCategoryEnum.private)"> <app-button [extraClass]="choice._id == pickedTypeId ? 'selected' : ''" [style]="buttonTypeEnum.CheckButton" - [text]="getStructureTypeName(choice.value)" - (action)="pickChoice(choice._id)" + [text]="getStructureTypeLabel(choice.value)" + (action)="pickStructureType(choice._id)" ></app-button> </span> </div> </div> <div fxLayout="column" class="collapse" [ngClass]="{ notCollapsed: !showPrivateLucrative }"> - <div - class="collapseHeader" - fxLayoutAlign="flex-start center" - fxLayout="row" - (click)="toggleCollapse(structureTypeCategoryEnum.privateLucrative)" - > + <div class="collapseHeader" fxLayoutAlign="flex-start center" fxLayout="row" (click)="togglePrivateLucrative()"> <div class="svgContainer"> <svg aria-hidden="true"> - <use [attr.xlink:href]="'assets/form/sprite.svg#' + structureTypeIconEnum.privateLucrative"></use> + <use [attr.xlink:href]="'assets/ico/sprite.svg#' + structureTypeIconEnum.privateLucrative"></use> </svg> </div> <div class="titleCollapse"> @@ -95,12 +80,12 @@ </div> </div> <div *ngIf="showPrivateLucrative" class="btn-grid"> - <span *ngFor="let choice of getChoices(structureTypeCategoryEnum.privateLucrative)"> + <span *ngFor="let choice of getStructureTypes(structureTypeCategoryEnum.privateLucrative)"> <app-button [extraClass]="choice._id == pickedTypeId ? 'selected' : ''" [style]="buttonTypeEnum.CheckButton" - [text]="getStructureTypeName(choice.value)" - (action)="pickChoice(choice._id)" + [text]="getStructureTypeLabel(choice.value)" + (action)="pickStructureType(choice._id)" ></app-button> </span> </div> diff --git a/src/app/shared/components/structure-type-picker/structure-type-picker.component.ts b/src/app/shared/components/structure-type-picker/structure-type-picker.component.ts index 01d93d902..6657d64be 100644 --- a/src/app/shared/components/structure-type-picker/structure-type-picker.component.ts +++ b/src/app/shared/components/structure-type-picker/structure-type-picker.component.ts @@ -1,10 +1,10 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { StructureType } from '../../../models/structure-type.model'; +import { StructureType } from '../../../models/structureType.model'; import { StructureTypeService } from '../../../services/structure-type.service'; -import { StructureTypeCategory } from '../../enum/structureTypeCategory.enum'; -import { TypeStructureEnum } from '../../enum/typeStructure.enum'; +import { StructureCategoryEnum } from '../../enum/structureCategory.enum'; +import { StructureTypeEnum } from '../../enum/structureType.enum'; import { ButtonType } from '../button/buttonType.enum'; -import { StructureTypeIcon } from './../../enum/structureTypeIcon.enum'; +import { StructureCategoryIconEnum } from '../../enum/structureCategoryIcon.enum'; @Component({ selector: 'app-structure-type-picker', @@ -25,13 +25,14 @@ export class StructureTypePickerComponent implements OnInit { public showPrivateLucrative: boolean; public buttonTypeEnum = ButtonType; - public structureTypeIconEnum = StructureTypeIcon; - public structureTypeCategoryEnum = StructureTypeCategory; + public structureTypeIconEnum = StructureCategoryIconEnum; + public structureTypeCategoryEnum = StructureCategoryEnum; constructor(private structureTypeService: StructureTypeService) {} ngOnInit() { this.structureTypeService.getStructureTypes().subscribe((types) => { + // Filter "other" structure type types = types.filter((type) => !type.private); this.publicTypes = types.filter((type) => type.category === this.structureTypeCategoryEnum.public); this.privateTypes = types.filter((type) => type.category === this.structureTypeCategoryEnum.private); @@ -45,16 +46,19 @@ export class StructureTypePickerComponent implements OnInit { } public togglePublic(): void { + this.pickedCategory = this.structureTypeCategoryEnum.public; this.showPublic = !this.showPublic; this.showPrivate = false; this.showPrivateLucrative = false; } public togglePrivate(): void { + this.pickedCategory = this.structureTypeCategoryEnum.private; this.showPrivate = !this.showPrivate; this.showPrivateLucrative = false; this.showPublic = false; } public togglePrivateLucrative(): void { + this.pickedCategory = this.structureTypeCategoryEnum.privateLucrative; this.showPrivateLucrative = !this.showPrivateLucrative; this.showPrivate = false; this.showPublic = false; @@ -63,29 +67,32 @@ export class StructureTypePickerComponent implements OnInit { public initPickedType(pickedTypeId: string): void { this.structureTypeService.getStructureTypeById(pickedTypeId).subscribe((structureType) => { this.pickedCategory = structureType.category; - this.toggleCollapse(this.pickedCategory); + switch (structureType.category) { + case this.structureTypeCategoryEnum.public: + this.togglePublic(); + break; + case this.structureTypeCategoryEnum.private: + this.togglePrivate(); + break; + case this.structureTypeCategoryEnum.privateLucrative: + this.togglePrivateLucrative(); + break; + } }); } - public getChoices(category: string): StructureType[] { + public getStructureTypes(category: string): StructureType[] { if (category === this.structureTypeCategoryEnum.public) return this.publicTypes; if (category === this.structureTypeCategoryEnum.private) return this.privateTypes; if (category === this.structureTypeCategoryEnum.privateLucrative) return this.privateLucrativeTypes; } - public toggleCollapse(category: string): void { - this.pickedCategory = category; - if (category === this.structureTypeCategoryEnum.public) this.togglePublic(); - if (category === this.structureTypeCategoryEnum.private) this.togglePrivate(); - if (category === this.structureTypeCategoryEnum.privateLucrative) this.togglePrivateLucrative(); - } - - public pickChoice(choice: string): void { - this.pickedTypeId = choice; - this.selectedType.emit(choice); + public pickStructureType(structureTypeId: string): void { + this.pickedTypeId = structureTypeId; + this.selectedType.emit(structureTypeId); } - public getStructureTypeName(type: string): string { - return TypeStructureEnum[type]; + public getStructureTypeLabel(type: string): string { + return StructureTypeEnum[type]; } } diff --git a/src/app/shared/enum/structureTypeCategory.enum.ts b/src/app/shared/enum/structureCategory.enum.ts similarity index 76% rename from src/app/shared/enum/structureTypeCategory.enum.ts rename to src/app/shared/enum/structureCategory.enum.ts index 407f28abd..6dd6d461f 100644 --- a/src/app/shared/enum/structureTypeCategory.enum.ts +++ b/src/app/shared/enum/structureCategory.enum.ts @@ -1,4 +1,4 @@ -export enum StructureTypeCategory { +export enum StructureCategoryEnum { public = 'Publique', private = 'Privée à but non lucratif', privateLucrative = 'Privée à but lucratif', diff --git a/src/app/shared/enum/structureCategoryIcon.enum.ts b/src/app/shared/enum/structureCategoryIcon.enum.ts new file mode 100644 index 000000000..68cf5fc4f --- /dev/null +++ b/src/app/shared/enum/structureCategoryIcon.enum.ts @@ -0,0 +1,5 @@ +export enum StructureCategoryIconEnum { + public = 'structureCategory_public', + private = 'structureCategory_private', + privateLucrative = 'structureCategory_privateLucrative', +} diff --git a/src/app/shared/enum/typeStructure.enum.ts b/src/app/shared/enum/structureType.enum.ts similarity index 89% rename from src/app/shared/enum/typeStructure.enum.ts rename to src/app/shared/enum/structureType.enum.ts index 92c30c1da..df0092949 100644 --- a/src/app/shared/enum/typeStructure.enum.ts +++ b/src/app/shared/enum/structureType.enum.ts @@ -1,4 +1,4 @@ -export enum TypeStructureEnum { +export enum StructureTypeEnum { fablab = 'Fablab', // A supprimer ? @@ -9,6 +9,7 @@ export enum TypeStructureEnum { // En attente de suppression remplacer par CAF CARSAT, Pole Emploi et CCAS grandOrganismePublic = 'Grand organisme public (CAF, CARSAT, Pôle emploi...)', + // Publique mdm = 'Maison de la Métropole', mairie = 'Mairie', CAF = 'CAF', @@ -22,6 +23,7 @@ export enum TypeStructureEnum { MaisonFranceService = 'Maison France Service', autre = 'Autre', + // Privée à but non lucratif association = 'Association', centreSocio = 'Centre socio-culturel', mjc = 'MJC / Cyberbase', @@ -29,6 +31,7 @@ export enum TypeStructureEnum { sij = 'Structure information jeunesse (SIJ)', missionsLocales = 'Missions locales', + // Privée à but lucratif formation = 'Structure de formation', insertion = "Structure d'insertion", } diff --git a/src/app/shared/enum/structureTypeIcon.enum.ts b/src/app/shared/enum/structureTypeIcon.enum.ts deleted file mode 100644 index a449ee9c8..000000000 --- a/src/app/shared/enum/structureTypeIcon.enum.ts +++ /dev/null @@ -1,5 +0,0 @@ -export enum StructureTypeIcon { - public = 'typeStructure_public', - private = 'typeStructure_private', - privateLucrative = 'typeStructure_privateLucrative', -} diff --git a/src/assets/form/sprite.svg b/src/assets/form/sprite.svg index 816a517ea..0dfacc11a 100644 --- a/src/assets/form/sprite.svg +++ b/src/assets/form/sprite.svg @@ -23,124 +23,7 @@ stroke-linejoin="round" /> </symbol> - <symbol id="typeStructure_privateLucrative" width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"> - <rect width="52" height="52" rx="4" fill="white"/> - <path d="M7.32104 39.6816C6.79673 39.9831 6.79461 40.4777 7.31467 40.7791L24.0607 50.5117C24.5828 50.8152 25.4319 50.8131 25.9562 50.5117L43.6044 40.3227C44.1287 40.0213 44.1329 39.5288 43.6107 39.2253L26.8647 29.4927C26.3447 29.1912 25.4935 29.1912 24.9692 29.4927L7.32104 39.6816Z" fill="#DFB74F"/> - <path d="M38.1703 24.863V39.6774L25.2197 47.0856V32.2691L38.1703 24.863Z" fill="white"/> - <path d="M38.1703 24.863V39.6774L25.2197 47.0856V32.2691L38.1703 24.863Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.2197 32.2692L12.2861 24.8525L25.2197 17.4294L38.1703 24.8631L25.2197 32.2692Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.2112 31.1761L14.2071 24.8653L25.2112 18.5503L36.228 24.8738L25.2112 31.1761Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M12.286 24.8528L12.2669 39.6777L25.2197 47.086V32.2695L12.286 24.8528Z" fill="white"/> - <path d="M12.286 24.8528L12.2669 39.6777L25.2197 47.086V32.2695L12.286 24.8528Z" fill="#BDBDBD" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.2196 15.7334L38.1724 23.1692L25.2196 30.5753L12.286 23.1565L25.2196 15.7334ZM36.228 23.1819L25.2111 16.8563L14.2092 23.1735L25.2111 29.4842L36.228 23.1819Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M38.1703 23.1692V25.8247L25.2198 33.2329V30.5753L38.1703 23.1692Z" fill="white"/> - <path d="M38.1703 25.8247V23.1692L25.2198 30.5753V33.2329" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.2197 30.5754V33.0866L12.2861 25.6677V23.1587L25.2197 30.5754Z" fill="#BDBDBD"/> - <path d="M25.2197 33.0866V30.5754L12.2861 23.1587V25.6677" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.2112 16.8562V18.5501L15.6846 24.0182L14.2072 23.1734L25.2112 16.8562Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M36.228 23.1819L25.2112 16.8562V18.5501L34.7655 24.0182L36.228 23.1819Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M29 33.394L29.0328 45L35 41.606L34.9672 30L29 33.394Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M38.1702 8.85376V23.6702L25.2175 31.0763V16.2599L38.1702 8.85376Z" fill="white"/> - <path d="M38.1702 8.85376V23.6702L31.6939 27.3733L25.2175 31.0763V16.2599L38.1702 8.85376Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.2175 16.2597L12.286 8.84301L25.2175 1.41992L38.1702 8.85362L25.2175 16.2597Z" fill="white"/> - <path d="M25.2175 16.2597L12.286 8.84301L25.2175 1.41992L38.1702 8.85362L25.2175 16.2597Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M12.286 8.84302L12.2669 23.6701L25.2175 31.0762V16.2597L12.286 8.84302Z" fill="white"/> - <path d="M12.286 8.84302L12.2669 23.6701L25.2175 31.0762V16.2597L12.286 8.84302Z" fill="#BDBDBD" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M32.6309 14.2322V18.8256L35.9467 16.922V12.3286L32.6309 14.2322Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M27.7376 16.9388V21.5322L31.0533 19.6315V15.0381L27.7376 16.9388Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M32.5775 20.5311V25.1273L35.8932 23.2238V18.6304L32.5775 20.5311Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M27.6868 23.2407V27.8341L31.0026 25.9306V21.3372L27.6868 23.2407Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M17.9226 14.0851V18.6786L14.5878 16.775V12.1843L17.9226 14.0851Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M22.8414 16.7919V21.3882L19.5066 19.4846V14.8911L22.8414 16.7919Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M17.9113 20.3837V24.98L14.5737 23.0764V18.4829L17.9113 20.3837Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M22.8301 23.0933V27.6896L19.4953 25.786V21.1897L22.8301 23.0933Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M17.9226 30.0272V34.6208L14.5878 32.7171V28.1265L17.9226 30.0272Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M22.8414 32.734V37.3303L19.5066 35.4268V30.8333L22.8414 32.734Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M17.9113 36.3258V40.9221L14.5737 39.0186V34.425L17.9113 36.3258Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M22.8301 39.0354V43.6318L19.4953 41.7282V37.1318L22.8301 39.0354Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M38.1702 8.08521V8.85362L25.1135 16.5633V15.7949L38.1702 8.08521Z" fill="white"/> - <path d="M38.1702 8.08521V8.85362L25.1135 16.5633V15.7949L38.1702 8.08521Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.1134 15.7948L12.3326 8.46727L25.3724 0.738525L38.1702 8.08519L25.1134 15.7948Z" fill="#E9E9E9"/> - <path d="M12.3328 8.46704L12.3137 9.24396L25.1136 16.563V15.7946L12.3328 8.46704Z" fill="white"/> - <path d="M12.3328 8.46704L12.3137 9.24396L25.1136 16.563V15.7946L12.3328 8.46704Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.7486 1.47656L12.1813 8.74474" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> - <path d="M37.8622 8.26004L25.9456 1.34131" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> - </symbol> - - <symbol id="typeStructure_private" width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"> - <rect width="52" height="52" rx="4" fill="white"/> - <path d="M7.32104 39.6816C6.79673 39.9831 6.79461 40.4777 7.31467 40.7791L24.0607 50.5117C24.5828 50.8152 25.4319 50.8131 25.9562 50.5117L43.6044 40.3227C44.1287 40.0213 44.1329 39.5288 43.6107 39.2253L26.8647 29.4927C26.3447 29.1912 25.4935 29.1912 24.9692 29.4927L7.32104 39.6816Z" fill="#1B7183"/> - <path d="M38.1703 24.863V39.6774L25.2197 47.0856V32.2691L38.1703 24.863Z" fill="white"/> - <path d="M38.1703 24.863V39.6774L25.2197 47.0856V32.2691L38.1703 24.863Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.2197 32.2692L12.2861 24.8525L25.2197 17.4294L38.1703 24.8631L25.2197 32.2692Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.2112 31.1761L14.2071 24.8653L25.2112 18.5503L36.228 24.8738L25.2112 31.1761Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M12.286 24.8528L12.2669 39.6777L25.2197 47.086V32.2695L12.286 24.8528Z" fill="white"/> - <path d="M12.286 24.8528L12.2669 39.6777L25.2197 47.086V32.2695L12.286 24.8528Z" fill="#BDBDBD" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.2196 15.7334L38.1724 23.1692L25.2196 30.5753L12.286 23.1565L25.2196 15.7334ZM36.228 23.1819L25.2111 16.8563L14.2092 23.1735L25.2111 29.4842L36.228 23.1819Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M38.1703 23.1692V25.8247L25.2198 33.2329V30.5753L38.1703 23.1692Z" fill="white"/> - <path d="M38.1703 25.8247V23.1692L25.2198 30.5753V33.2329" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.2197 30.5754V33.0866L12.2861 25.6677V23.1587L25.2197 30.5754Z" fill="#BDBDBD"/> - <path d="M25.2197 33.0866V30.5754L12.2861 23.1587V25.6677" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.2112 16.8562V18.5501L15.6846 24.0182L14.2072 23.1734L25.2112 16.8562Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M36.228 23.1819L25.2112 16.8562V18.5501L34.7655 24.0182L36.228 23.1819Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M29 33.394L29.0328 45L35 41.606L34.9672 30L29 33.394Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M38.1702 8.85376V23.6702L25.2175 31.0763V16.2599L38.1702 8.85376Z" fill="white"/> - <path d="M38.1702 8.85376V23.6702L31.6939 27.3733L25.2175 31.0763V16.2599L38.1702 8.85376Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.2175 16.2597L12.286 8.84301L25.2175 1.41992L38.1702 8.85362L25.2175 16.2597Z" fill="white"/> - <path d="M25.2175 16.2597L12.286 8.84301L25.2175 1.41992L38.1702 8.85362L25.2175 16.2597Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M12.286 8.84302L12.2669 23.6701L25.2175 31.0762V16.2597L12.286 8.84302Z" fill="white"/> - <path d="M12.286 8.84302L12.2669 23.6701L25.2175 31.0762V16.2597L12.286 8.84302Z" fill="#BDBDBD" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M32.6309 14.2322V18.8256L35.9467 16.922V12.3286L32.6309 14.2322Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M27.7376 16.9388V21.5322L31.0533 19.6315V15.0381L27.7376 16.9388Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M32.5775 20.5311V25.1273L35.8932 23.2238V18.6304L32.5775 20.5311Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M27.6868 23.2407V27.8341L31.0026 25.9306V21.3372L27.6868 23.2407Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M17.9226 14.0851V18.6786L14.5878 16.775V12.1843L17.9226 14.0851Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M22.8414 16.7919V21.3882L19.5066 19.4846V14.8911L22.8414 16.7919Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M17.9113 20.3837V24.98L14.5737 23.0764V18.4829L17.9113 20.3837Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M22.8301 23.0933V27.6896L19.4953 25.786V21.1897L22.8301 23.0933Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M17.9226 30.0272V34.6208L14.5878 32.7171V28.1265L17.9226 30.0272Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M22.8414 32.734V37.3303L19.5066 35.4268V30.8333L22.8414 32.734Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M17.9113 36.3258V40.9221L14.5737 39.0186V34.425L17.9113 36.3258Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M22.8301 39.0354V43.6318L19.4953 41.7282V37.1318L22.8301 39.0354Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M38.1702 8.08521V8.85362L25.1135 16.5633V15.7949L38.1702 8.08521Z" fill="white"/> - <path d="M38.1702 8.08521V8.85362L25.1135 16.5633V15.7949L38.1702 8.08521Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.1134 15.7948L12.3326 8.46727L25.3724 0.738525L38.1702 8.08519L25.1134 15.7948Z" fill="#E9E9E9"/> - <path d="M12.3328 8.46704L12.3137 9.24396L25.1136 16.563V15.7946L12.3328 8.46704Z" fill="white"/> - <path d="M12.3328 8.46704L12.3137 9.24396L25.1136 16.563V15.7946L12.3328 8.46704Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.7486 1.47656L12.1813 8.74474" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> - <path d="M37.8622 8.26004L25.9456 1.34131" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> - </symbol> - - <symbol id="typeStructure_public" width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"> - <rect width="52" height="52" rx="4" fill="white"/> - <path d="M7.39483 34.4973C6.87052 34.7987 6.8684 35.2933 7.38846 35.5948L24.1344 45.3273C24.6566 45.6309 25.5057 45.6288 26.03 45.3273L43.6782 35.1384C44.2025 34.8369 44.2067 34.3445 43.6845 34.0409L26.9385 24.3083C26.4185 24.0069 25.5673 24.0069 25.043 24.3083L7.39483 34.4973Z" fill="#DA3635"/> - <path d="M38.2441 19.6787V34.4931L25.2935 41.9013V27.0848L38.2441 19.6787Z" fill="white"/> - <path d="M38.2441 19.6787V34.4931L25.2935 41.9013V27.0848L38.2441 19.6787Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.2935 27.0849L12.3599 19.6682L25.2935 12.2451L38.2441 19.6788L25.2935 27.0849Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.2851 25.9918L14.281 19.681L25.2851 13.366L36.3019 19.6895L25.2851 25.9918Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M12.3599 19.6685L12.3408 34.4934L25.2935 41.9016V27.0852L12.3599 19.6685Z" fill="white"/> - <path d="M12.3599 19.6685L12.3408 34.4934L25.2935 41.9016V27.0852L12.3599 19.6685Z" fill="#BDBDBD" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.2935 10.5491L38.2462 17.9849L25.2935 25.391L12.3599 17.9721L25.2935 10.5491ZM36.3018 17.9976L25.285 11.672L14.283 17.9891L25.285 24.2999L36.3018 17.9976Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M38.2442 17.9849V20.6404L25.2936 28.0486V25.391L38.2442 17.9849Z" fill="white"/> - <path d="M38.2442 20.6404V17.9849L25.2936 25.391V28.0486" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.2936 25.3911V27.9022L12.36 20.4834V17.9744L25.2936 25.3911Z" fill="#BDBDBD"/> - <path d="M25.2936 27.9022V25.3911L12.36 17.9744V20.4834" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.2851 11.6719V13.3658L15.7584 18.8339L14.281 17.989L25.2851 11.6719Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M36.3019 17.9975L25.2851 11.6719V13.3658L34.8393 18.8339L36.3019 17.9975Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M29.0739 28.2097L29.1066 39.8157L35.0739 36.4216L35.0411 24.8157L29.0739 28.2097Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M17.9965 24.8429V29.4364L14.6617 27.5328V22.9421L17.9965 24.8429Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M22.9153 27.5497V32.146L19.5805 30.2424V25.6489L22.9153 27.5497Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M17.9852 31.1415V35.7378L14.6476 33.8342V29.2407L17.9852 31.1415Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M22.904 33.8511V38.4474L19.5692 36.5438V31.9475L22.904 33.8511Z" fill="white" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M38.244 17.9309L25.1873 25.6406" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M24.8546 25.1435L12.0738 17.8159L25.4462 9.81592L38.244 17.1626L24.8546 25.1435Z" fill="#E9E9E9"/> - <path d="M25.8224 10.554L12.2551 17.8221" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> - <path d="M37.936 17.3374L26.0194 10.4187" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> - <path d="M24.9904 25.7346L12.5738 18.3159" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> - <path d="M26.0738 27.8157L16.0922 16.083L32.0058 7.91253L41.5738 18.8157L26.0738 27.8157Z" fill="white" stroke="#696969" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M8.57379 17.8157L16.0922 16.0831L32.0058 7.91256L22.9568 9.60935L8.57379 17.8157Z" fill="#E9E9E9" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M8.57375 17.8157L16.6255 16.0773L26.0738 27.8157L8.57375 17.8157Z" fill="#BDBDBD" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - </symbol> + <symbol id="accesLibre" width="44" height="44" viewBox="0 0 44 44" fill="none" xmlns="http://www.w3.org/2000/svg"> <rect x="16.75" y="7.75" width="15.5" height="28.5" fill="white" stroke="#333333" stroke-width="1.5" /> diff --git a/src/assets/ico/sprite.svg b/src/assets/ico/sprite.svg index 86497305c..b1fa2fb79 100644 --- a/src/assets/ico/sprite.svg +++ b/src/assets/ico/sprite.svg @@ -555,33 +555,7 @@ <line x1="12.5679" y1="20.0684" x2="29.8861" y2="20.0684" stroke="black" stroke-width="1.5" stroke-linecap="round"/> </symbol> - <symbol id="structureAvatar" fill="none" width="52" height="52" - xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52"> - <path d="M0 4a4 4 0 0 1 4-4h44a4 4 0 0 1 4 4v44a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4Z" fill="#fff"/> - <path d="M7.4 34.5c-.5.3-.5.8 0 1L24 45.4a2 2 0 0 0 2 0l17.6-10.2c.5-.3.5-.8 0-1l-16.8-9.8c-.5-.3-1.3-.3-1.9 0L7.4 34.5Z" fill="#DA3635"/> - <path d="M38.2 19.7v14.8l-13 7.4V27.1l13-7.4Z" fill="#fff"/> - <path d="M38.2 19.7v14.8l-13 7.4V27.1l13-7.4Z" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="m25.3 27-13-7.3 13-7.5 13 7.5-13 7.4Z" fill="#fff" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="m25.3 26-11-6.3 11-6.3 11 6.3-11 6.3Z" fill="#fff" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M12.4 19.7v14.8l12.9 7.4V27.1l-13-7.4Z" fill="#fff"/> - <path d="M12.4 19.7v14.8l12.9 7.4V27.1l-13-7.4Z" fill="#BDBDBD" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="m25.3 10.5 13 7.5-13 7.4-13-7.4 13-7.5Zm11 7.5-11-6.3-11 6.3 11 6.3 11-6.3Z" fill="#fff" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M38.2 18v2.6l-13 7.4v-2.6l13-7.4Z" fill="#fff"/> - <path d="M38.2 20.6V18l-13 7.4V28" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.3 25.4v2.5l-13-7.4V18l13 7.4Z" fill="#BDBDBD"/> - <path d="M25.3 27.9v-2.5l-13-7.4v2.5" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M25.3 11.7v1.7l-9.5 5.4-1.5-.8 11-6.3Z" fill="#fff" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="m36.3 18-11-6.3v1.7l9.5 5.4 1.5-.8ZM29 28.2l.1 11.6 6-3.4V24.8l-6 3.4ZM18 24.8v4.6l-3.3-1.9V23l3.3 2ZM23 27.6V32l-3.4-1.9v-4.5l3.3 1.9ZM18 31.1v4.6l-3.4-1.9v-4.6l3.4 2ZM22.9 33.9v4.5l-3.3-1.9V32l3.3 2Z" fill="#fff" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="m38.2 18-13 7.6" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="M24.9 25.1 12 17.8l13.3-8 12.8 7.4-13.3 8Z" fill="#E9E9E9"/> - <path d="M25.6 10.1a.5.5 0 0 1 .5.9l-.5-.9Zm-13.1 8.2a.5.5 0 1 1-.5-1l.5 1Zm-.5-1 13.6-7.2.5.9-13.6 7.3-.5-1Z" fill="#706F6F"/> - <path d="M38.2 17a.5.5 0 0 1-.5.8l.5-.9Zm-12.4-6.1a.5.5 0 1 1 .5-1l-.5 1Zm11.9 6.9-12-7 .6-.8 11.9 7-.5.8ZM25.2 25.3a.5.5 0 0 1-.5.9l.5-.9Zm-12.9-6.6a.5.5 0 1 1 .5-.8l-.5.8Zm12.4 7.5-12.4-7.5.5-.8 12.4 7.4-.5.9Z" fill="#706F6F"/> - <path d="M26 27.8 16 16.1l16-8.2 9.6 11-15.5 9Z" fill="#fff" stroke="#696969" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="m8.6 17.8 7.5-1.7 16-8.2L23 9.6 8.6 17.8Z" fill="#E9E9E9" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - <path d="m8.6 17.8 8-1.7 9.5 11.7-17.5-10Z" fill="#BDBDBD" stroke="#706F6F" stroke-miterlimit="10" stroke-linejoin="round"/> - </symbol> - - <symbol id="typeStructure_privateLucrative" width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"> + <symbol id="structureCategory_privateLucrative" width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"> <rect width="52" height="52" rx="4" fill="white"/> <path d="M7.32104 39.6816C6.79673 39.9831 6.79461 40.4777 7.31467 40.7791L24.0607 50.5117C24.5828 50.8152 25.4319 50.8131 25.9562 50.5117L43.6044 40.3227C44.1287 40.0213 44.1329 39.5288 43.6107 39.2253L26.8647 29.4927C26.3447 29.1912 25.4935 29.1912 24.9692 29.4927L7.32104 39.6816Z" fill="#DFB74F"/> <path d="M38.1703 24.863V39.6774L25.2197 47.0856V32.2691L38.1703 24.863Z" fill="white"/> @@ -625,7 +599,7 @@ <path d="M37.8622 8.26004L25.9456 1.34131" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> </symbol> - <symbol id="typeStructure_private" width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"> + <symbol id="structureCategory_private" width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"> <rect width="52" height="52" rx="4" fill="white"/> <path d="M7.32104 39.6816C6.79673 39.9831 6.79461 40.4777 7.31467 40.7791L24.0607 50.5117C24.5828 50.8152 25.4319 50.8131 25.9562 50.5117L43.6044 40.3227C44.1287 40.0213 44.1329 39.5288 43.6107 39.2253L26.8647 29.4927C26.3447 29.1912 25.4935 29.1912 24.9692 29.4927L7.32104 39.6816Z" fill="#1B7183"/> <path d="M38.1703 24.863V39.6774L25.2197 47.0856V32.2691L38.1703 24.863Z" fill="white"/> @@ -669,7 +643,7 @@ <path d="M37.8622 8.26004L25.9456 1.34131" stroke="#706F6F" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> </symbol> - <symbol id="typeStructure_public" width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"> + <symbol id="structureCategory_public" width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"> <rect width="52" height="52" rx="4" fill="white"/> <path d="M7.39483 34.4973C6.87052 34.7987 6.8684 35.2933 7.38846 35.5948L24.1344 45.3273C24.6566 45.6309 25.5057 45.6288 26.03 45.3273L43.6782 35.1384C44.2025 34.8369 44.2067 34.3445 43.6845 34.0409L26.9385 24.3083C26.4185 24.0069 25.5673 24.0069 25.043 24.3083L7.39483 34.4973Z" fill="#DA3635"/> <path d="M38.2441 19.6787V34.4931L25.2935 41.9013V27.0848L38.2441 19.6787Z" fill="white"/> -- GitLab From f489d4f575a72fd99dd216c562bf79bd185e76a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Pailharey?= <rpailharey@grandlyon.com> Date: Wed, 26 Oct 2022 11:37:29 +0200 Subject: [PATCH 5/5] fix: retours review --- src/app/models/structureType.model.ts | 3 ++- .../structure-type-picker.component.html | 24 +++++++++---------- .../structure-type-picker.component.scss | 8 ------- .../structure-type-picker.component.ts | 8 +------ 4 files changed, 15 insertions(+), 28 deletions(-) diff --git a/src/app/models/structureType.model.ts b/src/app/models/structureType.model.ts index a33bddf5a..7e73123b1 100644 --- a/src/app/models/structureType.model.ts +++ b/src/app/models/structureType.model.ts @@ -2,7 +2,8 @@ export class StructureType { _id: string; category: string; value: string; - private: boolean; + // Boolean set to false if user can't select this type during structure creation + selectable: boolean; constructor(obj?: any) { Object.assign(this, obj); diff --git a/src/app/shared/components/structure-type-picker/structure-type-picker.component.html b/src/app/shared/components/structure-type-picker/structure-type-picker.component.html index 8b7f405be..f3347b767 100644 --- a/src/app/shared/components/structure-type-picker/structure-type-picker.component.html +++ b/src/app/shared/components/structure-type-picker/structure-type-picker.component.html @@ -20,12 +20,12 @@ </div> </div> <div *ngIf="showPublic" class="btn-grid"> - <span *ngFor="let choice of getStructureTypes(structureTypeCategoryEnum.public)"> + <span *ngFor="let type of publicTypes"> <app-button - [extraClass]="choice._id == pickedTypeId ? 'selected' : ''" + [extraClass]="type._id == pickedTypeId ? 'selected' : ''" [style]="buttonTypeEnum.CheckButton" - [text]="getStructureTypeLabel(choice.value)" - (action)="pickStructureType(choice._id)" + [text]="getStructureTypeLabel(type.value)" + (action)="pickStructureType(type._id)" ></app-button> </span> </div> @@ -50,12 +50,12 @@ </div> </div> <div *ngIf="showPrivate" class="btn-grid"> - <span *ngFor="let choice of getStructureTypes(structureTypeCategoryEnum.private)"> + <span *ngFor="let type of privateTypes"> <app-button - [extraClass]="choice._id == pickedTypeId ? 'selected' : ''" + [extraClass]="type._id == pickedTypeId ? 'selected' : ''" [style]="buttonTypeEnum.CheckButton" - [text]="getStructureTypeLabel(choice.value)" - (action)="pickStructureType(choice._id)" + [text]="getStructureTypeLabel(type.value)" + (action)="pickStructureType(type._id)" ></app-button> </span> </div> @@ -80,12 +80,12 @@ </div> </div> <div *ngIf="showPrivateLucrative" class="btn-grid"> - <span *ngFor="let choice of getStructureTypes(structureTypeCategoryEnum.privateLucrative)"> + <span *ngFor="let type of privateLucrativeTypes"> <app-button - [extraClass]="choice._id == pickedTypeId ? 'selected' : ''" + [extraClass]="type._id == pickedTypeId ? 'selected' : ''" [style]="buttonTypeEnum.CheckButton" - [text]="getStructureTypeLabel(choice.value)" - (action)="pickStructureType(choice._id)" + [text]="getStructureTypeLabel(type.value)" + (action)="pickStructureType(type._id)" ></app-button> </span> </div> diff --git a/src/app/shared/components/structure-type-picker/structure-type-picker.component.scss b/src/app/shared/components/structure-type-picker/structure-type-picker.component.scss index 86db347c1..a4f00dd7e 100644 --- a/src/app/shared/components/structure-type-picker/structure-type-picker.component.scss +++ b/src/app/shared/components/structure-type-picker/structure-type-picker.component.scss @@ -94,14 +94,6 @@ button { height: 52px; width: 52px; margin-right: 8px; - svg { - &.validate { - width: 13px; - height: 10px; - margin-left: -17px; - stroke: $white; - } - } } } .logo { diff --git a/src/app/shared/components/structure-type-picker/structure-type-picker.component.ts b/src/app/shared/components/structure-type-picker/structure-type-picker.component.ts index 6657d64be..df363b833 100644 --- a/src/app/shared/components/structure-type-picker/structure-type-picker.component.ts +++ b/src/app/shared/components/structure-type-picker/structure-type-picker.component.ts @@ -33,7 +33,7 @@ export class StructureTypePickerComponent implements OnInit { ngOnInit() { this.structureTypeService.getStructureTypes().subscribe((types) => { // Filter "other" structure type - types = types.filter((type) => !type.private); + types = types.filter((type) => type.selectable); this.publicTypes = types.filter((type) => type.category === this.structureTypeCategoryEnum.public); this.privateTypes = types.filter((type) => type.category === this.structureTypeCategoryEnum.private); this.privateLucrativeTypes = types.filter( @@ -81,12 +81,6 @@ export class StructureTypePickerComponent implements OnInit { }); } - public getStructureTypes(category: string): StructureType[] { - if (category === this.structureTypeCategoryEnum.public) return this.publicTypes; - if (category === this.structureTypeCategoryEnum.private) return this.privateTypes; - if (category === this.structureTypeCategoryEnum.privateLucrative) return this.privateLucrativeTypes; - } - public pickStructureType(structureTypeId: string): void { this.pickedTypeId = structureTypeId; this.selectedType.emit(structureTypeId); -- GitLab