Revision 58398
Added by Stefania Martziou almost 4 years ago
sources-register.component.ts | ||
---|---|---|
1 | 1 |
import { Component, OnInit } from '@angular/core'; |
2 |
import { Router } from "@angular/router"; |
|
2 | 3 |
|
3 | 4 |
@Component({ |
4 | 5 |
selector: 'app-sources-register', |
... | ... | |
7 | 8 |
|
8 | 9 |
export class SourcesRegisterComponent implements OnInit { |
9 | 10 |
|
10 |
constructor() { |
|
11 |
constructor(private router: Router) {
|
|
11 | 12 |
} |
12 | 13 |
|
13 | 14 |
ngOnInit() { |
... | ... | |
17 | 18 |
body.classList.remove("landing"); |
18 | 19 |
body.classList.add("dashboard"); |
19 | 20 |
} |
21 |
|
|
22 |
// fixme still when I click the link inside the text in overlay, this event happens as well (I go to the first step of the wizard) |
|
23 |
goTo(datasourceType: string) { |
|
24 |
if(datasourceType==='literature') { |
|
25 |
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=selectDatasource`); |
|
26 |
} else if(datasourceType==='data') { |
|
27 |
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=selectDatasource`); |
|
28 |
} else if(datasourceType==='journal') { |
|
29 |
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=basicInformation`); |
|
30 |
} else if(datasourceType==='aggregator') { |
|
31 |
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=basicInformation`); |
|
32 |
} |
|
33 |
} |
|
20 | 34 |
} |
Also available in: Unified diff
Partial fix for the card links in the datasource selection page of the registration process