Compare commits

...

3 Commits

Author SHA1 Message Date
andreas.mantas 27b68c0d09 fix interface comments 2022-08-24 18:04:36 +00:00
andreas.mantas 013155d5d8 code cleanup 2022-08-24 17:53:18 +00:00
andreas.mantas be96f486d1 create branch fix-comments 2022-08-05 10:11:35 +00:00
3 changed files with 4 additions and 14 deletions

View File

@ -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}&registeredBy=${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}&registeredBy=${registeredBy}`;
} else {

View File

@ -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());

View File

@ -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