perbaikan export cost management
This commit is contained in:
parent
ca30a991ae
commit
be071b75b1
|
@ -110,7 +110,7 @@
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template let-value="value" ngx-datatable-cell-template>
|
<ng-template let-value="value" ngx-datatable-cell-template>
|
||||||
<p style="color: #ffffff !important">
|
<p style="color: #ffffff !important">
|
||||||
{{ value | date : "MM/yyyy" }}
|
{{ value | date : "dd/MM/yyyy" }}
|
||||||
</p>
|
</p>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ngx-datatable-column>
|
</ngx-datatable-column>
|
||||||
|
|
|
@ -18,6 +18,7 @@ export class ModalExportComponent {
|
||||||
kwhTerm: string = "";
|
kwhTerm: string = "";
|
||||||
costTerm: string = "";
|
costTerm: string = "";
|
||||||
data_cost: any;
|
data_cost: any;
|
||||||
|
dataExport: any;
|
||||||
formattedEndDate: any;
|
formattedEndDate: any;
|
||||||
spinnerExportActive = false;
|
spinnerExportActive = false;
|
||||||
constructor(
|
constructor(
|
||||||
|
@ -39,6 +40,7 @@ export class ModalExportComponent {
|
||||||
this.costService
|
this.costService
|
||||||
.getCostDetail(category, room, period)
|
.getCostDetail(category, room, period)
|
||||||
.subscribe((response) => {
|
.subscribe((response) => {
|
||||||
|
this.dataExport = response.data;
|
||||||
this.data_cost = response.data.map((item) => ({
|
this.data_cost = response.data.map((item) => ({
|
||||||
deviceName: item.device_name,
|
deviceName: item.device_name,
|
||||||
roomName: item.room_name,
|
roomName: item.room_name,
|
||||||
|
@ -57,18 +59,18 @@ export class ModalExportComponent {
|
||||||
this.spinnerExportActive = true;
|
this.spinnerExportActive = true;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const columnsToExport = [
|
const columnsToExport = [
|
||||||
"deviceName",
|
"device_name",
|
||||||
"roomName",
|
"room_name",
|
||||||
"categoryName",
|
"category_name",
|
||||||
"estimationCost",
|
"estimation_cost",
|
||||||
"totalKwh",
|
"total_kwh",
|
||||||
"watt",
|
"watt",
|
||||||
"duration",
|
"duration",
|
||||||
"priceKwh",
|
"price_kwh",
|
||||||
"periode",
|
"periode",
|
||||||
];
|
];
|
||||||
this.tableexcelService.exportAsExcelFileManageDetail(
|
this.tableexcelService.exportAsExcelFileManageDetail(
|
||||||
this.data_cost,
|
this.dataExport,
|
||||||
"export_detail_cost_management",
|
"export_detail_cost_management",
|
||||||
columnsToExport
|
columnsToExport
|
||||||
);
|
);
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<div class="media-body text-left">
|
<div class="media-body text-left">
|
||||||
<h5 style="color: #ffffff">Kwh Consumption</h5>
|
<h5 style="color: #ffffff">Kwh Consumption</h5>
|
||||||
<h3 style="color: #ffffff">
|
<h3 style="color: #ffffff">
|
||||||
{{ topCard?.kwh_consumption }} Kwh
|
{{ topCard?.kwh_consumption.toFixed(1) }} Kwh
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="align-self-center">
|
<div class="align-self-center">
|
||||||
|
@ -168,126 +168,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="row">
|
|
||||||
<div class="col-4">
|
|
||||||
<div class="card" style="background-color: #252525 !important">
|
|
||||||
<div
|
|
||||||
class="card-header"
|
|
||||||
style="background-color: #252525 !important"
|
|
||||||
>
|
|
||||||
<h4 class="card-title text-center" style="color: #ffffff">
|
|
||||||
Summary Cost
|
|
||||||
</h4>
|
|
||||||
<hr
|
|
||||||
style="
|
|
||||||
border-top: 4px solid #ffffff;
|
|
||||||
border-color: #ffffff !important;
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<div class="card-block">
|
|
||||||
<div class="text-center" style="height: 150px !important">
|
|
||||||
<h2 class="font-large-3 text-bold-400" style="color: #ffffff">
|
|
||||||
{{
|
|
||||||
summaryCost?.summary_cost
|
|
||||||
| currency : "Rp " : "symbol" : "1.0-0"
|
|
||||||
}}
|
|
||||||
</h2>
|
|
||||||
<p
|
|
||||||
class="blue-grey lighten-2 mb-0 mt-2"
|
|
||||||
style="color: #ffffff !important"
|
|
||||||
>
|
|
||||||
Based on the estimated costs you have
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-4">
|
|
||||||
<div class="card" style="background-color: #252525 !important">
|
|
||||||
<div
|
|
||||||
class="card-header"
|
|
||||||
style="background-color: #252525 !important"
|
|
||||||
>
|
|
||||||
<h4 class="card-title text-center" style="color: #ffffff">
|
|
||||||
Air Quality
|
|
||||||
</h4>
|
|
||||||
<hr
|
|
||||||
style="
|
|
||||||
border-top: 4px solid #ffffff;
|
|
||||||
border-color: #ffffff !important;
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<div class="card-block">
|
|
||||||
<div class="donut-chart1" style="height: 150px !important">
|
|
||||||
<x-chartist
|
|
||||||
*ngIf="donutChart1"
|
|
||||||
[data]="donutChart1.data"
|
|
||||||
[type]="donutChart1.type"
|
|
||||||
[options]="donutChart1.options"
|
|
||||||
[responsiveOptions]="donutChart1.responsiveOptions"
|
|
||||||
[events]="donutChart1.events"
|
|
||||||
>
|
|
||||||
</x-chartist>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="text-center"
|
|
||||||
style="
|
|
||||||
position: absolute;
|
|
||||||
top: 80%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<h3
|
|
||||||
class="display-4 blue-grey darken-1"
|
|
||||||
style="font-size: 2em; color: #ffffff !important"
|
|
||||||
>
|
|
||||||
{{ airQuality }}
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-4">
|
|
||||||
<div class="card" style="background-color: #252525 !important">
|
|
||||||
<div
|
|
||||||
class="card-header"
|
|
||||||
style="background-color: #252525 !important"
|
|
||||||
>
|
|
||||||
<h4 class="card-title text-center" style="color: #ffffff">
|
|
||||||
Temperature and Humidity
|
|
||||||
</h4>
|
|
||||||
<hr
|
|
||||||
style="
|
|
||||||
border-top: 4px solid #ffffff;
|
|
||||||
border-color: #ffffff !important;
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<div class="card-block">
|
|
||||||
<div class="donut-chart2" style="height: 150px !important">
|
|
||||||
<x-chartist
|
|
||||||
*ngIf="donutChart2"
|
|
||||||
[data]="donutChart2.data"
|
|
||||||
[type]="donutChart2.type"
|
|
||||||
[options]="donutChart2.options"
|
|
||||||
[responsiveOptions]="donutChart2.responsiveOptions"
|
|
||||||
[events]="donutChart2.events"
|
|
||||||
>
|
|
||||||
</x-chartist>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6" *ngFor="let item of deviceCategory?.usesd">
|
<div class="col-6" *ngFor="let item of deviceCategory?.usesd">
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -33,7 +33,7 @@ export class DetailComponent {
|
||||||
public barChartOptions: ChartOptions = {
|
public barChartOptions: ChartOptions = {
|
||||||
responsive: true,
|
responsive: true,
|
||||||
animation: {
|
animation: {
|
||||||
duration: 0 // Menonaktifkan animasi
|
duration: 0
|
||||||
},
|
},
|
||||||
scales: {
|
scales: {
|
||||||
x: {
|
x: {
|
||||||
|
@ -325,7 +325,6 @@ export class DetailComponent {
|
||||||
|
|
||||||
return weeks;
|
return weeks;
|
||||||
}
|
}
|
||||||
|
|
||||||
seeMore(paramsId){
|
seeMore(paramsId){
|
||||||
this.router.navigate(["/monitoring/control-device-see-more/", paramsId]);
|
this.router.navigate(["/monitoring/control-device-see-more/", paramsId]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue