Purchase Entries Done!!
This commit is contained in:
@ -32,7 +32,7 @@
|
||||
<!-- Supplier Column -->
|
||||
<ng-container matColumnDef="supplier">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Supplier</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"><a [routerLink]="['/', row.url, row.id]">{{row.supplier}}</a></mat-cell>
|
||||
<mat-cell *matCellDef="let row"><a [routerLink]="row.url">{{row.supplier}}</a></mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Product Column -->
|
||||
|
||||
@ -32,12 +32,7 @@ export class PurchaseEntriesComponent implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.data.pipe(map(
|
||||
(data: { info: PurchaseEntries }) => {
|
||||
data.info.body = data.info.body.map(x => ({...x, url: x['type'].replace(/ /g, '-').toLowerCase()}));
|
||||
return data;
|
||||
}
|
||||
)).subscribe((data: { info: PurchaseEntries }) => {
|
||||
this.route.data.subscribe((data: { info: PurchaseEntries }) => {
|
||||
this.info = data.info;
|
||||
this.form.setValue({
|
||||
startDate: moment(this.info.startDate, 'DD-MMM-YYYY').toDate(),
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
|
||||
export class PurchaseEntriesItem {
|
||||
id: string;
|
||||
date: string;
|
||||
supplier: string;
|
||||
url: string[];
|
||||
product: string;
|
||||
quantity: number;
|
||||
rate: number;
|
||||
|
||||
Reference in New Issue
Block a user