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

View File

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