mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-] update library to use new js-api 3.0.0 (#4097)
This commit is contained in:
committed by
Eugenio Romano
parent
2acd1b4e26
commit
3ef7d3b7ea
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { TaskQueryRequestRepresentation, UserTaskFilterRepresentation } from 'alfresco-js-api';
|
||||
import { TaskFilterRepresentation, UserTaskFilterRepresentation, TaskQueryRepresentation } from '@alfresco/js-api';
|
||||
|
||||
export class AppDefinitionRepresentationModel {
|
||||
defaultAppId: string;
|
||||
@@ -57,37 +57,13 @@ export class FilterParamsModel {
|
||||
}
|
||||
}
|
||||
|
||||
export class FilterParamRepresentationModel {
|
||||
processDefinitionId: string;
|
||||
processDefinitionKey: string;
|
||||
name: string;
|
||||
state: string;
|
||||
sort: string;
|
||||
assignment: string;
|
||||
dueAfter: Date;
|
||||
dueBefore: Date;
|
||||
|
||||
constructor(obj?: any) {
|
||||
if (obj) {
|
||||
this.processDefinitionId = obj.processDefinitionId || null;
|
||||
this.processDefinitionKey = obj.processDefinitionKey || null;
|
||||
this.name = obj.name || null;
|
||||
this.state = obj.state || null;
|
||||
this.sort = obj.sort || null;
|
||||
this.assignment = obj.assignment || null;
|
||||
this.dueAfter = obj.dueAfter || null;
|
||||
this.dueBefore = obj.dueBefore || null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class FilterRepresentationModel implements UserTaskFilterRepresentation {
|
||||
id: number;
|
||||
appId: number;
|
||||
name: string;
|
||||
recent: boolean;
|
||||
icon: string;
|
||||
filter: FilterParamRepresentationModel;
|
||||
filter: TaskFilterRepresentation;
|
||||
index: number;
|
||||
|
||||
constructor(obj?: any) {
|
||||
@@ -97,7 +73,7 @@ export class FilterRepresentationModel implements UserTaskFilterRepresentation {
|
||||
this.name = obj.name || null;
|
||||
this.recent = !!obj.recent;
|
||||
this.icon = obj.icon || null;
|
||||
this.filter = new FilterParamRepresentationModel(obj.filter);
|
||||
this.filter = new UserTaskFilterRepresentation(obj.filter);
|
||||
this.index = obj.index;
|
||||
}
|
||||
}
|
||||
@@ -107,38 +83,6 @@ export class FilterRepresentationModel implements UserTaskFilterRepresentation {
|
||||
}
|
||||
}
|
||||
|
||||
export class TaskQueryRequestRepresentationModel implements TaskQueryRequestRepresentation {
|
||||
appDefinitionId: string;
|
||||
dueAfter: string;
|
||||
dueBefore: string;
|
||||
processInstanceId: string;
|
||||
processDefinitionId: string;
|
||||
text: string;
|
||||
assignment: string;
|
||||
state: string;
|
||||
start: string;
|
||||
sort: string;
|
||||
page: number;
|
||||
size: number;
|
||||
taskId: string;
|
||||
includeProcessInstance: boolean;
|
||||
export class TaskQueryRequestRepresentationModel extends TaskQueryRepresentation {
|
||||
|
||||
constructor(obj?: any) {
|
||||
if (obj) {
|
||||
this.appDefinitionId = obj.appDefinitionId || null;
|
||||
this.dueAfter = obj.dueAfter || null;
|
||||
this.dueBefore = obj.dueBefore || null;
|
||||
this.processInstanceId = obj.processInstanceId || null;
|
||||
this.processDefinitionId = obj.processDefinitionId || null;
|
||||
this.text = obj.text || null;
|
||||
this.assignment = obj.assignment || null;
|
||||
this.state = obj.state || null;
|
||||
this.start = obj.start || null;
|
||||
this.sort = obj.sort || null;
|
||||
this.page = obj.page || 0;
|
||||
this.size = obj.size || 25;
|
||||
this.taskId = obj.taskId || null;
|
||||
this.includeProcessInstance = obj.includeProcessInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -19,43 +19,43 @@
|
||||
* This object represent the details of a task.
|
||||
*/
|
||||
import { UserProcessModel } from '@alfresco/adf-core';
|
||||
import { TaskRepresentation } from 'alfresco-js-api';
|
||||
import { TaskRepresentation } from '@alfresco/js-api';
|
||||
import { UserGroupModel } from './user-group.model';
|
||||
|
||||
export class TaskDetailsModel implements TaskRepresentation {
|
||||
id: string;
|
||||
name: string;
|
||||
assignee: UserProcessModel;
|
||||
priority: number;
|
||||
adhocTaskCanBeReassigned: boolean;
|
||||
category: string;
|
||||
created: Date;
|
||||
description: string;
|
||||
parentName: string;
|
||||
dueDate: Date;
|
||||
duration: number;
|
||||
endDate: Date;
|
||||
executionId: string;
|
||||
formKey: string;
|
||||
initiatorCanCompleteTask: boolean;
|
||||
managerOfCandidateGroup: boolean;
|
||||
memberOfCandidateGroup: boolean;
|
||||
memberOfCandidateUsers: boolean;
|
||||
involvedGroups: UserGroupModel [];
|
||||
involvedPeople: UserProcessModel [];
|
||||
parentTaskId: string;
|
||||
parentTaskName: string;
|
||||
processDefinitionCategory: string;
|
||||
processDefinitionDeploymentId: string;
|
||||
processDefinitionDescription: string;
|
||||
processDefinitionId: string;
|
||||
processDefinitionKey: string;
|
||||
processDefinitionName: string;
|
||||
processDefinitionVersion: number = 0;
|
||||
processInstanceId: string;
|
||||
processInstanceName: string;
|
||||
processInstanceStartUserId: string;
|
||||
taskDefinitionKey: string;
|
||||
id?: string;
|
||||
name?: string;
|
||||
assignee?: UserProcessModel;
|
||||
priority?: number;
|
||||
adhocTaskCanBeReassigned?: boolean;
|
||||
category?: string;
|
||||
created?: Date;
|
||||
description?: string;
|
||||
parentName?: string;
|
||||
dueDate?: Date;
|
||||
duration?: number;
|
||||
endDate?: Date;
|
||||
executionId?: string;
|
||||
formKey?: string;
|
||||
initiatorCanCompleteTask?: boolean;
|
||||
managerOfCandidateGroup?: boolean;
|
||||
memberOfCandidateGroup?: boolean;
|
||||
memberOfCandidateUsers?: boolean;
|
||||
involvedGroups?: UserGroupModel [];
|
||||
involvedPeople?: UserProcessModel [];
|
||||
parentTaskId?: string;
|
||||
parentTaskName?: string;
|
||||
processDefinitionCategory?: string;
|
||||
processDefinitionDeploymentId?: string;
|
||||
processDefinitionDescription?: string;
|
||||
processDefinitionId?: string;
|
||||
processDefinitionKey?: string;
|
||||
processDefinitionName?: string;
|
||||
processDefinitionVersion?: number = 0;
|
||||
processInstanceId?: string;
|
||||
processInstanceName?: string;
|
||||
processInstanceStartUserId?: string;
|
||||
taskDefinitionKey?: string;
|
||||
|
||||
constructor(obj?: any) {
|
||||
if (obj) {
|
||||
|
@@ -17,13 +17,21 @@
|
||||
|
||||
import { TaskDetailsModel } from './task-details.model';
|
||||
|
||||
export class TaskListModel {
|
||||
size: number;
|
||||
total: number;
|
||||
start: number;
|
||||
length: number;
|
||||
data: TaskDetailsModel[] = [];
|
||||
export class TaskListModel {
|
||||
size?: number;
|
||||
total?: number;
|
||||
start?: number;
|
||||
length?: number;
|
||||
data?: TaskDetailsModel[] = [];
|
||||
|
||||
constructor() {
|
||||
constructor(input?: any) {
|
||||
if (input) {
|
||||
Object.assign(this, input);
|
||||
if (input.data) {
|
||||
this.data = input.data.map((item: any) => {
|
||||
return new TaskDetailsModel(item);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -20,11 +20,11 @@
|
||||
*/
|
||||
|
||||
export class UserGroupModel {
|
||||
id: number;
|
||||
name: string;
|
||||
externalId: string;
|
||||
status: string;
|
||||
groups: any = {};
|
||||
id?: number;
|
||||
name?: string;
|
||||
externalId?: string;
|
||||
status?: string;
|
||||
groups?: any = {};
|
||||
|
||||
constructor(obj?: any) {
|
||||
this.id = obj && obj.id;
|
||||
|
Reference in New Issue
Block a user