* 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"
[dueDate]="editedFilter.dueDate"
[sorting]="sortArray"
[standalone]="editedFilter.standalone"
[multiselect]="multiselect"
[selectionMode]="selectionMode"
[stickyHeader]="true"

View File

@ -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 |

View File

@ -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. |

View File

@ -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

View File

@ -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",

View File

@ -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;
}

View File

@ -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
})
];
}

View File

@ -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;
}

View File

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

View File

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

View File

@ -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
}
);

View File

@ -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;

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. */
@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);
}

View File

@ -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
}
}
],

View File

@ -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;