@mseva/digit-ui-module-noc 1.0.78-UAT.13 → 1.0.78-UAT.14

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.
@@ -21362,8 +21362,12 @@ const NOCEmployeeApplicationOverview = () => {
21362
21362
  }
21363
21363
  const userRoles = (_user5 = user) === null || _user5 === void 0 ? void 0 : (_user5$info = _user5.info) === null || _user5$info === void 0 ? void 0 : (_user5$info$roles = _user5$info.roles) === null || _user5$info$roles === void 0 ? void 0 : _user5$info$roles.map(e => e.code);
21364
21364
  useEffect$1(() => {
21365
- refetch();
21366
- workflowDetails.revalidate();
21365
+ if (workflowDetails) {
21366
+ workflowDetails.revalidate();
21367
+ }
21368
+ if (data) {
21369
+ data.revalidate();
21370
+ }
21367
21371
  }, []);
21368
21372
  let actions = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data8 = workflowDetails.data) === null || _workflowDetails$data8 === void 0 ? void 0 : (_workflowDetails$data9 = _workflowDetails$data8.actionState) === null || _workflowDetails$data9 === void 0 ? void 0 : (_workflowDetails$data0 = _workflowDetails$data9.nextActions) === null || _workflowDetails$data0 === void 0 ? void 0 : _workflowDetails$data0.filter(e => {
21369
21373
  return (userRoles === null || userRoles === void 0 ? void 0 : userRoles.some(role => {
@@ -22764,8 +22768,7 @@ const Inbox = ({
22764
22768
  console.log('employeeName, employeeRole', employeeName, employeeRole);
22765
22769
  const {
22766
22770
  isLoading: isInboxLoading,
22767
- data,
22768
- refetch
22771
+ data
22769
22772
  } = Digit.Hooks.noc.useInbox({
22770
22773
  tenantId,
22771
22774
  filters: {
@@ -22773,7 +22776,9 @@ const Inbox = ({
22773
22776
  }
22774
22777
  });
22775
22778
  useEffect$1(() => {
22776
- refetch();
22779
+ if (data) {
22780
+ data.revalidate();
22781
+ }
22777
22782
  }, []);
22778
22783
  const [table, setTable] = useState([]);
22779
22784
  const [statuses, setStatuses] = useState([]);
@@ -22968,6 +22973,13 @@ const NOCBreadCrumbs$1 = ({
22968
22973
  t
22969
22974
  } = useTranslation();
22970
22975
  const getBreadcrumbs = () => {
22976
+ var _Digit$UserService, _user$info, _user$info$roles, _user$info2, _user$info2$roles;
22977
+ const tenantId = localStorage.getItem("CITIZEN.CITY");
22978
+ const user = (_Digit$UserService = Digit.UserService) === null || _Digit$UserService === void 0 ? void 0 : _Digit$UserService.getUser();
22979
+ const isUserRegistered = (user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : (_user$info$roles = _user$info.roles) === null || _user$info$roles === void 0 ? void 0 : _user$info$roles.some(role => (role === null || role === void 0 ? void 0 : role.code) === "BPA_ARCHITECT")) || (user === null || user === void 0 ? void 0 : (_user$info2 = user.info) === null || _user$info2 === void 0 ? void 0 : (_user$info2$roles = _user$info2.roles) === null || _user$info2$roles === void 0 ? void 0 : _user$info2$roles.some(role => {
22980
+ var _role$code;
22981
+ return (role === null || role === void 0 ? void 0 : (_role$code = role.code) === null || _role$code === void 0 ? void 0 : _role$code.includes("BPA")) && (role === null || role === void 0 ? void 0 : role.tenantId) === tenantId;
22982
+ }));
22971
22983
  const breadcrumbs = [];
22972
22984
  const hasSecondBreadcrumb = location.pathname.includes("/noc/new-application") || location.pathname.includes("noc/my-application") || location.pathname.includes("noc/search/application-overview/") || location.pathname.includes("noc/search-application");
22973
22985
  breadcrumbs.push(/*#__PURE__*/React.createElement("span", {
@@ -22987,7 +22999,7 @@ const NOCBreadCrumbs$1 = ({
22987
22999
  breadcrumbs.push(/*#__PURE__*/React.createElement("span", {
22988
23000
  key: "noc"
22989
23001
  }, /*#__PURE__*/React.createElement(Link, {
22990
- to: "/digit-ui/citizen/noc-home",
23002
+ to: isUserRegistered ? "/digit-ui/citizen/obps/home" : "/digit-ui/citizen/noc-home",
22991
23003
  style: {
22992
23004
  textDecoration: "none"
22993
23005
  }
@@ -29815,8 +29827,6 @@ const CitizenApplicationOverview = () => {
29815
29827
  top: 0,
29816
29828
  behavior: "smooth"
29817
29829
  });
29818
- refetch();
29819
- workflowDetails.revalidate();
29820
29830
  }, []);
29821
29831
  useEffect$1(() => {
29822
29832
  var _applicationDetails$N9;