[Trunk | Library]: organization.component.ts & project.component.ts: [Bug fix] Close report modal when opening loading modal (after clicking on some download button).

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@61249 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2021-06-17 13:33:16 +00:00
parent c4e58f942c
commit 8c92a7fcdb
2 changed files with 19 additions and 0 deletions

View File

@ -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']);

View File

@ -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();
}