diff --git a/landingPages/organization/organization.component.ts b/landingPages/organization/organization.component.ts index a1cc6bc2..2cd53ece 100644 --- a/landingPages/organization/organization.component.ts +++ b/landingPages/organization/organization.component.ts @@ -480,6 +480,7 @@ export class OrganizationComponent { }, err => { this.handleError("Error getting number of publications for project with id: " + projects[index].id, err); + this.closeLoading(); })); } }, @@ -512,6 +513,9 @@ export class OrganizationComponent { } private openLoading() { + this.closeDownloadReportModal(); + this.closeDownloadFunderReportModal(); + if (this.loading) { this.loading.open(); } @@ -596,6 +600,10 @@ export class OrganizationComponent { this.downloadReportModal.alertTitle = "Download content report"; this.downloadReportModal.open(); } + + closeDownloadReportModal() { + this.downloadReportModal.cancel(); + } openDownloadFunderReportModal() { this.funder = this.fetchProjects.funders[0]; @@ -605,6 +613,10 @@ export class OrganizationComponent { this.downloadFunderReportModal.open(); } + closeDownloadFunderReportModal() { + this.downloadFunderReportModal.cancel(); + } + public getParamsForSearchLink(type: string = "") { if(type) { return this.routerHelper.createQueryParams(['f0', 'fv0', 'type', 'qf', 'sortBy'], ['relorganizationid', this.organizationId, type, 'false', 'resultdateofacceptance,descending']); diff --git a/landingPages/project/project.component.ts b/landingPages/project/project.component.ts index b625c6ec..67552ded 100644 --- a/landingPages/project/project.component.ts +++ b/landingPages/project/project.component.ts @@ -503,6 +503,11 @@ export class ProjectComponent { this.downloadReportModal.open(); } + + public closeDownloadReportModal() { + this.downloadReportModal.cancel(); + } + private createHeaders(type: string) { this.openLoading(); this.setMessageLoading("Downloading HTML file"); @@ -700,6 +705,8 @@ export class ProjectComponent { } private openLoading() { + this.closeDownloadReportModal(); + if (this.loading) { this.loading.open(); }