minor fixes
This commit is contained in:
parent
7c2a3b298d
commit
e85c0cc68f
|
@ -120,11 +120,12 @@ public class RemoteFetcher {
|
|||
|
||||
private List<Map<String, String>> getAll(List<UrlConfiguration> urlConfigs, FetchStrategy fetchStrategy, ExternalUrlCriteria externalUrlCriteria) throws NoURLFound, HugeResultSet {
|
||||
|
||||
if (urlConfigs == null || urlConfigs.isEmpty())
|
||||
throw new NoURLFound("No Repository urls found in configuration");
|
||||
List<Map<String, String>> results = new LinkedList<>();
|
||||
|
||||
if (urlConfigs == null || urlConfigs.isEmpty()) return results;
|
||||
// throw new NoURLFound("No Repository urls found in configuration");
|
||||
|
||||
urlConfigs.sort(Comparator.comparing(UrlConfiguration::getOrdinal));
|
||||
List<Map<String, String>> results = new LinkedList<>();
|
||||
for (UrlConfiguration urlConfig : urlConfigs) {
|
||||
ifFunderQueryExist(urlConfig, externalUrlCriteria);
|
||||
if (urlConfig.getType() == null || urlConfig.getType().equals("External")) {
|
||||
|
|
|
@ -156,7 +156,7 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC
|
|||
getPublicDatasets() {
|
||||
const dmpCriteria = new ExploreDatasetCriteriaModel();
|
||||
const fields: Array<string> = new Array<string>();
|
||||
fields.push('asc');
|
||||
fields.push('-modified');
|
||||
const dataTableRequest: DataTableRequest<ExploreDatasetCriteriaModel> = new DataTableRequest(0, 4, { fields: fields });
|
||||
dataTableRequest.criteria = dmpCriteria;
|
||||
return this.datasetService.getPublicPaged(dataTableRequest).pipe(takeUntil(this._destroyed)).subscribe(result => { this.datasetListingItems = result.data; });
|
||||
|
|
|
@ -27,6 +27,7 @@ export class DraftsComponent implements OnInit {
|
|||
|
||||
ngOnInit() {
|
||||
const fields: Array<string> = [];
|
||||
fields.push('-modified');
|
||||
const dmpDataTableRequest: DataTableRequest<DatasetCriteria> = new DataTableRequest(0, 2, { fields: fields });
|
||||
dmpDataTableRequest.criteria = new DatasetCriteria();
|
||||
dmpDataTableRequest.criteria.status = DmpStatus.Draft;
|
||||
|
|
|
@ -94,7 +94,8 @@ export class DatasetListingComponent extends BaseComponent implements OnInit, IB
|
|||
if (resetPages) this._paginator.pageIndex = 0;
|
||||
const startIndex = this._paginator.pageIndex * this._paginator.pageSize;
|
||||
let fields: Array<string> = new Array();
|
||||
if (this.sort && this.sort.active) { fields = this.sort.direction === 'asc' ? ['+' + this.sort.active] : ['-' + this.sort.active]; }
|
||||
fields.push('-modified');
|
||||
//if (this.sort && this.sort.active) { fields = this.sort.direction === 'asc' ? ['+' + this.sort.active] : ['-' + this.sort.active]; }
|
||||
const request = new DataTableRequest<DatasetCriteria>(startIndex, this._paginator.pageSize, { fields: fields });
|
||||
let value = this.criteria.formGroup.value;
|
||||
request.criteria = {
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
{{formGroup.get('profiles').getError('backendError').message}}</mat-error>
|
||||
<mat-error *ngIf="formGroup.get('profiles').hasError('required')">
|
||||
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
<button matSuffix class="input-btn" [disabled]="formGroup.get('profiles').disabled" (click)="availableProfiles()">
|
||||
<button matSuffix class="input-btn" [disabled]="formGroup.get('profiles').disabled" (click)="availableProfiles($event)">
|
||||
<mat-icon class="icon-btn">view_list</mat-icon>
|
||||
</button>
|
||||
</mat-form-field>
|
||||
|
@ -56,7 +56,7 @@
|
|||
{{formGroup.get('researchers').getError('backendError').message}}</mat-error>
|
||||
<mat-error *ngIf="formGroup.get('researchers').hasError('required')">
|
||||
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
<button matSuffix class="input-btn" [disabled]="formGroup.get('researchers').disabled" type="button" (click)="addResearcher()">
|
||||
<button matSuffix class="input-btn" [disabled]="formGroup.get('researchers').disabled" type="button" (click)="addResearcher($event)">
|
||||
<mat-icon class="icon-btn">add_circle</mat-icon>
|
||||
</button>
|
||||
</mat-form-field>
|
||||
|
|
|
@ -142,25 +142,30 @@ export class GeneralTabComponent extends BaseComponent implements OnInit {
|
|||
return this._service.searchDMPProfiles(request);
|
||||
}
|
||||
|
||||
addResearcher() {
|
||||
addResearcher(event: MouseEvent) {
|
||||
event.stopPropagation();
|
||||
const dialogRef = this.dialog.open(AddResearcherComponent, {
|
||||
data: this.formGroup.get('researchers')
|
||||
});
|
||||
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
|
||||
if (result) {
|
||||
const fullName = result.firstName + " " + result.lastName;
|
||||
this.formGroup.get('researchers').value.push({
|
||||
const newItem = {
|
||||
label: null,
|
||||
name: fullName,
|
||||
id: "dmp:" + fullName,
|
||||
status: 0,
|
||||
tag: "Internal",
|
||||
});
|
||||
};
|
||||
const researchersArray = this.formGroup.get('researchers').value || [];
|
||||
researchersArray.push(newItem);
|
||||
this.formGroup.get('researchers').setValue(researchersArray);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
availableProfiles() {
|
||||
availableProfiles(event: MouseEvent) {
|
||||
event.stopPropagation();
|
||||
const dialogRef = this.dialog.open(AvailableProfilesComponent, {
|
||||
data: {
|
||||
profiles: this.formGroup.get('profiles')
|
||||
|
|
|
@ -108,7 +108,8 @@ export class DmpListingComponent extends BaseComponent implements OnInit, IBread
|
|||
if (resetPages) this._paginator.pageIndex = 0;
|
||||
const startIndex = this._paginator.pageIndex * this._paginator.pageSize;
|
||||
let fields: Array<string> = new Array();
|
||||
if (this.sort && this.sort.active) { fields = this.sort.direction === 'asc' ? ['+' + this.sort.active] : ['-' + this.sort.active]; }
|
||||
// if (this.sort && this.sort.active) { fields = this.sort.direction === 'asc' ? ['+' + this.sort.active] : ['-' + this.sort.active]; }
|
||||
fields.push('-modified');
|
||||
const request = new DataTableRequest<DmpCriteria>(startIndex, this._paginator.pageSize, { fields: fields });
|
||||
let value = this.criteria.formGroup.value;
|
||||
request.criteria = {
|
||||
|
|
Loading…
Reference in New Issue