rez_core 5.0.81 → 5.0.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/workflow/service/workflow-meta.service.d.ts +3 -1
- package/dist/module/workflow/service/workflow-meta.service.js +19 -7
- package/dist/module/workflow/service/workflow-meta.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/workflow/service/workflow-meta.service.ts +17 -12
package/package.json
CHANGED
|
@@ -19,6 +19,7 @@ import { ActivityLogService } from './activity-log.service';
|
|
|
19
19
|
import { EntityModificationService } from './entity-modification.service';
|
|
20
20
|
import { TaskService } from './task.service';
|
|
21
21
|
import { ActionCategory } from '../entity/action-category.entity';
|
|
22
|
+
import { StageGroup } from '../entity/stage-group.entity';
|
|
22
23
|
|
|
23
24
|
@Injectable()
|
|
24
25
|
export class WorkflowMetaService extends EntityServiceImpl {
|
|
@@ -38,6 +39,8 @@ export class WorkflowMetaService extends EntityServiceImpl {
|
|
|
38
39
|
private readonly configService: ConfigService,
|
|
39
40
|
@InjectRepository(ActionCategory)
|
|
40
41
|
private readonly actionCategoryRepo: Repository<ActionCategory>,
|
|
42
|
+
@InjectRepository(StageGroup)
|
|
43
|
+
private readonly stageGroupRepo: Repository<StageGroup>,
|
|
41
44
|
) {
|
|
42
45
|
super();
|
|
43
46
|
}
|
|
@@ -88,25 +91,25 @@ export class WorkflowMetaService extends EntityServiceImpl {
|
|
|
88
91
|
|
|
89
92
|
if (!latestMovement) return null;
|
|
90
93
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
);
|
|
94
|
+
let stageGroup = await this.stageGroupRepo.findOne({
|
|
95
|
+
where: {id: latestMovement?.stage_group_id}
|
|
96
|
+
});
|
|
94
97
|
|
|
95
98
|
return {
|
|
96
99
|
...latestMovement,
|
|
97
|
-
stage_group_name:
|
|
100
|
+
stage_group_name: stageGroup?.name,
|
|
98
101
|
};
|
|
99
102
|
}
|
|
100
103
|
|
|
101
104
|
// get group name for the current stage
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
);
|
|
105
|
+
const stageGroup = await this.stageGroupRepo.findOne({
|
|
106
|
+
where: {id: currentStage?.stage_group_id}
|
|
107
|
+
});
|
|
105
108
|
|
|
106
109
|
// Return the found or newly created current stage movement
|
|
107
110
|
return {
|
|
108
111
|
...currentStage,
|
|
109
|
-
stage_group_name:
|
|
112
|
+
stage_group_name: stageGroup?.name,
|
|
110
113
|
};
|
|
111
114
|
}
|
|
112
115
|
|
|
@@ -126,13 +129,15 @@ export class WorkflowMetaService extends EntityServiceImpl {
|
|
|
126
129
|
return { hasNextStage: false, nextStage: null };
|
|
127
130
|
}
|
|
128
131
|
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
+
const stageGroup = await this.stageGroupRepo.findOne({
|
|
133
|
+
where: {
|
|
134
|
+
id: nextStage?.stage_group_id,
|
|
135
|
+
}
|
|
136
|
+
})
|
|
132
137
|
|
|
133
138
|
return {
|
|
134
139
|
hasNextStage: !!nextStage,
|
|
135
|
-
nextStage: { ...nextStage, stage_group_name:
|
|
140
|
+
nextStage: { ...nextStage, stage_group_name: stageGroup?.name },
|
|
136
141
|
};
|
|
137
142
|
}
|
|
138
143
|
|