Skip to content

Commit

Permalink
Merge pull request #1357 from bcgov/develop
Browse files Browse the repository at this point in the history
Deployment PR - 891
  • Loading branch information
dhaselhan authored Feb 2, 2024
2 parents bb8bfc4 + 191f294 commit 677c5c1
Show file tree
Hide file tree
Showing 87 changed files with 1,470 additions and 384 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ <h3>Documents</h3>
<button
type="button"
[ngClass]="{ 'upload-button': true, 'error-field-outlined ng-invalid': showError }"
class=""
(click)="onUploadFile()"
mat-flat-button
color="primary"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,47 @@
<form [formGroup]="form">
<div class="grid">
<mat-form-field appearance="outline">
<mat-label>ALR Area Impacted (ha)</mat-label>
<input
matInput
min="0.01"
mask="separator.5"
thousandSeparator=","
separatorLimit="9999999999"
formControlName="alrArea"
required
/>
</mat-form-field>
<ng-container *ngIf="form">
<form [formGroup]="form">
<div class="grid">
<mat-form-field appearance="outline">
<mat-label>ALR Area Impacted (ha)</mat-label>
<input
matInput
min="0.01"
mask="separator.5"
thousandSeparator=","
separatorLimit="9999999999"
formControlName="alrArea"
required
/>
</mat-form-field>

<mat-form-field appearance="outline" class="date-picker">
<mat-label>Expiry Date</mat-label>
<input
matInput
(click)="expiryDatePicker.open()"
[matDatepicker]="expiryDatePicker"
formControlName="expiryDate"
name="date"
/>
<mat-datepicker-toggle matSuffix [for]="expiryDatePicker"></mat-datepicker-toggle>
<mat-datepicker #expiryDatePicker type="date"></mat-datepicker>
</mat-form-field>
<mat-form-field appearance="outline" class="date-picker">
<mat-label>Expiry Date</mat-label>
<input
matInput
(click)="expiryDatePicker.open()"
[matDatepicker]="expiryDatePicker"
formControlName="expiryDate"
name="date"
/>
<mat-datepicker-toggle matSuffix [for]="expiryDatePicker"></mat-datepicker-toggle>
<mat-datepicker #expiryDatePicker type="date"></mat-datepicker>
</mat-form-field>

<div class="full-width">
<mat-label class="toggle-label">Applicant Type*</mat-label>
<mat-button-toggle-group required id="isFirstNation" formControlName="applicantType" name="isFirstNation">
<mat-button-toggle value="Land Owner">Land Owner</mat-button-toggle>
<mat-button-toggle value="L/FNG Initiated">L/FNG Initiated</mat-button-toggle>
</mat-button-toggle-group>
<div class="full-width">
<mat-label class="toggle-label">Applicant Type*</mat-label>
<mat-button-toggle-group
required
id="isFirstNation"
formControlName="applicantType"
name="isFirstNation"
[ngClass]="{
'error-field-outlined': !form.controls['applicantType'].valid && form.controls['applicantType'].touched
}"
>
<mat-button-toggle value="Land Owner">Land Owner</mat-button-toggle>
<mat-button-toggle value="L/FNG Initiated">L/FNG Initiated</mat-button-toggle>
</mat-button-toggle-group>
</div>
</div>
</div>
</form>
</form>
</ng-container>
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import { FormGroup } from '@angular/forms';
styleUrls: ['./incl-excl-input.component.scss'],
})
export class InclExclInputComponent {
@Input() form!: FormGroup;
@Input() form?: FormGroup;
}
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
matInput
formControlName="areaToPlace"
/>
<span matTextSuffix>ha</span>
<span matTextSuffix>m<sup>2</sup></span>
</mat-form-field>
</div>
<div class="label">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
formControlName="areaToPlace"
placeholder="Area*"
/>
<span matTextSuffix>ha</span>
<span matTextSuffix>m<sup>2</sup></span>
</mat-form-field>

<mat-form-field appearance="outline">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ <h3>Components</h3>

