Revision 58412
Added by Andreas Mantas about 4 years ago
register-existing-datasource.component.ts | ||
---|---|---|
64 | 64 |
private router: Router, |
65 | 65 |
private repoService: RepositoryService) {} |
66 | 66 |
|
67 |
// @ViewChild('updateTermsForm') |
|
68 |
|
|
67 | 69 |
ngOnInit() { |
68 | 70 |
if (this.datasourceType && this.currentMode) { |
69 | 71 |
// will execute getStep() every time there is a change in query params |
... | ... | |
94 | 96 |
} |
95 | 97 |
} else if (stepName === 'finish') { |
96 | 98 |
this.currentStep = 3; |
99 |
// ToU: to enable ToU delete the 2 lines above and uncomment the section below |
|
100 |
/*} else if (stepName === 'termsOfUse') { |
|
101 |
if (!this.interfacesArray) { |
|
102 |
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=selectDatasource`); |
|
103 |
} else { |
|
104 |
this.currentStep = 3; |
|
105 |
} |
|
106 |
} else if (stepName === 'finish') { |
|
107 |
this.currentStep = 4;*/ |
|
97 | 108 |
} |
98 | 109 |
} |
99 | 110 |
this.rightHelperContent.ngOnInit(); |
... | ... | |
121 | 132 |
} else { |
122 | 133 |
if (this.repoInterfaces.length > 0) { |
123 | 134 |
this.registerRepository(); |
135 |
// ToU: replace above line with the comment below |
|
136 |
// this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=termsOfUse`); |
|
124 | 137 |
} else { |
125 | 138 |
this.errorMessage = noInterfacesSaved; |
126 | 139 |
window.scrollTo(1, 1); |
... | ... | |
128 | 141 |
} |
129 | 142 |
} |
130 | 143 |
); |
144 |
// ToU: uncomment these lines |
|
145 |
// } else if (this.currentStep === 3) { |
|
146 |
// this.registerRepository(); |
|
131 | 147 |
} |
132 | 148 |
} |
133 | 149 |
|
... | ... | |
142 | 158 |
of(this.getInterfaces()).subscribe( |
143 | 159 |
() => this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=basicInformation`) |
144 | 160 |
); |
161 |
// ToU: uncomment these lines |
|
162 |
// } else if (this.currentStep === 3) { |
|
163 |
// this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=interfaces`); |
|
145 | 164 |
} |
146 | 165 |
} |
147 | 166 |
|
... | ... | |
318 | 337 |
}, |
319 | 338 |
() => { |
320 | 339 |
this.saveNewInterfaces(); |
340 |
// TODO: update terms when backend is ready, maybe POST with updateRepository |
|
321 | 341 |
} |
322 | 342 |
); |
323 | 343 |
} |
Also available in: Unified diff
added Terms of Use functionality - follow 'ToU' comments to enable