From beb190b57d571f51a1043dffb8c5394b20ce7953 Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Fernadez Date: Mon, 2 Sep 2024 12:44:36 -0600 Subject: [PATCH] batch-of-fixes-2-sep --- .../institutional/institutional.component.ts | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/app/institutional/pages/institutional/institutional.component.ts b/src/app/institutional/pages/institutional/institutional.component.ts index fc3d57cbb..0e0256bd3 100644 --- a/src/app/institutional/pages/institutional/institutional.component.ts +++ b/src/app/institutional/pages/institutional/institutional.component.ts @@ -26,7 +26,6 @@ import { DisplayName, Institutional, } from '../../../types/institutional.endpoint' -import { path } from '@angular-devkit/core' @Component({ selector: 'app-institutional', @@ -96,14 +95,6 @@ export class InstitutionalComponent implements OnInit { ? [] : institutionsFiltered }), - tap(() => { - if ( - !this.institutionFormControl.valid && - !this.institutionFormControl.pristine - ) { - this.userSelectedInstitutions = [] - } - }) ) }) } @@ -160,12 +151,13 @@ export class InstitutionalComponent implements OnInit { this.institution = institutionSelected this.entityID = this.institution.entityID - this.displayDefaultImage = false - this.imageLoadingTimeOut = false - this.imageLoadingFinish = false - - this.userSelectedInstitutions = [] - this.userSelectedInstitutions.push(institutionSelected) + if (!this.userSelectedInstitutions || !this.userSelectedInstitutions.length) { + this.displayDefaultImage = false + this.imageLoadingTimeOut = false + this.imageLoadingFinish = false + this.userSelectedInstitutions = [] + this.userSelectedInstitutions.push(institutionSelected) + } } getNameInstitution(institution: Institutional): DisplayName {