Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment PR - 1300 #1854

Open
wants to merge 49 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
cc65ad1
Make L/FNG return comment required
trslater Sep 11, 2024
47ad226
Fix multiple files showing in one line in public search view
Abradat Sep 11, 2024
3d7681d
Fix tiny font on comment input
trslater Sep 11, 2024
2efa1b4
Merge pull request #1845 from bcgov/bugfix/ALCS-2177
Abradat Sep 12, 2024
206c62a
Merge pull request #1851 from bcgov/feature/ALCS-2160
trslater Sep 12, 2024
7fb6bb7
Update NARU description
trslater Sep 12, 2024
d869e5e
Merge pull request #1853 from bcgov/backport/2024-09-11
Abradat Sep 12, 2024
cab75c1
Merge pull request #1855 from bcgov/feature/ALCS-1103
trslater Sep 12, 2024
a0352c1
Fix incorrect NARU text
trslater Sep 12, 2024
e9c32b7
Merge pull request #1856 from bcgov/feature/ALCS-1103-fix
trslater Sep 12, 2024
6c7d533
Remove NARU subtype selection
trslater Sep 12, 2024
92685a8
Remove NARU subtype from view/submit
trslater Sep 12, 2024
ea8624c
Remove NARU subtype from PDF
trslater Sep 12, 2024
889d2ed
Remove NARU subtype from public search
trslater Sep 12, 2024
8dfdca3
Remove NARU subtype from ALCS applicant info
trslater Sep 12, 2024
96c1ddc
Remove NARU subtype from ALCS app prep
trslater Sep 12, 2024
08df426
Remove NARU subtype from decisions
trslater Sep 12, 2024
ee9af5c
Remove, relabel, reorder questions in portal
trslater Sep 13, 2024
164201f
Remove, relabel, reorder fields in NARU PDF
trslater Sep 13, 2024
a84170d
Remove, relabel, reorder ALCS app info NARU fields
trslater Sep 13, 2024
ba35a56
Add new NARU fields to DB
trslater Sep 14, 2024
e77997f
Add new NARU fields to all services, components, and PDF
trslater Sep 16, 2024
e38539d
Add back residence necessity questions
trslater Sep 17, 2024
8b89ed5
Add building plans to portal, ALCS
trslater Sep 17, 2024
0065b34
Fix upload spacing
trslater Sep 23, 2024
adc557f
Add building plans to public search
trslater Sep 23, 2024
304e96d
Remove unused confirmation dialog
trslater Sep 23, 2024
31beb50
Add missing question mark
trslater Sep 23, 2024
fe5386c
Add existing residence base to portal proposal
Abradat Sep 24, 2024
aaed141
Update existing residence on proposal step
Abradat Sep 24, 2024
7ff9998
Add building plans to PDF
trslater Sep 24, 2024
ca95a12
Change ExistingResidence DTO
Abradat Sep 24, 2024
56fbd64
Make building plans available to PDF template
trslater Sep 24, 2024
4410e5a
Add necessity questions back to PDF template
trslater Sep 24, 2024
4a1c0d6
Add confirmation dialogs for the first 4 yes/no questions
trslater Sep 24, 2024
1ec99df
Add NARU existing residences column to application submission
Abradat Sep 24, 2024
c9964b7
Add remove action to NARU existing residence table
Abradat Sep 24, 2024
8e4aa10
Add truncate to NARU existing residences description
Abradat Sep 24, 2024
0e07918
Fix failing tests
trslater Sep 24, 2024
0b73848
Merge pull request #1866 from bcgov/feature/ALCS-994-and-2161
trslater Sep 25, 2024
a31f35f
Add mobile design for NARU existing residences
Abradat Sep 25, 2024
09ee000
Add NARU existing residences to public view
Abradat Sep 25, 2024
8b569dc
Add NARU existing residence to ALCS Application Info
Abradat Sep 25, 2024
12dd73a
Convert NARU subtypes to question answers
trslater Sep 25, 2024
ef7ab8f
Add NARU existing residence to portal PDF
Abradat Sep 26, 2024
37395c2
Merge pull request #1867 from bcgov/feature/ALCS-2188
trslater Sep 26, 2024
87c13a7
Merge branch 'develop' into feature/ALCS-2148
Abradat Sep 26, 2024
70a0bce
Merge pull request #1868 from bcgov/feature/ALCS-2148
Abradat Sep 26, 2024
23bb643
Merge pull request #1863 from bcgov/backport/2024-09-19
Abradat Sep 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ describe('ApplicationDetailsComponent', () => {
status: {} as ApplicationStatus,
type: '',
uuid: '',
naruWillBeOverFiveHundredM2: null,
naruWillRetainResidence: null,
naruWillHaveAdditionalResidence: null,
naruWillHaveTemporaryForeignWorkerHousing: null,
naruClustered: null,
naruSetback: null,
naruExistingStructures: null,
naruFillOrigin: null,
naruFillType: null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,105 +1,100 @@
<div *ngIf="_applicationSubmission" class="review-table">
<div class="subheading2 grid-1">Selected Subtype:</div>
<div class="subheading2 grid-1">
Is your proposal for a principal residence with a total floor area greater than 500 m<sup>2</sup>
</div>
<div class="grid-double">
{{ _applicationSubmission.naruWillBeOverFiveHundredM2 ? 'Yes' : 'No' }}
</div>

<div class="subheading2 grid-1">Is your proposal to retain an existing residence while building a new residence?</div>
<div class="grid-double">
{{ _applicationSubmission.naruWillRetainResidence ? 'Yes' : 'No' }}
</div>

<div class="subheading2 grid-1">Is your proposal for an additional residence?</div>
<div class="grid-double">
{{ _applicationSubmission.naruWillHaveAdditionalResidence ? 'Yes' : 'No' }}
</div>

<div class="subheading2 grid-1">Is your proposal for temporary foreign worker housing?</div>
<div class="grid-double">
{{ _applicationSubmission.naruWillHaveTemporaryForeignWorkerHousing ? 'Yes' : 'No' }}
</div>

<div class="subheading2 grid-1">
Do you need to import any fill to construct or conduct the proposed non-adhering residential use?
</div>
<div class="grid-double">
{{ _applicationSubmission.naruSubtype?.label }}
{{ _applicationSubmission.naruWillImportFill ? 'Yes' : 'No' }}
</div>

<div class="subheading2 grid-1">What is the purpose of the proposal?</div>
<div class="grid-double">
{{ _applicationSubmission.purpose }}
</div>
<ng-container *ngIf="_applicationSubmission.naruSubtype?.code === 'ARFU'">
<div class="subheading2 grid-1">
What is the total floor area (m<sup>2</sup>) of the proposed additional residence?
</div>
<div class="grid-double">
{{ _applicationSubmission.naruFloorArea }} <span *ngIf="_applicationSubmission.naruFloorArea">m<sup>2</sup></span>
</div>
<div class="subheading2 grid-1">
Describe the necessity for an additional residence for farm use and how it will support agriculture in the short
or long term.
</div>
<div class="grid-double">
{{ _applicationSubmission.naruResidenceNecessity }}
</div>
<div class="subheading2 grid-1">Describe the rationale for the proposed location of the additional residence.</div>
<div class="grid-double">
{{ _applicationSubmission.naruLocationRationale }}
</div>
<div class="subheading2 grid-1">
Provide the total area (m<sup>2</sup>) and a description of infrastructure necessary to support the additional
residence.
</div>
<div class="grid-double">
{{ _applicationSubmission.naruInfrastructure }}
</div>
</ng-container>
<ng-container *ngIf="_applicationSubmission.naruSubtype?.code === 'PRIN'">
<div class="subheading2 grid-1">
What is the total floor area (m<sup>2</sup>) of the proposed principal residence?
</div>
<div class="grid-double">
{{ _applicationSubmission.naruFloorArea }} <span *ngIf="_applicationSubmission.naruFloorArea">m<sup>2</sup></span>
</div>
<div class="subheading2 grid-1">
Describe how the proposal for a principal residence more than 500 m<sup>2</sup> will support agriculture in the
short or long term.
</div>
<div class="grid-double">
{{ _applicationSubmission.naruResidenceNecessity }}
</div>
<div class="subheading2 grid-1">Describe the rationale for the proposed location of the principal residence.</div>
<div class="grid-double">
{{ _applicationSubmission.naruLocationRationale }}
</div>
<div class="subheading2 grid-1">
Provide the total area (m<sup>2</sup>) and a description of infrastructure necessary to support the principal
residence.
</div>
<div class="grid-double">
{{ _applicationSubmission.naruInfrastructure }}
</div>
</ng-container>

<ng-container *ngIf="_applicationSubmission.naruSubtype?.code === 'TOUR'">
<div class="subheading2 grid-1">What is the total floor area (m<sup>2</sup>) of the proposed accommodation?</div>
<div class="grid-double">
{{ _applicationSubmission.naruFloorArea }} <span *ngIf="_applicationSubmission.naruFloorArea">m<sup>2</sup></span>
</div>
<div class="subheading2 grid-1">How many "sleeping units" in total are proposed?</div>
<div class="grid-double">
{{ _applicationSubmission.naruSleepingUnits }}
</div>
<div class="subheading2 grid-1">
Describe how the proposal for tourism accommodation will support agriculture in the short or long term.
</div>
<div class="grid-double">
{{ _applicationSubmission.naruResidenceNecessity }}
</div>
<div class="subheading2 grid-1">Describe the rationale for the proposed location of the tourism accommodation.</div>
<div class="grid-double">
{{ _applicationSubmission.naruLocationRationale }}
</div>
<div class="subheading2 grid-1">
Provide the total area (m<sup>2</sup>) and a description of infrastructure necessary to support the tourism
accommodation.
</div>
<div class="grid-double">
{{ _applicationSubmission.naruInfrastructure }}
</div>
<div class="subheading2 grid-1">Describe any agri-tourism that is currently taking place on the property.</div>
<div class="grid-double">
{{ _applicationSubmission.naruAgriTourism }}
</div>
</ng-container>
<div class="subheading2 grid-1">
Describe the necessity for an additional residence for farm use and how it will support agriculture in the short or
long term.
</div>
<div class="grid-double">
{{ _applicationSubmission.naruResidenceNecessity }}
</div>

<div class="subheading2 grid-1">
Describe how the proposal for a principal residence more than 500 m<sup>2</sup> will support agriculture in the
short or long term.
</div>
<div class="grid-double">
{{ _applicationSubmission.naruResidenceNecessity }}
</div>

<div class="subheading2 grid-1">
Describe the total floor area (m<sup>2</sup>), type, number, and occupancy of all residential structures currently
located on the property.
Will the proposed residence(s) be clustered with existing residential structures? Please explain.
</div>
<div class="grid-double">
{{ _applicationSubmission.naruExistingStructures }}
{{ _applicationSubmission.naruClustered }}
</div>

<div class="subheading2 grid-1">
Will the proposed residence(s) be located within a 60 m setback from the front lot line? Please explain.
</div>
<div class="grid-double">
{{ _applicationSubmission.naruSetback }}
</div>

<div class="subheading2 grid-1">
Where on the parcel will the proposal be situated and is there an agricultural rationale for the proposed location?
</div>
<div class="grid-double">
{{ _applicationSubmission.naruLocationRationale }}
</div>

<div class="subheading2 grid-1">
Describe any infrastructure required to support the proposed residence(s) and the approximate area (m<sup>2</sup>)
required for that infrastructure
</div>
<div class="grid-double">
{{ _applicationSubmission.naruInfrastructure }}
</div>

<ng-container *ngIf="_applicationSubmission.naruExistingResidences">
<div class="full-width existing-residences">
<div class="grid-1 subheading2">Existing Residence</div>
<div class="grid-2 subheading2">Total Floor Area</div>
<div class="grid-3 subheading2">Description</div>
<ng-container *ngFor="let existingResidence of _applicationSubmission.naruExistingResidences; let i = index">
<div class="grid-1">
{{ i + 1 }}
</div>
<div class="grid-2">
{{ existingResidence.floorArea }} <span matTextSuffix>m<sup>2</sup></span>
</div>
<div class="grid-3">{{ existingResidence.description }}</div>
</ng-container>
</div>
</ng-container>

<div class="subheading2 grid-1">Proposal Map / Site Plan</div>
<div class="grid-double">
<div *ngFor="let file of proposalMap">
Expand All @@ -109,12 +104,15 @@
</div>
</div>

<div class="subheading2 grid-1">
Do you need to import any fill to construct or conduct the proposed non-adhering residential use?
</div>
<div class="subheading2 grid-1">Detailed Building Plan(s)</div>
<div class="grid-double">
{{ _applicationSubmission.naruWillImportFill ? 'Yes' : 'No' }}
<div *ngFor="let file of buildingPlans">
<a (click)="openFile(file)">
{{ file.fileName }}
</a>
</div>
</div>

<ng-container *ngIf="_applicationSubmission.naruWillImportFill">
<div class="subheading2 grid-1">Describe the type and amount of fill proposed to be placed.</div>
<div class="grid-double">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,28 @@
grid-column-gap: 36px;
grid-row-gap: 12px;
}

.existing-residences {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
word-wrap: break-word;
white-space: pre-line;
grid-column-gap: 36px;
grid-row-gap: 12px;

.full-width {
grid-column: 1/3;
}

.grid-1 {
grid-column: 1/2;
}

.grid-2 {
grid-column: 2/3;
}

.grid-3 {
grid-column: 3/5;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ export class NaruDetailsComponent {
@Input() set files(documents: ApplicationDocumentDto[] | undefined) {
if (documents) {
this.proposalMap = documents.filter((document) => document.type?.code === DOCUMENT_TYPE.PROPOSAL_MAP);
this.buildingPlans = documents.filter((document) => document.type?.code === DOCUMENT_TYPE.BUILDING_PLAN);
}
}

proposalMap: ApplicationDocumentDto[] = [];
buildingPlans: ApplicationDocumentDto[] = [];

constructor(private applicationDocumentService: ApplicationDocumentService) {}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
<ng-content></ng-content>
<div>
<div class="subheading2">Residential Use Type</div>
{{ component.naruSubtype?.label }}
<app-no-data *ngIf="component.naruSubtype === null || component.naruSubtype === undefined"></app-no-data>
</div>

<div>
<div class="subheading2">Expiry Date</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export class DecisionComponentComponent implements OnInit {
averageDepthToRemove = new FormControl<number | null>(null, [Validators.required, Validators.min(MIN_SOIL_FIELDS)]);

// naru
naruSubtypeCode = new FormControl<string | null>(null, [Validators.required]);
naruEndDate = new FormControl<Date | null>(null);

//subd
Expand Down Expand Up @@ -266,13 +265,11 @@ export class DecisionComponentComponent implements OnInit {
}

private patchNaruFields() {
this.form.addControl('naruSubtypeCode', this.naruSubtypeCode);
this.form.addControl('naruEndDate', this.naruEndDate);
this.form.addControl('expiryDate', this.expiryDate);

this.naruEndDate.setValue(this.data.endDate ? new Date(this.data.endDate) : null);
this.expiryDate.setValue(this.data.expiryDate ? new Date(this.data.expiryDate) : null);
this.naruSubtypeCode.setValue(this.data.naruSubtypeCode ?? null);
}

private patchSubdFields() {
Expand Down Expand Up @@ -350,16 +347,18 @@ export class DecisionComponentComponent implements OnInit {
return {
endDate: this.naruEndDate.value ? formatDateForApi(this.naruEndDate.value) : null,
expiryDate: this.expiryDate.value ? formatDateForApi(this.expiryDate.value) : null,
naruSubtypeCode: this.naruSubtypeCode.value ?? null,
};
}

private getSubdDataChange(): SubdDecisionComponentDto {
const update = this.subdApprovedLots.value?.map((e) => ({
...e,
size: e.size ? e.size : null,
alrArea: e.alrArea ? e.alrArea : null
}) as ProposedDecisionLotDto);
const update = this.subdApprovedLots.value?.map(
(e) =>
({
...e,
size: e.size ? e.size : null,
alrArea: e.alrArea ? e.alrArea : null,
}) as ProposedDecisionLotDto,
);
return {
lots: update ?? undefined,
expiryDate: this.expiryDate.value ? formatDateForApi(this.expiryDate.value) : null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,6 @@
/>
</mat-form-field>

<div>
<ng-select
appearance="outline"
[items]="codes.naruSubtypes"
formControlName="naruSubtypeCode"
appendTo="body"
bindLabel="label"
bindValue="code"
placeholder="Residential Use Type*"
[clearable]="false"
></ng-select>
</div>

<mat-form-field appearance="outline" class="date-picker">
<mat-label>Expiry Date</mat-label>
<input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ export class DecisionComponentsComponent implements OnInit, OnDestroy, AfterView
private patchNaruFields(component: ApplicationDecisionComponentDto) {
component.endDate = this.application.proposalEndDate;
component.expiryDate = this.application.proposalExpiryDate;
component.naruSubtypeCode = this.application.submittedApplication?.naruSubtype?.code;
}

private patchInclExclFields(component: ApplicationDecisionComponentDto) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
}

.comment-input {
font-size: 16px;
resize: none;
margin-top: 4px;
border: 1px solid rgba(0, 0, 0, 0.42);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,3 @@
(save)="updateApplicationValue('proposalEndDate', $event)"
></app-inline-datepicker>
</div>

<div>
<div class="subheading2">Residential Use Type</div>
{{ naruSubtype }}
</div>
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Component, OnDestroy, OnInit } from '@angular/core';
import { Subject, takeUntil } from 'rxjs';
import { ApplicationDetailService } from '../../../../services/application/application-detail.service';
import { ApplicationSubmissionService } from '../../../../services/application/application-submission/application-submission.service';
import { ApplicationDto, UpdateApplicationDto } from '../../../../services/application/application.dto';
import { ApplicationDecisionV2Service } from '../../../../services/application/decision/application-decision-v2/application-decision-v2.service';
import { ToastService } from '../../../../services/toast/toast.service';
Expand All @@ -19,21 +18,16 @@ interface InlineSelect {
export class NaruProposalComponent implements OnDestroy, OnInit {
$destroy = new Subject<void>();
application: ApplicationDto | undefined;
naruSubtype: string = '';

constructor(
private applicationDetailService: ApplicationDetailService,
private toastService: ToastService,
private applicationSubmissionService: ApplicationSubmissionService,
) {}

ngOnInit(): void {
this.applicationDetailService.$application.pipe(takeUntil(this.$destroy)).subscribe((application) => {
if (application) {
this.application = application;
this.applicationSubmissionService
.fetchSubmission(application.fileNumber)
.then((e) => (this.naruSubtype = e.naruSubtype?.label ?? ''));
}
});
}
Expand Down
Loading
Loading