Skip to content

Commit bcfc2e1

Browse files
committed
Clarify function purpose
1 parent b17f434 commit bcfc2e1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

portal-frontend/src/app/features/applications/edit-submission/proposal/pfrs-proposal/pfrs-proposal.component.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ export class PfrsProposalComponent extends FilesStepComponent implements OnInit,
416416

417417
this.structuresSource = new MatTableDataSource(this.proposedStructures);
418418

419-
if (this.hasInput(structure.type, newType)) {
419+
if (this.structureChangeRequiresConfirmation(structure.type, newType)) {
420420
this.confirmationDialogService
421421
.openDialog({
422422
title: 'Change Structure Type',
@@ -451,7 +451,10 @@ export class PfrsProposalComponent extends FilesStepComponent implements OnInit,
451451
this.form.markAsDirty();
452452
}
453453

454-
private hasInput(oldType: STRUCTURE_TYPES | null, newType: STRUCTURE_TYPES | null) {
454+
private structureChangeRequiresConfirmation(
455+
oldType: STRUCTURE_TYPES | null,
456+
newType: STRUCTURE_TYPES | null,
457+
): boolean {
455458
const residentialTypes = [
456459
STRUCTURE_TYPES.PRINCIPAL_RESIDENCE,
457460
STRUCTURE_TYPES.ADDITIONAL_RESIDENCE,

0 commit comments

Comments
 (0)