@egovernments/digit-ui-module-core 1.3.1 → 1.4.0-alpha

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.
@@ -1,9 +1,9 @@
1
- import React, { useContext, useRef, useEffect, useState, useMemo } from 'react';
1
+ import React, { useContext, useRef, useEffect, useState, Fragment as Fragment$1, useMemo } from 'react';
2
2
  import { QueryClient, QueryClientProvider } from 'react-query';
3
3
  import { Provider } from 'react-redux';
4
- import { useLocation, useRouteMatch, useHistory, Switch, Route, Link, Redirect, BrowserRouter } from 'react-router-dom';
4
+ import { useLocation, useRouteMatch, useHistory, Switch, Route, Redirect, Link, BrowserRouter } from 'react-router-dom';
5
5
  import { useTranslation, getI18n } from 'react-i18next';
6
- import { FormStep, OTPInput, CardText, CardLabelError, AppContainer, BackButton, Toast, Dropdown, Loader, FormComposer, CardSubHeader, CardLabel, CardLabelDesc, TextInput, CustomButton, TopBar as TopBar$1, Hamburger, HomeIcon, LanguageIcon, LogoutIcon, NavBar, Body } from '@egovernments/digit-ui-react-components';
6
+ import { FormStep, OTPInput, CardText, CardLabelError, AppContainer, BackButton, Toast, Loader, Dropdown, FormComposer, CardSubHeader, Card, CustomButton, SubmitBar, TopBar as TopBar$1, Hamburger, HomeIcon, LanguageIcon, LogoutIcon, NavBar, ComplaintIcon, PTIcon, CaseIcon, OBPSIcon, Calender, DocumentIcon, StandaloneSearchBar, CardBasedOptions, WhatsNewCard, PageBasedInput, CardHeader, RadioButtons, SearchOnRadioButtons, Body } from '@egovernments/digit-ui-react-components';
7
7
  import { compose, applyMiddleware, createStore, combineReducers } from 'redux';
8
8
  import thunk from 'redux-thunk';
9
9
 
@@ -23,7 +23,9 @@ var CitizenHome = function CitizenHome(_ref) {
23
23
  var showQuickPay = moduleArr.some(function (module) {
24
24
  return module.code === "QuickPayLinks";
25
25
  });
26
- return /*#__PURE__*/React.createElement(React.Fragment, null, moduleArray.map(function (_ref4, index) {
26
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
27
+ className: "citizenAllServiceGrid"
28
+ }, moduleArray.map(function (_ref4, index) {
27
29
  var code = _ref4.code;
28
30
 
29
31
  var Links = Digit.ComponentRegistryService.getComponent(code + "Links") || function () {
@@ -41,7 +43,7 @@ var CitizenHome = function CitizenHome(_ref) {
41
43
  matchPath: "/digit-ui/citizen/" + code.toLowerCase(),
42
44
  userType: "citizen"
43
45
  });
44
- }));
46
+ })));
45
47
  };
46
48
 
