@egovernments/digit-ui-module-core 1.5.4 → 1.5.5-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2186 -472
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +2188 -474
- package/dist/index.modern.js.LICENSE.txt +64 -0
- package/dist/index.modern.js.map +1 -1
- package/package.json +3 -6
package/dist/index.js
CHANGED
|
@@ -7,84 +7,10 @@ var reactRedux = require('react-redux');
|
|
|
7
7
|
var reactRouterDom = require('react-router-dom');
|
|
8
8
|
var reactI18next = require('react-i18next');
|
|
9
9
|
var digitUiReactComponents = require('@egovernments/digit-ui-react-components');
|
|
10
|
+
var ReactTooltip = _interopDefault(require('react-tooltip'));
|
|
10
11
|
var redux = require('redux');
|
|
11
12
|
var thunk = _interopDefault(require('redux-thunk'));
|
|
12
13
|
|
|
13
|
-
var CitizenHome = function CitizenHome(_ref) {
|
|
14
|
-
var modules = _ref.modules;
|
|
15
|
-
var ComponentProvider = Digit.Contexts.ComponentProvider;
|
|
16
|
-
var registry = React.useContext(ComponentProvider);
|
|
17
|
-
var paymentModule = modules.filter(function (_ref2) {
|
|
18
|
-
var code = _ref2.code;
|
|
19
|
-
return code === "Payment";
|
|
20
|
-
})[0];
|
|
21
|
-
var moduleArr = modules.filter(function (_ref3) {
|
|
22
|
-
var code = _ref3.code;
|
|
23
|
-
return code !== "Payment";
|
|
24
|
-
});
|
|
25
|
-
var moduleArray = [paymentModule].concat(moduleArr);
|
|
26
|
-
var showQuickPay = moduleArr.some(function (module) {
|
|
27
|
-
return module.code === "QuickPayLinks";
|
|
28
|
-
});
|
|
29
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.BackButton, null), /*#__PURE__*/React__default.createElement("div", {
|
|
30
|
-
className: "citizenAllServiceGrid"
|
|
31
|
-
}, moduleArray.filter(function (mod) {
|
|
32
|
-
return mod;
|
|
33
|
-
}).map(function (_ref4, index) {
|
|
34
|
-
var code = _ref4.code;
|
|
35
|
-
|
|
36
|
-
var Links = Digit.ComponentRegistryService.getComponent(code + "Links") || function () {
|
|
37
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
if (code === "Payment" && !showQuickPay) {
|
|
41
|
-
Links = function Links() {
|
|
42
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return /*#__PURE__*/React__default.createElement(Links, {
|
|
47
|
-
key: index,
|
|
48
|
-
matchPath: "/digit-ui/citizen/" + code.toLowerCase(),
|
|
49
|
-
userType: "citizen"
|
|
50
|
-
});
|
|
51
|
-
})));
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
var EmployeeHome = function EmployeeHome(_ref5) {
|
|
55
|
-
var modules = _ref5.modules;
|
|
56
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
57
|
-
className: "employee-app-container"
|
|
58
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
59
|
-
className: "ground-container moduleCardWrapper gridModuleWrapper"
|
|
60
|
-
}, modules.map(function (_ref6, index) {
|
|
61
|
-
var code = _ref6.code;
|
|
62
|
-
|
|
63
|
-
var Card = Digit.ComponentRegistryService.getComponent(code + "Card") || function () {
|
|
64
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
return /*#__PURE__*/React__default.createElement(Card, {
|
|
68
|
-
key: index
|
|
69
|
-
});
|
|
70
|
-
})));
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
var AppHome = function AppHome(_ref7) {
|
|
74
|
-
var userType = _ref7.userType,
|
|
75
|
-
modules = _ref7.modules;
|
|
76
|
-
|
|
77
|
-
if (userType === "citizen") {
|
|
78
|
-
return /*#__PURE__*/React__default.createElement(CitizenHome, {
|
|
79
|
-
modules: modules
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
return /*#__PURE__*/React__default.createElement(EmployeeHome, {
|
|
84
|
-
modules: modules
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
|
|
88
14
|
function _extends() {
|
|
89
15
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
90
16
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -132,6 +58,205 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
132
58
|
return target;
|
|
133
59
|
}
|
|
134
60
|
|
|
61
|
+
var processLinkData = function processLinkData(newData, code, t) {
|
|
62
|
+
var obj = newData === null || newData === void 0 ? void 0 : newData["" + code];
|
|
63
|
+
|
|
64
|
+
if (obj) {
|
|
65
|
+
obj.map(function (link) {
|
|
66
|
+
link.link = link["navigationURL"], link.i18nKey = t(link["name"]);
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
var newObj = {
|
|
71
|
+
links: obj === null || obj === void 0 ? void 0 : obj.reverse(),
|
|
72
|
+
header: Digit.Utils.locale.getTransformedLocale("ACTION_TEST_" + code),
|
|
73
|
+
iconName: "CITIZEN_" + code + "_ICON"
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
if (code === "FSM") {
|
|
77
|
+
var roleBasedLoginRoutes = [{
|
|
78
|
+
role: "FSM_DSO",
|
|
79
|
+
from: "/digit-ui/citizen/fsm/dso-dashboard",
|
|
80
|
+
dashoardLink: "CS_LINK_DSO_DASHBOARD",
|
|
81
|
+
loginLink: "CS_LINK_LOGIN_DSO"
|
|
82
|
+
}];
|
|
83
|
+
roleBasedLoginRoutes.map(function (_ref) {
|
|
84
|
+
var _newObj$links, _newObj$links2;
|
|
85
|
+
|
|
86
|
+
var role = _ref.role,
|
|
87
|
+
from = _ref.from,
|
|
88
|
+
loginLink = _ref.loginLink,
|
|
89
|
+
dashoardLink = _ref.dashoardLink;
|
|
90
|
+
if (Digit.UserService.hasAccess(role)) newObj === null || newObj === void 0 ? void 0 : (_newObj$links = newObj.links) === null || _newObj$links === void 0 ? void 0 : _newObj$links.push({
|
|
91
|
+
link: from,
|
|
92
|
+
i18nKey: t(dashoardLink)
|
|
93
|
+
});else newObj === null || newObj === void 0 ? void 0 : (_newObj$links2 = newObj.links) === null || _newObj$links2 === void 0 ? void 0 : _newObj$links2.push({
|
|
94
|
+
link: "/digit-ui/citizen/login",
|
|
95
|
+
state: {
|
|
96
|
+
role: "FSM_DSO",
|
|
97
|
+
from: from
|
|
98
|
+
},
|
|
99
|
+
i18nKey: t(loginLink)
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return newObj;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
var iconSelector = function iconSelector(code) {
|
|
108
|
+
switch (code) {
|
|
109
|
+
case "PT":
|
|
110
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.PTIcon, {
|
|
111
|
+
className: "fill-path-primary-main"
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
case "WS":
|
|
115
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.WSICon, {
|
|
116
|
+
className: "fill-path-primary-main"
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
case "FSM":
|
|
120
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.FSMIcon, {
|
|
121
|
+
className: "fill-path-primary-main"
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
case "MCollect":
|
|
125
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.MCollectIcon, {
|
|
126
|
+
className: "fill-path-primary-main"
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
case "PGR":
|
|
130
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.PGRIcon, {
|
|
131
|
+
className: "fill-path-primary-main"
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
case "TL":
|
|
135
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.TLIcon, {
|
|
136
|
+
className: "fill-path-primary-main"
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
case "OBPS":
|
|
140
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.OBPSIcon, {
|
|
141
|
+
className: "fill-path-primary-main"
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
case "Bills":
|
|
145
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.BillsIcon, {
|
|
146
|
+
className: "fill-path-primary-main"
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
default:
|
|
150
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.PTIcon, {
|
|
151
|
+
className: "fill-path-primary-main"
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
var CitizenHome = function CitizenHome(_ref2) {
|
|
157
|
+
var modules = _ref2.modules,
|
|
158
|
+
getCitizenMenu = _ref2.getCitizenMenu,
|
|
159
|
+
fetchedCitizen = _ref2.fetchedCitizen,
|
|
160
|
+
isLoading = _ref2.isLoading;
|
|
161
|
+
var paymentModule = modules.filter(function (_ref3) {
|
|
162
|
+
var code = _ref3.code;
|
|
163
|
+
return code === "Payment";
|
|
164
|
+
})[0];
|
|
165
|
+
var moduleArr = modules.filter(function (_ref4) {
|
|
166
|
+
var code = _ref4.code;
|
|
167
|
+
return code !== "Payment";
|
|
168
|
+
});
|
|
169
|
+
var moduleArray = [paymentModule].concat(moduleArr);
|
|
170
|
+
|
|
171
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
172
|
+
t = _useTranslation.t;
|
|
173
|
+
|
|
174
|
+
if (isLoading) {
|
|
175
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
179
|
+
className: "citizen-all-services-wrapper"
|
|
180
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.BackButton, null), /*#__PURE__*/React__default.createElement("div", {
|
|
181
|
+
className: "citizenAllServiceGrid"
|
|
182
|
+
}, moduleArray.filter(function (mod) {
|
|
183
|
+
return mod;
|
|
184
|
+
}).map(function (_ref5, index) {
|
|
185
|
+
var _mdmsDataObj, _mdmsDataObj$links;
|
|
186
|
+
|
|
187
|
+
var code = _ref5.code;
|
|
188
|
+
var mdmsDataObj;
|
|
189
|
+
if (fetchedCitizen) mdmsDataObj = fetchedCitizen ? processLinkData(getCitizenMenu, code, t) : undefined;
|
|
190
|
+
|
|
191
|
+
if (((_mdmsDataObj = mdmsDataObj) === null || _mdmsDataObj === void 0 ? void 0 : (_mdmsDataObj$links = _mdmsDataObj.links) === null || _mdmsDataObj$links === void 0 ? void 0 : _mdmsDataObj$links.length) > 0) {
|
|
192
|
+
var _mdmsDataObj2, _mdmsDataObj3, _mdmsDataObj3$links, _mdmsDataObj3$links$f;
|
|
193
|
+
|
|
194
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.CitizenHomeCard, {
|
|
195
|
+
header: t((_mdmsDataObj2 = mdmsDataObj) === null || _mdmsDataObj2 === void 0 ? void 0 : _mdmsDataObj2.header),
|
|
196
|
+
links: (_mdmsDataObj3 = mdmsDataObj) === null || _mdmsDataObj3 === void 0 ? void 0 : (_mdmsDataObj3$links = _mdmsDataObj3.links) === null || _mdmsDataObj3$links === void 0 ? void 0 : (_mdmsDataObj3$links$f = _mdmsDataObj3$links.filter(function (ele) {
|
|
197
|
+
return ele === null || ele === void 0 ? void 0 : ele.link;
|
|
198
|
+
})) === null || _mdmsDataObj3$links$f === void 0 ? void 0 : _mdmsDataObj3$links$f.sort(function (x, y) {
|
|
199
|
+
return (x === null || x === void 0 ? void 0 : x.orderNumber) - (y === null || y === void 0 ? void 0 : y.orderNumber);
|
|
200
|
+
}),
|
|
201
|
+
Icon: function Icon() {
|
|
202
|
+
return iconSelector(code);
|
|
203
|
+
},
|
|
204
|
+
Info: code === "OBPS" ? function () {
|
|
205
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.CitizenInfoLabel, {
|
|
206
|
+
style: {
|
|
207
|
+
margin: "0px",
|
|
208
|
+
padding: "10px"
|
|
209
|
+
},
|
|
210
|
+
info: t("CS_FILE_APPLICATION_INFO_LABEL"),
|
|
211
|
+
text: t("BPA_CITIZEN_HOME_STAKEHOLDER_INCLUDES_INFO_LABEL")
|
|
212
|
+
});
|
|
213
|
+
} : null,
|
|
214
|
+
isInfo: code === "OBPS" ? true : false
|
|
215
|
+
});
|
|
216
|
+
} else return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
217
|
+
}))));
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
var EmployeeHome = function EmployeeHome(_ref6) {
|
|
221
|
+
var modules = _ref6.modules;
|
|
222
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
223
|
+
className: "employee-app-container"
|
|
224
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
225
|
+
className: "ground-container moduleCardWrapper gridModuleWrapper"
|
|
226
|
+
}, modules.map(function (_ref7, index) {
|
|
227
|
+
var code = _ref7.code;
|
|
228
|
+
|
|
229
|
+
var Card = Digit.ComponentRegistryService.getComponent(code + "Card") || function () {
|
|
230
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
return /*#__PURE__*/React__default.createElement(Card, {
|
|
234
|
+
key: index
|
|
235
|
+
});
|
|
236
|
+
})));
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
var AppHome = function AppHome(_ref8) {
|
|
240
|
+
var userType = _ref8.userType,
|
|
241
|
+
modules = _ref8.modules,
|
|
242
|
+
getCitizenMenu = _ref8.getCitizenMenu,
|
|
243
|
+
fetchedCitizen = _ref8.fetchedCitizen,
|
|
244
|
+
isLoading = _ref8.isLoading;
|
|
245
|
+
|
|
246
|
+
if (userType === "citizen") {
|
|
247
|
+
return /*#__PURE__*/React__default.createElement(CitizenHome, {
|
|
248
|
+
modules: modules,
|
|
249
|
+
getCitizenMenu: getCitizenMenu,
|
|
250
|
+
fetchedCitizen: fetchedCitizen,
|
|
251
|
+
isLoading: isLoading
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
return /*#__PURE__*/React__default.createElement(EmployeeHome, {
|
|
256
|
+
modules: modules
|
|
257
|
+
});
|
|
258
|
+
};
|
|
259
|
+
|
|
135
260
|
var _iteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
|
|
136
261
|
var _asyncIteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator")) : "@@asyncIterator";
|
|
137
262
|
function _catch(body, recover) {
|
|
@@ -198,9 +323,10 @@ var SelectMobileNumber = function SelectMobileNumber(_ref) {
|
|
|
198
323
|
onSelect = _ref.onSelect,
|
|
199
324
|
mobileNumber = _ref.mobileNumber,
|
|
200
325
|
onMobileChange = _ref.onMobileChange,
|
|
201
|
-
config = _ref.config
|
|
326
|
+
config = _ref.config,
|
|
327
|
+
canSubmit = _ref.canSubmit;
|
|
202
328
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.FormStep, {
|
|
203
|
-
isDisabled: mobileNumber.length
|
|
329
|
+
isDisabled: !(mobileNumber.length === 10 && canSubmit),
|
|
204
330
|
onSelect: onSelect,
|
|
205
331
|
config: config,
|
|
206
332
|
t: t,
|
|
@@ -238,7 +364,8 @@ var SelectOtp = function SelectOtp(_ref) {
|
|
|
238
364
|
t = _ref.t,
|
|
239
365
|
error = _ref.error,
|
|
240
366
|
_ref$userType = _ref.userType,
|
|
241
|
-
userType = _ref$userType === void 0 ? "citizen" : _ref$userType
|
|
367
|
+
userType = _ref$userType === void 0 ? "citizen" : _ref$userType,
|
|
368
|
+
canSubmit = _ref.canSubmit;
|
|
242
369
|
|
|
243
370
|
var _useState = React.useState(30),
|
|
244
371
|
timeLeft = _useState[0],
|
|
@@ -268,7 +395,7 @@ var SelectOtp = function SelectOtp(_ref) {
|
|
|
268
395
|
onSelect: onSelect,
|
|
269
396
|
config: config,
|
|
270
397
|
t: t,
|
|
271
|
-
isDisabled: (otp === null || otp === void 0 ? void 0 : otp.length)
|
|
398
|
+
isDisabled: !((otp === null || otp === void 0 ? void 0 : otp.length) === 6 && canSubmit)
|
|
272
399
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.OTPInput, {
|
|
273
400
|
length: 6,
|
|
274
401
|
onChange: onOtpChange,
|
|
@@ -282,11 +409,13 @@ var SelectOtp = function SelectOtp(_ref) {
|
|
|
282
409
|
var SelectName = function SelectName(_ref) {
|
|
283
410
|
var config = _ref.config,
|
|
284
411
|
onSelect = _ref.onSelect,
|
|
285
|
-
t = _ref.t
|
|
412
|
+
t = _ref.t,
|
|
413
|
+
isDisabled = _ref.isDisabled;
|
|
286
414
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.FormStep, {
|
|
287
415
|
config: config,
|
|
288
416
|
onSelect: onSelect,
|
|
289
|
-
t: t
|
|
417
|
+
t: t,
|
|
418
|
+
isDisabled: isDisabled
|
|
290
419
|
});
|
|
291
420
|
};
|
|
292
421
|
|
|
@@ -359,6 +488,19 @@ var Login = function Login(_ref) {
|
|
|
359
488
|
setErrorTO = _useState6[1];
|
|
360
489
|
|
|
361
490
|
var searchParams = Digit.Hooks.useQueryParams();
|
|
491
|
+
|
|
492
|
+
var _useState7 = React.useState(false),
|
|
493
|
+
canSubmitName = _useState7[0],
|
|
494
|
+
setCanSubmitName = _useState7[1];
|
|
495
|
+
|
|
496
|
+
var _useState8 = React.useState(true),
|
|
497
|
+
canSubmitOtp = _useState8[0],
|
|
498
|
+
setCanSubmitOtp = _useState8[1];
|
|
499
|
+
|
|
500
|
+
var _useState9 = React.useState(true),
|
|
501
|
+
canSubmitNo = _useState9[0],
|
|
502
|
+
setCanSubmitNo = _useState9[1];
|
|
503
|
+
|
|
362
504
|
React.useEffect(function () {
|
|
363
505
|
var errorTimeout;
|
|
364
506
|
|
|
@@ -389,7 +531,14 @@ var Login = function Login(_ref) {
|
|
|
389
531
|
Digit.UserService.setUser(user);
|
|
390
532
|
setCitizenDetail(user === null || user === void 0 ? void 0 : user.info, user === null || user === void 0 ? void 0 : user.access_token, stateCode);
|
|
391
533
|
var redirectPath = ((_location$state2 = location.state) === null || _location$state2 === void 0 ? void 0 : _location$state2.from) || DEFAULT_REDIRECT_URL;
|
|
392
|
-
|
|
534
|
+
|
|
535
|
+
if (!Digit.ULBService.getCitizenCurrentTenant(true)) {
|
|
536
|
+
history.replace("/digit-ui/citizen/select-location", {
|
|
537
|
+
redirectBackTo: redirectPath
|
|
538
|
+
});
|
|
539
|
+
} else {
|
|
540
|
+
history.replace(redirectPath);
|
|
541
|
+
}
|
|
393
542
|
}, [user]);
|
|
394
543
|
var stepItems = React.useMemo(function () {
|
|
395
544
|
return loginSteps.map(function (step) {
|
|
@@ -424,6 +573,7 @@ var Login = function Login(_ref) {
|
|
|
424
573
|
|
|
425
574
|
var selectMobileNumber = function selectMobileNumber(mobileNumber) {
|
|
426
575
|
try {
|
|
576
|
+
setCanSubmitNo(false);
|
|
427
577
|
setParmas(_extends({}, params, mobileNumber));
|
|
428
578
|
|
|
429
579
|
var data = _extends({}, mobileNumber, {
|
|
@@ -444,13 +594,16 @@ var Login = function Login(_ref) {
|
|
|
444
594
|
if (!err) {
|
|
445
595
|
var _location$state3;
|
|
446
596
|
|
|
597
|
+
setCanSubmitNo(true);
|
|
447
598
|
history.replace(path + "/otp", {
|
|
448
599
|
from: getFromLocation(location.state, searchParams),
|
|
449
600
|
role: (_location$state3 = location.state) === null || _location$state3 === void 0 ? void 0 : _location$state3.role
|
|
450
601
|
});
|
|
451
602
|
return;
|
|
452
603
|
} else {
|
|
453
|
-
|
|
604
|
+
setCanSubmitNo(true);
|
|
605
|
+
|
|
606
|
+
if (!(location.state && location.state.role === "FSM_DSO")) {
|
|
454
607
|
history.push("/digit-ui/citizen/register/name", {
|
|
455
608
|
from: getFromLocation(location.state, searchParams),
|
|
456
609
|
data: data
|
|
@@ -461,6 +614,7 @@ var Login = function Login(_ref) {
|
|
|
461
614
|
if ((_location$state4 = location.state) !== null && _location$state4 !== void 0 && _location$state4.role) {
|
|
462
615
|
var _location$state5;
|
|
463
616
|
|
|
617
|
+
setCanSubmitNo(true);
|
|
464
618
|
setError(((_location$state5 = location.state) === null || _location$state5 === void 0 ? void 0 : _location$state5.role) === "FSM_DSO" ? t("ES_ERROR_DSO_LOGIN") : "User not registered.");
|
|
465
619
|
}
|
|
466
620
|
});
|
|
@@ -472,10 +626,14 @@ var Login = function Login(_ref) {
|
|
|
472
626
|
err = _ref3[1];
|
|
473
627
|
|
|
474
628
|
if (!err) {
|
|
629
|
+
setCanSubmitNo(true);
|
|
475
630
|
history.replace(path + "/otp", {
|
|
476
631
|
from: getFromLocation(location.state, searchParams)
|
|
477
632
|
});
|
|
633
|
+
return;
|
|
478
634
|
}
|
|
635
|
+
|
|
636
|
+
setCanSubmitNo(true);
|
|
479
637
|
});
|
|
480
638
|
}
|
|
481
639
|
}());
|
|
@@ -492,6 +650,7 @@ var Login = function Login(_ref) {
|
|
|
492
650
|
}, name);
|
|
493
651
|
|
|
494
652
|
setParmas(_extends({}, params, name));
|
|
653
|
+
setCanSubmitName(true);
|
|
495
654
|
return Promise.resolve(sendOtp({
|
|
496
655
|
otp: _extends({}, data, TYPE_REGISTER)
|
|
497
656
|
})).then(function (_ref4) {
|
|
@@ -499,9 +658,12 @@ var Login = function Login(_ref) {
|
|
|
499
658
|
err = _ref4[1];
|
|
500
659
|
|
|
501
660
|
if (res) {
|
|
661
|
+
setCanSubmitName(false);
|
|
502
662
|
history.replace(path + "/otp", {
|
|
503
663
|
from: getFromLocation(location.state, searchParams)
|
|
504
664
|
});
|
|
665
|
+
} else {
|
|
666
|
+
setCanSubmitName(false);
|
|
505
667
|
}
|
|
506
668
|
});
|
|
507
669
|
} catch (e) {
|
|
@@ -513,6 +675,7 @@ var Login = function Login(_ref) {
|
|
|
513
675
|
try {
|
|
514
676
|
return Promise.resolve(_catch(function () {
|
|
515
677
|
setIsOtpValid(true);
|
|
678
|
+
setCanSubmitOtp(false);
|
|
516
679
|
var mobileNumber = params.mobileNumber,
|
|
517
680
|
otp = params.otp,
|
|
518
681
|
name = params.name;
|
|
@@ -584,6 +747,7 @@ var Login = function Login(_ref) {
|
|
|
584
747
|
}
|
|
585
748
|
}();
|
|
586
749
|
}, function () {
|
|
750
|
+
setCanSubmitOtp(true);
|
|
587
751
|
setIsOtpValid(false);
|
|
588
752
|
}));
|
|
589
753
|
} catch (e) {
|
|
@@ -634,7 +798,9 @@ var Login = function Login(_ref) {
|
|
|
634
798
|
}));
|
|
635
799
|
};
|
|
636
800
|
|
|
637
|
-
return /*#__PURE__*/React__default.createElement(
|
|
801
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
802
|
+
className: "citizen-form-wrapper"
|
|
803
|
+
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Switch, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.AppContainer, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.BackButton, null), /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
638
804
|
path: "" + path,
|
|
639
805
|
exact: true
|
|
640
806
|
}, /*#__PURE__*/React__default.createElement(SelectMobileNumber, {
|
|
@@ -642,6 +808,7 @@ var Login = function Login(_ref) {
|
|
|
642
808
|
config: stepItems[0],
|
|
643
809
|
mobileNumber: params.mobileNumber || "",
|
|
644
810
|
onMobileChange: handleMobileChange,
|
|
811
|
+
canSubmit: canSubmitNo,
|
|
645
812
|
showRegisterLink: isUserRegistered && !((_location$state7 = location.state) !== null && _location$state7 !== void 0 && _location$state7.role),
|
|
646
813
|
t: t
|
|
647
814
|
})), /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
@@ -657,20 +824,22 @@ var Login = function Login(_ref) {
|
|
|
657
824
|
onSelect: selectOtp,
|
|
658
825
|
otp: params.otp,
|
|
659
826
|
error: isOtpValid,
|
|
827
|
+
canSubmit: canSubmitOtp,
|
|
660
828
|
t: t
|
|
661
829
|
})), /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
662
830
|
path: path + "/name"
|
|
663
831
|
}, /*#__PURE__*/React__default.createElement(SelectName, {
|
|
664
832
|
config: stepItems[2],
|
|
665
833
|
onSelect: selectName,
|
|
666
|
-
t: t
|
|
834
|
+
t: t,
|
|
835
|
+
isDisabled: canSubmitName
|
|
667
836
|
})), error && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
668
837
|
error: true,
|
|
669
838
|
label: error,
|
|
670
839
|
onClose: function onClose() {
|
|
671
840
|
return setError(null);
|
|
672
841
|
}
|
|
673
|
-
})));
|
|
842
|
+
}))));
|
|
674
843
|
};
|
|
675
844
|
|
|
676
845
|
var loginConfig = [{
|
|
@@ -1789,7 +1958,7 @@ var propTypes = createCommonjsModule(function (module) {
|
|
|
1789
1958
|
var Background = function Background(_ref) {
|
|
1790
1959
|
var children = _ref.children;
|
|
1791
1960
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1792
|
-
className: "banner"
|
|
1961
|
+
className: "banner banner-container"
|
|
1793
1962
|
}, children);
|
|
1794
1963
|
};
|
|
1795
1964
|
|
|
@@ -1882,13 +2051,13 @@ var Login$1 = function Login(_ref) {
|
|
|
1882
2051
|
if (user !== null && user !== void 0 && (_user$info3 = user.info) !== null && _user$info3 !== void 0 && _user$info3.roles && user !== null && user !== void 0 && (_user$info4 = user.info) !== null && _user$info4 !== void 0 && (_user$info4$roles = _user$info4.roles) !== null && _user$info4$roles !== void 0 && _user$info4$roles.every(function (e) {
|
|
1883
2052
|
return e.code === "NATADMIN";
|
|
1884
2053
|
})) {
|
|
1885
|
-
redirectPath = "/digit-ui/employee/
|
|
2054
|
+
redirectPath = "/digit-ui/employee/dss/landing/NURT_DASHBOARD";
|
|
1886
2055
|
}
|
|
1887
2056
|
|
|
1888
2057
|
if (user !== null && user !== void 0 && (_user$info5 = user.info) !== null && _user$info5 !== void 0 && _user$info5.roles && user !== null && user !== void 0 && (_user$info6 = user.info) !== null && _user$info6 !== void 0 && (_user$info6$roles = _user$info6.roles) !== null && _user$info6$roles !== void 0 && _user$info6$roles.every(function (e) {
|
|
1889
2058
|
return e.code === "STADMIN";
|
|
1890
2059
|
})) {
|
|
1891
|
-
redirectPath = "/digit-ui/employee/
|
|
2060
|
+
redirectPath = "/digit-ui/employee/dss/landing/home";
|
|
1892
2061
|
}
|
|
1893
2062
|
|
|
1894
2063
|
history.replace(redirectPath);
|
|
@@ -2662,13 +2831,23 @@ var AppModules = function AppModules(_ref) {
|
|
|
2662
2831
|
moduleCode: code,
|
|
2663
2832
|
userType: userType,
|
|
2664
2833
|
tenants: getTenants(tenants, appTenants)
|
|
2665
|
-
})) :
|
|
2834
|
+
})) : /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
2835
|
+
key: index,
|
|
2836
|
+
path: path + "/" + code.toLowerCase()
|
|
2837
|
+
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Redirect, {
|
|
2838
|
+
to: {
|
|
2839
|
+
pathname: "/digit-ui/employee/user/error?type=notfound",
|
|
2840
|
+
state: {
|
|
2841
|
+
from: location.pathname + location.search
|
|
2842
|
+
}
|
|
2843
|
+
}
|
|
2844
|
+
}));
|
|
2666
2845
|
});
|
|
2667
2846
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2668
2847
|
className: "ground-container"
|
|
2669
2848
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Switch, null, appRoutes, /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
2670
2849
|
path: path + "/login"
|
|
2671
|
-
},
|
|
2850
|
+
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Redirect, {
|
|
2672
2851
|
to: {
|
|
2673
2852
|
pathname: "/digit-ui/employee/user/login",
|
|
2674
2853
|
state: {
|
|
@@ -2679,12 +2858,63 @@ var AppModules = function AppModules(_ref) {
|
|
|
2679
2858
|
path: path + "/forgot-password"
|
|
2680
2859
|
}, /*#__PURE__*/React__default.createElement(EmployeeForgotPassword, null)), /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
2681
2860
|
path: path + "/change-password"
|
|
2682
|
-
},
|
|
2861
|
+
}, /*#__PURE__*/React__default.createElement(EmployeeChangePassword, null)), /*#__PURE__*/React__default.createElement(reactRouterDom.Route, null, /*#__PURE__*/React__default.createElement(AppHome, {
|
|
2683
2862
|
userType: userType,
|
|
2684
2863
|
modules: modules
|
|
2685
2864
|
}))));
|
|
2686
2865
|
};
|
|
2687
2866
|
|
|
2867
|
+
var ErrorConfig = {
|
|
2868
|
+
error: {
|
|
2869
|
+
imgUrl: "https://s3.ap-south-1.amazonaws.com/egov-qa-assets/error-image.png",
|
|
2870
|
+
infoMessage: "CORE_SOMETHING_WENT_WRONG",
|
|
2871
|
+
buttonInfo: "ACTION_TEST_HOME"
|
|
2872
|
+
},
|
|
2873
|
+
maintenance: {
|
|
2874
|
+
imgUrl: "https://s3.ap-south-1.amazonaws.com/egov-qa-assets/maintainence-image.png",
|
|
2875
|
+
infoMessage: "CORE_UNDER_MAINTENANCE",
|
|
2876
|
+
buttonInfo: "ACTION_TEST_HOME"
|
|
2877
|
+
},
|
|
2878
|
+
notfound: {
|
|
2879
|
+
imgUrl: "https://s3.ap-south-1.amazonaws.com/egov-qa-assets/PageNotFound.png",
|
|
2880
|
+
infoMessage: "CORE_NOT_FOUND",
|
|
2881
|
+
buttonInfo: "ACTION_TEST_HOME"
|
|
2882
|
+
}
|
|
2883
|
+
};
|
|
2884
|
+
|
|
2885
|
+
var ErrorComponent = function ErrorComponent(props) {
|
|
2886
|
+
var _Digit$Hooks$useQuery = Digit.Hooks.useQueryParams(),
|
|
2887
|
+
_Digit$Hooks$useQuery2 = _Digit$Hooks$useQuery.type,
|
|
2888
|
+
type = _Digit$Hooks$useQuery2 === void 0 ? "error" : _Digit$Hooks$useQuery2;
|
|
2889
|
+
|
|
2890
|
+
var config = ErrorConfig[type];
|
|
2891
|
+
|
|
2892
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
2893
|
+
t = _useTranslation.t;
|
|
2894
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
2895
|
+
className: "error-boundary"
|
|
2896
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2897
|
+
className: "error-container"
|
|
2898
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
2899
|
+
src: config.imgUrl,
|
|
2900
|
+
alt: "error"
|
|
2901
|
+
}), /*#__PURE__*/React__default.createElement("h1", null, t(config.infoMessage)), /*#__PURE__*/React__default.createElement("button", {
|
|
2902
|
+
onClick: function onClick() {
|
|
2903
|
+
props.goToHome();
|
|
2904
|
+
}
|
|
2905
|
+
}, t(config.buttonInfo))));
|
|
2906
|
+
};
|
|
2907
|
+
|
|
2908
|
+
var Redircter = function Redircter() {
|
|
2909
|
+
var path = Digit.UserService.getType() === "employee" ? "/digit-ui/employee/user/error" : "/digit-ui/citizen/error";
|
|
2910
|
+
|
|
2911
|
+
if (window.location.href.includes("employee/user/error") || window.location.href.includes("citizen/error") || process.env.NODE_ENV === "development") ; else {
|
|
2912
|
+
window.location.href = path;
|
|
2913
|
+
}
|
|
2914
|
+
|
|
2915
|
+
return /*#__PURE__*/React__default.createElement("span", null);
|
|
2916
|
+
};
|
|
2917
|
+
|
|
2688
2918
|
var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
2689
2919
|
_inheritsLoose(ErrorBoundary, _React$Component);
|
|
2690
2920
|
|
|
@@ -2720,16 +2950,11 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
2720
2950
|
|
|
2721
2951
|
_proto.render = function render() {
|
|
2722
2952
|
if (this.state.hasError) {
|
|
2723
|
-
var _this$state, _this$state2, _this$state3;
|
|
2724
|
-
|
|
2725
|
-
console.error("UI-error", (_this$state = this.state) === null || _this$state === void 0 ? void 0 : _this$state.error);
|
|
2726
2953
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2727
2954
|
className: "error-boundary"
|
|
2728
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
}
|
|
2732
|
-
}, ((_this$state2 = this.state) === null || _this$state2 === void 0 ? void 0 : _this$state2.errorStack) && this.state.errorStack.toString().substring(0, 600), (_this$state3 = this.state) === null || _this$state3 === void 0 ? void 0 : _this$state3.error));
|
|
2955
|
+
}, /*#__PURE__*/React__default.createElement(Redircter, null), /*#__PURE__*/React__default.createElement(ErrorComponent, {
|
|
2956
|
+
initData: this.props.initData
|
|
2957
|
+
}));
|
|
2733
2958
|
}
|
|
2734
2959
|
|
|
2735
2960
|
return this.props.children;
|
|
@@ -2910,11 +3135,13 @@ var ChangeLanguage = function ChangeLanguage(prop) {
|
|
|
2910
3135
|
};
|
|
2911
3136
|
|
|
2912
3137
|
var TextToImg = function TextToImg(props) {
|
|
3138
|
+
var _props$name, _props$name$;
|
|
3139
|
+
|
|
2913
3140
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
2914
3141
|
className: "user-img-txt",
|
|
2915
3142
|
onClick: props.toggleMenu,
|
|
2916
3143
|
title: props.name
|
|
2917
|
-
}, props.name[0]
|
|
3144
|
+
}, props === null || props === void 0 ? void 0 : (_props$name = props.name) === null || _props$name === void 0 ? void 0 : (_props$name$ = _props$name[0]) === null || _props$name$ === void 0 ? void 0 : _props$name$.toUpperCase());
|
|
2918
3145
|
};
|
|
2919
3146
|
|
|
2920
3147
|
var TopBar = function TopBar(_ref) {
|
|
@@ -3015,7 +3242,7 @@ var TopBar = function TopBar(_ref) {
|
|
|
3015
3242
|
};
|
|
3016
3243
|
|
|
3017
3244
|
if (CITIZEN) {
|
|
3018
|
-
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.TopBar, {
|
|
3245
|
+
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TopBar, {
|
|
3019
3246
|
img: stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.logoUrlWhite,
|
|
3020
3247
|
isMobile: true,
|
|
3021
3248
|
toggleSidebar: updateSidebar,
|
|
@@ -3026,8 +3253,11 @@ var TopBar = function TopBar(_ref) {
|
|
|
3026
3253
|
notificationCountLoaded: notificationCountLoaded,
|
|
3027
3254
|
cityOfCitizenShownBesideLogo: t(CitizenHomePageTenantId),
|
|
3028
3255
|
onNotificationIconClick: onNotificationIconClick,
|
|
3029
|
-
hideNotificationIconOnSomeUrlsWhenNotLoggedIn: urlsToDisableNotificationIcon(pathname)
|
|
3030
|
-
|
|
3256
|
+
hideNotificationIconOnSomeUrlsWhenNotLoggedIn: urlsToDisableNotificationIcon(pathname),
|
|
3257
|
+
changeLanguage: !mobileView ? /*#__PURE__*/React__default.createElement(ChangeLanguage, {
|
|
3258
|
+
dropdown: true
|
|
3259
|
+
}) : null
|
|
3260
|
+
}));
|
|
3031
3261
|
}
|
|
3032
3262
|
|
|
3033
3263
|
var loggedin = userDetails !== null && userDetails !== void 0 && userDetails.access_token ? true : false;
|
|
@@ -3110,10 +3340,8 @@ var SideBarMenu = function SideBarMenu(t, closeSidebar, redirectToLoginPage, isE
|
|
|
3110
3340
|
type: "link",
|
|
3111
3341
|
element: "HOME",
|
|
3112
3342
|
text: t("COMMON_BOTTOM_NAVIGATION_HOME"),
|
|
3113
|
-
link: isEmployee ? "/digit-ui/employee
|
|
3114
|
-
icon:
|
|
3115
|
-
className: "icon"
|
|
3116
|
-
}),
|
|
3343
|
+
link: isEmployee ? "/digit-ui/employee" : "/digit-ui/citizen",
|
|
3344
|
+
icon: "HomeIcon",
|
|
3117
3345
|
populators: {
|
|
3118
3346
|
onClick: closeSidebar
|
|
3119
3347
|
}
|
|
@@ -3121,11 +3349,9 @@ var SideBarMenu = function SideBarMenu(t, closeSidebar, redirectToLoginPage, isE
|
|
|
3121
3349
|
type: "component",
|
|
3122
3350
|
element: "LANGUAGE",
|
|
3123
3351
|
action: /*#__PURE__*/React__default.createElement(ChangeLanguage, null),
|
|
3124
|
-
icon:
|
|
3125
|
-
className: "icon"
|
|
3126
|
-
})
|
|
3352
|
+
icon: "LanguageIcon"
|
|
3127
3353
|
}, {
|
|
3128
|
-
id:
|
|
3354
|
+
id: "login-btn",
|
|
3129
3355
|
element: "LOGIN",
|
|
3130
3356
|
text: t("CORE_COMMON_LOGIN"),
|
|
3131
3357
|
icon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.LogoutIcon, {
|
|
@@ -3137,49 +3363,463 @@ var SideBarMenu = function SideBarMenu(t, closeSidebar, redirectToLoginPage, isE
|
|
|
3137
3363
|
}];
|
|
3138
3364
|
};
|
|
3139
3365
|
|
|
3140
|
-
var
|
|
3366
|
+
var Heading = function Heading(props) {
|
|
3367
|
+
return /*#__PURE__*/React__default.createElement("h1", {
|
|
3368
|
+
className: "heading-m"
|
|
3369
|
+
}, props.label);
|
|
3370
|
+
};
|
|
3141
3371
|
|
|
3142
|
-
var
|
|
3143
|
-
|
|
3144
|
-
|
|
3372
|
+
var Close = function Close() {
|
|
3373
|
+
return /*#__PURE__*/React__default.createElement("svg", {
|
|
3374
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3375
|
+
viewBox: "0 0 24 24",
|
|
3376
|
+
fill: "#FFFFFF"
|
|
3377
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
3378
|
+
d: "M0 0h24v24H0V0z",
|
|
3379
|
+
fill: "none"
|
|
3380
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
3381
|
+
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
3382
|
+
}));
|
|
3383
|
+
};
|
|
3145
3384
|
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3385
|
+
var CloseBtn = function CloseBtn(props) {
|
|
3386
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3387
|
+
onClick: props === null || props === void 0 ? void 0 : props.onClick,
|
|
3388
|
+
style: props !== null && props !== void 0 && props.isMobileView ? {
|
|
3389
|
+
padding: 5
|
|
3390
|
+
} : null
|
|
3391
|
+
}, props !== null && props !== void 0 && props.isMobileView ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CloseSvg, null) : /*#__PURE__*/React__default.createElement("div", {
|
|
3392
|
+
className: "icon-bg-secondary",
|
|
3393
|
+
style: {
|
|
3394
|
+
backgroundColor: '#505A5F'
|
|
3395
|
+
}
|
|
3396
|
+
}, " ", /*#__PURE__*/React__default.createElement(Close, null), " "));
|
|
3397
|
+
};
|
|
3149
3398
|
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3399
|
+
var LogoutDialog = function LogoutDialog(_ref) {
|
|
3400
|
+
var onSelect = _ref.onSelect,
|
|
3401
|
+
onCancel = _ref.onCancel,
|
|
3402
|
+
onDismiss = _ref.onDismiss;
|
|
3154
3403
|
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
return Promise.resolve(Digit.UserService.userSearch(tenant, {
|
|
3158
|
-
uuid: [uuid]
|
|
3159
|
-
}, {})).then(function (usersResponse) {
|
|
3160
|
-
if (usersResponse && usersResponse.user && usersResponse.user.length) {
|
|
3161
|
-
var _userDetails$photo;
|
|
3404
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
3405
|
+
t = _useTranslation.t;
|
|
3162
3406
|
|
|
3163
|
-
|
|
3164
|
-
var thumbs = userDetails === null || userDetails === void 0 ? void 0 : (_userDetails$photo = userDetails.photo) === null || _userDetails$photo === void 0 ? void 0 : _userDetails$photo.split(",");
|
|
3165
|
-
setProfilePic(thumbs === null || thumbs === void 0 ? void 0 : thumbs.at(0));
|
|
3166
|
-
}
|
|
3167
|
-
});
|
|
3168
|
-
}
|
|
3169
|
-
}();
|
|
3407
|
+
var mobileDeviceWidth = 780;
|
|
3170
3408
|
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3409
|
+
var _React$useState = React__default.useState(window.innerWidth <= mobileDeviceWidth),
|
|
3410
|
+
isMobileView = _React$useState[0],
|
|
3411
|
+
setIsMobileView = _React$useState[1];
|
|
3412
|
+
|
|
3413
|
+
var onResize = function onResize() {
|
|
3414
|
+
if (window.innerWidth <= mobileDeviceWidth) {
|
|
3415
|
+
if (!isMobileView) {
|
|
3416
|
+
setIsMobileView(true);
|
|
3417
|
+
}
|
|
3418
|
+
} else {
|
|
3419
|
+
if (isMobileView) {
|
|
3420
|
+
setIsMobileView(false);
|
|
3421
|
+
}
|
|
3174
3422
|
}
|
|
3175
|
-
}
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3423
|
+
};
|
|
3424
|
+
|
|
3425
|
+
React__default.useEffect(function () {
|
|
3426
|
+
window.addEventListener("resize", function () {
|
|
3427
|
+
onResize();
|
|
3428
|
+
});
|
|
3429
|
+
return function () {
|
|
3430
|
+
window.addEventListener("resize", function () {
|
|
3431
|
+
onResize();
|
|
3432
|
+
});
|
|
3433
|
+
};
|
|
3434
|
+
});
|
|
3435
|
+
return isMobileView ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
|
|
3436
|
+
popupStyles: {
|
|
3437
|
+
height: "174px",
|
|
3438
|
+
maxHeight: "174px",
|
|
3439
|
+
width: "324px",
|
|
3440
|
+
position: "absolute",
|
|
3441
|
+
top: "50%",
|
|
3442
|
+
left: "50%",
|
|
3443
|
+
transform: 'translate(-50%, -50%)'
|
|
3444
|
+
},
|
|
3445
|
+
popupModuleActionBarStyles: {
|
|
3446
|
+
display: "flex",
|
|
3447
|
+
flex: 1,
|
|
3448
|
+
justifyContent: "flex-start",
|
|
3449
|
+
width: "100%",
|
|
3450
|
+
position: "absolute",
|
|
3451
|
+
left: 0,
|
|
3452
|
+
bottom: 0,
|
|
3453
|
+
padding: "18px"
|
|
3454
|
+
},
|
|
3455
|
+
style: {
|
|
3456
|
+
flex: 1
|
|
3457
|
+
},
|
|
3458
|
+
popupModuleMianStyles: {
|
|
3459
|
+
padding: "18px"
|
|
3460
|
+
},
|
|
3461
|
+
headerBarMain: /*#__PURE__*/React__default.createElement(Heading, {
|
|
3462
|
+
label: t("CORE_LOGOUT_WEB_HEADER")
|
|
3463
|
+
}),
|
|
3464
|
+
headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn, {
|
|
3465
|
+
onClick: onDismiss,
|
|
3466
|
+
isMobileView: isMobileView
|
|
3467
|
+
}),
|
|
3468
|
+
actionCancelLabel: t("TL_COMMON_NO"),
|
|
3469
|
+
actionCancelOnSubmit: onCancel,
|
|
3470
|
+
actionSaveLabel: t("TL_COMMON_YES"),
|
|
3471
|
+
actionSaveOnSubmit: onSelect,
|
|
3472
|
+
formId: "modal-action"
|
|
3473
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, {
|
|
3474
|
+
style: {
|
|
3475
|
+
margin: 0
|
|
3476
|
+
}
|
|
3477
|
+
}, t("CORE_LOGOUT_MOBILE_CONFIRMATION_MESSAGE") + " "))) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
|
|
3478
|
+
popupModuleMianStyles: {
|
|
3479
|
+
paddingTop: "30px"
|
|
3480
|
+
},
|
|
3481
|
+
headerBarMain: /*#__PURE__*/React__default.createElement(Heading, {
|
|
3482
|
+
label: t("CORE_LOGOUT_WEB_HEADER")
|
|
3483
|
+
}),
|
|
3484
|
+
headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn, {
|
|
3485
|
+
onClick: onDismiss,
|
|
3486
|
+
isMobileView: false
|
|
3487
|
+
}),
|
|
3488
|
+
actionCancelLabel: t("CORE_LOGOUT_CANCEL"),
|
|
3489
|
+
actionCancelOnSubmit: onCancel,
|
|
3490
|
+
actionSaveLabel: t("CORE_LOGOUT_WEB_YES"),
|
|
3491
|
+
actionSaveOnSubmit: onSelect,
|
|
3492
|
+
formId: "modal-action"
|
|
3493
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, {
|
|
3494
|
+
style: {
|
|
3495
|
+
marginBottom: "54px",
|
|
3496
|
+
marginLeft: "8px",
|
|
3497
|
+
marginRight: "8px"
|
|
3498
|
+
}
|
|
3499
|
+
}, t("CORE_LOGOUT_WEB_CONFIRMATION_MESSAGE") + " ", /*#__PURE__*/React__default.createElement("strong", null, t("CORE_LOGOUT_MESSAGE"), "?"))));
|
|
3500
|
+
};
|
|
3501
|
+
|
|
3502
|
+
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+6FTi2nevCVwCjbugnXklX5fkfTldL8PEilUB1kfNyN1u9MME2sATr4lbuB7AjfLAuvsRm1A0g6gYRdcPAjvBlje" + "2Z8brI8OC68AcRdlCkwLohx2mcZMjw9q+LzarQurjtnwPYAydX08WecECO/u6Ad0GBdYG7jO5gB4Ap+PwKcA9ZT43dn4/W9TyiPAn4OAJaF7h3uwe8StSCddFdM3jqFa2LvnnB5zzhuuBBAj" + "Y4gi50cg694gnXhTYvfMdrjtcFZhrwE9r41gUem8IXWMC3LrBzxh+a0gRd1N1LOK7M0IUUGuggvEmHoStA2/MJh7MpupiDU4TzjhxdzLAoO4ouZvqVURbFMHQlZD6SUeWHoguZsSLUGegreh" + "A+FZFowPdUWTi6iMoZlIpGGUUXkDbjj/9ZOLqAQS/+GIKl5BQOCn/ycqpzkXSDm5dU7ZWkG7wUyGlcmm7g5Ux56AqirgoaJ7BeokPTDbp9CbVunjFxPrl7+HqnkrSq1Da7JX20f3dV8yJi6v" + "oO81mX8vV0mx3qUsZCPRfTlVRdz2EvdufYGDvNQvvwqHtmXd+a1ITinwNcXc+lT6JuzdT1XDyBn/x7wtX1HCQQdW9MXc8xArGrirowfLeUEbMqqq6f7TF1lfRdOuGNiGi6SpT+WxY06xUfNN" + "2wBfyE9I4tlm7w5hvOPDNJN3yNiLMipji6gE3chKhouoCtN5x3QlF0EZt8OW/8ougitqJQlk1aii7iFC9l0MvRReyao7xNjKML2Z/PuHlzhi5mFxljiZeiC9rPTEisNEMX9KYAwo5Xhi7qaA" + "3hamboYm7dG+NVrXhdaYDv5zFaQZsYrCtbbAGnjkQDX2+J1FXCwOsqWOpKoIQNTFdqYBWydxqNqUoG0pVpCS+H8kaJaGKErlIaXj7CRRE+gRWuKwW9YZ80oVOUgbpdT0zpnSZJTIiwCtJVelv" + "Xntr4P5j6BWfPb5Wcx84C4cq3hb11lco2u2Mdwp6XdJ/Ne3wb8DWdfiRenZaXrhLwOj4e+GQeHroy3YOspS7TlU28Wle2m2QUS0mqdcbrdNW+ZHsSsyK7tBfm0q/dWcv+Z3mytVx3t7KWulq" + "Ue6ilunu8jF8pFwgv1FXp3mUt35OtRbr7eM4u4Gs6vUBXgeuHc5kfE/cbvWZtkROLm1DMtLCy80tzsu2PRj0hTI8fvrQuvsjlJkyutszq+m423wHaLTyniy/XuiGZ84LuT+m5ZfNfRxyGs7L" + "XZOvia7VujatUwVTrIt+Q/Csc7Tuhe+BOakT10b4TuoiiJjvgU9emTO42PwEfBa+cuodKkuf42DXr1D3JpXz73Hnn0j10evHKe+nufgfUm+7B84sX9FfdEzXux2DBpWuKokkCqN/5pa/8pmvn" + "L+RGKCddCGmatiPyPB/+ekO/M/q/7uvbt22kTt3zEnXPzCV13T3Gel4/6NduDu66xRvlPNkM1RjjxUdv+4WhGx6TftD19Q/dfzpwcHO+rE3fAAAAAElFTkSuQmCC";
|
|
3503
|
+
|
|
3504
|
+
var Profile = function Profile(_ref) {
|
|
3505
|
+
var info = _ref.info,
|
|
3506
|
+
t = _ref.t;
|
|
3507
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3508
|
+
className: "profile-section"
|
|
3509
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3179
3510
|
className: "imageloader imageloader-loaded"
|
|
3180
3511
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
3181
3512
|
className: "img-responsive img-circle img-Profile",
|
|
3182
|
-
src:
|
|
3513
|
+
src: defaultImage
|
|
3514
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
3515
|
+
id: "profile-name",
|
|
3516
|
+
className: "label-container name-Profile"
|
|
3517
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3518
|
+
className: "label-text"
|
|
3519
|
+
}, " ", info === null || info === void 0 ? void 0 : info.name, " ")), /*#__PURE__*/React__default.createElement("div", {
|
|
3520
|
+
id: "profile-location",
|
|
3521
|
+
className: "label-container loc-Profile"
|
|
3522
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3523
|
+
className: "label-text"
|
|
3524
|
+
}, " ", info === null || info === void 0 ? void 0 : info.mobileNumber, " ")), (info === null || info === void 0 ? void 0 : info.emailId) && /*#__PURE__*/React__default.createElement("div", {
|
|
3525
|
+
id: "profile-emailid",
|
|
3526
|
+
className: "label-container loc-Profile"
|
|
3527
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3528
|
+
className: "label-text"
|
|
3529
|
+
}, " ", info.emailId, " ")), /*#__PURE__*/React__default.createElement("div", {
|
|
3530
|
+
className: "profile-divider"
|
|
3531
|
+
}), window.location.href.includes("/employee") && !window.location.href.includes("/employee/user/login") && !window.location.href.includes("employee/user/language-selection") && /*#__PURE__*/React__default.createElement(ChangeCity, {
|
|
3532
|
+
t: t,
|
|
3533
|
+
mobileView: true
|
|
3534
|
+
}));
|
|
3535
|
+
};
|
|
3536
|
+
|
|
3537
|
+
var IconsObject = {
|
|
3538
|
+
CommonPTIcon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.PTIcon, {
|
|
3539
|
+
className: "icon"
|
|
3540
|
+
}),
|
|
3541
|
+
OBPSIcon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.OBPSIcon, {
|
|
3542
|
+
className: "icon"
|
|
3543
|
+
}),
|
|
3544
|
+
propertyIcon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.PropertyHouse, {
|
|
3545
|
+
className: "icon"
|
|
3546
|
+
}),
|
|
3547
|
+
TLIcon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.CaseIcon, {
|
|
3548
|
+
className: "icon"
|
|
3549
|
+
}),
|
|
3550
|
+
PGRIcon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.PGRIcon, {
|
|
3551
|
+
className: "icon"
|
|
3552
|
+
}),
|
|
3553
|
+
FSMIcon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.FSMIcon, {
|
|
3554
|
+
className: "icon"
|
|
3555
|
+
}),
|
|
3556
|
+
WSIcon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.WSICon, {
|
|
3557
|
+
className: "icon"
|
|
3558
|
+
}),
|
|
3559
|
+
MCollectIcon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.MCollectIcon, {
|
|
3560
|
+
className: "icon"
|
|
3561
|
+
}),
|
|
3562
|
+
BillsIcon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.CollectionIcon, {
|
|
3563
|
+
className: "icon"
|
|
3564
|
+
}),
|
|
3565
|
+
BirthIcon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.BirthIcon, {
|
|
3566
|
+
className: "icon"
|
|
3567
|
+
}),
|
|
3568
|
+
DeathIcon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.DeathIcon, {
|
|
3569
|
+
className: "icon"
|
|
3570
|
+
}),
|
|
3571
|
+
FirenocIcon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.FirenocIcon, {
|
|
3572
|
+
className: "icon"
|
|
3573
|
+
}),
|
|
3574
|
+
HomeIcon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.HomeIcon, {
|
|
3575
|
+
className: "icon"
|
|
3576
|
+
}),
|
|
3577
|
+
EditPencilIcon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.EditPencilIcon, {
|
|
3578
|
+
className: "icon"
|
|
3579
|
+
}),
|
|
3580
|
+
LogoutIcon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.LogoutIcon, {
|
|
3581
|
+
className: "icon"
|
|
3582
|
+
}),
|
|
3583
|
+
Phone: /*#__PURE__*/React__default.createElement(digitUiReactComponents.Phone, {
|
|
3584
|
+
className: "icon"
|
|
3585
|
+
})
|
|
3586
|
+
};
|
|
3587
|
+
|
|
3588
|
+
var StaticCitizenSideBar = function StaticCitizenSideBar(_ref2) {
|
|
3589
|
+
var _Object$keys, _Object$keys$sort, _menuItems;
|
|
3590
|
+
|
|
3591
|
+
var linkData = _ref2.linkData,
|
|
3592
|
+
islinkDataLoading = _ref2.islinkDataLoading;
|
|
3593
|
+
|
|
3594
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
3595
|
+
t = _useTranslation.t;
|
|
3596
|
+
|
|
3597
|
+
var history = reactRouterDom.useHistory();
|
|
3598
|
+
var location = reactRouterDom.useLocation();
|
|
3599
|
+
var pathname = location.pathname;
|
|
3600
|
+
|
|
3601
|
+
var _Digit$Hooks$useStore = Digit.Hooks.useStore.getInitData(),
|
|
3602
|
+
storeData = _Digit$Hooks$useStore.data,
|
|
3603
|
+
isFetched = _Digit$Hooks$useStore.isFetched;
|
|
3604
|
+
|
|
3605
|
+
var _ref3 = storeData || {},
|
|
3606
|
+
stateInfo = _ref3.stateInfo;
|
|
3607
|
+
|
|
3608
|
+
var user = Digit.UserService.getUser();
|
|
3609
|
+
var isMobile = window.Digit.Utils.browser.isMobile();
|
|
3610
|
+
|
|
3611
|
+
var _useState = React.useState(false),
|
|
3612
|
+
isEmployee = _useState[0];
|
|
3613
|
+
|
|
3614
|
+
var _useState2 = React.useState(false),
|
|
3615
|
+
toggleSidebar = _useState2[1];
|
|
3616
|
+
|
|
3617
|
+
var _useState3 = React.useState(false),
|
|
3618
|
+
showDialog = _useState3[0],
|
|
3619
|
+
setShowDialog = _useState3[1];
|
|
3620
|
+
|
|
3621
|
+
var handleLogout = function handleLogout() {
|
|
3622
|
+
toggleSidebar(false);
|
|
3623
|
+
setShowDialog(true);
|
|
3624
|
+
};
|
|
3625
|
+
|
|
3626
|
+
var handleOnSubmit = function handleOnSubmit() {
|
|
3627
|
+
Digit.UserService.logout();
|
|
3628
|
+
setShowDialog(false);
|
|
3629
|
+
};
|
|
3630
|
+
|
|
3631
|
+
var handleOnCancel = function handleOnCancel() {
|
|
3632
|
+
setShowDialog(false);
|
|
3633
|
+
};
|
|
3634
|
+
|
|
3635
|
+
if (islinkDataLoading) {
|
|
3636
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
3637
|
+
}
|
|
3638
|
+
|
|
3639
|
+
var redirectToLoginPage = function redirectToLoginPage() {
|
|
3640
|
+
history.push("/digit-ui/citizen/login");
|
|
3641
|
+
};
|
|
3642
|
+
|
|
3643
|
+
var showProfilePage = function showProfilePage() {
|
|
3644
|
+
history.push("/digit-ui/citizen/user/profile");
|
|
3645
|
+
};
|
|
3646
|
+
|
|
3647
|
+
var menuItems = [].concat(SideBarMenu(t, showProfilePage, redirectToLoginPage, isEmployee));
|
|
3648
|
+
menuItems = menuItems.filter(function (item) {
|
|
3649
|
+
return item.element !== "LANGUAGE";
|
|
3650
|
+
});
|
|
3651
|
+
var tenantId = Digit.ULBService.getCurrentTenantId();
|
|
3652
|
+
|
|
3653
|
+
var MenuItem = function MenuItem(_ref4) {
|
|
3654
|
+
var _item$icon, _item$icon$type;
|
|
3655
|
+
|
|
3656
|
+
var item = _ref4.item;
|
|
3657
|
+
var leftIconArray = (item === null || item === void 0 ? void 0 : item.icon) || ((_item$icon = item.icon) === null || _item$icon === void 0 ? void 0 : (_item$icon$type = _item$icon.type) === null || _item$icon$type === void 0 ? void 0 : _item$icon$type.name);
|
|
3658
|
+
var leftIcon = leftIconArray ? IconsObject[leftIconArray] : IconsObject.BillsIcon;
|
|
3659
|
+
var itemComponent;
|
|
3660
|
+
|
|
3661
|
+
if (item.type === "component") {
|
|
3662
|
+
itemComponent = item.action;
|
|
3663
|
+
} else {
|
|
3664
|
+
itemComponent = item.text;
|
|
3665
|
+
}
|
|
3666
|
+
|
|
3667
|
+
var Item = function Item() {
|
|
3668
|
+
return /*#__PURE__*/React__default.createElement("span", _extends({
|
|
3669
|
+
className: "menu-item"
|
|
3670
|
+
}, item.populators), leftIcon, /*#__PURE__*/React__default.createElement("div", {
|
|
3671
|
+
className: "menu-label"
|
|
3672
|
+
}, itemComponent));
|
|
3673
|
+
};
|
|
3674
|
+
|
|
3675
|
+
if (item.type === "external-link") {
|
|
3676
|
+
return /*#__PURE__*/React__default.createElement("a", {
|
|
3677
|
+
href: item.link
|
|
3678
|
+
}, /*#__PURE__*/React__default.createElement(Item, null));
|
|
3679
|
+
}
|
|
3680
|
+
|
|
3681
|
+
if (item.type === "link") {
|
|
3682
|
+
return /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
3683
|
+
to: item === null || item === void 0 ? void 0 : item.link
|
|
3684
|
+
}, /*#__PURE__*/React__default.createElement(Item, null));
|
|
3685
|
+
}
|
|
3686
|
+
|
|
3687
|
+
return /*#__PURE__*/React__default.createElement(Item, null);
|
|
3688
|
+
};
|
|
3689
|
+
|
|
3690
|
+
var profileItem;
|
|
3691
|
+
|
|
3692
|
+
if (isFetched && user && user.access_token) {
|
|
3693
|
+
profileItem = /*#__PURE__*/React__default.createElement(Profile, {
|
|
3694
|
+
info: user === null || user === void 0 ? void 0 : user.info,
|
|
3695
|
+
stateName: stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.name,
|
|
3696
|
+
t: t
|
|
3697
|
+
});
|
|
3698
|
+
menuItems = menuItems.filter(function (item) {
|
|
3699
|
+
return (item === null || item === void 0 ? void 0 : item.id) !== "login-btn";
|
|
3700
|
+
});
|
|
3701
|
+
menuItems = [].concat(menuItems, [{
|
|
3702
|
+
text: t("EDIT_PROFILE"),
|
|
3703
|
+
element: "PROFILE",
|
|
3704
|
+
icon: "EditPencilIcon",
|
|
3705
|
+
populators: {
|
|
3706
|
+
onClick: showProfilePage
|
|
3707
|
+
}
|
|
3708
|
+
}, {
|
|
3709
|
+
text: t("CORE_COMMON_LOGOUT"),
|
|
3710
|
+
element: "LOGOUT",
|
|
3711
|
+
icon: "LogoutIcon",
|
|
3712
|
+
populators: {
|
|
3713
|
+
onClick: handleLogout
|
|
3714
|
+
}
|
|
3715
|
+
}, {
|
|
3716
|
+
text: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, t("CS_COMMON_HELPLINE"), /*#__PURE__*/React__default.createElement("div", {
|
|
3717
|
+
className: "telephone",
|
|
3718
|
+
style: {
|
|
3719
|
+
marginTop: "-10%"
|
|
3720
|
+
}
|
|
3721
|
+
}, storeData === null || storeData === void 0 ? void 0 : storeData.tenants.map(function (i) {
|
|
3722
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
3723
|
+
className: "link"
|
|
3724
|
+
}, /*#__PURE__*/React__default.createElement("a", {
|
|
3725
|
+
href: "tel:" + (storeData === null || storeData === void 0 ? void 0 : storeData.tenants[0].contactNumber)
|
|
3726
|
+
}, storeData === null || storeData === void 0 ? void 0 : storeData.tenants[0].contactNumber)))),
|
|
3727
|
+
element: "Helpline",
|
|
3728
|
+
icon: "Phone"
|
|
3729
|
+
}]);
|
|
3730
|
+
}
|
|
3731
|
+
|
|
3732
|
+
(_Object$keys = Object.keys(linkData)) === null || _Object$keys === void 0 ? void 0 : (_Object$keys$sort = _Object$keys.sort(function (x, y) {
|
|
3733
|
+
return y.localeCompare(x);
|
|
3734
|
+
})) === null || _Object$keys$sort === void 0 ? void 0 : _Object$keys$sort.map(function (key) {
|
|
3735
|
+
var _linkData$key$;
|
|
3736
|
+
|
|
3737
|
+
if (((_linkData$key$ = linkData[key][0]) === null || _linkData$key$ === void 0 ? void 0 : _linkData$key$.sidebar) === "digit-ui-links") {
|
|
3738
|
+
var _linkData$key$2, _linkData$key$2$sideb, _linkData$key$3, _linkData$key$4;
|
|
3739
|
+
|
|
3740
|
+
menuItems.splice(1, 0, {
|
|
3741
|
+
type: (_linkData$key$2 = linkData[key][0]) !== null && _linkData$key$2 !== void 0 && (_linkData$key$2$sideb = _linkData$key$2.sidebarURL) !== null && _linkData$key$2$sideb !== void 0 && _linkData$key$2$sideb.includes("digit-ui") ? "link" : "external-link",
|
|
3742
|
+
text: t("ACTION_TEST_" + Digit.Utils.locale.getTransformedLocale(key)),
|
|
3743
|
+
links: linkData[key],
|
|
3744
|
+
icon: (_linkData$key$3 = linkData[key][0]) === null || _linkData$key$3 === void 0 ? void 0 : _linkData$key$3.leftIcon,
|
|
3745
|
+
link: (_linkData$key$4 = linkData[key][0]) === null || _linkData$key$4 === void 0 ? void 0 : _linkData$key$4.sidebarURL
|
|
3746
|
+
});
|
|
3747
|
+
}
|
|
3748
|
+
});
|
|
3749
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
3750
|
+
style: {
|
|
3751
|
+
height: "100%",
|
|
3752
|
+
width: "100%",
|
|
3753
|
+
top: "0px",
|
|
3754
|
+
backgroundColor: "rgba(0, 0, 0, 0.54)",
|
|
3755
|
+
pointerzevents: "auto"
|
|
3756
|
+
}
|
|
3757
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
3758
|
+
style: {
|
|
3759
|
+
display: "flex",
|
|
3760
|
+
flexDirection: "column",
|
|
3761
|
+
height: isMobile ? "calc(100vh - 56px)" : "auto",
|
|
3762
|
+
zIndex: "99"
|
|
3763
|
+
}
|
|
3764
|
+
}, profileItem, /*#__PURE__*/React__default.createElement("div", {
|
|
3765
|
+
className: "drawer-desktop"
|
|
3766
|
+
}, (_menuItems = menuItems) === null || _menuItems === void 0 ? void 0 : _menuItems.map(function (item, index) {
|
|
3767
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3768
|
+
className: "sidebar-list " + (pathname === (item === null || item === void 0 ? void 0 : item.link) || pathname === (item === null || item === void 0 ? void 0 : item.sidebarURL) ? "active" : ""),
|
|
3769
|
+
key: index
|
|
3770
|
+
}, /*#__PURE__*/React__default.createElement(MenuItem, {
|
|
3771
|
+
item: item
|
|
3772
|
+
}));
|
|
3773
|
+
}))), /*#__PURE__*/React__default.createElement("div", null, showDialog && /*#__PURE__*/React__default.createElement(LogoutDialog, {
|
|
3774
|
+
onSelect: handleOnSubmit,
|
|
3775
|
+
onCancel: handleOnCancel,
|
|
3776
|
+
onDismiss: handleOnCancel
|
|
3777
|
+
}))));
|
|
3778
|
+
};
|
|
3779
|
+
|
|
3780
|
+
var defaultImage$1 = "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+6FTi2nevCVwCjbugnXklX5fkfTldL8PEilUB1kfNyN1u9MME2sATr4lbuB7AjfLAuvsRm1A0g6gYRdcPAjvBlje" + "2Z8brI8OC68AcRdlCkwLohx2mcZMjw9q+LzarQurjtnwPYAydX08WecECO/u6Ad0GBdYG7jO5gB4Ap+PwKcA9ZT43dn4/W9TyiPAn4OAJaF7h3uwe8StSCddFdM3jqFa2LvnnB5zzhuuBBAj" + "Y4gi50cg694gnXhTYvfMdrjtcFZhrwE9r41gUem8IXWMC3LrBzxh+a0gRd1N1LOK7M0IUUGuggvEmHoStA2/MJh7MpupiDU4TzjhxdzLAoO4ouZvqVURbFMHQlZD6SUeWHoguZsSLUGegreh" + "A+FZFowPdUWTi6iMoZlIpGGUUXkDbjj/9ZOLqAQS/+GIKl5BQOCn/ycqpzkXSDm5dU7ZWkG7wUyGlcmm7g5Ux56AqirgoaJ7BeokPTDbp9CbVunjFxPrl7+HqnkrSq1Da7JX20f3dV8yJi6v" + "oO81mX8vV0mx3qUsZCPRfTlVRdz2EvdufYGDvNQvvwqHtmXd+a1ITinwNcXc+lT6JuzdT1XDyBn/x7wtX1HCQQdW9MXc8xArGrirowfLeUEbMqqq6f7TF1lfRdOuGNiGi6SpT+WxY06xUfNN" + "2wBfyE9I4tlm7w5hvOPDNJN3yNiLMipji6gE3chKhouoCtN5x3QlF0EZt8OW/8ougitqJQlk1aii7iFC9l0MvRReyao7xNjKML2Z/PuHlzhi5mFxljiZeiC9rPTEisNEMX9KYAwo5Xhi7qaA" + "3hamboYm7dG+NVrXhdaYDv5zFaQZsYrCtbbAGnjkQDX2+J1FXCwOsqWOpKoIQNTFdqYBWydxqNqUoG0pVpCS+H8kaJaGKErlIaXj7CRRE+gRWuKwW9YZ80oVOUgbpdT0zpnSZJTIiwCtJVelv" + "Xntr4P5j6BWfPb5Wcx84C4cq3hb11lco2u2Mdwp6XdJ/Ne3wb8DWdfiRenZaXrhLwOj4e+GQeHroy3YOspS7TlU28Wle2m2QUS0mqdcbrdNW+ZHsSsyK7tBfm0q/dWcv+Z3mytVx3t7KWulq" + "Ue6ilunu8jF8pFwgv1FXp3mUt35OtRbr7eM4u4Gs6vUBXgeuHc5kfE/cbvWZtkROLm1DMtLCy80tzsu2PRj0hTI8fvrQuvsjlJkyutszq+m423wHaLTyniy/XuiGZ84LuT+m5ZfNfRxyGs7L" + "XZOvia7VujatUwVTrIt+Q/Csc7Tuhe+BOakT10b4TuoiiJjvgU9emTO42PwEfBa+cuodKkuf42DXr1D3JpXz73Hnn0j10evHKe+nufgfUm+7B84sX9FfdEzXux2DBpWuKokkCqN/5pa/8pmvn" + "L+RGKCddCGmatiPyPB/+ekO/M/q/7uvbt22kTt3zEnXPzCV13T3Gel4/6NduDu66xRvlPNkM1RjjxUdv+4WhGx6TftD19Q/dfzpwcHO+rE3fAAAAAElFTkSuQmCC";
|
|
3781
|
+
|
|
3782
|
+
var Profile$1 = function Profile(_ref) {
|
|
3783
|
+
var info = _ref.info,
|
|
3784
|
+
t = _ref.t;
|
|
3785
|
+
|
|
3786
|
+
var _React$useState = React__default.useState(null),
|
|
3787
|
+
profilePic = _React$useState[0],
|
|
3788
|
+
setProfilePic = _React$useState[1];
|
|
3789
|
+
|
|
3790
|
+
React__default.useEffect(function () {
|
|
3791
|
+
try {
|
|
3792
|
+
var tenant = Digit.ULBService.getCurrentTenantId();
|
|
3793
|
+
var uuid = info === null || info === void 0 ? void 0 : info.uuid;
|
|
3794
|
+
|
|
3795
|
+
var _temp2 = function () {
|
|
3796
|
+
if (uuid) {
|
|
3797
|
+
return Promise.resolve(Digit.UserService.userSearch(tenant, {
|
|
3798
|
+
uuid: [uuid]
|
|
3799
|
+
}, {})).then(function (usersResponse) {
|
|
3800
|
+
if (usersResponse && usersResponse.user && usersResponse.user.length) {
|
|
3801
|
+
var _userDetails$photo;
|
|
3802
|
+
|
|
3803
|
+
var userDetails = usersResponse.user[0];
|
|
3804
|
+
var thumbs = userDetails === null || userDetails === void 0 ? void 0 : (_userDetails$photo = userDetails.photo) === null || _userDetails$photo === void 0 ? void 0 : _userDetails$photo.split(",");
|
|
3805
|
+
setProfilePic(thumbs === null || thumbs === void 0 ? void 0 : thumbs.at(0));
|
|
3806
|
+
}
|
|
3807
|
+
});
|
|
3808
|
+
}
|
|
3809
|
+
}();
|
|
3810
|
+
|
|
3811
|
+
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
|
|
3812
|
+
} catch (e) {
|
|
3813
|
+
return Promise.reject(e);
|
|
3814
|
+
}
|
|
3815
|
+
}, [profilePic !== null]);
|
|
3816
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3817
|
+
className: "profile-section"
|
|
3818
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3819
|
+
className: "imageloader imageloader-loaded"
|
|
3820
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
3821
|
+
className: "img-responsive img-circle img-Profile",
|
|
3822
|
+
src: profilePic ? profilePic : defaultImage$1,
|
|
3183
3823
|
style: {
|
|
3184
3824
|
objectFit: "cover",
|
|
3185
3825
|
objectPosition: "center"
|
|
@@ -3199,7 +3839,9 @@ var Profile = function Profile(_ref) {
|
|
|
3199
3839
|
className: "label-container loc-Profile"
|
|
3200
3840
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3201
3841
|
className: "label-text"
|
|
3202
|
-
}, " ", info.emailId, " ")),
|
|
3842
|
+
}, " ", info.emailId, " ")), /*#__PURE__*/React__default.createElement("div", {
|
|
3843
|
+
className: "profile-divider"
|
|
3844
|
+
}), window.location.href.includes("/employee") && !window.location.href.includes("/employee/user/login") && !window.location.href.includes("employee/user/language-selection") && /*#__PURE__*/React__default.createElement(ChangeCity, {
|
|
3203
3845
|
t: t,
|
|
3204
3846
|
mobileView: true
|
|
3205
3847
|
}));
|
|
@@ -3209,7 +3851,10 @@ var PoweredBy = function PoweredBy() {
|
|
|
3209
3851
|
var _window, _window$globalConfigs, _window$globalConfigs2;
|
|
3210
3852
|
|
|
3211
3853
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
3212
|
-
className: "digit-footer"
|
|
3854
|
+
className: "digit-footer",
|
|
3855
|
+
style: {
|
|
3856
|
+
marginBottom: 0
|
|
3857
|
+
}
|
|
3213
3858
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
3214
3859
|
alt: "Powered by DIGIT",
|
|
3215
3860
|
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"),
|
|
@@ -3226,10 +3871,14 @@ var PoweredBy = function PoweredBy() {
|
|
|
3226
3871
|
|
|
3227
3872
|
var CitizenSideBar = function CitizenSideBar(_ref2) {
|
|
3228
3873
|
var isOpen = _ref2.isOpen,
|
|
3874
|
+
_ref2$isMobile = _ref2.isMobile,
|
|
3875
|
+
isMobile = _ref2$isMobile === void 0 ? false : _ref2$isMobile,
|
|
3229
3876
|
toggleSidebar = _ref2.toggleSidebar,
|
|
3230
3877
|
onLogout = _ref2.onLogout,
|
|
3231
3878
|
_ref2$isEmployee = _ref2.isEmployee,
|
|
3232
|
-
isEmployee = _ref2$isEmployee === void 0 ? false : _ref2$isEmployee
|
|
3879
|
+
isEmployee = _ref2$isEmployee === void 0 ? false : _ref2$isEmployee,
|
|
3880
|
+
linkData = _ref2.linkData,
|
|
3881
|
+
islinkDataLoading = _ref2.islinkDataLoading;
|
|
3233
3882
|
|
|
3234
3883
|
var _Digit$Hooks$useStore = Digit.Hooks.useStore.getInitData(),
|
|
3235
3884
|
storeData = _Digit$Hooks$useStore.data,
|
|
@@ -3240,6 +3889,10 @@ var CitizenSideBar = function CitizenSideBar(_ref2) {
|
|
|
3240
3889
|
|
|
3241
3890
|
var user = Digit.UserService.getUser();
|
|
3242
3891
|
|
|
3892
|
+
var _useState = React.useState(""),
|
|
3893
|
+
search = _useState[0],
|
|
3894
|
+
setSearch = _useState[1];
|
|
3895
|
+
|
|
3243
3896
|
var _useTranslation = reactI18next.useTranslation(),
|
|
3244
3897
|
t = _useTranslation.t;
|
|
3245
3898
|
|
|
@@ -3250,6 +3903,10 @@ var CitizenSideBar = function CitizenSideBar(_ref2) {
|
|
|
3250
3903
|
toggleSidebar(false);
|
|
3251
3904
|
};
|
|
3252
3905
|
|
|
3906
|
+
var _Digit$Hooks$useAcces = Digit.Hooks.useAccessControl(),
|
|
3907
|
+
isLoading = _Digit$Hooks$useAcces.isLoading,
|
|
3908
|
+
data = _Digit$Hooks$useAcces.data;
|
|
3909
|
+
|
|
3253
3910
|
var tenantId = Digit.ULBService.getCurrentTenantId();
|
|
3254
3911
|
|
|
3255
3912
|
var showProfilePage = function showProfilePage() {
|
|
@@ -3263,11 +3920,15 @@ var CitizenSideBar = function CitizenSideBar(_ref2) {
|
|
|
3263
3920
|
closeSidebar();
|
|
3264
3921
|
};
|
|
3265
3922
|
|
|
3923
|
+
if (islinkDataLoading || isLoading) {
|
|
3924
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
3925
|
+
}
|
|
3926
|
+
|
|
3266
3927
|
var menuItems = [].concat(SideBarMenu(t, closeSidebar, redirectToLoginPage, isEmployee));
|
|
3267
3928
|
var profileItem;
|
|
3268
3929
|
|
|
3269
3930
|
if (isFetched && user && user.access_token) {
|
|
3270
|
-
profileItem = /*#__PURE__*/React__default.createElement(Profile, {
|
|
3931
|
+
profileItem = /*#__PURE__*/React__default.createElement(Profile$1, {
|
|
3271
3932
|
info: user === null || user === void 0 ? void 0 : user.info,
|
|
3272
3933
|
stateName: stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.name,
|
|
3273
3934
|
t: t
|
|
@@ -3278,20 +3939,14 @@ var CitizenSideBar = function CitizenSideBar(_ref2) {
|
|
|
3278
3939
|
menuItems = [].concat(menuItems, [{
|
|
3279
3940
|
text: t("EDIT_PROFILE"),
|
|
3280
3941
|
element: "PROFILE",
|
|
3281
|
-
icon:
|
|
3282
|
-
className: "icon edit-btn-ico",
|
|
3283
|
-
width: "16",
|
|
3284
|
-
height: "16"
|
|
3285
|
-
}),
|
|
3942
|
+
icon: "EditPencilIcon",
|
|
3286
3943
|
populators: {
|
|
3287
3944
|
onClick: showProfilePage
|
|
3288
3945
|
}
|
|
3289
3946
|
}, {
|
|
3290
3947
|
text: t("CORE_COMMON_LOGOUT"),
|
|
3291
3948
|
element: "LOGOUT",
|
|
3292
|
-
icon:
|
|
3293
|
-
className: "icon"
|
|
3294
|
-
}),
|
|
3949
|
+
icon: "LogoutIcon",
|
|
3295
3950
|
populators: {
|
|
3296
3951
|
onClick: onLogout
|
|
3297
3952
|
}
|
|
@@ -3308,12 +3963,98 @@ var CitizenSideBar = function CitizenSideBar(_ref2) {
|
|
|
3308
3963
|
href: "tel:" + (storeData === null || storeData === void 0 ? void 0 : storeData.tenants[0].contactNumber)
|
|
3309
3964
|
}, storeData === null || storeData === void 0 ? void 0 : storeData.tenants[0].contactNumber)))),
|
|
3310
3965
|
element: "Helpline",
|
|
3311
|
-
icon:
|
|
3312
|
-
className: "icon"
|
|
3313
|
-
})
|
|
3966
|
+
icon: "Phone"
|
|
3314
3967
|
}]);
|
|
3315
3968
|
}
|
|
3316
3969
|
|
|
3970
|
+
var configEmployeeSideBar = {};
|
|
3971
|
+
|
|
3972
|
+
if (!isEmployee) {
|
|
3973
|
+
var _Object$keys, _Object$keys$sort;
|
|
3974
|
+
|
|
3975
|
+
(_Object$keys = Object.keys(linkData)) === null || _Object$keys === void 0 ? void 0 : (_Object$keys$sort = _Object$keys.sort(function (x, y) {
|
|
3976
|
+
return y.localeCompare(x);
|
|
3977
|
+
})) === null || _Object$keys$sort === void 0 ? void 0 : _Object$keys$sort.map(function (key) {
|
|
3978
|
+
var _linkData$key$, _linkData$key$2, _linkData$key$2$sideb, _linkData$key$3, _linkData$key$4;
|
|
3979
|
+
|
|
3980
|
+
if (((_linkData$key$ = linkData[key][0]) === null || _linkData$key$ === void 0 ? void 0 : _linkData$key$.sidebar) === "digit-ui-links") menuItems.splice(1, 0, {
|
|
3981
|
+
type: (_linkData$key$2 = linkData[key][0]) !== null && _linkData$key$2 !== void 0 && (_linkData$key$2$sideb = _linkData$key$2.sidebarURL) !== null && _linkData$key$2$sideb !== void 0 && _linkData$key$2$sideb.includes("digit-ui") ? "link" : "external-link",
|
|
3982
|
+
text: t("ACTION_TEST_" + Digit.Utils.locale.getTransformedLocale(key)),
|
|
3983
|
+
links: linkData[key],
|
|
3984
|
+
icon: (_linkData$key$3 = linkData[key][0]) === null || _linkData$key$3 === void 0 ? void 0 : _linkData$key$3.leftIcon,
|
|
3985
|
+
link: (_linkData$key$4 = linkData[key][0]) === null || _linkData$key$4 === void 0 ? void 0 : _linkData$key$4.sidebarURL
|
|
3986
|
+
});
|
|
3987
|
+
});
|
|
3988
|
+
} else {
|
|
3989
|
+
(function () {
|
|
3990
|
+
data === null || data === void 0 ? void 0 : data.actions.filter(function (e) {
|
|
3991
|
+
return e.url === "url" && e.displayName !== "Home";
|
|
3992
|
+
}).forEach(function (item) {
|
|
3993
|
+
var _item$displayName;
|
|
3994
|
+
|
|
3995
|
+
if (search == "" && item.path !== "") {
|
|
3996
|
+
var index = item.path.split(".")[0];
|
|
3997
|
+
if (index === "TradeLicense") index = "Trade License";
|
|
3998
|
+
|
|
3999
|
+
if (!configEmployeeSideBar[index]) {
|
|
4000
|
+
configEmployeeSideBar[index] = [item];
|
|
4001
|
+
} else {
|
|
4002
|
+
configEmployeeSideBar[index].push(item);
|
|
4003
|
+
}
|
|
4004
|
+
} else if (item.path !== "" && item !== null && item !== void 0 && (_item$displayName = item.displayName) !== null && _item$displayName !== void 0 && _item$displayName.toLowerCase().includes(search.toLowerCase())) {
|
|
4005
|
+
var _index = item.path.split(".")[0];
|
|
4006
|
+
if (_index === "TradeLicense") _index = "Trade License";
|
|
4007
|
+
|
|
4008
|
+
if (!configEmployeeSideBar[_index]) {
|
|
4009
|
+
configEmployeeSideBar[_index] = [item];
|
|
4010
|
+
} else {
|
|
4011
|
+
configEmployeeSideBar[_index].push(item);
|
|
4012
|
+
}
|
|
4013
|
+
}
|
|
4014
|
+
});
|
|
4015
|
+
var keys = Object.keys(configEmployeeSideBar);
|
|
4016
|
+
|
|
4017
|
+
var _loop = function _loop(i) {
|
|
4018
|
+
var _configEmployeeSideBa, _configEmployeeSideBa2, _configEmployeeSideBa3, _keys$i, _keys$i$toUpperCase;
|
|
4019
|
+
|
|
4020
|
+
var getSingleDisplayName = (_configEmployeeSideBa = configEmployeeSideBar[keys[i]][0]) === null || _configEmployeeSideBa === void 0 ? void 0 : (_configEmployeeSideBa2 = _configEmployeeSideBa.displayName) === null || _configEmployeeSideBa2 === void 0 ? void 0 : (_configEmployeeSideBa3 = _configEmployeeSideBa2.toUpperCase()) === null || _configEmployeeSideBa3 === void 0 ? void 0 : _configEmployeeSideBa3.replace(/[ -]/g, "_");
|
|
4021
|
+
var getParentDisplayName = (_keys$i = keys[i]) === null || _keys$i === void 0 ? void 0 : (_keys$i$toUpperCase = _keys$i.toUpperCase()) === null || _keys$i$toUpperCase === void 0 ? void 0 : _keys$i$toUpperCase.replace(/[ -]/g, "_");
|
|
4022
|
+
|
|
4023
|
+
if (configEmployeeSideBar[keys[i]][0].path.indexOf(".") === -1) {
|
|
4024
|
+
var _configEmployeeSideBa4, _configEmployeeSideBa5, _configEmployeeSideBa6, _configEmployeeSideBa7;
|
|
4025
|
+
|
|
4026
|
+
menuItems.splice(1, 0, {
|
|
4027
|
+
type: "link",
|
|
4028
|
+
text: t("ACTION_TEST_" + getSingleDisplayName),
|
|
4029
|
+
link: (_configEmployeeSideBa4 = configEmployeeSideBar[keys[i]][0]) === null || _configEmployeeSideBa4 === void 0 ? void 0 : _configEmployeeSideBa4.navigationURL,
|
|
4030
|
+
icon: (_configEmployeeSideBa5 = configEmployeeSideBar[keys[i]][0]) === null || _configEmployeeSideBa5 === void 0 ? void 0 : (_configEmployeeSideBa6 = _configEmployeeSideBa5.leftIcon) === null || _configEmployeeSideBa6 === void 0 ? void 0 : (_configEmployeeSideBa7 = _configEmployeeSideBa6.split) === null || _configEmployeeSideBa7 === void 0 ? void 0 : _configEmployeeSideBa7.call(_configEmployeeSideBa6, ":")[1],
|
|
4031
|
+
populators: {
|
|
4032
|
+
onClick: function onClick() {
|
|
4033
|
+
var _configEmployeeSideBa8;
|
|
4034
|
+
|
|
4035
|
+
history.push((_configEmployeeSideBa8 = configEmployeeSideBar[keys[i]][0]) === null || _configEmployeeSideBa8 === void 0 ? void 0 : _configEmployeeSideBa8.navigationURL);
|
|
4036
|
+
closeSidebar();
|
|
4037
|
+
}
|
|
4038
|
+
}
|
|
4039
|
+
});
|
|
4040
|
+
} else {
|
|
4041
|
+
var _configEmployeeSideBa9;
|
|
4042
|
+
|
|
4043
|
+
menuItems.splice(1, 0, {
|
|
4044
|
+
type: "dynamic",
|
|
4045
|
+
moduleName: t("ACTION_TEST_" + getParentDisplayName),
|
|
4046
|
+
links: configEmployeeSideBar[keys[i]],
|
|
4047
|
+
icon: (_configEmployeeSideBa9 = configEmployeeSideBar[keys[i]][1]) === null || _configEmployeeSideBa9 === void 0 ? void 0 : _configEmployeeSideBa9.leftIcon
|
|
4048
|
+
});
|
|
4049
|
+
}
|
|
4050
|
+
};
|
|
4051
|
+
|
|
4052
|
+
for (var i = 0; i < keys.length; i++) {
|
|
4053
|
+
_loop(i);
|
|
4054
|
+
}
|
|
4055
|
+
})();
|
|
4056
|
+
}
|
|
4057
|
+
|
|
3317
4058
|
if (history.location.pathname.includes("/openlink")) {
|
|
3318
4059
|
profileItem = /*#__PURE__*/React__default.createElement("span", null);
|
|
3319
4060
|
menuItems = menuItems.filter(function (ele) {
|
|
@@ -3321,97 +4062,317 @@ var CitizenSideBar = function CitizenSideBar(_ref2) {
|
|
|
3321
4062
|
});
|
|
3322
4063
|
}
|
|
3323
4064
|
|
|
3324
|
-
return
|
|
4065
|
+
return isMobile ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.NavBar, {
|
|
3325
4066
|
open: isOpen,
|
|
4067
|
+
toggleSidebar: toggleSidebar,
|
|
3326
4068
|
profileItem: profileItem,
|
|
3327
|
-
menuItems: menuItems,
|
|
3328
4069
|
onClose: closeSidebar,
|
|
3329
|
-
|
|
3330
|
-
|
|
4070
|
+
menuItems: menuItems,
|
|
4071
|
+
Footer: /*#__PURE__*/React__default.createElement(PoweredBy, null),
|
|
4072
|
+
isEmployee: isEmployee,
|
|
4073
|
+
search: search,
|
|
4074
|
+
setSearch: setSearch
|
|
4075
|
+
}) : /*#__PURE__*/React__default.createElement(StaticCitizenSideBar, {
|
|
4076
|
+
logout: onLogout
|
|
4077
|
+
});
|
|
3331
4078
|
};
|
|
3332
4079
|
|
|
3333
|
-
var
|
|
3334
|
-
var
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
4080
|
+
var SubMenu = function SubMenu(_ref) {
|
|
4081
|
+
var _item$icon, _item$icon$leftIcon, _item$icon$leftIcon$s, _item$icon$leftIcon$s2, _item$leftIcon, _item$leftIcon$split, _item$moduleName;
|
|
4082
|
+
|
|
4083
|
+
var item = _ref.item;
|
|
4084
|
+
|
|
4085
|
+
var _useState = React.useState(false),
|
|
4086
|
+
subnav = _useState[0],
|
|
4087
|
+
setSubnav = _useState[1];
|
|
4088
|
+
|
|
4089
|
+
var location = reactRouterDom.useLocation();
|
|
4090
|
+
var pathname = location.pathname;
|
|
4091
|
+
|
|
4092
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
4093
|
+
t = _useTranslation.t;
|
|
4094
|
+
|
|
4095
|
+
var showSubnav = function showSubnav() {
|
|
4096
|
+
return setSubnav(!subnav);
|
|
4097
|
+
};
|
|
4098
|
+
|
|
4099
|
+
var IconsObject = {
|
|
4100
|
+
home: /*#__PURE__*/React__default.createElement(digitUiReactComponents.HomeIcon, null),
|
|
4101
|
+
announcement: /*#__PURE__*/React__default.createElement(digitUiReactComponents.ComplaintIcon, null),
|
|
4102
|
+
business: /*#__PURE__*/React__default.createElement(digitUiReactComponents.BPAHomeIcon, null),
|
|
4103
|
+
store: /*#__PURE__*/React__default.createElement(digitUiReactComponents.PropertyHouse, null),
|
|
4104
|
+
assignment: /*#__PURE__*/React__default.createElement(digitUiReactComponents.CaseIcon, null),
|
|
4105
|
+
receipt: /*#__PURE__*/React__default.createElement(digitUiReactComponents.ReceiptIcon, null),
|
|
4106
|
+
"business-center": /*#__PURE__*/React__default.createElement(digitUiReactComponents.PersonIcon, null),
|
|
4107
|
+
description: /*#__PURE__*/React__default.createElement(digitUiReactComponents.DocumentIconSolid, null),
|
|
4108
|
+
"water-tap": /*#__PURE__*/React__default.createElement(digitUiReactComponents.DropIcon, null),
|
|
4109
|
+
"collections-bookmark": /*#__PURE__*/React__default.createElement(digitUiReactComponents.CollectionsBookmarIcons, null),
|
|
4110
|
+
"insert-chart": /*#__PURE__*/React__default.createElement(digitUiReactComponents.FinanceChartIcon, null),
|
|
4111
|
+
edcr: /*#__PURE__*/React__default.createElement(digitUiReactComponents.CollectionIcon, null),
|
|
4112
|
+
collections: /*#__PURE__*/React__default.createElement(digitUiReactComponents.CollectionIcon, null)
|
|
4113
|
+
};
|
|
4114
|
+
var leftIconArray = (item === null || item === void 0 ? void 0 : (_item$icon = item.icon) === null || _item$icon === void 0 ? void 0 : (_item$icon$leftIcon = _item$icon.leftIcon) === null || _item$icon$leftIcon === void 0 ? void 0 : (_item$icon$leftIcon$s = _item$icon$leftIcon.split) === null || _item$icon$leftIcon$s === void 0 ? void 0 : (_item$icon$leftIcon$s2 = _item$icon$leftIcon$s.call(_item$icon$leftIcon, ":")) === null || _item$icon$leftIcon$s2 === void 0 ? void 0 : _item$icon$leftIcon$s2[1]) || (item === null || item === void 0 ? void 0 : (_item$leftIcon = item.leftIcon) === null || _item$leftIcon === void 0 ? void 0 : (_item$leftIcon$split = _item$leftIcon.split) === null || _item$leftIcon$split === void 0 ? void 0 : _item$leftIcon$split.call(_item$leftIcon, ":")[1]);
|
|
4115
|
+
var leftIcon = IconsObject[leftIconArray] || IconsObject.collections;
|
|
4116
|
+
var getModuleName = item === null || item === void 0 ? void 0 : (_item$moduleName = item.moduleName) === null || _item$moduleName === void 0 ? void 0 : _item$moduleName.replace(/[ -]/g, "_");
|
|
4117
|
+
var appendTranslate = t("ACTION_TEST_" + getModuleName);
|
|
4118
|
+
var trimModuleName = t((appendTranslate === null || appendTranslate === void 0 ? void 0 : appendTranslate.length) > 20 ? appendTranslate.substring(0, 20) + "..." : appendTranslate);
|
|
4119
|
+
|
|
4120
|
+
if (item.type === "single") {
|
|
4121
|
+
var _item$navigationURL;
|
|
4122
|
+
|
|
4123
|
+
var getOrigin = window.location.origin;
|
|
4124
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
4125
|
+
className: "submenu-container"
|
|
4126
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
4127
|
+
className: "sidebar-link " + (pathname === (item === null || item === void 0 ? void 0 : item.navigationURL) ? "active" : "")
|
|
4128
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
4129
|
+
className: "actions"
|
|
4130
|
+
}, leftIcon, ((_item$navigationURL = item.navigationURL) === null || _item$navigationURL === void 0 ? void 0 : _item$navigationURL.indexOf("/digit-ui")) === -1 ? /*#__PURE__*/React__default.createElement("a", {
|
|
4131
|
+
"data-tip": "React-tooltip",
|
|
4132
|
+
"data-for": "jk-side-" + getModuleName,
|
|
4133
|
+
className: "custom-link",
|
|
4134
|
+
href: getOrigin + "/employee/" + item.navigationURL
|
|
4135
|
+
}, /*#__PURE__*/React__default.createElement("span", null, " ", trimModuleName, " "), (trimModuleName === null || trimModuleName === void 0 ? void 0 : trimModuleName.includes("...")) && /*#__PURE__*/React__default.createElement(ReactTooltip, {
|
|
4136
|
+
textColor: "white",
|
|
4137
|
+
backgroundColor: "grey",
|
|
4138
|
+
place: "right",
|
|
4139
|
+
type: "info",
|
|
4140
|
+
effect: "solid",
|
|
4141
|
+
id: "jk-side-" + getModuleName
|
|
4142
|
+
}, t("ACTION_TEST_" + getModuleName))) :
|
|
4143
|
+
/*#__PURE__*/
|
|
4144
|
+
React__default.createElement(reactRouterDom.Link, {
|
|
4145
|
+
className: "custom-link",
|
|
4146
|
+
to: item.navigationURL
|
|
4147
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
4148
|
+
"data-tip": "React-tooltip",
|
|
4149
|
+
"data-for": "jk-side-" + getModuleName
|
|
4150
|
+
}, /*#__PURE__*/React__default.createElement("span", null, " ", trimModuleName, " "), (trimModuleName === null || trimModuleName === void 0 ? void 0 : trimModuleName.includes("...")) && /*#__PURE__*/React__default.createElement(ReactTooltip, {
|
|
4151
|
+
textColor: "white",
|
|
4152
|
+
backgroundColor: "grey",
|
|
4153
|
+
place: "right",
|
|
4154
|
+
type: "info",
|
|
4155
|
+
effect: "solid",
|
|
4156
|
+
id: "jk-side-" + getModuleName
|
|
4157
|
+
}, t("ACTION_TEST_" + getModuleName)))))));
|
|
4158
|
+
} else {
|
|
4159
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
4160
|
+
className: "submenu-container"
|
|
4161
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
4162
|
+
onClick: item.links && showSubnav,
|
|
4163
|
+
className: "sidebar-link"
|
|
4164
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
4165
|
+
className: "actions"
|
|
4166
|
+
}, leftIcon, /*#__PURE__*/React__default.createElement("div", {
|
|
4167
|
+
"data-tip": "React-tooltip",
|
|
4168
|
+
"data-for": "jk-side-" + getModuleName
|
|
4169
|
+
}, /*#__PURE__*/React__default.createElement("span", null, " ", trimModuleName, " "), (trimModuleName === null || trimModuleName === void 0 ? void 0 : trimModuleName.includes("...")) && /*#__PURE__*/React__default.createElement(ReactTooltip, {
|
|
4170
|
+
textColor: "white",
|
|
4171
|
+
backgroundColor: "grey",
|
|
4172
|
+
place: "right",
|
|
4173
|
+
type: "info",
|
|
4174
|
+
effect: "solid",
|
|
4175
|
+
id: "jk-side-" + getModuleName
|
|
4176
|
+
}, t("ACTION_TEST_" + getModuleName)))), /*#__PURE__*/React__default.createElement("div", null, " ", item.links && subnav ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.ArrowVectorDown, null) : item.links ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.ArrowForward, null) : null, " "))), subnav && item.links.sort(function (a, b) {
|
|
4177
|
+
return a.orderNumber - b.orderNumber;
|
|
4178
|
+
}).filter(function (item) {
|
|
4179
|
+
return item.url === "url" || item.url !== "";
|
|
4180
|
+
}).map(function (item, index) {
|
|
4181
|
+
var _item$displayName, _item$displayName$toU;
|
|
4182
|
+
|
|
4183
|
+
var getChildName = item === null || item === void 0 ? void 0 : (_item$displayName = item.displayName) === null || _item$displayName === void 0 ? void 0 : (_item$displayName$toU = _item$displayName.toUpperCase()) === null || _item$displayName$toU === void 0 ? void 0 : _item$displayName$toU.replace(/[ -]/g, "_");
|
|
4184
|
+
var appendTranslate = t("ACTION_TEST_" + getChildName);
|
|
4185
|
+
var trimModuleName = t((appendTranslate === null || appendTranslate === void 0 ? void 0 : appendTranslate.length) > 20 ? appendTranslate.substring(0, 20) + "..." : appendTranslate);
|
|
4186
|
+
|
|
4187
|
+
if (item.navigationURL.indexOf("/digit-ui") === -1) {
|
|
4188
|
+
var _getOrigin = window.location.origin;
|
|
4189
|
+
return /*#__PURE__*/React__default.createElement("a", {
|
|
4190
|
+
key: index,
|
|
4191
|
+
className: "dropdown-link " + (pathname === item.link ? "active" : ""),
|
|
4192
|
+
href: _getOrigin + "/employee/" + item.navigationURL
|
|
4193
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
4194
|
+
className: "actions",
|
|
4195
|
+
"data-tip": "React-tooltip",
|
|
4196
|
+
"data-for": "jk-side-" + index
|
|
4197
|
+
}, /*#__PURE__*/React__default.createElement("span", null, " ", trimModuleName, " "), (trimModuleName === null || trimModuleName === void 0 ? void 0 : trimModuleName.includes("...")) && /*#__PURE__*/React__default.createElement(ReactTooltip, {
|
|
4198
|
+
textColor: "white",
|
|
4199
|
+
backgroundColor: "grey",
|
|
4200
|
+
place: "right",
|
|
4201
|
+
type: "info",
|
|
4202
|
+
effect: "solid",
|
|
4203
|
+
id: "jk-side-" + index
|
|
4204
|
+
}, t("ACTION_TEST_" + getChildName))));
|
|
4205
|
+
}
|
|
4206
|
+
|
|
4207
|
+
return /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
4208
|
+
to: (item === null || item === void 0 ? void 0 : item.link) || item.navigationURL,
|
|
4209
|
+
key: index,
|
|
4210
|
+
className: "dropdown-link " + (pathname === (item === null || item === void 0 ? void 0 : item.link) || pathname === (item === null || item === void 0 ? void 0 : item.navigationURL) ? "active" : "")
|
|
4211
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
4212
|
+
className: "actions",
|
|
4213
|
+
"data-tip": "React-tooltip",
|
|
4214
|
+
"data-for": "jk-side-" + index
|
|
4215
|
+
}, /*#__PURE__*/React__default.createElement("span", null, " ", trimModuleName, " "), (trimModuleName === null || trimModuleName === void 0 ? void 0 : trimModuleName.includes("...")) && /*#__PURE__*/React__default.createElement(ReactTooltip, {
|
|
4216
|
+
textColor: "white",
|
|
4217
|
+
backgroundColor: "grey",
|
|
4218
|
+
place: "right",
|
|
4219
|
+
type: "info",
|
|
4220
|
+
effect: "solid",
|
|
4221
|
+
id: "jk-side-" + index
|
|
4222
|
+
}, t("ACTION_TEST_" + getChildName))));
|
|
4223
|
+
}));
|
|
4224
|
+
}
|
|
3355
4225
|
};
|
|
3356
4226
|
|
|
3357
4227
|
var EmployeeSideBar = function EmployeeSideBar() {
|
|
3358
|
-
var
|
|
3359
|
-
var NATADMIN = Digit.UserService.hasAccess("NATADMIN");
|
|
4228
|
+
var sidebarRef = React.useRef(null);
|
|
3360
4229
|
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
4230
|
+
var _Digit$Hooks$useAcces = Digit.Hooks.useAccessControl(),
|
|
4231
|
+
isLoading = _Digit$Hooks$useAcces.isLoading,
|
|
4232
|
+
data = _Digit$Hooks$useAcces.data;
|
|
4233
|
+
|
|
4234
|
+
var _useState = React.useState(""),
|
|
4235
|
+
search = _useState[0],
|
|
4236
|
+
setSearch = _useState[1];
|
|
3364
4237
|
|
|
3365
4238
|
var _useTranslation = reactI18next.useTranslation(),
|
|
3366
4239
|
t = _useTranslation.t;
|
|
3367
4240
|
|
|
4241
|
+
React.useEffect(function () {
|
|
4242
|
+
if (isLoading) {
|
|
4243
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
4244
|
+
}
|
|
4245
|
+
|
|
4246
|
+
sidebarRef.current.style.cursor = "pointer";
|
|
4247
|
+
collapseNav();
|
|
4248
|
+
}, [isLoading]);
|
|
4249
|
+
|
|
4250
|
+
var expandNav = function expandNav() {
|
|
4251
|
+
sidebarRef.current.style.width = "260px";
|
|
4252
|
+
sidebarRef.current.style.overflow = "auto";
|
|
4253
|
+
sidebarRef.current.querySelectorAll(".dropdown-link").forEach(function (element) {
|
|
4254
|
+
element.style.display = "flex";
|
|
4255
|
+
});
|
|
4256
|
+
};
|
|
4257
|
+
|
|
4258
|
+
var collapseNav = function collapseNav() {
|
|
4259
|
+
sidebarRef.current.style.width = "55px";
|
|
4260
|
+
sidebarRef.current.style.overflow = "hidden";
|
|
4261
|
+
sidebarRef.current.querySelectorAll(".dropdown-link").forEach(function (element) {
|
|
4262
|
+
element.style.display = "none";
|
|
4263
|
+
});
|
|
4264
|
+
sidebarRef.current.querySelectorAll(".actions").forEach(function (element) {
|
|
4265
|
+
element.style.padding = "0";
|
|
4266
|
+
});
|
|
4267
|
+
};
|
|
4268
|
+
|
|
4269
|
+
var configEmployeeSideBar = {};
|
|
4270
|
+
data === null || data === void 0 ? void 0 : data.actions.filter(function (e) {
|
|
4271
|
+
return e.url === "url";
|
|
4272
|
+
}).forEach(function (item) {
|
|
4273
|
+
var _item$displayName;
|
|
4274
|
+
|
|
4275
|
+
if (search == "" && item.path !== "") {
|
|
4276
|
+
var index = item.path.split(".")[0];
|
|
4277
|
+
if (index === "TradeLicense") index = "Trade License";
|
|
4278
|
+
|
|
4279
|
+
if (!configEmployeeSideBar[index]) {
|
|
4280
|
+
configEmployeeSideBar[index] = [item];
|
|
4281
|
+
} else {
|
|
4282
|
+
configEmployeeSideBar[index].push(item);
|
|
4283
|
+
}
|
|
4284
|
+
} else if (item.path !== "" && item !== null && item !== void 0 && (_item$displayName = item.displayName) !== null && _item$displayName !== void 0 && _item$displayName.toLowerCase().includes(search.toLowerCase())) {
|
|
4285
|
+
var _index = item.path.split(".")[0];
|
|
4286
|
+
if (_index === "TradeLicense") _index = "Trade License";
|
|
4287
|
+
|
|
4288
|
+
if (!configEmployeeSideBar[_index]) {
|
|
4289
|
+
configEmployeeSideBar[_index] = [item];
|
|
4290
|
+
} else {
|
|
4291
|
+
configEmployeeSideBar[_index].push(item);
|
|
4292
|
+
}
|
|
4293
|
+
}
|
|
4294
|
+
});
|
|
4295
|
+
var res = [];
|
|
4296
|
+
|
|
4297
|
+
var splitKeyValue = function splitKeyValue() {
|
|
4298
|
+
var keys = Object.keys(configEmployeeSideBar);
|
|
4299
|
+
keys.sort(function (a, b) {
|
|
4300
|
+
return a.orderNumber - b.orderNumber;
|
|
4301
|
+
});
|
|
4302
|
+
|
|
4303
|
+
for (var i = 0; i < keys.length; i++) {
|
|
4304
|
+
if (configEmployeeSideBar[keys[i]][0].path.indexOf(".") === -1) {
|
|
4305
|
+
if (configEmployeeSideBar[keys[i]][0].displayName === "Home") {
|
|
4306
|
+
var homeURL = "/digit-ui/employee";
|
|
4307
|
+
res.unshift({
|
|
4308
|
+
moduleName: keys[i].toUpperCase(),
|
|
4309
|
+
icon: configEmployeeSideBar[keys[i]][0],
|
|
4310
|
+
navigationURL: homeURL,
|
|
4311
|
+
type: "single"
|
|
4312
|
+
});
|
|
4313
|
+
} else {
|
|
4314
|
+
var _configEmployeeSideBa;
|
|
4315
|
+
|
|
4316
|
+
res.push({
|
|
4317
|
+
moduleName: (_configEmployeeSideBa = configEmployeeSideBar[keys[i]][0]) === null || _configEmployeeSideBa === void 0 ? void 0 : _configEmployeeSideBa.displayName.toUpperCase(),
|
|
4318
|
+
type: "single",
|
|
4319
|
+
icon: configEmployeeSideBar[keys[i]][0],
|
|
4320
|
+
navigationURL: configEmployeeSideBar[keys[i]][0].navigationURL
|
|
4321
|
+
});
|
|
4322
|
+
}
|
|
4323
|
+
} else {
|
|
4324
|
+
res.push({
|
|
4325
|
+
moduleName: keys[i].toUpperCase(),
|
|
4326
|
+
links: configEmployeeSideBar[keys[i]],
|
|
4327
|
+
icon: configEmployeeSideBar[keys[i]][0],
|
|
4328
|
+
orderNumber: configEmployeeSideBar[keys[i]][0].orderNumber
|
|
4329
|
+
});
|
|
4330
|
+
}
|
|
4331
|
+
}
|
|
4332
|
+
|
|
4333
|
+
return res.map(function (item, index) {
|
|
4334
|
+
return /*#__PURE__*/React__default.createElement(SubMenu, {
|
|
4335
|
+
item: item,
|
|
4336
|
+
key: index + 1
|
|
4337
|
+
});
|
|
4338
|
+
});
|
|
4339
|
+
};
|
|
4340
|
+
|
|
4341
|
+
if (isLoading) {
|
|
4342
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
4343
|
+
}
|
|
4344
|
+
|
|
4345
|
+
if (!res) {
|
|
4346
|
+
return "";
|
|
4347
|
+
}
|
|
4348
|
+
|
|
4349
|
+
var renderSearch = function renderSearch() {
|
|
4350
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
4351
|
+
className: "submenu-container"
|
|
4352
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
4353
|
+
className: "sidebar-link"
|
|
4354
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
4355
|
+
className: "actions search-icon-wrapper"
|
|
4356
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SearchIcon, {
|
|
4357
|
+
className: "search-icon"
|
|
4358
|
+
}), /*#__PURE__*/React__default.createElement("input", {
|
|
4359
|
+
className: "employee-search-input",
|
|
4360
|
+
type: "text",
|
|
4361
|
+
placeholder: t("ACTION_TEST_SEARCH"),
|
|
4362
|
+
name: "search",
|
|
4363
|
+
value: search,
|
|
4364
|
+
onChange: function onChange(e) {
|
|
4365
|
+
return setSearch(e.target.value);
|
|
4366
|
+
}
|
|
4367
|
+
}))));
|
|
4368
|
+
};
|
|
4369
|
+
|
|
3368
4370
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
3369
|
-
className: "sidebar"
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
}, /*#__PURE__*/React__default.createElement(ToolTipWrapper, {
|
|
3375
|
-
child: /*#__PURE__*/React__default.createElement("svg", {
|
|
3376
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3377
|
-
height: "24",
|
|
3378
|
-
viewBox: "0 0 24 24",
|
|
3379
|
-
width: "24"
|
|
3380
|
-
}, /*#__PURE__*/React__default.createElement("path", {
|
|
3381
|
-
d: "M0 0h24v24H0z",
|
|
3382
|
-
fill: "none"
|
|
3383
|
-
}), /*#__PURE__*/React__default.createElement("path", {
|
|
3384
|
-
d: "M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z",
|
|
3385
|
-
fill: "white"
|
|
3386
|
-
})),
|
|
3387
|
-
t: t,
|
|
3388
|
-
label: "ACTION_TEST_HOME"
|
|
3389
|
-
}))), /*#__PURE__*/React__default.createElement("a", {
|
|
3390
|
-
href: getRedirectionUrl()
|
|
3391
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3392
|
-
className: "actions"
|
|
3393
|
-
}, /*#__PURE__*/React__default.createElement(ToolTipWrapper, {
|
|
3394
|
-
child: /*#__PURE__*/React__default.createElement("svg", {
|
|
3395
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3396
|
-
height: "24",
|
|
3397
|
-
viewBox: "0 0 24 24",
|
|
3398
|
-
width: "24"
|
|
3399
|
-
}, /*#__PURE__*/React__default.createElement("path", {
|
|
3400
|
-
d: "M0 0h24v24H0z",
|
|
3401
|
-
fill: "none"
|
|
3402
|
-
}), /*#__PURE__*/React__default.createElement("path", {
|
|
3403
|
-
d: "M8.17 5.7L1 10.48V21h5v-8h4v8h5V10.25z",
|
|
3404
|
-
fill: "white"
|
|
3405
|
-
}), /*#__PURE__*/React__default.createElement("path", {
|
|
3406
|
-
d: "M17 7h2v2h-2z",
|
|
3407
|
-
fill: "none"
|
|
3408
|
-
}), /*#__PURE__*/React__default.createElement("path", {
|
|
3409
|
-
d: "M10 3v1.51l2 1.33L13.73 7H15v.85l2 1.34V11h2v2h-2v2h2v2h-2v4h6V3H10zm9 6h-2V7h2v2z",
|
|
3410
|
-
fill: "white"
|
|
3411
|
-
})),
|
|
3412
|
-
t: t,
|
|
3413
|
-
label: "CORE_CHANGE_TENANT_DESCRIPTION"
|
|
3414
|
-
}))));
|
|
4371
|
+
className: "sidebar",
|
|
4372
|
+
ref: sidebarRef,
|
|
4373
|
+
onMouseOver: expandNav,
|
|
4374
|
+
onMouseLeave: collapseNav
|
|
4375
|
+
}, renderSearch(), splitKeyValue());
|
|
3415
4376
|
};
|
|
3416
4377
|
|
|
3417
4378
|
var SideBar = function SideBar(_ref) {
|
|
@@ -3420,16 +4381,22 @@ var SideBar = function SideBar(_ref) {
|
|
|
3420
4381
|
toggleSidebar = _ref.toggleSidebar,
|
|
3421
4382
|
handleLogout = _ref.handleLogout,
|
|
3422
4383
|
mobileView = _ref.mobileView,
|
|
3423
|
-
userDetails = _ref.userDetails
|
|
4384
|
+
userDetails = _ref.userDetails,
|
|
4385
|
+
modules = _ref.modules,
|
|
4386
|
+
linkData = _ref.linkData,
|
|
4387
|
+
islinkDataLoading = _ref.islinkDataLoading;
|
|
3424
4388
|
if (CITIZEN) return /*#__PURE__*/React__default.createElement(CitizenSideBar, {
|
|
3425
4389
|
isOpen: isSidebarOpen,
|
|
3426
4390
|
isMobile: true,
|
|
3427
4391
|
toggleSidebar: toggleSidebar,
|
|
3428
|
-
onLogout: handleLogout
|
|
4392
|
+
onLogout: handleLogout,
|
|
4393
|
+
linkData: linkData,
|
|
4394
|
+
islinkDataLoading: islinkDataLoading
|
|
3429
4395
|
});else {
|
|
3430
4396
|
if (!mobileView && userDetails !== null && userDetails !== void 0 && userDetails.access_token) return /*#__PURE__*/React__default.createElement(EmployeeSideBar, {
|
|
3431
4397
|
mobileView: mobileView,
|
|
3432
|
-
userDetails: userDetails
|
|
4398
|
+
userDetails: userDetails,
|
|
4399
|
+
modules: modules
|
|
3433
4400
|
});else return /*#__PURE__*/React__default.createElement(CitizenSideBar, {
|
|
3434
4401
|
isOpen: isSidebarOpen,
|
|
3435
4402
|
isMobile: true,
|
|
@@ -3451,7 +4418,9 @@ var TopBarSideBar = function TopBarSideBar(_ref) {
|
|
|
3451
4418
|
logoUrl = _ref.logoUrl,
|
|
3452
4419
|
_ref$showSidebar = _ref.showSidebar,
|
|
3453
4420
|
showSidebar = _ref$showSidebar === void 0 ? true : _ref$showSidebar,
|
|
3454
|
-
showLanguageChange = _ref.showLanguageChange
|
|
4421
|
+
showLanguageChange = _ref.showLanguageChange,
|
|
4422
|
+
linkData = _ref.linkData,
|
|
4423
|
+
islinkDataLoading = _ref.islinkDataLoading;
|
|
3455
4424
|
|
|
3456
4425
|
var _useState = React.useState(false),
|
|
3457
4426
|
isSidebarOpen = _useState[0],
|
|
@@ -3459,9 +4428,22 @@ var TopBarSideBar = function TopBarSideBar(_ref) {
|
|
|
3459
4428
|
|
|
3460
4429
|
var history = reactRouterDom.useHistory();
|
|
3461
4430
|
|
|
4431
|
+
var _useState2 = React.useState(false),
|
|
4432
|
+
showDialog = _useState2[0],
|
|
4433
|
+
setShowDialog = _useState2[1];
|
|
4434
|
+
|
|
3462
4435
|
var handleLogout = function handleLogout() {
|
|
3463
4436
|
toggleSidebar(false);
|
|
4437
|
+
setShowDialog(true);
|
|
4438
|
+
};
|
|
4439
|
+
|
|
4440
|
+
var handleOnSubmit = function handleOnSubmit() {
|
|
3464
4441
|
Digit.UserService.logout();
|
|
4442
|
+
setShowDialog(false);
|
|
4443
|
+
};
|
|
4444
|
+
|
|
4445
|
+
var handleOnCancel = function handleOnCancel() {
|
|
4446
|
+
setShowDialog(false);
|
|
3465
4447
|
};
|
|
3466
4448
|
|
|
3467
4449
|
var userProfile = function userProfile() {
|
|
@@ -3495,6 +4477,10 @@ var TopBarSideBar = function TopBarSideBar(_ref) {
|
|
|
3495
4477
|
handleUserDropdownSelection: handleUserDropdownSelection,
|
|
3496
4478
|
logoUrl: logoUrl,
|
|
3497
4479
|
showLanguageChange: showLanguageChange
|
|
4480
|
+
}), showDialog && /*#__PURE__*/React__default.createElement(LogoutDialog, {
|
|
4481
|
+
onSelect: handleOnSubmit,
|
|
4482
|
+
onCancel: handleOnCancel,
|
|
4483
|
+
onDismiss: handleOnCancel
|
|
3498
4484
|
}), showSidebar && /*#__PURE__*/React__default.createElement(SideBar, {
|
|
3499
4485
|
t: t,
|
|
3500
4486
|
CITIZEN: CITIZEN,
|
|
@@ -3502,7 +4488,9 @@ var TopBarSideBar = function TopBarSideBar(_ref) {
|
|
|
3502
4488
|
toggleSidebar: toggleSidebar,
|
|
3503
4489
|
handleLogout: handleLogout,
|
|
3504
4490
|
mobileView: mobileView,
|
|
3505
|
-
userDetails: userDetails
|
|
4491
|
+
userDetails: userDetails,
|
|
4492
|
+
linkData: linkData,
|
|
4493
|
+
islinkDataLoading: islinkDataLoading
|
|
3506
4494
|
}));
|
|
3507
4495
|
};
|
|
3508
4496
|
|
|
@@ -3656,7 +4644,7 @@ function UploadDrawer(_ref) {
|
|
|
3656
4644
|
}, "Remove"))));
|
|
3657
4645
|
}
|
|
3658
4646
|
|
|
3659
|
-
var defaultImage$
|
|
4647
|
+
var defaultImage$2 = "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+6FTi2nevCVwCjbugnXklX5fkfTldL8PEilUB1kfNyN1u9MME2sATr4lbuB7AjfLAuvsRm1A0g6gYRdcPAjvBlje" + "2Z8brI8OC68AcRdlCkwLohx2mcZMjw9q+LzarQurjtnwPYAydX08WecECO/u6Ad0GBdYG7jO5gB4Ap+PwKcA9ZT43dn4/W9TyiPAn4OAJaF7h3uwe8StSCddFdM3jqFa2LvnnB5zzhuuBBAj" + "Y4gi50cg694gnXhTYvfMdrjtcFZhrwE9r41gUem8IXWMC3LrBzxh+a0gRd1N1LOK7M0IUUGuggvEmHoStA2/MJh7MpupiDU4TzjhxdzLAoO4ouZvqVURbFMHQlZD6SUeWHoguZsSLUGegreh" + "A+FZFowPdUWTi6iMoZlIpGGUUXkDbjj/9ZOLqAQS/+GIKl5BQOCn/ycqpzkXSDm5dU7ZWkG7wUyGlcmm7g5Ux56AqirgoaJ7BeokPTDbp9CbVunjFxPrl7+HqnkrSq1Da7JX20f3dV8yJi6v" + "oO81mX8vV0mx3qUsZCPRfTlVRdz2EvdufYGDvNQvvwqHtmXd+a1ITinwNcXc+lT6JuzdT1XDyBn/x7wtX1HCQQdW9MXc8xArGrirowfLeUEbMqqq6f7TF1lfRdOuGNiGi6SpT+WxY06xUfNN" + "2wBfyE9I4tlm7w5hvOPDNJN3yNiLMipji6gE3chKhouoCtN5x3QlF0EZt8OW/8ougitqJQlk1aii7iFC9l0MvRReyao7xNjKML2Z/PuHlzhi5mFxljiZeiC9rPTEisNEMX9KYAwo5Xhi7qaA" + "3hamboYm7dG+NVrXhdaYDv5zFaQZsYrCtbbAGnjkQDX2+J1FXCwOsqWOpKoIQNTFdqYBWydxqNqUoG0pVpCS+H8kaJaGKErlIaXj7CRRE+gRWuKwW9YZ80oVOUgbpdT0zpnSZJTIiwCtJVelv" + "Xntr4P5j6BWfPb5Wcx84C4cq3hb11lco2u2Mdwp6XdJ/Ne3wb8DWdfiRenZaXrhLwOj4e+GQeHroy3YOspS7TlU28Wle2m2QUS0mqdcbrdNW+ZHsSsyK7tBfm0q/dWcv+Z3mytVx3t7KWulq" + "Ue6ilunu8jF8pFwgv1FXp3mUt35OtRbr7eM4u4Gs6vUBXgeuHc5kfE/cbvWZtkROLm1DMtLCy80tzsu2PRj0hTI8fvrQuvsjlJkyutszq+m423wHaLTyniy/XuiGZ84LuT+m5ZfNfRxyGs7L" + "XZOvia7VujatUwVTrIt+Q/Csc7Tuhe+BOakT10b4TuoiiJjvgU9emTO42PwEfBa+cuodKkuf42DXr1D3JpXz73Hnn0j10evHKe+nufgfUm+7B84sX9FfdEzXux2DBpWuKokkCqN/5pa/8pmvn" + "L+RGKCddCGmatiPyPB/+ekO/M/q/7uvbt22kTt3zEnXPzCV13T3Gel4/6NduDu66xRvlPNkM1RjjxUdv+4WhGx6TftD19Q/dfzpwcHO+rE3fAAAAAElFTkSuQmCC";
|
|
3660
4648
|
|
|
3661
4649
|
var UserProfile = function UserProfile(_ref) {
|
|
3662
4650
|
var _Digit$UserService$ge, _errors$userName, _errors$emailAddress, _errors$userName2, _errors$mobileNumber, _errors$emailAddress2, _ref3, _errors$currentPasswo, _errors$newPassword, _errors$confirmPasswo;
|
|
@@ -3742,6 +4730,8 @@ var UserProfile = function UserProfile(_ref) {
|
|
|
3742
4730
|
errors = _React$useState2[0],
|
|
3743
4731
|
setErrors = _React$useState2[1];
|
|
3744
4732
|
|
|
4733
|
+
var isMobile = window.Digit.Utils.browser.isMobile();
|
|
4734
|
+
|
|
3745
4735
|
var getUserInfo = function getUserInfo() {
|
|
3746
4736
|
try {
|
|
3747
4737
|
var uuid = userInfo === null || userInfo === void 0 ? void 0 : userInfo.uuid;
|
|
@@ -3859,7 +4849,7 @@ var UserProfile = function UserProfile(_ref) {
|
|
|
3859
4849
|
var setUserCurrentPassword = function setUserCurrentPassword(value) {
|
|
3860
4850
|
setCurrentPassword(value);
|
|
3861
4851
|
|
|
3862
|
-
if (
|
|
4852
|
+
if (!new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(value)) {
|
|
3863
4853
|
setErrors(_extends({}, errors, {
|
|
3864
4854
|
currentPassword: {
|
|
3865
4855
|
type: "pattern",
|
|
@@ -3876,7 +4866,7 @@ var UserProfile = function UserProfile(_ref) {
|
|
|
3876
4866
|
var setUserNewPassword = function setUserNewPassword(value) {
|
|
3877
4867
|
setNewPassword(value);
|
|
3878
4868
|
|
|
3879
|
-
if (
|
|
4869
|
+
if (!new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(value)) {
|
|
3880
4870
|
setErrors(_extends({}, errors, {
|
|
3881
4871
|
newPassword: {
|
|
3882
4872
|
type: "pattern",
|
|
@@ -3893,7 +4883,7 @@ var UserProfile = function UserProfile(_ref) {
|
|
|
3893
4883
|
var setUserConfirmPassword = function setUserConfirmPassword(value) {
|
|
3894
4884
|
setConfirmPassword(value);
|
|
3895
4885
|
|
|
3896
|
-
if (
|
|
4886
|
+
if (!new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(value)) {
|
|
3897
4887
|
setErrors(_extends({}, errors, {
|
|
3898
4888
|
confirmPassword: {
|
|
3899
4889
|
type: "pattern",
|
|
@@ -4109,7 +5099,9 @@ var UserProfile = function UserProfile(_ref) {
|
|
|
4109
5099
|
};
|
|
4110
5100
|
|
|
4111
5101
|
if (loading) return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
4112
|
-
return /*#__PURE__*/React__default.createElement("div",
|
|
5102
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
5103
|
+
className: "user-profile"
|
|
5104
|
+
}, /*#__PURE__*/React__default.createElement("section", {
|
|
4113
5105
|
style: {
|
|
4114
5106
|
margin: userType === "citizen" ? "8px" : "24px"
|
|
4115
5107
|
}
|
|
@@ -4132,7 +5124,8 @@ var UserProfile = function UserProfile(_ref) {
|
|
|
4132
5124
|
gap: userType === "citizen" ? "" : "0 24px",
|
|
4133
5125
|
boxShadow: userType === "citizen" ? "1px 1px 4px 0px rgba(0,0,0,0.2)" : "",
|
|
4134
5126
|
background: userType === "citizen" ? "white" : "",
|
|
4135
|
-
borderRadius: userType === "citizen" ? "4px" : ""
|
|
5127
|
+
borderRadius: userType === "citizen" ? "4px" : "",
|
|
5128
|
+
maxWidth: userType === "citizen" ? "960px" : ""
|
|
4136
5129
|
}
|
|
4137
5130
|
}, /*#__PURE__*/React__default.createElement("section", {
|
|
4138
5131
|
style: {
|
|
@@ -4164,7 +5157,7 @@ var UserProfile = function UserProfile(_ref) {
|
|
|
4164
5157
|
height: "100%",
|
|
4165
5158
|
width: "100%"
|
|
4166
5159
|
},
|
|
4167
|
-
src: !profileImg || profileImg === "" ? defaultImage$
|
|
5160
|
+
src: !profileImg || profileImg === "" ? defaultImage$2 : profileImg
|
|
4168
5161
|
}), /*#__PURE__*/React__default.createElement("button", {
|
|
4169
5162
|
style: {
|
|
4170
5163
|
position: "absolute",
|
|
@@ -4190,7 +5183,8 @@ var UserProfile = function UserProfile(_ref) {
|
|
|
4190
5183
|
style: {}
|
|
4191
5184
|
}, "" + t("CORE_COMMON_PROFILE_NAME"), "*"), /*#__PURE__*/React__default.createElement("div", {
|
|
4192
5185
|
style: {
|
|
4193
|
-
width: "100%"
|
|
5186
|
+
width: "100%",
|
|
5187
|
+
maxWidth: "960px"
|
|
4194
5188
|
}
|
|
4195
5189
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, _extends({
|
|
4196
5190
|
t: t,
|
|
@@ -4211,13 +5205,7 @@ var UserProfile = function UserProfile(_ref) {
|
|
|
4211
5205
|
title: t("CORE_COMMON_PROFILE_NAME_ERROR_MESSAGE")
|
|
4212
5206
|
}, {
|
|
4213
5207
|
disable: editScreen
|
|
4214
|
-
})), (errors === null || errors === void 0 ? void 0 : errors.userName) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
4215
|
-
style: {
|
|
4216
|
-
width: "70%",
|
|
4217
|
-
fontSize: "12px",
|
|
4218
|
-
marginTop: "-21px"
|
|
4219
|
-
}
|
|
4220
|
-
}, " ", t(errors === null || errors === void 0 ? void 0 : (_errors$userName = errors.userName) === null || _errors$userName === void 0 ? void 0 : _errors$userName.message), " "))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
5208
|
+
})), (errors === null || errors === void 0 ? void 0 : errors.userName) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, null, " ", errors === null || errors === void 0 ? void 0 : (_errors$userName = errors.userName) === null || _errors$userName === void 0 ? void 0 : _errors$userName.message, " "))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
4221
5209
|
style: {}
|
|
4222
5210
|
}, "" + t("CORE_COMMON_PROFILE_GENDER")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
4223
5211
|
style: {
|
|
@@ -4232,7 +5220,7 @@ var UserProfile = function UserProfile(_ref) {
|
|
|
4232
5220
|
optionKey: "code",
|
|
4233
5221
|
t: t,
|
|
4234
5222
|
name: "gender"
|
|
4235
|
-
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
5223
|
+
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
4236
5224
|
style: {}
|
|
4237
5225
|
}, "" + t("CORE_COMMON_PROFILE_EMAIL")), /*#__PURE__*/React__default.createElement("div", {
|
|
4238
5226
|
style: {
|
|
@@ -4252,13 +5240,7 @@ var UserProfile = function UserProfile(_ref) {
|
|
|
4252
5240
|
return setUserEmailAddress(e.target.value);
|
|
4253
5241
|
},
|
|
4254
5242
|
disable: editScreen
|
|
4255
|
-
}), (errors === null || errors === void 0 ? void 0 : errors.emailAddress) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
4256
|
-
style: {
|
|
4257
|
-
width: "70%",
|
|
4258
|
-
fontSize: "12px",
|
|
4259
|
-
marginTop: "-21px"
|
|
4260
|
-
}
|
|
4261
|
-
}, " ", t(errors === null || errors === void 0 ? void 0 : (_errors$emailAddress = errors.emailAddress) === null || _errors$emailAddress === void 0 ? void 0 : _errors$emailAddress.message), " "))), /*#__PURE__*/React__default.createElement("button", {
|
|
5243
|
+
}), (errors === null || errors === void 0 ? void 0 : errors.emailAddress) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, null, " ", errors === null || errors === void 0 ? void 0 : (_errors$emailAddress = errors.emailAddress) === null || _errors$emailAddress === void 0 ? void 0 : _errors$emailAddress.message, " "))), /*#__PURE__*/React__default.createElement("button", {
|
|
4262
5244
|
onClick: updateProfile,
|
|
4263
5245
|
style: {
|
|
4264
5246
|
marginTop: "24px",
|
|
@@ -4266,6 +5248,7 @@ var UserProfile = function UserProfile(_ref) {
|
|
|
4266
5248
|
width: "100%",
|
|
4267
5249
|
height: "40px",
|
|
4268
5250
|
color: "white",
|
|
5251
|
+
maxWidth: isMobile ? "100%" : "240px",
|
|
4269
5252
|
borderBottom: "1px solid black"
|
|
4270
5253
|
}
|
|
4271
5254
|
}, t("CORE_COMMON_SAVE"))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, {
|
|
@@ -4300,11 +5283,10 @@ var UserProfile = function UserProfile(_ref) {
|
|
|
4300
5283
|
disable: editScreen
|
|
4301
5284
|
})), (errors === null || errors === void 0 ? void 0 : errors.userName) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
4302
5285
|
style: {
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
marginTop: "-21px"
|
|
5286
|
+
margin: 0,
|
|
5287
|
+
padding: 0
|
|
4306
5288
|
}
|
|
4307
|
-
}, " ",
|
|
5289
|
+
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$userName2 = errors.userName) === null || _errors$userName2 === void 0 ? void 0 : _errors$userName2.message, " "))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, {
|
|
4308
5290
|
style: {
|
|
4309
5291
|
display: "flex"
|
|
4310
5292
|
}
|
|
@@ -4343,7 +5325,7 @@ var UserProfile = function UserProfile(_ref) {
|
|
|
4343
5325
|
type: "text",
|
|
4344
5326
|
isMandatory: false,
|
|
4345
5327
|
name: "city",
|
|
4346
|
-
value: city,
|
|
5328
|
+
value: t(city),
|
|
4347
5329
|
onChange: function onChange(e) {
|
|
4348
5330
|
return setCity(e.target.value);
|
|
4349
5331
|
},
|
|
@@ -4384,11 +5366,10 @@ var UserProfile = function UserProfile(_ref) {
|
|
|
4384
5366
|
title: t("CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID")
|
|
4385
5367
|
}), (errors === null || errors === void 0 ? void 0 : errors.mobileNumber) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
4386
5368
|
style: {
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
marginTop: "-21px"
|
|
5369
|
+
margin: 0,
|
|
5370
|
+
padding: 0
|
|
4390
5371
|
}
|
|
4391
|
-
}, " ",
|
|
5372
|
+
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$mobileNumber = errors.mobileNumber) === null || _errors$mobileNumber === void 0 ? void 0 : _errors$mobileNumber.message, " "))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, {
|
|
4392
5373
|
style: {
|
|
4393
5374
|
display: "flex"
|
|
4394
5375
|
}
|
|
@@ -4413,13 +5394,7 @@ var UserProfile = function UserProfile(_ref) {
|
|
|
4413
5394
|
return setUserEmailAddress(e.target.value);
|
|
4414
5395
|
},
|
|
4415
5396
|
disable: editScreen
|
|
4416
|
-
}), (errors === null || errors === void 0 ? void 0 : errors.emailAddress) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
4417
|
-
style: {
|
|
4418
|
-
width: "70%",
|
|
4419
|
-
fontSize: "12px",
|
|
4420
|
-
marginTop: "-21px"
|
|
4421
|
-
}
|
|
4422
|
-
}, " ", t(errors === null || errors === void 0 ? void 0 : (_errors$emailAddress2 = errors.emailAddress) === null || _errors$emailAddress2 === void 0 ? void 0 : _errors$emailAddress2.message), " "))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("a", {
|
|
5397
|
+
}), (errors === null || errors === void 0 ? void 0 : errors.emailAddress) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, null, " ", errors === null || errors === void 0 ? void 0 : (_errors$emailAddress2 = errors.emailAddress) === null || _errors$emailAddress2 === void 0 ? void 0 : _errors$emailAddress2.message, " "))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("a", {
|
|
4423
5398
|
style: (_ref3 = {
|
|
4424
5399
|
color: "orange",
|
|
4425
5400
|
cursor: "default",
|
|
@@ -4453,13 +5428,7 @@ var UserProfile = function UserProfile(_ref) {
|
|
|
4453
5428
|
return setUserCurrentPassword(e.target.value);
|
|
4454
5429
|
},
|
|
4455
5430
|
disable: editScreen
|
|
4456
|
-
}), (errors === null || errors === void 0 ? void 0 : errors.currentPassword) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
4457
|
-
style: {
|
|
4458
|
-
width: "70%",
|
|
4459
|
-
fontSize: "12px",
|
|
4460
|
-
marginTop: "-21px"
|
|
4461
|
-
}
|
|
4462
|
-
}, t(errors === null || errors === void 0 ? void 0 : (_errors$currentPasswo = errors.currentPassword) === null || _errors$currentPasswo === void 0 ? void 0 : _errors$currentPasswo.message)))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, {
|
|
5431
|
+
}), (errors === null || errors === void 0 ? void 0 : errors.currentPassword) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, null, errors === null || errors === void 0 ? void 0 : (_errors$currentPasswo = errors.currentPassword) === null || _errors$currentPasswo === void 0 ? void 0 : _errors$currentPasswo.message))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, {
|
|
4463
5432
|
style: {
|
|
4464
5433
|
display: "flex"
|
|
4465
5434
|
}
|
|
@@ -4482,13 +5451,7 @@ var UserProfile = function UserProfile(_ref) {
|
|
|
4482
5451
|
return setUserNewPassword(e.target.value);
|
|
4483
5452
|
},
|
|
4484
5453
|
disable: editScreen
|
|
4485
|
-
}), (errors === null || errors === void 0 ? void 0 : errors.newPassword) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
4486
|
-
style: {
|
|
4487
|
-
width: "70%",
|
|
4488
|
-
fontSize: "12px",
|
|
4489
|
-
marginTop: "-21px"
|
|
4490
|
-
}
|
|
4491
|
-
}, t(errors === null || errors === void 0 ? void 0 : (_errors$newPassword = errors.newPassword) === null || _errors$newPassword === void 0 ? void 0 : _errors$newPassword.message)))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, {
|
|
5454
|
+
}), (errors === null || errors === void 0 ? void 0 : errors.newPassword) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, null, errors === null || errors === void 0 ? void 0 : (_errors$newPassword = errors.newPassword) === null || _errors$newPassword === void 0 ? void 0 : _errors$newPassword.message))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, {
|
|
4492
5455
|
style: {
|
|
4493
5456
|
display: "flex"
|
|
4494
5457
|
}
|
|
@@ -4511,13 +5474,7 @@ var UserProfile = function UserProfile(_ref) {
|
|
|
4511
5474
|
return setUserConfirmPassword(e.target.value);
|
|
4512
5475
|
},
|
|
4513
5476
|
disable: editScreen
|
|
4514
|
-
}), (errors === null || errors === void 0 ? void 0 : errors.confirmPassword) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
4515
|
-
style: {
|
|
4516
|
-
width: "70%",
|
|
4517
|
-
fontSize: "12px",
|
|
4518
|
-
marginTop: "-21px"
|
|
4519
|
-
}
|
|
4520
|
-
}, t(errors === null || errors === void 0 ? void 0 : (_errors$confirmPasswo = errors.confirmPassword) === null || _errors$confirmPasswo === void 0 ? void 0 : _errors$confirmPasswo.message))))) : ""))))), userType === "employee" ? /*#__PURE__*/React__default.createElement("div", {
|
|
5477
|
+
}), (errors === null || errors === void 0 ? void 0 : errors.confirmPassword) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, null, errors === null || errors === void 0 ? void 0 : (_errors$confirmPasswo = errors.confirmPassword) === null || _errors$confirmPasswo === void 0 ? void 0 : _errors$confirmPasswo.message)))) : ""))))), userType === "employee" ? /*#__PURE__*/React__default.createElement("div", {
|
|
4521
5478
|
style: {
|
|
4522
5479
|
height: "88px",
|
|
4523
5480
|
backgroundColor: "#FFFFFF",
|
|
@@ -4557,8 +5514,10 @@ var UserProfile = function UserProfile(_ref) {
|
|
|
4557
5514
|
}) : "");
|
|
4558
5515
|
};
|
|
4559
5516
|
|
|
5517
|
+
var userScreensExempted = ["user/profile", "user/error"];
|
|
5518
|
+
|
|
4560
5519
|
var EmployeeApp = function EmployeeApp(_ref) {
|
|
4561
|
-
var _location$pathname,
|
|
5520
|
+
var _location$pathname, _window, _window$globalConfigs, _window$globalConfigs2;
|
|
4562
5521
|
|
|
4563
5522
|
var stateInfo = _ref.stateInfo,
|
|
4564
5523
|
userDetails = _ref.userDetails,
|
|
@@ -4570,7 +5529,9 @@ var EmployeeApp = function EmployeeApp(_ref) {
|
|
|
4570
5529
|
DSO = _ref.DSO,
|
|
4571
5530
|
stateCode = _ref.stateCode,
|
|
4572
5531
|
modules = _ref.modules,
|
|
4573
|
-
appTenants = _ref.appTenants
|
|
5532
|
+
appTenants = _ref.appTenants,
|
|
5533
|
+
initData = _ref.initData;
|
|
5534
|
+
var history = reactRouterDom.useHistory();
|
|
4574
5535
|
|
|
4575
5536
|
var _useTranslation = reactI18next.useTranslation(),
|
|
4576
5537
|
t = _useTranslation.t;
|
|
@@ -4580,7 +5541,11 @@ var EmployeeApp = function EmployeeApp(_ref) {
|
|
|
4580
5541
|
|
|
4581
5542
|
var location = reactRouterDom.useLocation();
|
|
4582
5543
|
var showLanguageChange = location === null || location === void 0 ? void 0 : (_location$pathname = location.pathname) === null || _location$pathname === void 0 ? void 0 : _location$pathname.includes("language-selection");
|
|
4583
|
-
var isUserProfile =
|
|
5544
|
+
var isUserProfile = userScreensExempted.some(function (url) {
|
|
5545
|
+
var _location$pathname2;
|
|
5546
|
+
|
|
5547
|
+
return location === null || location === void 0 ? void 0 : (_location$pathname2 = location.pathname) === null || _location$pathname2 === void 0 ? void 0 : _location$pathname2.includes(url);
|
|
5548
|
+
});
|
|
4584
5549
|
React.useEffect(function () {
|
|
4585
5550
|
Digit.UserService.setType("employee");
|
|
4586
5551
|
}, []);
|
|
@@ -4621,6 +5586,13 @@ var EmployeeApp = function EmployeeApp(_ref) {
|
|
|
4621
5586
|
stateCode: stateCode,
|
|
4622
5587
|
userType: "employee",
|
|
4623
5588
|
cityDetails: cityDetails
|
|
5589
|
+
})), /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
5590
|
+
path: path + "/user/error"
|
|
5591
|
+
}, /*#__PURE__*/React__default.createElement(ErrorComponent, {
|
|
5592
|
+
initData: initData,
|
|
5593
|
+
goToHome: function goToHome() {
|
|
5594
|
+
history.push("/digit-ui/employee");
|
|
5595
|
+
}
|
|
4624
5596
|
})), /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
4625
5597
|
path: path + "/user/language-selection"
|
|
4626
5598
|
}, /*#__PURE__*/React__default.createElement(LanguageSelection, null)), /*#__PURE__*/React__default.createElement(reactRouterDom.Route, null, /*#__PURE__*/React__default.createElement(reactRouterDom.Redirect, {
|
|
@@ -4633,21 +5605,21 @@ var EmployeeApp = function EmployeeApp(_ref) {
|
|
|
4633
5605
|
cityDetails: cityDetails,
|
|
4634
5606
|
mobileView: mobileView,
|
|
4635
5607
|
handleUserDropdownSelection: handleUserDropdownSelection,
|
|
4636
|
-
logoUrl: logoUrl
|
|
5608
|
+
logoUrl: logoUrl,
|
|
5609
|
+
modules: modules
|
|
4637
5610
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
4638
5611
|
className: "main " + (DSO ? "m-auto" : "")
|
|
4639
5612
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
4640
5613
|
className: "employee-app-wrapper"
|
|
4641
|
-
}, /*#__PURE__*/React__default.createElement(ErrorBoundary,
|
|
5614
|
+
}, /*#__PURE__*/React__default.createElement(ErrorBoundary, {
|
|
5615
|
+
initData: initData
|
|
5616
|
+
}, /*#__PURE__*/React__default.createElement(AppModules, {
|
|
4642
5617
|
stateCode: stateCode,
|
|
4643
5618
|
userType: "employee",
|
|
4644
5619
|
modules: modules,
|
|
4645
5620
|
appTenants: appTenants
|
|
4646
5621
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
4647
|
-
className: "employee-home-footer"
|
|
4648
|
-
style: {
|
|
4649
|
-
position: "absolute"
|
|
4650
|
-
}
|
|
5622
|
+
className: "employee-home-footer"
|
|
4651
5623
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
4652
5624
|
alt: "Powered by DIGIT",
|
|
4653
5625
|
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"),
|
|
@@ -4666,6 +5638,8 @@ var EmployeeApp = function EmployeeApp(_ref) {
|
|
|
4666
5638
|
};
|
|
4667
5639
|
|
|
4668
5640
|
var Home = function Home() {
|
|
5641
|
+
var _citizenServicesObj$s, _citizenServicesObj$p, _citizenServicesObj$p2, _citizenServicesObj$p5, _citizenServicesObj$p6, _citizenServicesObj$p9, _citizenServicesObj$p10, _citizenServicesObj$p13, _citizenServicesObj$p14, _infoAndUpdatesObj$si, _infoAndUpdatesObj$pr, _infoAndUpdatesObj$pr2, _infoAndUpdatesObj$pr5, _infoAndUpdatesObj$pr6, _infoAndUpdatesObj$pr9, _infoAndUpdatesObj$pr10, _infoAndUpdatesObj$pr13, _infoAndUpdatesObj$pr14, _whatsNewSectionObj$s2;
|
|
5642
|
+
|
|
4669
5643
|
var _useTranslation = reactI18next.useTranslation(),
|
|
4670
5644
|
t = _useTranslation.t;
|
|
4671
5645
|
|
|
@@ -4676,8 +5650,9 @@ var Home = function Home() {
|
|
|
4676
5650
|
_Digit$Hooks$useStore2 = _Digit$Hooks$useStore.data;
|
|
4677
5651
|
|
|
4678
5652
|
_Digit$Hooks$useStore2 = _Digit$Hooks$useStore2 === void 0 ? {} : _Digit$Hooks$useStore2;
|
|
4679
|
-
var
|
|
5653
|
+
var uiHomePage = _Digit$Hooks$useStore2.uiHomePage,
|
|
4680
5654
|
isLoading = _Digit$Hooks$useStore.isLoading;
|
|
5655
|
+
var isMobile = window.Digit.Utils.browser.isMobile();
|
|
4681
5656
|
|
|
4682
5657
|
var conditionsToDisableNotificationCountTrigger = function conditionsToDisableNotificationCountTrigger() {
|
|
4683
5658
|
var _Digit$UserService, _Digit$UserService$ge, _Digit$UserService$ge2, _Digit$UserService2, _Digit$UserService2$g;
|
|
@@ -4701,41 +5676,113 @@ var Home = function Home() {
|
|
|
4701
5676
|
history.push("/digit-ui/citizen/select-language");
|
|
4702
5677
|
}
|
|
4703
5678
|
|
|
5679
|
+
var appBannerWebObj = uiHomePage === null || uiHomePage === void 0 ? void 0 : uiHomePage.appBannerDesktop;
|
|
5680
|
+
var appBannerMobObj = uiHomePage === null || uiHomePage === void 0 ? void 0 : uiHomePage.appBannerMobile;
|
|
5681
|
+
var citizenServicesObj = uiHomePage === null || uiHomePage === void 0 ? void 0 : uiHomePage.citizenServicesCard;
|
|
5682
|
+
var infoAndUpdatesObj = uiHomePage === null || uiHomePage === void 0 ? void 0 : uiHomePage.informationAndUpdatesCard;
|
|
5683
|
+
var whatsAppBannerWebObj = uiHomePage === null || uiHomePage === void 0 ? void 0 : uiHomePage.whatsAppBannerDesktop;
|
|
5684
|
+
var whatsAppBannerMobObj = uiHomePage === null || uiHomePage === void 0 ? void 0 : uiHomePage.whatsAppBannerMobile;
|
|
5685
|
+
var whatsNewSectionObj = uiHomePage === null || uiHomePage === void 0 ? void 0 : uiHomePage.whatsNewSection;
|
|
5686
|
+
|
|
5687
|
+
var handleClickOnWhatsAppBanner = function handleClickOnWhatsAppBanner(obj) {
|
|
5688
|
+
window.open(obj === null || obj === void 0 ? void 0 : obj.navigationUrl);
|
|
5689
|
+
};
|
|
5690
|
+
|
|
4704
5691
|
var allCitizenServicesProps = {
|
|
4705
|
-
header: t(
|
|
5692
|
+
header: t(citizenServicesObj === null || citizenServicesObj === void 0 ? void 0 : citizenServicesObj.headerLabel),
|
|
4706
5693
|
sideOption: {
|
|
4707
|
-
name: t(
|
|
5694
|
+
name: t(citizenServicesObj === null || citizenServicesObj === void 0 ? void 0 : (_citizenServicesObj$s = citizenServicesObj.sideOption) === null || _citizenServicesObj$s === void 0 ? void 0 : _citizenServicesObj$s.name),
|
|
4708
5695
|
onClick: function onClick() {
|
|
4709
|
-
|
|
5696
|
+
var _citizenServicesObj$s2;
|
|
5697
|
+
|
|
5698
|
+
return history.push(citizenServicesObj === null || citizenServicesObj === void 0 ? void 0 : (_citizenServicesObj$s2 = citizenServicesObj.sideOption) === null || _citizenServicesObj$s2 === void 0 ? void 0 : _citizenServicesObj$s2.navigationUrl);
|
|
4710
5699
|
}
|
|
4711
5700
|
},
|
|
4712
5701
|
options: [{
|
|
4713
|
-
name: t(
|
|
5702
|
+
name: t(citizenServicesObj === null || citizenServicesObj === void 0 ? void 0 : (_citizenServicesObj$p = citizenServicesObj.props) === null || _citizenServicesObj$p === void 0 ? void 0 : (_citizenServicesObj$p2 = _citizenServicesObj$p[0]) === null || _citizenServicesObj$p2 === void 0 ? void 0 : _citizenServicesObj$p2.label),
|
|
4714
5703
|
Icon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.ComplaintIcon, null),
|
|
4715
5704
|
onClick: function onClick() {
|
|
4716
|
-
|
|
5705
|
+
var _citizenServicesObj$p3, _citizenServicesObj$p4;
|
|
5706
|
+
|
|
5707
|
+
return history.push(citizenServicesObj === null || citizenServicesObj === void 0 ? void 0 : (_citizenServicesObj$p3 = citizenServicesObj.props) === null || _citizenServicesObj$p3 === void 0 ? void 0 : (_citizenServicesObj$p4 = _citizenServicesObj$p3[0]) === null || _citizenServicesObj$p4 === void 0 ? void 0 : _citizenServicesObj$p4.navigationUrl);
|
|
4717
5708
|
}
|
|
4718
5709
|
}, {
|
|
4719
|
-
name: t(
|
|
5710
|
+
name: t(citizenServicesObj === null || citizenServicesObj === void 0 ? void 0 : (_citizenServicesObj$p5 = citizenServicesObj.props) === null || _citizenServicesObj$p5 === void 0 ? void 0 : (_citizenServicesObj$p6 = _citizenServicesObj$p5[1]) === null || _citizenServicesObj$p6 === void 0 ? void 0 : _citizenServicesObj$p6.label),
|
|
4720
5711
|
Icon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.PTIcon, {
|
|
4721
5712
|
className: "fill-path-primary-main"
|
|
4722
5713
|
}),
|
|
4723
5714
|
onClick: function onClick() {
|
|
4724
|
-
|
|
5715
|
+
var _citizenServicesObj$p7, _citizenServicesObj$p8;
|
|
5716
|
+
|
|
5717
|
+
return history.push(citizenServicesObj === null || citizenServicesObj === void 0 ? void 0 : (_citizenServicesObj$p7 = citizenServicesObj.props) === null || _citizenServicesObj$p7 === void 0 ? void 0 : (_citizenServicesObj$p8 = _citizenServicesObj$p7[1]) === null || _citizenServicesObj$p8 === void 0 ? void 0 : _citizenServicesObj$p8.navigationUrl);
|
|
4725
5718
|
}
|
|
4726
5719
|
}, {
|
|
4727
|
-
name: t(
|
|
5720
|
+
name: t(citizenServicesObj === null || citizenServicesObj === void 0 ? void 0 : (_citizenServicesObj$p9 = citizenServicesObj.props) === null || _citizenServicesObj$p9 === void 0 ? void 0 : (_citizenServicesObj$p10 = _citizenServicesObj$p9[2]) === null || _citizenServicesObj$p10 === void 0 ? void 0 : _citizenServicesObj$p10.label),
|
|
4728
5721
|
Icon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.CaseIcon, {
|
|
4729
5722
|
className: "fill-path-primary-main"
|
|
4730
5723
|
}),
|
|
4731
5724
|
onClick: function onClick() {
|
|
4732
|
-
|
|
5725
|
+
var _citizenServicesObj$p11, _citizenServicesObj$p12;
|
|
5726
|
+
|
|
5727
|
+
return history.push(citizenServicesObj === null || citizenServicesObj === void 0 ? void 0 : (_citizenServicesObj$p11 = citizenServicesObj.props) === null || _citizenServicesObj$p11 === void 0 ? void 0 : (_citizenServicesObj$p12 = _citizenServicesObj$p11[2]) === null || _citizenServicesObj$p12 === void 0 ? void 0 : _citizenServicesObj$p12.navigationUrl);
|
|
4733
5728
|
}
|
|
4734
5729
|
}, {
|
|
4735
|
-
name: t(
|
|
5730
|
+
name: t(citizenServicesObj === null || citizenServicesObj === void 0 ? void 0 : (_citizenServicesObj$p13 = citizenServicesObj.props) === null || _citizenServicesObj$p13 === void 0 ? void 0 : (_citizenServicesObj$p14 = _citizenServicesObj$p13[3]) === null || _citizenServicesObj$p14 === void 0 ? void 0 : _citizenServicesObj$p14.label),
|
|
4736
5731
|
Icon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.OBPSIcon, null),
|
|
4737
5732
|
onClick: function onClick() {
|
|
4738
|
-
|
|
5733
|
+
var _citizenServicesObj$p15, _citizenServicesObj$p16;
|
|
5734
|
+
|
|
5735
|
+
return history.push(citizenServicesObj === null || citizenServicesObj === void 0 ? void 0 : (_citizenServicesObj$p15 = citizenServicesObj.props) === null || _citizenServicesObj$p15 === void 0 ? void 0 : (_citizenServicesObj$p16 = _citizenServicesObj$p15[3]) === null || _citizenServicesObj$p16 === void 0 ? void 0 : _citizenServicesObj$p16.navigationUrl);
|
|
5736
|
+
}
|
|
5737
|
+
}],
|
|
5738
|
+
styles: {
|
|
5739
|
+
display: "flex",
|
|
5740
|
+
flexWrap: "wrap",
|
|
5741
|
+
justifyContent: "flex-start",
|
|
5742
|
+
width: "100%"
|
|
5743
|
+
}
|
|
5744
|
+
};
|
|
5745
|
+
var allInfoAndUpdatesProps = {
|
|
5746
|
+
header: t(infoAndUpdatesObj === null || infoAndUpdatesObj === void 0 ? void 0 : infoAndUpdatesObj.headerLabel),
|
|
5747
|
+
sideOption: {
|
|
5748
|
+
name: t(infoAndUpdatesObj === null || infoAndUpdatesObj === void 0 ? void 0 : (_infoAndUpdatesObj$si = infoAndUpdatesObj.sideOption) === null || _infoAndUpdatesObj$si === void 0 ? void 0 : _infoAndUpdatesObj$si.name),
|
|
5749
|
+
onClick: function onClick() {
|
|
5750
|
+
var _infoAndUpdatesObj$si2;
|
|
5751
|
+
|
|
5752
|
+
return history.push(infoAndUpdatesObj === null || infoAndUpdatesObj === void 0 ? void 0 : (_infoAndUpdatesObj$si2 = infoAndUpdatesObj.sideOption) === null || _infoAndUpdatesObj$si2 === void 0 ? void 0 : _infoAndUpdatesObj$si2.navigationUrl);
|
|
5753
|
+
}
|
|
5754
|
+
},
|
|
5755
|
+
options: [{
|
|
5756
|
+
name: t(infoAndUpdatesObj === null || infoAndUpdatesObj === void 0 ? void 0 : (_infoAndUpdatesObj$pr = infoAndUpdatesObj.props) === null || _infoAndUpdatesObj$pr === void 0 ? void 0 : (_infoAndUpdatesObj$pr2 = _infoAndUpdatesObj$pr[0]) === null || _infoAndUpdatesObj$pr2 === void 0 ? void 0 : _infoAndUpdatesObj$pr2.label),
|
|
5757
|
+
Icon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.HomeIcon, null),
|
|
5758
|
+
onClick: function onClick() {
|
|
5759
|
+
var _infoAndUpdatesObj$pr3, _infoAndUpdatesObj$pr4;
|
|
5760
|
+
|
|
5761
|
+
return history.push(infoAndUpdatesObj === null || infoAndUpdatesObj === void 0 ? void 0 : (_infoAndUpdatesObj$pr3 = infoAndUpdatesObj.props) === null || _infoAndUpdatesObj$pr3 === void 0 ? void 0 : (_infoAndUpdatesObj$pr4 = _infoAndUpdatesObj$pr3[0]) === null || _infoAndUpdatesObj$pr4 === void 0 ? void 0 : _infoAndUpdatesObj$pr4.navigationUrl);
|
|
5762
|
+
}
|
|
5763
|
+
}, {
|
|
5764
|
+
name: t(infoAndUpdatesObj === null || infoAndUpdatesObj === void 0 ? void 0 : (_infoAndUpdatesObj$pr5 = infoAndUpdatesObj.props) === null || _infoAndUpdatesObj$pr5 === void 0 ? void 0 : (_infoAndUpdatesObj$pr6 = _infoAndUpdatesObj$pr5[1]) === null || _infoAndUpdatesObj$pr6 === void 0 ? void 0 : _infoAndUpdatesObj$pr6.label),
|
|
5765
|
+
Icon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.Calender, null),
|
|
5766
|
+
onClick: function onClick() {
|
|
5767
|
+
var _infoAndUpdatesObj$pr7, _infoAndUpdatesObj$pr8;
|
|
5768
|
+
|
|
5769
|
+
return history.push(infoAndUpdatesObj === null || infoAndUpdatesObj === void 0 ? void 0 : (_infoAndUpdatesObj$pr7 = infoAndUpdatesObj.props) === null || _infoAndUpdatesObj$pr7 === void 0 ? void 0 : (_infoAndUpdatesObj$pr8 = _infoAndUpdatesObj$pr7[1]) === null || _infoAndUpdatesObj$pr8 === void 0 ? void 0 : _infoAndUpdatesObj$pr8.navigationUrl);
|
|
5770
|
+
}
|
|
5771
|
+
}, {
|
|
5772
|
+
name: t(infoAndUpdatesObj === null || infoAndUpdatesObj === void 0 ? void 0 : (_infoAndUpdatesObj$pr9 = infoAndUpdatesObj.props) === null || _infoAndUpdatesObj$pr9 === void 0 ? void 0 : (_infoAndUpdatesObj$pr10 = _infoAndUpdatesObj$pr9[2]) === null || _infoAndUpdatesObj$pr10 === void 0 ? void 0 : _infoAndUpdatesObj$pr10.label),
|
|
5773
|
+
Icon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.DocumentIcon, null),
|
|
5774
|
+
onClick: function onClick() {
|
|
5775
|
+
var _infoAndUpdatesObj$pr11, _infoAndUpdatesObj$pr12;
|
|
5776
|
+
|
|
5777
|
+
return history.push(infoAndUpdatesObj === null || infoAndUpdatesObj === void 0 ? void 0 : (_infoAndUpdatesObj$pr11 = infoAndUpdatesObj.props) === null || _infoAndUpdatesObj$pr11 === void 0 ? void 0 : (_infoAndUpdatesObj$pr12 = _infoAndUpdatesObj$pr11[2]) === null || _infoAndUpdatesObj$pr12 === void 0 ? void 0 : _infoAndUpdatesObj$pr12.navigationUrl);
|
|
5778
|
+
}
|
|
5779
|
+
}, {
|
|
5780
|
+
name: t(infoAndUpdatesObj === null || infoAndUpdatesObj === void 0 ? void 0 : (_infoAndUpdatesObj$pr13 = infoAndUpdatesObj.props) === null || _infoAndUpdatesObj$pr13 === void 0 ? void 0 : (_infoAndUpdatesObj$pr14 = _infoAndUpdatesObj$pr13[3]) === null || _infoAndUpdatesObj$pr14 === void 0 ? void 0 : _infoAndUpdatesObj$pr14.label),
|
|
5781
|
+
Icon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.DocumentIcon, null),
|
|
5782
|
+
onClick: function onClick() {
|
|
5783
|
+
var _infoAndUpdatesObj$pr15, _infoAndUpdatesObj$pr16;
|
|
5784
|
+
|
|
5785
|
+
return history.push(infoAndUpdatesObj === null || infoAndUpdatesObj === void 0 ? void 0 : (_infoAndUpdatesObj$pr15 = infoAndUpdatesObj.props) === null || _infoAndUpdatesObj$pr15 === void 0 ? void 0 : (_infoAndUpdatesObj$pr16 = _infoAndUpdatesObj$pr15[3]) === null || _infoAndUpdatesObj$pr16 === void 0 ? void 0 : _infoAndUpdatesObj$pr16.navigationUrl);
|
|
4739
5786
|
}
|
|
4740
5787
|
}],
|
|
4741
5788
|
styles: {
|
|
@@ -4745,169 +5792,712 @@ var Home = function Home() {
|
|
|
4745
5792
|
width: "100%"
|
|
4746
5793
|
}
|
|
4747
5794
|
};
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
5795
|
+
return isLoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement("div", {
|
|
5796
|
+
className: "HomePageContainer"
|
|
5797
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5798
|
+
className: "HomePageWrapper"
|
|
5799
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5800
|
+
className: "BannerWithSearch"
|
|
5801
|
+
}, isMobile ? /*#__PURE__*/React__default.createElement("img", {
|
|
5802
|
+
src: appBannerMobObj === null || appBannerMobObj === void 0 ? void 0 : appBannerMobObj.bannerUrl
|
|
5803
|
+
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
5804
|
+
src: appBannerWebObj === null || appBannerWebObj === void 0 ? void 0 : appBannerWebObj.bannerUrl
|
|
5805
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
5806
|
+
className: "ServicesSection"
|
|
5807
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardBasedOptions, _extends({
|
|
5808
|
+
style: {
|
|
5809
|
+
marginTop: "-30px"
|
|
5810
|
+
}
|
|
5811
|
+
}, allCitizenServicesProps)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardBasedOptions, _extends({
|
|
5812
|
+
style: isMobile ? {} : {
|
|
5813
|
+
marginTop: "-30px"
|
|
5814
|
+
}
|
|
5815
|
+
}, allInfoAndUpdatesProps)))), (whatsAppBannerMobObj || whatsAppBannerWebObj) && /*#__PURE__*/React__default.createElement("div", {
|
|
5816
|
+
className: "WhatsAppBanner"
|
|
5817
|
+
}, isMobile ? /*#__PURE__*/React__default.createElement("img", {
|
|
5818
|
+
src: whatsAppBannerMobObj === null || whatsAppBannerMobObj === void 0 ? void 0 : whatsAppBannerMobObj.bannerUrl,
|
|
5819
|
+
onClick: function onClick() {
|
|
5820
|
+
return handleClickOnWhatsAppBanner(whatsAppBannerMobObj);
|
|
5821
|
+
}
|
|
5822
|
+
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
5823
|
+
src: whatsAppBannerWebObj === null || whatsAppBannerWebObj === void 0 ? void 0 : whatsAppBannerWebObj.bannerUrl,
|
|
5824
|
+
onClick: function onClick() {
|
|
5825
|
+
return handleClickOnWhatsAppBanner(whatsAppBannerWebObj);
|
|
5826
|
+
}
|
|
5827
|
+
})), conditionsToDisableNotificationCountTrigger() ? EventsDataLoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement("div", {
|
|
5828
|
+
className: "WhatsNewSection"
|
|
5829
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5830
|
+
className: "headSection"
|
|
5831
|
+
}, /*#__PURE__*/React__default.createElement("h2", null, t(whatsNewSectionObj === null || whatsNewSectionObj === void 0 ? void 0 : whatsNewSectionObj.headerLabel)), /*#__PURE__*/React__default.createElement("p", {
|
|
5832
|
+
onClick: function onClick() {
|
|
5833
|
+
var _whatsNewSectionObj$s;
|
|
5834
|
+
|
|
5835
|
+
return history.push(whatsNewSectionObj === null || whatsNewSectionObj === void 0 ? void 0 : (_whatsNewSectionObj$s = whatsNewSectionObj.sideOption) === null || _whatsNewSectionObj$s === void 0 ? void 0 : _whatsNewSectionObj$s.navigationUrl);
|
|
5836
|
+
}
|
|
5837
|
+
}, t(whatsNewSectionObj === null || whatsNewSectionObj === void 0 ? void 0 : (_whatsNewSectionObj$s2 = whatsNewSectionObj.sideOption) === null || _whatsNewSectionObj$s2 === void 0 ? void 0 : _whatsNewSectionObj$s2.name))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.WhatsNewCard, EventsData === null || EventsData === void 0 ? void 0 : EventsData[0])) : null));
|
|
5838
|
+
};
|
|
5839
|
+
|
|
5840
|
+
var LanguageSelection$1 = function LanguageSelection() {
|
|
5841
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
5842
|
+
t = _useTranslation.t;
|
|
5843
|
+
|
|
5844
|
+
var history = reactRouterDom.useHistory();
|
|
5845
|
+
|
|
5846
|
+
var _Digit$Hooks$useStore = Digit.Hooks.useStore.getInitData(),
|
|
5847
|
+
_Digit$Hooks$useStore2 = _Digit$Hooks$useStore.data;
|
|
5848
|
+
|
|
5849
|
+
_Digit$Hooks$useStore2 = _Digit$Hooks$useStore2 === void 0 ? {} : _Digit$Hooks$useStore2;
|
|
5850
|
+
var languages = _Digit$Hooks$useStore2.languages,
|
|
5851
|
+
stateInfo = _Digit$Hooks$useStore2.stateInfo,
|
|
5852
|
+
isLoading = _Digit$Hooks$useStore.isLoading;
|
|
5853
|
+
var selectedLanguage = Digit.StoreData.getCurrentLanguage();
|
|
5854
|
+
var texts = React.useMemo(function () {
|
|
5855
|
+
return {
|
|
5856
|
+
header: t("CS_COMMON_CHOOSE_LANGUAGE"),
|
|
5857
|
+
submitBarLabel: t("CORE_COMMON_CONTINUE")
|
|
5858
|
+
};
|
|
5859
|
+
}, [t]);
|
|
5860
|
+
var RadioButtonProps = React.useMemo(function () {
|
|
5861
|
+
return {
|
|
5862
|
+
options: languages,
|
|
5863
|
+
optionsKey: "label",
|
|
5864
|
+
additionalWrapperClass: "reverse-radio-selection-wrapper",
|
|
5865
|
+
onSelect: function onSelect(language) {
|
|
5866
|
+
return Digit.LocalizationService.changeLanguage(language.value, stateInfo.code);
|
|
5867
|
+
},
|
|
5868
|
+
selectedOption: languages === null || languages === void 0 ? void 0 : languages.filter(function (i) {
|
|
5869
|
+
return i.value === selectedLanguage;
|
|
5870
|
+
})[0]
|
|
5871
|
+
};
|
|
5872
|
+
}, [selectedLanguage, languages]);
|
|
5873
|
+
|
|
5874
|
+
function onSubmit() {
|
|
5875
|
+
history.push("/digit-ui/citizen/select-location");
|
|
5876
|
+
}
|
|
5877
|
+
|
|
5878
|
+
return isLoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement("div", {
|
|
5879
|
+
className: "selection-card-wrapper"
|
|
5880
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.PageBasedInput, {
|
|
5881
|
+
texts: texts,
|
|
5882
|
+
onSubmit: onSubmit
|
|
5883
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, null, t("CS_COMMON_CHOOSE_LANGUAGE")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.RadioButtons, RadioButtonProps)));
|
|
5884
|
+
};
|
|
5885
|
+
|
|
5886
|
+
var LocationSelection = function LocationSelection() {
|
|
5887
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
5888
|
+
t = _useTranslation.t;
|
|
5889
|
+
|
|
5890
|
+
var history = reactRouterDom.useHistory();
|
|
5891
|
+
var location = reactRouterDom.useLocation();
|
|
5892
|
+
|
|
5893
|
+
var _Digit$Hooks$useTenan = Digit.Hooks.useTenants(),
|
|
5894
|
+
cities = _Digit$Hooks$useTenan.data,
|
|
5895
|
+
isLoading = _Digit$Hooks$useTenan.isLoading;
|
|
5896
|
+
|
|
5897
|
+
var _useState = React.useState(function () {
|
|
5898
|
+
return {
|
|
5899
|
+
code: Digit.ULBService.getCitizenCurrentTenant(true)
|
|
5900
|
+
};
|
|
5901
|
+
}),
|
|
5902
|
+
selectedCity = _useState[0],
|
|
5903
|
+
setSelectedCity = _useState[1];
|
|
5904
|
+
|
|
5905
|
+
var _useState2 = React.useState(false),
|
|
5906
|
+
showError = _useState2[0],
|
|
5907
|
+
setShowError = _useState2[1];
|
|
5908
|
+
|
|
5909
|
+
var texts = React.useMemo(function () {
|
|
5910
|
+
return {
|
|
5911
|
+
header: t("CS_COMMON_CHOOSE_LOCATION"),
|
|
5912
|
+
submitBarLabel: t("CORE_COMMON_CONTINUE")
|
|
5913
|
+
};
|
|
5914
|
+
}, [t]);
|
|
5915
|
+
|
|
5916
|
+
function selectCity(city) {
|
|
5917
|
+
setSelectedCity(city);
|
|
5918
|
+
setShowError(false);
|
|
5919
|
+
}
|
|
5920
|
+
|
|
5921
|
+
var RadioButtonProps = React.useMemo(function () {
|
|
5922
|
+
return {
|
|
5923
|
+
options: cities,
|
|
5924
|
+
optionsKey: "i18nKey",
|
|
5925
|
+
additionalWrapperClass: "reverse-radio-selection-wrapper",
|
|
5926
|
+
onSelect: selectCity,
|
|
5927
|
+
selectedOption: selectedCity
|
|
5928
|
+
};
|
|
5929
|
+
}, [cities, t, selectedCity]);
|
|
5930
|
+
|
|
5931
|
+
function onSubmit() {
|
|
5932
|
+
if (selectedCity) {
|
|
5933
|
+
var _location$state;
|
|
5934
|
+
|
|
5935
|
+
Digit.SessionStorage.set("CITIZEN.COMMON.HOME.CITY", selectedCity);
|
|
5936
|
+
var redirectBackTo = (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.redirectBackTo;
|
|
5937
|
+
|
|
5938
|
+
if (redirectBackTo) {
|
|
5939
|
+
history.replace(redirectBackTo);
|
|
5940
|
+
} else history.push("/digit-ui/citizen");
|
|
5941
|
+
} else {
|
|
5942
|
+
setShowError(true);
|
|
5943
|
+
}
|
|
5944
|
+
}
|
|
5945
|
+
|
|
5946
|
+
return isLoading ? /*#__PURE__*/React__default.createElement("loader", null) : /*#__PURE__*/React__default.createElement("div", {
|
|
5947
|
+
className: "selection-card-wrapper"
|
|
5948
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.BackButton, null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PageBasedInput, {
|
|
5949
|
+
texts: texts,
|
|
5950
|
+
onSubmit: onSubmit,
|
|
5951
|
+
className: "location-selection-container"
|
|
5952
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, null, t("CS_COMMON_CHOOSE_LOCATION")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.SearchOnRadioButtons, _extends({}, RadioButtonProps, {
|
|
5953
|
+
placeholder: t("COMMON_TABLE_SEARCH")
|
|
5954
|
+
})), showError ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, null, t("CS_COMMON_LOCATION_SELECTION_ERROR")) : null));
|
|
5955
|
+
};
|
|
5956
|
+
|
|
5957
|
+
var FaqComponent = function FaqComponent(props) {
|
|
5958
|
+
var question = props.question,
|
|
5959
|
+
answer = props.answer,
|
|
5960
|
+
lastIndex = props.lastIndex;
|
|
5961
|
+
|
|
5962
|
+
var _useState = React.useState(false),
|
|
5963
|
+
isOpen = _useState[0],
|
|
5964
|
+
toggleOpen = _useState[1];
|
|
5965
|
+
|
|
5966
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
5967
|
+
t = _useTranslation.t;
|
|
5968
|
+
|
|
5969
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
5970
|
+
className: "faqs border-none",
|
|
5971
|
+
onClick: function onClick() {
|
|
5972
|
+
return toggleOpen(!isOpen);
|
|
5973
|
+
}
|
|
5974
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5975
|
+
className: "faq-question",
|
|
5976
|
+
style: {
|
|
5977
|
+
justifyContent: "space-between",
|
|
5978
|
+
display: "flex"
|
|
5979
|
+
}
|
|
5980
|
+
}, /*#__PURE__*/React__default.createElement("span", null, t(question)), /*#__PURE__*/React__default.createElement("span", {
|
|
5981
|
+
className: isOpen ? "faqicon rotate" : "faqicon",
|
|
5982
|
+
style: {
|
|
5983
|
+
float: "right"
|
|
5984
|
+
}
|
|
5985
|
+
}, isOpen ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.ArrowForward, null) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.ArrowForward, null))), /*#__PURE__*/React__default.createElement("div", {
|
|
5986
|
+
className: "faq-answer",
|
|
5987
|
+
style: isOpen ? {
|
|
5988
|
+
display: "block"
|
|
5989
|
+
} : {
|
|
5990
|
+
display: "none"
|
|
5991
|
+
}
|
|
5992
|
+
}, /*#__PURE__*/React__default.createElement("span", null, t(answer))), !lastIndex ? /*#__PURE__*/React__default.createElement("div", {
|
|
5993
|
+
className: "cs-box-border"
|
|
5994
|
+
}) : null);
|
|
5995
|
+
};
|
|
5996
|
+
|
|
5997
|
+
var FAQsSection = function FAQsSection(_ref) {
|
|
5998
|
+
var _user$info, _data$MdmsRes$common, _data$MdmsRes$common$;
|
|
5999
|
+
|
|
6000
|
+
var module = _ref.module;
|
|
6001
|
+
var user = Digit.UserService.getUser();
|
|
6002
|
+
var tenantId = (user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.tenantId) || Digit.ULBService.getCurrentTenantId();
|
|
6003
|
+
|
|
6004
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
6005
|
+
t = _useTranslation.t;
|
|
6006
|
+
|
|
6007
|
+
var _Digit$Hooks$useGetFA = Digit.Hooks.useGetFAQsJSON(Digit.ULBService.getStateId()),
|
|
6008
|
+
isLoading = _Digit$Hooks$useGetFA.isLoading,
|
|
6009
|
+
data = _Digit$Hooks$useGetFA.data;
|
|
6010
|
+
|
|
6011
|
+
var moduleFaqs = data === null || data === void 0 ? void 0 : (_data$MdmsRes$common = data.MdmsRes["common-masters"]) === null || _data$MdmsRes$common === void 0 ? void 0 : (_data$MdmsRes$common$ = _data$MdmsRes$common.faqs[0]) === null || _data$MdmsRes$common$ === void 0 ? void 0 : _data$MdmsRes$common$["" + module].faqs;
|
|
6012
|
+
|
|
6013
|
+
if (isLoading) {
|
|
6014
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
6015
|
+
}
|
|
6016
|
+
|
|
6017
|
+
return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
6018
|
+
className: "faq-page"
|
|
6019
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.BackButton, {
|
|
6020
|
+
style: {
|
|
6021
|
+
marginLeft: "unset"
|
|
6022
|
+
}
|
|
6023
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
6024
|
+
style: {
|
|
6025
|
+
marginBottom: "15px"
|
|
6026
|
+
}
|
|
6027
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Header, {
|
|
6028
|
+
styles: {
|
|
6029
|
+
marginLeft: "0px",
|
|
6030
|
+
paddingTop: "10px",
|
|
6031
|
+
fontSize: "32px"
|
|
6032
|
+
}
|
|
6033
|
+
}, t("FAQ_S"))), /*#__PURE__*/React__default.createElement("div", {
|
|
6034
|
+
className: "faq-list"
|
|
6035
|
+
}, moduleFaqs.map(function (faq, i) {
|
|
6036
|
+
return /*#__PURE__*/React__default.createElement(FaqComponent, {
|
|
6037
|
+
key: "faq_" + i,
|
|
6038
|
+
question: faq.question,
|
|
6039
|
+
answer: faq.answer,
|
|
6040
|
+
lastIndex: i === (moduleFaqs === null || moduleFaqs === void 0 ? void 0 : moduleFaqs.length) - 1
|
|
6041
|
+
});
|
|
6042
|
+
}))));
|
|
6043
|
+
};
|
|
6044
|
+
|
|
6045
|
+
var HowItWorks = function HowItWorks(_ref) {
|
|
6046
|
+
var _user$info, _data$MdmsRes$common, _data$MdmsRes$common$;
|
|
6047
|
+
|
|
6048
|
+
var module = _ref.module;
|
|
6049
|
+
var user = Digit.UserService.getUser();
|
|
6050
|
+
var tenantId = (user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.tenantId) || Digit.ULBService.getCurrentTenantId();
|
|
6051
|
+
|
|
6052
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
6053
|
+
t = _useTranslation.t;
|
|
6054
|
+
|
|
6055
|
+
var storeData = Digit.SessionStorage.get("initData");
|
|
6056
|
+
var stateInfo = storeData.stateInfo;
|
|
6057
|
+
var selectedLanguage = Digit.StoreData.getCurrentLanguage();
|
|
6058
|
+
|
|
6059
|
+
var _useState = React.useState(selectedLanguage),
|
|
6060
|
+
selected = _useState[0],
|
|
6061
|
+
setselected = _useState[1];
|
|
6062
|
+
|
|
6063
|
+
var handleChangeLanguage = function handleChangeLanguage(language) {
|
|
6064
|
+
setselected(language.value);
|
|
6065
|
+
Digit.LocalizationService.changeLanguage(language.value, stateInfo.code);
|
|
6066
|
+
};
|
|
6067
|
+
|
|
6068
|
+
var _useState2 = React.useState(false),
|
|
6069
|
+
videoPlay = _useState2[0],
|
|
6070
|
+
setVideoPlay = _useState2[1];
|
|
6071
|
+
|
|
6072
|
+
var _useState3 = React.useState(""),
|
|
6073
|
+
vidSrc = _useState3[0],
|
|
6074
|
+
setVidSrc = _useState3[1];
|
|
6075
|
+
|
|
6076
|
+
var ViDSvg = function ViDSvg() {
|
|
6077
|
+
return /*#__PURE__*/React__default.createElement("svg", {
|
|
6078
|
+
width: "24",
|
|
6079
|
+
height: "24",
|
|
6080
|
+
viewBox: "0 0 24 24",
|
|
6081
|
+
fill: "none",
|
|
6082
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
6083
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
6084
|
+
d: "M12 24C5.38053 24 0 18.6143 0 12C0 5.38054 5.38053 1.90735e-06 12 1.90735e-06C18.6143 1.90735e-06 24 5.38054 24 12C24 18.6143 18.6143 24 12 24ZM16.3488 10.7852L11.3855 7.25251C11.1263 7.0701 10.8238 6.97889 10.5214 6.97889C10.291 6.97889 10.0557 7.03172 9.83976 7.14202C9.34054 7.40118 9.02857 7.91006 9.02857 8.46694L9.02877 15.5323C9.02877 16.0892 9.34076 16.5979 9.83996 16.8572C10.3344 17.1116 10.9296 17.0732 11.3857 16.7467L16.349 13.214C16.7426 12.9356 16.9778 12.4795 16.9778 11.9996C16.9776 11.5197 16.7426 11.0636 16.3489 10.7852L16.3488 10.7852Z",
|
|
6085
|
+
fill: "white"
|
|
6086
|
+
}));
|
|
6087
|
+
};
|
|
6088
|
+
|
|
6089
|
+
var onClickVideo = function onClickVideo(vidObj) {
|
|
6090
|
+
if (selected === "hi_IN") {
|
|
6091
|
+
setVidSrc(vidObj["hi_IN"]);
|
|
6092
|
+
} else {
|
|
6093
|
+
setVidSrc(vidObj["en_IN"]);
|
|
6094
|
+
}
|
|
6095
|
+
|
|
6096
|
+
setVideoPlay(true);
|
|
6097
|
+
};
|
|
6098
|
+
|
|
6099
|
+
var onClose = function onClose() {
|
|
6100
|
+
setVideoPlay(false);
|
|
6101
|
+
};
|
|
6102
|
+
|
|
6103
|
+
var _Digit$Hooks$useGetHo = Digit.Hooks.useGetHowItWorksJSON(Digit.ULBService.getStateId()),
|
|
6104
|
+
isLoading = _Digit$Hooks$useGetHo.isLoading,
|
|
6105
|
+
data = _Digit$Hooks$useGetHo.data;
|
|
6106
|
+
|
|
6107
|
+
var mdmsConfigResult = data === null || data === void 0 ? void 0 : (_data$MdmsRes$common = data.MdmsRes["common-masters"]) === null || _data$MdmsRes$common === void 0 ? void 0 : (_data$MdmsRes$common$ = _data$MdmsRes$common.howItWorks[0]) === null || _data$MdmsRes$common$ === void 0 ? void 0 : _data$MdmsRes$common$["" + module];
|
|
6108
|
+
var languages = [{
|
|
6109
|
+
label: "ENGLISH",
|
|
6110
|
+
value: "en_IN"
|
|
6111
|
+
}, {
|
|
6112
|
+
label: "हिंदी",
|
|
6113
|
+
value: "hi_IN"
|
|
6114
|
+
}];
|
|
6115
|
+
|
|
6116
|
+
if (isLoading) {
|
|
6117
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
6118
|
+
}
|
|
6119
|
+
|
|
6120
|
+
return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
6121
|
+
className: "how-it-works-page"
|
|
6122
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.BackButton, null), /*#__PURE__*/React__default.createElement("div", {
|
|
6123
|
+
className: "how-it-works-page-header"
|
|
6124
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Header, null, t("HOW_IT_WORKS"))), /*#__PURE__*/React__default.createElement("div", {
|
|
6125
|
+
className: "language-selector",
|
|
6126
|
+
style: {
|
|
6127
|
+
margin: "10px"
|
|
6128
|
+
}
|
|
6129
|
+
}, languages.map(function (language, index) {
|
|
6130
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
6131
|
+
className: "language-button-container",
|
|
6132
|
+
key: index
|
|
6133
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CustomButton, {
|
|
6134
|
+
selected: language.value === selected,
|
|
6135
|
+
text: language.label,
|
|
4760
6136
|
onClick: function onClick() {
|
|
4761
|
-
return
|
|
6137
|
+
return handleChangeLanguage(language);
|
|
4762
6138
|
}
|
|
4763
|
-
}
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
6139
|
+
}));
|
|
6140
|
+
})), mdmsConfigResult.videosJson.map(function (videos, index) {
|
|
6141
|
+
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
6142
|
+
className: "WhatsNewCard",
|
|
6143
|
+
style: {
|
|
6144
|
+
float: "left",
|
|
6145
|
+
position: "relative",
|
|
6146
|
+
width: "100%",
|
|
6147
|
+
marginBottom: 10
|
|
4768
6148
|
}
|
|
4769
|
-
}, {
|
|
4770
|
-
|
|
4771
|
-
Icon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.DocumentIcon, null),
|
|
6149
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6150
|
+
className: "video-icon",
|
|
4772
6151
|
onClick: function onClick() {
|
|
4773
|
-
return
|
|
6152
|
+
return onClickVideo(videos);
|
|
4774
6153
|
}
|
|
4775
|
-
}
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
6154
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6155
|
+
className: "vid-svg"
|
|
6156
|
+
}, /*#__PURE__*/React__default.createElement(ViDSvg, null))), /*#__PURE__*/React__default.createElement("div", {
|
|
6157
|
+
className: "how-it-works-header-description"
|
|
6158
|
+
}, /*#__PURE__*/React__default.createElement("h2", null, t(videos.headerLabel)), /*#__PURE__*/React__default.createElement("p", null, t(videos.description)))));
|
|
6159
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
6160
|
+
className: "WhatsNewCard",
|
|
6161
|
+
style: {
|
|
6162
|
+
position: "relative",
|
|
6163
|
+
width: "100%",
|
|
6164
|
+
marginBottom: 10,
|
|
6165
|
+
display: "inline-block"
|
|
4781
6166
|
}
|
|
4782
|
-
};
|
|
4783
|
-
return isLoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement("div", {
|
|
4784
|
-
className: "HomePageWrapper"
|
|
4785
6167
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
4786
|
-
className: "
|
|
4787
|
-
}, /*#__PURE__*/React__default.createElement("img", {
|
|
4788
|
-
src: stateInfo === null || stateInfo === void 0 ? void 0 : stateInfo.bannerUrl
|
|
4789
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
4790
|
-
className: "Search"
|
|
4791
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.StandaloneSearchBar, {
|
|
4792
|
-
placeholder: t("CS_COMMON_SEARCH_PLACEHOLDER")
|
|
4793
|
-
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
4794
|
-
className: "ServicesSection"
|
|
4795
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardBasedOptions, allCitizenServicesProps), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardBasedOptions, allInfoAndUpdatesProps)), conditionsToDisableNotificationCountTrigger() ? EventsDataLoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement("div", {
|
|
4796
|
-
className: "WhatsNewSection"
|
|
6168
|
+
className: "how-it-works-pdf-section"
|
|
4797
6169
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
4798
|
-
className: "
|
|
4799
|
-
}, /*#__PURE__*/React__default.createElement("
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
},
|
|
6170
|
+
className: "pdf-icon-header-desc"
|
|
6171
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6172
|
+
className: "pdf-icon"
|
|
6173
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.PDFSvg, null)), /*#__PURE__*/React__default.createElement("div", {
|
|
6174
|
+
className: "pdf-header-desc"
|
|
6175
|
+
}, /*#__PURE__*/React__default.createElement("h2", null, t(mdmsConfigResult.pdfHeader)), /*#__PURE__*/React__default.createElement("p", null, mdmsConfigResult.pdfDesc))), /*#__PURE__*/React__default.createElement("div", {
|
|
6176
|
+
className: "download-icon"
|
|
6177
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.DownloadImgIcon, null)))), videoPlay && /*#__PURE__*/React__default.createElement("div", {
|
|
6178
|
+
className: "how-it-works-video-play"
|
|
6179
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6180
|
+
className: "close-button"
|
|
6181
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CloseSvg, {
|
|
6182
|
+
onClick: onClose
|
|
6183
|
+
})), /*#__PURE__*/React__default.createElement("video", {
|
|
6184
|
+
width: 500,
|
|
6185
|
+
height: 500,
|
|
6186
|
+
controls: true,
|
|
6187
|
+
autoPlay: true
|
|
6188
|
+
}, /*#__PURE__*/React__default.createElement("source", {
|
|
6189
|
+
src: vidSrc,
|
|
6190
|
+
type: "video/mp4"
|
|
6191
|
+
})))));
|
|
4804
6192
|
};
|
|
4805
6193
|
|
|
4806
|
-
var
|
|
6194
|
+
var StaticDynamicCard = function StaticDynamicCard(_ref) {
|
|
6195
|
+
var _mdmsData$MdmsRes$com, _mdmsData$MdmsRes$com2, _mdmsConfigResult$hel, _mdmsConfigResult$hel2, _mdmsConfigResult$hel3, _mdmsConfigResult$hel4, _mdmsConfigResult$hel5, _mdmsConfigResult$hel6, _staticData, _staticData2, _staticData3, _staticData4, _staticData5, _staticContent, _staticContent2, _staticContent3;
|
|
6196
|
+
|
|
6197
|
+
var moduleCode = _ref.moduleCode;
|
|
6198
|
+
|
|
4807
6199
|
var _useTranslation = reactI18next.useTranslation(),
|
|
4808
6200
|
t = _useTranslation.t;
|
|
4809
6201
|
|
|
4810
|
-
var
|
|
6202
|
+
var tenantId = Digit.ULBService.getCitizenCurrentTenant();
|
|
4811
6203
|
|
|
4812
|
-
var _Digit$Hooks$
|
|
4813
|
-
|
|
6204
|
+
var _Digit$Hooks$useStati = Digit.Hooks.useStaticData(Digit.ULBService.getStateId()),
|
|
6205
|
+
isMdmsLoading = _Digit$Hooks$useStati.isLoading,
|
|
6206
|
+
mdmsData = _Digit$Hooks$useStati.data;
|
|
4814
6207
|
|
|
4815
|
-
_Digit$Hooks$
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
};
|
|
4825
|
-
}, [t]);
|
|
4826
|
-
var RadioButtonProps = React.useMemo(function () {
|
|
4827
|
-
return {
|
|
4828
|
-
options: languages,
|
|
4829
|
-
optionsKey: "label",
|
|
4830
|
-
additionalWrapperClass: "reverse-radio-selection-wrapper",
|
|
4831
|
-
onSelect: function onSelect(language) {
|
|
4832
|
-
return Digit.LocalizationService.changeLanguage(language.value, stateInfo.code);
|
|
4833
|
-
},
|
|
4834
|
-
selectedOption: languages === null || languages === void 0 ? void 0 : languages.filter(function (i) {
|
|
4835
|
-
return i.value === selectedLanguage;
|
|
4836
|
-
})[0]
|
|
4837
|
-
};
|
|
4838
|
-
}, [selectedLanguage, languages]);
|
|
6208
|
+
var _Digit$Hooks$useDynam = Digit.Hooks.useDynamicData({
|
|
6209
|
+
moduleCode: moduleCode,
|
|
6210
|
+
tenantId: tenantId,
|
|
6211
|
+
filters: {},
|
|
6212
|
+
t: t
|
|
6213
|
+
}),
|
|
6214
|
+
isSearchLoading = _Digit$Hooks$useDynam.isLoading,
|
|
6215
|
+
error = _Digit$Hooks$useDynam.error,
|
|
6216
|
+
dynamicData = _Digit$Hooks$useDynam.data;
|
|
4839
6217
|
|
|
4840
|
-
function
|
|
4841
|
-
|
|
4842
|
-
}
|
|
6218
|
+
var handleClickOnWhatsApp = function handleClickOnWhatsApp(obj) {
|
|
6219
|
+
window.open(obj);
|
|
6220
|
+
};
|
|
4843
6221
|
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, null, t("CS_COMMON_CHOOSE_LANGUAGE")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.RadioButtons, RadioButtonProps));
|
|
4848
|
-
};
|
|
6222
|
+
var IconComponent = function IconComponent(_ref2) {
|
|
6223
|
+
var module = _ref2.module,
|
|
6224
|
+
styles = _ref2.styles;
|
|
4849
6225
|
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
6226
|
+
switch (module) {
|
|
6227
|
+
case 'TL':
|
|
6228
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.CaseIcon, {
|
|
6229
|
+
className: "fill-path-primary-main",
|
|
6230
|
+
styles: styles
|
|
6231
|
+
});
|
|
4853
6232
|
|
|
4854
|
-
|
|
6233
|
+
case 'PT':
|
|
6234
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.PTIcon, {
|
|
6235
|
+
className: "fill-path-primary-main",
|
|
6236
|
+
styles: styles
|
|
6237
|
+
});
|
|
4855
6238
|
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
6239
|
+
case 'MCOLLECT':
|
|
6240
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.MCollectIcon, {
|
|
6241
|
+
className: "fill-path-primary-main",
|
|
6242
|
+
styles: styles
|
|
6243
|
+
});
|
|
4859
6244
|
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
selectedCity = _useState[0],
|
|
4866
|
-
setSelectedCity = _useState[1];
|
|
6245
|
+
case 'PGR':
|
|
6246
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.ComplaintIcon, {
|
|
6247
|
+
className: "fill-path-primary-main",
|
|
6248
|
+
styles: styles
|
|
6249
|
+
});
|
|
4867
6250
|
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
6251
|
+
default:
|
|
6252
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.CaseIcon, {
|
|
6253
|
+
className: "fill-path-primary-main",
|
|
6254
|
+
styles: styles
|
|
6255
|
+
});
|
|
6256
|
+
}
|
|
6257
|
+
};
|
|
4871
6258
|
|
|
4872
|
-
var
|
|
4873
|
-
return {
|
|
4874
|
-
header: t("CS_COMMON_CHOOSE_LOCATION"),
|
|
4875
|
-
submitBarLabel: t("CORE_COMMON_CONTINUE")
|
|
4876
|
-
};
|
|
4877
|
-
}, [t]);
|
|
6259
|
+
var mdmsConfigResult = mdmsData === null || mdmsData === void 0 ? void 0 : (_mdmsData$MdmsRes$com = mdmsData.MdmsRes["common-masters"]) === null || _mdmsData$MdmsRes$com === void 0 ? void 0 : (_mdmsData$MdmsRes$com2 = _mdmsData$MdmsRes$com.StaticData[0]) === null || _mdmsData$MdmsRes$com2 === void 0 ? void 0 : _mdmsData$MdmsRes$com2["" + moduleCode];
|
|
4878
6260
|
|
|
4879
|
-
function
|
|
4880
|
-
|
|
4881
|
-
setShowError(false);
|
|
4882
|
-
}
|
|
6261
|
+
var StaticDataIconComponentOne = function StaticDataIconComponentOne(_ref3) {
|
|
6262
|
+
var module = _ref3.module;
|
|
4883
6263
|
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
selectedOption: selectedCity
|
|
4891
|
-
};
|
|
4892
|
-
}, [cities, t, selectedCity]);
|
|
6264
|
+
switch (module) {
|
|
6265
|
+
case 'PT':
|
|
6266
|
+
case 'WS':
|
|
6267
|
+
return /*#__PURE__*/React__default.createElement("span", {
|
|
6268
|
+
className: "timerIcon"
|
|
6269
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TimerIcon, null));
|
|
4893
6270
|
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
6271
|
+
default:
|
|
6272
|
+
return null;
|
|
6273
|
+
}
|
|
6274
|
+
};
|
|
6275
|
+
|
|
6276
|
+
var StaticDataIconComponentTwo = function StaticDataIconComponentTwo(_ref4) {
|
|
6277
|
+
var module = _ref4.module;
|
|
6278
|
+
|
|
6279
|
+
switch (module) {
|
|
6280
|
+
case 'PT':
|
|
6281
|
+
return /*#__PURE__*/React__default.createElement("span", {
|
|
6282
|
+
className: "rupeeSymbol"
|
|
6283
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.RupeeSymbol, null));
|
|
6284
|
+
|
|
6285
|
+
case 'WS':
|
|
6286
|
+
return /*#__PURE__*/React__default.createElement("span", {
|
|
6287
|
+
className: "timerIcon"
|
|
6288
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TimerIcon, null));
|
|
6289
|
+
|
|
6290
|
+
default:
|
|
6291
|
+
return null;
|
|
6292
|
+
}
|
|
6293
|
+
};
|
|
6294
|
+
|
|
6295
|
+
var staticContent = function staticContent(module) {
|
|
6296
|
+
switch (module) {
|
|
6297
|
+
case 'TL':
|
|
6298
|
+
case 'PT':
|
|
6299
|
+
case 'MCOLLECT':
|
|
6300
|
+
return {
|
|
6301
|
+
staticCommonContent: t("COMMON_VALIDITY"),
|
|
6302
|
+
validity: (mdmsConfigResult === null || mdmsConfigResult === void 0 ? void 0 : mdmsConfigResult.validity) + ((mdmsConfigResult === null || mdmsConfigResult === void 0 ? void 0 : mdmsConfigResult.validity) === "1" ? t("COMMON_DAY") : t("COMMON_DAYS"))
|
|
6303
|
+
};
|
|
6304
|
+
|
|
6305
|
+
case 'PGR':
|
|
6306
|
+
return {
|
|
6307
|
+
staticCommonContent: t("ACTION_TEST_COMPLAINT_TYPES")
|
|
6308
|
+
};
|
|
6309
|
+
|
|
6310
|
+
case 'OBPS':
|
|
6311
|
+
return {
|
|
6312
|
+
staticCommonContent: t("BUILDING_PLAN_PERMIT_VALIDITY"),
|
|
6313
|
+
validity: (mdmsConfigResult === null || mdmsConfigResult === void 0 ? void 0 : mdmsConfigResult.validity) + " " + ((mdmsConfigResult === null || mdmsConfigResult === void 0 ? void 0 : mdmsConfigResult.validity) === "1" ? t("COMMON_DAY") : t("COMMON_DAYS"))
|
|
6314
|
+
};
|
|
6315
|
+
|
|
6316
|
+
default:
|
|
6317
|
+
return {
|
|
6318
|
+
staticCommonContent: ""
|
|
6319
|
+
};
|
|
6320
|
+
}
|
|
6321
|
+
};
|
|
6322
|
+
|
|
6323
|
+
var staticData = function staticData(module) {
|
|
6324
|
+
switch (module) {
|
|
6325
|
+
case 'PT':
|
|
6326
|
+
return {
|
|
6327
|
+
staticDataOne: (mdmsConfigResult === null || mdmsConfigResult === void 0 ? void 0 : mdmsConfigResult.staticDataOne) + " " + t("COMMON_DAYS"),
|
|
6328
|
+
staticDataOneHeader: t("APPLICATION_PROCESSING_TIME"),
|
|
6329
|
+
staticDataTwo: mdmsConfigResult === null || mdmsConfigResult === void 0 ? void 0 : mdmsConfigResult.staticDataTwo,
|
|
6330
|
+
staticDataTwoHeader: t("APPLICATION_PROCESSING_FEE")
|
|
6331
|
+
};
|
|
6332
|
+
|
|
6333
|
+
case 'WS':
|
|
6334
|
+
return {
|
|
6335
|
+
staticDataOne: "",
|
|
6336
|
+
staticDataOneHeader: t("PAY_WATER_CHARGES_BY") + " " + (mdmsConfigResult === null || mdmsConfigResult === void 0 ? void 0 : mdmsConfigResult.staticDataOne) + " " + t("COMMON_DAYS") + " " + t("OF_BILL_GEN_TO_AVOID_LATE_FEE"),
|
|
6337
|
+
staticDataTwo: (mdmsConfigResult === null || mdmsConfigResult === void 0 ? void 0 : mdmsConfigResult.staticDataTwo) + " " + t("COMMON_DAYS"),
|
|
6338
|
+
staticDataTwoHeader: t("APPLICATION_PROCESSING_TIME")
|
|
6339
|
+
};
|
|
6340
|
+
|
|
6341
|
+
default:
|
|
6342
|
+
return {};
|
|
4900
6343
|
}
|
|
6344
|
+
};
|
|
6345
|
+
|
|
6346
|
+
if (isMdmsLoading || isSearchLoading) {
|
|
6347
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
4901
6348
|
}
|
|
4902
6349
|
|
|
4903
|
-
return
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
6350
|
+
return mdmsConfigResult ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, mdmsConfigResult && mdmsConfigResult !== null && mdmsConfigResult !== void 0 && mdmsConfigResult.payViaWhatsApp ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
6351
|
+
style: {
|
|
6352
|
+
margin: "16px",
|
|
6353
|
+
padding: "16px",
|
|
6354
|
+
maxWidth: "unset"
|
|
6355
|
+
}
|
|
6356
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6357
|
+
className: "pay-whatsapp-card",
|
|
6358
|
+
onClick: function onClick() {
|
|
6359
|
+
return handleClickOnWhatsApp(mdmsConfigResult === null || mdmsConfigResult === void 0 ? void 0 : mdmsConfigResult.payViaWhatsApp);
|
|
6360
|
+
}
|
|
6361
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6362
|
+
className: "pay-whatsapp-text"
|
|
6363
|
+
}, t("PAY_VIA_WHATSAPP")), /*#__PURE__*/React__default.createElement("div", {
|
|
6364
|
+
className: "whatsAppIconG"
|
|
6365
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.WhatsappIconGreen, null)))) : null, mdmsConfigResult && mdmsConfigResult !== null && mdmsConfigResult !== void 0 && mdmsConfigResult.helpline ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
6366
|
+
style: {
|
|
6367
|
+
margin: "16px",
|
|
6368
|
+
padding: "16px",
|
|
6369
|
+
maxWidth: "unset"
|
|
6370
|
+
}
|
|
6371
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6372
|
+
className: "static-home-Card"
|
|
6373
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6374
|
+
className: "static-home-Card-header"
|
|
6375
|
+
}, t("CALL_CENTER_HELPLINE")), /*#__PURE__*/React__default.createElement("div", {
|
|
6376
|
+
className: "helplineIcon"
|
|
6377
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.HelpLineIcon, null))), /*#__PURE__*/React__default.createElement("div", {
|
|
6378
|
+
className: "call-center-card-text"
|
|
6379
|
+
}, mdmsConfigResult !== null && mdmsConfigResult !== void 0 && (_mdmsConfigResult$hel = mdmsConfigResult.helpline) !== null && _mdmsConfigResult$hel !== void 0 && _mdmsConfigResult$hel.contactOne ? /*#__PURE__*/React__default.createElement("div", {
|
|
6380
|
+
className: "call-center-card-content"
|
|
6381
|
+
}, /*#__PURE__*/React__default.createElement("a", {
|
|
6382
|
+
href: "tel:" + (mdmsConfigResult === null || mdmsConfigResult === void 0 ? void 0 : (_mdmsConfigResult$hel2 = mdmsConfigResult.helpline) === null || _mdmsConfigResult$hel2 === void 0 ? void 0 : _mdmsConfigResult$hel2.contactOne)
|
|
6383
|
+
}, mdmsConfigResult === null || mdmsConfigResult === void 0 ? void 0 : (_mdmsConfigResult$hel3 = mdmsConfigResult.helpline) === null || _mdmsConfigResult$hel3 === void 0 ? void 0 : _mdmsConfigResult$hel3.contactOne)) : null, mdmsConfigResult !== null && mdmsConfigResult !== void 0 && (_mdmsConfigResult$hel4 = mdmsConfigResult.helpline) !== null && _mdmsConfigResult$hel4 !== void 0 && _mdmsConfigResult$hel4.contactTwo ? /*#__PURE__*/React__default.createElement("div", {
|
|
6384
|
+
className: "call-center-card-content"
|
|
6385
|
+
}, /*#__PURE__*/React__default.createElement("a", {
|
|
6386
|
+
href: "tel:" + (mdmsConfigResult === null || mdmsConfigResult === void 0 ? void 0 : (_mdmsConfigResult$hel5 = mdmsConfigResult.helpline) === null || _mdmsConfigResult$hel5 === void 0 ? void 0 : _mdmsConfigResult$hel5.contactTwo)
|
|
6387
|
+
}, mdmsConfigResult === null || mdmsConfigResult === void 0 ? void 0 : (_mdmsConfigResult$hel6 = mdmsConfigResult.helpline) === null || _mdmsConfigResult$hel6 === void 0 ? void 0 : _mdmsConfigResult$hel6.contactTwo)) : null)) : null, mdmsConfigResult && mdmsConfigResult !== null && mdmsConfigResult !== void 0 && mdmsConfigResult.serviceCenter ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
6388
|
+
style: {
|
|
6389
|
+
margin: "16px",
|
|
6390
|
+
padding: "16px",
|
|
6391
|
+
maxWidth: "unset"
|
|
6392
|
+
}
|
|
6393
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6394
|
+
className: "static-home-Card"
|
|
6395
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6396
|
+
className: "static-home-Card-header"
|
|
6397
|
+
}, t("CITIZEN_SERVICE_CENTER")), /*#__PURE__*/React__default.createElement("div", {
|
|
6398
|
+
className: "serviceCentrIcon"
|
|
6399
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.ServiceCenterIcon, null))), /*#__PURE__*/React__default.createElement("div", {
|
|
6400
|
+
className: "service-center-details-card"
|
|
6401
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6402
|
+
className: "service-center-details-text"
|
|
6403
|
+
}, mdmsConfigResult === null || mdmsConfigResult === void 0 ? void 0 : mdmsConfigResult.serviceCenter)), mdmsConfigResult !== null && mdmsConfigResult !== void 0 && mdmsConfigResult.viewMapLocation ? /*#__PURE__*/React__default.createElement("div", {
|
|
6404
|
+
className: "link"
|
|
6405
|
+
}, /*#__PURE__*/React__default.createElement("a", {
|
|
6406
|
+
href: mdmsConfigResult === null || mdmsConfigResult === void 0 ? void 0 : mdmsConfigResult.viewMapLocation
|
|
6407
|
+
}, t("VIEW_ON_MAP"))) : null) : /*#__PURE__*/React__default.createElement("div", null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
6408
|
+
style: {
|
|
6409
|
+
margin: "16px",
|
|
6410
|
+
padding: "16px",
|
|
6411
|
+
maxWidth: "unset"
|
|
6412
|
+
}
|
|
6413
|
+
}, error || dynamicData == null || (dynamicData === null || dynamicData === void 0 ? void 0 : dynamicData.dynamicDataOne) === null ? /*#__PURE__*/React__default.createElement("div", null) : /*#__PURE__*/React__default.createElement("div", {
|
|
6414
|
+
className: "dynamicDataCard"
|
|
6415
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6416
|
+
className: "dynamicData"
|
|
6417
|
+
}, /*#__PURE__*/React__default.createElement(IconComponent, {
|
|
6418
|
+
module: moduleCode,
|
|
6419
|
+
styles: {
|
|
6420
|
+
width: "24px",
|
|
6421
|
+
height: "24px"
|
|
6422
|
+
}
|
|
6423
|
+
}), /*#__PURE__*/React__default.createElement("span", {
|
|
6424
|
+
className: "dynamicData-content"
|
|
6425
|
+
}, dynamicData === null || dynamicData === void 0 ? void 0 : dynamicData.dynamicDataOne))), error || dynamicData == null || (dynamicData === null || dynamicData === void 0 ? void 0 : dynamicData.dynamicDataTwo) === null ? /*#__PURE__*/React__default.createElement("div", null) : /*#__PURE__*/React__default.createElement("div", {
|
|
6426
|
+
className: "dynamicDataCard"
|
|
6427
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6428
|
+
className: "dynamicData"
|
|
6429
|
+
}, /*#__PURE__*/React__default.createElement(IconComponent, {
|
|
6430
|
+
module: moduleCode,
|
|
6431
|
+
styles: {
|
|
6432
|
+
width: "24px",
|
|
6433
|
+
height: "24px"
|
|
6434
|
+
}
|
|
6435
|
+
}), /*#__PURE__*/React__default.createElement("span", {
|
|
6436
|
+
className: "dynamicData-content"
|
|
6437
|
+
}, dynamicData === null || dynamicData === void 0 ? void 0 : dynamicData.dynamicDataTwo))), mdmsConfigResult && mdmsConfigResult !== null && mdmsConfigResult !== void 0 && mdmsConfigResult.staticDataOne ? /*#__PURE__*/React__default.createElement("div", {
|
|
6438
|
+
className: "staticDataCard"
|
|
6439
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6440
|
+
className: "staticData"
|
|
6441
|
+
}, /*#__PURE__*/React__default.createElement(StaticDataIconComponentOne, {
|
|
6442
|
+
module: moduleCode
|
|
6443
|
+
}), /*#__PURE__*/React__default.createElement("span", {
|
|
6444
|
+
className: "static-data-content"
|
|
6445
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
6446
|
+
className: "static-data-content-first",
|
|
6447
|
+
style: {
|
|
6448
|
+
marginTop: ((_staticData = staticData(moduleCode)) === null || _staticData === void 0 ? void 0 : _staticData.staticDataOne) === "" ? "8px" : "unset"
|
|
6449
|
+
}
|
|
6450
|
+
}, (_staticData2 = staticData(moduleCode)) === null || _staticData2 === void 0 ? void 0 : _staticData2.staticDataOneHeader), /*#__PURE__*/React__default.createElement("span", {
|
|
6451
|
+
className: "static-data-content-second"
|
|
6452
|
+
}, "" + ((_staticData3 = staticData(moduleCode)) === null || _staticData3 === void 0 ? void 0 : _staticData3.staticDataOne))))) : /*#__PURE__*/React__default.createElement("div", null), mdmsConfigResult && mdmsConfigResult !== null && mdmsConfigResult !== void 0 && mdmsConfigResult.staticDataTwo ? /*#__PURE__*/React__default.createElement("div", {
|
|
6453
|
+
className: "staticDataCard"
|
|
6454
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6455
|
+
className: "staticData"
|
|
6456
|
+
}, /*#__PURE__*/React__default.createElement(StaticDataIconComponentTwo, {
|
|
6457
|
+
module: moduleCode
|
|
6458
|
+
}), /*#__PURE__*/React__default.createElement("span", {
|
|
6459
|
+
className: "static-data-content"
|
|
6460
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
6461
|
+
className: "static-data-content-first"
|
|
6462
|
+
}, (_staticData4 = staticData(moduleCode)) === null || _staticData4 === void 0 ? void 0 : _staticData4.staticDataTwoHeader), /*#__PURE__*/React__default.createElement("span", {
|
|
6463
|
+
className: "static-data-content-second"
|
|
6464
|
+
}, (_staticData5 = staticData(moduleCode)) === null || _staticData5 === void 0 ? void 0 : _staticData5.staticDataTwo)))) : /*#__PURE__*/React__default.createElement("div", null), mdmsConfigResult && mdmsConfigResult !== null && mdmsConfigResult !== void 0 && mdmsConfigResult.validity ? /*#__PURE__*/React__default.createElement("div", {
|
|
6465
|
+
className: "staticDataCard"
|
|
6466
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6467
|
+
className: "staticData"
|
|
6468
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
6469
|
+
className: "validityIcon"
|
|
6470
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.ValidityTimeIcon, null)), /*#__PURE__*/React__default.createElement("span", {
|
|
6471
|
+
className: "static-data-content"
|
|
6472
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
6473
|
+
className: "static-data-content-first"
|
|
6474
|
+
}, (_staticContent = staticContent(moduleCode)) === null || _staticContent === void 0 ? void 0 : _staticContent.staticCommonContent), /*#__PURE__*/React__default.createElement("span", {
|
|
6475
|
+
className: "static-data-content-second"
|
|
6476
|
+
}, (_staticContent2 = staticContent(moduleCode)) === null || _staticContent2 === void 0 ? void 0 : _staticContent2.validity)))) : /*#__PURE__*/React__default.createElement("div", null), error || dynamicData == null || !(dynamicData !== null && dynamicData !== void 0 && dynamicData.staticData) || (dynamicData === null || dynamicData === void 0 ? void 0 : dynamicData.staticData) === null ? /*#__PURE__*/React__default.createElement("div", null) : /*#__PURE__*/React__default.createElement("div", {
|
|
6477
|
+
className: "staticDataCard"
|
|
6478
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6479
|
+
className: "staticData"
|
|
6480
|
+
}, moduleCode === "PGR" ? /*#__PURE__*/React__default.createElement(IconComponent, {
|
|
6481
|
+
module: moduleCode,
|
|
6482
|
+
styles: {
|
|
6483
|
+
width: "24px",
|
|
6484
|
+
height: "24px",
|
|
6485
|
+
marginLeft: "13px",
|
|
6486
|
+
marginTop: "12px"
|
|
6487
|
+
}
|
|
6488
|
+
}) : /*#__PURE__*/React__default.createElement("span", {
|
|
6489
|
+
className: "validityIcon"
|
|
6490
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.ValidityTimeIcon, null)), /*#__PURE__*/React__default.createElement("span", {
|
|
6491
|
+
className: "static-data-content"
|
|
6492
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
6493
|
+
className: "static-data-content-first"
|
|
6494
|
+
}, (_staticContent3 = staticContent(moduleCode)) === null || _staticContent3 === void 0 ? void 0 : _staticContent3.staticCommonContent), /*#__PURE__*/React__default.createElement("span", {
|
|
6495
|
+
className: "static-data-content-second"
|
|
6496
|
+
}, dynamicData === null || dynamicData === void 0 ? void 0 : dynamicData.staticData)))))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
4909
6497
|
};
|
|
4910
6498
|
|
|
6499
|
+
var sidebarHiddenFor = ["digit-ui/citizen/register/name", "/digit-ui/citizen/select-language", "/digit-ui/citizen/select-location", "/digit-ui/citizen/login", "/digit-ui/citizen/register/otp"];
|
|
6500
|
+
|
|
4911
6501
|
var getTenants$1 = function getTenants(codes, tenants) {
|
|
4912
6502
|
return tenants.filter(function (tenant) {
|
|
4913
6503
|
return codes.map(function (item) {
|
|
@@ -4929,7 +6519,31 @@ var Home$1 = function Home$1(_ref) {
|
|
|
4929
6519
|
stateCode = _ref.stateCode,
|
|
4930
6520
|
modules = _ref.modules,
|
|
4931
6521
|
appTenants = _ref.appTenants,
|
|
4932
|
-
pathname = _ref.pathname
|
|
6522
|
+
pathname = _ref.pathname,
|
|
6523
|
+
initData = _ref.initData;
|
|
6524
|
+
|
|
6525
|
+
var _Digit$Hooks$useCusto = Digit.Hooks.useCustomMDMS(Digit.ULBService.getStateId(), "ACCESSCONTROL-ACTIONS-TEST", [{
|
|
6526
|
+
name: "actions-test",
|
|
6527
|
+
filter: "[?(@.url == 'digit-ui-card')]"
|
|
6528
|
+
}], {
|
|
6529
|
+
select: function select(data) {
|
|
6530
|
+
var _data$ACCESSCONTROLA, _data$ACCESSCONTROLA$;
|
|
6531
|
+
|
|
6532
|
+
var formattedData = data === null || data === void 0 ? void 0 : (_data$ACCESSCONTROLA = data["ACCESSCONTROL-ACTIONS-TEST"]) === null || _data$ACCESSCONTROLA === void 0 ? void 0 : (_data$ACCESSCONTROLA$ = _data$ACCESSCONTROLA["actions-test"]) === null || _data$ACCESSCONTROLA$ === void 0 ? void 0 : _data$ACCESSCONTROLA$.filter(function (el) {
|
|
6533
|
+
return el.enabled === true;
|
|
6534
|
+
}).reduce(function (a, b) {
|
|
6535
|
+
var _a$b$parentModule;
|
|
6536
|
+
|
|
6537
|
+
a[b.parentModule] = ((_a$b$parentModule = a[b.parentModule]) === null || _a$b$parentModule === void 0 ? void 0 : _a$b$parentModule.length) > 0 ? [b].concat(a[b.parentModule]) : [b];
|
|
6538
|
+
return a;
|
|
6539
|
+
}, {});
|
|
6540
|
+
return formattedData;
|
|
6541
|
+
}
|
|
6542
|
+
}),
|
|
6543
|
+
islinkDataLoading = _Digit$Hooks$useCusto.isLoading,
|
|
6544
|
+
linkData = _Digit$Hooks$useCusto.data,
|
|
6545
|
+
isLinkDataFetched = _Digit$Hooks$useCusto.isFetched;
|
|
6546
|
+
|
|
4933
6547
|
var classname = Digit.Hooks.fsm.useRouteSubscription(pathname);
|
|
4934
6548
|
|
|
4935
6549
|
var _useTranslation = reactI18next.useTranslation(),
|
|
@@ -4938,11 +6552,16 @@ var Home$1 = function Home$1(_ref) {
|
|
|
4938
6552
|
var _useRouteMatch = reactRouterDom.useRouteMatch(),
|
|
4939
6553
|
path = _useRouteMatch.path;
|
|
4940
6554
|
|
|
6555
|
+
var history = reactRouterDom.useHistory();
|
|
6556
|
+
|
|
6557
|
+
var hideSidebar = sidebarHiddenFor.some(function (e) {
|
|
6558
|
+
return window.location.href.includes(e);
|
|
6559
|
+
});
|
|
4941
6560
|
var appRoutes = modules.map(function (_ref2, index) {
|
|
4942
6561
|
var code = _ref2.code,
|
|
4943
6562
|
tenants = _ref2.tenants;
|
|
4944
6563
|
var Module = Digit.ComponentRegistryService.getComponent(code + "Module");
|
|
4945
|
-
return /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
6564
|
+
return Module ? /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
4946
6565
|
key: index,
|
|
4947
6566
|
path: path + "/" + code.toLowerCase()
|
|
4948
6567
|
}, /*#__PURE__*/React__default.createElement(Module, {
|
|
@@ -4950,7 +6569,7 @@ var Home$1 = function Home$1(_ref) {
|
|
|
4950
6569
|
moduleCode: code,
|
|
4951
6570
|
userType: "citizen",
|
|
4952
6571
|
tenants: getTenants$1(tenants, appTenants)
|
|
4953
|
-
}));
|
|
6572
|
+
})) : null;
|
|
4954
6573
|
});
|
|
4955
6574
|
var ModuleLevelLinkHomePages = modules.map(function (_ref3, index) {
|
|
4956
6575
|
var code = _ref3.code,
|
|
@@ -4960,7 +6579,15 @@ var Home$1 = function Home$1(_ref) {
|
|
|
4960
6579
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
4961
6580
|
};
|
|
4962
6581
|
|
|
4963
|
-
|
|
6582
|
+
var mdmsDataObj = isLinkDataFetched ? processLinkData(linkData, code, t) : undefined;
|
|
6583
|
+
|
|
6584
|
+
if ((mdmsDataObj === null || mdmsDataObj === void 0 ? void 0 : mdmsDataObj.header) === "ACTION_TEST_WS") {
|
|
6585
|
+
mdmsDataObj === null || mdmsDataObj === void 0 ? void 0 : mdmsDataObj.links.sort(function (a, b) {
|
|
6586
|
+
return b.orderNumber - a.orderNumber;
|
|
6587
|
+
});
|
|
6588
|
+
}
|
|
6589
|
+
|
|
6590
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
4964
6591
|
key: index,
|
|
4965
6592
|
path: path + "/" + code.toLowerCase() + "-home"
|
|
4966
6593
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -4970,12 +6597,37 @@ var Home$1 = function Home$1(_ref) {
|
|
|
4970
6597
|
alt: "noimagefound"
|
|
4971
6598
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.BackButton, {
|
|
4972
6599
|
className: "moduleLinkHomePageBackButton"
|
|
4973
|
-
}), /*#__PURE__*/React__default.createElement("h1", null, t("MODULE_" + code.toUpperCase()))
|
|
6600
|
+
}), /*#__PURE__*/React__default.createElement("h1", null, t("MODULE_" + code.toUpperCase())), /*#__PURE__*/React__default.createElement("div", {
|
|
4974
6601
|
className: "moduleLinkHomePageModuleLinks"
|
|
4975
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
6602
|
+
}, mdmsDataObj && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CitizenHomeCard, {
|
|
6603
|
+
header: t(mdmsDataObj === null || mdmsDataObj === void 0 ? void 0 : mdmsDataObj.header),
|
|
6604
|
+
links: mdmsDataObj === null || mdmsDataObj === void 0 ? void 0 : mdmsDataObj.links,
|
|
6605
|
+
Icon: function Icon() {
|
|
6606
|
+
return /*#__PURE__*/React__default.createElement("span", null);
|
|
6607
|
+
},
|
|
6608
|
+
Info: code === "OBPS" ? function () {
|
|
6609
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.CitizenInfoLabel, {
|
|
6610
|
+
style: {
|
|
6611
|
+
margin: "0px",
|
|
6612
|
+
padding: "10px"
|
|
6613
|
+
},
|
|
6614
|
+
info: t("CS_FILE_APPLICATION_INFO_LABEL"),
|
|
6615
|
+
text: t("BPA_CITIZEN_HOME_STAKEHOLDER_INCLUDES_INFO_LABEL")
|
|
6616
|
+
});
|
|
6617
|
+
} : null,
|
|
6618
|
+
isInfo: code === "OBPS" ? true : false
|
|
6619
|
+
})), /*#__PURE__*/React__default.createElement(StaticDynamicCard, {
|
|
6620
|
+
moduleCode: code === null || code === void 0 ? void 0 : code.toUpperCase()
|
|
6621
|
+
}))), /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
6622
|
+
key: "faq" + index,
|
|
6623
|
+
path: path + "/" + code.toLowerCase() + "-faq"
|
|
6624
|
+
}, /*#__PURE__*/React__default.createElement(FAQsSection, {
|
|
6625
|
+
module: code === null || code === void 0 ? void 0 : code.toUpperCase()
|
|
6626
|
+
})), /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
6627
|
+
key: "hiw" + index,
|
|
6628
|
+
path: path + "/" + code.toLowerCase() + "-how-it-works"
|
|
6629
|
+
}, /*#__PURE__*/React__default.createElement(HowItWorks, {
|
|
6630
|
+
module: code === null || code === void 0 ? void 0 : code.toUpperCase()
|
|
4979
6631
|
})));
|
|
4980
6632
|
});
|
|
4981
6633
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -4989,10 +6641,17 @@ var Home$1 = function Home$1(_ref) {
|
|
|
4989
6641
|
mobileView: mobileView,
|
|
4990
6642
|
handleUserDropdownSelection: handleUserDropdownSelection,
|
|
4991
6643
|
logoUrl: logoUrl,
|
|
4992
|
-
showSidebar: true
|
|
6644
|
+
showSidebar: true,
|
|
6645
|
+
linkData: linkData,
|
|
6646
|
+
islinkDataLoading: islinkDataLoading
|
|
4993
6647
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
4994
|
-
className: "main center-container mb-25"
|
|
4995
|
-
},
|
|
6648
|
+
className: "main center-container citizen-home-container mb-25"
|
|
6649
|
+
}, hideSidebar ? null : /*#__PURE__*/React__default.createElement("div", {
|
|
6650
|
+
className: "SideBarStatic"
|
|
6651
|
+
}, /*#__PURE__*/React__default.createElement(StaticCitizenSideBar, {
|
|
6652
|
+
linkData: linkData,
|
|
6653
|
+
islinkDataLoading: islinkDataLoading
|
|
6654
|
+
})), /*#__PURE__*/React__default.createElement(reactRouterDom.Switch, null, /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
4996
6655
|
exact: true,
|
|
4997
6656
|
path: path
|
|
4998
6657
|
}, /*#__PURE__*/React__default.createElement(Home, null)), /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
@@ -5002,10 +6661,20 @@ var Home$1 = function Home$1(_ref) {
|
|
|
5002
6661
|
exact: true,
|
|
5003
6662
|
path: path + "/select-location"
|
|
5004
6663
|
}, /*#__PURE__*/React__default.createElement(LocationSelection, null)), /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
6664
|
+
path: path + "/error"
|
|
6665
|
+
}, /*#__PURE__*/React__default.createElement(ErrorComponent, {
|
|
6666
|
+
initData: initData,
|
|
6667
|
+
goToHome: function goToHome() {
|
|
6668
|
+
history.push("/digit-ui/citizen");
|
|
6669
|
+
}
|
|
6670
|
+
})), /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
5005
6671
|
path: path + "/all-services"
|
|
5006
6672
|
}, /*#__PURE__*/React__default.createElement(AppHome, {
|
|
5007
6673
|
userType: "citizen",
|
|
5008
|
-
modules: modules
|
|
6674
|
+
modules: modules,
|
|
6675
|
+
getCitizenMenu: linkData,
|
|
6676
|
+
fetchedCitizen: isLinkDataFetched,
|
|
6677
|
+
isLoading: islinkDataLoading
|
|
5009
6678
|
})), /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
5010
6679
|
path: path + "/login"
|
|
5011
6680
|
}, /*#__PURE__*/React__default.createElement(Login, {
|
|
@@ -5021,7 +6690,9 @@ var Home$1 = function Home$1(_ref) {
|
|
|
5021
6690
|
stateCode: stateCode,
|
|
5022
6691
|
userType: "citizen",
|
|
5023
6692
|
cityDetails: cityDetails
|
|
5024
|
-
})), /*#__PURE__*/React__default.createElement(ErrorBoundary,
|
|
6693
|
+
})), /*#__PURE__*/React__default.createElement(ErrorBoundary, {
|
|
6694
|
+
initData: initData
|
|
6695
|
+
}, appRoutes, ModuleLevelLinkHomePages))), /*#__PURE__*/React__default.createElement("div", {
|
|
5025
6696
|
className: "citizen-home-footer",
|
|
5026
6697
|
style: window.location.href.includes("citizen/obps") ? {
|
|
5027
6698
|
zIndex: "-1"
|
|
@@ -5047,7 +6718,8 @@ var DigitApp = function DigitApp(_ref) {
|
|
|
5047
6718
|
var stateCode = _ref.stateCode,
|
|
5048
6719
|
modules = _ref.modules,
|
|
5049
6720
|
appTenants = _ref.appTenants,
|
|
5050
|
-
logoUrl = _ref.logoUrl
|
|
6721
|
+
logoUrl = _ref.logoUrl,
|
|
6722
|
+
initData = _ref.initData;
|
|
5051
6723
|
var history = reactRouterDom.useHistory();
|
|
5052
6724
|
|
|
5053
6725
|
var _useLocation = reactRouterDom.useLocation(),
|
|
@@ -5080,6 +6752,15 @@ var DigitApp = function DigitApp(_ref) {
|
|
|
5080
6752
|
if (!(pathname !== null && pathname !== void 0 && pathname.includes("dss"))) {
|
|
5081
6753
|
Digit.SessionStorage.del("DSS_FILTERS");
|
|
5082
6754
|
}
|
|
6755
|
+
|
|
6756
|
+
if ((pathname === null || pathname === void 0 ? void 0 : pathname.toString()) === "/digit-ui/employee") {
|
|
6757
|
+
Digit.SessionStorage.del("SEARCH_APPLICATION_DETAIL");
|
|
6758
|
+
Digit.SessionStorage.del("WS_EDIT_APPLICATION_DETAILS");
|
|
6759
|
+
}
|
|
6760
|
+
|
|
6761
|
+
if ((pathname === null || pathname === void 0 ? void 0 : pathname.toString()) === "/digit-ui/citizen" || (pathname === null || pathname === void 0 ? void 0 : pathname.toString()) === "/digit-ui/employee") {
|
|
6762
|
+
Digit.SessionStorage.del("WS_DISCONNECTION");
|
|
6763
|
+
}
|
|
5083
6764
|
}, [pathname]);
|
|
5084
6765
|
history.listen(function () {
|
|
5085
6766
|
var _window;
|
|
@@ -5110,7 +6791,8 @@ var DigitApp = function DigitApp(_ref) {
|
|
|
5110
6791
|
modules: modules,
|
|
5111
6792
|
appTenants: appTenants,
|
|
5112
6793
|
sourceUrl: sourceUrl,
|
|
5113
|
-
pathname: pathname
|
|
6794
|
+
pathname: pathname,
|
|
6795
|
+
initData: initData
|
|
5114
6796
|
};
|
|
5115
6797
|
return /*#__PURE__*/React__default.createElement(reactRouterDom.Switch, null, /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
5116
6798
|
path: "/digit-ui/employee"
|
|
@@ -5191,6 +6873,11 @@ var DigitUI = function DigitUI(_ref2) {
|
|
|
5191
6873
|
registry = _ref2.registry,
|
|
5192
6874
|
enabledModules = _ref2.enabledModules,
|
|
5193
6875
|
moduleReducers = _ref2.moduleReducers;
|
|
6876
|
+
|
|
6877
|
+
var _useState = React.useState(Digit.Utils.getPrivacyObject() || {}),
|
|
6878
|
+
privacy = _useState[0],
|
|
6879
|
+
setPrivacy = _useState[1];
|
|
6880
|
+
|
|
5194
6881
|
var userType = Digit.UserService.getType();
|
|
5195
6882
|
var queryClient = new reactQuery.QueryClient({
|
|
5196
6883
|
defaultOptions: {
|
|
@@ -5204,16 +6891,43 @@ var DigitUI = function DigitUI(_ref2) {
|
|
|
5204
6891
|
}
|
|
5205
6892
|
});
|
|
5206
6893
|
var ComponentProvider = Digit.Contexts.ComponentProvider;
|
|
6894
|
+
var PrivacyProvider = Digit.Contexts.PrivacyProvider;
|
|
5207
6895
|
var DSO = Digit.UserService.hasAccess(["FSM_DSO"]);
|
|
5208
6896
|
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(ErrorBoundary, null, /*#__PURE__*/React__default.createElement(reactQuery.QueryClientProvider, {
|
|
5209
6897
|
client: queryClient
|
|
5210
6898
|
}, /*#__PURE__*/React__default.createElement(ComponentProvider.Provider, {
|
|
5211
6899
|
value: registry
|
|
6900
|
+
}, /*#__PURE__*/React__default.createElement(PrivacyProvider.Provider, {
|
|
6901
|
+
value: {
|
|
6902
|
+
privacy: privacy === null || privacy === void 0 ? void 0 : privacy[window.location.pathname],
|
|
6903
|
+
resetPrivacy: function resetPrivacy(_data) {
|
|
6904
|
+
Digit.Utils.setPrivacyObject({});
|
|
6905
|
+
setPrivacy({});
|
|
6906
|
+
},
|
|
6907
|
+
getPrivacy: function getPrivacy() {
|
|
6908
|
+
var privacyObj = Digit.Utils.getPrivacyObject();
|
|
6909
|
+
setPrivacy(privacyObj);
|
|
6910
|
+
return privacyObj;
|
|
6911
|
+
},
|
|
6912
|
+
updatePrivacyDescoped: function updatePrivacyDescoped(_data) {
|
|
6913
|
+
var _extends2;
|
|
6914
|
+
|
|
6915
|
+
var privacyObj = Digit.Utils.getAllPrivacyObject();
|
|
6916
|
+
|
|
6917
|
+
var newObj = _extends({}, privacyObj, (_extends2 = {}, _extends2[window.location.pathname] = _data, _extends2));
|
|
6918
|
+
|
|
6919
|
+
Digit.Utils.setPrivacyObject(_extends({}, newObj));
|
|
6920
|
+
setPrivacy((privacyObj === null || privacyObj === void 0 ? void 0 : privacyObj[window.location.pathname]) || {});
|
|
6921
|
+
},
|
|
6922
|
+
updatePrivacy: function updatePrivacy(uuid, fieldName) {
|
|
6923
|
+
setPrivacy(Digit.Utils.updatePrivacy(uuid, fieldName) || {});
|
|
6924
|
+
}
|
|
6925
|
+
}
|
|
5212
6926
|
}, /*#__PURE__*/React__default.createElement(DigitUIWrapper, {
|
|
5213
6927
|
stateCode: stateCode,
|
|
5214
6928
|
enabledModules: enabledModules,
|
|
5215
6929
|
moduleReducers: moduleReducers
|
|
5216
|
-
})))));
|
|
6930
|
+
}))))));
|
|
5217
6931
|
};
|
|
5218
6932
|
var componentsToRegister = {
|
|
5219
6933
|
SelectOtp: SelectOtp
|