Adds descending ordering and sorting by finalized date where published DMP is requested.
This commit is contained in:
parent
3f117d4a0f
commit
26f28bca55
|
@ -148,7 +148,7 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC
|
|||
getPublicDmps() {
|
||||
const dmpCriteria = new ExploreDmpCriteriaModel();
|
||||
const fields: Array<string> = new Array<string>();
|
||||
fields.push('asc');
|
||||
fields.push('-finalizedAt');
|
||||
const dataTableRequest: DataTableRequest<ExploreDmpCriteriaModel> = new DataTableRequest(0, 2, { fields: fields });
|
||||
dataTableRequest.criteria = dmpCriteria;
|
||||
return this.dmpService.getPublicPaged(dataTableRequest, "listing").pipe(takeUntil(this._destroyed)).subscribe(result => { this.dmpListingItems = result.data; });
|
||||
|
|
|
@ -306,7 +306,7 @@ export class ExploreDatasetFiltersComponent extends BaseComponent implements OnI
|
|||
|
||||
filterDmps(value: string): Observable<DataTableData<DmpListingModel>> {
|
||||
const fields: Array<string> = new Array<string>();
|
||||
fields.push('asc');
|
||||
fields.push('-finalizedAt');
|
||||
const dmpDataTableRequest: DataTableRequest<ExploreDmpCriteriaModel> = new DataTableRequest(0, null, { fields: fields });
|
||||
dmpDataTableRequest.criteria = new ExploreDatasetCriteriaModel();
|
||||
dmpDataTableRequest.criteria.like = value;
|
||||
|
|
|
@ -22,7 +22,7 @@ import { TranslateService } from "@ngx-translate/core";
|
|||
export class ExploreDmpListingComponent extends BaseComponent implements OnInit, IBreadCrumbComponent {
|
||||
|
||||
@ViewChild(MatPaginator, { static: true }) _paginator: MatPaginator;
|
||||
@ViewChild(MatSort, { static: false }) sort: MatSort;
|
||||
sort = new MatSort();
|
||||
|
||||
exploreDmpCriteriaModel: ExploreDmpCriteriaModel;
|
||||
titlePrefix: string;
|
||||
|
@ -37,6 +37,8 @@ export class ExploreDmpListingComponent extends BaseComponent implements OnInit,
|
|||
private language: TranslateService,
|
||||
) {
|
||||
super();
|
||||
this.sort.direction = 'desc';
|
||||
this.sort.active = "publishedAt";
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<div *ngFor="let profile of dmp.associatedProfiles" class="pt-1">
|
||||
<div matTooltip="{{profile.label}}" class="chip ml-2 mr-2">{{profile.label}}</div>
|
||||
</div>
|
||||
<p>{{'DMP-PROFILE-LISTING.COLUMNS.PUBLISHED' | translate}} {{dmp.creationTime | date: "shortDate"}}</p>
|
||||
<p>{{'DMP-PROFILE-LISTING.COLUMNS.PUBLISHED' | translate}} {{dmp.finalizedAt | date: "shortDate"}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue