perbaikan style monitoring building
This commit is contained in:
@@ -90,15 +90,17 @@
|
||||
class="col-xl-6 col-md-6 col-12"
|
||||
*ngFor="let top of dataTop; let i = index"
|
||||
>
|
||||
<span class="mb-1 text-muted cardtext d-block"
|
||||
>{{ top.value[i] }}% - {{ top.label[i] }}</span
|
||||
>
|
||||
<div>
|
||||
<ngb-progressbar
|
||||
height="7px"
|
||||
type="danger"
|
||||
[value]="top.value[i]"
|
||||
></ngb-progressbar>
|
||||
<span class="mb-1 text-muted cardtext d-block"
|
||||
>{{ top.value[i] }}% - {{ top.label[i] }}</span
|
||||
>
|
||||
<div>
|
||||
<ngb-progressbar
|
||||
height="7px"
|
||||
type="danger"
|
||||
[value]="top.value[i]"
|
||||
></ngb-progressbar>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -46,13 +46,18 @@ export class BuildingComponent {
|
||||
|
||||
fetchData() {
|
||||
this.monitoringService.getMonitoringBuildingData().subscribe((res) => {
|
||||
this.data = res
|
||||
this.filteredRows = res
|
||||
this.dataTop = res.map(item => ({
|
||||
label: item.topUse.label,
|
||||
value: item.topUse.value
|
||||
}));
|
||||
|
||||
this.data = res;
|
||||
this.filteredRows = res;
|
||||
|
||||
this.dataTop = [];
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
if (res[i].topUse.label[i]) {
|
||||
this.dataTop.push({
|
||||
label: res[i].topUse.label,
|
||||
value: res[i].topUse.value,
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -73,5 +78,4 @@ export class BuildingComponent {
|
||||
value !== null && value.toString().toLowerCase().includes(searchTermLC)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user