mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-06-30 18:15:11 +00:00
AAE-28584 Fix process tasks not showing after clicking in the list (#10410)
This commit is contained in:
parent
b575d16e61
commit
ab1b54531c
@ -114,6 +114,7 @@ export class TaskListRequestModel {
|
||||
status?: string[];
|
||||
completedBy?: string[];
|
||||
assignee?: string[];
|
||||
processInstanceId?: string;
|
||||
createdFrom?: string;
|
||||
createdTo?: string;
|
||||
lastModifiedFrom?: string;
|
||||
@ -148,6 +149,7 @@ export class TaskListRequestModel {
|
||||
this.status = obj.status;
|
||||
this.completedBy = obj.completedBy;
|
||||
this.assignee = obj.assignee;
|
||||
this.processInstanceId = obj.processInstanceId;
|
||||
this.createdFrom = obj.createdFrom;
|
||||
this.createdTo = obj.createdTo;
|
||||
this.lastModifiedFrom = obj.lastModifiedFrom;
|
||||
|
@ -19,7 +19,7 @@ import { Injectable } from '@angular/core';
|
||||
import { Observable, throwError } from 'rxjs';
|
||||
import { BaseCloudService } from '../../../services/base-cloud.service';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { TaskQueryCloudRequestModel } from '../../../models/filter-cloud-model';
|
||||
import { TaskListRequestModel, TaskQueryCloudRequestModel } from '../../../models/filter-cloud-model';
|
||||
import { TaskCloudNodePaging } from '../../../models/task-cloud.model';
|
||||
import { TaskListCloudSortingModel } from '../../../models/task-list-sorting.model';
|
||||
|
||||
@ -55,6 +55,30 @@ export class ProcessTaskListCloudService extends BaseCloudService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a list of tasks using an object with optional query properties.
|
||||
*
|
||||
* @param requestNode Query object
|
||||
* @param queryUrl Query url
|
||||
* @returns List of tasks
|
||||
*/
|
||||
fetchTaskList(requestNode: TaskListRequestModel, queryUrl?: string): Observable<any> {
|
||||
return this.getTaskByRequest(
|
||||
new TaskQueryCloudRequestModel({
|
||||
appName: requestNode.appName,
|
||||
processInstanceId: requestNode.processInstanceId
|
||||
}),
|
||||
queryUrl
|
||||
);
|
||||
}
|
||||
|
||||
getTaskListCounter(requestNode: TaskListRequestModel): Observable<number> {
|
||||
if (!requestNode.appName) {
|
||||
return throwError(() => new Error('Appname not configured'));
|
||||
}
|
||||
return this.fetchTaskList(requestNode).pipe(map((tasks) => tasks.list.pagination.totalItems));
|
||||
}
|
||||
|
||||
protected buildQueryParams(requestNode: TaskQueryCloudRequestModel): any {
|
||||
const queryParam: any = {};
|
||||
for (const property in requestNode) {
|
||||
|
@ -20,11 +20,7 @@ import { AppConfigService, UserPreferencesService } from '@alfresco/adf-core';
|
||||
import { TaskListRequestModel, TaskQueryCloudRequestModel } from '../../../models/filter-cloud-model';
|
||||
import { BaseTaskListCloudComponent } from './base-task-list-cloud.component';
|
||||
import { TaskCloudService } from '../../services/task-cloud.service';
|
||||
import {
|
||||
TASK_LIST_CLOUD_TOKEN,
|
||||
TASK_LIST_PREFERENCES_SERVICE_TOKEN,
|
||||
TASK_SEARCH_API_METHOD_TOKEN
|
||||
} from '../../../services/cloud-token.service';
|
||||
import { TASK_LIST_CLOUD_TOKEN, TASK_LIST_PREFERENCES_SERVICE_TOKEN, TASK_SEARCH_API_METHOD_TOKEN } from '../../../services/cloud-token.service';
|
||||
import { PreferenceCloudServiceInterface } from '../../../services/preference-cloud.interface';
|
||||
import { TaskListCloudServiceInterface } from '../../../services/task-list-cloud.service.interface';
|
||||
import { BehaviorSubject, combineLatest, Subject } from 'rxjs';
|
||||
@ -266,6 +262,7 @@ export class TaskListCloudComponent extends BaseTaskListCloudComponent<ProcessLi
|
||||
onlyStandalone: this.standalone,
|
||||
name: this.names,
|
||||
processDefinitionName: this.processDefinitionNames,
|
||||
processInstanceId: this.processInstanceId,
|
||||
priority: this.priorities,
|
||||
status: this.statuses,
|
||||
completedBy: this.completedByUsers,
|
||||
|
Loading…
x
Reference in New Issue
Block a user