43 lines
1.5 KiB
HTML
43 lines
1.5 KiB
HTML
<div *ngIf="items.length > 0">
|
|
<div class="card" *ngFor="let item of itemsUpdate | async">
|
|
<mat-card>
|
|
<table cellspacing="0" width="100%" class="text">
|
|
<tr>
|
|
<td>{{item.name}}</td>
|
|
<td align="right">
|
|
<p class="price">{{item.cost | currency: getCurrency() }}</p>
|
|
<p class="price" *ngIf="!owner.zats"><img class="icon" src="/assets/spartan-zec.png" width="12px" />{{(item.cost/price) | number: '1.0-6'}}</p>
|
|
<p class="price" *ngIf="owner.zats">ⓩ {{(item.cost/price)*100000000 | number: '1.0-0'}}</p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div align="center">
|
|
<p class="text small">{{item.description}}</p>
|
|
</div>
|
|
<mat-card-actions>
|
|
<table cellspacing="0" width="100%">
|
|
<tr>
|
|
<td>
|
|
<button mat-icon-button class="icons" (click)="edit(item._id!)">
|
|
<mat-icon inline=true>edit</mat-icon>
|
|
</button>
|
|
<button mat-icon-button class="icons" (click)="delete(item._id!)">
|
|
<mat-icon inline=true>delete</mat-icon>
|
|
</button>
|
|
</td>
|
|
<td align="right">
|
|
<button mat-raised-button color="primary" class="icons" (click)="addToOrder(item._id!)">
|
|
<mat-icon>shopping_cart</mat-icon>
|
|
</button>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</mat-card-actions>
|
|
</mat-card>
|
|
</div>
|
|
</div>
|
|
<p *ngIf = "items.length <= 0">No items yet!</p>
|
|
<br>
|
|
<button class="text" mat-raised-button (click)="openDialog()">
|
|
<mat-icon class="icon">add</mat-icon>Add item</button>
|