41 |
41 |
countries: Country[] = [];
|
42 |
42 |
datasourceClasses: Map<string, string> = new Map<string, string>();
|
43 |
43 |
classCodes: string[] = [];
|
44 |
|
// classCodes: string[] = [];
|
45 |
44 |
|
46 |
45 |
@Input() mode: string;
|
47 |
46 |
|
... | ... | |
52 |
51 |
formSubmitted = false;
|
53 |
52 |
group: FormGroup;
|
54 |
53 |
|
55 |
|
// old issn regex
|
56 |
|
// issn : ['', [Validators.pattern('^\\d\\d\\d\\d[-]\\d\\d\\d\\d$')] ],
|
57 |
54 |
readonly groupDefinition = {
|
58 |
55 |
softwarePlatform : ['', Validators.required],
|
59 |
56 |
platformName : '',
|
... | ... | |
143 |
140 |
englishName: this.selectedRepo.englishname,
|
144 |
141 |
logoUrl: this.selectedRepo.logourl,
|
145 |
142 |
timezone: this.selectedRepo.timezone,
|
146 |
|
datasourceType: this.selectedRepo.eoscDatasourceType, // TODO: still needed?
|
|
143 |
datasourceType: this.selectedRepo.eoscDatasourceType, // TODO: still needed? should it be typology? typology exists on that stage?
|
147 |
144 |
adminEmail: this.selectedRepo.contactemail
|
148 |
145 |
});
|
149 |
146 |
|
... | ... | |
247 |
244 |
newRepo.longitude = this.group.get('longtitude').value;
|
248 |
245 |
newRepo.timezone = this.group.get('timezone').value;
|
249 |
246 |
if (this.group.get('softwarePlatform').value !== '') {
|
250 |
|
console.log('1//', this.group.get('softwarePlatform').value);
|
251 |
247 |
newRepo.platform = this.group.get('softwarePlatform').value;
|
252 |
248 |
} else if (this.group.get('platformName').value) {
|
253 |
249 |
newRepo.platform = this.group.get('platformName').value;
|
254 |
|
console.log('2//', this.group.get('platformName').value);
|
255 |
250 |
}
|
256 |
251 |
newRepo.typology = this.group.get('datasourceType').value;
|
257 |
|
// newRepo.eoscDatasourceType = this.datasourceClasses.get(this.group.get('datasourceType').value);
|
258 |
|
// console.warn(newRepo.eoscDatasourceType);
|
259 |
252 |
newRepo.description = this.group.get('repoDescription').value.toString();
|
260 |
253 |
newRepo.issn = '';
|
261 |
254 |
newRepo.eissn = '';
|
... | ... | |
279 |
272 |
|
280 |
273 |
newRepo.registeredby = this.authService.getUserEmail();
|
281 |
274 |
|
282 |
|
/* THE BELOW FIELDS ARE NOT SET IN GWT CODE*/
|
283 |
|
newRepo.eoscDatasourceType = this.mode; // TODO: delete this?
|
284 |
|
console.warn(newRepo.eoscDatasourceType);
|
|
275 |
newRepo.eoscDatasourceType = this.mode; // keep this
|
285 |
276 |
newRepo.managed = true;
|
286 |
277 |
|
287 |
278 |
const now = new Date(Date.now());
|
code cleanup