diff --git a/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-details.component.html b/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-details.component.html index d142ed175d..fffcf1ea9a 100644 --- a/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-details.component.html +++ b/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-details.component.html @@ -30,7 +30,7 @@
Documents needed for this step:
[submissionUuid]="submissionUuid" [showErrors]="showErrors" (onFormGroupChange)="onParcelFormChange($event)" - (onOwnersUpdated)="onOwnersUpdated()" + (onOwnersUpdated)="reloadApplication()" (onOwnersDeleted)="reloadApplication()" (onSaveProgress)="onSave()" > diff --git a/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-details.component.spec.ts b/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-details.component.spec.ts index 14df0a689b..96143902d8 100644 --- a/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-details.component.spec.ts +++ b/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-details.component.spec.ts @@ -15,7 +15,6 @@ describe('ParcelDetailsComponent', () => { let fixture: ComponentFixture; let mockHttpClient: DeepMocked; let mockApplicationParcelService: DeepMocked; - let mockApplicationOwnerService: DeepMocked; let mockToastService: DeepMocked; let mockMatDialog: DeepMocked; let applicationPipe = new BehaviorSubject(undefined); @@ -25,7 +24,6 @@ describe('ParcelDetailsComponent', () => { mockApplicationParcelService = createMock(); mockToastService = createMock(); mockMatDialog = createMock(); - mockApplicationOwnerService = createMock(); await TestBed.configureTestingModule({ declarations: [ParcelDetailsComponent], @@ -38,10 +36,6 @@ describe('ParcelDetailsComponent', () => { provide: ApplicationParcelService, useValue: mockApplicationParcelService, }, - { - provide: ApplicationOwnerService, - useValue: mockApplicationOwnerService, - }, { provide: ToastService, useValue: mockToastService, diff --git a/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-details.component.ts b/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-details.component.ts index 86df44dba9..98c5e64cb3 100644 --- a/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-details.component.ts +++ b/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-details.component.ts @@ -35,10 +35,8 @@ export class ParcelDetailsComponent extends StepComponent implements OnInit, Aft isDirty = false; constructor( - private router: Router, private applicationSubmissionService: ApplicationSubmissionService, private applicationParcelService: ApplicationParcelService, - private applicationOwnerService: ApplicationOwnerService, private toastService: ToastService, private dialog: MatDialog ) { @@ -159,16 +157,6 @@ export class ParcelDetailsComponent extends StepComponent implements OnInit, Aft }); } - async onOwnersUpdated() { - const owners = await this.applicationOwnerService.fetchBySubmissionId(this.submissionUuid); - if (owners) { - const parcelOwners = owners.filter( - (owner) => ![OWNER_TYPE.AGENT, OWNER_TYPE.GOVERNMENT].includes(owner.type.code) - ); - this.$owners.next(parcelOwners); - } - } - async reloadApplication() { const updatedApp = await this.applicationSubmissionService.getByUuid(this.submissionUuid); this.$applicationSubmission.next(updatedApp); diff --git a/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-entry/parcel-entry.component.html b/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-entry/parcel-entry.component.html index 9abc57fe4e..5dff8ea0b5 100644 --- a/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-entry/parcel-entry.component.html +++ b/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-entry/parcel-entry.component.html @@ -51,6 +51,7 @@ /> @@ -246,6 +254,7 @@
Government Parcel Contact
+ @@ -293,6 +302,7 @@
OR

Add the contact information of an employee who works in the department or ministry for the Crown parcel

diff --git a/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-entry/parcel-entry.component.ts b/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-entry/parcel-entry.component.ts index 8c9bb1ac19..720e9fd527 100644 --- a/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-entry/parcel-entry.component.ts +++ b/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-entry/parcel-entry.component.ts @@ -188,14 +188,19 @@ export class ParcelEntryComponent implements OnInit { async onSearch() { let result; + const searchValue = this.pidPin.getRawValue(); + if (!searchValue || searchValue.length === 0) { + return; + } + if (this.searchBy.getRawValue() === 'pin') { - result = await this.parcelService.getByPin(this.pidPin.getRawValue()!); + result = await this.parcelService.getByPin(searchValue); } else { - result = await this.parcelService.getByPid(this.pidPin.getRawValue()!); + result = await this.parcelService.getByPid(searchValue); } - this.onReset(); if (result) { + this.onReset(); this.legalDescription.setValue(result.legalDescription); this.mapArea.setValue(result.mapArea); diff --git a/portal-frontend/src/app/features/notice-of-intents/edit-submission/parcels/parcel-entry/parcel-entry.component.html b/portal-frontend/src/app/features/notice-of-intents/edit-submission/parcels/parcel-entry/parcel-entry.component.html index da48e0eb24..64e6b7b51d 100644 --- a/portal-frontend/src/app/features/notice-of-intents/edit-submission/parcels/parcel-entry/parcel-entry.component.html +++ b/portal-frontend/src/app/features/notice-of-intents/edit-submission/parcels/parcel-entry/parcel-entry.component.html @@ -44,6 +44,7 @@ + Powered by PMBC! @@ -239,6 +242,7 @@
Government Parcel Contact
> + @@ -287,6 +291,7 @@
OR

Add the contact information of an employee who works in the department or ministry for the Crown parcel

+ diff --git a/portal-frontend/src/app/features/notice-of-intents/edit-submission/parcels/parcel-entry/parcel-entry.component.ts b/portal-frontend/src/app/features/notice-of-intents/edit-submission/parcels/parcel-entry/parcel-entry.component.ts index 4e86f1e16b..51ec37b8de 100644 --- a/portal-frontend/src/app/features/notice-of-intents/edit-submission/parcels/parcel-entry/parcel-entry.component.ts +++ b/portal-frontend/src/app/features/notice-of-intents/edit-submission/parcels/parcel-entry/parcel-entry.component.ts @@ -186,14 +186,19 @@ export class ParcelEntryComponent implements OnInit { async onSearch() { let result; + const searchValue = this.pidPin.value; + if (!searchValue || searchValue.length === 0) { + return; + } + if (this.searchBy.getRawValue() === 'pin') { - result = await this.parcelService.getByPin(this.pidPin.getRawValue()!); + result = await this.parcelService.getByPin(searchValue); } else { - result = await this.parcelService.getByPid(this.pidPin.getRawValue()!); + result = await this.parcelService.getByPid(searchValue); } - this.onReset(); if (result) { + this.onReset(); this.legalDescription.setValue(result.legalDescription); this.mapArea.setValue(result.mapArea);