fix task header component duplicate (#3909)

This commit is contained in:
Eugenio Romano
2018-10-22 13:48:36 +01:00
committed by GitHub
parent cf3e4e8a6c
commit e2cf8655d8

View File

@@ -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` : '';
}
}