vcomply-workflow-engine 6.5.2 → 6.5.3
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/esm2022/lib/workflow-compliance/workflow-compliance.component.mjs +29 -5
- package/fesm2022/vcomply-workflow-engine.mjs +28 -4
- package/fesm2022/vcomply-workflow-engine.mjs.map +1 -1
- package/lib/add-multiple-risk/add-multiple-risk.component.d.ts +1 -1
- package/lib/workflow-risk/workflow-risk.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -32057,10 +32057,29 @@ class WorkflowComplianceComponent {
|
|
|
32057
32057
|
}
|
|
32058
32058
|
this.complianceCommonService?.getRcListInfo(params)?.subscribe({
|
|
32059
32059
|
next: (res) => {
|
|
32060
|
-
|
|
32060
|
+
// Normalise RC list structure so UI components can rely on item_id / item_name
|
|
32061
|
+
this.responsibilityCentersList = Array.isArray(res)
|
|
32062
|
+
? res.map((item) => {
|
|
32063
|
+
const normalised = {
|
|
32064
|
+
...item,
|
|
32065
|
+
// item_id is what the RC selector & floating bar expect
|
|
32066
|
+
item_id: item?.item_id ?? item?.rc_id ?? item?.rcid ?? null,
|
|
32067
|
+
// item_name is what floating bar displays
|
|
32068
|
+
item_name: item?.item_name ??
|
|
32069
|
+
(Array.isArray(item?.rc_name)
|
|
32070
|
+
? item.rc_name.join(' / ')
|
|
32071
|
+
: item?.rc_name ??
|
|
32072
|
+
(Array.isArray(item?.item_name)
|
|
32073
|
+
? item.item_name.join(' / ')
|
|
32074
|
+
: item?.item_name)),
|
|
32075
|
+
};
|
|
32076
|
+
return normalised;
|
|
32077
|
+
})
|
|
32078
|
+
: [];
|
|
32061
32079
|
this.rcListLoaded = true;
|
|
32062
|
-
|
|
32063
|
-
const
|
|
32080
|
+
// Extract IDs using the normalised key
|
|
32081
|
+
const ids = this.returnIds(this.responsibilityForm.rc, 'item_id');
|
|
32082
|
+
const RC = this.responsibilityCentersList.filter((element) => ids?.includes(element.item_id));
|
|
32064
32083
|
if (RC?.length) {
|
|
32065
32084
|
this.responsibilityForm.rc = RC;
|
|
32066
32085
|
}
|
|
@@ -35320,7 +35339,12 @@ class WorkflowComplianceComponent {
|
|
|
35320
35339
|
frequency: res?.frequency,
|
|
35321
35340
|
description: res?.notes,
|
|
35322
35341
|
objective: res?.objective,
|
|
35323
|
-
rc:
|
|
35342
|
+
rc: (() => {
|
|
35343
|
+
const rcId = res.responsibilityCenter?.id;
|
|
35344
|
+
// After normalisation RCs should always have item_id populated
|
|
35345
|
+
const rcResult = this.setList(this.responsibilityCentersList, rcId ? [rcId] : [], 'item_id');
|
|
35346
|
+
return rcResult;
|
|
35347
|
+
})(),
|
|
35324
35348
|
responsibilityCenterType: res.responsibilityCenter?.type === 'all' ? 1 : 0,
|
|
35325
35349
|
category: res?.program_cat_ids?.length
|
|
35326
35350
|
? res?.category_ids_array.filter((ele) => !res.program_cat_ids?.includes(ele))
|