vcomply-workflow-engine 2.3.1 → 2.3.15

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.
@@ -2890,7 +2890,7 @@ class WorkflowComplianceComponent {
2890
2890
  }
2891
2891
  }
2892
2892
  checkWhetherAllListsLoaded() {
2893
- var _a, _b, _c, _d, _e, _f;
2893
+ var _a, _b, _c, _d, _e;
2894
2894
  if (this.rcListLoaded && this.assigneesListLoaded && this.assignorsListLoaded &&
2895
2895
  this.categoriesListLoaded && this.assuranceCategoryListLoaded && this.groupsListLoaded) {
2896
2896
  if (this.frameworkDetails.length > 0) {
@@ -2904,28 +2904,23 @@ class WorkflowComplianceComponent {
2904
2904
  this.uiKitService.isLoader = false;
2905
2905
  if (this.selectedProgram) {
2906
2906
  this.responsibilityForm.program.push(this.selectedProgram);
2907
- const programCustomTags = (_b = (_a = this.selectedProgram) === null || _a === void 0 ? void 0 : _a.custom_tags) !== null && _b !== void 0 ? _b : [];
2908
- programCustomTags.forEach((element) => {
2909
- const tag = element.custom_tags !== '' && element.custom_tags !== "null" && element.custom_tags != "[]" ? JSON.parse(element.custom_tags) : [];
2910
- if (tag.length > 0) {
2911
- tag.forEach((tagData) => {
2912
- const index = this.responsibilityForm.customTags.findIndex((tagElement) => tagElement.tag_name == tagData.tag_name);
2913
- if (index == -1) {
2914
- this.responsibilityForm.customTags.push(tagData);
2915
- }
2916
- });
2907
+ const programCustomTags = ((_a = this.selectedProgram) === null || _a === void 0 ? void 0 : _a.custom_tags) ? JSON.parse(this.selectedProgram.custom_tags) : [];
2908
+ programCustomTags.forEach((tagData) => {
2909
+ const index = this.responsibilityForm.customTags.findIndex((tagElement) => tagElement.tag_name == tagData.tag_name);
2910
+ if (index == -1) {
2911
+ this.responsibilityForm.customTags.push(tagData);
2917
2912
  }
2918
2913
  });
2919
- this.responsibilityForm.formatAndEvidence.evidenceRequired = (_d = (_c = this.selectedProgram) === null || _c === void 0 ? void 0 : _c.evidence_upload_flag) !== null && _d !== void 0 ? _d : false;
2914
+ this.responsibilityForm.formatAndEvidence.evidenceRequired = (_c = (_b = this.selectedProgram) === null || _b === void 0 ? void 0 : _b.evidence_upload_flag) !== null && _c !== void 0 ? _c : false;
2920
2915
  const checkedMoreOptions = [];
2921
2916
  this.moreOptions.PROGRAM = true;
2922
2917
  checkedMoreOptions.push('PROGRAM');
2923
- if ((_e = this.selectedProgram) === null || _e === void 0 ? void 0 : _e.evidence_upload_flag) {
2918
+ if ((_d = this.selectedProgram) === null || _d === void 0 ? void 0 : _d.evidence_upload_flag) {
2924
2919
  checkedMoreOptions.push('FORMATE_EVIDENCE');
2925
2920
  this.moreOptions.FORMATE_EVIDENCE = true;
2926
2921
  }
2927
2922
  this.populateOption.emit(checkedMoreOptions);
2928
- this.filterListsAccordingToProgram((_f = this.selectedProgram) === null || _f === void 0 ? void 0 : _f._id);
2923
+ this.filterListsAccordingToProgram((_e = this.selectedProgram) === null || _e === void 0 ? void 0 : _e._id);
2929
2924
  }
2930
2925
  }
2931
2926
  }
@@ -2936,7 +2931,7 @@ class WorkflowComplianceComponent {
2936
2931
  }
2937
2932
  }
2938
2933
  saveSelectedList(type, selectedItems) {
2939
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
2934
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
2940
2935
  switch (type) {
2941
2936
  case 'assignors':
2942
2937
  if (this.invalidType === 'whom') {
@@ -2999,26 +2994,21 @@ class WorkflowComplianceComponent {
2999
2994
  this.responsibilityForm.category_id = (_e = (_d = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _d === void 0 ? void 0 : _d.category_id) === null || _e === void 0 ? void 0 : _e.toString();
3000
2995
  }
3001
2996
  this.responsibilityForm.program_selected_ids = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.categories;
3002
- const programCustomTags = (_g = (_f = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _f === void 0 ? void 0 : _f.custom_tags) !== null && _g !== void 0 ? _g : [];
3003
- programCustomTags.forEach((element) => {
3004
- const tag = element.custom_tags !== '' && element.custom_tags !== "null" && element.custom_tags != "[]" ? JSON.parse(element.custom_tags) : [];
3005
- if (tag.length > 0) {
3006
- tag.forEach((tagData) => {
3007
- const index = this.responsibilityForm.customTags.findIndex((tagElement) => tagElement.tag_name == tagData.tag_name);
3008
- if (index == -1) {
3009
- this.responsibilityForm.customTags.push(tagData);
3010
- }
3011
- });
2997
+ const programCustomTags = ((_f = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _f === void 0 ? void 0 : _f.custom_tags) ? JSON.parse(selectedItems.program.custom_tags) : [];
2998
+ programCustomTags.forEach((tagData) => {
2999
+ const index = this.responsibilityForm.customTags.findIndex((tagElement) => tagElement.tag_name == tagData.tag_name);
3000
+ if (index == -1) {
3001
+ this.responsibilityForm.customTags.push(tagData);
3012
3002
  }
3013
3003
  });
3014
- this.responsibilityForm.formatAndEvidence.evidenceRequired = (_j = (_h = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _h === void 0 ? void 0 : _h.evidence_upload_flag) !== null && _j !== void 0 ? _j : false;
3015
- if ((_k = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _k === void 0 ? void 0 : _k.evidence_upload_flag) {
3004
+ this.responsibilityForm.formatAndEvidence.evidenceRequired = (_h = (_g = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _g === void 0 ? void 0 : _g.evidence_upload_flag) !== null && _h !== void 0 ? _h : false;
3005
+ if ((_j = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _j === void 0 ? void 0 : _j.evidence_upload_flag) {
3016
3006
  this.moreOptions.FORMATE_EVIDENCE = true;
3017
3007
  }
3018
- if (((_l = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.categories) === null || _l === void 0 ? void 0 : _l.length) == 0) {
3019
- this.responsibilityForm.program_selected_ids.push((_m = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _m === void 0 ? void 0 : _m.category_id);
3008
+ if (((_k = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.categories) === null || _k === void 0 ? void 0 : _k.length) == 0) {
3009
+ this.responsibilityForm.program_selected_ids.push((_l = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _l === void 0 ? void 0 : _l.category_id);
3020
3010
  }
3021
- if ((_o = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _o === void 0 ? void 0 : _o._id) {
3011
+ if ((_m = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _m === void 0 ? void 0 : _m._id) {
3022
3012
  this.filterListsAccordingToProgram(selectedItems.program._id);
3023
3013
  }
3024
3014
  else {
@@ -3065,10 +3055,10 @@ class WorkflowComplianceComponent {
3065
3055
  this.responsibilityForm.riskMatrix = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.riskMatrix;
3066
3056
  break;
3067
3057
  case 'formate_evidence':
3068
- this.responsibilityForm.formatAndEvidence.formatRequired = (_p = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.isFormateUploaded) !== null && _p !== void 0 ? _p : false;
3069
- this.responsibilityForm.formatAndEvidence.formatFiles = (_q = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.files) !== null && _q !== void 0 ? _q : [];
3070
- this.responsibilityForm.formatAndEvidence.formatLinks = (_r = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.links) !== null && _r !== void 0 ? _r : [];
3071
- this.responsibilityForm.formatAndEvidence.evidenceRequired = (_s = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.isEvidenceRequired) !== null && _s !== void 0 ? _s : false;
3058
+ this.responsibilityForm.formatAndEvidence.formatRequired = (_o = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.isFormateUploaded) !== null && _o !== void 0 ? _o : false;
3059
+ this.responsibilityForm.formatAndEvidence.formatFiles = (_p = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.files) !== null && _p !== void 0 ? _p : [];
3060
+ this.responsibilityForm.formatAndEvidence.formatLinks = (_q = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.links) !== null && _q !== void 0 ? _q : [];
3061
+ this.responsibilityForm.formatAndEvidence.evidenceRequired = (_r = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.isEvidenceRequired) !== null && _r !== void 0 ? _r : false;
3072
3062
  break;
3073
3063
  case 'reviewFrequency':
3074
3064
  this.responsibilityForm.reviewers.reviewFrequency = {