diff --git a/alcs-frontend/src/app/features/application/applicant-info/application-details/naru-details/naru-details.component.html b/alcs-frontend/src/app/features/application/applicant-info/application-details/naru-details/naru-details.component.html index 3fea01ec8..f410cdd57 100644 --- a/alcs-frontend/src/app/features/application/applicant-info/application-details/naru-details/naru-details.component.html +++ b/alcs-frontend/src/app/features/application/applicant-info/application-details/naru-details/naru-details.component.html @@ -131,7 +131,12 @@ {{ i + 1 }}
- {{ existingResidence.floorArea }} m2 + + + + + {{ existingResidence.floorArea }} m2 +
{{ existingResidence.description }}
@@ -153,7 +158,14 @@
{{ proposedResidence.floorArea }} m2
-
{{ proposedResidence.description }}
+
+ + + + + {{ proposedResidence.description }} + +
diff --git a/portal-frontend/src/app/features/applications/application-details/naru-details/naru-details.component.html b/portal-frontend/src/app/features/applications/application-details/naru-details/naru-details.component.html index 0ec5fa11c..4042172cd 100644 --- a/portal-frontend/src/app/features/applications/application-details/naru-details/naru-details.component.html +++ b/portal-frontend/src/app/features/applications/application-details/naru-details/naru-details.component.html @@ -155,7 +155,12 @@ {{ i + 1 }}
- {{ existingResidence.floorArea }} m2 + + + + + {{ existingResidence.floorArea }} m2 +
{{ existingResidence.description }}
@@ -172,6 +177,7 @@ [residence]="existingResidence" [isLast]="last" [isReviewStep]="true" + [showErrors]="showErrors" > @@ -193,7 +199,14 @@
{{ proposedResidence.floorArea }} m2
-
{{ proposedResidence.description }}
+
+ + + + + {{ proposedResidence.description }} + +
@@ -208,6 +221,7 @@ [residence]="proposedResidence" [isLast]="last" [isReviewStep]="true" + [showErrors]="showErrors" > diff --git a/portal-frontend/src/app/features/applications/edit-submission/proposal/naru-proposal/naru-proposal.component.html b/portal-frontend/src/app/features/applications/edit-submission/proposal/naru-proposal/naru-proposal.component.html index fa94eb789..b9c4b008f 100644 --- a/portal-frontend/src/app/features/applications/edit-submission/proposal/naru-proposal/naru-proposal.component.html +++ b/portal-frontend/src/app/features/applications/edit-submission/proposal/naru-proposal/naru-proposal.component.html @@ -461,7 +461,16 @@

Proposal

Total Floor Area - {{ element.floorArea }} m2 + +
No Data
+
+ warning +
This field is required
+
+
+ + {{ element.floorArea }} m2 +
@@ -509,6 +518,7 @@

Proposal

[residence]="existingResidence" [isLast]="last" [isReviewStep]="false" + [showErrors]="showErrors" (editClicked)="onAddEditResidence(true, existingResidence, true)" (removeClicked)="onDeleteResidence(true, existingResidence)" > @@ -540,10 +550,19 @@

Proposal

Description - {{ element.isExpanded ? element.description : getTruncatedDescription(element.description) }} - - {{ element.isExpanded ? 'Read Less' : 'Read More' }} - + +
No Data
+
+ warning +
This field is required
+
+
+ + {{ element.isExpanded ? element.description : getTruncatedDescription(element.description) }} + + {{ element.isExpanded ? 'Read Less' : 'Read More' }} + +
@@ -581,6 +600,7 @@

Proposal

[residence]="proposedResidence" [isLast]="last" [isReviewStep]="false" + [showErrors]="showErrors" (editClicked)="onAddEditResidence(false, proposedResidence, true)" (removeClicked)="onDeleteResidence(false, proposedResidence)" > @@ -590,12 +610,15 @@

Proposal

