Files
barker/bookie/src/app/customers/customer-list/customer-list.component.html
tanshu db5f2731be Feature: Added a column called print in bill to the table customer.
This will prevent printing all customer's names and phone numbers in the bill in case of simple walkins.
This is a breaking change as there is schema changes in the database.
It also bolds the customers who are to be printed in the bill in the running tables list.
2021-06-28 08:41:32 +05:30

54 lines
1.9 KiB
HTML

<mat-card>
<mat-card-title-group>
<mat-card-title>Customers</mat-card-title>
<a mat-button [routerLink]="['/customers', 'new']">
<mat-icon>add_box</mat-icon>
Add
</a>
</mat-card-title-group>
<mat-card-content>
<mat-table #table [dataSource]="dataSource" aria-label="Elements">
<!-- Name Column -->
<ng-container matColumnDef="name">
<mat-header-cell *matHeaderCellDef>Name</mat-header-cell>
<mat-cell *matCellDef="let row"
><a [routerLink]="['/customers', row.id]">{{ row.name }}</a></mat-cell
>
</ng-container>
<!-- Phone Column -->
<ng-container matColumnDef="phone">
<mat-header-cell *matHeaderCellDef>Phone</mat-header-cell>
<mat-cell *matCellDef="let row">{{ row.phone }}</mat-cell>
</ng-container>
<!-- Address Column -->
<ng-container matColumnDef="address">
<mat-header-cell *matHeaderCellDef>Address</mat-header-cell>
<mat-cell *matCellDef="let row">{{ row.address }}</mat-cell>
</ng-container>
<!-- Print In Bill Column -->
<ng-container matColumnDef="printInBill">
<mat-header-cell *matHeaderCellDef>Print in Bill</mat-header-cell>
<mat-cell *matCellDef="let row">{{ row.printInBill }}</mat-cell>
</ng-container>
<!-- Discounts Column -->
<ng-container matColumnDef="discounts">
<mat-header-cell *matHeaderCellDef>Discounts</mat-header-cell>
<mat-cell *matCellDef="let row">
<ul>
<li *ngFor="let discount of row.discounts">
{{ discount.name }} - {{ discount.discount | percent: '1.2-2' }}
</li>
</ul>
</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
</mat-table>
</mat-card-content>
</mat-card>