Project

General

Profile

« Previous | Next » 

Revision 62372

fixed undefined organizations and apiParams

View differences:

modules/uoa-repository-dashboard-gui/branches/new-datasource-mode/src/app/domain/typeScriptClasses.ts
105 105
  aggregator: string;
106 106
  collectedfrom: string;
107 107
  managed: boolean;
108
  registrationdate: Date;
109
  consentTermsOfUseDate: Date;
110
  lastConsentTermsOfUseDate: Date;
108 111
  consentTermsOfUse: boolean;
109 112
  fullTextDownload: boolean;
110
  consentTermsOfUseDate: Date;
111
  lastConsentTermsOfUseDate: Date;
112
  organizations: OrganizationDetails[];
113
  organizations: OrganizationDetails[] = new Array<OrganizationDetails>();
113 114
  identities: IdentitiesDetails[];
114 115
  status: string;
115 116
  typology: string;
116
  registrationdate: Date;
117 117
}
118 118

  
119 119
export class Repository extends DatasourceDetails implements IsSerializable {
......
226 226
  lastDownloadDate: Date;
227 227
  baseurl: string;
228 228
  removable: boolean;
229
  apiParams: ApiParamDetails[];
229
  apiParams: ApiParamDetails[] = new Array<ApiParamDetails>();
230 230
  metadataIdentifierPath: string;
231 231
  typology: string;
232 232
  comments: string;
modules/uoa-repository-dashboard-gui/branches/new-datasource-mode/src/app/shared/reusablecomponents/sources-forms/datasource-create-form.component.ts
227 227
  }
228 228

  
229 229
  createNewRepository(): Repository {
230
    const newRepo: Repository = new Repository();
230
    const newRepo = new Repository();
231 231
    newRepo.officialName = this.group.get('officialName').value.toString();
232 232
    newRepo.englishName = this.group.get('englishName').value.toString();
233 233
    newRepo.websiteUrl = this.group.get('websiteUrl').value;
234 234
    newRepo.logoUrl = this.group.get('logoUrl').value;
235 235
    newRepo.contactEmail = this.group.get('adminEmail').value;
236
    newRepo.organizations[0].country = this.group.get('country').value; // countryCode
237
    newRepo.organizations[0].legalname = this.group.get('institutionName').value.toString();
236
    newRepo.organizations.push({
237
      legalshortname: null,
238
      legalname: this.group.get('institutionName').value.toString(),
239
      websiteurl: null,
240
      logourl: null,
241
      country: this.group.get('country').value
242
    });
238 243
    newRepo.latitude = this.group.get('latitude').value;
239 244
    newRepo.longitude = this.group.get('longtitude').value;
240 245
    newRepo.timezone = this.group.get('timezone').value;

Also available in: Unified diff