perbaikan export cost management
This commit is contained in:
		
							parent
							
								
									ca30a991ae
								
							
						
					
					
						commit
						be071b75b1
					
				@ -110,7 +110,7 @@
 | 
			
		||||
        </ng-template>
 | 
			
		||||
        <ng-template let-value="value" ngx-datatable-cell-template>
 | 
			
		||||
          <p style="color: #ffffff !important">
 | 
			
		||||
            {{ value | date : "MM/yyyy" }}
 | 
			
		||||
            {{ value | date : "dd/MM/yyyy" }}
 | 
			
		||||
          </p>
 | 
			
		||||
        </ng-template>
 | 
			
		||||
      </ngx-datatable-column>
 | 
			
		||||
 | 
			
		||||
@ -18,6 +18,7 @@ export class ModalExportComponent {
 | 
			
		||||
  kwhTerm: string = "";
 | 
			
		||||
  costTerm: string = "";
 | 
			
		||||
  data_cost: any;
 | 
			
		||||
  dataExport: any;
 | 
			
		||||
  formattedEndDate: any;
 | 
			
		||||
  spinnerExportActive = false;
 | 
			
		||||
  constructor(
 | 
			
		||||
@ -39,6 +40,7 @@ export class ModalExportComponent {
 | 
			
		||||
    this.costService
 | 
			
		||||
      .getCostDetail(category, room, period)
 | 
			
		||||
      .subscribe((response) => {
 | 
			
		||||
        this.dataExport = response.data;
 | 
			
		||||
        this.data_cost = response.data.map((item) => ({
 | 
			
		||||
          deviceName: item.device_name,
 | 
			
		||||
          roomName: item.room_name,
 | 
			
		||||
@ -57,18 +59,18 @@ export class ModalExportComponent {
 | 
			
		||||
    this.spinnerExportActive = true;
 | 
			
		||||
    setTimeout(() => {
 | 
			
		||||
      const columnsToExport = [
 | 
			
		||||
        "deviceName",
 | 
			
		||||
        "roomName",
 | 
			
		||||
        "categoryName",
 | 
			
		||||
        "estimationCost",
 | 
			
		||||
        "totalKwh",
 | 
			
		||||
        "device_name",
 | 
			
		||||
        "room_name",
 | 
			
		||||
        "category_name",
 | 
			
		||||
        "estimation_cost",
 | 
			
		||||
        "total_kwh",
 | 
			
		||||
        "watt",
 | 
			
		||||
        "duration",
 | 
			
		||||
        "priceKwh",
 | 
			
		||||
        "price_kwh",
 | 
			
		||||
        "periode",
 | 
			
		||||
      ];
 | 
			
		||||
      this.tableexcelService.exportAsExcelFileManageDetail(
 | 
			
		||||
        this.data_cost,
 | 
			
		||||
        this.dataExport,
 | 
			
		||||
        "export_detail_cost_management",
 | 
			
		||||
        columnsToExport
 | 
			
		||||
      );
 | 
			
		||||
 | 
			
		||||
@ -13,7 +13,7 @@
 | 
			
		||||
                  <div class="media-body text-left">
 | 
			
		||||
                    <h5 style="color: #ffffff">Kwh Consumption</h5>
 | 
			
		||||
                    <h3 style="color: #ffffff">
 | 
			
		||||
                      {{ topCard?.kwh_consumption }} Kwh
 | 
			
		||||
                      {{ topCard?.kwh_consumption.toFixed(1) }} Kwh
 | 
			
		||||
                    </h3>
 | 
			
		||||
                  </div>
 | 
			
		||||
                  <div class="align-self-center">
 | 
			
		||||
@ -168,126 +168,6 @@
 | 
			
		||||
          </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="col-6" *ngFor="let item of deviceCategory?.usesd">
 | 
			
		||||
          <div
 | 
			
		||||
 | 
			
		||||
@ -33,7 +33,7 @@ export class DetailComponent {
 | 
			
		||||
  public barChartOptions: ChartOptions = {
 | 
			
		||||
    responsive: true,
 | 
			
		||||
    animation: {
 | 
			
		||||
      duration: 0 // Menonaktifkan animasi
 | 
			
		||||
      duration: 0 
 | 
			
		||||
    },
 | 
			
		||||
    scales: {
 | 
			
		||||
      x: {
 | 
			
		||||
@ -325,7 +325,6 @@ export class DetailComponent {
 | 
			
		||||
 | 
			
		||||
    return weeks;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  seeMore(paramsId){
 | 
			
		||||
    this.router.navigate(["/monitoring/control-device-see-more/", paramsId]);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user