Fixes bug on DMP Datasets search, now can add several DMPs on criteria.
This commit is contained in:
parent
aed9d831e9
commit
d37efb528c
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
<mat-form-field class="col-md-3">
|
<mat-form-field class="col-md-3">
|
||||||
<app-multiple-auto-complete placeholder="{{'CRITERIA.DMP.LIKE'| translate}}" name="dmpCriteriaName" [(ngModel)]="criteria.dmpIds"
|
<app-multiple-auto-complete placeholder="{{'CRITERIA.DMP.LIKE'| translate}}" name="dmpCriteriaName" [(ngModel)]="criteria.dmpIds"
|
||||||
(ngModelChange)="controlModified()" [configuration]="dmpAutoCompleteConfiguration" [disabled]="!dmpSearchEnabled"></app-multiple-auto-complete>
|
(ngModelChange)="controlModified()" [configuration]="dmpAutoCompleteConfiguration"></app-multiple-auto-complete>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field class="col-md-3">
|
<mat-form-field class="col-md-3">
|
||||||
|
|
|
@ -52,7 +52,8 @@ export class DatasetListingComponent extends BaseComponent implements OnInit, IB
|
||||||
this.route.params
|
this.route.params
|
||||||
.pipe(takeUntil(this._destroyed))
|
.pipe(takeUntil(this._destroyed))
|
||||||
.subscribe(async (params: Params) => {
|
.subscribe(async (params: Params) => {
|
||||||
this.dmpId = params['dmpId'];
|
const queryParams = this.route.snapshot.queryParams;
|
||||||
|
this.dmpId = queryParams['dmpId'];
|
||||||
this.criteria.setRefreshCallback(() => this.refresh());
|
this.criteria.setRefreshCallback(() => this.refresh());
|
||||||
if (this.dmpId != null) {
|
if (this.dmpId != null) {
|
||||||
this.dmpSearchEnabled = false;
|
this.dmpSearchEnabled = false;
|
||||||
|
|
|
@ -147,7 +147,6 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
||||||
this.formGroup = this.dmp.buildForm();
|
this.formGroup = this.dmp.buildForm();
|
||||||
this.registerFormEventsForDmpProfile(this.dmp.definition);
|
this.registerFormEventsForDmpProfile(this.dmp.definition);
|
||||||
if (!this.editMode || this.dmp.status === Status.Inactive) { this.formGroup.disable(); }
|
if (!this.editMode || this.dmp.status === Status.Inactive) { this.formGroup.disable(); }
|
||||||
|
|
||||||
this.breadCrumbs = Observable.of([
|
this.breadCrumbs = Observable.of([
|
||||||
{
|
{
|
||||||
parentComponentName: 'DmpListingComponent',
|
parentComponentName: 'DmpListingComponent',
|
||||||
|
@ -186,7 +185,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
registerFormEventsForDmpProfile( definitionPropertys?:DmpProfileDefinition): void {
|
registerFormEventsForDmpProfile(definitionPropertys?: DmpProfileDefinition): void {
|
||||||
this.formGroup.get('profile').valueChanges
|
this.formGroup.get('profile').valueChanges
|
||||||
.pipe(takeUntil(this._destroyed))
|
.pipe(takeUntil(this._destroyed))
|
||||||
.subscribe(Option => {
|
.subscribe(Option => {
|
||||||
|
@ -200,7 +199,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
||||||
} else {
|
} else {
|
||||||
this.selectedDmpProfileDefinition = null;
|
this.selectedDmpProfileDefinition = null;
|
||||||
}
|
}
|
||||||
this.selectedDmpProfileDefinition=definitionPropertys;
|
this.selectedDmpProfileDefinition = definitionPropertys;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,8 +221,6 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
||||||
return this.dmpProfileService.getPaged(request).map(x => x.data);
|
return this.dmpProfileService.getPaged(request).map(x => x.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
searchProject(query: string) {
|
searchProject(query: string) {
|
||||||
const projectRequestItem: RequestItem<ProjectCriteria> = new RequestItem();
|
const projectRequestItem: RequestItem<ProjectCriteria> = new RequestItem();
|
||||||
projectRequestItem.criteria = new ProjectCriteria();
|
projectRequestItem.criteria = new ProjectCriteria();
|
||||||
|
@ -245,8 +242,8 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
||||||
this.dmpService.createDmp(this.formGroup.getRawValue())
|
this.dmpService.createDmp(this.formGroup.getRawValue())
|
||||||
.pipe(takeUntil(this._destroyed))
|
.pipe(takeUntil(this._destroyed))
|
||||||
.subscribe(
|
.subscribe(
|
||||||
complete => this.onCallbackSuccess(),
|
complete => this.onCallbackSuccess(),
|
||||||
error => this.onCallbackError(error)
|
error => this.onCallbackError(error)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,8 +334,8 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
||||||
this.dmpService.delete(this.dmp.id)
|
this.dmpService.delete(this.dmp.id)
|
||||||
.pipe(takeUntil(this._destroyed))
|
.pipe(takeUntil(this._destroyed))
|
||||||
.subscribe(
|
.subscribe(
|
||||||
complete => { this.onCallbackSuccess() },
|
complete => { this.onCallbackSuccess() },
|
||||||
error => this.onDeleteCallbackError(error)
|
error => this.onDeleteCallbackError(error)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -367,7 +364,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
||||||
}
|
}
|
||||||
|
|
||||||
redirectToDatasets() {
|
redirectToDatasets() {
|
||||||
this.router.navigate(['datasets/dmp/' + this.dmp.id]);
|
this.router.navigate(['datasets'], { queryParams: { dmpId: this.dmp.id } });
|
||||||
}
|
}
|
||||||
|
|
||||||
newVersion(id: String, label: String) {
|
newVersion(id: String, label: String) {
|
||||||
|
@ -467,6 +464,4 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue