perbaikan list building
This commit is contained in:
parent
45f3c9b86b
commit
5b3c9bcba4
|
@ -132,7 +132,8 @@ export class CostManagementComponent implements OnInit {
|
||||||
|
|
||||||
dataListBuilding() {
|
dataListBuilding() {
|
||||||
this.monitoringApiService.getBuildingList().subscribe((data) => {
|
this.monitoringApiService.getBuildingList().subscribe((data) => {
|
||||||
this.dataBuildingList = data.data.filter((item) => item.statusId === 2);
|
this.dataBuildingList = data.data.filter((item) => item.statusName.toLowerCase() === "aktif");
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ export class DeviceControlComponent {
|
||||||
|
|
||||||
dataListBuilding() {
|
dataListBuilding() {
|
||||||
this.monitoringApiService.getBuildingList().subscribe((data) => {
|
this.monitoringApiService.getBuildingList().subscribe((data) => {
|
||||||
this.dataBuildingList = data.data.filter((item) => item.statusId === 2);
|
this.dataBuildingList = data.data.filter((item) => item.statusName.toLowerCase() === "aktif");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,7 @@ export class DeviceComponent implements OnInit {
|
||||||
|
|
||||||
dataListBuilding() {
|
dataListBuilding() {
|
||||||
this.monitoringApiService.getBuildingList().subscribe((data) => {
|
this.monitoringApiService.getBuildingList().subscribe((data) => {
|
||||||
this.dataBuildingList = data.data.filter((item) => item.statusId === 2);
|
this.dataBuildingList = data.data.filter((item) => item.statusName.toLowerCase() === "aktif");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,7 @@ export class ControlDeviceSeemoreComponent {
|
||||||
|
|
||||||
dataListBuilding() {
|
dataListBuilding() {
|
||||||
this.monitoringApiService.getBuildingList().subscribe((data) => {
|
this.monitoringApiService.getBuildingList().subscribe((data) => {
|
||||||
this.dataBuildingList = data.data.filter((item) => item.statusId === 2);
|
this.dataBuildingList = data.data.filter((item) => item.statusName.toLowerCase() === "aktif");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -258,6 +258,7 @@ export class DetailComponent {
|
||||||
this.deviceCategory = res.data[0];
|
this.deviceCategory = res.data[0];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
dataEnergyChartKwhWater(buildingId) {
|
dataEnergyChartKwhWater(buildingId) {
|
||||||
this.energyMonitoringService
|
this.energyMonitoringService
|
||||||
.getDashboardChartKwhWater(buildingId)
|
.getDashboardChartKwhWater(buildingId)
|
||||||
|
@ -276,6 +277,8 @@ export class DetailComponent {
|
||||||
|
|
||||||
// Populate Appointment data at every multiple of 7
|
// Populate Appointment data at every multiple of 7
|
||||||
let weekIndex = 0;
|
let weekIndex = 0;
|
||||||
|
console.log(this.barChartData[0].data);
|
||||||
|
|
||||||
for (let i = 0; i < this.barChartData[0].data.length; i++) {
|
for (let i = 0; i < this.barChartData[0].data.length; i++) {
|
||||||
if (i % 7 === 6 && weekIndex < weeklyKwh.length) {
|
if (i % 7 === 6 && weekIndex < weeklyKwh.length) {
|
||||||
this.barChartData[2].data[i] = weeklyKwh[weekIndex++];
|
this.barChartData[2].data[i] = weeklyKwh[weekIndex++];
|
||||||
|
|
Loading…
Reference in New Issue