* Used standalone prop to query tasks* Fixed typo standAlone to standalone.* Updated docs. (#5241)

This commit is contained in:
siva kumar 2019-11-13 19:09:16 +05:30 committed by Maurizio Vitale
parent eb1f05dbeb
commit ae2caa8b90
15 changed files with 29 additions and 23 deletions

View File

@ -27,6 +27,7 @@
[createdDate]="editedFilter.createdDate" [createdDate]="editedFilter.createdDate"
[dueDate]="editedFilter.dueDate" [dueDate]="editedFilter.dueDate"
[sorting]="sortArray" [sorting]="sortArray"
[standalone]="editedFilter.standalone"
[multiselect]="multiselect" [multiselect]="multiselect"
[selectionMode]="selectionMode" [selectionMode]="selectionMode"
[stickyHeader]="true" [stickyHeader]="true"

View File

@ -87,7 +87,7 @@ given below:
| **_parentTaskId_** | ID of the task's parent task | | **_parentTaskId_** | ID of the task's parent task |
| **_priority_** | Task priority | | **_priority_** | Task priority |
| **_createdDate_** | Date the task was created | | **_createdDate_** | Date the task was created |
| **_standAlone_** | Standalone status of the task | | **_standalone_** | Standalone status of the task |
| **_owner_** | User ID of the task's owner | | **_owner_** | User ID of the task's owner |
| **_processDefinitionId_** | Process definition ID | | **_processDefinitionId_** | Process definition ID |
| **_processInstanceId_** | Process instance ID | | **_processInstanceId_** | Process instance ID |

View File

@ -71,7 +71,7 @@ when the task list is empty:
| showActions | `boolean` | false | Toggles the data actions column. | | showActions | `boolean` | false | Toggles the data actions column. |
| showContextMenu | `boolean` | false | Toggles custom context menu for the component. | | showContextMenu | `boolean` | false | Toggles custom context menu for the component. |
| sorting | [`TaskListCloudSortingModel`](../../../lib/process-services-cloud/src/lib/task/task-list/models/task-list-sorting.model.ts)`[]` | | Specifies how the table should be sorted. The parameters are for BE sorting. | | sorting | [`TaskListCloudSortingModel`](../../../lib/process-services-cloud/src/lib/task/task-list/models/task-list-sorting.model.ts)`[]` | | Specifies how the table should be sorted. The parameters are for BE sorting. |
| standAlone | `boolean` | false | Filter the tasks. Display only the tasks that belong to a process in case is false or tasks that doesn't belong to a process in case of true. | | standalone | `boolean` | false | Filter the tasks. Display only the tasks that belong to a process in case is false or tasks that doesn't belong to a process in case of true. |
| status | `string` | "" | Filter the tasks. Display only tasks with status equal to the supplied value. | | status | `string` | "" | Filter the tasks. Display only tasks with status equal to the supplied value. |
| stickyHeader | `boolean` | false | Toggles the sticky header mode. | | stickyHeader | `boolean` | false | Toggles the sticky header mode. |

View File

@ -96,7 +96,7 @@ export class TaskListCloudConfiguration {
'sortable': true 'sortable': true
}, },
{ {
'key': 'entry.standAlone', 'key': 'entry.standalone',
'type': 'text', 'type': 'text',
'title': 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.STAND_ALONE', 'title': 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.STAND_ALONE',
'sortable': true 'sortable': true

View File

@ -129,7 +129,7 @@
"TASK_NAME": "TaskName", "TASK_NAME": "TaskName",
"PARENT_TASK_ID": "ParentTaskId", "PARENT_TASK_ID": "ParentTaskId",
"PRIORITY": "Priority", "PRIORITY": "Priority",
"STAND_ALONE": "StandAlone", "STAND_ALONE": "Standalone",
"LAST_MODIFIED_FROM": "LastModifiedFrom", "LAST_MODIFIED_FROM": "LastModifiedFrom",
"LAST_MODIFIED_TO": "LastModifiedTo", "LAST_MODIFIED_TO": "LastModifiedTo",
"OWNER": "Owner", "OWNER": "Owner",

View File

@ -38,7 +38,7 @@ export class TaskDetailsCloudModel {
processDefinitionId: string; processDefinitionId: string;
processInstanceId: string; processInstanceId: string;
status: TaskStatusEnum; status: TaskStatusEnum;
standAlone: boolean; standalone: boolean;
candidateUsers: string[]; candidateUsers: string[];
candidateGroups: string[]; candidateGroups: string[];
managerOfCandidateGroup: boolean; managerOfCandidateGroup: boolean;
@ -68,7 +68,7 @@ export class TaskDetailsCloudModel {
this.processDefinitionId = obj.processDefinitionId || null; this.processDefinitionId = obj.processDefinitionId || null;
this.processInstanceId = obj.processInstanceId || null; this.processInstanceId = obj.processInstanceId || null;
this.status = obj.status || null; this.status = obj.status || null;
this.standAlone = obj.standAlone || null; this.standalone = obj.standalone || null;
this.candidateUsers = obj.candidateUsers || null; this.candidateUsers = obj.candidateUsers || null;
this.candidateGroups = obj.candidateGroups || null; this.candidateGroups = obj.candidateGroups || null;
this.managerOfCandidateGroup = obj.managerOfCandidateGroup || null; this.managerOfCandidateGroup = obj.managerOfCandidateGroup || null;
@ -81,6 +81,10 @@ export class TaskDetailsCloudModel {
return this.status === TaskStatusEnum.COMPLETED; return this.status === TaskStatusEnum.COMPLETED;
} }
isCancelled(): boolean {
return this.status === TaskStatusEnum.CANCELLED;
}
isAssigned(): boolean { isAssigned(): boolean {
return this.status === TaskStatusEnum.ASSIGNED; return this.status === TaskStatusEnum.ASSIGNED;
} }

View File

@ -580,8 +580,8 @@ export class EditTaskFilterCloudComponent implements OnInit, OnChanges, OnDestro
new TaskFilterProperties({ new TaskFilterProperties({
label: 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.STAND_ALONE', label: 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.STAND_ALONE',
type: 'checkbox', type: 'checkbox',
key: 'standAlone', key: 'standalone',
value: currentTaskFilter.standAlone || false value: currentTaskFilter.standalone || false
}) })
]; ];
} }

