-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use SQL query API in zone index view, redesign to include signage, ma…
…ke better use of available space
- Loading branch information
Showing
3 changed files
with
47 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.zones { | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: 0 20px; | ||
justify-content: center; | ||
padding: 0; | ||
text-align: center; | ||
} | ||
|
||
.zones a { | ||
display: block; | ||
text-decoration: none; | ||
transition: transform 0.1s, filter 0.1s; | ||
width: 204px; | ||
} | ||
|
||
.zones a:hover { | ||
color: var(--lu-yellow); | ||
transform: scale(105%); | ||
filter: brightness(115%); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,27 @@ | ||
<ul class="breadcrumbs"> | ||
<li>Zones</li> | ||
</ul> | ||
<h2>Zone Index</h2> | ||
<ul class="zones"> | ||
<li *ngFor="let item of ($zones | async | keyvalue)"> | ||
<a routerLink="/zones/{{item.key}}">{{item.value.DisplayDescription}}</a> <span class="badge">{{item.key}}</span> | ||
</li> | ||
</ul> | ||
<h2>Zones</h2> | ||
<ng-container *ngIf="' | ||
select | ||
zoneID in (1001, 1100, 1149, 1150, 1151, 1200, 1201, 1250, 1251, 1260, 1300, 1350, 1351, 1400, 1450, 1451, 1600, 1800, 1900, 2000) as hasSignage, | ||
zoneID, | ||
DisplayDescription_en_US as DisplayDescription | ||
from ZoneTable | ||
where DisplayDescription_en_US is not null and zoneName not like \'%removed%\' | ||
order by hasSignage desc, ((zoneID-1) % 100 / -49) | ||
' | query | group:'hasSignage'; let zones"> | ||
<h3>Key Zones</h3> | ||
<section class="zones"> | ||
<a *ngFor="let zone of zones[1]" routerLink="/zones/{{zone.zoneID}}"> | ||
<lux-signage [id]="zone.zoneID | num"></lux-signage> | ||
<p>{{zone.DisplayDescription}}</p> | ||
</a> | ||
</section> | ||
<h3>Other Zones</h3> | ||
<section class="zones"> | ||
<a *ngFor="let zone of zones[0]" routerLink="/zones/{{zone.zoneID}}"> | ||
<p>{{zone.DisplayDescription}}</p> | ||
</a> | ||
</section> | ||
</ng-container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,8 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { Observable } from 'rxjs'; | ||
import { Locale_ZoneTable } from '../../../defs/locale'; | ||
import { LuCoreDataService } from '../../util/services/lu-core-data.service'; | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-zone-index', | ||
templateUrl: './zone-index.component.html', | ||
styleUrls: ['./zone-index.component.css'] | ||
}) | ||
export class ZoneIndexComponent implements OnInit { | ||
|
||
$zones: Observable<{ [key: string]: Locale_ZoneTable }>; | ||
|
||
constructor( | ||
private luCoreData: LuCoreDataService, | ||
) { } | ||
|
||
ngOnInit() { | ||
this.$zones = this.luCoreData.getLocaleSubtree<Locale_ZoneTable>('ZoneTable'); | ||
} | ||
} | ||
export class ZoneIndexComponent {} |