Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <table mat-table [dataSource]="billingLines" class="mat-elevation-z8">
- <!-- Other columns comes here -->
- <ng-container matColumnDef="period">
- <th mat-header-cell *matHeaderCellDef> Période </th>
- <td mat-cell *matCellDef="let element; let i=index;">
- <p>{{element.getPeriodString()}}</p>
- </td>
- </ng-container>
- <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
- <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
- </table>
- @Input() billingLines: ContractBillingLine[] = [];
- export class ContractBillingLine {
- constructor(
- public ligneTitle: string,
- public creditNote: boolean,
- public startPeriod: Date,
- public endPeriod: Date,
- public sumHT: number,
- public sumTVA: number,) {
- }
- public getPeriodString(): string {
- return "Du " + moment(this.startPeriod).format("dd/mm/yyyy") + moment(this.endPeriod).format("dd/mm/yyyy");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement