Skip to content

Commit

Permalink
M2-6235: Code review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vmkhitaryanscn committed May 21, 2024
1 parent 21af621 commit 694dd68
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const getProgress = (startAt: Date, endAt: Date | null) => {
startAt,
endAt,
availableTo: null,
entityName: 'test-entity-name-1',
entityName: '',
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const getProgress = (startAt: Date, endAt: Date | null) => {
startAt,
endAt,
availableTo: null,
entityName: 'mock-entity-name',
entityName: '',
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import { isEntityExpired, MIDNIGHT_DATE } from '@shared/lib';

import { GroupUtility, GroupsBuildContext } from './GroupUtility';
import { EventEntity, Activity, ActivityFlow } from '../../lib';
import { EventEntity, Activity, ActivityFlow, Entity } from '../../lib';

export class ListItemsFactory {
private utility: GroupUtility;
Expand Down Expand Up @@ -77,6 +77,7 @@ export class ListItemsFactory {
private populateActivityFields(
item: ActivityListItem,
activityEvent: EventEntity,
entity: Entity,
) {
const isInProgress = this.utility.isInProgress(activityEvent);

Expand All @@ -86,6 +87,7 @@ export class ListItemsFactory {
) as ActivityProgress;

item.name = progressRecord.entityName;
item.activityId = entity.id;
}
}

Expand Down Expand Up @@ -113,7 +115,7 @@ export class ListItemsFactory {
if (isFlow) {
this.populateActivityFlowFields(item, eventActivity);
} else {
this.populateActivityFields(item, eventActivity);
this.populateActivityFields(item, eventActivity, entity);
}
return item;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const getProgress = (startAt: Date, endAt: Date | null) => {
startAt,
endAt,
availableTo: null,
entityName: 'mock-entity-name',
entityName: '',
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const progress: Progress = {
startAt: new Date(2023, 1, 12, 14, 16, 17),
endAt: new Date(2023, 1, 12, 15, 26, 17),
availableTo: null,
entityName: 'mock-entity-name',
entityName: '',
},
},
afid1: {
Expand All @@ -33,7 +33,7 @@ export const progress: Progress = {
currentActivityImage: null,
totalActivitiesInPipeline: 2,
availableTo: null,
entityName: 'mock-entity-name',
entityName: '',
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions src/widgets/survey/model/services/tests/testHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export const getFlowProgressMock = (): StoreProgress => {
executionGroupKey: 'mock-flow-group-key-1',
pipelineActivityOrder: 0,
totalActivitiesInPipeline: 2,
entityName: 'mock-entity-name',
entityName: '',
},
},
},
Expand All @@ -233,7 +233,7 @@ export const getActivityProgressMock = (): StoreProgress => {
availableTo: null,
startAt: 12367800000,
endAt: null,
entityName: 'mock-entity-name',
entityName: '',
},
},
},
Expand Down

0 comments on commit 694dd68

Please sign in to comment.