penambahan validasi filter cost management
This commit is contained in:
parent
8403bafcd1
commit
5913980330
|
@ -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,24 +355,22 @@ export class CostManagementComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
doFilter() {
|
doFilter() {
|
||||||
// const requestData = {
|
if (this.dateSelected) {
|
||||||
// building: this.buildingSelected,
|
this.spinnerFilterActive = true;
|
||||||
// category: this.categorySelected,
|
setTimeout(() => {
|
||||||
// date: this.dateSelected,
|
this.spinnerFilterActive = false;
|
||||||
// searchTerm: this.searchTerm,
|
this.fetchData(
|
||||||
// };
|
this.buildingSelected,
|
||||||
this.spinnerFilterActive = true;
|
this.dateSelected,
|
||||||
setTimeout(() => {
|
this.categorySelected
|
||||||
this.spinnerFilterActive = false;
|
);
|
||||||
this.fetchData(
|
}, 3000);
|
||||||
this.buildingSelected,
|
} else {
|
||||||
this.dateSelected,
|
this.toastr.error("Warning", "Format date tidak valid.", {
|
||||||
this.categorySelected
|
timeOut: 5000,
|
||||||
);
|
closeButton: true,
|
||||||
// this.dataCompWaterElectCost(this.buildingSelected);
|
});
|
||||||
// this.dataCompPrevMonthCost(this.buildingSelected);
|
}
|
||||||
// this.dataCompActEstCost(this.buildingSelected);
|
|
||||||
}, 3000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
addFieldValue() {
|
addFieldValue() {
|
||||||
|
|
Loading…
Reference in New Issue