Skip to content

Commit 9e27ea1

Browse files
authored
Merge pull request #2725 from bcgov/2618-Document-Upload-QA-III
fix: document upload qa III
2 parents 475dd98 + 9772bf4 commit 9e27ea1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

alcs-frontend/src/app/shared/document-upload-dialog/document-upload-dialog.component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ export class DocumentUploadDialogComponent implements OnInit, OnDestroy {
263263

264264
async prepareCertificateOfTitleUpload(uuid?: string) {
265265
this.source.setValue(DOCUMENT_SOURCE.APPLICANT);
266-
266+
267267
// If fixedParcel is provided, use it and don't require validation
268268
if (this.data.fixedParcel) {
269269
this.parcelId.setValue(this.data.fixedParcel.uuid);
@@ -287,7 +287,7 @@ export class DocumentUploadDialogComponent implements OnInit, OnDestroy {
287287
this.parcelId.updateValueAndValidity();
288288
return;
289289
}
290-
290+
291291
// We have parcels to select from now, so we will require it here
292292
this.parcelId.setValidators([Validators.required]);
293293
this.parcelId.updateValueAndValidity();
@@ -332,6 +332,7 @@ export class DocumentUploadDialogComponent implements OnInit, OnDestroy {
332332

333333
async onDocTypeSelected($event?: DocumentTypeDto) {
334334
if (!$event) {
335+
this.selectableParcels = [];
335336
return;
336337
}
337338

@@ -353,6 +354,7 @@ export class DocumentUploadDialogComponent implements OnInit, OnDestroy {
353354
this.parcelId.setValue(null);
354355
this.parcelId.setValidators([]);
355356
this.parcelId.updateValueAndValidity();
357+
this.selectableParcels = [];
356358
}
357359

358360
if ($event.code === DOCUMENT_TYPE.CORPORATE_SUMMARY) {

0 commit comments

Comments
 (0)