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

fix: openning hours handling when there is no hours

parent 132edd53
Branches
Tags
2 merge requests!68Recette,!67Dev
......@@ -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;
}
}
......@@ -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">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment