mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
[AAE-27160] Fix the structure of data returned from service-tasks API (#10711)
This commit is contained in:
parent
5912423f96
commit
d5bd97e3d2
@ -230,7 +230,7 @@ describe('ServiceTaskListCloudComponent', () => {
|
|||||||
|
|
||||||
describe('component changes', () => {
|
describe('component changes', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
component.rows = fakeServiceTask.list.entries;
|
component.rows = fakeServiceTask.list.entries.map((task) => task.entry);
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ export class ServiceTaskListCloudComponent extends BaseTaskListCloudComponent {
|
|||||||
.pipe(takeUntilDestroyed(this.destroyRef))
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
||||||
.subscribe(
|
.subscribe(
|
||||||
([tasks]) => {
|
([tasks]) => {
|
||||||
this.rows = tasks.list.entries;
|
this.rows = tasks.list.entries.map((task) => task.entry);
|
||||||
this.success.emit(tasks);
|
this.success.emit(tasks);
|
||||||
this.pagination.next(tasks.list.pagination);
|
this.pagination.next(tasks.list.pagination);
|
||||||
this.isReloadingSubject$.next(false);
|
this.isReloadingSubject$.next(false);
|
||||||
|
@ -51,22 +51,24 @@ export const fakeServiceTask = {
|
|||||||
list: {
|
list: {
|
||||||
entries: [
|
entries: [
|
||||||
{
|
{
|
||||||
activityType: 'serviceTask',
|
entry: {
|
||||||
activityName: 'serviceTaskName',
|
activityType: 'serviceTask',
|
||||||
appName: 'simpleapp',
|
activityName: 'serviceTaskName',
|
||||||
completedDate: '2020-09-22T16:03:37.482+0000',
|
appName: 'simpleapp',
|
||||||
elementId: 'ServiceTask_0lszm0x',
|
completedDate: '2020-09-22T16:03:37.482+0000',
|
||||||
executionId: '2023b099-fced-11ea-b116-62141048995a',
|
elementId: 'ServiceTask_0lszm0x',
|
||||||
id: '04fdf69f-4ddd-48ab-9563-da776c9b163c',
|
executionId: '2023b099-fced-11ea-b116-62141048995a',
|
||||||
processDefinitionId: 'Process_24rkVVSR:1:0db78dcd-fc14-11ea-bce0-62141048995a',
|
id: '04fdf69f-4ddd-48ab-9563-da776c9b163c',
|
||||||
processDefinitionKey: 'Process_24rkVVSR',
|
processDefinitionId: 'Process_24rkVVSR:1:0db78dcd-fc14-11ea-bce0-62141048995a',
|
||||||
processDefinitionVersion: 1,
|
processDefinitionKey: 'Process_24rkVVSR',
|
||||||
processInstanceId: '2023b097-fced-11ea-b116-62141048995a',
|
processDefinitionVersion: 1,
|
||||||
serviceFullName: 'simpleapp-rb',
|
processInstanceId: '2023b097-fced-11ea-b116-62141048995a',
|
||||||
serviceName: 'simpleapp-rb',
|
serviceFullName: 'simpleapp-rb',
|
||||||
serviceVersion: '',
|
serviceName: 'simpleapp-rb',
|
||||||
startedDate: '2020-09-22T16:03:37.444+0000',
|
serviceVersion: '',
|
||||||
status: 'COMPLETED'
|
startedDate: '2020-09-22T16:03:37.444+0000',
|
||||||
|
status: 'COMPLETED'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
pagination: {
|
pagination: {
|
||||||
@ -79,18 +81,17 @@ export const fakeServiceTask = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const fakeCustomSchema =
|
export const fakeCustomSchema = [
|
||||||
[
|
new ObjectDataColumn<ProcessListDataColumnCustomData>({
|
||||||
new ObjectDataColumn<ProcessListDataColumnCustomData>({
|
key: 'fakeName',
|
||||||
key: 'fakeName',
|
type: 'text',
|
||||||
type: 'text',
|
title: 'ADF_CLOUD_TASK_LIST.PROPERTIES.FAKE',
|
||||||
title: 'ADF_CLOUD_TASK_LIST.PROPERTIES.FAKE',
|
sortable: true
|
||||||
sortable: true
|
}),
|
||||||
}),
|
new ObjectDataColumn<ProcessListDataColumnCustomData>({
|
||||||
new ObjectDataColumn<ProcessListDataColumnCustomData>({
|
key: 'fakeTaskName',
|
||||||
key: 'fakeTaskName',
|
type: 'text',
|
||||||
type: 'text',
|
title: 'ADF_CLOUD_TASK_LIST.PROPERTIES.TASK_FAKE',
|
||||||
title: 'ADF_CLOUD_TASK_LIST.PROPERTIES.TASK_FAKE',
|
sortable: true
|
||||||
sortable: true
|
})
|
||||||
})
|
];
|
||||||
];
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user