penambahan detail room dan penyesuaian device list
This commit is contained in:
@@ -88,17 +88,17 @@
|
||||
<div class="row mb-3">
|
||||
<div
|
||||
class="col-xl-6 col-md-6 col-12"
|
||||
*ngFor="let top of dataTop; let i = index"
|
||||
*ngFor="let top of data.topUse; let i = index"
|
||||
>
|
||||
<div>
|
||||
<span class="mb-1 text-muted cardtext d-block"
|
||||
>{{ top.value[i] }}% - {{ top.label[i] }}</span
|
||||
>{{ top.value }}% - {{ top.label }}</span
|
||||
>
|
||||
<div>
|
||||
<ngb-progressbar
|
||||
height="7px"
|
||||
type="danger"
|
||||
[value]="top.value[i]"
|
||||
[value]="top.value"
|
||||
></ngb-progressbar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,7 +14,7 @@ export class BuildingComponent {
|
||||
feedbacksdonutChart: any;
|
||||
donutChart1: any;
|
||||
filteredRows: any[];
|
||||
dataTop: any[];
|
||||
dataTop: any;
|
||||
searchTerm: string = "";
|
||||
colorChart: string = "";
|
||||
|
||||
@@ -55,20 +55,6 @@ export class BuildingComponent {
|
||||
console.log(res.data);
|
||||
this.data = res.data;
|
||||
this.filteredRows = res.data;
|
||||
|
||||
this.dataTop = [];
|
||||
const maxItems = 4;
|
||||
|
||||
res.data.forEach((item) => {
|
||||
for (let i = 0; i < maxItems; i++) {
|
||||
if (item.topUse.label[i] !== undefined) {
|
||||
this.dataTop.push({
|
||||
label: item.topUse.label,
|
||||
value: item.topUse.value,
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -104,7 +90,7 @@ export class BuildingComponent {
|
||||
this.router.navigate(["/monitoring/edit-new-building", row.id]);
|
||||
}
|
||||
|
||||
viewRoom(row){
|
||||
viewRoom(row) {
|
||||
console.log(row);
|
||||
this.router.navigate(["/monitoring/monitoring-room", row.id]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user