vcomply-workflow-engine 7.1.4 → 7.1.6
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/sharedComponents/frequency/frequency-on-completion-of/frequency-on-completion-of.component.mjs +5 -8
- package/esm2022/lib/sharedComponents/frequency/frequency-responsibility-list/frequency-responsibility-list.component.mjs +1 -2
- package/esm2022/lib/workflow-compliance/workflow-compliance.component.mjs +8 -4
- package/fesm2022/vcomply-workflow-engine.mjs +11 -11
- package/fesm2022/vcomply-workflow-engine.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -29609,7 +29609,6 @@ class FrequencyResponsibilityListComponent {
|
|
|
29609
29609
|
return nameArray[0]?.charAt(0) + nameArray[0]?.charAt(1)?.toUpperCase();
|
|
29610
29610
|
}
|
|
29611
29611
|
populateResponsibility() {
|
|
29612
|
-
// Allow pre-selection even if assignee / RC are not known.
|
|
29613
29612
|
if (!this.selectedResponsibilityDetails || !this.selectedResponsibilityDetails.id) {
|
|
29614
29613
|
return;
|
|
29615
29614
|
}
|
|
@@ -29675,11 +29674,8 @@ class FrequencyOnCompletionOfComponent {
|
|
|
29675
29674
|
}
|
|
29676
29675
|
ngOnInit() {
|
|
29677
29676
|
this.frequencyInfo = Object.assign(this.frequencyService.frequencyInfo);
|
|
29678
|
-
// If we already have a simple onCompletionResponsibility (from edit),
|
|
29679
|
-
// hydrate structures so the chip + list can use it.
|
|
29680
29677
|
if (this.onCompletionResponsibility?.title &&
|
|
29681
29678
|
!this.selectedResponsibilityDetails?.responsibility) {
|
|
29682
|
-
// For chip + frequency calculations we only need title/id
|
|
29683
29679
|
this.selectedResponsibilityDetails = {
|
|
29684
29680
|
responsibility: {
|
|
29685
29681
|
title: this.onCompletionResponsibility.title,
|
|
@@ -29696,7 +29692,6 @@ class FrequencyOnCompletionOfComponent {
|
|
|
29696
29692
|
responsibilityCenter: null,
|
|
29697
29693
|
},
|
|
29698
29694
|
};
|
|
29699
|
-
// For list component pre-selection we must match its expected shape
|
|
29700
29695
|
this.selectedResponsibilityListPrefill = {
|
|
29701
29696
|
assignee: null,
|
|
29702
29697
|
responsibilityCenter: null,
|
|
@@ -29705,7 +29700,6 @@ class FrequencyOnCompletionOfComponent {
|
|
|
29705
29700
|
};
|
|
29706
29701
|
}
|
|
29707
29702
|
this.getCompletionReports();
|
|
29708
|
-
// Pre-populate selected responsibility when editing an existing frequency
|
|
29709
29703
|
if (!this.onCompletionResponsibility?.title &&
|
|
29710
29704
|
this.frequencyData?.onCompletionReportDetails) {
|
|
29711
29705
|
const details = this.frequencyData.onCompletionReportDetails;
|
|
@@ -29749,7 +29743,6 @@ class FrequencyOnCompletionOfComponent {
|
|
|
29749
29743
|
}
|
|
29750
29744
|
onResponsibilitySelection(event) {
|
|
29751
29745
|
this.selectedResponsibilityDetails = event;
|
|
29752
|
-
// Build flat prefill object for list on subsequent edits
|
|
29753
29746
|
if (event?.eachAssignee && event?.responsibility) {
|
|
29754
29747
|
this.selectedResponsibilityListPrefill = {
|
|
29755
29748
|
assignee: event.eachAssignee.assignee,
|
|
@@ -29834,7 +29827,10 @@ class FrequencyOnCompletionOfComponent {
|
|
|
29834
29827
|
? Object.keys(this.selectedResponsibilityDetails)?.length > 0
|
|
29835
29828
|
: false;
|
|
29836
29829
|
this.frequencyInfo.reportId = 0;
|
|
29837
|
-
|
|
29830
|
+
this.frequencyInfo.onCompletionResponsibility = null;
|
|
29831
|
+
this.frequencyInfo.onCompletion = {};
|
|
29832
|
+
this.frequencyInfo.pattern = '';
|
|
29833
|
+
this.frequencyInfo.case = '';
|
|
29838
29834
|
this.frequencyInfo.placeholder =
|
|
29839
29835
|
this.onCompletionOfInput +
|
|
29840
29836
|
' ' +
|
|
@@ -34513,7 +34509,6 @@ class WorkflowComplianceComponent {
|
|
|
34513
34509
|
};
|
|
34514
34510
|
}
|
|
34515
34511
|
else {
|
|
34516
|
-
// Fallback: preserve any already-known onCompletionResponsibility
|
|
34517
34512
|
if (this.responsibilityDetails?.onCompletionResponsibility) {
|
|
34518
34513
|
this.frequencyDetails.onCompletionReportDetails = {
|
|
34519
34514
|
report_name: this.responsibilityDetails.onCompletionResponsibility
|
|
@@ -34530,11 +34525,15 @@ class WorkflowComplianceComponent {
|
|
|
34530
34525
|
if (this.invalidType === 'when') {
|
|
34531
34526
|
this.invalidType = '';
|
|
34532
34527
|
}
|
|
34528
|
+
// Build normalized frequency object for API / placeholder logic
|
|
34533
34529
|
this.frequencyObject = this.frequencyService.setFrequencyObject(event);
|
|
34530
|
+
// Safely persist on-completion responsibility details if present
|
|
34534
34531
|
if (event?.onCompletionResponsibility) {
|
|
34532
|
+
this.responsibilityDetails = this.responsibilityDetails || {};
|
|
34535
34533
|
this.responsibilityDetails.onCompletionResponsibility =
|
|
34536
34534
|
event.onCompletionResponsibility;
|
|
34537
34535
|
}
|
|
34536
|
+
// Persist raw frequency fields on the responsibility form
|
|
34538
34537
|
this.responsibilityForm.frequency = event.pattern;
|
|
34539
34538
|
this.responsibilityForm.reminder_before_days =
|
|
34540
34539
|
event.case === 'daily' ? 0 : event.window;
|
|
@@ -34546,8 +34545,9 @@ class WorkflowComplianceComponent {
|
|
|
34546
34545
|
this.responsibilityForm.timeIn24Hr = event.timeIn24Hr;
|
|
34547
34546
|
this.responsibilityForm.continuous_failed_days =
|
|
34548
34547
|
event.continuous_failed_days;
|
|
34548
|
+
// Close the frequency side selector
|
|
34549
34549
|
this.activateSelector('frequency', false);
|
|
34550
|
-
|
|
34550
|
+
const payload = {
|
|
34551
34551
|
frequency_details: event.pattern,
|
|
34552
34552
|
frequency_time: event.timeIn12hr,
|
|
34553
34553
|
reminder_before_days: event.window,
|
|
@@ -34559,8 +34559,8 @@ class WorkflowComplianceComponent {
|
|
|
34559
34559
|
continuous_failed_days: event.continuous_failed_days,
|
|
34560
34560
|
placeholder: event.placeholder,
|
|
34561
34561
|
};
|
|
34562
|
+
// Normalise shape for frequencyPopulation (used for placeholder + summary)
|
|
34562
34563
|
event.frequency_details = event.pattern;
|
|
34563
|
-
this.frequencyObject = this.frequencyService.setFrequencyObject(event);
|
|
34564
34564
|
this.frequencyPopulation(payload);
|
|
34565
34565
|
}
|
|
34566
34566
|
checkBlank(data) {
|