rez_core 4.0.29 → 4.0.31
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/.vscode/extensions.json +5 -0
- package/dist/module/workflow/repository/stage-movement.repository.js +12 -0
- package/dist/module/workflow/repository/stage-movement.repository.js.map +1 -1
- package/dist/module/workflow/service/workflow-meta.service.d.ts +1 -3
- package/dist/module/workflow/service/workflow-meta.service.js +5 -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/repository/stage-movement.repository.ts +19 -0
- package/src/module/workflow/service/workflow-meta.service.ts +8 -5
package/package.json
CHANGED
|
@@ -185,6 +185,7 @@ export class StageMovementRepository {
|
|
|
185
185
|
`
|
|
186
186
|
SELECT
|
|
187
187
|
a.*,
|
|
188
|
+
m.id AS mapping_id,
|
|
188
189
|
m.stage_id,
|
|
189
190
|
ac.code AS action_category_code
|
|
190
191
|
FROM frm_wf_action a
|
|
@@ -194,6 +195,24 @@ export class StageMovementRepository {
|
|
|
194
195
|
`,
|
|
195
196
|
[stageId],
|
|
196
197
|
);
|
|
198
|
+
|
|
199
|
+
// Use for..of with await instead of map
|
|
200
|
+
for (const item of result) {
|
|
201
|
+
if (item.action_category_code === 'SDFM') {
|
|
202
|
+
const actionData = await this.dataSource.query(
|
|
203
|
+
`
|
|
204
|
+
SELECT arm.form_id
|
|
205
|
+
FROM frm_wf_action_resources_mapping arm
|
|
206
|
+
WHERE arm.stg_act_mapping_id = ? and form_id IS NOT NULL
|
|
207
|
+
LIMIT 1
|
|
208
|
+
`,
|
|
209
|
+
[item.mapping_id],
|
|
210
|
+
);
|
|
211
|
+
|
|
212
|
+
item.form_id = actionData[0]?.form_id || null;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
197
216
|
return result;
|
|
198
217
|
}
|
|
199
218
|
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
BadGatewayException,
|
|
3
|
+
Inject,
|
|
4
|
+
Injectable,
|
|
5
|
+
Logger,
|
|
6
|
+
} from '@nestjs/common';
|
|
2
7
|
import { ConfigService } from '@nestjs/config';
|
|
3
8
|
import { InjectRepository } from '@nestjs/typeorm';
|
|
4
9
|
import axios from 'axios';
|
|
@@ -30,7 +35,6 @@ export class WorkflowMetaService extends EntityServiceImpl {
|
|
|
30
35
|
@Inject('EntityModificationService')
|
|
31
36
|
private readonly modificationService: EntityModificationService,
|
|
32
37
|
private readonly configService: ConfigService,
|
|
33
|
-
private readonly logger = new Logger(WorkflowMetaService.name)
|
|
34
38
|
) {
|
|
35
39
|
super();
|
|
36
40
|
}
|
|
@@ -554,9 +558,8 @@ export class WorkflowMetaService extends EntityServiceImpl {
|
|
|
554
558
|
console.error('Internal Entity API call failed:', error.message);
|
|
555
559
|
}
|
|
556
560
|
|
|
557
|
-
if (!owners?.length)
|
|
558
|
-
|
|
559
|
-
);
|
|
561
|
+
if (!owners?.length)
|
|
562
|
+
console.log('No eligible owners found for lead assignment.');
|
|
560
563
|
const userIds = owners?.map((o) => Number(o.id)); // normalize to numbers
|
|
561
564
|
|
|
562
565
|
// 2) Find the last assigned *eligible* owner (use IN (...))
|