47
49
  var EmployeeHome = function EmployeeHome(_ref5) {
@@ -49,7 +51,7 @@ var EmployeeHome = function EmployeeHome(_ref5) {
49
51
  return /*#__PURE__*/React.createElement("div", {
50
52
  className: "employee-app-container"
51
53
  }, /*#__PURE__*/React.createElement("div", {
52
- className: "ground-container moduleCardWrapper"
54
+ className: "ground-container moduleCardWrapper gridModuleWrapper"
53
55
  }, modules.map(function (_ref6, index) {
54
56
  var code = _ref6.code;
55
57
 
@@ -163,8 +165,11 @@ var loginSteps = [{
163
165
  label: "CORE_COMMON_NAME",
164
166
  type: "text",
165
167
  name: "name",
168
+ error: "CORE_COMMON_NAME_VALIDMSG",
166
169
  validation: {
167
- required: true
170
+ required: true,
171
+ minLength: 1,
172
+ pattern: /^[^{0-9}^\$\"<>?\\\\~!@#$%^()+={}\[\]*,/_:;“”‘’]{1,50}$/i
168
173
  }
169
174
  }]
170
175
  }];
@@ -212,7 +217,9 @@ var SelectOtp = function SelectOtp(_ref) {
212
217
  onResend = _ref.onResend,
213
218
  onSelect = _ref.onSelect,
214
219
  t = _ref.t,
215
- error = _ref.error;
220
+ error = _ref.error,
221
+ _ref$userType = _ref.userType,
222
+ userType = _ref$userType === void 0 ? "citizen" : _ref$userType;
216
223
 
217
224
  var _useState = useState(30),
218
225
  timeLeft = _useState[0],
@@ -227,6 +234,17 @@ var SelectOtp = function SelectOtp(_ref) {
227
234
  setTimeLeft(2);
228
235
  };
229
236
 
237
+ if (userType === "employee") {
238
+ return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(OTPInput, {
239
+ length: 6,
240
+ onChange: onOtpChange,
241
+ value: otp
242
+ }), timeLeft > 0 ? /*#__PURE__*/React.createElement(CardText, null, t("CS_RESEND_ANOTHER_OTP") + " " + timeLeft + " " + t("CS_RESEND_SECONDS")) : /*#__PURE__*/React.createElement("p", {
243
+ className: "card-text-button",
244
+ onClick: handleResendOtp
245
+ }, t("CS_RESEND_OTP")), !error && /*#__PURE__*/React.createElement(CardLabelError, null, t("CS_INVALID_OTP")));
246
+ }
247
+
230
248
  return /*#__PURE__*/React.createElement(FormStep, {
231
249
  onSelect: onSelect,
232
250
  config: config,
@@ -263,12 +281,27 @@ var TYPE_LOGIN = {
263
281
  };
264
282
  var DEFAULT_REDIRECT_URL = "/digit-ui/citizen";
265
283
 
284
+ var setCitizenDetail = function setCitizenDetail(userObject, token, tenantId) {
285
+ var _JSON$parse, _JSON$parse$value;
286
+
287
+ var 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;
288
+ localStorage.setItem("Citizen.tenant-id", tenantId);
289
+ localStorage.setItem("tenant-id", tenantId);
290
+ localStorage.setItem("citizen.userRequestObject", JSON.stringify(userObject));
291
+ localStorage.setItem("locale", locale);
292
+ localStorage.setItem("Citizen.locale", locale);
293
+ localStorage.setItem("token", token);
294
+ localStorage.setItem("Citizen.token", token);
295
+ localStorage.setItem("user-info", JSON.stringify(userObject));
296
+ localStorage.setItem("Citizen.user-info", JSON.stringify(userObject));
297
+ };
298
+
266
299
  var getFromLocation = function getFromLocation(state, searchParams) {
267
300
  return (state === null || state === void 0 ? void 0 : state.from) || (searchParams === null || searchParams === void 0 ? void 0 : searchParams.from) || DEFAULT_REDIRECT_URL;
268
301
  };
269
302
 
270
303
  var Login = function Login(_ref) {
271
- var _location$state5;
304
+ var _location$state, _location$state6;
272
305
 
273
306
  var stateCode = _ref.stateCode,
274
307
  _ref$isUserRegistered = _ref.isUserRegistered,
@@ -298,7 +331,7 @@ var Login = function Login(_ref) {
298
331
 
299
332
  var _useState4 = useState(null);
300
333
 
301
- var _useState5 = useState({}),
334
+ var _useState5 = useState(isUserRegistered ? {} : location === null || location === void 0 ? void 0 : (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.data),
302
335
  params = _useState5[0],
303
336
  setParmas = _useState5[1];
304
337
 
@@ -317,7 +350,7 @@ var Login = function Login(_ref) {
317
350
  }
318
351
 
319
352
  errorTimeout = setTimeout(function () {
320
- console.log("clearing err");
353
+ console.error("clearing err");
321
354
  setError("");
322
355
  }, 5000);
323
356
  setErrorTO(errorTimeout);
@@ -328,14 +361,15 @@ var Login = function Login(_ref) {
328
361
  };
329
362
  }, [error]);
330
363
  useEffect(function () {
331
- var _location$state;
364
+ var _location$state2;
332
365
 
333
366
  if (!user) {
334
367
  return;
335
368
  }
336
369
 
337
370
  Digit.UserService.setUser(user);
338
- var redirectPath = ((_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.from) || DEFAULT_REDIRECT_URL;
371
+ setCitizenDetail(user === null || user === void 0 ? void 0 : user.info, user === null || user === void 0 ? void 0 : user.access_token, stateCode);
372
+ var redirectPath = ((_location$state2 = location.state) === null || _location$state2 === void 0 ? void 0 : _location$state2.from) || DEFAULT_REDIRECT_URL;
339
373
  history.replace(redirectPath);
340
374
  }, [user]);
341
375
  var stepItems = useMemo(function () {
@@ -383,26 +417,27 @@ var Login = function Login(_ref) {
383
417
  return Promise.resolve(sendOtp({
384
418
  otp: _extends({}, data, TYPE_LOGIN)
385
419
  })).then(function (_ref2) {
386
- var _location$state3;
420
+ var _location$state4;
387
421
 
388
422
  var res = _ref2[0],
389
423
  err = _ref2[1];
390
424
 
391
425
  if (!err) {
392
- var _location$state2;
426
+ var _location$state3;
393
427
 
394
428
  history.replace(path + "/otp", {
395
429
  from: getFromLocation(location.state, searchParams),
396
- role: (_location$state2 = location.state) === null || _location$state2 === void 0 ? void 0 : _location$state2.role
430
+ role: (_location$state3 = location.state) === null || _location$state3 === void 0 ? void 0 : _location$state3.role
397
431
  });
398
432
  return;
399
433
  } else {
400
- history.replace("/digit-ui/citizen/register/name", {
401
- from: getFromLocation(location.state, searchParams)
434
+ history.push("/digit-ui/citizen/register/name", {
435
+ from: getFromLocation(location.state, searchParams),
436
+ data: data
402
437
  });
403
438
  }
404
439
 
405
- if ((_location$state3 = location.state) !== null && _location$state3 !== void 0 && _location$state3.role) {
440
+ if ((_location$state4 = location.state) !== null && _location$state4 !== void 0 && _location$state4.role) {
406
441
  setError("User not registered.");
407
442
  }
408
443
  });
@@ -431,13 +466,21 @@ var Login = function Login(_ref) {
431
466
  var data = _extends({}, params, {
432
467
  tenantId: stateCode,
433
468
  userType: getUserType()
434
- });
469
+ }, name);
435
470
 
436
471
  setParmas(_extends({}, params, name));
437
- history.replace(path + "/otp", {
438
- from: getFromLocation(location.state, searchParams)
472
+ return Promise.resolve(sendOtp({
473
+ otp: _extends({}, data, TYPE_REGISTER)
474
+ })).then(function (_ref4) {
475
+ var res = _ref4[0],
476
+ err = _ref4[1];
477
+
478
+ if (res) {
479
+ history.replace(path + "/otp", {
480
+ from: getFromLocation(location.state, searchParams)
481
+ });
482
+ }
439
483
  });
440
- return Promise.resolve();
441
484
  } catch (e) {
442
485
  return Promise.reject(e);
443
486
  }
@@ -458,14 +501,14 @@ var Login = function Login(_ref) {
458
501
  tenantId: stateCode,
459
502
  userType: getUserType()
460
503
  };
461
- return Promise.resolve(Digit.UserService.authenticate(requestData)).then(function (_ref4) {
462
- var _location$state4;
504
+ return Promise.resolve(Digit.UserService.authenticate(requestData)).then(function (_ref5) {
505
+ var _location$state5, _window, _window$globalConfigs;
463
506
 
464
- var ResponseInfo = _ref4.ResponseInfo,
465
- info = _ref4.UserRequest,
466
- tokens = _objectWithoutPropertiesLoose(_ref4, _excluded);
507
+ var ResponseInfo = _ref5.ResponseInfo,
508
+ info = _ref5.UserRequest,
509
+ tokens = _objectWithoutPropertiesLoose(_ref5, _excluded);
467
510
 
468
- if ((_location$state4 = location.state) !== null && _location$state4 !== void 0 && _location$state4.role) {
511
+ if ((_location$state5 = location.state) !== null && _location$state5 !== void 0 && _location$state5.role) {
469
512
  var roleInfo = info.roles.find(function (userRole) {
470
513
  return userRole.code === location.state.role;
471
514
  });
@@ -479,6 +522,10 @@ var Login = function Login(_ref) {
479
522
  }
480
523
  }
481
524
 
525
+ if ((_window = window) !== null && _window !== void 0 && (_window$globalConfigs = _window.globalConfigs) !== null && _window$globalConfigs !== void 0 && _window$globalConfigs.getConfig("ENABLE_SINGLEINSTANCE")) {
526
+ info.tenantId = Digit.ULBService.getStateId();
527
+ }
528
+
482
529
  setUser(_extends({
483
530
  info: info
484
531
  }, tokens));
@@ -492,10 +539,16 @@ var Login = function Login(_ref) {
492
539
  otpReference: otp,
493
540
  tenantId: stateCode
494
541
  };
495
- return Promise.resolve(Digit.UserService.registerUser(_requestData, stateCode)).then(function (_ref5) {
496
- var ResponseInfo = _ref5.ResponseInfo,
497
- info = _ref5.UserRequest,
498
- tokens = _objectWithoutPropertiesLoose(_ref5, _excluded2);
542
+ return Promise.resolve(Digit.UserService.registerUser(_requestData, stateCode)).then(function (_ref6) {
543
+ var _window2, _window2$globalConfig;
544
+
545
+ var ResponseInfo = _ref6.ResponseInfo,
546
+ info = _ref6.UserRequest,
547
+ tokens = _objectWithoutPropertiesLoose(_ref6, _excluded2);
548
+
549
+ if ((_window2 = window) !== null && _window2 !== void 0 && (_window2$globalConfig = _window2.globalConfigs) !== null && _window2$globalConfig !== void 0 && _window2$globalConfig.getConfig("ENABLE_SINGLEINSTANCE")) {
550
+ info.tenantId = Digit.ULBService.getStateId();
551
+ }
499
552
 
500
553
  setUser(_extends({
501
554
  info: info
@@ -509,7 +562,7 @@ var Login = function Login(_ref) {
509
562
  }();
510
563
  }, function (err) {
511
564
  setIsOtpValid(false);
512
- console.log(err);
565
+ console.error(err);
513
566
  }));
514
567
  } catch (e) {
515
568
  return Promise.reject(e);
@@ -567,7 +620,7 @@ var Login = function Login(_ref) {
567
620
  config: stepItems[0],
568
621
  mobileNumber: params.mobileNumber || "",
569
622
  onMobileChange: handleMobileChange,
570
- showRegisterLink: isUserRegistered && !((_location$state5 = location.state) !== null && _location$state5 !== void 0 && _location$state5.role),
623
+ showRegisterLink: isUserRegistered && !((_location$state6 = location.state) !== null && _location$state6 !== void 0 && _location$state6.role),
571
624
  t: t
572
625
  })), /*#__PURE__*/React.createElement(Route, {
573
626
  path: path + "/otp"
@@ -600,17 +653,17 @@ var Login = function Login(_ref) {
600
653
 
601
654
  var loginConfig = [{
602
655
  texts: {
603
- header: "CS_LOGIN",
604
- submitButtonLabel: "CS_LOGIN",
605
- secondaryButtonLabel: "CS_FORGOT_PASSWORD"
656
+ header: "CORE_COMMON_LOGIN",
657
+ submitButtonLabel: "CORE_COMMON_CONTINUE",
658
+ secondaryButtonLabel: "CORE_COMMON_FORGOT_PASSWORD"
606
659
  },
607
660
  inputs: [{
608
- label: "CORE_COMMON_USER_ID",
661
+ label: "CORE_LOGIN_USERNAME",
609
662
  type: "text",
610
663
  name: "username",
611
664
  error: "ERR_HRMS_INVALID_USER_ID"
612
665
  }, {
613
- label: "CORE_COMMON_PASSWORD",
666
+ label: "CORE_LOGIN_PASSWORD",
614
667
  type: "password",
615
668
  name: "password",
616
669
  error: "ERR_HRMS_WRONG_PASSWORD"
@@ -1056,12 +1109,14 @@ var objectAssign = shouldUseNative() ? Object.assign : function (target, source)
1056
1109
  var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
1057
1110
  var ReactPropTypesSecret_1 = ReactPropTypesSecret;
1058
1111
 
1112
+ var has = Function.call.bind(Object.prototype.hasOwnProperty);
1113
+
1059
1114
  var printWarning = function printWarning() {};
1060
1115
 
1061
1116
  if (process.env.NODE_ENV !== 'production') {
1062
1117
  var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
1063
1118
  var loggedTypeFailures = {};
1064
- var has = Function.call.bind(Object.prototype.hasOwnProperty);
1119
+ var has$1 = has;
1065
1120
 
1066
1121
  printWarning = function printWarning(text) {
1067
1122
  var message = 'Warning: ' + text;
@@ -1079,12 +1134,12 @@ if (process.env.NODE_ENV !== 'production') {
1079
1134
  function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
1080
1135
  if (process.env.NODE_ENV !== 'production') {
1081
1136
  for (var typeSpecName in typeSpecs) {
1082
- if (has(typeSpecs, typeSpecName)) {
1137
+ if (has$1(typeSpecs, typeSpecName)) {
1083
1138
  var error;
1084
1139
 
1085
1140
  try {
1086
1141
  if (typeof typeSpecs[typeSpecName] !== 'function') {
1087
- var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.');
1142
+ var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
1088
1143
  err.name = 'Invariant Violation';
1089
1144
  throw err;
1090
1145
  }
@@ -1116,8 +1171,6 @@ checkPropTypes.resetWarningCache = function () {
1116
1171
 
1117
1172
  var checkPropTypes_1 = checkPropTypes;
1118
1173
 
1119
- var has$1 = Function.call.bind(Object.prototype.hasOwnProperty);
1120
-
1121
1174
  var printWarning$1 = function printWarning() {};
1122
1175
 
1123
1176
  if (process.env.NODE_ENV !== 'production') {
@@ -1153,6 +1206,7 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1153
1206
  var ANONYMOUS = '<<anonymous>>';
1154
1207
  var ReactPropTypes = {
1155
1208
  array: createPrimitiveTypeChecker('array'),
1209
+ bigint: createPrimitiveTypeChecker('bigint'),
1156
1210
  bool: createPrimitiveTypeChecker('boolean'),
1157
1211
  func: createPrimitiveTypeChecker('function'),
1158
1212
  number: createPrimitiveTypeChecker('number'),
@@ -1180,8 +1234,9 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1180
1234
  }
1181
1235
  }
1182
1236
 
1183
- function PropTypeError(message) {
1237
+ function PropTypeError(message, data) {
1184
1238
  this.message = message;
1239
+ this.data = data && typeof data === 'object' ? data : {};
1185
1240
  this.stack = '';
1186
1241
  }
1187
1242
 
@@ -1240,7 +1295,9 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1240
1295
 
1241
1296
  if (propType !== expectedType) {
1242
1297
  var preciseType = getPreciseType(propValue);
1243
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
1298
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), {
1299
+ expectedType: expectedType
1300
+ });
1244
1301
  }
1245
1302
 
1246
1303
  return null;
@@ -1375,7 +1432,7 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1375
1432
  }
1376
1433
 
1377
1434
  for (var key in propValue) {
1378
- if (has$1(propValue, key)) {
1435
+ if (has(propValue, key)) {
1379
1436
  var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
1380
1437
 
1381
1438
  if (error instanceof Error) {
@@ -1406,15 +1463,23 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1406
1463
  }
1407
1464
 
1408
1465
  function validate(props, propName, componentName, location, propFullName) {
1466
+ var expectedTypes = [];
1467
+
1409
1468
  for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1410
1469
  var checker = arrayOfTypeCheckers[i];
1470
+ var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1);
1411
1471
 
1412
- if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1) == null) {
1472
+ if (checkerResult == null) {
1413
1473
  return null;
1414
1474
  }
1475
+
1476
+ if (checkerResult.data.hasOwnProperty('expectedType')) {
1477
+ expectedTypes.push(checkerResult.data.expectedType);
1478
+ }
1415
1479
  }
1416
1480
 
1417
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
1481
+ var expectedTypesMessage = expectedTypes.length > 0 ? ', expected one of type [' + expectedTypes.join(', ') + ']' : '';
1482
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
1418
1483
  }
1419
1484
 
1420
1485
  return createChainableTypeChecker(validate);
@@ -1432,6 +1497,10 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1432
1497
  return createChainableTypeChecker(validate);
1433
1498
  }
1434
1499
 
1500
+ function invalidValidatorError(componentName, location, propFullName, key, type) {
1501
+ return new PropTypeError((componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.');
1502
+ }
1503
+
1435
1504
  function createShapeTypeChecker(shapeTypes) {
1436
1505
  function validate(props, propName, componentName, location, propFullName) {
1437
1506
  var propValue = props[propName];
@@ -1444,8 +1513,8 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1444
1513
  for (var key in shapeTypes) {
1445
1514
  var checker = shapeTypes[key];
1446
1515
 
1447
- if (!checker) {
1448
- continue;
1516
+ if (typeof checker !== 'function') {
1517
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1449
1518
  }
1450
1519
 
1451
1520
  var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
@@ -1475,6 +1544,10 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1475
1544
  for (var key in allKeys) {
1476
1545
  var checker = shapeTypes[key];
1477
1546
 
1547
+ if (has(shapeTypes, key) && typeof checker !== 'function') {
1548
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1549
+ }
1550
+
1478
1551
  if (!checker) {
1479
1552
  return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' '));
1480
1553
  }
@@ -1656,6 +1729,7 @@ var factoryWithThrowingShims = function factoryWithThrowingShims() {
1656
1729
  }
1657
1730
  var ReactPropTypes = {
1658
1731
  array: shim,
1732
+ bigint: shim,
1659
1733
  bool: shim,
1660
1734
  func: shim,
1661
1735
  number: shim,
@@ -1690,9 +1764,38 @@ var propTypes = createCommonjsModule(function (module) {
1690
1764
  }
1691
1765
  });
1692
1766
 
1767
+ var Background = function Background(_ref) {
1768
+ var children = _ref.children;
1769
+ return /*#__PURE__*/React.createElement("div", {
1770
+ className: "banner"
1771
+ }, children);
1772
+ };
1773
+
1774
+ var Header = function Header() {
1775
+ var _Digit$Hooks$useStore = Digit.Hooks.useStore.getInitData(),
1776
+ storeData = _Digit$Hooks$useStore.data,
1777
+ isLoading = _Digit$Hooks$useStore.isLoading;
1778
+
1779
+ var _ref = storeData || {},
1780
+ stateInfo = _ref.stateInfo;
1781
+
1782
+ var _useTranslation = useTranslation(),
1783
+ t = _useTranslation.t;
1784
+
1785
+ if (isLoading) return /*#__PURE__*/React.createElement(Loader, null);
1786
+ return /*#__PURE__*/React.createElement("div", {
1787
+ className: "bannerHeader"
1788
+ }, /*#__PURE__*/React.createElement("img", {
1789
+ className: "bannerLogo",
1790
+ src: stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.logoUrl
1791
+ }), /*#__PURE__*/React.createElement("p", null, t("TENANT_TENANTS_" + (stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.code.toUpperCase()))));
1792
+ };
1793
+
1693
1794
  var _excluded$1 = ["UserRequest"];
1694
1795
 
1695
1796
  var Login$1 = function Login(_ref) {
1797
+ var _window, _window$globalConfigs, _window$globalConfigs2;
1798
+
1696
1799
  var propsConfig = _ref.config,
1697
1800
  t = _ref.t;
1698
1801
 
@@ -1700,16 +1803,18 @@ var Login$1 = function Login(_ref) {
1700
1803
  cities = _Digit$Hooks$useTenan.data,
1701
1804
  isLoading = _Digit$Hooks$useTenan.isLoading;
1702
1805
 
1806
+ var _Digit$Hooks$useStore = Digit.Hooks.useStore.getInitData(),
1807
+ isStoreLoading = _Digit$Hooks$useStore.isLoading;
1808
+
1703
1809
  var _useState = useState(null),
1704
1810
  user = _useState[0],
1705
1811
  setUser = _useState[1];
1706
1812
 
1707
- var history = useHistory();
1708
-
1709
- var getUserType = function getUserType() {
1710
- return Digit.UserService.getType();
1711
- };
1813
+ var _useState2 = useState(null),
1814
+ showToast = _useState2[0],
1815
+ setShowToast = _useState2[1];
1712
1816
 
1817
+ var history = useHistory();
1713
1818
  useEffect(function () {
1714
1819
  var _location$state;
1715
1820
 
@@ -1730,17 +1835,18 @@ var Login$1 = function Login(_ref) {
1730
1835
  }
1731
1836
 
1732
1837
  var requestData = _extends({}, data, {
1733
- userType: getUserType()
1838
+ userType: "EMPLOYEE"
1734
1839
  });
1735
1840
 
1736
1841
  requestData.tenantId = data.city.code;
1737
1842
  delete requestData.city;
1738
1843
 
1739
1844
  var _temp2 = _catch(function () {
1740
- return Promise.resolve(Digit.UserService.authenticate(requestData)).then(function (_ref2) {
1741
- var info = _ref2.UserRequest,
1742
- tokens = _objectWithoutPropertiesLoose(_ref2, _excluded$1);
1845
+ return Promise.resolve(Digit.UserService.authenticate(requestData)).then(function (_ref3) {
1846
+ var info = _ref3.UserRequest,
1847
+ tokens = _objectWithoutPropertiesLoose(_ref3, _excluded$1);
1743
1848
 
1849
+ Digit.SessionStorage.set("Employee.tenantId", info === null || info === void 0 ? void 0 : info.tenantId);
1744
1850
  setUser(_extends({
1745
1851
  info: info
1746
1852
  }, tokens));
@@ -1748,10 +1854,8 @@ var Login$1 = function Login(_ref) {
1748
1854
  }, function (err) {
1749
1855
  var _err$response, _err$response$data;
1750
1856
 
1751
- console.log({
1752
- err: err
1753
- });
1754
- alert((err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.error_description) || "Invalid login credentials!");
1857
+ setShowToast((err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.error_description) || "Invalid login credentials!");
1858
+ setTimeout(closeToast, 5000);
1755
1859
  });
1756
1860
 
1757
1861
  return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
@@ -1760,13 +1864,14 @@ var Login$1 = function Login(_ref) {
1760
1864
  }
1761
1865
  };
1762
1866
 
1867
+ var closeToast = function closeToast() {
1868
+ setShowToast(null);
1869
+ };
1870
+
1763
1871
  var onForgotPassword = function onForgotPassword() {
1764
- history.push("/digit-ui/employee/forgot-password");
1872
+ history.push("/digit-ui/employee/user/forgot-password");
1765
1873
  };
1766
1874
 
1767
- console.log({
1768
- propsConfig: propsConfig
1769
- });
1770
1875
  var _propsConfig$inputs = propsConfig.inputs,
1771
1876
  userId = _propsConfig$inputs[0],
1772
1877
  password = _propsConfig$inputs[1],
@@ -1795,17 +1900,26 @@ var Login$1 = function Login(_ref) {
1795
1900
  component: function component(props, customProps) {
1796
1901
  return /*#__PURE__*/React.createElement(Dropdown, _extends({
1797
1902
  option: cities,
1903
+ className: "login-city-dd",
1798
1904
  optionKey: "i18nKey",
1799
1905
  select: function select(d) {
1800
1906
  props.onChange(d);
1801
- }
1907
+ },
1908
+ t: t
1802
1909
  }, customProps));
1803
1910
  }
1804
1911
  },
1805
1912
  isMandatory: true
1806
1913
  }]
1807
1914
  }];
1808
- return isLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(FormComposer, {
1915
+ return isLoading || isStoreLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(Background, null, /*#__PURE__*/React.createElement("div", {
1916
+ className: "employeeBackbuttonAlign"
1917
+ }, /*#__PURE__*/React.createElement(BackButton, {
1918
+ variant: "white",
1919
+ style: {
1920
+ borderBottom: "none"
1921
+ }
1922
+ })), /*#__PURE__*/React.createElement(FormComposer, {
1809
1923
  onSubmit: onLogin,
1810
1924
  noBoxShadow: true,
1811
1925
  inline: true,
@@ -1819,10 +1933,31 @@ var Login$1 = function Login(_ref) {
1819
1933
  textAlign: "center"
1820
1934
  },
1821
1935
  cardStyle: {
1822
- maxWidth: "400px",
1823
- margin: "auto"
1936
+ margin: "auto",
1937
+ minWidth: "408px"
1938
+ },
1939
+ className: "loginFormStyleEmployee"
1940
+ }, /*#__PURE__*/React.createElement(Header, null)), showToast && /*#__PURE__*/React.createElement(Toast, {
1941
+ error: true,
1942
+ label: t(showToast),
1943
+ onClose: closeToast
1944
+ }), /*#__PURE__*/React.createElement("div", {
1945
+ className: "employee-home-footer",
1946
+ style: {
1947
+ backgroundColor: "unset"
1824
1948
  }
1825
- });
1949
+ }, /*#__PURE__*/React.createElement("img", {
1950
+ alt: "Powered by DIGIT",
1951
+ src: (_window = window) === null || _window === void 0 ? void 0 : (_window$globalConfigs = _window.globalConfigs) === null || _window$globalConfigs === void 0 ? void 0 : (_window$globalConfigs2 = _window$globalConfigs.getConfig) === null || _window$globalConfigs2 === void 0 ? void 0 : _window$globalConfigs2.call(_window$globalConfigs, "DIGIT_FOOTER_BW"),
1952
+ style: {
1953
+ cursor: "pointer"
1954
+ },
1955
+ onClick: function onClick() {
1956
+ var _window2, _window2$globalConfig, _window2$globalConfig2;
1957
+
1958
+ window.open((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$globalConfig = _window2.globalConfigs) === null || _window2$globalConfig === void 0 ? void 0 : (_window2$globalConfig2 = _window2$globalConfig.getConfig) === null || _window2$globalConfig2 === void 0 ? void 0 : _window2$globalConfig2.call(_window2$globalConfig, "DIGIT_HOME_URL"), "_blank").focus();
1959
+ }
1960
+ }), " "));
1826
1961
  };
1827
1962
 
1828
1963
  Login$1.propTypes = {
@@ -1852,18 +1987,18 @@ var EmployeeLogin = function EmployeeLogin() {
1852
1987
  });
1853
1988
  }, [loginConfig]);
1854
1989
  });
1855
- return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(AppContainer, null, /*#__PURE__*/React.createElement(Route, {
1990
+ return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
1856
1991
  path: "" + path,
1857
1992
  exact: true
1858
1993
  }, /*#__PURE__*/React.createElement(Login$1, {
1859
1994
  config: loginParams[0],
1860
1995
  t: t
1861
- }))));
1996
+ })));
1862
1997
  };
1863
1998
 
1864
1999
  var config = [{
1865
2000
  texts: {
1866
- header: "CORE_COMMON_FORGOT_PASSWORD_LABEL",
2001
+ header: "CORE_COMMON_RESET_PASSWORD_LABEL",
1867
2002
  submitButtonLabel: "CORE_COMMON_CHANGE_PASSWORD"
1868
2003
  },
1869
2004
  inputs: [{
@@ -1885,6 +2020,8 @@ var config = [{
1885
2020
  }];
1886
2021
 
1887
2022
  var ChangePasswordComponent = function ChangePasswordComponent(_ref) {
2023
+ var _window, _window$globalConfigs, _window$globalConfigs2;
2024
+
1888
2025
  var propsConfig = _ref.config,
1889
2026
  t = _ref.t;
1890
2027
 
@@ -1897,15 +2034,26 @@ var ChangePasswordComponent = function ChangePasswordComponent(_ref) {
1897
2034
 
1898
2035
  var history = useHistory();
1899
2036
 
2037
+ var _useState2 = useState(""),
2038
+ otp = _useState2[0],
2039
+ setOtp = _useState2[1];
2040
+
2041
+ var _useState3 = useState(true),
2042
+ isOtpValid = _useState3[0];
2043
+
2044
+ var _useState4 = useState(null),
2045
+ showToast = _useState4[0],
2046
+ setShowToast = _useState4[1];
2047
+
1900
2048
  var getUserType = function getUserType() {
1901
2049
  return Digit.UserService.getType();
1902
2050
  };
1903
2051
 
1904
- var otpReference = "";
1905
2052
  useEffect(function () {
1906
2053
  var _location$state;
1907
2054
 
1908
2055
  if (!user) {
2056
+ Digit.UserService.setType("employee");
1909
2057
  return;
1910
2058
  }
1911
2059
 
@@ -1914,8 +2062,16 @@ var ChangePasswordComponent = function ChangePasswordComponent(_ref) {
1914
2062
  history.replace(redirectPath);
1915
2063
  }, [user]);
1916
2064
 
2065
+ var closeToast = function closeToast() {
2066
+ setShowToast(null);
2067
+ };
2068
+
1917
2069
  var onResendOTP = function onResendOTP() {
1918
2070
  try {
2071
+ var _temp3 = function _temp3() {
2072
+ setTimeout(closeToast, 5000);
2073
+ };
2074
+
1919
2075
  var requestData = {
1920
2076
  otp: {
1921
2077
  mobileNumber: mobileNumber,
@@ -1925,20 +2081,17 @@ var ChangePasswordComponent = function ChangePasswordComponent(_ref) {
1925
2081
  }
1926
2082
  };
1927
2083
 
1928
- var _temp2 = _catch(function () {
2084
+ var _temp4 = _catch(function () {
1929
2085
  return Promise.resolve(Digit.UserService.sendOtp(requestData, tenantId)).then(function () {
1930
- alert("OTP resend successfull");
2086
+ setShowToast(t("ES_OTP_RESEND"));
1931
2087
  });
1932
2088
  }, function (err) {
1933
2089
  var _err$response, _err$response$data;
1934
2090
 
1935
- console.log({
1936
- err: err
1937
- });
1938
- alert((err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.error_description) || "Invalid login credentials!");
2091
+ setShowToast((err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.error_description) || t("ES_INVALID_LOGIN_CREDENTIALS"));
1939
2092
  });
1940
2093
 
1941
- return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
2094
+ return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
1942
2095
  } catch (e) {
1943
2096
  return Promise.reject(e);
1944
2097
  }
@@ -1948,37 +2101,31 @@ var ChangePasswordComponent = function ChangePasswordComponent(_ref) {
1948
2101
  try {
1949
2102
  return Promise.resolve(_catch(function () {
1950
2103
  if (data.newPassword !== data.confirmPassword) {
1951
- return alert(t("ERR_PASSWORD_DO_NOT_MATCH"));
2104
+ return setShowToast(t("ERR_PASSWORD_DO_NOT_MATCH"));
1952
2105
  }
1953
2106
 
1954
2107
  var requestData = _extends({}, data, {
1955
- otpReference: otpReference,
2108
+ otpReference: otp,
1956
2109
  tenantId: tenantId,
1957
2110
  type: getUserType().toUpperCase()
1958
2111
  });
1959
2112
 
1960
2113
  return Promise.resolve(Digit.UserService.changePassword(requestData, tenantId)).then(function (response) {
1961
- console.log({
1962
- response: response
1963
- });
1964
2114
  navigateToLogin();
1965
2115
  });
1966
2116
  }, function (err) {
1967
- var _err$response2, _err$response2$data, _err$response2$data$E;
2117
+ var _err$response2, _err$response2$data, _err$response2$data$e, _err$response2$data$e2, _err$response2$data$e3;
1968
2118
 
1969
- alert((err === null || err === void 0 ? void 0 : (_err$response2 = err.response) === null || _err$response2 === void 0 ? void 0 : (_err$response2$data = _err$response2.data) === null || _err$response2$data === void 0 ? void 0 : (_err$response2$data$E = _err$response2$data.Errors[0]) === null || _err$response2$data$E === void 0 ? void 0 : _err$response2$data$E.message) || "Something went wrong!");
2119
+ setShowToast((err === null || err === void 0 ? void 0 : (_err$response2 = err.response) === null || _err$response2 === void 0 ? void 0 : (_err$response2$data = _err$response2.data) === null || _err$response2$data === void 0 ? void 0 : (_err$response2$data$e = _err$response2$data.error) === null || _err$response2$data$e === void 0 ? void 0 : (_err$response2$data$e2 = _err$response2$data$e.fields) === null || _err$response2$data$e2 === void 0 ? void 0 : (_err$response2$data$e3 = _err$response2$data$e2[0]) === null || _err$response2$data$e3 === void 0 ? void 0 : _err$response2$data$e3.message) || t("ES_SOMETHING_WRONG"));
2120
+ setTimeout(closeToast, 5000);
1970
2121
  }));
1971
2122
  } catch (e) {
1972
2123
  return Promise.reject(e);
1973
2124
  }
1974
2125
  };
1975
2126
 
1976
- var updateOtp = function updateOtp(data) {
1977
- otpReference = data.target.value || "";
1978
- };
1979
-
1980
2127
  var navigateToLogin = function navigateToLogin() {
1981
- history.replace("/digit-ui/employee/login");
2128
+ history.replace("/digit-ui/employee/user/login");
1982
2129
  };
1983
2130
 
1984
2131
  var _propsConfig$inputs = propsConfig.inputs,
@@ -2009,7 +2156,14 @@ var ChangePasswordComponent = function ChangePasswordComponent(_ref) {
2009
2156
  isMandatory: true
2010
2157
  }]
2011
2158
  }];
2012
- return /*#__PURE__*/React.createElement(FormComposer, {
2159
+ return /*#__PURE__*/React.createElement(Background, null, /*#__PURE__*/React.createElement("div", {
2160
+ className: "employeeBackbuttonAlign"
2161
+ }, /*#__PURE__*/React.createElement(BackButton, {
2162
+ variant: "white",
2163
+ style: {
2164
+ borderBottom: "none"
2165
+ }
2166
+ })), /*#__PURE__*/React.createElement(FormComposer, {
2013
2167
  onSubmit: onChangePassword,
2014
2168
  noBoxShadow: true,
2015
2169
  inline: true,
@@ -2017,44 +2171,39 @@ var ChangePasswordComponent = function ChangePasswordComponent(_ref) {
2017
2171
  config: config,
2018
2172
  label: propsConfig.texts.submitButtonLabel,
2019
2173
  cardStyle: {
2020
- maxWidth: "400px",
2174
+ maxWidth: "408px",
2021
2175
  margin: "auto"
2022
- }
2023
- }, /*#__PURE__*/React.createElement(CardSubHeader, {
2176
+ },
2177
+ className: "employeeChangePassword"
2178
+ }, /*#__PURE__*/React.createElement(Header, null), /*#__PURE__*/React.createElement(CardSubHeader, {
2024
2179
  style: {
2025
2180
  textAlign: "center"
2026
2181
  }
2027
- }, " ", propsConfig.texts.header, " "), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, {
2028
- style: {
2029
- marginBottom: "8px"
2030
- }
2031
- }, t("CORE_OTP_SENT_MESSAGE")), /*#__PURE__*/React.createElement(CardLabelDesc, {
2032
- style: {
2033
- marginBottom: "0px"
2034
- }
2035
- }, " ", mobileNumber, " "), /*#__PURE__*/React.createElement(CardLabelDesc, {
2036
- style: {
2037
- marginBottom: "8px"
2038
- }
2039
- }, " ", t("CORE_EMPLOYEE_OTP_CHECK_MESSAGE"))), /*#__PURE__*/React.createElement(CardLabel, {
2040
- style: {
2041
- marginBottom: "8px"
2042
- }
2043
- }, t("CORE_OTP_OTP"), " *"), /*#__PURE__*/React.createElement(TextInput, {
2044
- className: "field",
2045
- name: otpReference,
2046
- isRequired: true,
2047
- onChange: updateOtp,
2048
- type: "text",
2182
+ }, " ", propsConfig.texts.header, " "), /*#__PURE__*/React.createElement(CardText, null, t("CS_LOGIN_OTP_TEXT") + " ", /*#__PURE__*/React.createElement("b", null, " ", "" + t("+ 91 - "), " ", mobileNumber)), /*#__PURE__*/React.createElement(SelectOtp, {
2183
+ t: t,
2184
+ userType: "employee",
2185
+ otp: otp,
2186
+ onOtpChange: setOtp,
2187
+ error: isOtpValid,
2188
+ onResend: onResendOTP
2189
+ })), showToast && /*#__PURE__*/React.createElement(Toast, {
2190
+ error: true,
2191
+ label: t(showToast),
2192
+ onClose: closeToast
2193
+ }), /*#__PURE__*/React.createElement("div", {
2194
+ className: "EmployeeLoginFooter"
2195
+ }, /*#__PURE__*/React.createElement("img", {
2196
+ alt: "Powered by DIGIT",
2197
+ src: (_window = window) === null || _window === void 0 ? void 0 : (_window$globalConfigs = _window.globalConfigs) === null || _window$globalConfigs === void 0 ? void 0 : (_window$globalConfigs2 = _window$globalConfigs.getConfig) === null || _window$globalConfigs2 === void 0 ? void 0 : _window$globalConfigs2.call(_window$globalConfigs, "DIGIT_FOOTER_BW"),
2049
2198
  style: {
2050
- marginBottom: "10px"
2199
+ cursor: "pointer"
2200
+ },
2201
+ onClick: function onClick() {
2202
+ var _window2, _window2$globalConfig, _window2$globalConfig2;
2203
+
2204
+ window.open((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$globalConfig = _window2.globalConfigs) === null || _window2$globalConfig === void 0 ? void 0 : (_window2$globalConfig2 = _window2$globalConfig.getConfig) === null || _window2$globalConfig2 === void 0 ? void 0 : _window2$globalConfig2.call(_window2$globalConfig, "DIGIT_HOME_URL"), "_blank").focus();
2051
2205
  }
2052
- }), /*#__PURE__*/React.createElement("div", {
2053
- className: "flex-right"
2054
- }, /*#__PURE__*/React.createElement("div", {
2055
- className: "primary-label-btn",
2056
- onClick: onResendOTP
2057
- }, t("CORE_OTP_RESEND"))));
2206
+ }), " "));
2058
2207
  };
2059
2208
 
2060
2209
  ChangePasswordComponent.propTypes = {
@@ -2084,20 +2233,20 @@ var EmployeeChangePassword = function EmployeeChangePassword() {
2084
2233
  });
2085
2234
  }, [config]);
2086
2235
  });
2087
- return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(AppContainer, null, /*#__PURE__*/React.createElement(Route, {
2236
+ return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
2088
2237
  path: "" + path,
2089
2238
  exact: true
2090
2239
  }, /*#__PURE__*/React.createElement(ChangePasswordComponent, {
2091
2240
  config: params[0],
2092
2241
  t: t
2093
- }))));
2242
+ })));
2094
2243
  };
2095
2244
 
2096
2245
  var loginConfig$1 = [{
2097
2246
  texts: {
2098
- header: "CS_FORGOT_PASSWORD",
2099
- submitButtonLabel: "CS_CONTINUE",
2100
- secondaryButtonLabel: "CS_BACK_TO_LOGIN"
2247
+ header: "CORE_COMMON_FORGOT_PASSWORD_LABEL",
2248
+ description: "ES_FORGOT_PASSWORD_DESC",
2249
+ submitButtonLabel: "CORE_COMMON_CONTINUE"
2101
2250
  },
2102
2251
  inputs: [{
2103
2252
  label: "CORE_COMMON_MOBILE_NUMBER",
@@ -2113,15 +2262,24 @@ var loginConfig$1 = [{
2113
2262
  }];
2114
2263
 
2115
2264
  var ForgotPassword = function ForgotPassword(_ref) {
2265
+ var _window, _window$globalConfigs, _window$globalConfigs2;
2266
+
2116
2267
  var propsConfig = _ref.config,
2117
2268
  t = _ref.t;
2118
- var cities = Digit.Hooks.fsm.useTenants();
2269
+
2270
+ var _Digit$Hooks$useTenan = Digit.Hooks.useTenants(),
2271
+ cities = _Digit$Hooks$useTenan.data,
2272
+ isLoading = _Digit$Hooks$useTenan.isLoading;
2119
2273
 
2120
2274
  var _useState = useState(null),
2121
2275
  user = _useState[0];
2122
2276
 
2123
2277
  var history = useHistory();
2124
2278
 
2279
+ var _useState2 = useState(null),
2280
+ showToast = _useState2[0],
2281
+ setShowToast = _useState2[1];
2282
+
2125
2283
  var getUserType = function getUserType() {
2126
2284
  return Digit.UserService.getType();
2127
2285
  };
@@ -2130,6 +2288,7 @@ var ForgotPassword = function ForgotPassword(_ref) {
2130
2288
  var _location$state;
2131
2289
 
2132
2290
  if (!user) {
2291
+ Digit.UserService.setType("employee");
2133
2292
  return;
2134
2293
  }
2135
2294
 
@@ -2138,6 +2297,10 @@ var ForgotPassword = function ForgotPassword(_ref) {
2138
2297
  history.replace(redirectPath);
2139
2298
  }, [user]);
2140
2299
 
2300
+ var closeToast = function closeToast() {
2301
+ setShowToast(null);
2302
+ };
2303
+
2141
2304
  var onForgotPassword = function onForgotPassword(data) {
2142
2305
  try {
2143
2306
  if (!data.city) {
@@ -2146,24 +2309,23 @@ var ForgotPassword = function ForgotPassword(_ref) {
2146
2309
  }
2147
2310
 
2148
2311
  var requestData = {
2149
- otp: _extends({}, data, {
2312
+ otp: {
2313
+ mobileNumber: data.mobileNumber,
2150
2314
  userType: getUserType().toUpperCase(),
2151
2315
  type: "passwordreset",
2152
2316
  tenantId: data.city.code
2153
- })
2317
+ }
2154
2318
  };
2155
2319
 
2156
2320
  var _temp2 = _catch(function () {
2157
2321
  return Promise.resolve(Digit.UserService.sendOtp(requestData, data.city.code)).then(function () {
2158
- history.push("/digit-ui/employee/change-password?mobile_number=" + data.mobileNumber + "&tenantId=" + data.city.code);
2322
+ history.push("/digit-ui/employee/user/change-password?mobile_number=" + data.mobileNumber + "&tenantId=" + data.city.code);
2159
2323
  });
2160
2324
  }, function (err) {
2161
- var _err$response, _err$response$data;
2325
+ var _err$response, _err$response$data, _err$response$data$er, _err$response$data$er2, _err$response$data$er3;
2162
2326
 
2163
- console.log({
2164
- err: err
2165
- });
2166
- alert((err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.error_description) || "Invalid login credentials!");
2327
+ setShowToast((err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : (_err$response$data$er = _err$response$data.error) === null || _err$response$data$er === void 0 ? void 0 : (_err$response$data$er2 = _err$response$data$er.fields) === null || _err$response$data$er2 === void 0 ? void 0 : (_err$response$data$er3 = _err$response$data$er2[0]) === null || _err$response$data$er3 === void 0 ? void 0 : _err$response$data$er3.message) || "Invalid login credentials!");
2328
+ setTimeout(closeToast, 5000);
2167
2329
  });
2168
2330
 
2169
2331
  return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
@@ -2176,9 +2338,6 @@ var ForgotPassword = function ForgotPassword(_ref) {
2176
2338
  history.replace("/digit-ui/employee/login");
2177
2339
  };
2178
2340
 
2179
- console.log({
2180
- propsConfig: propsConfig
2181
- });
2182
2341
  var _propsConfig$inputs = propsConfig.inputs,
2183
2342
  userId = _propsConfig$inputs[0],
2184
2343
  city = _propsConfig$inputs[1];
@@ -2187,7 +2346,8 @@ var ForgotPassword = function ForgotPassword(_ref) {
2187
2346
  label: t(userId.label),
2188
2347
  type: userId.type,
2189
2348
  populators: {
2190
- name: userId.name
2349
+ name: userId.name,
2350
+ componentInFront: "+91"
2191
2351
  },
2192
2352
  isMandatory: true
2193
2353
  }, {
@@ -2201,6 +2361,7 @@ var ForgotPassword = function ForgotPassword(_ref) {
2201
2361
  option: cities,
2202
2362
  optionKey: "name",
2203
2363
  id: city.name,
2364
+ className: "login-city-dd",
2204
2365
  select: function select(d) {
2205
2366
  props.onChange(d);
2206
2367
  }
@@ -2210,7 +2371,19 @@ var ForgotPassword = function ForgotPassword(_ref) {
2210
2371
  isMandatory: true
2211
2372
  }]
2212
2373
  }];
2213
- return /*#__PURE__*/React.createElement(FormComposer, {
2374
+
2375
+ if (isLoading) {
2376
+ return /*#__PURE__*/React.createElement(Loader, null);
2377
+ }
2378
+
2379
+ return /*#__PURE__*/React.createElement(Background, null, /*#__PURE__*/React.createElement("div", {
2380
+ className: "employeeBackbuttonAlign"
2381
+ }, /*#__PURE__*/React.createElement(BackButton, {
2382
+ variant: "white",
2383
+ style: {
2384
+ borderBottom: "none"
2385
+ }
2386
+ })), /*#__PURE__*/React.createElement(FormComposer, {
2214
2387
  onSubmit: onForgotPassword,
2215
2388
  noBoxShadow: true,
2216
2389
  inline: true,
@@ -2220,14 +2393,33 @@ var ForgotPassword = function ForgotPassword(_ref) {
2220
2393
  secondaryActionLabel: propsConfig.texts.secondaryButtonLabel,
2221
2394
  onSecondayActionClick: navigateToLogin,
2222
2395
  heading: propsConfig.texts.header,
2396
+ description: propsConfig.texts.description,
2223
2397
  headingStyle: {
2224
2398
  textAlign: "center"
2225
2399
  },
2226
2400
  cardStyle: {
2227
- maxWidth: "400px",
2401
+ maxWidth: "408px",
2228
2402
  margin: "auto"
2403
+ },
2404
+ className: "employeeForgotPassword"
2405
+ }, /*#__PURE__*/React.createElement(Header, null)), showToast && /*#__PURE__*/React.createElement(Toast, {
2406
+ error: true,
2407
+ label: t(showToast),
2408
+ onClose: closeToast
2409
+ }), /*#__PURE__*/React.createElement("div", {
2410
+ className: "EmployeeLoginFooter"
2411
+ }, /*#__PURE__*/React.createElement("img", {
2412
+ alt: "Powered by DIGIT",
2413
+ src: (_window = window) === null || _window === void 0 ? void 0 : (_window$globalConfigs = _window.globalConfigs) === null || _window$globalConfigs === void 0 ? void 0 : (_window$globalConfigs2 = _window$globalConfigs.getConfig) === null || _window$globalConfigs2 === void 0 ? void 0 : _window$globalConfigs2.call(_window$globalConfigs, "DIGIT_FOOTER_BW"),
2414
+ style: {
2415
+ cursor: "pointer"
2416
+ },
2417
+ onClick: function onClick() {
2418
+ var _window2, _window2$globalConfig, _window2$globalConfig2;
2419
+
2420
+ window.open((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$globalConfig = _window2.globalConfigs) === null || _window2$globalConfig === void 0 ? void 0 : (_window2$globalConfig2 = _window2$globalConfig.getConfig) === null || _window2$globalConfig2 === void 0 ? void 0 : _window2$globalConfig2.call(_window2$globalConfig, "DIGIT_HOME_URL"), "_blank").focus();
2229
2421
  }
2230
- });
2422
+ }), " "));
2231
2423
  };
2232
2424
 
2233
2425
  ForgotPassword.propTypes = {
@@ -2257,21 +2449,99 @@ var EmployeeForgotPassword = function EmployeeForgotPassword() {
2257
2449
  });
2258
2450
  }, [loginConfig$1]);
2259
2451
  });
2260
- console.log({
2261
- params: params
2262
- });
2263
- return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(AppContainer, null, /*#__PURE__*/React.createElement(Route, {
2452
+ return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
2264
2453
  path: "" + path,
2265
2454
  exact: true
2266
2455
  }, /*#__PURE__*/React.createElement(ForgotPassword, {
2267
2456
  config: params[0],
2268
2457
  t: t
2269
- }))));
2458
+ })));
2459
+ };
2460
+
2461
+ var LanguageSelection = function LanguageSelection() {
2462
+ var _window, _window$globalConfigs, _window$globalConfigs2;
2463
+
2464
+ var _Digit$Hooks$useStore = Digit.Hooks.useStore.getInitData(),
2465
+ storeData = _Digit$Hooks$useStore.data,
2466
+ isLoading = _Digit$Hooks$useStore.isLoading;
2467
+
2468
+ var _useTranslation = useTranslation(),
2469
+ t = _useTranslation.t;
2470
+
2471
+ var history = useHistory();
2472
+
2473
+ var _ref = storeData || {},
2474
+ languages = _ref.languages,
2475
+ stateInfo = _ref.stateInfo;
2476
+
2477
+ var selectedLanguage = Digit.StoreData.getCurrentLanguage();
2478
+
2479
+ var _useState = useState(selectedLanguage),
2480
+ selected = _useState[0],
2481
+ setselected = _useState[1];
2482
+
2483
+ var handleChangeLanguage = function handleChangeLanguage(language) {
2484
+ setselected(language.value);
2485
+ Digit.LocalizationService.changeLanguage(language.value, stateInfo.code);
2486
+ };
2487
+
2488
+ var handleSubmit = function handleSubmit(event) {
2489
+ history.push("/digit-ui/employee/user/login");
2490
+ };
2491
+
2492
+ if (isLoading) return null;
2493
+ return /*#__PURE__*/React.createElement(Background, null, /*#__PURE__*/React.createElement(Card, {
2494
+ className: "bannerCard removeBottomMargin"
2495
+ }, /*#__PURE__*/React.createElement("div", {
2496
+ className: "bannerHeader"
2497
+ }, /*#__PURE__*/React.createElement("img", {
2498
+ className: "bannerLogo",
2499
+ src: stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.logoUrl,
2500
+ alt: "Digit"
2501
+ }), /*#__PURE__*/React.createElement("p", null, t("TENANT_TENANTS_" + (stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.code.toUpperCase())))), /*#__PURE__*/React.createElement("div", {
2502
+ className: "language-selector",
2503
+ style: {
2504
+ justifyContent: "space-between",
2505
+ marginBottom: "24px"
2506
+ }
2507
+ }, languages.map(function (language, index) {
2508
+ return /*#__PURE__*/React.createElement("div", {
2509
+ className: "language-button-container",
2510
+ key: index
2511
+ }, /*#__PURE__*/React.createElement(CustomButton, {
2512
+ selected: language.value === selected,
2513
+ text: language.label,
2514
+ onClick: function onClick() {
2515
+ return handleChangeLanguage(language);
2516
+ }
2517
+ }));
2518
+ })), /*#__PURE__*/React.createElement(SubmitBar, {
2519
+ style: {
2520
+ width: "100%"
2521
+ },
2522
+ label: t("CORE_COMMON_CONTINUE"),
2523
+ onSubmit: handleSubmit
2524
+ })), /*#__PURE__*/React.createElement("div", {
2525
+ className: "EmployeeLoginFooter"
2526
+ }, /*#__PURE__*/React.createElement("img", {
2527
+ alt: "Powered by DIGIT",
2528
+ src: (_window = window) === null || _window === void 0 ? void 0 : (_window$globalConfigs = _window.globalConfigs) === null || _window$globalConfigs === void 0 ? void 0 : (_window$globalConfigs2 = _window$globalConfigs.getConfig) === null || _window$globalConfigs2 === void 0 ? void 0 : _window$globalConfigs2.call(_window$globalConfigs, "DIGIT_FOOTER_BW"),
2529
+ style: {
2530
+ cursor: "pointer"
2531
+ },
2532
+ onClick: function onClick() {
2533
+ var _window2, _window2$globalConfig, _window2$globalConfig2;
2534
+
2535
+ window.open((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$globalConfig = _window2.globalConfigs) === null || _window2$globalConfig === void 0 ? void 0 : (_window2$globalConfig2 = _window2$globalConfig.getConfig) === null || _window2$globalConfig2 === void 0 ? void 0 : _window2$globalConfig2.call(_window2$globalConfig, "DIGIT_HOME_URL"), "_blank").focus();
2536
+ }
2537
+ }), " "));
2270
2538
  };
2271
2539
 
2272
2540
  var getTenants = function getTenants(codes, tenants) {
2273
2541
  return tenants.filter(function (tenant) {
2274
- return codes.map(function (item) {
2542
+ var _codes$map;
2543
+
2544
+ return codes === null || codes === void 0 ? void 0 : (_codes$map = codes.map) === null || _codes$map === void 0 ? void 0 : _codes$map.call(codes, function (item) {
2275
2545
  return item.code;
2276
2546
  }).includes(tenant.code);
2277
2547
  });
@@ -2287,11 +2557,25 @@ var AppModules = function AppModules(_ref) {
2287
2557
  var _useRouteMatch = useRouteMatch(),
2288
2558
  path = _useRouteMatch.path;
2289
2559
 
2560
+ var location = useLocation();
2561
+ var user = Digit.UserService.getUser();
2562
+
2563
+ if (!user) {
2564
+ return /*#__PURE__*/React.createElement(Redirect, {
2565
+ to: {
2566
+ pathname: "/digit-ui/employee/user/login",
2567
+ state: {
2568
+ from: location.pathname + location.search
2569
+ }
2570
+ }
2571
+ });
2572
+ }
2573
+
2290
2574
  var appRoutes = modules.map(function (_ref2, index) {
2291
2575
  var code = _ref2.code,
2292
2576
  tenants = _ref2.tenants;
2293
2577
  var Module = Digit.ComponentRegistryService.getComponent(code + "Module");
2294
- return /*#__PURE__*/React.createElement(Route, {
2578
+ return Module ? /*#__PURE__*/React.createElement(Route, {
2295
2579
  key: index,
2296
2580
  path: path + "/" + code.toLowerCase()
2297
2581
  }, /*#__PURE__*/React.createElement(Module, {
@@ -2299,25 +2583,27 @@ var AppModules = function AppModules(_ref) {
2299
2583
  moduleCode: code,
2300
2584
  userType: userType,
2301
2585
  tenants: getTenants(tenants, appTenants)
2302
- }));
2586
+ })) : null;
2303
2587
  });
2304
- return /*#__PURE__*/React.createElement(Switch, null, appRoutes, /*#__PURE__*/React.createElement(Route, {
2588
+ return /*#__PURE__*/React.createElement("div", {
2589
+ className: "ground-container"
2590
+ }, /*#__PURE__*/React.createElement(Switch, null, appRoutes, /*#__PURE__*/React.createElement(Route, {
2305
2591
  path: path + "/login"
2306
- }, userType === "citizen" ? /*#__PURE__*/React.createElement(Login, {
2307
- stateCode: stateCode
2308
- }) : /*#__PURE__*/React.createElement(EmployeeLogin, null)), /*#__PURE__*/React.createElement(Route, {
2592
+ }, " ", /*#__PURE__*/React.createElement(Redirect, {
2593
+ to: {
2594
+ pathname: "/digit-ui/employee/user/login",
2595
+ state: {
2596
+ from: location.pathname + location.search
2597
+ }
2598
+ }
2599
+ })), /*#__PURE__*/React.createElement(Route, {
2309
2600
  path: path + "/forgot-password"
2310
- }, userType === "citizen" ? null : /*#__PURE__*/React.createElement(EmployeeForgotPassword, null)), /*#__PURE__*/React.createElement(Route, {
2601
+ }, /*#__PURE__*/React.createElement(EmployeeForgotPassword, null)), /*#__PURE__*/React.createElement(Route, {
2311
2602
  path: path + "/change-password"
2312
- }, userType === "citizen" ? null : /*#__PURE__*/React.createElement(EmployeeChangePassword, null)), userType === "citizen" && /*#__PURE__*/React.createElement(Route, {
2313
- path: path + "/register"
2314
- }, /*#__PURE__*/React.createElement(Login, {
2315
- stateCode: stateCode,
2316
- isUserRegistered: false
2317
- })), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(AppHome, {
2603
+ }, " ", /*#__PURE__*/React.createElement(EmployeeChangePassword, null)), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(AppHome, {
2318
2604
  userType: userType,
2319
2605
  modules: modules
2320
- })));
2606
+ }))));
2321
2607
  };
2322
2608
 
2323
2609
  var ChangeLanguage = function ChangeLanguage(prop) {
@@ -2390,7 +2676,7 @@ var TextToImg = function TextToImg(props) {
2390
2676
  };
2391
2677
 
2392
2678
  var TopBar = function TopBar(_ref) {
2393
- var _cityDetails$city, _userDetails$info, _userDetails$info2, _userDetails$info2$us;
2679
+ var _Digit$SessionStorage, _cityDetails$city, _cityDetails$city2, _stateInfo$code, _userDetails$info, _userDetails$info2, _userDetails$info2$us;
2394
2680
 
2395
2681
  var t = _ref.t,
2396
2682
  stateInfo = _ref.stateInfo,
@@ -2403,6 +2689,35 @@ var TopBar = function TopBar(_ref) {
2403
2689
  userOptions = _ref.userOptions,
2404
2690
  handleUserDropdownSelection = _ref.handleUserDropdownSelection,
2405
2691
  logoUrl = _ref.logoUrl;
2692
+ var CitizenHomePageTenantId = (_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code;
2693
+ var history = useHistory();
2694
+
2695
+ var _useLocation = useLocation(),
2696
+ pathname = _useLocation.pathname;
2697
+
2698
+ var conditionsToDisableNotificationCountTrigger = function conditionsToDisableNotificationCountTrigger() {
2699
+ var _Digit$UserService, _Digit$UserService$ge, _Digit$UserService$ge2, _Digit$UserService2, _Digit$UserService2$g, _Digit$UserService2$g2;
2700
+
2701
+ if (((_Digit$UserService = Digit.UserService) === null || _Digit$UserService === void 0 ? void 0 : (_Digit$UserService$ge = _Digit$UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : (_Digit$UserService$ge2 = _Digit$UserService$ge.info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.type) === "EMPLOYEE") return false;
2702
+
2703
+ if (((_Digit$UserService2 = Digit.UserService) === null || _Digit$UserService2 === void 0 ? void 0 : (_Digit$UserService2$g = _Digit$UserService2.getUser()) === null || _Digit$UserService2$g === void 0 ? void 0 : (_Digit$UserService2$g2 = _Digit$UserService2$g.info) === null || _Digit$UserService2$g2 === void 0 ? void 0 : _Digit$UserService2$g2.type) === "CITIZEN") {
2704
+ if (!CitizenHomePageTenantId) return false;else return true;
2705
+ }
2706
+
2707
+ return false;
2708
+ };
2709
+
2710
+ var _Digit$Hooks$useNotif = Digit.Hooks.useNotificationCount({
2711
+ tenantId: CitizenHomePageTenantId,
2712
+ config: {
2713
+ enabled: conditionsToDisableNotificationCountTrigger()
2714
+ }
2715
+ }),
2716
+ _Digit$Hooks$useNotif2 = _Digit$Hooks$useNotif.data;
2717
+
2718
+ _Digit$Hooks$useNotif2 = _Digit$Hooks$useNotif2 === void 0 ? {} : _Digit$Hooks$useNotif2;
2719
+ var unreadNotificationCount = _Digit$Hooks$useNotif2.unreadCount,
2720
+ notificationCountLoaded = _Digit$Hooks$useNotif.isSuccess;
2406
2721
 
2407
2722
  var updateSidebar = function updateSidebar() {
2408
2723
  if (!Digit.clikOusideFired) {
@@ -2412,6 +2727,16 @@ var TopBar = function TopBar(_ref) {
2412
2727
  }
2413
2728
  };
2414
2729
 
2730
+ function onNotificationIconClick() {
2731
+ history.push("/digit-ui/citizen/engagement/notifications");
2732
+ }
2733
+
2734
+ var urlsToDisableNotificationIcon = function urlsToDisableNotificationIcon(pathname) {
2735
+ var _Digit$UserService3, _Digit$UserService3$g;
2736
+
2737
+ return !!((_Digit$UserService3 = Digit.UserService) !== null && _Digit$UserService3 !== void 0 && (_Digit$UserService3$g = _Digit$UserService3.getUser()) !== null && _Digit$UserService3$g !== void 0 && _Digit$UserService3$g.access_token) ? false : ["/digit-ui/citizen/select-language", "/digit-ui/citizen/select-location"].includes(pathname);
2738
+ };
2739
+
2415
2740
  if (CITIZEN) {
2416
2741
  return /*#__PURE__*/React.createElement(TopBar$1, {
2417
2742
  img: stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.logoUrlWhite,
@@ -2419,10 +2744,16 @@ var TopBar = function TopBar(_ref) {
2419
2744
  toggleSidebar: updateSidebar,
2420
2745
  logoUrl: stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.logoUrlWhite,
2421
2746
  onLogout: handleLogout,
2422
- userDetails: userDetails
2747
+ userDetails: userDetails,
2748
+ notificationCount: unreadNotificationCount < 99 ? unreadNotificationCount : 99,
2749
+ notificationCountLoaded: notificationCountLoaded,
2750
+ cityOfCitizenShownBesideLogo: t(CitizenHomePageTenantId),
2751
+ onNotificationIconClick: onNotificationIconClick,
2752
+ hideNotificationIconOnSomeUrlsWhenNotLoggedIn: urlsToDisableNotificationIcon(pathname)
2423
2753
  });
2424
2754
  }
2425
2755
 
2756
+ var loggedin = userDetails !== null && userDetails !== void 0 && userDetails.access_token ? true : false;
2426
2757
  return /*#__PURE__*/React.createElement("div", {
2427
2758
  className: "topbar"
2428
2759
  }, mobileView ? /*#__PURE__*/React.createElement(Hamburger, {
@@ -2430,15 +2761,27 @@ var TopBar = function TopBar(_ref) {
2430
2761
  color: "#9E9E9E"
2431
2762
  }) : null, /*#__PURE__*/React.createElement("img", {
2432
2763
  className: "city",
2433
- src: cityDetails === null || cityDetails === void 0 ? void 0 : cityDetails.logoId
2434
- }), /*#__PURE__*/React.createElement("p", {
2764
+ src: loggedin ? cityDetails === null || cityDetails === void 0 ? void 0 : cityDetails.logoId : stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.statelogo
2765
+ }), loggedin && (cityDetails !== null && cityDetails !== void 0 && (_cityDetails$city = cityDetails.city) !== null && _cityDetails$city !== void 0 && _cityDetails$city.ulbGrade ? /*#__PURE__*/React.createElement("p", {
2766
+ className: "ulb",
2767
+ style: mobileView ? {
2768
+ fontSize: "14px",
2769
+ display: "inline-block"
2770
+ } : {}
2771
+ }, t(cityDetails === null || cityDetails === void 0 ? void 0 : cityDetails.i18nKey).toUpperCase(), " ", t("ULBGRADE_" + (cityDetails === null || cityDetails === void 0 ? void 0 : (_cityDetails$city2 = cityDetails.city) === null || _cityDetails$city2 === void 0 ? void 0 : _cityDetails$city2.ulbGrade.toUpperCase().replace(" ", "_").replace(".", "_"))).toUpperCase()) : /*#__PURE__*/React.createElement("img", {
2772
+ className: "state",
2773
+ src: logoUrl
2774
+ })), !loggedin && /*#__PURE__*/React.createElement("p", {
2435
2775
  className: "ulb",
2436
2776
  style: mobileView ? {
2437
2777
  fontSize: "14px",
2438
2778
  display: "inline-block"
2439
2779
  } : {}
2440
- }, t(cityDetails === null || cityDetails === void 0 ? void 0 : cityDetails.i18nKey).toUpperCase(), " ", t("ULBGRADE_" + (cityDetails === null || cityDetails === void 0 ? void 0 : (_cityDetails$city = cityDetails.city) === null || _cityDetails$city === void 0 ? void 0 : _cityDetails$city.ulbGrade.toUpperCase().replace(" ", "_").replace(".", "_"))).toUpperCase()), !mobileView && /*#__PURE__*/React.createElement("div", {
2441
- className: mobileView ? "right" : "flex-right right w-80 column-gap-15"
2780
+ }, t("MYCITY_" + (stateInfo === null || stateInfo === void 0 ? void 0 : (_stateInfo$code = stateInfo.code) === null || _stateInfo$code === void 0 ? void 0 : _stateInfo$code.toUpperCase()) + "_LABEL"), " ", t("MYCITY_STATECODE_LABEL")), !mobileView && /*#__PURE__*/React.createElement("div", {
2781
+ className: mobileView ? "right" : "flex-right right w-80 column-gap-15",
2782
+ style: !loggedin ? {
2783
+ width: '80%'
2784
+ } : {}
2442
2785
  }, /*#__PURE__*/React.createElement("div", {
2443
2786
  className: "left"
2444
2787
  }, /*#__PURE__*/React.createElement(ChangeLanguage, {
@@ -2466,9 +2809,10 @@ var TopBar = function TopBar(_ref) {
2466
2809
  })));
2467
2810
  };
2468
2811
 
2469
- var SideBarMenu = function SideBarMenu(t, closeSidebar, isEmployee) {
2812
+ var SideBarMenu = function SideBarMenu(t, closeSidebar, redirectToLoginPage, isEmployee) {
2470
2813
  return [{
2471
2814
  type: "link",
2815
+ element: "HOME",
2472
2816
  text: t("COMMON_BOTTOM_NAVIGATION_HOME"),
2473
2817
  link: isEmployee ? "/digit-ui/employee/" : "/digit-ui/citizen/",
2474
2818
  icon: /*#__PURE__*/React.createElement(HomeIcon, {
@@ -2479,17 +2823,24 @@ var SideBarMenu = function SideBarMenu(t, closeSidebar, isEmployee) {
2479
2823
  }
2480
2824
  }, {
2481
2825
  type: "component",
2826
+ element: "LANGUAGE",
2482
2827
  action: /*#__PURE__*/React.createElement(ChangeLanguage, null),
2483
2828
  icon: /*#__PURE__*/React.createElement(LanguageIcon, {
2484
2829
  className: "icon"
2485
2830
  })
2831
+ }, {
2832
+ id: 'login-btn',
2833
+ element: "LOGIN",
2834
+ text: t("CORE_COMMON_LOGIN"),
2835
+ icon: /*#__PURE__*/React.createElement(LogoutIcon, {
2836
+ className: "icon"
2837
+ }),
2838
+ populators: {
2839
+ onClick: redirectToLoginPage
2840
+ }
2486
2841
  }];
2487
2842
  };
2488
2843
 
2489
- var digitImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAREAAABACAYAAAA9MUNoAAAACXBIWX" + "MAACxLAAAsSwGlPZapAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAB+qSURBVHgB7Z0JfF" + "TV1cDPfe/NZLLMZCMLhJAAsiWIskoAEeoSCCGTiGBF6lLlo59WK2rVWvqJSytVq63aX639Way2oK" + "Q2JIRFpAq4ogYQZUkgLNlIgEC2yWzvvfudO5lBIAl5b+bNos7/95vMZObOm/vuu/fcc8859zyAMG" + "HChAkTJkyYMGHChAkTJkyYMGHChAkTJkyYMGHChAnzHYEoLXj64fhYfXz0IEp4McYaXU2W73OAl7" + "Q+PzCBSPwIIkoRfZWVOWoTO637E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"E6fyVOKoNE0cHURrQk2xydnbadeFE+yMvLC0pyIqbCgpcEoyN5AxsQ7ufQu2HKd4BQaz82QezYsc" + "PVb9mdFVH78EuEXcgJEQ9oJzFYLJaojo4OcfLkyaGU1SxMmDBhwoQJEyZMmDBhwoQJEyZMmDA/cP" + "4ffyGJt9D+/HMAAAAASUVORK5CYII=";
2490
-
2491
- var powered = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAR4AAAA2CAYAAAARQfY5AAAACXBIWX" + "MAACxLAAAsSwGlPZapAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABFBSURBVHgB7Z1hct" + "s2FoAfICdNnR+rnqDMCeqcoMoJKu/MzthOG8mzB0hygtonSHqAndDdjpPZzuwqJ4hygnhPEPUG2h" + "+bet2IWLwHWhaJBxKgRUlO8M2kriiRBEHg4b2HhweASCQSiUQikU8dAZFIJIj+/qMUhBgUj2aHo9" + "O/p7Bk+geD9/pPUryVeDB6lY7hBiMhEolEVsxWf//7PojOM2iCgsnCpzOQ2W9wMRuPfj09g0gkEn" + "GwpVXGLpRVOV9E4bweKK1A3ZKoHk60PnjchuoZiURuPm2ZWom+9Au0T/sHPwwhEolEFmjbx5MYAf" + "ToR4hEIpGcLcfxqXbg/AQ+KOhqc+1r/XenZHotII608IHR6c/HEIlEPnucgkcLiSMIpL837IFU6K" + "jesb/Vwmdv+PamTwNGIpHrs1RTC4XK6PTkvhYyvGYj1QuIRCKfPa34eEan6ZHDVEto+j4SiXzWtO" + "dcvi2PSnE+OZ3HEIlEPmu2oCVGaTrVDuUTbXYVZ7QE5/8Jo98fduHOeZc+nN+ZjkbpFCIW/b295P" + "L/R69eTWBFzN/PNd/Nqsv/KbSrdb3zUFoTPMQfcgS3VHkqvfvng79+/c/Tv/0GnlCDuDsbQia/0z" + "raDiilG8cX5sttBf2HgylkMAaRvYasM9a+pon3tfcfPdezcn8qHPwgnoY0uv7BgRamtwqanPZ1HU" + "IAeQT5d4WDavZ69PKXkfc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IpEIg0Qx6N/pM0WOGv+D0SMWAJo82FCAAAAAElFTkSuQmCC";
2492
-
2493
2844
  var defaultImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAO4AAADUCAMAAACs0e/bAAAAM1BMVEXK0eL" + "/" + "/" + "/" + "/Dy97GzuD4+fvL0uPg5O7T2efb4OvR1+Xr7vTk5/Df4+37/P3v8fbO1eTt8PUsnq5FAAAGqElEQVR4nO2d25ajIBBFCajgvf/" + "/a0eMyZgEjcI5xgt7Hmatme507UaxuJXidiDqjmSgeVIMlB1ZR1WZAf2gbdu0QwixSYzjOJPmHurfEGEfY9XzjNGG9whQCeVAuv5xQEySLtR9hPuIcwj0EeroN5m3D1IbsbgHK0esiQ9MKs" + "qXVr8Hm/a/Pulk6wihpCIXBw3dh7bTvRBt9+dC5NfS1VH3xETdM3MxXRN1T0zUPTNR98xcS1dlV9NNfx3DhkTdM6PKqHteVBF1z0vU5f0sKdpc2zWLKutXrjJjdLvpesRmukqYonauPhXpds" + "Lb6CppmpnltsYIuY2yavi6Mi2/rzAWm1zUfF0limVLqkZyA+mDYevKBS37aGC+L1lX5e7uyU1Cv565uiua9k5LFqbqqrnu2I3m+jJ11ZoLeRtfmdB0Uw/ZDsP0VTxdn7a1VERfmq7Xl" + "Xyn5D2QWLoq8bZlPoBJumphJjVBw/Ll6CoTZGsTDs4NrGqKbqBth8ZHJUi6cn168QmleSm6GmB7Kxm+6obXlf7PoDHosCwM3QpiS2legi6ocSl3L0G3BdneDDgwQdENfeY+SfDJBkF37Z" + "B+GvwzA6/rMaafAn8143VhPZWdjMWG1oHXhdnemgPoAvLlB/iZyRTfVeF06wPoQhJmlm4bdcOAZRlRN5gcPc5SoPEQR1fDdbOo6wn+uYvXxY0QCLom6gYROKH+Aj5nvphuFXWDiLpRdxl" + "/19LFT95k6CHCrnW7pCDqBn1i1PUFvii2c11oZOJ6usWeH0RRNzC4Zs+6FTi2nevCVwCjbugnXklX5fkfTldL8PEilUB1kfNyN1u9M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"Ue6ilunu8jF8pFwgv1FXp3mUt35OtRbr7eM4u4Gs6vUBXgeuHc5kfE/cbvWZtkROLm1DMtLCy80tzsu2PRj0hTI8fvrQuvsjlJkyutszq+m423wHaLTyniy/XuiGZ84LuT+m5ZfNfRxyGs7L" + "XZOvia7VujatUwVTrIt+Q/Csc7Tuhe+BOakT10b4TuoiiJjvgU9emTO42PwEfBa+cuodKkuf42DXr1D3JpXz73Hnn0j10evHKe+nufgfUm+7B84sX9FfdEzXux2DBpWuKokkCqN/5pa/8pmvn" + "L+RGKCddCGmatiPyPB/+ekO/M/q/7uvbt22kTt3zEnXPzCV13T3Gel4/6NduDu66xRvlPNkM1RjjxUdv+4WhGx6TftD19Q/dfzpwcHO+rE3fAAAAAElFTkSuQmCC";
2494
2845
 
2495
2846
  var Profile = function Profile(_ref) {
@@ -2520,15 +2871,22 @@ var Profile = function Profile(_ref) {
2520
2871
  };
2521
2872
 
2522
2873
  var PoweredBy = function PoweredBy() {
2874
+ var _window, _window$globalConfigs, _window$globalConfigs2;
2875
+
2523
2876
  return /*#__PURE__*/React.createElement("div", {
2524
2877
  className: "digit-footer"
2525
2878
  }, /*#__PURE__*/React.createElement("img", {
2526
- src: powered,
2527
- alt: "Powered by"
2528
- }), /*#__PURE__*/React.createElement("img", {
2529
- src: digitImg,
2530
- alt: "DIGIT"
2531
- }));
2879
+ alt: "Powered by DIGIT",
2880
+ src: (_window = window) === null || _window === void 0 ? void 0 : (_window$globalConfigs = _window.globalConfigs) === null || _window$globalConfigs === void 0 ? void 0 : (_window$globalConfigs2 = _window$globalConfigs.getConfig) === null || _window$globalConfigs2 === void 0 ? void 0 : _window$globalConfigs2.call(_window$globalConfigs, "DIGIT_FOOTER"),
2881
+ style: {
2882
+ cursor: "pointer"
2883
+ },
2884
+ onClick: function onClick() {
2885
+ var _window2, _window2$globalConfig, _window2$globalConfig2;
2886
+
2887
+ window.open((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$globalConfig = _window2.globalConfigs) === null || _window2$globalConfig === void 0 ? void 0 : (_window2$globalConfig2 = _window2$globalConfig.getConfig) === null || _window2$globalConfig2 === void 0 ? void 0 : _window2$globalConfig2.call(_window2$globalConfig, "DIGIT_HOME_URL"), "_blank").focus();
2888
+ }
2889
+ }), " ");
2532
2890
  };
2533
2891
 
2534
2892
  var CitizenSideBar = function CitizenSideBar(_ref2) {
@@ -2550,12 +2908,19 @@ var CitizenSideBar = function CitizenSideBar(_ref2) {
2550
2908
  var _useTranslation = useTranslation(),
2551
2909
  t = _useTranslation.t;
2552
2910
 
2911
+ var history = useHistory();
2912
+
2553
2913
  var closeSidebar = function closeSidebar() {
2554
2914
  Digit.clikOusideFired = true;
2555
2915
  toggleSidebar(false);
2556
2916
  };
2557
2917
 
2558
- var menuItems = [].concat(SideBarMenu(t, closeSidebar, isEmployee));
2918
+ var redirectToLoginPage = function redirectToLoginPage() {
2919
+ history.push("/digit-ui/citizen/login");
2920
+ closeSidebar();
2921
+ };
2922
+
2923
+ var menuItems = [].concat(SideBarMenu(t, closeSidebar, redirectToLoginPage, isEmployee));
2559
2924
  var profileItem;
2560
2925
 
2561
2926
  if (isFetched && user && user.access_token) {
@@ -2563,8 +2928,12 @@ var CitizenSideBar = function CitizenSideBar(_ref2) {
2563
2928
  info: user.info,
2564
2929
  stateName: stateInfo.name
2565
2930
  });
2931
+ menuItems = menuItems.filter(function (item) {
2932
+ return (item === null || item === void 0 ? void 0 : item.id) !== "login-btn";
2933
+ });
2566
2934
  menuItems = [].concat(menuItems, [{
2567
2935
  text: t("CORE_COMMON_LOGOUT"),
2936
+ element: "LOGOUT",
2568
2937
  icon: /*#__PURE__*/React.createElement(LogoutIcon, {
2569
2938
  className: "icon"
2570
2939
  }),
@@ -2574,6 +2943,13 @@ var CitizenSideBar = function CitizenSideBar(_ref2) {
2574
2943
  }]);
2575
2944
  }
2576
2945
 
2946
+ if (history.location.pathname.includes("/openlink")) {
2947
+ profileItem = /*#__PURE__*/React.createElement("span", null);
2948
+ menuItems = menuItems.filter(function (ele) {
2949
+ return ele.element === "LANGUAGE";
2950
+ });
2951
+ }
2952
+
2577
2953
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(NavBar, {
2578
2954
  open: isOpen,
2579
2955
  profileItem: profileItem,
@@ -2689,7 +3065,9 @@ var TopBarSideBar = function TopBarSideBar(_ref) {
2689
3065
  cityDetails = _ref.cityDetails,
2690
3066
  mobileView = _ref.mobileView,
2691
3067
  handleUserDropdownSelection = _ref.handleUserDropdownSelection,
2692
- logoUrl = _ref.logoUrl;
3068
+ logoUrl = _ref.logoUrl,
3069
+ _ref$showSidebar = _ref.showSidebar,
3070
+ showSidebar = _ref$showSidebar === void 0 ? true : _ref$showSidebar;
2693
3071
 
2694
3072
  var _useState = useState(false),
2695
3073
  isSidebarOpen = _useState[0],
@@ -2720,7 +3098,7 @@ var TopBarSideBar = function TopBarSideBar(_ref) {
2720
3098
  userOptions: userOptions,
2721
3099
  handleUserDropdownSelection: handleUserDropdownSelection,
2722
3100
  logoUrl: logoUrl
2723
- }), /*#__PURE__*/React.createElement(SideBar, {
3101
+ }), showSidebar && /*#__PURE__*/React.createElement(SideBar, {
2724
3102
  t: t,
2725
3103
  CITIZEN: CITIZEN,
2726
3104
  isSidebarOpen: isSidebarOpen,
@@ -2732,6 +3110,8 @@ var TopBarSideBar = function TopBarSideBar(_ref) {
2732
3110
  };
2733
3111
 
2734
3112
  var EmployeeApp = function EmployeeApp(_ref) {
3113
+ var _window, _window$globalConfigs, _window$globalConfigs2;
3114
+
2735
3115
  var stateInfo = _ref.stateInfo,
2736
3116
  userDetails = _ref.userDetails,
2737
3117
  CITIZEN = _ref.CITIZEN,
@@ -2742,15 +3122,47 @@ var EmployeeApp = function EmployeeApp(_ref) {
2742
3122
  DSO = _ref.DSO,
2743
3123
  stateCode = _ref.stateCode,
2744
3124
  modules = _ref.modules,
2745
- appTenants = _ref.appTenants,
2746
- sourceUrl = _ref.sourceUrl;
3125
+ appTenants = _ref.appTenants;
2747
3126
 
2748
3127
  var _useTranslation = useTranslation(),
2749
3128
  t = _useTranslation.t;
2750
3129
 
3130
+ var _useRouteMatch = useRouteMatch(),
3131
+ path = _useRouteMatch.path;
3132
+
3133
+ useEffect(function () {
3134
+ Digit.UserService.setType("employee");
3135
+ }, []);
2751
3136
  return /*#__PURE__*/React.createElement("div", {
2752
3137
  className: "employee"
3138
+ }, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
3139
+ path: path + "/user"
2753
3140
  }, /*#__PURE__*/React.createElement(TopBarSideBar, {
3141
+ t: t,
3142
+ stateInfo: stateInfo,
3143
+ userDetails: userDetails,
3144
+ CITIZEN: CITIZEN,
3145
+ cityDetails: cityDetails,
3146
+ mobileView: mobileView,
3147
+ handleUserDropdownSelection: handleUserDropdownSelection,
3148
+ logoUrl: logoUrl,
3149
+ showSidebar: false
3150
+ }), /*#__PURE__*/React.createElement("div", {
3151
+ className: "loginContainer",
3152
+ style: {
3153
+ "--banner-url": "url(" + (stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.bannerUrl) + ")"
3154
+ }
3155
+ }, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
3156
+ path: path + "/user/login"
3157
+ }, /*#__PURE__*/React.createElement(EmployeeLogin, null)), /*#__PURE__*/React.createElement(Route, {
3158
+ path: path + "/user/forgot-password"
3159
+ }, /*#__PURE__*/React.createElement(EmployeeForgotPassword, null)), /*#__PURE__*/React.createElement(Route, {
3160
+ path: path + "/user/change-password"
3161
+ }, " ", /*#__PURE__*/React.createElement(EmployeeChangePassword, null)), /*#__PURE__*/React.createElement(Route, {
3162
+ path: path + "/user/language-selection"
3163
+ }, /*#__PURE__*/React.createElement(LanguageSelection, null)), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(Redirect, {
3164
+ to: path + "/user/language-selection"
3165
+ }))))), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(TopBarSideBar, {
2754
3166
  t: t,
2755
3167
  stateInfo: stateInfo,
2756
3168
  userDetails: userDetails,
@@ -2769,18 +3181,278 @@ var EmployeeApp = function EmployeeApp(_ref) {
2769
3181
  })), /*#__PURE__*/React.createElement("div", {
2770
3182
  className: "employee-home-footer"
2771
3183
  }, /*#__PURE__*/React.createElement("img", {
2772
- src: sourceUrl + "/digit-footer.png",
3184
+ alt: "Powered by DIGIT",
3185
+ src: (_window = window) === null || _window === void 0 ? void 0 : (_window$globalConfigs = _window.globalConfigs) === null || _window$globalConfigs === void 0 ? void 0 : (_window$globalConfigs2 = _window$globalConfigs.getConfig) === null || _window$globalConfigs2 === void 0 ? void 0 : _window$globalConfigs2.call(_window$globalConfigs, "DIGIT_FOOTER"),
2773
3186
  style: {
2774
3187
  height: "1.1em",
2775
3188
  cursor: "pointer"
2776
3189
  },
2777
3190
  onClick: function onClick() {
2778
- window.open("https://www.digit.org/", "_blank").focus();
3191
+ var _window2, _window2$globalConfig, _window2$globalConfig2;
3192
+
3193
+ window.open((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$globalConfig = _window2.globalConfigs) === null || _window2$globalConfig === void 0 ? void 0 : (_window2$globalConfig2 = _window2$globalConfig.getConfig) === null || _window2$globalConfig2 === void 0 ? void 0 : _window2$globalConfig2.call(_window2$globalConfig, "DIGIT_HOME_URL"), "_blank").focus();
2779
3194
  }
3195
+ })))), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(Redirect, {
3196
+ to: path + "/user/language-selection"
2780
3197
  }))));
2781
3198
  };
2782
3199
 
2783
- var CitizenApp = function CitizenApp(_ref) {
3200
+ var Home = function Home() {
3201
+ var _Digit$SessionStorage;
3202
+
3203
+ var _useTranslation = useTranslation(),
3204
+ t = _useTranslation.t;
3205
+
3206
+ var history = useHistory();
3207
+ var tenantId = (_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code;
3208
+
3209
+ var _Digit$Hooks$useStore = Digit.Hooks.useStore.getInitData(),
3210
+ _Digit$Hooks$useStore2 = _Digit$Hooks$useStore.data;
3211
+
3212
+ _Digit$Hooks$useStore2 = _Digit$Hooks$useStore2 === void 0 ? {} : _Digit$Hooks$useStore2;
3213
+ var stateInfo = _Digit$Hooks$useStore2.stateInfo,
3214
+ isLoading = _Digit$Hooks$useStore.isLoading;
3215
+
3216
+ var conditionsToDisableNotificationCountTrigger = function conditionsToDisableNotificationCountTrigger() {
3217
+ var _Digit$UserService, _Digit$UserService$ge, _Digit$UserService$ge2, _Digit$UserService2, _Digit$UserService2$g;
3218
+
3219
+ if (((_Digit$UserService = Digit.UserService) === null || _Digit$UserService === void 0 ? void 0 : (_Digit$UserService$ge = _Digit$UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : (_Digit$UserService$ge2 = _Digit$UserService$ge.info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.type) === "EMPLOYEE") return false;
3220
+ if (!((_Digit$UserService2 = Digit.UserService) !== null && _Digit$UserService2 !== void 0 && (_Digit$UserService2$g = _Digit$UserService2.getUser()) !== null && _Digit$UserService2$g !== void 0 && _Digit$UserService2$g.access_token)) return false;
3221
+ return true;
3222
+ };
3223
+
3224
+ var _Digit$Hooks$useEvent = Digit.Hooks.useEvents({
3225
+ tenantId: tenantId,
3226
+ variant: "whats-new",
3227
+ config: {
3228
+ enabled: conditionsToDisableNotificationCountTrigger()
3229
+ }
3230
+ }),
3231
+ EventsData = _Digit$Hooks$useEvent.data,
3232
+ EventsDataLoading = _Digit$Hooks$useEvent.isLoading;
3233
+
3234
+ if (!tenantId) {
3235
+ history.push("/digit-ui/citizen/select-language");
3236
+ }
3237
+
3238
+ var allCitizenServicesProps = {
3239
+ header: t("DASHBOARD_CITIZEN_SERVICES_LABEL"),
3240
+ sideOption: {
3241
+ name: t("DASHBOARD_VIEW_ALL_LABEL"),
3242
+ onClick: function onClick() {
3243
+ return history.push("/digit-ui/citizen/all-services");
3244
+ }
3245
+ },
3246
+ options: [{
3247
+ name: t("ES_PGR_HEADER_COMPLAINT"),
3248
+ Icon: /*#__PURE__*/React.createElement(ComplaintIcon, null),
3249
+ onClick: function onClick() {
3250
+ return history.push("/digit-ui/citizen/pgr-home");
3251
+ }
3252
+ }, {
3253
+ name: t("MODULE_PT"),
3254
+ Icon: /*#__PURE__*/React.createElement(PTIcon, {
3255
+ className: "fill-path-primary-main"
3256
+ }),
3257
+ onClick: function onClick() {
3258
+ return history.push("/digit-ui/citizen/pt-home");
3259
+ }
3260
+ }, {
3261
+ name: t("MODULE_TL"),
3262
+ Icon: /*#__PURE__*/React.createElement(CaseIcon, {
3263
+ className: "fill-path-primary-main"
3264
+ }),
3265
+ onClick: function onClick() {
3266
+ return history.push("/digit-ui/citizen/tl-home");
3267
+ }
3268
+ }, {
3269
+ name: t("CS_COMMON_INBOX_BPA"),
3270
+ Icon: /*#__PURE__*/React.createElement(OBPSIcon, null),
3271
+ onClick: function onClick() {
3272
+ return history.push("/digit-ui/citizen/obps-home");
3273
+ }
3274
+ }],
3275
+ styles: {
3276
+ display: "flex",
3277
+ flexWrap: "wrap",
3278
+ justifyContent: "flex-start",
3279
+ width: "100%"
3280
+ }
3281
+ };
3282
+ var allInfoAndUpdatesProps = {
3283
+ header: t("CS_COMMON_DASHBOARD_INFO_UPDATES"),
3284
+ sideOption: {
3285
+ name: t("DASHBOARD_VIEW_ALL_LABEL"),
3286
+ onClick: function onClick() {
3287
+ return console.debug("view all");
3288
+ }
3289
+ },
3290
+ options: [{
3291
+ name: t("CS_HEADER_MYCITY"),
3292
+ Icon: /*#__PURE__*/React.createElement(HomeIcon, null)
3293
+ }, {
3294
+ name: t("EVENTS_EVENTS_HEADER"),
3295
+ Icon: /*#__PURE__*/React.createElement(Calender, null),
3296
+ onClick: function onClick() {
3297
+ return history.push("/digit-ui/citizen/engagement/events");
3298
+ }
3299
+ }, {
3300
+ name: t("CS_COMMON_DOCUMENTS"),
3301
+ Icon: /*#__PURE__*/React.createElement(DocumentIcon, null),
3302
+ onClick: function onClick() {
3303
+ return history.push("/digit-ui/citizen/engagement/docs");
3304
+ }
3305
+ }, {
3306
+ name: t("CS_COMMON_SURVEYS"),
3307
+ Icon: /*#__PURE__*/React.createElement(DocumentIcon, null),
3308
+ onClick: function onClick() {
3309
+ return history.push("/digit-ui/citizen/engagement/SurveyList");
3310
+ }
3311
+ }],
3312
+ styles: {
3313
+ display: "flex",
3314
+ flexWrap: "wrap",
3315
+ justifyContent: "flex-start",
3316
+ width: "100%"
3317
+ }
3318
+ };
3319
+ return isLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
3320
+ className: "HomePageWrapper"
3321
+ }, /*#__PURE__*/React.createElement("div", {
3322
+ className: "BannerWithSearch"
3323
+ }, /*#__PURE__*/React.createElement("img", {
3324
+ src: stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.bannerUrl
3325
+ }), /*#__PURE__*/React.createElement("div", {
3326
+ className: "Search"
3327
+ }, /*#__PURE__*/React.createElement(StandaloneSearchBar, {
3328
+ placeholder: t("CS_COMMON_SEARCH_PLACEHOLDER")
3329
+ }))), /*#__PURE__*/React.createElement("div", {
3330
+ className: "ServicesSection"
3331
+ }, /*#__PURE__*/React.createElement(CardBasedOptions, allCitizenServicesProps), /*#__PURE__*/React.createElement(CardBasedOptions, allInfoAndUpdatesProps)), conditionsToDisableNotificationCountTrigger() ? EventsDataLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
3332
+ className: "WhatsNewSection"
3333
+ }, /*#__PURE__*/React.createElement("div", {
3334
+ className: "headSection"
3335
+ }, /*#__PURE__*/React.createElement("h2", null, t("DASHBOARD_WHATS_NEW_LABEL")), /*#__PURE__*/React.createElement("p", {
3336
+ onClick: function onClick() {
3337
+ return history.push("/digit-ui/citizen/engagement/whats-new");
3338
+ }
3339
+ }, t("DASHBOARD_VIEW_ALL_LABEL"))), /*#__PURE__*/React.createElement(WhatsNewCard, EventsData === null || EventsData === void 0 ? void 0 : EventsData[0])) : null);
3340
+ };
3341
+
3342
+ var LanguageSelection$1 = function LanguageSelection() {
3343
+ var _useTranslation = useTranslation(),
3344
+ t = _useTranslation.t;
3345
+
3346
+ var history = useHistory();
3347
+
3348
+ var _Digit$Hooks$useStore = Digit.Hooks.useStore.getInitData(),
3349
+ _Digit$Hooks$useStore2 = _Digit$Hooks$useStore.data;
3350
+
3351
+ _Digit$Hooks$useStore2 = _Digit$Hooks$useStore2 === void 0 ? {} : _Digit$Hooks$useStore2;
3352
+ var languages = _Digit$Hooks$useStore2.languages,
3353
+ stateInfo = _Digit$Hooks$useStore2.stateInfo,
3354
+ isLoading = _Digit$Hooks$useStore.isLoading;
3355
+ var selectedLanguage = Digit.StoreData.getCurrentLanguage();
3356
+ var texts = useMemo(function () {
3357
+ return {
3358
+ header: t("CS_COMMON_CHOOSE_LANGUAGE"),
3359
+ submitBarLabel: t("CORE_COMMON_CONTINUE")
3360
+ };
3361
+ }, [t]);
3362
+ var RadioButtonProps = useMemo(function () {
3363
+ return {
3364
+ options: languages,
3365
+ optionsKey: "label",
3366
+ additionalWrapperClass: "reverse-radio-selection-wrapper",
3367
+ onSelect: function onSelect(language) {
3368
+ return Digit.LocalizationService.changeLanguage(language.value, stateInfo.code);
3369
+ },
3370
+ selectedOption: languages === null || languages === void 0 ? void 0 : languages.filter(function (i) {
3371
+ return i.value === selectedLanguage;
3372
+ })[0]
3373
+ };
3374
+ }, [selectedLanguage, languages]);
3375
+
3376
+ function onSubmit() {
3377
+ history.push("/digit-ui/citizen/select-location");
3378
+ }
3379
+
3380
+ return isLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(PageBasedInput, {
3381
+ texts: texts,
3382
+ onSubmit: onSubmit
3383
+ }, /*#__PURE__*/React.createElement(CardHeader, null, t("CS_COMMON_CHOOSE_LANGUAGE")), /*#__PURE__*/React.createElement(RadioButtons, RadioButtonProps));
3384
+ };
3385
+
3386
+ var LocationSelection = function LocationSelection() {
3387
+ var _useTranslation = useTranslation(),
3388
+ t = _useTranslation.t;
3389
+
3390
+ var history = useHistory();
3391
+
3392
+ var _Digit$Hooks$useTenan = Digit.Hooks.useTenants(),
3393
+ cities = _Digit$Hooks$useTenan.data,
3394
+ isLoading = _Digit$Hooks$useTenan.isLoading;
3395
+
3396
+ var _useState = useState(function () {
3397
+ return Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY");
3398
+ }),
3399
+ selectedCity = _useState[0],
3400
+ setSelectedCity = _useState[1];
3401
+
3402
+ var _useState2 = useState(false),
3403
+ showError = _useState2[0],
3404
+ setShowError = _useState2[1];
3405
+
3406
+ var texts = useMemo(function () {
3407
+ return {
3408
+ header: t("CS_COMMON_CHOOSE_LOCATION"),
3409
+ submitBarLabel: t("CORE_COMMON_CONTINUE")
3410
+ };
3411
+ }, [t]);
3412
+
3413
+ function selectCity(city) {
3414
+ setSelectedCity(city);
3415
+ setShowError(false);
3416
+ }
3417
+
3418
+ var RadioButtonProps = useMemo(function () {
3419
+ return {
3420
+ options: cities,
3421
+ optionsKey: "i18nKey",
3422
+ additionalWrapperClass: "reverse-radio-selection-wrapper",
3423
+ onSelect: selectCity,
3424
+ selectedOption: selectedCity
3425
+ };
3426
+ }, [cities, t, selectedCity]);
3427
+
3428
+ function onSubmit() {
3429
+ if (selectedCity) {
3430
+ Digit.SessionStorage.set("CITIZEN.COMMON.HOME.CITY", selectedCity);
3431
+ history.push("/digit-ui/citizen");
3432
+ } else {
3433
+ setShowError(true);
3434
+ }
3435
+ }
3436
+
3437
+ return isLoading ? /*#__PURE__*/React.createElement("loader", null) : /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(BackButton, null), /*#__PURE__*/React.createElement(PageBasedInput, {
3438
+ texts: texts,
3439
+ onSubmit: onSubmit
3440
+ }, /*#__PURE__*/React.createElement(CardHeader, null, t("CS_COMMON_CHOOSE_LOCATION")), /*#__PURE__*/React.createElement(SearchOnRadioButtons, _extends({}, RadioButtonProps, {
3441
+ placeholder: t("COMMON_TABLE_SEARCH")
3442
+ })), showError ? /*#__PURE__*/React.createElement(CardLabelError, null, t("CS_COMMON_LOCATION_SELECTION_ERROR")) : null));
3443
+ };
3444
+
3445
+ var getTenants$1 = function getTenants(codes, tenants) {
3446
+ return tenants.filter(function (tenant) {
3447
+ return codes.map(function (item) {
3448
+ return item.code;
3449
+ }).includes(tenant.code);
3450
+ });
3451
+ };
3452
+
3453
+ var Home$1 = function Home$1(_ref) {
3454
+ var _window, _window$globalConfigs, _window$globalConfigs2;
3455
+
2784
3456
  var stateInfo = _ref.stateInfo,
2785
3457
  userDetails = _ref.userDetails,
2786
3458
  CITIZEN = _ref.CITIZEN,
@@ -2791,13 +3463,54 @@ var CitizenApp = function CitizenApp(_ref) {
2791
3463
  stateCode = _ref.stateCode,
2792
3464
  modules = _ref.modules,
2793
3465
  appTenants = _ref.appTenants,
2794
- sourceUrl = _ref.sourceUrl,
2795
3466
  pathname = _ref.pathname;
3467
+ var classname = Digit.Hooks.fsm.useRouteSubscription(pathname);
2796
3468
 
2797
3469
  var _useTranslation = useTranslation(),
2798
3470
  t = _useTranslation.t;
2799
3471
 
2800
- var classname = Digit.Hooks.fsm.useRouteSubscription(pathname);
3472
+ var _useRouteMatch = useRouteMatch(),
3473
+ path = _useRouteMatch.path;
3474
+
3475
+ var appRoutes = modules.map(function (_ref2, index) {
3476
+ var code = _ref2.code,
3477
+ tenants = _ref2.tenants;
3478
+ var Module = Digit.ComponentRegistryService.getComponent(code + "Module");
3479
+ return /*#__PURE__*/React.createElement(Route, {
3480
+ key: index,
3481
+ path: path + "/" + code.toLowerCase()
3482
+ }, /*#__PURE__*/React.createElement(Module, {
3483
+ stateCode: stateCode,
3484
+ moduleCode: code,
3485
+ userType: "citizen",
3486
+ tenants: getTenants$1(tenants, appTenants)
3487
+ }));
3488
+ });
3489
+ var ModuleLevelLinkHomePages = modules.map(function (_ref3, index) {
3490
+ var code = _ref3.code,
3491
+ bannerImage = _ref3.bannerImage;
3492
+
3493
+ var Links = Digit.ComponentRegistryService.getComponent(code + "Links") || function () {
3494
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
3495
+ };
3496
+
3497
+ return /*#__PURE__*/React.createElement(Route, {
3498
+ key: index,
3499
+ path: path + "/" + code.toLowerCase() + "-home"
3500
+ }, /*#__PURE__*/React.createElement("div", {
3501
+ className: "moduleLinkHomePage"
3502
+ }, /*#__PURE__*/React.createElement("img", {
3503
+ src: bannerImage || (stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.bannerUrl)
3504
+ }), /*#__PURE__*/React.createElement(BackButton, {
3505
+ className: "moduleLinkHomePageBackButton"
3506
+ }), /*#__PURE__*/React.createElement("h1", null, t("MODULE_" + code.toUpperCase()))), /*#__PURE__*/React.createElement("div", {
3507
+ className: "moduleLinkHomePageModuleLinks"
3508
+ }, /*#__PURE__*/React.createElement(Links, {
3509
+ key: index,
3510
+ matchPath: "/digit-ui/citizen/" + code.toLowerCase(),
3511
+ userType: "citizen"
3512
+ })));
3513
+ });
2801
3514
  return /*#__PURE__*/React.createElement("div", {
2802
3515
  className: classname
2803
3516
  }, /*#__PURE__*/React.createElement(TopBarSideBar, {
@@ -2810,24 +3523,48 @@ var CitizenApp = function CitizenApp(_ref) {
2810
3523
  handleUserDropdownSelection: handleUserDropdownSelection,
2811
3524
  logoUrl: logoUrl
2812
3525
  }), /*#__PURE__*/React.createElement("div", {
2813
- className: "main center-container mb-50"
2814
- }, /*#__PURE__*/React.createElement(AppModules, {
2815
- stateCode: stateCode,
3526
+ className: "main center-container mb-25"
3527
+ }, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
3528
+ exact: true,
3529
+ path: path
3530
+ }, /*#__PURE__*/React.createElement(Home, null)), /*#__PURE__*/React.createElement(Route, {
3531
+ exact: true,
3532
+ path: path + "/select-language"
3533
+ }, /*#__PURE__*/React.createElement(LanguageSelection$1, null)), /*#__PURE__*/React.createElement(Route, {
3534
+ exact: true,
3535
+ path: path + "/select-location"
3536
+ }, /*#__PURE__*/React.createElement(LocationSelection, null)), /*#__PURE__*/React.createElement(Route, {
3537
+ path: path + "/all-services"
3538
+ }, /*#__PURE__*/React.createElement(AppHome, {
2816
3539
  userType: "citizen",
2817
- modules: modules,
2818
- appTenants: appTenants
2819
- }), /*#__PURE__*/React.createElement("div", {
2820
- className: "citizen-home-footer"
3540
+ modules: modules
3541
+ })), /*#__PURE__*/React.createElement(Route, {
3542
+ path: path + "/login"
3543
+ }, " ", /*#__PURE__*/React.createElement(Login, {
3544
+ stateCode: stateCode
3545
+ })), /*#__PURE__*/React.createElement(Route, {
3546
+ path: path + "/register"
3547
+ }, /*#__PURE__*/React.createElement(Login, {
3548
+ stateCode: stateCode,
3549
+ isUserRegistered: false
3550
+ })), appRoutes, ModuleLevelLinkHomePages)), /*#__PURE__*/React.createElement("div", {
3551
+ className: "citizen-home-footer",
3552
+ style: window.location.href.includes("citizen/obps") ? {
3553
+ zIndex: "-1"
3554
+ } : {}
2821
3555
  }, /*#__PURE__*/React.createElement("img", {
2822
- src: sourceUrl + "/digit-footer.png",
3556
+ alt: "Powered by DIGIT",
3557
+ src: (_window = window) === null || _window === void 0 ? void 0 : (_window$globalConfigs = _window.globalConfigs) === null || _window$globalConfigs === void 0 ? void 0 : (_window$globalConfigs2 = _window$globalConfigs.getConfig) === null || _window$globalConfigs2 === void 0 ? void 0 : _window$globalConfigs2.call(_window$globalConfigs, "DIGIT_FOOTER"),
2823
3558
  style: {
2824
3559
  height: "1.2em",
2825
3560
  cursor: "pointer"
2826
3561
  },
2827
3562
  onClick: function onClick() {
2828
- window.open("https://www.digit.org/", "_blank").focus();
3563
+ var _window2, _window2$globalConfig, _window2$globalConfig2;
3564
+
3565
+ window.open((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$globalConfig = _window2.globalConfigs) === null || _window2$globalConfig === void 0 ? void 0 : (_window2$globalConfig2 = _window2$globalConfig.getConfig) === null || _window2$globalConfig2 === void 0 ? void 0 : _window2$globalConfig2.call(_window2$globalConfig, "DIGIT_HOME_URL"), "_blank").focus();
2829
3566
  }
2830
- }))));
3567
+ })));
2831
3568
  };
2832
3569
 
2833
3570
  var DigitApp = function DigitApp(_ref) {
@@ -2904,7 +3641,7 @@ var DigitApp = function DigitApp(_ref) {
2904
3641
  path: "/digit-ui/employee"
2905
3642
  }, /*#__PURE__*/React.createElement(EmployeeApp, commonProps)), /*#__PURE__*/React.createElement(Route, {
2906
3643
  path: "/digit-ui/citizen"
2907
- }, /*#__PURE__*/React.createElement(CitizenApp, commonProps)), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(Redirect, {
3644
+ }, /*#__PURE__*/React.createElement(Home$1, commonProps)), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(Redirect, {
2908
3645
  to: "/digit-ui/citizen"
2909
3646
  })));
2910
3647
  };
@@ -3000,6 +3737,14 @@ var DigitUI = function DigitUI(_ref2) {
3000
3737
  moduleReducers: moduleReducers
3001
3738
  }))));
3002
3739
  };
3740
+ var componentsToRegister = {};
3741
+ var initCoreComponents = function initCoreComponents() {
3742
+ Object.entries(componentsToRegister).forEach(function (_ref3) {
3743
+ var key = _ref3[0],
3744
+ value = _ref3[1];
3745
+ Digit.ComponentRegistryService.setComponent(key, value);
3746
+ });
3747
+ };
3003
3748
 
3004
- export { DigitUI };
3749
+ export { DigitUI, initCoreComponents };
3005
3750
  //# sourceMappingURL=index.modern.js.map