<mat-menu xPosition="before" #decisionComponentMenu="matMenu">
<button
type="button"
*ngFor="let componentType of decisionComponentTypes"
mat-menu-item
(click)="onAddNewComponent(componentType.uiCode, componentType.code)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ <h3>Resolution</h3>
<div>
<app-decision-documents
(beforeDocumentUpload)="onSubmit(true, true)"
[showError]="form.touched && !existingDecision?.documents?.length"
[showError]="showErrors && !existingDecision?.documents?.length"
></app-decision-documents>
</div>

Expand All @@ -196,7 +196,7 @@ <h3>Resolution</h3>
[fileNumber]="fileNumber"
[components]="components"
(componentsChange)="onComponentChange($event)"
[showError]="form.touched && components.length < 1 && requireComponents"
[showError]="showErrors && components.length < 1 && requireComponents"
>
</app-decision-components>

Expand All @@ -207,7 +207,7 @@ <h3>Resolution</h3>
[components]="components"
[conditions]="conditions"
(conditionsChange)="onConditionsChange($event)"
[showError]="form.touched && conditionUpdates.length < 1 && showConditions"
[showError]="showErrors && conditionUpdates.length < 1 && showConditions"
></app-app-decision-conditions>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export class DecisionInputV2Component implements OnInit, OnDestroy {
showConditions = false;
conditionsValid = true;
componentsValid = true;
showErrors = false;
index = 1;

fileNumber: string = '';
Expand Down Expand Up @@ -521,6 +522,7 @@ export class DecisionInputV2Component implements OnInit, OnDestroy {

private runValidation() {
this.form.markAllAsTouched();
this.showErrors = true;
const requiresConditions = this.showConditions;
const requiresComponents = this.showComponents && this.requireComponents;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@ <h5>Payment</h5>
<div>
<div class="subheading2">Payment Date</div>
<app-inline-datepicker
[value]="application?.feePaidDate"
[value]="application.feePaidDate"
(save)="updateApplicationDate('feePaidDate', $event)"
></app-inline-datepicker>
</div>
<div>
<div class="subheading2">Payment Amount</div>
<app-inline-number
[value]="application?.feeAmount"
[value]="application.feeAmount"
(save)="updateApplicationNumber('feeAmount', $event)"
></app-inline-number>
</div>
<div>
<div class="subheading2">Split with L/FNG</div>
<app-inline-boolean
[selectedValue]="application?.feeSplitWithLg ?? null"
[selectedValue]="application.feeSplitWithLg ?? null"
(save)="updateApplicationBoolean('feeSplitWithLg', $event)"
></app-inline-boolean>
</div>
<div>
<div class="subheading2">Fee Waived</div>
<app-inline-boolean
[selectedValue]="application?.feeWaived ?? null"
[selectedValue]="application.feeWaived ?? null"
(save)="updateApplicationBoolean('feeWaived', $event)"
></app-inline-boolean>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ export class ParcelPrepComponent implements OnChanges {
const parcels = await this.parcelService.fetchParcels(fileNumber);
this.parcels = parcels.map((parcel) => ({
...parcel,
owners: `${parcel.owners[0].displayName} ${parcel.owners.length > 1 ? ' et al.' : ''}`,
owners:
parcel.owners.length !== 0
? `${parcel.owners[0].displayName} ${parcel.owners.length > 1 ? ' et al.' : ''}`
: 'No Owners',
fullOwners: parcel.owners.map((owner) => owner.displayName).join(', '),
hasManyOwners: parcel.owners.length > 1,
}));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h3>Application Prep</h3>
<section *ngIf="application && application.source !== APPLICATION_SYSTEM_SOURCE_TYPES.ALCS">
<h5>Proposal Components - {{ application?.type?.label }}</h5>
<h5>Proposal Components - {{ application.type.label }}</h5>
<div class="input-table">
<div>
<div class="subheading2">Proposal ALR Area Impacted (ha)</div>
Expand All @@ -10,29 +10,29 @@ <h5>Proposal Components - {{ application?.type?.label }}</h5>
<div class="subheading2">Agricultural Capability</div>
<app-inline-dropdown
[options]="agCapOptions"
[value]="application?.agCap"
[value]="application.agCap"
(save)="updateApplicationValue('agCap', $event)"
></app-inline-dropdown>
</div>
<div>
<div class="subheading2">Agricultural Capability Source</div>
<app-inline-dropdown
[options]="agCapSourceOptions"
[value]="application?.agCapSource"
[value]="application.agCapSource"
(save)="updateApplicationValue('agCapSource', $event)"
></app-inline-dropdown>
</div>
<div>
<div class="subheading2">Agricultural Capability Mapsheet Reference</div>
<app-inline-text
[value]="application?.agCapMap"
[value]="application.agCapMap"
(save)="updateApplicationValue('agCapMap', $event)"
></app-inline-text>
</div>
<div>
<div class="subheading2">Agricultural Capability Consultant</div>
<app-inline-text
[value]="application?.agCapConsultant"
[value]="application.agCapConsultant"
(save)="updateApplicationValue('agCapConsultant', $event)"
></app-inline-text>
</div>
Expand Down
12 changes: 8 additions & 4 deletions alcs-frontend/src/app/features/home/subtask/subtask.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class SubtaskComponent implements OnInit, OnDestroy {
constructor(
private homeService: HomeService,
private userService: UserService,
private authService: AuthenticationService
private authService: AuthenticationService,
) {}

ngOnInit(): void {
Expand Down Expand Up @@ -91,16 +91,20 @@ export class SubtaskComponent implements OnInit, OnDestroy {
];

if (this.showNoi) {
this.totalSubtaskCount = this.noticeOfIntentSubtasks.length;
this.totalSubtaskCount = this.noticeOfIntentSubtasks.length + this.notificationSubtasks.length;
}

if (this.showAppAndNonApp) {
this.totalSubtaskCount = this.applicationSubtasks.length + this.nonApplicationSubtasks.length;
this.totalSubtaskCount =
this.applicationSubtasks.length + this.nonApplicationSubtasks.length + this.notificationSubtasks.length;
}

if (this.showAppAndNonApp && this.showNoi) {
this.totalSubtaskCount =
this.applicationSubtasks.length + this.noticeOfIntentSubtasks.length + this.nonApplicationSubtasks.length;
this.applicationSubtasks.length +
this.noticeOfIntentSubtasks.length +
this.nonApplicationSubtasks.length +
this.notificationSubtasks.length;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@ <h4 [id]="parcel.uuid">Parcel #{{ parcelInd + 1 }}: Parcel and Owner Information
<app-no-data *ngIf="!parcel.mapAreaHectares"></app-no-data>
</div>
<div class="subheading2 grid-1">
PID {{ parcel.ownershipType?.code === PARCEL_OWNERSHIP_TYPES.CROWN ? '(optional)' : '' }}
PID {{ parcel.ownershipTypeCode === PARCEL_OWNERSHIP_TYPES.CROWN ? '(optional)' : '' }}
</div>
<div class="grid-double">
<span *ngIf="parcel.pid">{{ parcel.pid | mask : '000-000-000' }}</span>
<span *ngIf="parcel.pid">{{ parcel.pid | mask: '000-000-000' }}</span>
<app-no-data *ngIf="!parcel.pid"></app-no-data>
</div>
<ng-container *ngIf="parcel.ownershipTypeCode === PARCEL_OWNERSHIP_TYPES.CROWN">
<div class="subheading2 grid-1">PIN (optional)</div>
<div class="grid-double">
{{ parcel.pin }}
<app-no-data *ngIf="!parcel.pin"></app-no-data>
</div>
</ng-container>
<ng-container *ngIf="parcel.ownershipTypeCode === PARCEL_OWNERSHIP_TYPES.FEE_SIMPLE">
Expand All @@ -57,9 +58,9 @@ <h4 [id]="parcel.uuid">Parcel #{{ parcelInd + 1 }}: Parcel and Owner Information
<app-no-data *ngIf="!parcel.crownLandOwnerType"></app-no-data>
</div>
</ng-container>
<div *ngIf="showCertificateOfTitle" class="subheading2 grid-1">Certificate Of Title</div>
<div *ngIf="showCertificateOfTitle" class="grid-double">
<div *ngIf="parcel.certificateOfTitle">
<div *ngIf="parcel.certificateOfTitle" class="subheading2 grid-1">Certificate Of Title</div>
<div *ngIf="parcel.certificateOfTitle" class="grid-double">
<div>
<a (click)="onOpenFile(parcel.certificateOfTitle.documentUuid)">{{ parcel.certificateOfTitle.fileName }}</a>
</div>
</div>
Expand All @@ -69,14 +70,14 @@ <h4 [id]="parcel.uuid">Parcel #{{ parcelInd + 1 }}: Parcel and Owner Information
[ngClass]="{ 'crown-owner-information': parcel.ownershipTypeCode === PARCEL_OWNERSHIP_TYPES.CROWN }"
>
<div class="subheading2" *ngIf="parcel.ownershipTypeCode !== PARCEL_OWNERSHIP_TYPES.CROWN">Land Owner(s)</div>
<div class="subheading2" *ngIf="parcel.ownershipTypeCode === PARCEL_OWNERSHIP_TYPES.CROWN">Crown Contact(s)</div>
<div class="subheading2" *ngIf="parcel.ownershipTypeCode === PARCEL_OWNERSHIP_TYPES.CROWN">Crown Contact</div>
<div class="subheading2" *ngIf="parcel.ownershipTypeCode !== PARCEL_OWNERSHIP_TYPES.CROWN">Organization</div>
<div class="subheading2" *ngIf="parcel.ownershipTypeCode === PARCEL_OWNERSHIP_TYPES.CROWN">
Ministry/Department
</div>
<div class="subheading2">Phone</div>
<div class="subheading2">Email</div>
<div class="subheading2">Corporate Summary</div>
<div *ngIf="parcel.ownershipTypeCode !== PARCEL_OWNERSHIP_TYPES.CROWN" class="subheading2">Corporate Summary</div>
<ng-container *ngFor="let owner of parcel.owners">
<div>{{ owner.displayName }}</div>
<div>
Expand All @@ -85,7 +86,7 @@ <h4 [id]="parcel.uuid">Parcel #{{ parcelInd + 1 }}: Parcel and Owner Information
</div>
<div>{{ owner.phoneNumber }}</div>
<div>{{ owner.email }}</div>
<div>
<div *ngIf="parcel.ownershipTypeCode !== PARCEL_OWNERSHIP_TYPES.CROWN">
<a *ngIf="owner.corporateSummary" (click)="onOpenFile(owner.corporateSummary.uuid)">{{
owner.corporateSummary.fileName
}}</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import { Subject, takeUntil } from 'rxjs';
import { NoticeOfIntentDocumentDto } from '../../../../../services/notice-of-intent/noi-document/noi-document.dto';
import { NoiDocumentService } from '../../../../../services/notice-of-intent/noi-document/noi-document.service';
import { NoticeOfIntentParcelService } from '../../../../../services/notice-of-intent/notice-of-intent-parcel/notice-of-intent-parcel.service';
import { NoticeOfIntentSubmissionDto } from '../../../../../services/notice-of-intent/notice-of-intent.dto';
import {
NoticeOfIntentParcelDto,
NoticeOfIntentSubmissionDto,
} from '../../../../../services/notice-of-intent/notice-of-intent.dto';
import { PARCEL_OWNERSHIP_TYPE } from '../../../../../shared/dto/parcel-ownership.type.dto';

@Component({
Expand All @@ -18,19 +21,16 @@ export class ParcelComponent implements OnInit, OnChanges, OnDestroy, AfterConte
@Input() noticeOfIntent!: NoticeOfIntentSubmissionDto;
@Input() files: NoticeOfIntentDocumentDto[] = [];

pageTitle: string = 'Notice of Intent Parcels';
showCertificateOfTitle: boolean = true;

fileId: string = '';
parcels: any[] = [];
parcels: NoticeOfIntentParcelDto[] = [];

PARCEL_OWNERSHIP_TYPES = PARCEL_OWNERSHIP_TYPE;
private anchorededParcelUuid: string | undefined;

constructor(
private noiDocumentService: NoiDocumentService,
private parcelService: NoticeOfIntentParcelService,
private route: ActivatedRoute
private route: ActivatedRoute,
) {}

ngOnInit(): void {
Expand Down
Loading

0 comments on commit 677c5c1

Please sign in to comment.