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,6 +51,7 @@ export const fakeServiceTask = {
|
|||||||
list: {
|
list: {
|
||||||
entries: [
|
entries: [
|
||||||
{
|
{
|
||||||
|
entry: {
|
||||||
activityType: 'serviceTask',
|
activityType: 'serviceTask',
|
||||||
activityName: 'serviceTaskName',
|
activityName: 'serviceTaskName',
|
||||||
appName: 'simpleapp',
|
appName: 'simpleapp',
|
||||||
@ -68,6 +69,7 @@ export const fakeServiceTask = {
|
|||||||
startedDate: '2020-09-22T16:03:37.444+0000',
|
startedDate: '2020-09-22T16:03:37.444+0000',
|
||||||
status: 'COMPLETED'
|
status: 'COMPLETED'
|
||||||
}
|
}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
pagination: {
|
pagination: {
|
||||||
skipCount: 0,
|
skipCount: 0,
|
||||||
@ -79,8 +81,7 @@ export const fakeServiceTask = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const fakeCustomSchema =
|
export const fakeCustomSchema = [
|
||||||
[
|
|
||||||
new ObjectDataColumn<ProcessListDataColumnCustomData>({
|
new ObjectDataColumn<ProcessListDataColumnCustomData>({
|
||||||
key: 'fakeName',
|
key: 'fakeName',
|
||||||
type: 'text',
|
type: 'text',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user