Revision 62434
Added by Andreas Mantas over 1 year ago
datasource-create-form.component.ts | ||
---|---|---|
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 : '', |
... | ... | |
63 | 60 |
lissn : ['', Validators.pattern('^(\\d{4}-?\\d{3}[\\dxX])$') ], |
64 | 61 |
repoDescription : ['', Validators.required], |
65 | 62 |
country : ['', Validators.required], |
66 |
longtitude : ['', [Validators.required, Validators.min(-180), Validators.max(180)] ],
|
|
67 |
latitude : ['', [Validators.required, Validators.min(-90), Validators.max(90)] ],
|
|
63 |
longtitude : ['', [Validators.min(-180), Validators.max(180)] ], |
|
64 |
latitude : ['', [Validators.min(-90), Validators.max(90)] ], |
|
68 | 65 |
websiteUrl : ['', [Validators.required, Validators.pattern('^(http:\\/\\/www\\.|https:\\/\\/www\\.|http:\\/\\/|https:\\/\\/)?[a-z0-9]+([\\-\\.]{1}[a-z0-9]+)*\\.[a-z]{2,5}(:[0-9]{1,5})?(\\/.*)?$')] ], |
69 | 66 |
institutionName : ['', Validators.required], |
70 | 67 |
englishName: ['', Validators.required], |
... | ... | |
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()); |
Also available in: Unified diff
fix emailing interface comments and cleanup