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:
File diff suppressed because it is too large
Load Diff
@@ -27,6 +27,8 @@
|
|||||||
"PROPERTIES": {
|
"PROPERTIES": {
|
||||||
"TASK_NAME": "Task",
|
"TASK_NAME": "Task",
|
||||||
"THUMBNAIL": "Thumbnail",
|
"THUMBNAIL": "Thumbnail",
|
||||||
|
"DURATION": "Duration",
|
||||||
|
"PARENT_TASK_ID": "Parent task id",
|
||||||
"NAME": "Name",
|
"NAME": "Name",
|
||||||
"ASSIGNEE": "Assignee",
|
"ASSIGNEE": "Assignee",
|
||||||
"ASSIGNEE_DEFAULT": "No assignee",
|
"ASSIGNEE_DEFAULT": "No assignee",
|
||||||
@@ -40,6 +42,7 @@
|
|||||||
"PARENT_NAME_DEFAULT": "No parent",
|
"PARENT_NAME_DEFAULT": "No parent",
|
||||||
"CREATED_BY": "Created By",
|
"CREATED_BY": "Created By",
|
||||||
"CREATED": "Created",
|
"CREATED": "Created",
|
||||||
|
"END_DATE": "End date",
|
||||||
"ID": "ID",
|
"ID": "ID",
|
||||||
"DESCRIPTION": "Description",
|
"DESCRIPTION": "Description",
|
||||||
"DESCRIPTION_DEFAULT": "No description",
|
"DESCRIPTION_DEFAULT": "No description",
|
||||||
|
@@ -16,15 +16,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
||||||
import { BpmUserService,
|
import {
|
||||||
CardViewDateItemModel,
|
BpmUserService,
|
||||||
CardViewItem,
|
CardViewDateItemModel,
|
||||||
CardViewMapItemModel,
|
CardViewItem,
|
||||||
CardViewTextItemModel,
|
CardViewMapItemModel,
|
||||||
CardViewBaseItemModel,
|
CardViewTextItemModel,
|
||||||
LogService,
|
CardViewBaseItemModel,
|
||||||
TranslationService,
|
LogService,
|
||||||
AppConfigService } from '@alfresco/adf-core';
|
TranslationService,
|
||||||
|
AppConfigService
|
||||||
|
} from '@alfresco/adf-core';
|
||||||
import { TaskDetailsModel } from '../models/task-details.model';
|
import { TaskDetailsModel } from '../models/task-details.model';
|
||||||
import { TaskListService } from './../services/tasklist.service';
|
import { TaskListService } from './../services/tasklist.service';
|
||||||
|
|
||||||
@@ -75,12 +77,12 @@ export class TaskHeaderComponent implements OnChanges, OnInit {
|
|||||||
return [
|
return [
|
||||||
new CardViewTextItemModel(
|
new CardViewTextItemModel(
|
||||||
{
|
{
|
||||||
label: 'ADF_TASK_LIST.PROPERTIES.ASSIGNEE',
|
label: 'ADF_TASK_LIST.PROPERTIES.ASSIGNEE',
|
||||||
value: this.taskDetails.getFullName(),
|
value: this.taskDetails.getFullName(),
|
||||||
key: 'assignee',
|
key: 'assignee',
|
||||||
default: this.translationService.instant('ADF_TASK_LIST.PROPERTIES.ASSIGNEE_DEFAULT'),
|
default: this.translationService.instant('ADF_TASK_LIST.PROPERTIES.ASSIGNEE_DEFAULT'),
|
||||||
clickable: !this.isCompleted(),
|
clickable: !this.isCompleted(),
|
||||||
icon: 'create'
|
icon: 'create'
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
new CardViewTextItemModel(
|
new CardViewTextItemModel(
|
||||||
@@ -131,6 +133,41 @@ export class TaskHeaderComponent implements OnChanges, OnInit {
|
|||||||
key: 'created'
|
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(
|
new CardViewTextItemModel(
|
||||||
{
|
{
|
||||||
label: 'ADF_TASK_LIST.PROPERTIES.ID',
|
label: 'ADF_TASK_LIST.PROPERTIES.ID',
|
||||||
|
@@ -31,6 +31,7 @@ export class TaskDetailsModel implements TaskRepresentation {
|
|||||||
category: string;
|
category: string;
|
||||||
created: Date;
|
created: Date;
|
||||||
description: string;
|
description: string;
|
||||||
|
parentName: string;
|
||||||
dueDate: Date;
|
dueDate: Date;
|
||||||
duration: number;
|
duration: number;
|
||||||
endDate: Date;
|
endDate: Date;
|
||||||
|
Reference in New Issue
Block a user