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

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
@@ -2892,15 +2892,15 @@ const CitizenPayment = _ref => {
2892
2892
  }, {
2893
2893
  path: "/digit-ui/citizen/payment/my-bills",
2894
2894
  label: t("CS_PAYMENT_BILL_DETAILS"),
2895
- show: pathname.includes("/my-bills")
2895
+ show: pathname.includes("/my-bills") || pathname.includes("/billDetails") || pathname.includes("/collect") || pathname.includes("/success") || pathname.includes("/failure")
2896
2896
  }, {
2897
2897
  path: pathname,
2898
2898
  label: t("PAYERS_DETAILS_HEADER"),
2899
- show: pathname.includes("/billDetails")
2899
+ show: pathname.includes("/billDetails") || pathname.includes("/collect") || pathname.includes("/success") || pathname.includes("/failure")
2900
2900
  }, {
2901
2901
  path: pathname,
2902
2902
  label: t("PAYMENT_CS_HEADER"),
2903
- show: pathname.includes("/collect")
2903
+ show: pathname.includes("/collect") || pathname.includes("/success") || pathname.includes("/failure")
2904
2904
  }, {
2905
2905
  path: pathname,
2906
2906
  label: t("CS_TITLE_PAYMENT_SUCCESS"),
@@ -2919,13 +2919,11 @@ const CitizenPayment = _ref => {
2919
2919
  label: t("ES_TITLE_WATER_AND_SEWERAGE"),
2920
2920
  show: true
2921
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
- }
2922
+ activeCrumbs.splice(2, 0, {
2923
+ path: "/digit-ui/citizen/ws/my-applications",
2924
+ label: t("CS_HOME_MY_APPLICATIONS"),
2925
+ show: true
2926
+ });
2929
2927
  if (routerState !== null && routerState !== void 0 && routerState.fromApplicationDetails) {
2930
2928
  activeCrumbs.splice(3, 0, {
2931
2929
  label: t("WS_APPLICATION_DETAILS_HEADER"),
@@ -2934,8 +2932,15 @@ const CitizenPayment = _ref => {
2934
2932
  });
2935
2933
  }
2936
2934
  }
2935
+ activeCrumbs.forEach((crumb, index) => {
2936
+ if (index < activeCrumbs.length - 1 && crumb.path === pathname) {
2937
+ crumb.path = "";
2938
+ crumb.onClick = () => window.history.go(index - (activeCrumbs.length - 1));
2939
+ }
2940
+ });
2937
2941
  if (activeCrumbs.length > 0) {
2938
2942
  activeCrumbs[activeCrumbs.length - 1].path = "";
2943
+ delete activeCrumbs[activeCrumbs.length - 1].onClick;
2939
2944
  }
2940
2945
  return activeCrumbs;
2941
2946
  };