vcomply-workflow-engine 6.1.35 → 6.1.37

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.
@@ -12619,7 +12619,6 @@ class FrequencyService {
12619
12619
  };
12620
12620
  }
12621
12621
  getRandomFrequency(frequency) {
12622
- console.log(frequency, 'frequency');
12623
12622
  return {
12624
12623
  type: ['weekly', 'monthly', 'quarterly', 'yearly'][frequency?.randomTypeSelected],
12625
12624
  occurrence: frequency?.randomInstances
@@ -33775,6 +33774,7 @@ class WorkflowComplianceComponent {
33775
33774
  }
33776
33775
  // for edit responsibility
33777
33776
  frequencyDataPopulation(event) {
33777
+ const { selectedDay, selectedMonth } = this.getSelectedAttributes(event);
33778
33778
  let data = {
33779
33779
  pattern: event?.pattern,
33780
33780
  window: event?.startBefore,
@@ -33785,11 +33785,40 @@ class WorkflowComplianceComponent {
33785
33785
  timeIn24Hr: event?.time,
33786
33786
  continuous_failed_days: event?.autoDeactivate,
33787
33787
  startDate: Number(event?.start_of_day_utc),
33788
- // reportId: event?.on_completion_of[0] ?? 0,
33789
33788
  timeIn12hr: this.frequencyService.timeIn12(event?.time),
33789
+ case: event?.type,
33790
+ day: event?.day,
33791
+ every: event?.repeatOptions?.every,
33792
+ selectedDay: selectedDay,
33793
+ selectedMonth: selectedMonth,
33794
+ selectedType: event?.onGoing?.selectedType,
33795
+ randomInstances: event?.random?.randomInstances,
33796
+ selectedOngoingType: event?.onGoing?.selectedOngoingType,
33790
33797
  };
33791
33798
  this.frequencyData(data);
33792
33799
  }
33800
+ getSelectedAttributes(event) {
33801
+ let selectedDay = [];
33802
+ let selectedMonth = [];
33803
+ const repeatOn = event?.repeatOptions?.repeatOn.split('');
33804
+ if (repeatOn.length === 7) {
33805
+ repeatOn.forEach((ele, index) => {
33806
+ if (Number(ele) === 1) {
33807
+ selectedDay.push(index + 1);
33808
+ }
33809
+ });
33810
+ return { selectedDay, selectedMonth: [] };
33811
+ }
33812
+ else {
33813
+ repeatOn.forEach((ele, index) => {
33814
+ if (ele === '1') {
33815
+ selectedMonth.push(index + 1);
33816
+ ;
33817
+ }
33818
+ });
33819
+ return { selectedDay, selectedMonth };
33820
+ }
33821
+ }
33793
33822
  frequencyPopulation(event) {
33794
33823
  this.frequencyDetails.pattern = event?.frequency_details;
33795
33824
  this.frequencyDetails.failedTime = event?.frequency_time;
@@ -33841,10 +33870,6 @@ class WorkflowComplianceComponent {
33841
33870
  placeholder: event.placeholder,
33842
33871
  };
33843
33872
  event.frequency_details = event.pattern;
33844
- // let onCompletionReportDetails = this.getOnCompletionReportDetails(event);
33845
- // if (onCompletionReportDetails != null) {
33846
- // payload.onCompletionReportDetails = onCompletionReportDetails;
33847
- // }
33848
33873
  this.frequencyObject = this.frequencyService.setFrequencyObject(event);
33849
33874
  this.frequencyPopulation(payload);
33850
33875
  }