perbaikan export cost management
This commit is contained in:
parent
3172ba70b2
commit
8403bafcd1
|
@ -13,7 +13,7 @@
|
|||
href="https://allbestsistem.com/"
|
||||
target="_blank"
|
||||
style="background-color: #000000 !important;"
|
||||
>Smart Building Management Systems (V@2024-07-4.01)
|
||||
>Smart Building Management Systems (V@2024-07-4.02)
|
||||
</a></span
|
||||
>
|
||||
</p>
|
||||
|
|
|
@ -95,14 +95,26 @@ export class CostManagementComponent implements OnInit {
|
|||
categoryName: item.category_name,
|
||||
estimationCost: item.estimation_cost,
|
||||
totalUse: item.total_use,
|
||||
endDate: item.end_date,
|
||||
endDate: this.convertToUTC7(item.end_date),
|
||||
// endDate: item.end_date,
|
||||
statusId: item.status_id,
|
||||
categoryId: item.category_id,
|
||||
roomId: item.room_id,
|
||||
}));
|
||||
console.log(this.data_cost);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
convertToUTC7(dateString: string): string {
|
||||
const date = new Date(dateString);
|
||||
const utc7Offset = 7 * 60; // UTC+7 in minutes
|
||||
const localOffset = date.getTimezoneOffset();
|
||||
const totalOffset = utc7Offset - localOffset;
|
||||
const utc7Date = new Date(date.getTime() + totalOffset * 60 * 1000);
|
||||
return utc7Date.toISOString();
|
||||
}
|
||||
|
||||
dataListMaster() {
|
||||
this.monitoringApiService.getMasterListData().subscribe((data) => {
|
||||
const dataCategory = data.data.find(
|
||||
|
@ -431,15 +443,15 @@ export class CostManagementComponent implements OnInit {
|
|||
this.spinnerExportActive = true;
|
||||
setTimeout(() => {
|
||||
const columnsToExport = [
|
||||
"name",
|
||||
"room_name",
|
||||
"category_name",
|
||||
"total_use",
|
||||
"estimation_cost",
|
||||
"end_date",
|
||||
"building",
|
||||
"roomName",
|
||||
"categoryName",
|
||||
"totalUse",
|
||||
"estimationCost",
|
||||
"endDate",
|
||||
];
|
||||
this.tableexcelService.exportAsExcelFileCostManage(
|
||||
this.filteredRows,
|
||||
this.data_cost,
|
||||
"Smart_building_cost_management",
|
||||
columnsToExport
|
||||
);
|
||||
|
|
|
@ -138,7 +138,7 @@
|
|||
<p
|
||||
class="card-subtitle line-on-side text-muted text-center font-small-3 mx-2 my-1"
|
||||
>
|
||||
<span>(v@2024.07.4.01)</span>
|
||||
<span>(v@2024.07.4.02)</span>
|
||||
</p>
|
||||
<!-- <div class="card-body">
|
||||
<a
|
||||
|
|
Loading…
Reference in New Issue