new song sync

This commit is contained in:
Benjamin Ifland
2019-03-25 18:04:30 +01:00
parent dc01c60e67
commit 42e9936b6c
9 changed files with 94 additions and 27 deletions

View File

@@ -3,7 +3,9 @@
[class.pinned]="songsService.state !== State.list"
>
<div class="table-container">
<button mat-icon-button (click)="onClickNew()" class="button-new"><fa-icon [icon]="faNew"></fa-icon></button>
<button mat-icon-button (click)="onClickNew()" class="button-new">
<fa-icon [icon]="faNew"></fa-icon>
</button>
<table
mat-table
[dataSource]="songsService.songs | async"
@@ -11,7 +13,11 @@
>
<ng-container matColumnDef="Number">
<th mat-header-cell *matHeaderCellDef>#</th>
<td mat-cell *matCellDef="let element">{{ element.Number }}</td>
<td mat-cell *matCellDef="let element">
<mat-chip-list>
<mat-chip>{{ element.Number }}</mat-chip>
</mat-chip-list>
</td>
</ng-container>
<ng-container matColumnDef="Name">
@@ -31,8 +37,13 @@
<ng-container matColumnDef="SongType">
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let element">
<mat-chip-list *ngIf="element.SongType && element.SongType!=='None'">
<mat-chip [style.background-color]="renderSongType(element.SongType).color">{{ renderSongType(element.SongType).name }}</mat-chip>
<mat-chip-list
*ngIf="element.SongType && element.SongType !== 'None'"
>
<mat-chip
[style.background-color]="renderSongType(element.SongType).color"
>{{ renderSongType(element.SongType).name }}</mat-chip
>
</mat-chip-list>
</td>
</ng-container>