Customer discount with prefill discount in sales.
This commit is contained in:
@ -28,6 +28,18 @@
|
||||
<mat-cell *matCellDef="let row">{{ row.address }}</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>
|
||||
|
||||
@ -14,7 +14,7 @@ export class CustomerListComponent implements OnInit {
|
||||
dataSource: CustomerListDatasource = new CustomerListDatasource([]);
|
||||
list: Customer[] = [];
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['name', 'phone', 'address'];
|
||||
displayedColumns = ['name', 'phone', 'address', 'discounts'];
|
||||
|
||||
constructor(private route: ActivatedRoute) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user