-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
239 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
liquid-prep-app/src/app/components/watering-insigts/watering-insigts.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<app-header-title fxFlexFill> </app-header-title> | ||
<div> | ||
<div class="header-container"> | ||
<div class="header-title"> | ||
<h2>Southwest Field 1</h2> | ||
<span class="crop-name">Rice</span> | ||
</div> | ||
<div class="header-details"> | ||
<div> | ||
<span>Planted</span> | ||
<p>June 15, 2023</p> | ||
</div> | ||
<div> | ||
<span>Harvest in</span> | ||
<p>46 Days</p> | ||
</div> | ||
<div> | ||
<span>Growth Stage</span> | ||
<p>3</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="card-container"> | ||
<mat-card style="background-color: #edf5ff"> | ||
<mat-card-content> | ||
<div class="card-advice"> | ||
<div> | ||
<span class="card-title">WATERING ADVICE</span> | ||
<h2>Water Today</h2> | ||
<h3>15 GPM/acre</h3> | ||
<button mat-raised-button class="mark-button"> | ||
MARK AS WATERED | ||
</button> | ||
</div> | ||
<div> | ||
<img | ||
src="./../../../assets/moisture-water/littlewater_mediummoisture.png" | ||
class="water-image" | ||
/> | ||
</div> | ||
</div> | ||
</mat-card-content> | ||
</mat-card> | ||
<mat-card> | ||
<mat-card-content> | ||
<div class="soil-moisture-container"> | ||
<span class="card-title">CURRENT SOIL MOISTURE</span> | ||
<div>Mesurement</div> | ||
<div> | ||
<p>Last Measured: Sept 14, 2023, 8:00am CDT</p> | ||
<button mat-button class="view-logs">VIEW HISTORY</button> | ||
</div> | ||
</div> | ||
</mat-card-content> | ||
</mat-card> | ||
<mat-card> | ||
<mat-card-content> | ||
<div class="history-container"> | ||
<div> | ||
<span class="card-title">LAST WATERED</span> | ||
<h2>Sept 10, 2023</h2> | ||
</div> | ||
<button mat-button class="view-history">VIEW HISTORY</button> | ||
</div> | ||
</mat-card-content> | ||
</mat-card> | ||
</div> | ||
</div> |
95 changes: 95 additions & 0 deletions
95
liquid-prep-app/src/app/components/watering-insigts/watering-insigts.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
.header-container { | ||
display: flex; | ||
flex-wrap: wrap; | ||
color: white; | ||
width: auto; | ||
height: 140px; | ||
background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), | ||
url("../../../assets/crops-images/cotton-harvest-rect.png"); | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
|
||
.header-title { | ||
margin-top: 10px; | ||
margin-left: 15px; | ||
width: 100%; | ||
|
||
h2 { | ||
padding: 0px; | ||
margin: 0px; | ||
font-size: medium; | ||
font-weight: 500; | ||
letter-spacing: 1px; | ||
} | ||
|
||
.crop-name { | ||
font-size: 20px; | ||
font-weight: 550; | ||
} | ||
} | ||
|
||
.header-details { | ||
opacity: 0.8; | ||
display: grid; | ||
margin-left: 15px; | ||
grid-template-columns: 130px 100px 100px; | ||
} | ||
} | ||
|
||
.card-container { | ||
margin: 15px; | ||
|
||
.card-title { | ||
letter-spacing: 1px; | ||
color: gray; | ||
font-size: 10px; | ||
} | ||
|
||
.card-advice { | ||
display: grid; | ||
grid-template-columns: 180px 120px; | ||
|
||
.mark-button { | ||
color: white; | ||
letter-spacing: 2px; | ||
font-size: smaller; | ||
background-color: #2f4ff3; | ||
} | ||
|
||
h2 { | ||
padding: 0px; | ||
margin: 0px; | ||
font-size: 23px; | ||
font-weight: bold; | ||
} | ||
} | ||
|
||
.soil-moisture-container { | ||
.view-logs { | ||
font-weight: bold; | ||
letter-spacing: 1px; | ||
color: #2f4ff3; | ||
} | ||
} | ||
|
||
.history-container { | ||
display: grid; | ||
grid-template-columns: 150px 150px; | ||
|
||
.view-history { | ||
font-weight: bold; | ||
letter-spacing: 1px; | ||
color: #2f4ff3; | ||
} | ||
} | ||
|
||
.water-image { | ||
width: 120px; | ||
height: 100px; | ||
margin-top: 10px; | ||
} | ||
|
||
mat-card { | ||
margin-bottom: 15px; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
liquid-prep-app/src/app/components/watering-insigts/watering-insigts.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { WateringInsigtsComponent } from './watering-insigts.component'; | ||
|
||
describe('WateringInsigtsComponent', () => { | ||
let component: WateringInsigtsComponent; | ||
let fixture: ComponentFixture<WateringInsigtsComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ WateringInsigtsComponent ] | ||
}) | ||
.compileComponents(); | ||
}); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(WateringInsigtsComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
25 changes: 25 additions & 0 deletions
25
liquid-prep-app/src/app/components/watering-insigts/watering-insigts.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { HeaderService } from 'src/app/service/header.service'; | ||
import { HeaderConfig } from 'src/app/models/HeaderConfig.interface'; | ||
import { Router } from '@angular/router'; | ||
|
||
@Component({ | ||
selector: 'app-watering-insigts', | ||
templateUrl: './watering-insigts.component.html', | ||
styleUrls: ['./watering-insigts.component.scss'], | ||
}) | ||
export class WateringInsigtsComponent implements OnInit { | ||
headerConfig: HeaderConfig = { | ||
headerTitle: 'Watering Insights', | ||
leftIconName: 'arrow_back', | ||
rightIconName: 'cached', | ||
leftBtnClick: null, | ||
rightBtnClick: null, | ||
}; | ||
|
||
constructor(private headerService: HeaderService, private router: Router) {} | ||
|
||
ngOnInit(): void { | ||
this.headerService.updateHeader(this.headerConfig); | ||
} | ||
} |