penambahan validasi filter cost management

This commit is contained in:
Fuzi_fauzia 2024-07-04 10:41:30 +07:00
parent 8403bafcd1
commit 5913980330
1 changed files with 19 additions and 20 deletions

View File

@ -6,6 +6,7 @@ import { ModalAddActualComponent } from "./modal-add-actual/modal-add-actual.com
import "chartist-plugin-tooltips"; import "chartist-plugin-tooltips";
import { ModalExportComponent } from "./modal-export/modal-export.component"; import { ModalExportComponent } from "./modal-export/modal-export.component";
import { TableexcelService } from "src/app/_services/tableexcel.service"; import { TableexcelService } from "src/app/_services/tableexcel.service";
import { ToastrService } from "ngx-toastr";
@Component({ @Component({
selector: "app-cost-management", selector: "app-cost-management",
@ -46,7 +47,8 @@ export class CostManagementComponent implements OnInit {
private monitoringApiService: BuildingService, private monitoringApiService: BuildingService,
private costService: CostManagementService, private costService: CostManagementService,
private modalService: NgbModal, private modalService: NgbModal,
private tableexcelService: TableexcelService private tableexcelService: TableexcelService,
private toastr: ToastrService,
) {} ) {}
ngOnInit() { ngOnInit() {
@ -102,7 +104,6 @@ export class CostManagementComponent implements OnInit {
roomId: item.room_id, roomId: item.room_id,
})); }));
console.log(this.data_cost); console.log(this.data_cost);
}); });
} }
@ -354,12 +355,7 @@ export class CostManagementComponent implements OnInit {
} }
doFilter() { doFilter() {
// const requestData = { if (this.dateSelected) {
// building: this.buildingSelected,
// category: this.categorySelected,
// date: this.dateSelected,
// searchTerm: this.searchTerm,
// };
this.spinnerFilterActive = true; this.spinnerFilterActive = true;
setTimeout(() => { setTimeout(() => {
this.spinnerFilterActive = false; this.spinnerFilterActive = false;
@ -368,10 +364,13 @@ export class CostManagementComponent implements OnInit {
this.dateSelected, this.dateSelected,
this.categorySelected this.categorySelected
); );
// this.dataCompWaterElectCost(this.buildingSelected);
// this.dataCompPrevMonthCost(this.buildingSelected);
// this.dataCompActEstCost(this.buildingSelected);
}, 3000); }, 3000);
} else {
this.toastr.error("Warning", "Format date tidak valid.", {
timeOut: 5000,
closeButton: true,
});
}
} }
addFieldValue() { addFieldValue() {