@@ -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