-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PIM-1700: Verified Grain - Yield Summary Grid - Frontend
- Loading branch information
1 parent
707f524
commit 5a53960
Showing
12 changed files
with
206 additions
and
3 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
55 changes: 55 additions & 0 deletions
55
...src/app/components/verified-yield/summary-list/verified-yield-summary-list.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,55 @@ | ||
<div class="plcy-inv-cmdty-totals-header" | ||
style="grid-template-columns: 140px 100px 115px 115px 115px 115px 130px 125px 60px; padding-left: 10px;"> | ||
|
||
<div *ngIf="isUnsaved" class="table-header border-top border-left border-right" | ||
style="grid-column-start: 1; grid-column-end: 10;"> | ||
<span #el matTooltip="" style="margin-left:10px;"> | ||
<mat-icon | ||
[ngStyle]="{'color':'orangered', 'font-size':'large', 'padding-top': '4px'}">warning_amber</mat-icon> | ||
</span> | ||
<span style="color:orangered; font-size: 14px;"> | ||
Verified Yield Summary is calculated on save. | ||
</span> | ||
</div> | ||
|
||
<div class="table-header border-top border-left border-right" style="grid-column-start: 1; grid-column-end: 10; padding-top: 8px;"> | ||
Yield Summary | ||
</div> | ||
|
||
<div class="header border-top border-bottom border-right border-left"> | ||
Commodity | ||
</div> | ||
<div class="border-right header border-top border-bottom"> | ||
Insured Acres | ||
</div> | ||
<div class="border-right header border-top border-bottom"> | ||
Harvested Acres | ||
</div> | ||
<div class="border-right header border-top border-bottom"> | ||
Harvested Yield/Acre | ||
</div> | ||
<div class="header border-top border-bottom border-right"> | ||
Appraised Yield | ||
</div> | ||
<div class="header border-top border-bottom border-right"> | ||
Assessed Yield | ||
</div> | ||
<div class="header border-top border-bottom border-right"> | ||
Yield to Count | ||
</div> | ||
<div class="header border-top border-bottom border-right"> | ||
Yield % PY | ||
</div> | ||
|
||
<div class="header border-top border-bottom border-right"> | ||
Comments | ||
</div> | ||
|
||
<div class="grain-unsdd-inv-tot-cmdty-container" | ||
style="grid-template-columns: 140px 100px 115px 115px 115px 115px 130px 125px 60px; margin-left: 0px;"> | ||
<verified-yield-summary *ngFor="let summary of summaries" [summary]="summary" | ||
[summariesFormArray]="summariesFormArray" | ||
style="display: contents;"></verified-yield-summary> | ||
</div> | ||
|
||
</div> |
Empty file.
15 changes: 15 additions & 0 deletions
15
...r/src/app/components/verified-yield/summary-list/verified-yield-summary-list.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,15 @@ | ||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; | ||
import { UntypedFormArray } from '@angular/forms'; | ||
import { VerifiedYieldSummary } from 'src/app/conversion/models-yield'; | ||
|
||
@Component({ | ||
selector: 'verified-yield-summary-list', | ||
templateUrl: './verified-yield-summary-list.component.html', | ||
styleUrl: './verified-yield-summary-list.component.scss', | ||
changeDetection: ChangeDetectionStrategy.OnPush | ||
}) | ||
export class VerifiedYieldSummaryListComponent { | ||
@Input() summaries: Array<VerifiedYieldSummary> | ||
@Input() summariesFormArray: UntypedFormArray; | ||
@Input() isUnsaved: boolean; | ||
} |
45 changes: 45 additions & 0 deletions
45
...n/angular/src/app/components/verified-yield/summary/verified-yield-summary.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,45 @@ | ||
<div [formGroup]="summaryFormGroup" style="display: contents;"> | ||
<div class="readonly border-right border-bottom border-left" style="padding-left: 6px;"> | ||
{{ summaryFormGroup.value.cropCommodityName | titlecase }} | ||
<span *ngIf="summaryFormGroup.value.isPedigreeInd == true" > Pedigreed</span> | ||
</div> | ||
<div class="readonly border-right border-bottom center"> | ||
{{ summaryFormGroup.value.totalInsuredAcres | number: '1.0-1' }} | ||
</div> | ||
<div class="readonly border-right border-bottom center"> | ||
{{ summaryFormGroup.value.harvestedYield | number: '1.0-3' }} | ||
</div> | ||
|
||
<div class="inventory-fill number border-right border-bottom"> | ||
{{ summaryFormGroup.value.harvestedYieldPerAcre | number: '1.0-3' }} | ||
</div> | ||
|
||
<div class="readonly border-right border-bottom center"> | ||
{{ summaryFormGroup.value.appraisedYield | number: '1.0-3' }} | ||
</div> | ||
<div class="readonly border-right border-bottom center"> | ||
{{ summaryFormGroup.value.assessedYield | number: '1.0-3' }} | ||
</div> | ||
|
||
<div class="inventory-fill number border-right border-bottom"> | ||
{{ summaryFormGroup.value.yieldToCount | number: '1.0-3' }} | ||
</div> | ||
|
||
<div class="readonly border-right border-bottom center"> | ||
{{ summaryFormGroup.value.yieldPercentPy | number: '1.0-3' }} | ||
</div> | ||
|
||
<div class="readonly border-right border-bottom center"> | ||
<!-- TODO add comments button --> | ||
<!-- <uw-comments-button | ||
[underwritingCommentTypeCode]="'DOP'" | ||
[growerContractYearId]="dopYieldContract?.growerContractYearId" | ||
[declaredYieldContractGuid]="dopYieldContract?.declaredYieldContractGuid" | ||
[policyNumber]="growerContract?.policyNumber" | ||
[growerName]="growerContract?.growerName" | ||
[growerNumber]="growerContract?.growerNumber" | ||
[uwComments]="dopYieldContract?.uwComments" | ||
(onDone)="onDopCommentsDone($event)"></uw-comments-button> --> | ||
</div> | ||
|
||
</div> |
Empty file.
53 changes: 53 additions & 0 deletions
53
...ain/angular/src/app/components/verified-yield/summary/verified-yield-summary.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,53 @@ | ||
import { ChangeDetectionStrategy, Component, Input, SimpleChanges } from '@angular/core'; | ||
import { UntypedFormArray, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; | ||
import { Store } from '@ngrx/store'; | ||
import { VerifiedYieldSummary } from 'src/app/conversion/models-yield'; | ||
import { SecurityUtilService } from 'src/app/services/security-util.service'; | ||
import { RootState } from 'src/app/store'; | ||
|
||
@Component({ | ||
selector: 'verified-yield-summary', | ||
templateUrl: './verified-yield-summary.component.html', | ||
styleUrl: './verified-yield-summary.component.scss', | ||
changeDetection: ChangeDetectionStrategy.OnPush | ||
}) | ||
export class VerifiedYieldSummaryComponent { | ||
@Input() summary: VerifiedYieldSummary; | ||
@Input() summariesFormArray: UntypedFormArray; | ||
|
||
summaryFormGroup: UntypedFormGroup; | ||
|
||
constructor(private fb: UntypedFormBuilder, | ||
private store: Store<RootState>, | ||
public securityUtilService: SecurityUtilService, | ||
) { } | ||
|
||
ngOnChanges(changes: SimpleChanges) { | ||
if (changes.summary && this.summary) { | ||
this.setupForm() | ||
} | ||
} | ||
|
||
setupForm() { | ||
this.summaryFormGroup = this.fb.group({ | ||
verifiedYieldSummaryGuid: [this.summary.verifiedYieldSummaryGuid], | ||
verifiedYieldContractGuid: [this.summary.verifiedYieldContractGuid], | ||
cropCommodityId: [this.summary.cropCommodityId], | ||
isPedigreeInd: [this.summary.isPedigreeInd], | ||
// TODO: insuread acres is missing | ||
harvestedYield: [this.summary.harvestedYield], | ||
harvestedYieldPerAcre: [this.summary.harvestedYieldPerAcre], | ||
appraisedYield: [this.summary.appraisedYield], | ||
assessedYield: [this.summary.assessedYield], | ||
yieldToCount: [this.summary.yieldToCount], | ||
yieldPercentPy: [this.summary.yieldPercentPy], | ||
productionGuarantee: [this.summary.productionGuarantee], | ||
probableYield: [this.summary.probableYield], | ||
cropCommodityName: [this.summary.cropCommodityName], | ||
uwComments: [this.summary.uwComments] // Array<UnderwritingComment> | ||
}); | ||
this.summariesFormArray.push(this.summaryFormGroup); | ||
} | ||
|
||
|
||
} |
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
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
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