mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
* After rebase (#4232)
This commit is contained in:
parent
cbc8043d02
commit
120177f152
@ -55,6 +55,8 @@ when the task list is empty:
|
||||
| assignee | `string` | "" | The assignee of the process. Possible values are: "assignee" (the current user is the assignee), "candidate" (the current user is a task candidate", "group_x" (the task is assigned to a group where the current user is a member, no value (the current user is involved). |
|
||||
| createdDate | `string` | "" | Filter the tasks. Display only tasks created on the supplied date. |
|
||||
| dueDate | `string` | "" | Filter the tasks. Display only tasks with dueDate equal to the supplied date. |
|
||||
| lastModifiedFrom | `string` | "" | Filter the tasks. Display only tasks with lastModifiedFrom equal to the supplied date. |
|
||||
| lastModifiedTo | `string` | "" | Filter the tasks. Display only tasks with lastModifiedTo equal to the supplied date. |
|
||||
| id | `string` | "" | Filter the tasks. Display only tasks with id equal to the supplied value. |
|
||||
| multiselect | `boolean` | false | Toggles multiple row selection, rendering a checkbox at the beginning of each row. |
|
||||
| name | `string` | "" | Filter the tasks. Display only tasks with the supplied name. |
|
||||
@ -64,6 +66,9 @@ when the task list is empty:
|
||||
| selectionMode | `string` | "single" | Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode, you can use the Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
|
||||
| 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. |
|
||||
| status | `string` | "" | Filter the tasks. Display only tasks with status equal to the supplied value. |
|
||||
| owner | `string` | "" | Filter the tasks. Display only tasks with owner equal to the supplied value. |
|
||||
| priority | `string` | "" | Filter the tasks. Display only tasks with priority equal to the supplied value. |
|
||||
| standAlone | `string` | "" | 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. |
|
||||
|
||||
### Events
|
||||
|
||||
|
@ -201,6 +201,28 @@ describe('TaskListCloudComponent', () => {
|
||||
fixture.detectChanges();
|
||||
expect(component.isListEmpty()).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should reload the task list when input parameters changed', () => {
|
||||
const getTaskByRequestSpy = spyOn(taskListCloudService, 'getTaskByRequest').and.returnValue(of(fakeGlobalTask));
|
||||
component.applicationName = 'mock-app-name';
|
||||
component.priority = 1;
|
||||
component.status = 'mock-status';
|
||||
component.lastModifiedFrom = 'mock-lastmodified-date';
|
||||
component.owner = 'mock-owner-name';
|
||||
const priorityChange = new SimpleChange(undefined, 1, true);
|
||||
const statusChange = new SimpleChange(undefined, 'mock-status', true);
|
||||
const lastModifiedFromChange = new SimpleChange(undefined, 'mock-lastmodified-date', true);
|
||||
const ownerChange = new SimpleChange(undefined, 'mock-owner-name', true);
|
||||
component.ngOnChanges({
|
||||
'priority': priorityChange,
|
||||
'status': statusChange,
|
||||
'lastModifiedFrom': lastModifiedFromChange,
|
||||
'owner': ownerChange
|
||||
});
|
||||
fixture.detectChanges();
|
||||
expect(component.isListEmpty()).toBeFalsy();
|
||||
expect(getTaskByRequestSpy).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
describe('Injecting custom colums for tasklist - CustomTaskListComponent', () => {
|
||||
|
@ -60,6 +60,14 @@ export class TaskListCloudComponent extends DataTableSchema implements OnChanges
|
||||
@Input()
|
||||
dueDate: string = '';
|
||||
|
||||
/** Filter the tasks. Display only tasks with lastModifiedFrom equal to the supplied date. */
|
||||
@Input()
|
||||
lastModifiedFrom: string = '';
|
||||
|
||||
/** Filter the tasks. Display only tasks with lastModifiedTo equal to the supplied date. */
|
||||
@Input()
|
||||
lastModifiedTo: string = '';
|
||||
|
||||
/** Filter the tasks. Display only tasks with id equal to the supplied value. */
|
||||
@Input()
|
||||
id: string = '';
|
||||
@ -84,6 +92,18 @@ export class TaskListCloudComponent extends DataTableSchema implements OnChanges
|
||||
@Input()
|
||||
status: string = '';
|
||||
|
||||
/** Filter the tasks. Display only tasks with owner equal to the supplied value. */
|
||||
@Input()
|
||||
owner: string = '';
|
||||
|
||||
/** Filter the tasks. Display only tasks with priority equal to the supplied value. */
|
||||
@Input()
|
||||
priority: number;
|
||||
|
||||
/** 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;
|
||||
|
||||
/**
|
||||
* Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode,
|
||||
* you can use the Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for
|
||||
@ -238,6 +258,10 @@ export class TaskListCloudComponent extends DataTableSchema implements OnChanges
|
||||
parentTaskId: this.parentTaskId,
|
||||
processDefinitionId: this.processDefinitionId,
|
||||
processInstanceId: this.processInstanceId,
|
||||
owner: this.owner,
|
||||
priority: this.priority,
|
||||
lastModifiedFrom: this.lastModifiedFrom,
|
||||
lastModifiedTo: this.lastModifiedTo,
|
||||
status: this.status,
|
||||
maxItems: this.size,
|
||||
skipCount: this.skipCount,
|
||||
|
@ -25,10 +25,13 @@ export class TaskQueryCloudRequestModel {
|
||||
createdDate?: Date;
|
||||
description?: string;
|
||||
dueDate?: null;
|
||||
lastModifiedFrom?: null;
|
||||
lastModifiedTo?: null;
|
||||
id?: string;
|
||||
name?: string;
|
||||
owner?: string;
|
||||
parentTaskId?: string;
|
||||
standAlone?: boolean;
|
||||
priority?: number;
|
||||
processDefinitionId?: string;
|
||||
processInstanceId?: string;
|
||||
@ -46,10 +49,13 @@ export class TaskQueryCloudRequestModel {
|
||||
this.createdDate = obj.createdDate;
|
||||
this.description = obj.description;
|
||||
this.dueDate = obj.dueDate;
|
||||
this.lastModifiedFrom = obj.lastModifiedFrom;
|
||||
this.lastModifiedTo = obj.lastModifiedTo;
|
||||
this.id = obj.id;
|
||||
this.name = obj.name;
|
||||
this.owner = obj.owner;
|
||||
this.parentTaskId = obj.parentTaskId;
|
||||
this.standAlone = obj.standAlone;
|
||||
this.priority = obj.priority;
|
||||
this.processDefinitionId = obj.processDefinitionId;
|
||||
this.processInstanceId = obj.processInstanceId;
|
||||
|
Loading…
x
Reference in New Issue
Block a user