Revision 53188
Added by Myrto Koukouli over 5 years ago
metrics-usagestats-report.component.ts | ||
---|---|---|
23 | 23 |
repoId: string; |
24 | 24 |
shownRepoId: string; |
25 | 25 |
shownOpenaireId: string; |
26 |
useCurrentRepo: boolean; |
|
26 | 27 |
issnToShow: string = ''; |
27 | 28 |
chosen_report: string; |
28 | 29 |
|
... | ... | |
50 | 51 |
this.shownRepoId = this.convertToDisplayedFormat(this.repoId); |
51 | 52 |
console.log(`shownRepoId is ${this.repoId}`); |
52 | 53 |
this.title = `${this.chosen_report} report`; |
54 |
if (this.chosen_report !== 'RR1') { |
|
55 |
this.useCurrentRepo = true; |
|
56 |
} |
|
53 | 57 |
} |
54 | 58 |
|
55 | 59 |
convertToDisplayedFormat(input: string) { |
... | ... | |
75 | 79 |
if (this.repo.piwikInfo) { |
76 | 80 |
this.shownOpenaireId = this.convertToDisplayedFormat(this.repo.piwikInfo.openaireId); |
77 | 81 |
} |
78 |
if (this.repo.issn){ |
|
79 |
this.issnToShow = this.repo.issn.slice(0, 4)+ '-' + this.repo.issn.toString().slice(4);
|
|
82 |
if (this.repo.issn && this.repo.issn !== 'null'){
|
|
83 |
this.shownRepoId = this.repo.issn.slice(0, 4)+ '-' + this.repo.issn.toString().slice(4);
|
|
80 | 84 |
} |
81 | 85 |
this.title = `${this.chosen_report} report for ${this.repo.officialName}`; |
82 | 86 |
if ( this.authService.activateFrontAuthorization && (this.authService.getUserEmail() !== this.repo.registeredBy) ) { |
... | ... | |
106 | 110 |
this.granularity = event.target.value; |
107 | 111 |
} |
108 | 112 |
|
113 |
updateUseCurrentRepo(event: any) { |
|
114 |
this.useCurrentRepo = event.target.value; |
|
115 |
} |
|
116 |
|
|
109 | 117 |
goToReport() { |
118 |
if (!this.useCurrentRepo) { this.shownRepoId = ''; } |
|
110 | 119 |
this.router.navigate(['/getImpact/usagestats-report-results'], { |
111 | 120 |
queryParams: { |
112 | 121 |
report: this.chosen_report, |
Also available in: Unified diff
fixed bug in usagestats