diff --git a/demo-shell/src/app/components/cloud/tasks-cloud-demo.component.html b/demo-shell/src/app/components/cloud/tasks-cloud-demo.component.html index aafe6f4950..f57949014c 100644 --- a/demo-shell/src/app/components/cloud/tasks-cloud-demo.component.html +++ b/demo-shell/src/app/components/cloud/tasks-cloud-demo.component.html @@ -27,6 +27,7 @@ [createdDate]="editedFilter.createdDate" [dueDate]="editedFilter.dueDate" [sorting]="sortArray" + [standalone]="editedFilter.standalone" [multiselect]="multiselect" [selectionMode]="selectionMode" [stickyHeader]="true" diff --git a/docs/process-services-cloud/components/edit-task-filter-cloud.component.md b/docs/process-services-cloud/components/edit-task-filter-cloud.component.md index c596e2ea48..2458057613 100644 --- a/docs/process-services-cloud/components/edit-task-filter-cloud.component.md +++ b/docs/process-services-cloud/components/edit-task-filter-cloud.component.md @@ -87,7 +87,7 @@ given below: | **_parentTaskId_** | ID of the task's parent task | | **_priority_** | Task priority | | **_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 | | **_processDefinitionId_** | Process definition ID | | **_processInstanceId_** | Process instance ID | diff --git a/docs/process-services-cloud/components/task-list-cloud.component.md b/docs/process-services-cloud/components/task-list-cloud.component.md index 37c9e790af..448ef4c22e 100644 --- a/docs/process-services-cloud/components/task-list-cloud.component.md +++ b/docs/process-services-cloud/components/task-list-cloud.component.md @@ -71,7 +71,7 @@ when the task list is empty: | showActions | `boolean` | false | Toggles the data actions column. | | 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. | -| 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. | | stickyHeader | `boolean` | false | Toggles the sticky header mode. | diff --git a/e2e/process-services-cloud/config/task-list-cloud.config.ts b/e2e/process-services-cloud/config/task-list-cloud.config.ts index 71c1cc2e15..069bd4dc7c 100644 --- a/e2e/process-services-cloud/config/task-list-cloud.config.ts +++ b/e2e/process-services-cloud/config/task-list-cloud.config.ts @@ -96,7 +96,7 @@ export class TaskListCloudConfiguration { 'sortable': true }, { - 'key': 'entry.standAlone', + 'key': 'entry.standalone', 'type': 'text', 'title': 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.STAND_ALONE', 'sortable': true diff --git a/lib/process-services-cloud/src/lib/i18n/en.json b/lib/process-services-cloud/src/lib/i18n/en.json index a72a1f24d0..10e90fc6b7 100644 --- a/lib/process-services-cloud/src/lib/i18n/en.json +++ b/lib/process-services-cloud/src/lib/i18n/en.json @@ -129,7 +129,7 @@ "TASK_NAME": "TaskName", "PARENT_TASK_ID": "ParentTaskId", "PRIORITY": "Priority", - "STAND_ALONE": "StandAlone", + "STAND_ALONE": "Standalone", "LAST_MODIFIED_FROM": "LastModifiedFrom", "LAST_MODIFIED_TO": "LastModifiedTo", "OWNER": "Owner", diff --git a/lib/process-services-cloud/src/lib/task/start-task/models/task-details-cloud.model.ts b/lib/process-services-cloud/src/lib/task/start-task/models/task-details-cloud.model.ts index df99d614e5..bc75de9d0d 100644 --- a/lib/process-services-cloud/src/lib/task/start-task/models/task-details-cloud.model.ts +++ b/lib/process-services-cloud/src/lib/task/start-task/models/task-details-cloud.model.ts @@ -38,7 +38,7 @@ export class TaskDetailsCloudModel { processDefinitionId: string; processInstanceId: string; status: TaskStatusEnum; - standAlone: boolean; + standalone: boolean; candidateUsers: string[]; candidateGroups: string[]; managerOfCandidateGroup: boolean; @@ -68,7 +68,7 @@ export class TaskDetailsCloudModel { this.processDefinitionId = obj.processDefinitionId || null; this.processInstanceId = obj.processInstanceId || null; this.status = obj.status || null; - this.standAlone = obj.standAlone || null; + this.standalone = obj.standalone || null; this.candidateUsers = obj.candidateUsers || null; this.candidateGroups = obj.candidateGroups || null; this.managerOfCandidateGroup = obj.managerOfCandidateGroup || null; @@ -81,6 +81,10 @@ export class TaskDetailsCloudModel { return this.status === TaskStatusEnum.COMPLETED; } + isCancelled(): boolean { + return this.status === TaskStatusEnum.CANCELLED; + } + isAssigned(): boolean { return this.status === TaskStatusEnum.ASSIGNED; } diff --git a/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filter-cloud.component.ts b/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filter-cloud.component.ts index 7a68ad602b..f760481c4e 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filter-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filter-cloud.component.ts @@ -580,8 +580,8 @@ export class EditTaskFilterCloudComponent implements OnInit, OnChanges, OnDestro new TaskFilterProperties({ label: 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.STAND_ALONE', type: 'checkbox', - key: 'standAlone', - value: currentTaskFilter.standAlone || false + key: 'standalone', + value: currentTaskFilter.standalone || false }) ]; } diff --git a/lib/process-services-cloud/src/lib/task/task-filters/models/filter-cloud.model.ts b/lib/process-services-cloud/src/lib/task/task-filters/models/filter-cloud.model.ts index 882aafb2ac..dfe8d5ffe8 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/models/filter-cloud.model.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/models/filter-cloud.model.ts @@ -35,7 +35,7 @@ export class TaskFilterCloudModel { taskId: string; parentTaskId: string; priority: number; - standAlone: boolean; + standalone: boolean; lastModifiedFrom: Date; lastModifiedTo: Date; @@ -60,7 +60,7 @@ export class TaskFilterCloudModel { this.taskId = obj.taskId || null; this.parentTaskId = obj.parentTaskId || null; this.priority = obj.priority || null; - this.standAlone = obj.standAlone || null; + this.standalone = obj.standalone || null; this.lastModifiedFrom = obj.lastModifiedFrom || null; this.lastModifiedTo = obj.lastModifiedTo || null; } diff --git a/lib/process-services-cloud/src/lib/task/task-form/components/task-form-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/task-form/components/task-form-cloud.component.spec.ts index e19fa2a8b7..a7112f7b41 100644 --- a/lib/process-services-cloud/src/lib/task/task-form/components/task-form-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-form/components/task-form-cloud.component.spec.ts @@ -37,7 +37,7 @@ const taskDetails = { id: 'bd6b1741-6046-11e9-80f0-0a586460040d', name: 'Task1', owner: 'admin.adf', - standAlone: true, + standalone: true, status: 'ASSIGNED' }; diff --git a/lib/process-services-cloud/src/lib/task/task-header/mocks/fake-task-details-response.mock.ts b/lib/process-services-cloud/src/lib/task/task-header/mocks/fake-task-details-response.mock.ts index 5ca1668e35..ba1dc59baa 100644 --- a/lib/process-services-cloud/src/lib/task/task-header/mocks/fake-task-details-response.mock.ts +++ b/lib/process-services-cloud/src/lib/task/task-header/mocks/fake-task-details-response.mock.ts @@ -37,6 +37,6 @@ export const fakeTaskDetailsCloud = { 'lastModified': 1545140162601, 'lastModifiedTo': null, 'lastModifiedFrom': null, - 'standAlone': true + 'standalone': true } }; diff --git a/lib/process-services-cloud/src/lib/task/task-header/mocks/task-details-cloud.mock.ts b/lib/process-services-cloud/src/lib/task/task-header/mocks/task-details-cloud.mock.ts index 16d05e442e..be9db86c9c 100644 --- a/lib/process-services-cloud/src/lib/task/task-header/mocks/task-details-cloud.mock.ts +++ b/lib/process-services-cloud/src/lib/task/task-header/mocks/task-details-cloud.mock.ts @@ -39,7 +39,7 @@ export const assignedTaskDetailsCloudMock = new TaskDetailsCloudModel( 'lastModified': 1545048055900, 'lastModifiedTo': null, 'lastModifiedFrom': null, - 'standAlone': true + 'standalone': true } ); @@ -65,7 +65,7 @@ export const createdTaskDetailsCloudMock = new TaskDetailsCloudModel( 'lastModified': 1545048055900, 'lastModifiedTo': null, 'lastModifiedFrom': null, - 'standAlone': true + 'standalone': true } ); @@ -91,6 +91,6 @@ export const emptyOwnerTaskDetailsCloudMock = new TaskDetailsCloudModel( 'lastModified': 1545048055900, 'lastModifiedTo': null, 'lastModifiedFrom': null, - 'standAlone': true + 'standalone': true } ); diff --git a/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.spec.ts index c202ec6af7..191ee87a82 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.spec.ts @@ -167,7 +167,7 @@ describe('TaskListCloudComponent', () => { expect(component.rows[0].entry['lastModified']).toBe(1538059139420); expect(component.rows[0].entry['lastModifiedTo']).toBeNull(); expect(component.rows[0].entry['lastModifiedFrom']).toBeNull(); - expect(component.rows[0].entry['standAlone']).toBeTruthy(); + expect(component.rows[0].entry['standalone']).toBeTruthy(); done(); }); component.appName = appName.currentValue; diff --git a/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts b/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts index 13c3f06839..39bb584430 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts @@ -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. */ @Input() - standAlone: boolean = false; + standalone: boolean = false; /** * 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, maxItems: this.size, skipCount: this.skipCount, - sorting: this.sorting + sorting: this.sorting, + standalone: this.standalone }; return new TaskQueryCloudRequestModel(requestNode); } diff --git a/lib/process-services-cloud/src/lib/task/task-list/mock/fakeTaskResponseMock.ts b/lib/process-services-cloud/src/lib/task/task-list/mock/fakeTaskResponseMock.ts index 9701ecea7d..217591cecb 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/mock/fakeTaskResponseMock.ts +++ b/lib/process-services-cloud/src/lib/task/task-list/mock/fakeTaskResponseMock.ts @@ -41,7 +41,7 @@ export const fakeTaskCloudList = { lastModified: 1538052037711, lastModifiedTo: null, lastModifiedFrom: null, - standAlone: true + standalone: true } }, { @@ -65,7 +65,7 @@ export const fakeTaskCloudList = { lastModified: 1538052038286, lastModifiedTo: null, lastModifiedFrom: null, - standAlone: true + standalone: true } } ], @@ -103,7 +103,7 @@ export let fakeGlobalTask = { lastModified: 1538059139420, lastModifiedTo: null, lastModifiedFrom: null, - standAlone: true + standalone: true } } ], diff --git a/lib/process-services-cloud/src/lib/task/task-list/models/filter-cloud-model.ts b/lib/process-services-cloud/src/lib/task/task-list/models/filter-cloud-model.ts index 9a00b6d591..0ed6adaef8 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/models/filter-cloud-model.ts +++ b/lib/process-services-cloud/src/lib/task/task-list/models/filter-cloud-model.ts @@ -31,7 +31,7 @@ export class TaskQueryCloudRequestModel { name?: string; owner?: string; parentTaskId?: string; - standAlone?: boolean; + standalone?: boolean; priority?: number; processDefinitionId?: string; processInstanceId?: string; @@ -55,7 +55,7 @@ export class TaskQueryCloudRequestModel { this.name = obj.name; this.owner = obj.owner; this.parentTaskId = obj.parentTaskId; - this.standAlone = obj.standAlone; + this.standalone = obj.standalone; this.priority = obj.priority; this.processDefinitionId = obj.processDefinitionId; this.processInstanceId = obj.processInstanceId;