mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-7376] Added process instance link in task details (#7544)
* [AAE-7376] Added process instance link in task details * [AAE-7376] removed redirect logic from ADF * Trigger travis * [AAE-7376] added unit test
This commit is contained in:
@@ -330,6 +330,8 @@
|
||||
"CREATED": "Created",
|
||||
"END_DATE": "End date",
|
||||
"ID": "ID",
|
||||
"PROCESS_INSTANCE_ID": "Process instance id",
|
||||
"PROCESS_INSTANCE_ID_DEFAULT": "No process instance id",
|
||||
"DESCRIPTION": "Description",
|
||||
"DESCRIPTION_DEFAULT": "No description",
|
||||
"FORM_NAME": "Form Name",
|
||||
|
@@ -152,6 +152,18 @@ describe('TaskHeaderCloudComponent', () => {
|
||||
expect(valueEl.nativeElement.innerText.trim()).toBe(moment(assignedTaskDetailsCloudMock.dueDate, 'x').format('MMM D, Y, H:mm'));
|
||||
});
|
||||
|
||||
it('should display process instance id', async () => {
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
fixture.detectChanges();
|
||||
|
||||
const labelEl = fixture.debugElement.query(By.css('[data-automation-id="card-textitem-label-processInstanceId"]'));
|
||||
const valueEl = fixture.debugElement.query(By.css('[data-automation-id="card-textitem-value-processInstanceId"]'));
|
||||
|
||||
expect(labelEl.nativeElement.textContent.trim()).toBe('ADF_CLOUD_TASK_HEADER.PROPERTIES.PROCESS_INSTANCE_ID');
|
||||
expect(valueEl.nativeElement.value).toBe('67c4z2a8f-01f3-11e9-8e36-0a58646002ad');
|
||||
});
|
||||
|
||||
it('should display placeholder if no due date', async () => {
|
||||
component.taskDetails.dueDate = null;
|
||||
component.refreshData();
|
||||
|
@@ -78,6 +78,7 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy, OnChanges {
|
||||
dateLocale: string;
|
||||
displayDateClearAction = false;
|
||||
isLoading = true;
|
||||
processInstanceId: string;
|
||||
|
||||
private onDestroy$ = new Subject<boolean>();
|
||||
|
||||
@@ -129,6 +130,7 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy, OnChanges {
|
||||
this.taskDetails = taskDetails;
|
||||
this.candidateGroups = candidateGroups.map((user) => ({ icon: 'group', value: user } as CardViewArrayItem));
|
||||
this.candidateUsers = candidateUsers.map((group) => ({ icon: 'person', value: group } as CardViewArrayItem));
|
||||
this.processInstanceId = taskDetails.processInstanceId;
|
||||
if (this.taskDetails.parentTaskId) {
|
||||
this.loadParentName(`${this.taskDetails.parentTaskId}`);
|
||||
} else {
|
||||
@@ -230,6 +232,15 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy, OnChanges {
|
||||
key: 'id'
|
||||
}
|
||||
),
|
||||
new CardViewTextItemModel(
|
||||
{
|
||||
label: 'ADF_CLOUD_TASK_HEADER.PROPERTIES.PROCESS_INSTANCE_ID',
|
||||
value: this.processInstanceId,
|
||||
default: this.translationService.instant('ADF_CLOUD_TASK_HEADER.PROPERTIES.PROCESS_INSTANCE_ID_DEFAULT'),
|
||||
key: 'processInstanceId',
|
||||
clickable: true
|
||||
}
|
||||
),
|
||||
new CardViewTextItemModel(
|
||||
{
|
||||
label: 'ADF_CLOUD_TASK_HEADER.PROPERTIES.DESCRIPTION',
|
||||
|
@@ -54,7 +54,7 @@ export const assignedTaskDetailsCloudMock: TaskDetailsCloudModel = {
|
||||
priority: 1,
|
||||
category: null,
|
||||
processDefinitionId: null,
|
||||
processInstanceId: null,
|
||||
processInstanceId: '67c4z2a8f-01f3-11e9-8e36-0a58646002ad',
|
||||
status: 'ASSIGNED',
|
||||
owner: 'ownerUser',
|
||||
parentTaskId: null,
|
||||
|
Reference in New Issue
Block a user