mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-3578] Fix DueAfter Filter for Task List (#3944)
* [ADF-3578] Fix DueAfter Filter for Task List * [ADF-3578] Move filter setter to Task List Demo component
This commit is contained in:
committed by
Eugenio Romano
parent
1cc12fde9f
commit
e88690ad76
@@ -19,6 +19,7 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
import { FormGroup, FormBuilder, Validators, FormControl, AbstractControl } from '@angular/forms';
|
import { FormGroup, FormBuilder, Validators, FormControl, AbstractControl } from '@angular/forms';
|
||||||
import { ActivatedRoute, Params } from '@angular/router';
|
import { ActivatedRoute, Params } from '@angular/router';
|
||||||
import { debounceTime } from 'rxjs/operators';
|
import { debounceTime } from 'rxjs/operators';
|
||||||
|
import moment from 'moment-es6';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: './task-list-demo.component.html',
|
templateUrl: './task-list-demo.component.html',
|
||||||
@@ -131,7 +132,7 @@ export class TaskListDemoComponent implements OnInit {
|
|||||||
this.state = taskFilter.taskState;
|
this.state = taskFilter.taskState;
|
||||||
this.sort = taskFilter.taskSort;
|
this.sort = taskFilter.taskSort;
|
||||||
this.start = taskFilter.taskStart;
|
this.start = taskFilter.taskStart;
|
||||||
this.dueAfter = taskFilter.taskDueAfter;
|
this.dueAfter = this.setDueAfterFilter(taskFilter.taskDueAfter);
|
||||||
this.dueBefore = taskFilter.taskDueBefore;
|
this.dueBefore = taskFilter.taskDueBefore;
|
||||||
|
|
||||||
if (taskFilter.taskSize) {
|
if (taskFilter.taskSize) {
|
||||||
@@ -148,6 +149,16 @@ export class TaskListDemoComponent implements OnInit {
|
|||||||
this.includeProcessInstance = taskFilter.taskIncludeProcessInstance === 'include';
|
this.includeProcessInstance = taskFilter.taskIncludeProcessInstance === 'include';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setDueAfterFilter(date): string {
|
||||||
|
let dueDateFilter = moment(date);
|
||||||
|
dueDateFilter.set({
|
||||||
|
hour: 23,
|
||||||
|
minute: 59,
|
||||||
|
second: 59
|
||||||
|
});
|
||||||
|
return dueDateFilter.toString();
|
||||||
|
}
|
||||||
|
|
||||||
resetTaskForm() {
|
resetTaskForm() {
|
||||||
this.taskListForm.reset();
|
this.taskListForm.reset();
|
||||||
this.resetQueryParameters();
|
this.resetQueryParameters();
|
||||||
|
Reference in New Issue
Block a user