Compare commits
3 Commits
master
...
fix-commen
Author | SHA1 | Date |
---|---|---|
andreas.mantas | 27b68c0d09 | |
andreas.mantas | 013155d5d8 | |
andreas.mantas | be96f486d1 |
|
@ -35,6 +35,7 @@ export class RepositoryService {
|
|||
|
||||
addInterface(datatype: string, repoId: string, registeredBy: string, comment: string, newInterface: RepositoryInterface): Observable<RepositoryInterface> {
|
||||
let url;
|
||||
comment = newInterface.comments; // temporary fix. TODO: test with backend
|
||||
if (comment == null || comment === '') {
|
||||
url = `${this.apiUrl}addInterface?datatype=${datatype}&repoId=${repoId}®isteredBy=${registeredBy}`;
|
||||
} else {
|
||||
|
@ -47,7 +48,7 @@ export class RepositoryService {
|
|||
|
||||
updateInterface(repoId: string, registeredBy: string, comment: string, interfaceInfo: RepositoryInterface): Observable<RepositoryInterface> {
|
||||
let url;
|
||||
console.log(comment);
|
||||
comment = interfaceInfo.comments; // temporary fix. TODO: test with backend
|
||||
if (comment == null || comment === '') {
|
||||
url = `${this.apiUrl}updateRepositoryInterface?repoId=${repoId}®isteredBy=${registeredBy}`;
|
||||
} else {
|
||||
|
|
|
@ -41,7 +41,6 @@ export class DatasourceCreateFormComponent implements OnInit {
|
|||
countries: Country[] = [];
|
||||
datasourceClasses: Map<string, string> = new Map<string, string>();
|
||||
classCodes: string[] = [];
|
||||
// classCodes: string[] = [];
|
||||
|
||||
@Input() mode: string;
|
||||
|
||||
|
@ -52,8 +51,6 @@ export class DatasourceCreateFormComponent implements OnInit {
|
|||
formSubmitted = false;
|
||||
group: FormGroup;
|
||||
|
||||
// old issn regex
|
||||
// issn : ['', [Validators.pattern('^\\d\\d\\d\\d[-]\\d\\d\\d\\d$')] ],
|
||||
readonly groupDefinition = {
|
||||
softwarePlatform : ['', Validators.required],
|
||||
platformName : '',
|
||||
|
@ -143,7 +140,7 @@ export class DatasourceCreateFormComponent implements OnInit {
|
|||
englishName: this.selectedRepo.englishname,
|
||||
logoUrl: this.selectedRepo.logourl,
|
||||
timezone: this.selectedRepo.timezone,
|
||||
datasourceType: this.selectedRepo.eoscDatasourceType, // TODO: still needed?
|
||||
datasourceType: this.selectedRepo.eoscDatasourceType, // TODO: still needed? should it be typology? typology exists on that stage?
|
||||
adminEmail: this.selectedRepo.contactemail
|
||||
});
|
||||
|
||||
|
@ -247,15 +244,11 @@ export class DatasourceCreateFormComponent implements OnInit {
|
|||
newRepo.longitude = this.group.get('longtitude').value;
|
||||
newRepo.timezone = this.group.get('timezone').value;
|
||||
if (this.group.get('softwarePlatform').value !== '') {
|
||||
console.log('1//', this.group.get('softwarePlatform').value);
|
||||
newRepo.platform = this.group.get('softwarePlatform').value;
|
||||
} else if (this.group.get('platformName').value) {
|
||||
newRepo.platform = this.group.get('platformName').value;
|
||||
console.log('2//', this.group.get('platformName').value);
|
||||
}
|
||||
newRepo.typology = this.group.get('datasourceType').value;
|
||||
// newRepo.eoscDatasourceType = this.datasourceClasses.get(this.group.get('datasourceType').value);
|
||||
// console.warn(newRepo.eoscDatasourceType);
|
||||
newRepo.description = this.group.get('repoDescription').value.toString();
|
||||
newRepo.issn = '';
|
||||
newRepo.eissn = '';
|
||||
|
@ -279,9 +272,7 @@ export class DatasourceCreateFormComponent implements OnInit {
|
|||
|
||||
newRepo.registeredby = this.authService.getUserEmail();
|
||||
|
||||
/* THE BELOW FIELDS ARE NOT SET IN GWT CODE*/
|
||||
newRepo.eoscDatasourceType = this.mode; // TODO: delete this?
|
||||
console.warn(newRepo.eoscDatasourceType);
|
||||
newRepo.eoscDatasourceType = this.mode; // keep this
|
||||
newRepo.managed = true;
|
||||
|
||||
const now = new Date(Date.now());
|
||||
|
|
|
@ -309,8 +309,6 @@ export class DatasourceUpdateFormComponent implements OnInit {
|
|||
console.log('typology ', this.selectedRepo.typology);
|
||||
console.log(this.datasourceClasses);
|
||||
console.log(this.updateGroup.get('datasourceType').value);
|
||||
// this.selectedRepo.eoscDatasourceType = this.datasourceClasses.get(this.updateGroup.get('datasourceType').value);
|
||||
// console.warn(this.selectedRepo.eoscDatasourceType);
|
||||
this.selectedRepo.officialname = this.updateGroup.get('officialName').value.toString();
|
||||
this.selectedRepo.description = this.updateGroup.get('repoDescription').value.toString();
|
||||
this.selectedRepo.organizations[0].country = this.updateGroup.get('country').value; // countryCode
|
||||
|
|
Loading…
Reference in New Issue