[Trunk|Library]: Bug fix: In Landing and Search Pages for results (publ, datas, soft, orp), make description string necessarily (may be number).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@55589 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
7e3678bc8a
commit
9719595300
|
@ -64,9 +64,9 @@ export class DatasetService {
|
|||
this.datasetInfo.dateofacceptance = data[0].dateofacceptance;
|
||||
this.datasetInfo.publisher = data[0].publisher;
|
||||
if(!Array.isArray(data[0].description)) {
|
||||
this.datasetInfo.description = data[0].description;
|
||||
this.datasetInfo.description = String(data[0].description);
|
||||
} else {
|
||||
this.datasetInfo.description = data[0].description[0];
|
||||
this.datasetInfo.description = String(data[0].description[0]);
|
||||
}
|
||||
this.datasetInfo.embargoEndDate = data[0].embargoenddate;
|
||||
}
|
||||
|
|
|
@ -61,9 +61,9 @@ export class OrpService {
|
|||
this.orpInfo.dateofacceptance = data[0].dateofacceptance;
|
||||
this.orpInfo.publisher = data[0].publisher;
|
||||
if(!Array.isArray(data[0].description)) {
|
||||
this.orpInfo.description = data[0].description;
|
||||
this.orpInfo.description = String(data[0].description);
|
||||
} else {
|
||||
this.orpInfo.description = data[0].description[0];
|
||||
this.orpInfo.description = String(data[0].description[0]);
|
||||
}
|
||||
this.orpInfo.embargoEndDate = data[0].embargoenddate;
|
||||
}
|
||||
|
|
|
@ -66,9 +66,9 @@ export class PublicationService {
|
|||
this.publicationInfo.dateofacceptance = data[0].dateofacceptance;
|
||||
this.publicationInfo.publisher = data[0].publisher;
|
||||
if(!Array.isArray(data[0].description)) {
|
||||
this.publicationInfo.description = data[0].description;
|
||||
this.publicationInfo.description = String(data[0].description);
|
||||
} else {
|
||||
this.publicationInfo.description = data[0].description[0];
|
||||
this.publicationInfo.description = String(data[0].description[0]);
|
||||
}
|
||||
this.publicationInfo.embargoEndDate = data[0].embargoenddate;
|
||||
}
|
||||
|
|
|
@ -63,9 +63,9 @@ export class SoftwareService {
|
|||
this.softwareInfo.dateofacceptance = data[0].dateofacceptance;
|
||||
this.softwareInfo.publisher = data[0].publisher;
|
||||
if(!Array.isArray(data[0].description)) {
|
||||
this.softwareInfo.description = data[0].description;
|
||||
this.softwareInfo.description = String(data[0].description);
|
||||
} else {
|
||||
this.softwareInfo.description = data[0].description[0];
|
||||
this.softwareInfo.description = String(data[0].description[0]);
|
||||
}
|
||||
this.softwareInfo.embargoEndDate = data[0].embargoenddate;
|
||||
}
|
||||
|
|
|
@ -238,9 +238,9 @@ export class SearchDatasetsService {
|
|||
var date:string = (resData.dateofacceptance)+""; // transform to string in case it is an integer
|
||||
result.year = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date;
|
||||
if(!Array.isArray(resData.description)) {
|
||||
result.description = resData.description;
|
||||
result.description = String(resData.description);
|
||||
} else {
|
||||
result.description = resData.description[0];
|
||||
result.description = String(resData.description[0]);
|
||||
}
|
||||
if(result.description && result.description.length > this.sizeOfDescription) {
|
||||
result.description = result.description.substring(0, this.sizeOfDescription)+"...";
|
||||
|
|
|
@ -243,9 +243,9 @@ export class SearchOrpsService {
|
|||
var date:string = (resData.dateofacceptance)+""; // transform to string in case it is an integer
|
||||
result.year = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date;
|
||||
if(!Array.isArray(resData.description)) {
|
||||
result.description = resData.description;
|
||||
result.description = String(resData.description);
|
||||
} else {
|
||||
result.description = resData.description[0];
|
||||
result.description = String(resData.description[0]);
|
||||
}
|
||||
if(result.description && result.description.length > this.sizeOfDescription) {
|
||||
result.description = result.description.substring(0, this.sizeOfDescription)+"...";
|
||||
|
|
|
@ -275,9 +275,9 @@ export class SearchPublicationsService {
|
|||
result.year = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date;
|
||||
|
||||
if(!Array.isArray(resData.description)) {
|
||||
result.description = resData.description;
|
||||
result.description = String(resData.description);
|
||||
} else {
|
||||
result.description = resData.description[0];
|
||||
result.description = String(resData.description[0]);
|
||||
}
|
||||
|
||||
if(result.description && result.description.length > this.sizeOfDescription) {
|
||||
|
|
|
@ -254,7 +254,7 @@ export class SearchSoftwareService {
|
|||
|
||||
var date:string = (resData.dateofacceptance)+""; // transform to string in case it is an integer
|
||||
result.year = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date;
|
||||
result.description = Array.isArray(resData.description) ? resData.description[0] : resData.description;
|
||||
result.description = Array.isArray(resData.description) ? String(resData.description[0]) : String(resData.description);
|
||||
if(result.description && result.description.length > this.sizeOfDescription) {
|
||||
result.description = result.description.substring(0, this.sizeOfDescription)+"...";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue