mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3676] Task Header - Expose task properties out of the box (#3883)
* #3878 Add support for end date in TaskHeaderComponent * add duration and parentTaskId
This commit is contained in:
@@ -16,15 +16,17 @@
|
||||
*/
|
||||
|
||||
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
||||
import { BpmUserService,
|
||||
CardViewDateItemModel,
|
||||
CardViewItem,
|
||||
CardViewMapItemModel,
|
||||
CardViewTextItemModel,
|
||||
CardViewBaseItemModel,
|
||||
LogService,
|
||||
TranslationService,
|
||||
AppConfigService } from '@alfresco/adf-core';
|
||||
import {
|
||||
BpmUserService,
|
||||
CardViewDateItemModel,
|
||||
CardViewItem,
|
||||
CardViewMapItemModel,
|
||||
CardViewTextItemModel,
|
||||
CardViewBaseItemModel,
|
||||
LogService,
|
||||
TranslationService,
|
||||
AppConfigService
|
||||
} from '@alfresco/adf-core';
|
||||
import { TaskDetailsModel } from '../models/task-details.model';
|
||||
import { TaskListService } from './../services/tasklist.service';
|
||||
|
||||
@@ -75,12 +77,12 @@ export class TaskHeaderComponent implements OnChanges, OnInit {
|
||||
return [
|
||||
new CardViewTextItemModel(
|
||||
{
|
||||
label: 'ADF_TASK_LIST.PROPERTIES.ASSIGNEE',
|
||||
value: this.taskDetails.getFullName(),
|
||||
key: 'assignee',
|
||||
default: this.translationService.instant('ADF_TASK_LIST.PROPERTIES.ASSIGNEE_DEFAULT'),
|
||||
clickable: !this.isCompleted(),
|
||||
icon: 'create'
|
||||
label: 'ADF_TASK_LIST.PROPERTIES.ASSIGNEE',
|
||||
value: this.taskDetails.getFullName(),
|
||||
key: 'assignee',
|
||||
default: this.translationService.instant('ADF_TASK_LIST.PROPERTIES.ASSIGNEE_DEFAULT'),
|
||||
clickable: !this.isCompleted(),
|
||||
icon: 'create'
|
||||
}
|
||||
),
|
||||
new CardViewTextItemModel(
|
||||
@@ -131,6 +133,41 @@ 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`,
|
||||
key: 'duration'
|
||||
}
|
||||
),
|
||||
new CardViewTextItemModel(
|
||||
{
|
||||
label: 'ADF_TASK_LIST.PROPERTIES.PARENT_TASK_ID',
|
||||
value: this.taskDetails.parentTaskId,
|
||||
key: 'parentTaskId'
|
||||
}
|
||||
),
|
||||
new CardViewDateItemModel(
|
||||
{
|
||||
label: 'ADF_TASK_LIST.PROPERTIES.END_DATE',
|
||||
value: this.taskDetails.endDate,
|
||||
key: 'endDate'
|
||||
}
|
||||
),
|
||||
new CardViewTextItemModel(
|
||||
{
|
||||
label: 'ADF_TASK_LIST.PROPERTIES.ID',
|
||||
|
@@ -31,6 +31,7 @@ export class TaskDetailsModel implements TaskRepresentation {
|
||||
category: string;
|
||||
created: Date;
|
||||
description: string;
|
||||
parentName: string;
|
||||
dueDate: Date;
|
||||
duration: number;
|
||||
endDate: Date;
|
||||
|
Reference in New Issue
Block a user