type="button" mat-stroked-button color="primary" - [ngClass]="{ 'error-field-outlined ng-invalid': showErrors && proposedResidencesRequired }" + [ngClass]="{ + 'error-field-outlined ng-invalid': + showErrors && proposedResidencesRequired && proposedResidences.length === 0, + }" (click)="onAddEditResidence(false, undefined, false)" > + Add Proposed Residence -
+
warning
This field is required
diff --git a/portal-frontend/src/app/features/applications/edit-submission/proposal/naru-proposal/naru-proposal.component.scss b/portal-frontend/src/app/features/applications/edit-submission/proposal/naru-proposal/naru-proposal.component.scss index e87fd2f97..898b89a39 100644 --- a/portal-frontend/src/app/features/applications/edit-submission/proposal/naru-proposal/naru-proposal.component.scss +++ b/portal-frontend/src/app/features/applications/edit-submission/proposal/naru-proposal/naru-proposal.component.scss @@ -112,3 +112,10 @@ td { margin-bottom: 0 !important; } } + +.no-data-text-error { + color: colors.$grey-dark; + font-weight: 400; + padding-bottom: 0 !important; + display: inline; +} diff --git a/portal-frontend/src/app/features/applications/edit-submission/proposal/naru-proposal/residence-dialog/residence-dialog.component.ts b/portal-frontend/src/app/features/applications/edit-submission/proposal/naru-proposal/residence-dialog/residence-dialog.component.ts index 808a01f74..95008c9ef 100644 --- a/portal-frontend/src/app/features/applications/edit-submission/proposal/naru-proposal/residence-dialog/residence-dialog.component.ts +++ b/portal-frontend/src/app/features/applications/edit-submission/proposal/naru-proposal/residence-dialog/residence-dialog.component.ts @@ -34,9 +34,14 @@ export class ResidenceDialogComponent implements OnInit { ngOnInit(): void { if (this.data.residenceData) { - this.floorArea.setValue(this.data.residenceData.floorArea!.toString()); + this.floorArea.setValue( + this.data.residenceData.floorArea === 0 ? '' : this.data.residenceData.floorArea!.toString(), + ); this.description.setValue(this.data.residenceData.description!); this.residence = { ...this.data.residenceData }; + if (this.data.residenceData.floorArea === 0 || this.data.residenceData.description === '') { + this.form.markAllAsTouched(); + } } } diff --git a/portal-frontend/src/app/features/public/application/submission/naru-details/naru-details.component.html b/portal-frontend/src/app/features/public/application/submission/naru-details/naru-details.component.html index fc54d54ae..22b6a65c7 100644 --- a/portal-frontend/src/app/features/public/application/submission/naru-details/naru-details.component.html +++ b/portal-frontend/src/app/features/public/application/submission/naru-details/naru-details.component.html @@ -141,7 +141,12 @@ {{ i + 1 }}
- {{ existingResidence.floorArea }} m2 + + + + + {{ existingResidence.floorArea }} m2 +
{{ existingResidence.description }}
@@ -160,7 +165,14 @@
{{ proposedResidence.floorArea }} m2
-
{{ proposedResidence.description }}
+
+ + + + + {{ proposedResidence.description }} + +
diff --git a/portal-frontend/src/app/shared/mobile/naru-residence-mobile-card/naru-residence-mobile-card.component.html b/portal-frontend/src/app/shared/mobile/naru-residence-mobile-card/naru-residence-mobile-card.component.html index 13da40de4..d9a1a893e 100644 --- a/portal-frontend/src/app/shared/mobile/naru-residence-mobile-card/naru-residence-mobile-card.component.html +++ b/portal-frontend/src/app/shared/mobile/naru-residence-mobile-card/naru-residence-mobile-card.component.html @@ -1,8 +1,14 @@ - + - #{{ residence.id }} Total Floor Area: {{ residence.floorArea }} - m2 + #{{ residence.id }} Total Floor Area: + +
No Data
+
+ + {{ residence.floorArea }} + m2 +