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