Fixed issue with DMP filter on public datasets
This commit is contained in:
parent
7de37fa453
commit
08f7d4aca4
|
@ -232,17 +232,21 @@ export class DatasetCriteriaComponent extends BaseCriteriaComponent implements O
|
||||||
const fields: Array<string> = new Array<string>();
|
const fields: Array<string> = new Array<string>();
|
||||||
fields.push('asc');
|
fields.push('asc');
|
||||||
|
|
||||||
if (this.isPublic) {
|
// if (this.isPublic) {
|
||||||
const dmpDataTableRequest: DataTableRequest<ExploreDmpCriteriaModel> = new DataTableRequest(0, null, { fields: fields });
|
// const dmpDataTableRequest: DataTableRequest<ExploreDmpCriteriaModel> = new DataTableRequest(0, null, { fields: fields });
|
||||||
dmpDataTableRequest.criteria = new ExploreDmpCriteriaModel();
|
// dmpDataTableRequest.criteria = new ExploreDmpCriteriaModel();
|
||||||
dmpDataTableRequest.criteria.like = value;
|
// dmpDataTableRequest.criteria.like = value;
|
||||||
return this.dmpService.getPublicPaged(dmpDataTableRequest, "autocomplete");
|
// return this.dmpService.getPublicPaged(dmpDataTableRequest, "autocomplete");
|
||||||
} else {
|
// } else {
|
||||||
const dmpDataTableRequest: DataTableRequest<DmpCriteria> = new DataTableRequest(0, null, { fields: fields });
|
const dmpDataTableRequest: DataTableRequest<DmpCriteria> = new DataTableRequest(0, null, { fields: fields });
|
||||||
dmpDataTableRequest.criteria = new DmpCriteria();
|
dmpDataTableRequest.criteria = new DmpCriteria();
|
||||||
dmpDataTableRequest.criteria.like = value;
|
dmpDataTableRequest.criteria.like = value;
|
||||||
return this.dmpService.getPaged(dmpDataTableRequest, "autocomplete");
|
if (this.isPublic) {
|
||||||
|
dmpDataTableRequest.criteria.isPublic = true;
|
||||||
|
dmpDataTableRequest.criteria.onlyPublic = true;
|
||||||
}
|
}
|
||||||
|
return this.dmpService.getPaged(dmpDataTableRequest, "autocomplete");
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
filterGrant(query: string) {
|
filterGrant(query: string) {
|
||||||
|
|
Loading…
Reference in New Issue