Skip to content

Commit

Permalink
Merge branch 'develop' into bugfix/ALCS-2314
Browse files Browse the repository at this point in the history
  • Loading branch information
trslater committed Oct 21, 2024
2 parents 390c701 + 9ecef18 commit 1583705
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@
</div>
</ng-container>
<ng-container *ngFor="let existingResidence of _applicationSubmission.naruExistingResidences; let i = index">
<div class="grid-1">
{{ i + 1 }}
</div>
<div class="grid-1">#{{ i + 1 }}</div>
<div class="grid-2">
{{ existingResidence.floorArea }} <span matTextSuffix>m<sup>2</sup></span>
</div>
Expand All @@ -130,9 +128,7 @@
<div class="grid-2 subheading2">Total Floor Area</div>
<div class="grid-3 subheading2">Description</div>
<ng-container *ngFor="let proposedResidence of _applicationSubmission.naruProposedResidences; let i = index">
<div class="grid-1">
{{ i + 1 }}
</div>
<div class="grid-1">#{{ i + 1 }}</div>
<div class="grid-2">
{{ proposedResidence.floorArea }} <span matTextSuffix>m<sup>2</sup></span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,7 @@
</div>
</ng-container>
<ng-container *ngFor="let existingResidence of _applicationSubmission.naruExistingResidences; let i = index">
<div>
{{ i + 1 }}
</div>
<div>#{{ i + 1 }}</div>
<div>
{{ existingResidence.floorArea }} <span matTextSuffix>m<sup>2</sup></span>
</div>
Expand All @@ -168,8 +166,13 @@
</div>
</ng-container>
<app-naru-residence-mobile-card
*ngFor="let existingResidence of _applicationSubmission.naruExistingResidences; let last = last"
[residence]="existingResidence"
*ngFor="let existingResidence of _applicationSubmission.naruExistingResidences; let last = last; let i = index"
[residence]="{
id: i + 1,
floorArea: existingResidence.floorArea,
description: existingResidence.description,
isExpanded: false,
}"
[isLast]="last"
[isReviewStep]="true"
>
Expand All @@ -187,9 +190,7 @@
</div>
</ng-container>
<ng-container *ngFor="let proposedResidence of _applicationSubmission.naruProposedResidences; let i = index">
<div>
{{ i + 1 }}
</div>
<div>#{{ i + 1 }}</div>
<div>
{{ proposedResidence.floorArea }} <span matTextSuffix>m<sup>2</sup></span>
</div>
Expand All @@ -204,8 +205,13 @@
</div>
</ng-container>
<app-naru-residence-mobile-card
*ngFor="let proposedResidence of _applicationSubmission.naruProposedResidences; let last = last"
[residence]="proposedResidence"
*ngFor="let proposedResidence of _applicationSubmission.naruProposedResidences; let last = last; let i = index"
[residence]="{
id: i + 1,
floorArea: proposedResidence.floorArea,
description: proposedResidence.description,
isExpanded: false,
}"
[isLast]="last"
[isReviewStep]="true"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ <h2>Proposal</h2>
<table mat-table [dataSource]="existingResidencesSource">
<ng-container class="sample" matColumnDef="index">
<th mat-header-cell *matHeaderCellDef>Existing Residence</th>
<td mat-cell *matCellDef="let i = index">{{ i + 1 }}</td>
<td mat-cell *matCellDef="let i = index">#{{ i + 1 }}</td>
</ng-container>

<ng-container matColumnDef="floorArea">
Expand Down Expand Up @@ -527,7 +527,7 @@ <h2>Proposal</h2>
<table mat-table [dataSource]="proposedResidencesSource">
<ng-container class="sample" matColumnDef="index">
<th mat-header-cell *matHeaderCellDef>Proposed Residence</th>
<td mat-cell *matCellDef="let i = index">{{ i + 1 }}</td>
<td mat-cell *matCellDef="let i = index">#{{ i + 1 }}</td>
</ng-container>

<ng-container matColumnDef="floorArea">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
</div>

