mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3438] Task List Demo - created date filter and pagination (#3782)
* date filter and pagination * remove wrong mat-form-field
This commit is contained in:
@@ -28,6 +28,7 @@ import { TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
||||
import { TaskListModel } from '../models/task-list.model';
|
||||
import { taskPresetsDefaultModel } from '../models/task-preset.model';
|
||||
import { TaskListService } from './../services/tasklist.service';
|
||||
import moment from 'moment-es6';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-tasklist',
|
||||
@@ -150,6 +151,14 @@ export class TaskListComponent extends DataTableSchema implements OnChanges, Aft
|
||||
@Input()
|
||||
size: number = PaginationComponent.DEFAULT_PAGINATION.maxItems;
|
||||
|
||||
/** Filter the tasks. Display only tasks with created_date after dueAfter. */
|
||||
@Input()
|
||||
dueAfter: string;
|
||||
|
||||
/** Filter the tasks. Display only tasks with created_date before dueBefore. */
|
||||
@Input()
|
||||
dueBefore: string;
|
||||
|
||||
rows: any[] = [];
|
||||
isLoading: boolean = true;
|
||||
sorting: any[] = ['created', 'desc'];
|
||||
@@ -297,7 +306,7 @@ export class TaskListComponent extends DataTableSchema implements OnChanges, Aft
|
||||
* @param taskId
|
||||
*/
|
||||
isEqualToCurrentId(taskId: string): boolean {
|
||||
return this.currentInstanceId === taskId ? true : false;
|
||||
return this.currentInstanceId === taskId;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -348,6 +357,8 @@ export class TaskListComponent extends DataTableSchema implements OnChanges, Aft
|
||||
|
||||
let requestNode = {
|
||||
appDefinitionId: this.appId,
|
||||
dueAfter: this.dueAfter ? moment(this.dueAfter).toDate() : null,
|
||||
dueBefore: this.dueBefore ? moment(this.dueBefore).toDate() : null,
|
||||
processInstanceId: this.processInstanceId,
|
||||
processDefinitionId: this.processDefinitionId,
|
||||
processDefinitionKey: this.processDefinitionKey,
|
||||
|
Reference in New Issue
Block a user