Navigate to dmp publicOverview from dataset overview when view is public

This commit is contained in:
gpapavgeri 2020-08-06 12:46:15 +03:00
parent b3b9de6979
commit 8fde8a684c
2 changed files with 8 additions and 3 deletions

View File

@ -65,7 +65,7 @@
</div> </div>
<div class="row header">{{'DATASET-LISTING.TOOLTIP.PART-OF' | translate}}</div> <div class="row header">{{'DATASET-LISTING.TOOLTIP.PART-OF' | translate}}</div>
<div class="row "> <div class="row ">
<button class="dmp-btn" (click)="dmpClicked(dataset.dmp.id)"> <button class="dmp-btn" (click)="dmpClicked(dataset.dmp)">
<div class="dmp-btn-label"> <div class="dmp-btn-label">
{{ this.dataset.dmp.label }} {{ this.dataset.dmp.label }}
</div> </div>

View File

@ -30,6 +30,7 @@ import { ResearcherModel } from '@app/core/model/researcher/researcher';
import { LockService } from '@app/core/services/lock/lock.service'; import { LockService } from '@app/core/services/lock/lock.service';
import { DatasetWizardModel } from '@app/core/model/dataset/dataset-wizard'; import { DatasetWizardModel } from '@app/core/model/dataset/dataset-wizard';
import { DmpStatus } from '@app/core/common/enum/dmp-status'; import { DmpStatus } from '@app/core/common/enum/dmp-status';
import { DmpOverviewModel } from '@app/core/model/dmp/dmp-overview';
@Component({ @Component({
@ -269,8 +270,12 @@ export class DatasetOverviewComponent extends BaseComponent implements OnInit {
}); });
} }
dmpClicked(dmpId: String) { dmpClicked(dmp: DmpOverviewModel) {
this.router.navigate(['/plans/overview/' + dmpId]); if (this.isPublicView) {
this.router.navigate(['/explore-plans/publicOverview/' + dmp.id]);
} else {
this.router.navigate(['/plans/overview/' + dmp.id]);
}
} }
onDeleteCallbackSuccess(): void { onDeleteCallbackSuccess(): void {