diff --git a/src/app/models/week.model.ts b/src/app/models/week.model.ts index 742c749d8c8ae7df37c1f2c1876dd84572888b5f..b3a91d97e072eda27ee87ac3cb7fb75d709b2a3e 100644 --- a/src/app/models/week.model.ts +++ b/src/app/models/week.model.ts @@ -41,4 +41,20 @@ export class Week { return null; } } + + public hasData() { + console.log('has data'); + if ( + this.monday.time.length === 0 && + this.tuesday.time.length === 0 && + this.wednesday.time.length === 0 && + this.thursday.time.length === 0 && + this.friday.time.length === 0 && + this.saturday.time.length === 0 && + this.sunday.time.length === 0 + ) { + return false; + } + return true; + } } 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 95e09eeb66082056737556816b5401158382b053..4c5061cec87ad01514731f2cd7b5273807df39f3 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 @@ -67,7 +67,7 @@ <div fxLayout="column" fxFlex="50%"> <div *ngIf="structure.contactMail" fxLayout="row" fxLayoutAlign="none center" fxLayoutGap="13px"> <app-svg-icon [type]="'ico'" [icon]="'email'"></app-svg-icon> - <a [href]="'mailto:' + structure.contactMail">{{ structure.contactMail }}</a> + <p>{{ structure.contactMail }}</p> </div> <div fxLayout="row" fxLayoutAlign="none flex-end" fxLayoutGap="13px"> <app-svg-icon [type]="'ico'" [icon]="'calendar'"></app-svg-icon> @@ -133,8 +133,8 @@ </div> <!-- Openning Hours --> <div fxLayout="row" class="w-100" fxLayout.lt-sm="column"> - <div fxFlex="50%"> - <h3 class="subtitle">Horaires d’ouverture au public :</h3> + <div *ngIf="structure.hours.hasData()" fxFlex="50%"> + <h3 class="subtitle">Horaires d’ouverture au public</h3> <div fxLayout="column"> <div *ngFor="let day of structure.hours | keyvalue: keepOriginalOrder"> <div *ngIf="day.value.open">