mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-22 09:32:41 +00:00
fix: dish prices sometimes go missing
This commit is contained in:
@@ -13,20 +13,19 @@
|
|||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {Component, Input} from '@angular/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import {SCAcademicPriceGroup, SCThingThatCanBeOfferedOffer} from '@openstapps/core';
|
import {
|
||||||
|
SCAcademicPriceGroup,
|
||||||
|
SCThingThatCanBeOfferedAvailability,
|
||||||
|
SCThingThatCanBeOfferedOffer,
|
||||||
|
} from '@openstapps/core';
|
||||||
import {SettingsProvider} from '../../settings/settings.provider';
|
import {SettingsProvider} from '../../settings/settings.provider';
|
||||||
|
|
||||||
/**
|
|
||||||
* TODO
|
|
||||||
*/
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'stapps-offers-in-list',
|
selector: 'stapps-offers-in-list',
|
||||||
templateUrl: 'offers-in-list.html',
|
templateUrl: 'offers-in-list.html',
|
||||||
|
styleUrls: ['offers-in-list.scss'],
|
||||||
})
|
})
|
||||||
export class OffersInListComponent {
|
export class OffersInListComponent {
|
||||||
/**
|
|
||||||
* TODO
|
|
||||||
*/
|
|
||||||
@Input() set offers(it: Array<SCThingThatCanBeOfferedOffer<SCAcademicPriceGroup>>) {
|
@Input() set offers(it: Array<SCThingThatCanBeOfferedOffer<SCAcademicPriceGroup>>) {
|
||||||
this._offers = it;
|
this._offers = it;
|
||||||
this.price = it[0].prices?.default;
|
this.price = it[0].prices?.default;
|
||||||
@@ -34,13 +33,14 @@ export class OffersInListComponent {
|
|||||||
this.price = it[0].prices?.[(group.value as string).replace(/s$/, '') as never];
|
this.price = it[0].prices?.[(group.value as string).replace(/s$/, '') as never];
|
||||||
});
|
});
|
||||||
|
|
||||||
const availabilities = new Set(it.map(offer => offer.availability));
|
if (it.length === 1) {
|
||||||
this.soldOut = availabilities.has('out of stock') && availabilities.size === 1;
|
this.availability = it[0].availability;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
price?: number;
|
price?: number;
|
||||||
|
|
||||||
soldOut: boolean;
|
availability: SCThingThatCanBeOfferedAvailability;
|
||||||
|
|
||||||
_offers: Array<SCThingThatCanBeOfferedOffer<SCAcademicPriceGroup>>;
|
_offers: Array<SCThingThatCanBeOfferedOffer<SCAcademicPriceGroup>>;
|
||||||
|
|
||||||
|
|||||||
@@ -13,16 +13,10 @@
|
|||||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<div>
|
<ion-badge
|
||||||
<ion-text *ngIf="price && !soldOut" style="white-space: nowrap">
|
*ngIf="price"
|
||||||
<h2>{{ price | currency : 'EUR' : 'symbol' : undefined : 'de' }}</h2>
|
[color]="availability === 'out of stock' ? 'danger' : availability === 'limited availability' ? 'warning' : 'primary'"
|
||||||
</ion-text>
|
|
||||||
<ion-text *ngIf="soldOut" color="danger" class="sold-out" style="white-space: nowrap">
|
|
||||||
<h2>{{ 'data.detail.offers.sold_out' | translate }}</h2>
|
|
||||||
</ion-text>
|
|
||||||
<p *ngIf="_offers[0].inPlace && !soldOut" class="place" style="white-space: nowrap">
|
|
||||||
<ion-icon name="pin_drop"></ion-icon>{{ _offers[0].inPlace.name }}<span *ngIf="_offers.length > 1"
|
|
||||||
>...</span
|
|
||||||
>
|
>
|
||||||
</p>
|
{{ availability === 'out of stock' ? ('data.detail.offers.sold_out' | translate) : (price | currency : 'EUR'
|
||||||
</div>
|
: 'symbol' : undefined : 'de') }}
|
||||||
|
</ion-badge>
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
:host {
|
||||||
|
display: contents;
|
||||||
|
}
|
||||||
|
|
||||||
|
ion-badge {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 0.8em;
|
||||||
|
margin-top: -0.25em;
|
||||||
|
translate: 0 0.25em;
|
||||||
|
padding: 0.25em;
|
||||||
|
}
|
||||||
@@ -20,33 +20,25 @@
|
|||||||
detail="false"
|
detail="false"
|
||||||
(click)="notifySelect()"
|
(click)="notifySelect()"
|
||||||
>
|
>
|
||||||
<div class="item-height-placeholder"></div>
|
|
||||||
<ion-thumbnail slot="start" *ngIf="!hideThumbnail" class="ion-margin-end">
|
<ion-thumbnail slot="start" *ngIf="!hideThumbnail" class="ion-margin-end">
|
||||||
<ion-icon color="dark" [name]="item.type | dataIcon" [size]="36"></ion-icon>
|
<ion-icon color="dark" [name]="item.type | dataIcon" [size]="36"></ion-icon>
|
||||||
</ion-thumbnail>
|
</ion-thumbnail>
|
||||||
<ng-container *ngIf="contentTemplateRef; else defaultContent">
|
<ng-container *ngIf="contentTemplateRef; else defaultContent">
|
||||||
<ion-label class="ion-text-wrap" [ngSwitch]="true">
|
|
||||||
<div>
|
|
||||||
<ng-container *ngTemplateOutlet="contentTemplateRef; context: {$implicit: item}"></ng-container>
|
<ng-container *ngTemplateOutlet="contentTemplateRef; context: {$implicit: item}"></ng-container>
|
||||||
</div>
|
|
||||||
</ion-label>
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container *ngIf="listItemEndInteraction" [ngSwitch]="item.type">
|
<ng-container *ngIf="listItemEndInteraction" [ngSwitch]="item.type">
|
||||||
<stapps-rating *ngSwitchCase="'dish'" [item]="$any(item)"></stapps-rating>
|
<stapps-rating slot="end" *ngSwitchCase="'dish'" [item]="$any(item)"></stapps-rating>
|
||||||
<stapps-favorite-button *ngSwitchDefault [item]="$any(item)"></stapps-favorite-button>
|
<stapps-favorite-button slot="end" *ngSwitchDefault [item]="$any(item)"></stapps-favorite-button>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|
||||||
<ng-template #defaultContent>
|
<ng-template #defaultContent>
|
||||||
<ion-label class="ion-text-wrap">
|
|
||||||
<div>
|
<div>
|
||||||
<ng-template [dataListItemHost]="item"></ng-template>
|
<ng-template [dataListItemHost]="item"></ng-template>
|
||||||
<stapps-action-chip-list
|
<stapps-action-chip-list
|
||||||
*ngIf="listItemChipInteraction && appearance !== 'square'"
|
*ngIf="listItemChipInteraction && appearance !== 'square'"
|
||||||
slot="end"
|
|
||||||
[item]="item"
|
[item]="item"
|
||||||
></stapps-action-chip-list>
|
></stapps-action-chip-list>
|
||||||
</div>
|
</div>
|
||||||
</ion-label>
|
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|||||||
@@ -20,34 +20,25 @@
|
|||||||
|
|
||||||
ion-item::part(native) {
|
ion-item::part(native) {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
padding: var(--spacing-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
ion-item {
|
ion-item {
|
||||||
--border-color: transparent;
|
--border-color: transparent;
|
||||||
--inner-padding-end: 0;
|
--inner-padding-end: 0;
|
||||||
--padding-start: 0;
|
|
||||||
@include border-radius-in-parallax(var(--border-radius-default));
|
@include border-radius-in-parallax(var(--border-radius-default));
|
||||||
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin: var(--spacing-sm);
|
margin: var(--spacing-sm);
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
ion-thumbnail {
|
ion-thumbnail {
|
||||||
--ion-margin: var(--spacing-xs);
|
--ion-margin: var(--spacing-xs);
|
||||||
|
|
||||||
margin-inline-start: var(--spacing-md);
|
margin-inline: var(--spacing-md);
|
||||||
|
margin-block: auto;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ion-label {
|
|
||||||
width: 100%;
|
|
||||||
margin-right: 0;
|
|
||||||
padding-left: var(--spacing-sm);
|
|
||||||
|
|
||||||
div {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ion-text-wrap ::ng-deep ion-label {
|
.ion-text-wrap ::ng-deep ion-label {
|
||||||
@@ -58,9 +49,44 @@ ion-item {
|
|||||||
-webkit-line-clamp: 3;
|
-webkit-line-clamp: 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[slot='end'] {
|
||||||
|
margin-inline-start: 0;
|
||||||
|
margin-block: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
stapps-action-chip-list {
|
||||||
|
float: bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
ion-item ::ng-deep {
|
||||||
|
stapps-long-inline-text,
|
||||||
|
.title {
|
||||||
|
overflow: hidden;
|
||||||
|
display: -webkit-box;
|
||||||
|
|
||||||
|
white-space: break-spaces;
|
||||||
|
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-sub {
|
||||||
|
overflow: hidden;
|
||||||
|
display: -webkit-box;
|
||||||
|
|
||||||
|
white-space: break-spaces;
|
||||||
|
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 1;
|
||||||
|
|
||||||
|
margin-block: var(--spacing-xs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
:host.square ::ng-deep {
|
:host.square ::ng-deep {
|
||||||
ion-item {
|
ion-item {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
ion-row {
|
ion-row {
|
||||||
@@ -74,19 +100,12 @@ ion-item {
|
|||||||
flex-grow: 0;
|
flex-grow: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
stapps-long-inline-text,
|
|
||||||
.title {
|
.title {
|
||||||
overflow: hidden;
|
height: 2.5em;
|
||||||
display: -webkit-box;
|
|
||||||
|
|
||||||
white-space: break-spaces;
|
|
||||||
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-sub {
|
.title ~ :last-child {
|
||||||
display: none;
|
margin-right: 42px;
|
||||||
}
|
}
|
||||||
|
|
||||||
stapps-rating,
|
stapps-rating,
|
||||||
|
|||||||
@@ -13,19 +13,7 @@
|
|||||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
<ion-note>
|
<ion-note>
|
||||||
<ng-container *ngIf="item.certifications">
|
<ion-label> {{ 'categories' | thingTranslate: item | join: ', ' | titlecase }} </ion-label>
|
||||||
<ng-container *ngFor="let cert of item.certifications">
|
|
||||||
<abbr [title]="'description' | thingTranslate: cert">
|
|
||||||
<img
|
|
||||||
*ngIf="cert.compactImage"
|
|
||||||
[src]="'compactImage' | thingTranslate: cert"
|
|
||||||
height="16"
|
|
||||||
[alt]="'name' | thingTranslate: cert"
|
|
||||||
/>
|
|
||||||
</abbr>
|
|
||||||
</ng-container>
|
|
||||||
</ng-container>
|
|
||||||
<div class="sep">•</div>
|
|
||||||
<ng-container *ngIf="item.characteristics">
|
<ng-container *ngIf="item.characteristics">
|
||||||
<ng-container *ngFor="let characteristic of 'characteristics' | thingTranslate: item">
|
<ng-container *ngFor="let characteristic of 'characteristics' | thingTranslate: item">
|
||||||
<!-- Abbr tag shows the actual name on hover -->
|
<!-- Abbr tag shows the actual name on hover -->
|
||||||
@@ -36,6 +24,15 @@
|
|||||||
></abbr>
|
></abbr>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<div class="sep">•</div>
|
<ng-container *ngIf="item.certifications">
|
||||||
<ion-label> {{ 'categories' | thingTranslate: item | join: ', ' | titlecase }} </ion-label>
|
<ng-container *ngFor="let cert of item.certifications">
|
||||||
|
<abbr *ngIf="cert.compactImage" [title]="'description' | thingTranslate: cert">
|
||||||
|
<img
|
||||||
|
[src]="'compactImage' | thingTranslate: cert"
|
||||||
|
height="16"
|
||||||
|
[alt]="'name' | thingTranslate: cert"
|
||||||
|
/>
|
||||||
|
</abbr>
|
||||||
|
</ng-container>
|
||||||
|
</ng-container>
|
||||||
</ion-note>
|
</ion-note>
|
||||||
|
|||||||
@@ -12,13 +12,21 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
:host {
|
||||||
|
display: contents;
|
||||||
|
}
|
||||||
|
|
||||||
$size: 16px;
|
$size: 16px;
|
||||||
|
|
||||||
ion-note {
|
ion-note {
|
||||||
|
margin: inherit;
|
||||||
|
margin-right: inherit;
|
||||||
|
margin-block-end: inherit;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row-reverse;
|
align-items: flex-start;
|
||||||
align-items: center;
|
justify-content: flex-start;
|
||||||
justify-content: flex-end;
|
gap: var(--spacing-xs) var(--spacing-sm);
|
||||||
|
flex-flow: row wrap;
|
||||||
|
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
@@ -41,15 +49,5 @@ abbr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
height: 100%;
|
|
||||||
background: var(--background-url);
|
background: var(--background-url);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sep {
|
|
||||||
display: none;
|
|
||||||
margin-inline: var(--spacing-xs);
|
|
||||||
}
|
|
||||||
|
|
||||||
abbr + .sep {
|
|
||||||
display: revert;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<stapps-dish-characteristics *ngIf="item.characteristics" [item]="item"></stapps-dish-characteristics>
|
<stapps-dish-characteristics [item]="item"></stapps-dish-characteristics>
|
||||||
<stapps-offers-detail *ngIf="item.offers" [offers]="item.offers"></stapps-offers-detail>
|
<stapps-offers-detail *ngIf="item.offers" [offers]="item.offers"></stapps-offers-detail>
|
||||||
<stapps-certifications-in-detail
|
<stapps-certifications-in-detail
|
||||||
*ngIf="item.certifications"
|
*ngIf="item.certifications"
|
||||||
|
|||||||
@@ -13,19 +13,12 @@
|
|||||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<ion-grid>
|
<ion-label class="title">
|
||||||
<ion-row class="ion-justify-content-between">
|
<stapps-offers-in-list
|
||||||
<ion-col size="11" size-sm="10">
|
*ngIf="item.offers && item.offers.length > 0"
|
||||||
<div class="ion-text-wrap">
|
[offers]="item.offers"
|
||||||
<ion-label class="title">{{ 'name' | thingTranslate: item }}</ion-label>
|
></stapps-offers-in-list>
|
||||||
<p class="title-sub ion-hide-sm-down">{{ 'description' | thingTranslate: item }}</p>
|
{{ 'name' | thingTranslate: item }}
|
||||||
|
</ion-label>
|
||||||
|
<p class="title-sub">{{ 'description' | thingTranslate: item | sentencecase }}</p>
|
||||||
<stapps-dish-characteristics [item]="item"></stapps-dish-characteristics>
|
<stapps-dish-characteristics [item]="item"></stapps-dish-characteristics>
|
||||||
</div>
|
|
||||||
</ion-col>
|
|
||||||
<ion-col>
|
|
||||||
<div class="ion-text-end">
|
|
||||||
<stapps-offers-in-list *ngIf="item.offers" [offers]="item.offers"></stapps-offers-in-list>
|
|
||||||
</div>
|
|
||||||
</ion-col>
|
|
||||||
</ion-row>
|
|
||||||
</ion-grid>
|
|
||||||
|
|||||||
@@ -14,9 +14,11 @@
|
|||||||
*/
|
*/
|
||||||
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
|
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
|
||||||
import {PositionService} from '../../../map/position.service';
|
import {PositionService} from '../../../map/position.service';
|
||||||
import {filter, Observable, timer} from 'rxjs';
|
import {filter, Observable} from 'rxjs';
|
||||||
import {hasValidLocation, isSCFloor, PlaceTypes, PlaceTypesWithDistance} from './place-types';
|
import {hasValidLocation, isSCFloor, PlaceTypes, PlaceTypesWithDistance} from './place-types';
|
||||||
import {map} from 'rxjs/operators';
|
import {map} from 'rxjs/operators';
|
||||||
|
import {LatLng, geoJSON} from 'leaflet';
|
||||||
|
import {trigger, transition, style, animate} from '@angular/animations';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shows a place as a list item
|
* Shows a place as a list item
|
||||||
@@ -26,6 +28,7 @@ import {map} from 'rxjs/operators';
|
|||||||
templateUrl: 'place-list-item.html',
|
templateUrl: 'place-list-item.html',
|
||||||
styleUrls: ['place-list-item.scss'],
|
styleUrls: ['place-list-item.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
|
animations: [trigger('fade', [transition(':enter', [style({opacity: 0}), animate(100)])])],
|
||||||
})
|
})
|
||||||
export class PlaceListItemComponent {
|
export class PlaceListItemComponent {
|
||||||
_item: PlaceTypesWithDistance;
|
_item: PlaceTypesWithDistance;
|
||||||
@@ -36,8 +39,13 @@ export class PlaceListItemComponent {
|
|||||||
@Input() set item(item: PlaceTypes) {
|
@Input() set item(item: PlaceTypes) {
|
||||||
this._item = item;
|
this._item = item;
|
||||||
if (!isSCFloor(item) && hasValidLocation(item)) {
|
if (!isSCFloor(item) && hasValidLocation(item)) {
|
||||||
this.distance = timer(0, 10_000).pipe(
|
this.distance = this.positionService.watchCurrentLocation().pipe(
|
||||||
map(() => this.positionService.getDistance(item.geo.point)),
|
map(position =>
|
||||||
|
new LatLng(position.latitude, position.longitude).distanceTo(
|
||||||
|
geoJSON(item.geo.point).getBounds().getCenter(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
filter(it => it !== undefined),
|
filter(it => it !== undefined),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,45 +12,29 @@
|
|||||||
~ You should have received a copy of the GNU General Public License along with
|
~ You should have received a copy of the GNU General Public License along with
|
||||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
|
<ng-template #distanceView>
|
||||||
<ion-grid>
|
<ion-label class="distance" *ngIf="distance | async as distance;" @fade>
|
||||||
<ion-row>
|
|
||||||
<ion-col>
|
|
||||||
<div class="ion-text-wrap">
|
|
||||||
<ion-label class="title">{{ 'name' | thingTranslate: _item }}</ion-label>
|
|
||||||
<ng-container *ngIf="_item.type !== 'floor'">
|
|
||||||
<p class="title-sub" *ngIf="_item.openingHours">
|
|
||||||
<span>
|
|
||||||
<stapps-opening-hours [openingHours]="_item.openingHours"></stapps-opening-hours>
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<ion-note *ngIf="_item.categories && _item.type !== 'building'; else onlyType">
|
|
||||||
<ion-label> {{ 'categories' | thingTranslate: _item | join: ', ' | titlecase }} </ion-label>
|
|
||||||
<ion-label *ngIf="distance | async as distance" class="distance">
|
|
||||||
<ion-icon name="directions_walk"></ion-icon>
|
<ion-icon name="directions_walk"></ion-icon>
|
||||||
{{ distance | metersLocalized }}
|
{{ distance | metersLocalized }}
|
||||||
</ion-label>
|
</ion-label>
|
||||||
|
</ng-template>
|
||||||
|
<ion-label class="title">{{ 'name' | thingTranslate: _item }}</ion-label>
|
||||||
|
<ng-container *ngIf="_item.type !== 'floor'">
|
||||||
|
<stapps-opening-hours [openingHours]="_item.openingHours"></stapps-opening-hours>
|
||||||
|
<ion-note *ngIf="_item.categories && _item.type !== 'building'; else onlyType">
|
||||||
|
<ion-label> {{ 'categories' | thingTranslate: _item | join: ', ' | titlecase }} </ion-label>
|
||||||
|
<ng-container *ngTemplateOutlet="distanceView"></ng-container>
|
||||||
</ion-note>
|
</ion-note>
|
||||||
</p>
|
|
||||||
<ng-template #onlyType>
|
<ng-template #onlyType>
|
||||||
<ion-note>
|
<ion-note>
|
||||||
<ion-label> {{ 'type' | thingTranslate: _item | titlecase }} </ion-label>
|
<ion-label> {{ 'type' | thingTranslate: _item | titlecase }} </ion-label>
|
||||||
<ion-label *ngIf="distance | async as distance" class="distance">
|
<ng-container *ngTemplateOutlet="distanceView"></ng-container>
|
||||||
<ion-icon name="directions_walk"></ion-icon>
|
|
||||||
{{ distance | metersLocalized }}
|
|
||||||
</ion-label>
|
|
||||||
</ion-note>
|
</ion-note>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<p *ngIf="_item.description">{{ 'description' | thingTranslate: _item }}</p>
|
<p *ngIf="_item.description">{{ 'description' | thingTranslate: _item }}</p>
|
||||||
</div>
|
|
||||||
</ion-col>
|
|
||||||
<ng-container *ngIf="_item.type !== 'building'">
|
<ng-container *ngIf="_item.type !== 'building'">
|
||||||
<ion-col size="auto" class="in-place" *ngIf="_item.inPlace">
|
<ion-col size="auto" class="in-place" *ngIf="_item.inPlace">
|
||||||
<ion-icon name="pin_drop"></ion-icon
|
<ion-icon name="pin_drop"></ion-icon><ion-label>{{ 'name' | thingTranslate: _item.inPlace }}</ion-label>
|
||||||
><ion-label>{{ 'name' | thingTranslate: _item.inPlace }}</ion-label>
|
|
||||||
</ion-col>
|
</ion-col>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ion-row>
|
|
||||||
</ion-grid>
|
|
||||||
|
|||||||
@@ -33,3 +33,7 @@ ion-label + ion-label.distance::before {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stapps-opening-hours ::ng-deep div {
|
||||||
|
padding-block: var(--spacing-xs);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user