@djb25/digit-ui-module-common 1.0.6 → 1.0.7

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/dist/index.js CHANGED
@@ -2871,6 +2871,8 @@ const CitizenPayment = _ref => {
2871
2871
  moduleCode = _ref.moduleCode;
2872
2872
  const _useRouteMatch = reactRouterDom.useRouteMatch(),
2873
2873
  currentPath = _useRouteMatch.path;
2874
+ const _useLocation = reactRouterDom.useLocation(),
2875
+ routerState = _useLocation.state;
2874
2876
  const commonProps = {
2875
2877
  stateCode,
2876
2878
  cityCode,
@@ -2909,7 +2911,33 @@ const CitizenPayment = _ref => {
2909
2911
  show: pathname.includes("/failure")
2910
2912
  }];
2911
2913
  const getDynamicBreadcrumbs = () => {
2912
- return crumbs.filter(crumb => crumb.show);
2914
+ let activeCrumbs = crumbs.filter(crumb => crumb.show);
2915
+ const isWNS = pathname.includes("/WS") || pathname.includes("/SW") || window.location.search.includes("workflow=WNS");
2916
+ if (isWNS) {
2917
+ activeCrumbs.splice(1, 0, {
2918
+ path: "/digit-ui/citizen/ws-home",
2919
+ label: t("ES_TITLE_WATER_AND_SEWERAGE"),
2920
+ show: true
2921
+ });
2922
+ if (routerState !== null && routerState !== void 0 && routerState.fromMyApplications || routerState !== null && routerState !== void 0 && routerState.fromApplicationDetails) {
2923
+ activeCrumbs.splice(2, 0, {
2924
+ path: "/digit-ui/citizen/ws/my-applications",
2925
+ label: t("CS_HOME_MY_APPLICATIONS"),
2926
+ show: true
2927
+ });
2928
+ }
2929
+ if (routerState !== null && routerState !== void 0 && routerState.fromApplicationDetails) {
2930
+ activeCrumbs.splice(3, 0, {
2931
+ label: t("WS_APPLICATION_DETAILS_HEADER"),
2932
+ show: true,
2933
+ onClick: () => window.history.back()
2934
+ });
2935
+ }
2936
+ }
2937
+ if (activeCrumbs.length > 0) {
2938
+ activeCrumbs[activeCrumbs.length - 1].path = "";
2939
+ }
2940
+ return activeCrumbs;
2913
2941
  };
2914
2942
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(reactRouterDom.Switch, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.AppContainer, null, /*#__PURE__*/React__default.createElement("div", {
2915
2943
  className: "ground-container employee-app-container form-container"