Merge branch 'ui-redesign' of gitlab.eudat.eu:dmp/OpenAIRE-EUDAT-DMP-service-pilot into ui-redesign
This commit is contained in:
commit
2cd03e30f8
|
@ -19,7 +19,7 @@ public abstract class RecentActivityModel<T> {
|
||||||
private Date finalizedAt;
|
private Date finalizedAt;
|
||||||
private Date publishedAt;
|
private Date publishedAt;
|
||||||
private String profile;
|
private String profile;
|
||||||
private RecentActivityType type;
|
private int type;
|
||||||
private List<UserInfoListingModel> users;
|
private List<UserInfoListingModel> users;
|
||||||
private Boolean isPublic;
|
private Boolean isPublic;
|
||||||
|
|
||||||
|
@ -127,11 +127,11 @@ public abstract class RecentActivityModel<T> {
|
||||||
this.profile = profile;
|
this.profile = profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RecentActivityType getType() {
|
public int getType() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setType(RecentActivityType type) {
|
public void setType(int type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ public abstract class RecentActivityModel<T> {
|
||||||
public abstract RecentActivityModel fromEntity(T entity);
|
public abstract RecentActivityModel fromEntity(T entity);
|
||||||
|
|
||||||
public enum RecentActivityType {
|
public enum RecentActivityType {
|
||||||
DMP(1), DATASET(2);
|
DMP(2), DATASET(1);
|
||||||
|
|
||||||
private final int index;
|
private final int index;
|
||||||
|
|
||||||
|
@ -168,9 +168,9 @@ public abstract class RecentActivityModel<T> {
|
||||||
|
|
||||||
public static RecentActivityType fromIndex(int index) {
|
public static RecentActivityType fromIndex(int index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 1:
|
|
||||||
return DMP;
|
|
||||||
case 2:
|
case 2:
|
||||||
|
return DMP;
|
||||||
|
case 1:
|
||||||
return DATASET;
|
return DATASET;
|
||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException("Recent Activity Type : \"" + index + "\" is not supported.");
|
throw new IllegalArgumentException("Recent Activity Type : \"" + index + "\" is not supported.");
|
||||||
|
|
|
@ -58,6 +58,7 @@ public class RecentDatasetModel extends RecentActivityModel<Dataset> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RecentActivityModel fromEntity(Dataset entity) {
|
public RecentActivityModel fromEntity(Dataset entity) {
|
||||||
|
this.setType(RecentActivityType.DATASET.getIndex());
|
||||||
this.setId(entity.getId().toString());
|
this.setId(entity.getId().toString());
|
||||||
this.setTitle(entity.getLabel());
|
this.setTitle(entity.getLabel());
|
||||||
this.setDescription(entity.getDescription());
|
this.setDescription(entity.getDescription());
|
||||||
|
@ -82,7 +83,7 @@ public class RecentDatasetModel extends RecentActivityModel<Dataset> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public RecentDatasetModel fromDmpEntity(Dataset entity) {
|
public RecentDatasetModel fromDmpEntity(Dataset entity) {
|
||||||
this.setType(RecentActivityType.DATASET);
|
this.setType(RecentActivityType.DATASET.getIndex());
|
||||||
this.setId(entity.getId().toString());
|
this.setId(entity.getId().toString());
|
||||||
this.setTitle(entity.getLabel());
|
this.setTitle(entity.getLabel());
|
||||||
this.setDescription(entity.getDescription());
|
this.setDescription(entity.getDescription());
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class RecentDmpModel extends RecentActivityModel<DMP> {
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public RecentActivityModel fromEntity(DMP entity) {
|
public RecentActivityModel fromEntity(DMP entity) {
|
||||||
this.setType(RecentActivityType.DMP);
|
this.setType(RecentActivityType.DMP.getIndex());
|
||||||
this.setId(entity.getId().toString());
|
this.setId(entity.getId().toString());
|
||||||
this.setTitle(entity.getLabel());
|
this.setTitle(entity.getLabel());
|
||||||
this.setDescription(entity.getDescription());
|
this.setDescription(entity.getDescription());
|
||||||
|
|
|
@ -5,7 +5,7 @@ import eu.eudat.criteria.RecentActivityCriteria;
|
||||||
public class RecentActivityTableRequest {
|
public class RecentActivityTableRequest {
|
||||||
private RecentActivityCriteria criteria;
|
private RecentActivityCriteria criteria;
|
||||||
private int offset;
|
private int offset;
|
||||||
private int size;
|
private int length;
|
||||||
|
|
||||||
public int getOffset() {
|
public int getOffset() {
|
||||||
return offset;
|
return offset;
|
||||||
|
@ -15,12 +15,12 @@ public class RecentActivityTableRequest {
|
||||||
this.offset = offset;
|
this.offset = offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSize() {
|
public int getLength() {
|
||||||
return size;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSize(int size) {
|
public void setLength(int length) {
|
||||||
this.size = size;
|
this.length = length;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RecentActivityCriteria getCriteria() {
|
public RecentActivityCriteria getCriteria() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div *ngIf="allRecentActivities != null">
|
<div *ngIf="allRecentActivities != null">
|
||||||
<div *ngFor="let activity of allRecentActivities">
|
<div *ngFor="let activity of allRecentActivities">
|
||||||
<div *ngIf="activity && activity.type === recentActivityTypeEnum.Dmp">
|
<div *ngIf="activity && activity.type === recentActivityTypeEnum.Dmp.valueOf()">
|
||||||
<div class="dmp-card">
|
<div class="dmp-card">
|
||||||
<div [routerLink]="['../plans/overview/' + activity.id]" class="pointer">
|
<div [routerLink]="['../plans/overview/' + activity.id]" class="pointer">
|
||||||
<div class="d-flex flex-direction-row">
|
<div class="d-flex flex-direction-row">
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
</mat-menu>
|
</mat-menu>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="activity && activity.type === recentActivityTypeEnum.Dataset">
|
<div *ngIf="activity && activity.type === recentActivityTypeEnum.Dataset.valueOf()">
|
||||||
<div class="dataset-card">
|
<div class="dataset-card">
|
||||||
<div>
|
<div>
|
||||||
<!-- <div [routerLink]="['../datasets/overview/' + activity.id]"> -->
|
<!-- <div [routerLink]="['../datasets/overview/' + activity.id]"> -->
|
||||||
|
|
Loading…
Reference in New Issue