From e2cf8655d85af8833f1ddd29cd60110f0d86ec9e Mon Sep 17 00:00:00 2001 From: Eugenio Romano Date: Mon, 22 Oct 2018 13:48:36 +0100 Subject: [PATCH] fix task header component duplicate (#3909) --- .../components/task-header.component.ts | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/lib/process-services/task-list/components/task-header.component.ts b/lib/process-services/task-list/components/task-header.component.ts index d48f23d625..40dfbf64e3 100644 --- a/lib/process-services/task-list/components/task-header.component.ts +++ b/lib/process-services/task-list/components/task-header.component.ts @@ -133,24 +133,10 @@ export class TaskHeaderComponent implements OnChanges, OnInit { key: 'created' } ), - new CardViewDateItemModel( - { - label: 'ADF_TASK_LIST.PROPERTIES.END_DATE', - value: this.taskDetails.endDate, - key: 'endDate' - } - ), - new CardViewTextItemModel( - { - label: 'ADF_TASK_LIST.PROPERTIES.PARENT_NAME', - value: this.taskDetails.parentName, - key: 'parentName' - } - ), new CardViewTextItemModel( { label: 'ADF_TASK_LIST.PROPERTIES.DURATION', - value: `${this.taskDetails.duration} ms`, + value: this.getTaskDuration(), key: 'duration' } ), @@ -313,4 +299,8 @@ export class TaskHeaderComponent implements OnChanges, OnInit { isCompleted(): boolean { return this.taskDetails && !!this.taskDetails.endDate; } + + getTaskDuration(): string { + return this.taskDetails.duration ? `${this.taskDetails.duration} ms` : ''; + } }