rez_core 4.0.29 → 4.0.30
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/repository/stage-movement.repository.js +12 -0
- package/dist/module/workflow/repository/stage-movement.repository.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/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
|
|