update
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<table mat-table [dataSource]="quotas">
|
||||
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef> {{'quotas.name' | i18n}} </th>
|
||||
<td mat-cell *matCellDef="let quota"> {{quota.name}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="quota">
|
||||
<th mat-header-cell *matHeaderCellDef> {{'quotas.value' | i18n}} </th>
|
||||
<td mat-cell *matCellDef="let quota">{{quota.value}} {{quota.unit}}</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="quotaColumns"></tr>
|
||||
<tr mat-row *matRowDef="let myRowData; columns: quotaColumns"></tr>
|
||||
</table>
|
||||
@@ -0,0 +1,3 @@
|
||||
table {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { QuotasComponent } from './quotas.component';
|
||||
|
||||
describe('QuotasComponent', () => {
|
||||
let component: QuotasComponent;
|
||||
let fixture: ComponentFixture<QuotasComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ QuotasComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(QuotasComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,17 @@
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-quotas',
|
||||
templateUrl: './quotas.component.html',
|
||||
styleUrls: ['./quotas.component.scss']
|
||||
})
|
||||
export class QuotasComponent implements OnInit {
|
||||
|
||||
@Input() quotas;
|
||||
quotaColumns = ["name", "quota"];
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user