@mseva/digit-ui-module-ptr 1.1.24 → 1.1.25

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.
@@ -18616,13 +18616,21 @@ const PTRWFApplicationTimeline = props => {
18616
18616
  }
18617
18617
  };
18618
18618
  useEffect(() => {
18619
- let WorkflowService = null;
18620
- (async (_WorkflowService, _WorkflowService$Busi, _WorkflowService$Busi2) => {
18621
- setLoader(true);
18622
- WorkflowService = await Digit.WorkflowService.init(tenantId, "ptr");
18623
- setLoader(false);
18624
- setWorkflowService((_WorkflowService = WorkflowService) === null || _WorkflowService === void 0 ? void 0 : (_WorkflowService$Busi = _WorkflowService.BusinessServices) === null || _WorkflowService$Busi === void 0 ? void 0 : (_WorkflowService$Busi2 = _WorkflowService$Busi[0]) === null || _WorkflowService$Busi2 === void 0 ? void 0 : _WorkflowService$Busi2.states);
18625
- })();
18619
+ const fetchWorkflowService = async () => {
18620
+ try {
18621
+ var _WorkflowService$Busi, _WorkflowService$Busi2;
18622
+ setLoader(true);
18623
+ const WorkflowService = await Digit.WorkflowService.init(tenantId, "ptr");
18624
+ setWorkflowService((WorkflowService === null || WorkflowService === void 0 ? void 0 : (_WorkflowService$Busi = WorkflowService.BusinessServices) === null || _WorkflowService$Busi === void 0 ? void 0 : (_WorkflowService$Busi2 = _WorkflowService$Busi[0]) === null || _WorkflowService$Busi2 === void 0 ? void 0 : _WorkflowService$Busi2.states) || []);
18625
+ } catch (error) {
18626
+ console.error("Error fetching workflow service:", error);
18627
+ } finally {
18628
+ setLoader(false);
18629
+ }
18630
+ };
18631
+ if (tenantId) {
18632
+ fetchWorkflowService();
18633
+ }
18626
18634
  }, [tenantId]);
18627
18635
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Fragment$1, null, (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data1 = workflowDetails.data) === null || _workflowDetails$data1 === void 0 ? void 0 : (_workflowDetails$data10 = _workflowDetails$data1.timeline) === null || _workflowDetails$data10 === void 0 ? void 0 : _workflowDetails$data10.length) > 0 && /*#__PURE__*/React.createElement(CardSectionHeader, {
18628
18636
  style: {
@@ -18675,7 +18683,7 @@ const PTRWFApplicationTimeline = props => {
18675
18683
  label: error,
18676
18684
  isDleteBtn: true,
18677
18685
  onClose: closeToast
18678
- }), ( getLoader) && /*#__PURE__*/React.createElement(Loader, {
18686
+ }), getLoader && /*#__PURE__*/React.createElement(Loader, {
18679
18687
  page: true
18680
18688
  }));
18681
18689
  };