Fixes status on DMP and Dataset Listing Items
This commit is contained in:
parent
825f792a5d
commit
237ae94f10
|
@ -14,5 +14,5 @@ export interface DatasetListingModel {
|
||||||
status: Number;
|
status: Number;
|
||||||
created: Date;
|
created: Date;
|
||||||
modified: Date;
|
modified: Date;
|
||||||
finalizedDat: Date;
|
finalizedAt: Date;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,11 +11,13 @@ export interface DmpListingModel {
|
||||||
profile: String;
|
profile: String;
|
||||||
creationTime: String;
|
creationTime: String;
|
||||||
modifiedTime: String;
|
modifiedTime: String;
|
||||||
finalizedDat: Date;
|
publishedAt: Date;
|
||||||
|
finalizedAt: Date;
|
||||||
organisations: String;
|
organisations: String;
|
||||||
groupId: string;
|
groupId: string;
|
||||||
version: number;
|
version: number;
|
||||||
datasets: any[];
|
datasets: any[];
|
||||||
associatedProfiles: any[];
|
associatedProfiles: any[];
|
||||||
users: any[];
|
users: any[];
|
||||||
|
public: boolean;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
<div matTooltip="{{ dataset.profile }}" class="chip ml-2 mr-2">{{ dataset.profile }}</div>
|
<div matTooltip="{{ dataset.profile }}" class="chip ml-2 mr-2">{{ dataset.profile }}</div>
|
||||||
</div>
|
</div>
|
||||||
<p *ngIf="isDraft">{{'DATASET-LISTING.COLUMNS.LAST-EDITED' | translate}} {{ dataset.modified | date: "shortDate"}}</p>
|
<p *ngIf="isDraft">{{'DATASET-LISTING.COLUMNS.LAST-EDITED' | translate}} {{ dataset.modified | date: "shortDate"}}</p>
|
||||||
<p *ngIf="!isDraft">{{'DATASET-LISTING.COLUMNS.PUBLISHED' | translate}} {{ dataset.finalizedDat | date: "shortDate"}}</p>
|
<p *ngIf="!isDraft">{{'DATASET-LISTING.COLUMNS.FINALIZED' | translate}} {{ dataset.finalizedAt | date: "shortDate"}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="info">
|
<!-- <div class="info">
|
||||||
|
|
|
@ -57,7 +57,8 @@
|
||||||
<div matTooltip="{{profile.label}}" class="chip ml-2 mr-2">{{profile.label}}</div>
|
<div matTooltip="{{profile.label}}" class="chip ml-2 mr-2">{{profile.label}}</div>
|
||||||
</div>
|
</div>
|
||||||
<p *ngIf="isDraft">{{'DMP-PROFILE-LISTING.COLUMNS.LAST-EDITED' | translate}} {{dmp.modifiedTime | date: "shortDate"}}</p>
|
<p *ngIf="isDraft">{{'DMP-PROFILE-LISTING.COLUMNS.LAST-EDITED' | translate}} {{dmp.modifiedTime | date: "shortDate"}}</p>
|
||||||
<p *ngIf="!isDraft">{{'DMP-PROFILE-LISTING.COLUMNS.PUBLISHED' | translate}} {{dmp.finalizedDat | date: "shortDate"}}</p>
|
<p *ngIf="isFinalized && !isPublished">{{'TYPES.DMP.FINALISED' | translate}} {{dmp.finalizedAt | date: "shortDate"}}</p>
|
||||||
|
<p *ngIf="isPublished">{{'DMP-PROFILE-LISTING.COLUMNS.PUBLISHED' | translate}} {{dmp.publishedAt | date: "shortDate"}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="row d-flex align-items-center my-1">
|
<!-- <div class="row d-flex align-items-center my-1">
|
||||||
|
|
|
@ -28,6 +28,8 @@ export class DmpListingItemComponent implements OnInit {
|
||||||
@Output() onClick: EventEmitter<DmpListingModel> = new EventEmitter();
|
@Output() onClick: EventEmitter<DmpListingModel> = new EventEmitter();
|
||||||
|
|
||||||
isDraft: boolean;
|
isDraft: boolean;
|
||||||
|
isFinalized: boolean;
|
||||||
|
isPublished: boolean;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private router: Router,
|
private router: Router,
|
||||||
|
@ -38,8 +40,17 @@ export class DmpListingItemComponent implements OnInit {
|
||||||
private translate: TranslateService) { }
|
private translate: TranslateService) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if (this.dmp.status == DmpStatus.Draft) { this.isDraft = true }
|
if (this.dmp.status == DmpStatus.Draft) {
|
||||||
else { this.isDraft = false }
|
this.isDraft = true;
|
||||||
|
this.isFinalized = false;
|
||||||
|
this.isPublished = false;
|
||||||
|
}
|
||||||
|
else if (this.dmp.status == DmpStatus.Finalized) {
|
||||||
|
this.isDraft = false;
|
||||||
|
this.isFinalized = true;
|
||||||
|
this.isPublished = false;
|
||||||
|
if (this.dmp.public == true) { this.isPublished = true }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
openShareDialog(rowId: any, rowName: any) {
|
openShareDialog(rowId: any, rowName: any) {
|
||||||
|
|
|
@ -360,6 +360,7 @@
|
||||||
"DESCRIPTION": "Description",
|
"DESCRIPTION": "Description",
|
||||||
"CREATED": "Created",
|
"CREATED": "Created",
|
||||||
"PUBLISHED": "Published",
|
"PUBLISHED": "Published",
|
||||||
|
"FINALIZED": "Finalized",
|
||||||
"LAST-EDITED": "Last Edited",
|
"LAST-EDITED": "Last Edited",
|
||||||
"ACTIONS": "Actions",
|
"ACTIONS": "Actions",
|
||||||
"DMP": "DMP",
|
"DMP": "DMP",
|
||||||
|
|
Loading…
Reference in New Issue