@mseva/digit-ui-module-core 1.0.39 → 1.0.41

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.
@@ -8274,6 +8274,7 @@ const TYPE_LOGIN = {
8274
8274
  type: "login"
8275
8275
  };
8276
8276
  const DEFAULT_REDIRECT_URL = "/digit-ui/citizen";
8277
+ const DEFAULT_BPA_REDIRECT_URL = "/digit-ui/citizen/obps/edcrscrutiny/apply/home";
8277
8278
  const setCitizenDetail = (userObject, token, tenantId) => {
8278
8279
  var _JSON$parse, _JSON$parse$value;
8279
8280
  let locale = (_JSON$parse = JSON.parse(sessionStorage.getItem("Digit.initData"))) === null || _JSON$parse === void 0 ? void 0 : (_JSON$parse$value = _JSON$parse.value) === null || _JSON$parse$value === void 0 ? void 0 : _JSON$parse$value.selectedLanguage;
@@ -8338,7 +8339,9 @@ const Login = ({
8338
8339
  Digit.SessionStorage.set("citizen.userRequestObject", user);
8339
8340
  Digit.UserService.setUser(user);
8340
8341
  setCitizenDetail(user === null || user === void 0 ? void 0 : user.info, user === null || user === void 0 ? void 0 : user.access_token, stateCode);
8341
- const redirectPath = ((_location$state2 = location.state) === null || _location$state2 === void 0 ? void 0 : _location$state2.from) || DEFAULT_REDIRECT_URL;
8342
+ const userRoles = user.info.roles.map(roleData => roleData.code);
8343
+ const isUserBPA = userRoles === null || userRoles === void 0 ? void 0 : userRoles.some(role => role === null || role === void 0 ? void 0 : role.includes("BPA"));
8344
+ const redirectPath = isUserBPA ? DEFAULT_BPA_REDIRECT_URL : ((_location$state2 = location.state) === null || _location$state2 === void 0 ? void 0 : _location$state2.from) || DEFAULT_REDIRECT_URL;
8342
8345
  if (!Digit.ULBService.getCitizenCurrentTenant(true)) {
8343
8346
  history.replace("/digit-ui/citizen/select-location", {
8344
8347
  redirectBackTo: redirectPath
@@ -11900,7 +11903,8 @@ const Login$1 = ({
11900
11903
  }), showToast && /*#__PURE__*/React.createElement(Toast, {
11901
11904
  error: true,
11902
11905
  label: t(showToast),
11903
- onClose: closeToast
11906
+ onClose: closeToast,
11907
+ isDleteBtn: true
11904
11908
  }));
11905
11909
  };
11906
11910
  Login$1.propTypes = {
@@ -12069,8 +12073,8 @@ const ChangePasswordComponent = ({
12069
12073
  maxWidth: "408px",
12070
12074
  margin: "auto"
12071
12075
  },
12072
- className: "employeeChangePassword"
12073
- }, /*#__PURE__*/React.createElement(Header, null), /*#__PURE__*/React.createElement(CardSubHeader$1, {
12076
+ className: "loginFormStyleEmployeeNew"
12077
+ }, /*#__PURE__*/React.createElement(CardSubHeader$1, {
12074
12078
  style: {
12075
12079
  textAlign: "center"
12076
12080
  }
@@ -12084,7 +12088,8 @@ const ChangePasswordComponent = ({
12084
12088
  })), showToast && /*#__PURE__*/React.createElement(Toast, {
12085
12089
  error: true,
12086
12090
  label: t(showToast),
12087
- onClose: closeToast
12091
+ onClose: closeToast,
12092
+ isDleteBtn: true
12088
12093
  }), /*#__PURE__*/React.createElement("div", {
12089
12094
  style: {
12090
12095
  width: '100%',
@@ -12310,11 +12315,12 @@ const ForgotPassword = ({
12310
12315
  maxWidth: "408px",
12311
12316
  margin: "auto"
12312
12317
  },
12313
- className: "employeeForgotPassword"
12314
- }, /*#__PURE__*/React.createElement(Header, null)), showToast && /*#__PURE__*/React.createElement(Toast, {
12318
+ className: "loginFormStyleEmployeeNew"
12319
+ }), showToast && /*#__PURE__*/React.createElement(Toast, {
12315
12320
  error: true,
12316
12321
  label: t(showToast),
12317
- onClose: closeToast
12322
+ onClose: closeToast,
12323
+ isDleteBtn: true
12318
12324
  }), /*#__PURE__*/React.createElement("div", {
12319
12325
  style: {
12320
12326
  width: '100%',
@@ -13192,7 +13198,6 @@ const Profile = ({
13192
13198
  const usersResponse = await Digit.UserService.userSearch(tenant, {
13193
13199
  uuid: [uuid]
13194
13200
  }, {});
13195
- console.log(usersResponse, "USER RESPONSE IMAGE");
13196
13201
  if (usersResponse !== null && usersResponse !== void 0 && (_usersResponse$user = usersResponse.user) !== null && _usersResponse$user !== void 0 && _usersResponse$user.length) {
13197
13202
  const userDetails = usersResponse.user[0];
13198
13203
  setProfilePic((userDetails === null || userDetails === void 0 ? void 0 : userDetails.photo) || null);
@@ -13439,7 +13444,7 @@ const StaticCitizenSideBar = ({
13439
13444
  }, profileItem, /*#__PURE__*/React.createElement("div", {
13440
13445
  className: "drawer-desktop",
13441
13446
  style: {
13442
- "backgroundColor": "white"
13447
+ backgroundColor: "white"
13443
13448
  }
13444
13449
  }, (_menuItems = menuItems) === null || _menuItems === void 0 ? void 0 : _menuItems.map((item, index) => /*#__PURE__*/React.createElement("div", {
13445
13450
  className: `sidebar-list ${pathname === (item === null || item === void 0 ? void 0 : item.link) || pathname === (item === null || item === void 0 ? void 0 : item.sidebarURL) ? "active" : ""}`,
@@ -13470,7 +13475,6 @@ const Profile$1 = ({
13470
13475
  const usersResponse = await Digit.UserService.userSearch(tenant, {
13471
13476
  uuid: [uuid]
13472
13477
  }, {});
13473
- console.log(usersResponse, "USER RESPONSE IMAGE");
13474
13478
  if (usersResponse !== null && usersResponse !== void 0 && (_usersResponse$user = usersResponse.user) !== null && _usersResponse$user !== void 0 && _usersResponse$user.length) {
13475
13479
  const userDetails = usersResponse.user[0];
13476
13480
  setProfilePic((userDetails === null || userDetails === void 0 ? void 0 : userDetails.photo) || null);
@@ -16476,10 +16480,10 @@ const NewLogin = ({
16476
16480
  isOtpValid: isOtpValid
16477
16481
  }), step !== "OTP" && /*#__PURE__*/React.createElement("div", {
16478
16482
  className: "account-link"
16479
- }, /*#__PURE__*/React.createElement("span", null, "Don\u2019t have an account?"), /*#__PURE__*/React.createElement("span", {
16483
+ }, /*#__PURE__*/React.createElement("span", null, t("CS_COMMON_DONT_HAVE_ACCOUNT")), /*#__PURE__*/React.createElement("span", {
16480
16484
  className: "link",
16481
16485
  onClick: handleRegisterClick
16482
- }, "Register")), error && /*#__PURE__*/React.createElement(Toast, {
16486
+ }, t("CS_COMMON_REGISTER"))), error && /*#__PURE__*/React.createElement(Toast, {
16483
16487
  error: true,
16484
16488
  label: error,
16485
16489
  onClose: () => setError(null),
@@ -16619,7 +16623,8 @@ const RegistrationForm = ({
16619
16623
  boxShadow: "none",
16620
16624
  WebkitBoxShadow: "none",
16621
16625
  padding: "0",
16622
- margin: "0"
16626
+ margin: "0",
16627
+ maxWidth: "550px"
16623
16628
  }
16624
16629
  }));
16625
16630
  };