dmp&dataset overview: 'remove user from dmp' update

This commit is contained in:
gpapavgeri 2020-07-09 16:01:49 +03:00
parent 052430d97c
commit dd0f158769
2 changed files with 15 additions and 7 deletions

View File

@ -49,8 +49,7 @@ export class DatasetOverviewComponent extends BaseComponent implements OnInit {
hasDOIToken = false;
researchers: ResearcherModel[];
users: UserInfoListingModel[];
lockStatus = false;
// lockStatus: Boolean;
lockStatus: Boolean;
constructor(
private route: ActivatedRoute,
@ -92,7 +91,7 @@ export class DatasetOverviewComponent extends BaseComponent implements OnInit {
.subscribe(data => {
this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(data);
});
// this.checkLockStatus(this.dataset.id);
this.checkLockStatus(this.dataset.id);
this.setIsUserOwner();
const breadCrumbs = [];
breadCrumbs.push({ parentComponentName: null, label: this.language.instant('NAV-BAR.MY-DATASET-DESCRIPTIONS'), url: "/datasets" });
@ -121,7 +120,7 @@ export class DatasetOverviewComponent extends BaseComponent implements OnInit {
.subscribe(data => {
this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(data);
});
// this.checkLockStatus(this.dataset.id);
this.checkLockStatus(this.dataset.id);
this.setIsUserOwner();
const breadCrumbs = [];
breadCrumbs.push({ parentComponentName: null, label: this.language.instant('NAV-BAR.PUBLIC DATASETS'), url: "/explore" });
@ -158,7 +157,7 @@ export class DatasetOverviewComponent extends BaseComponent implements OnInit {
this.location.back();
}
reloadComponent(): void {
reloadPage(): void {
this.router.navigateByUrl('/datasets', { skipLocationChange: true }).then(() => {
this.router.navigate([`/datasets/overview/${this.dataset.id}`]);
});
@ -394,7 +393,7 @@ export class DatasetOverviewComponent extends BaseComponent implements OnInit {
.subscribe(
complete => {
this.onCallbackSuccess();
this.reloadComponent();
this.reloadPage();
},
error => this.onDeleteCallbackError(error)
);

View File

@ -577,10 +577,19 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
this.location.back();
}
reloadPage(): void {
this.router.navigateByUrl('/plans', { skipLocationChange: true }).then(() => {
this.router.navigate([`/plans/overview/${this.dmp.id}`]);
});
}
updateUsers() {
return this.dmpService.updateUsers(this.dmp.id, this.dmp.users).pipe(takeUntil(this._destroyed))
.subscribe(
complete => { this.onCallbackSuccess() },
complete => {
this.onCallbackSuccess();
this.reloadPage();
},
error => this.onDeleteCallbackError(error)
);
}