dev smartfarming #1

Merged
agrilink merged 53 commits from development into main 2024-12-30 05:53:19 +00:00
2 changed files with 39 additions and 10 deletions
Showing only changes of commit cc4f40b05e - Show all commits

View File

@ -147,18 +147,32 @@
<div *ngIf="!isLoaded && selectedButton === 'relay'">
<div *ngIf="relayStatus.length > 0; else noData">
<div class="card-container" *ngFor="let relay of relayStatus;">
<div class="card-parameter">
<div>
<h3 [ngClass]="relay.current_status ? 'status-on' : 'status-off'">
{{ relay.current_status ? 'ON' : 'OFF' }}
</h3>
<h6>Relay {{ relay.number }}</h6>
</div>
<div class="relay-container">
<div class="card-parameter relay-card" *ngFor="let relay of relayStatus;">
<div>
<h3 [ngClass]="relay.current_status ? 'status-on' : 'status-off'">
{{ relay.current_status ? 'ON' : 'OFF' }}
</h3>
<h6>
<ng-container *ngIf="relay.number === 1; else checkRelay">
Katup Nutrisi
</ng-container>
<ng-template #checkRelay>
<ng-container *ngIf="relay.number === 2; else defaultRelay">
Katup Air
</ng-container>
</ng-template>
<ng-template #defaultRelay>
Relay {{ relay.number }}
</ng-template>
</h6>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="graph">
<div class="title-graph">Monitoring Graphs</div>

View File

@ -60,6 +60,21 @@
margin-top: 22px;
}
.relay-container {
padding: 20px 0px 20px 0px;
display: flex;
flex-wrap: wrap;
gap: 30px;
justify-content: flex-start;
}
.relay-card {
border-radius: 8px;
flex: 1 1 30%;
max-width: 30%;
min-width: 200px;
}
@media (max-width: 768px) {
.card-parameter{
flex: 1 1 45%;