View File

@ -35,7 +35,7 @@ export class TaskFilterCloudModel {
taskId: string; taskId: string;
parentTaskId: string; parentTaskId: string;
priority: number; priority: number;
standAlone: boolean; standalone: boolean;
lastModifiedFrom: Date; lastModifiedFrom: Date;
lastModifiedTo: Date; lastModifiedTo: Date;
@ -60,7 +60,7 @@ export class TaskFilterCloudModel {
this.taskId = obj.taskId || null; this.taskId = obj.taskId || null;
this.parentTaskId = obj.parentTaskId || null; this.parentTaskId = obj.parentTaskId || null;
this.priority = obj.priority || null; this.priority = obj.priority || null;
this.standAlone = obj.standAlone || null; this.standalone = obj.standalone || null;
this.lastModifiedFrom = obj.lastModifiedFrom || null; this.lastModifiedFrom = obj.lastModifiedFrom || null;
this.lastModifiedTo = obj.lastModifiedTo || null; this.lastModifiedTo = obj.lastModifiedTo || null;
} }

View File

@ -37,7 +37,7 @@ const taskDetails = {
id: 'bd6b1741-6046-11e9-80f0-0a586460040d', id: 'bd6b1741-6046-11e9-80f0-0a586460040d',
name: 'Task1', name: 'Task1',
owner: 'admin.adf', owner: 'admin.adf',
standAlone: true, standalone: true,
status: 'ASSIGNED' status: 'ASSIGNED'
}; };

View File

@ -37,6 +37,6 @@ export const fakeTaskDetailsCloud = {
'lastModified': 1545140162601, 'lastModified': 1545140162601,
'lastModifiedTo': null, 'lastModifiedTo': null,
'lastModifiedFrom': null, 'lastModifiedFrom': null,
'standAlone': true 'standalone': true
} }
}; };

View File

