Fixes Dashboard bug on column status. (Issue #164)

This commit is contained in:
apapachristou 2019-09-23 16:39:13 +03:00
parent 1d5342fc52
commit 8a653ec198
2 changed files with 21 additions and 19 deletions

View File

@ -24,30 +24,32 @@
<th></th>
</thead>
<tbody *ngIf="dmpActivities != null">
<tr (click)="redirect(activity.id, recentActivityTypeEnum.Dmp)" *ngFor="let activity of dmpActivities"
style="cursor: pointer;">
<tr (click)="redirect(activity.id, recentActivityTypeEnum.Dmp)" *ngFor="let activity of dmpActivities" style="cursor: pointer;">
<td>{{ activity.label }}</td>
<td>
<div matTooltip="{{ dmpProfileDisplay(activity.profile) }}" class="template-name">
{{ dmpProfileDisplay(activity.profile) }}
<div *ngIf="activity.profile" matTooltip="{{ activity.profile }}" class="template-name">
{{ activity.profile }}
</div>
<div *ngIf="!(activity.profile)" class="template-name">--</div>
</td>
<td>{{ activity.grant }}</td>
<td>{{roleDisplay(activity.users)}}</td>
<td>{{ roleDisplay(activity.users)}}</td>
<td>{{ activity.organisations }}</td>
<td *ngIf="activity.status === 1">
<td *ngIf="activity.status === 1 && activity.public === true">
<div class="is-public">
{{ enumUtils.toDmpStatusString(activity.status) }}
{{'TYPES.DMP-VISIBILITY.PUBLIC' | translate}}
</div>
</td>
<td *ngIf="activity.status === 0" style="padding-left: 12px">
<td *ngIf="activity.status === 1 && activity.public === false" class="text-center">
{{ enumUtils.toDmpStatusString(activity.status) }}
</td>
<td style="padding-left: 12px">{{ activity.modifiedTime | date: "shortDate" }}</td>
<td *ngIf="activity.status === 0" class="text-center">
{{ enumUtils.toDmpStatusString(activity.status) }}
</td>
<td>{{ activity.modifiedTime | date: "shortDate" }}</td>
<td>
<!-- <i class="material-icons more-icon">more_horiz</i> -->
<button mat-icon-button [matMenuTriggerFor]="actionsMenu" class="ml-auto more-icon"
(click)="$event.stopImmediatePropagation();">
<button mat-icon-button [matMenuTriggerFor]="actionsMenu" class="ml-auto more-icon" (click)="$event.stopImmediatePropagation();">
<mat-icon class="more-horiz">more_horiz</mat-icon>
</button>
<mat-menu #actionsMenu="matMenu">

View File

@ -164,14 +164,14 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn
}
}
dmpProfileDisplay(value: any) {
if (value != null) {
return value;
}
else {
return "--";
}
}
// dmpProfileDisplay(value: any) {
// if (value != null) {
// return value;
// }
// else {
// return "--";
// }
// }
downloadXml(id: string) {
this.dmpService.downloadXML(id)