<ng-container *ngIf="applicationSubmission.naruExistingResidences">
<div class="full-width existing-residences">
<div class="full-width existing-residences" *ngIf="!isMobile">
<div class="subheading2">Existing Residence</div>
<div class="subheading2">Total Floor Area</div>
<div class="subheading2">Description</div>
Expand All @@ -137,32 +137,68 @@
</div>
</ng-container>
<ng-container *ngFor="let existingResidence of applicationSubmission.naruExistingResidences; let i = index">
<div>
{{ i + 1 }}
</div>
<div>#{{ i + 1 }}</div>
<div>
{{ existingResidence.floorArea }} <span matTextSuffix>m<sup>2</sup></span>
</div>
<div>{{ existingResidence.description }}</div>
</ng-container>
</div>
<ng-container *ngIf="isMobile">
<div class="subheading2 grid-1">Total Floor Area of Existing Residence(s) - If Applicable</div>
<ng-container *ngIf="applicationSubmission.naruExistingResidences?.length === 0">
<div>
<app-no-data></app-no-data>
</div>
</ng-container>
<app-naru-residence-mobile-card
*ngFor="let existingResidence of applicationSubmission.naruExistingResidences; let last = last; let i = index"
[residence]="{
id: i + 1,
floorArea: existingResidence.floorArea,
description: existingResidence.description,
isExpanded: false,
}"
[isLast]="last"
[isReviewStep]="true"
>
</app-naru-residence-mobile-card>
</ng-container>
</ng-container>

<ng-container *ngIf="applicationSubmission.naruProposedResidences">
<div class="full-width existing-residences">
<div class="full-width existing-residences" *ngIf="!isMobile">
<div class="subheading2">Proposed Residence</div>
<div class="subheading2">Total Floor Area</div>
<div class="subheading2">Description</div>
<ng-container *ngFor="let proposedResidence of applicationSubmission.naruProposedResidences; let i = index">
<div>
{{ i + 1 }}
</div>
<div>#{{ i + 1 }}</div>
<div>
{{ proposedResidence.floorArea }} <span matTextSuffix>m<sup>2</sup></span>
</div>
<div>{{ proposedResidence.description }}</div>
</ng-container>
</div>
<ng-container *ngIf="isMobile">
<div class="subheading2 grid-1">Total Floor Area of Proposed Residence(s)</div>
<ng-container *ngIf="applicationSubmission.naruProposedResidences?.length === 0">
<div>
<app-no-data></app-no-data>
</div>
</ng-container>
<app-naru-residence-mobile-card
*ngFor="let proposedResidence of applicationSubmission.naruProposedResidences; let last = last; let i = index"
[residence]="{
id: i + 1,
floorArea: proposedResidence.floorArea,
description: proposedResidence.description,
isExpanded: false,
}"
[isLast]="last"
[isReviewStep]="true"
>
</app-naru-residence-mobile-card>
</ng-container>
</ng-container>

<div class="subheading2 grid-1">Proposal Map / Site Plan</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Component, Input } from '@angular/core';
import { Component, HostListener, Input } from '@angular/core';
import { Router } from '@angular/router';
import { PublicApplicationSubmissionDto } from '../../../../../services/public/public-application.dto';
import { PublicDocumentDto } from '../../../../../services/public/public.dto';
import { PublicService } from '../../../../../services/public/public.service';
import { DOCUMENT_TYPE } from '../../../../../shared/dto/document.dto';
import { openFileInline } from '../../../../../shared/utils/file';
import { MOBILE_BREAKPOINT } from '../../../../../shared/utils/breakpoints';

@Component({
selector: 'app-naru-details[applicationSubmission]',
Expand All @@ -15,6 +16,8 @@ export class NaruDetailsComponent {
proposalMap: PublicDocumentDto[] = [];
buildingPlans: PublicDocumentDto[] = [];

isMobile = window.innerWidth <= MOBILE_BREAKPOINT;

@Input() applicationSubmission!: PublicApplicationSubmissionDto;
@Input() set applicationDocuments(documents: PublicDocumentDto[]) {
this.proposalMap = documents.filter((document) => document.type?.code === DOCUMENT_TYPE.PROPOSAL_MAP);
Expand All @@ -32,4 +35,9 @@ export class NaruDetailsComponent {
openFileInline(res.url, file.fileName);
}
}

@HostListener('window:resize', ['$event'])
onWindowResize() {
this.isMobile = window.innerWidth <= MOBILE_BREAKPOINT;
}
}
Binary file not shown.

0 comments on commit 1583705

Please sign in to comment.