@ -39,7 +39,7 @@ export const assignedTaskDetailsCloudMock = new TaskDetailsCloudModel(
'lastModified': 1545048055900, 'lastModified': 1545048055900,
'lastModifiedTo': null, 'lastModifiedTo': null,
'lastModifiedFrom': null, 'lastModifiedFrom': null,
'standAlone': true 'standalone': true
} }
); );
@ -65,7 +65,7 @@ export const createdTaskDetailsCloudMock = new TaskDetailsCloudModel(
'lastModified': 1545048055900, 'lastModified': 1545048055900,
'lastModifiedTo': null, 'lastModifiedTo': null,
'lastModifiedFrom': null, 'lastModifiedFrom': null,
'standAlone': true 'standalone': true
} }
); );
@ -91,6 +91,6 @@ export const emptyOwnerTaskDetailsCloudMock = new TaskDetailsCloudModel(
'lastModified': 1545048055900, 'lastModified': 1545048055900,
'lastModifiedTo': null, 'lastModifiedTo': null,
'lastModifiedFrom': null, 'lastModifiedFrom': null,
'standAlone': true 'standalone': true
} }
); );

View File

@ -167,7 +167,7 @@ describe('TaskListCloudComponent', () => {
expect(component.rows[0].entry['lastModified']).toBe(1538059139420); expect(component.rows[0].entry['lastModified']).toBe(1538059139420);
expect(component.rows[0].entry['lastModifiedTo']).toBeNull(); expect(component.rows[0].entry['lastModifiedTo']).toBeNull();
expect(component.rows[0].entry['lastModifiedFrom']).toBeNull(); expect(component.rows[0].entry['lastModifiedFrom']).toBeNull();
expect(component.rows[0].entry['standAlone']).toBeTruthy(); expect(component.rows[0].entry['standalone']).toBeTruthy();
done(); done();
}); });
component.appName = appName.currentValue; component.appName = appName.currentValue;

View File

@ -103,7 +103,7 @@ export class TaskListCloudComponent extends DataTableSchema implements OnChanges
/** Filter the tasks. Display only the tasks that belong to a process in case is false or tasks that doesn't belong to a process in case of true. */ /** Filter the tasks. Display only the tasks that belong to a process in case is false or tasks that doesn't belong to a process in case of true. */
@Input() @Input()
standAlone: boolean = false; standalone: boolean = false;
/** /**
* Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode, * Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode,
@ -319,7 +319,8 @@ export class TaskListCloudComponent extends DataTableSchema implements OnChanges
createdDate: this.createdDate, createdDate: this.createdDate,
maxItems: this.size, maxItems: this.size,
skipCount: this.skipCount, skipCount: this.skipCount,
sorting: this.sorting sorting: this.sorting,
standalone: this.standalone
}; };
return new TaskQueryCloudRequestModel(requestNode); return new TaskQueryCloudRequestModel(requestNode);
} }

View File

@ -41,7 +41,7 @@ export const fakeTaskCloudList = {
lastModified: 1538052037711, lastModified: 1538052037711,
lastModifiedTo: null, lastModifiedTo: null,
lastModifiedFrom: null, lastModifiedFrom: null,
standAlone: true standalone: true
} }
}, },
{ {
@ -65,7 +65,7 @@ export const fakeTaskCloudList = {
lastModified: 1538052038286, lastModified: 1538052038286,
lastModifiedTo: null, lastModifiedTo: null,
lastModifiedFrom: null, lastModifiedFrom: null,
standAlone: true standalone: true
} }
} }
], ],
@ -103,7 +103,7 @@ export let fakeGlobalTask = {
lastModified: 1538059139420, lastModified: 1538059139420,
lastModifiedTo: null, lastModifiedTo: null,
lastModifiedFrom: null, lastModifiedFrom: null,
standAlone: true standalone: true
} }
} }
], ],

View File

@ -31,7 +31,7 @@ export class TaskQueryCloudRequestModel {
name?: string; name?: string;
owner?: string; owner?: string;
parentTaskId?: string; parentTaskId?: string;
standAlone?: boolean; standalone?: boolean;
priority?: number; priority?: number;
processDefinitionId?: string; processDefinitionId?: string;
processInstanceId?: string; processInstanceId?: string;
@ -55,7 +55,7 @@ export class TaskQueryCloudRequestModel {
this.name = obj.name; this.name = obj.name;
this.owner = obj.owner; this.owner = obj.owner;
this.parentTaskId = obj.parentTaskId; this.parentTaskId = obj.parentTaskId;
this.standAlone = obj.standAlone; this.standalone = obj.standalone;
this.priority = obj.priority; this.priority = obj.priority;
this.processDefinitionId = obj.processDefinitionId; this.processDefinitionId = obj.processDefinitionId;
this.processInstanceId = obj.processInstanceId; this.processInstanceId = obj.processInstanceId;