Merge branch 'ui-redesign' of gitlab.eudat.eu:dmp/OpenAIRE-EUDAT-DMP-service-pilot into ui-redesign
This commit is contained in:
commit
d7fef01391
|
@ -177,6 +177,9 @@ public class DataManagementPlanOverviewModel implements DataModel<DMP, DataManag
|
|||
this.label = entity.getLabel();
|
||||
this.groupId = entity.getGroupId();
|
||||
this.status = entity.getStatus();
|
||||
if (entity.getResearchers() != null) {
|
||||
this.researchers = entity.getResearchers().stream().map(item -> new Researcher().fromDataModel(item)).collect(Collectors.toList());
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -192,7 +195,9 @@ public class DataManagementPlanOverviewModel implements DataModel<DMP, DataManag
|
|||
this.datasets = entity.getDataset().stream().filter(dataset -> !dataset.getStatus().equals(Dataset.Status.DELETED.getValue()) && !dataset.getStatus().equals(Dataset.Status.CANCELED.getValue())).map(x-> new DatasetOverviewModel().fromDataModel(x)).collect(Collectors.toList());
|
||||
this.users = entity.getUsers().stream().map(x -> new UserInfoListingModel().fromDataModel(x)).collect(Collectors.toList());
|
||||
this.description = entity.getDescription();
|
||||
if (entity.getResearchers() != null) {
|
||||
this.researchers = entity.getResearchers().stream().map(item -> new Researcher().fromDataModel(item)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
if (entity.getAssociatedDmps() != null && !entity.getAssociatedDmps().isEmpty()) {
|
||||
this.associatedProfiles = new LinkedList<>();
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
</div>
|
||||
<div class="row header">{{'DATASET-LISTING.TOOLTIP.PART-OF' | translate}}</div>
|
||||
<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">
|
||||
{{ this.dataset.dmp.label }}
|
||||
</div>
|
||||
|
|
|
@ -30,6 +30,7 @@ import { ResearcherModel } from '@app/core/model/researcher/researcher';
|
|||
import { LockService } from '@app/core/services/lock/lock.service';
|
||||
import { DatasetWizardModel } from '@app/core/model/dataset/dataset-wizard';
|
||||
import { DmpStatus } from '@app/core/common/enum/dmp-status';
|
||||
import { DmpOverviewModel } from '@app/core/model/dmp/dmp-overview';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -269,8 +270,12 @@ export class DatasetOverviewComponent extends BaseComponent implements OnInit {
|
|||
});
|
||||
}
|
||||
|
||||
dmpClicked(dmpId: String) {
|
||||
this.router.navigate(['/plans/overview/' + dmpId]);
|
||||
dmpClicked(dmp: DmpOverviewModel) {
|
||||
if (this.isPublicView) {
|
||||
this.router.navigate(['/explore-plans/publicOverview/' + dmp.id]);
|
||||
} else {
|
||||
this.router.navigate(['/plans/overview/' + dmp.id]);
|
||||
}
|
||||
}
|
||||
|
||||
onDeleteCallbackSuccess(): void {
|
||||
|
|
Loading…
Reference in New Issue