[ACS-5898] prevent custom task filters from always sending due after date (#8847)

* ACS-5898 prevent custom task filters from always sending due after date, build custom filters form without initial values

* ACS-5898 revert setDueAfterFilter method removal, make its use conditional
This commit is contained in:
Grzegorz Jaśkowski
2023-08-24 16:51:38 +02:00
committed by GitHub
parent de16072171
commit 87e57272fa

View File

@@ -105,19 +105,19 @@ export class TaskListDemoComponent implements OnInit, OnDestroy {
buildForm() {
this.taskListForm = this.formBuilder.group({
taskAppId: new UntypedFormControl(this.defaultAppId, [Validators.pattern('^[0-9]*$')]),
taskName: new UntypedFormControl(''),
taskId: new UntypedFormControl(''),
taskProcessDefinitionId: new UntypedFormControl(''),
taskProcessInstanceId: new UntypedFormControl(''),
taskAssignment: new UntypedFormControl(''),
taskState: new UntypedFormControl(''),
taskSort: new UntypedFormControl(''),
taskSize: new UntypedFormControl('', [Validators.pattern('^[0-9]*$'), Validators.min(this.minValue)]),
taskPage: new UntypedFormControl('', [Validators.pattern('^[0-9]*$'), Validators.min(this.minValue)]),
taskDueAfter: new UntypedFormControl(''),
taskDueBefore: new UntypedFormControl(''),
taskStart: new UntypedFormControl('', [Validators.pattern('^[0-9]*$')]),
taskIncludeProcessInstance: new UntypedFormControl('')
taskName: new UntypedFormControl(),
taskId: new UntypedFormControl(),
taskProcessDefinitionId: new UntypedFormControl(),
taskProcessInstanceId: new UntypedFormControl(),
taskAssignment: new UntypedFormControl(),
taskState: new UntypedFormControl(),
taskSort: new UntypedFormControl(),
taskSize: new UntypedFormControl(null, [Validators.pattern('^[0-9]*$'), Validators.min(this.minValue)]),
taskPage: new UntypedFormControl(null, [Validators.pattern('^[0-9]*$'), Validators.min(this.minValue)]),
taskDueAfter: new UntypedFormControl(),
taskDueBefore: new UntypedFormControl(),
taskStart: new UntypedFormControl(null, [Validators.pattern('^[0-9]*$')]),
taskIncludeProcessInstance: new UntypedFormControl()
});
this.taskListForm.valueChanges
@@ -142,7 +142,7 @@ export class TaskListDemoComponent implements OnInit, OnDestroy {
this.state = taskFilter.taskState;
this.sort = taskFilter.taskSort;
this.start = taskFilter.taskStart;
this.dueAfter = this.setDueAfterFilter(taskFilter.taskDueAfter);
this.dueAfter = taskFilter.taskDueAfter ? this.setDueAfterFilter(taskFilter.taskDueAfter) : null;
this.dueBefore = taskFilter.taskDueBefore;
if (taskFilter.taskSize) {