integrasi cost management
This commit is contained in:
@@ -94,7 +94,7 @@
|
||||
[items]="singleSelectArray"
|
||||
[searchable]="true"
|
||||
bindLabel="item_text"
|
||||
placeholder="Select Month"
|
||||
placeholder="Select Type"
|
||||
[(ngModel)]="singlebasicSelected"
|
||||
>
|
||||
</ng-select>
|
||||
|
||||
@@ -67,16 +67,14 @@ export class DeviceComponent implements OnInit {
|
||||
console.log(this.filteredRows);
|
||||
this.totalOn = this.filteredRows.filter((row) => row.statusEntity.name.toLowerCase() === 'aktif').length
|
||||
this.totalOff = this.filteredRows.filter((row) => row.statusEntity.name.toLowerCase() === 'nonaktif').length
|
||||
// console.log(totalon);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
filterRows() {
|
||||
if (!this.searchTerm) {
|
||||
this.filteredRows = [...this.data.rows];
|
||||
this.filteredRows = [...this.data.results.data];
|
||||
} else {
|
||||
this.filteredRows = this.data.rows.filter((row) =>
|
||||
this.filteredRows = this.data.results.data.filter((row) =>
|
||||
this.rowContainsSearchTerm(row)
|
||||
);
|
||||
}
|
||||
@@ -135,14 +133,10 @@ export class DeviceComponent implements OnInit {
|
||||
this.monitoringApiService.getSyncDeviceData().subscribe((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
|
||||
// Lakukan proses tambahan (misalnya, panggil API atau proses yang memakan waktu)
|
||||
|
||||
setTimeout(() => {
|
||||
// Selesaikan proses tambahan di sini
|
||||
|
||||
// Nonaktifkan spinner setelah proses selesai
|
||||
this.spinnerActive = false;
|
||||
this.fetchData();
|
||||
}, 3000); // Ganti 3000 dengan waktu yang sesuai dengan proses tambahan Anda (dalam milidetik)
|
||||
}, 3000);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user