fix(dashboard+graph): fix dropdown in sesnor npk
This commit is contained in:
parent
a5318426f4
commit
703c522927
|
|
@ -5,7 +5,7 @@
|
|||
</div>
|
||||
|
||||
<div>
|
||||
<button [ngClass]="{'active-button': selectedButton === 'dht'}" (click)="selectSensor('dht')">BHT</button>
|
||||
<button [ngClass]="{'active-button': selectedButton === 'dht'}" (click)="selectSensor('dht')">DHT</button>
|
||||
<button [ngClass]="{'active-button': selectedButton === 'npk1'}" (click)="selectSensor('npk1')">NPK 1</button>
|
||||
<button [ngClass]="{'active-button': selectedButton === 'npk2'}" (click)="selectSensor('npk2')">NPK 2</button>
|
||||
<button [ngClass]="{'active-button': selectedButton === 'relay'}" (click)="selectSensor('relay')">Relay</button>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
</mat-form-field>
|
||||
</div>
|
||||
<div class="sensor-wrapper">
|
||||
<div class="title">Sensor BHT</div>
|
||||
<div class="title">Sensor DHT</div>
|
||||
<ng-container *ngIf="isLoadingDHT; else dhtData">
|
||||
<div class="d-flex align-items-center" style="padding: 50px 0px 50px 0px">
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
|
|
@ -34,7 +34,10 @@
|
|||
<div class="title">Sensor NPK 1</div>
|
||||
<select class="form-select" style="margin-top: 10px" [(ngModel)]="selectedNPK1" (change)="onResize()">
|
||||
<option value="npk">NPK</option>
|
||||
<option value="others">Lainnya</option>
|
||||
<option value="temperature">Temperatur Tanah</option>
|
||||
<option value="humidity">Kelembaban Tanah</option>
|
||||
<option value="ph">PH Tanah</option>
|
||||
<option value="conductivity">Conductivity</option>
|
||||
</select>
|
||||
</div>
|
||||
<ng-container *ngIf="isLoadingNPK1; else npk1Data">
|
||||
|
|
@ -53,7 +56,10 @@
|
|||
<div class="title">Sensor NPK 2</div>
|
||||
<select class="form-select" style="margin-top: 10px" [(ngModel)]="selectedNPK2" (change)=" onResize()">
|
||||
<option value="npk">NPK</option>
|
||||
<option value="others">Lainnya</option>
|
||||
<option value="temperature">Temperatur Tanah</option>
|
||||
<option value="humidity">Kelembaban Tanah</option>
|
||||
<option value="ph">PH Tanah</option>
|
||||
<option value="conductivity">Conductivity</option>
|
||||
</select>
|
||||
</div>
|
||||
<ng-container *ngIf="isLoadingNPK2; else npk2Data">
|
||||
|
|
|
|||
|
|
@ -347,6 +347,14 @@ export class GraphComponent implements OnInit, AfterViewInit, OnDestroy, OnChang
|
|||
return ['soilphosphorus', 'soilnitrogen', 'soilpotassium'].includes(parameter);
|
||||
} else if (selectedOption === 'others') {
|
||||
return !['soilphosphorus', 'soilnitrogen', 'soilpotassium'].includes(parameter);
|
||||
} else if (selectedOption === 'temperature') {
|
||||
return ['soiltemperature'].includes(parameter);
|
||||
} else if (selectedOption === 'humidity') {
|
||||
return ['soilhumidity'].includes(parameter);
|
||||
} else if (selectedOption === 'conductivity') {
|
||||
return ['soilconductivity'].includes(parameter);
|
||||
} else if (selectedOption === 'ph') {
|
||||
return ['soilph'].includes(parameter);
|
||||
}
|
||||
return true;
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user