Skip to content

Commit

Permalink
NRPT-288: Fixed issues with agency not appearing. (#546)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Truong authored Aug 13, 2020
1 parent 43247af commit 28d440d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<div class="label-pair">
<label for="recordAgency">Agency <span class="red-asterisk">*</span></label>
<select name="recordAgency" id="recordAgency" formControlName="recordAgency" class="form-control">
<option *ngFor="let recordAgency of recordAgencies" [ngValue]="recordAgency">
{{ recordAgency }}
<option *ngFor="let agency of recordAgencies" [ngValue]="agency">
{{ agency }}
</option>
</select>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,14 @@ export class MinesCollectionsRecordAddComponent implements OnInit, OnDestroy {
record['recordName'] = this.myForm.get('recordName').value;
this.myForm.controls.dateIssued.dirty &&
(record['dateIssued'] = this.utils.convertFormGroupNGBDateToJSDate(this.myForm.get('dateIssued').value));
record['recordAgency'] = this.myForm.get('recordAgency').value;
if (
this.myForm.get('recordType').value === 'ManagementPlan' ||
this.myForm.get('recordType').value === 'ConstructionPlan'
) {
record['agency'] = this.myForm.get('recordAgency').value;
} else {
record['issuingAgency'] = this.myForm.get('recordAgency').value;
}

if (this.myForm.get('recordType').value === 'PermitAmendment') {
record['recordType'] = 'Permit';
Expand Down

0 comments on commit 28d440d

Please sign in to comment.