@mseva/digit-ui-module-core 1.0.70 → 1.0.72
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.css +180 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +474 -91
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
package/dist/index.modern.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React, { useState, useEffect, useRef, Fragment as Fragment$1, createContext,
|
|
1
|
+
import React, { useState, useEffect, useRef, useCallback, Fragment as Fragment$1, createContext, useMemo, isValidElement, cloneElement, createElement, useContext, forwardRef, useReducer, StrictMode as StrictMode$1 } from 'react';
|
|
2
2
|
import { useQueryClient, QueryClient, QueryClientProvider } from 'react-query';
|
|
3
3
|
import { Provider } from 'react-redux';
|
|
4
4
|
import { Link, useLocation, useRouteMatch, useHistory, Switch, Route, Redirect, BrowserRouter } from 'react-router-dom';
|
|
5
5
|
import { useTranslation, getI18n } from 'react-i18next';
|
|
6
|
-
import { PTIcon, OBPSIcon, BillsIcon, WSICon, PGRIcon, TLIcon, MCollectIcon, FSMIcon, Loader, BackButton, CitizenInfoLabel, PTRIcon, OTPInput, CardText as CardText$1, CardLabelError as CardLabelError$1, FormStep, Dropdown, LoginIcon as LoginIcon$1, Toast, FormComposer as FormComposer$1, CardSubHeader as CardSubHeader$1, Card as Card$1, CustomButton, SubmitBar as SubmitBar$1, Hamburger, NotificationBell, Modal, CloseSvg, PropertyHouse, CaseIcon, CollectionIcon, BirthIcon, DeathIcon, FirenocIcon, HomeIcon, EditPencilIcon, LogoutIcon, Phone, NavBar, ArrowVectorDown, ArrowForward, ComplaintIcon, BPAHomeIcon, ReceiptIcon, PersonIcon, DocumentIconSolid, DropIcon, CollectionsBookmarIcons, FinanceChartIcon, SearchIcon, GalleryIcon, RemoveIcon, BreadCrumb, CameraIcon, CardLabel as CardLabel$1, TextInput as TextInput$1, DatePicker, TextArea as TextArea$1, CheckBox, LabelFieldPair as LabelFieldPair$1, MobileNumber as MobileNumber$1, PrivateRoute, Calender, DocumentIcon, SearchIconSvg, CHBIcon, GenericFileIcon, HelpIcon, NDCIcon, ADSIcone, NOCIcon, Header as Header$1, PDFSvg, DownloadImgIcon, Banner, CardHeader, Rating, SearchField, SearchAction, PopUp, DetailsCard, DownloadBtnCommon, SearchForm, Table, StatusTable, Row, LinkButton as LinkButton$1, Body } from '@mseva/digit-ui-react-components';
|
|
6
|
+
import { PTIcon, OBPSIcon, BillsIcon, WSICon, PGRIcon, TLIcon, MCollectIcon, FSMIcon, Loader, BackButton, CitizenInfoLabel, PTRIcon, OTPInput, CardText as CardText$1, CardLabelError as CardLabelError$1, FormStep, Dropdown as Dropdown$1, LoginIcon as LoginIcon$1, Toast, FormComposer as FormComposer$1, CardSubHeader as CardSubHeader$1, Card as Card$1, CustomButton, SubmitBar as SubmitBar$1, Hamburger, NotificationBell, Modal, CloseSvg, PropertyHouse, CaseIcon, CollectionIcon, BirthIcon, DeathIcon, FirenocIcon, HomeIcon, EditPencilIcon, LogoutIcon, Phone, NavBar, ArrowVectorDown, ArrowForward, ComplaintIcon, BPAHomeIcon, ReceiptIcon, PersonIcon, DocumentIconSolid, DropIcon, CollectionsBookmarIcons, FinanceChartIcon, SearchIcon, GalleryIcon, RemoveIcon, BreadCrumb, CameraIcon, CardLabel as CardLabel$1, TextInput as TextInput$1, DatePicker, TextArea as TextArea$1, CheckBox, LabelFieldPair as LabelFieldPair$1, MobileNumber as MobileNumber$1, PrivateRoute, Calender, DocumentIcon, SearchIconSvg, CHBIcon, GenericFileIcon, HelpIcon, NDCIcon, ADSIcone, NOCIcon, Header as Header$1, PDFSvg, DownloadImgIcon, Banner, CardHeader, Rating, SearchField, SearchAction, PopUp, DetailsCard, DownloadBtnCommon, SearchForm, Table, StatusTable, Row, LinkButton as LinkButton$1, Body } from '@mseva/digit-ui-react-components';
|
|
7
7
|
import ReactTooltip from 'react-tooltip';
|
|
8
8
|
import { SurveyModal } from '@mseva/digit-ui-module-engagement';
|
|
9
9
|
import { compose, applyMiddleware, createStore, combineReducers } from 'redux';
|
|
@@ -7119,17 +7119,224 @@ var propTypes = createCommonjsModule(function (module) {
|
|
|
7119
7119
|
}
|
|
7120
7120
|
});
|
|
7121
7121
|
|
|
7122
|
-
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
|
|
7126
|
-
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7122
|
+
var dropdownData = [{
|
|
7123
|
+
name: "VIDEO",
|
|
7124
|
+
code: "VIDEO",
|
|
7125
|
+
links: [{
|
|
7126
|
+
name: "BPA_CITIZEN_HOME_01_OBPS_VIDEO",
|
|
7127
|
+
code: "VIDEO_1",
|
|
7128
|
+
displayName: "How To Register",
|
|
7129
|
+
sectionCode: "VIDEO",
|
|
7130
|
+
link: "https://youtu.be/hA8Tu3M45fg",
|
|
7131
|
+
isSubsection: false,
|
|
7132
|
+
subsection: []
|
|
7133
|
+
}]
|
|
7134
|
+
}, {
|
|
7135
|
+
name: "OTHERS",
|
|
7136
|
+
code: "OTHERS",
|
|
7137
|
+
links: [{
|
|
7138
|
+
name: "LIST_OF_APPROVED",
|
|
7139
|
+
code: "LIST_OF_APPROVED",
|
|
7140
|
+
displayName: "List of approved professional",
|
|
7141
|
+
sectionCode: "OTHERS",
|
|
7142
|
+
link: "",
|
|
7143
|
+
isSubsection: true,
|
|
7144
|
+
subsection: [{
|
|
7145
|
+
name: "BPA_OTHERS_ARCHITECT",
|
|
7146
|
+
code: "OTHERS_1",
|
|
7147
|
+
displayName: "Architect",
|
|
7148
|
+
sectionCode: "OTHERS",
|
|
7149
|
+
link: "https://enaksha.lgpunjab.gov.in/list_professional.php?dsfXX=Mg=="
|
|
7150
|
+
}, {
|
|
7151
|
+
name: "BPA_OTHERS_BUILDING_DESIGNER_SUPERVISOR",
|
|
7152
|
+
code: "OTHERS_2",
|
|
7153
|
+
displayName: "Building designer and supervisor",
|
|
7154
|
+
sectionCode: "OTHERS",
|
|
7155
|
+
link: "https://enaksha.lgpunjab.gov.in/list_professional.php?dsfXX=MTQ="
|
|
7156
|
+
}, {
|
|
7157
|
+
name: "BPA_OTHERS_ENGINEER",
|
|
7158
|
+
code: "OTHERS_3",
|
|
7159
|
+
displayName: "Engineer",
|
|
7160
|
+
sectionCode: "OTHERS",
|
|
7161
|
+
link: "https://enaksha.lgpunjab.gov.in/list_professional.php?dsfXX=MTI="
|
|
7162
|
+
}, {
|
|
7163
|
+
name: "BPA_OTHERS_EMPANELED_ARCHITECT_LIST",
|
|
7164
|
+
code: "OTHERS_4",
|
|
7165
|
+
displayName: "Empaneled Architect List",
|
|
7166
|
+
sectionCode: "OTHERS",
|
|
7167
|
+
link: "https://enaksha.lgpunjab.gov.in/architect_sc_p.php?dsfXX=MTI="
|
|
7168
|
+
}]
|
|
7169
|
+
}]
|
|
7170
|
+
}, {
|
|
7171
|
+
name: "USER_MANUALS",
|
|
7172
|
+
code: "USERMANUALS",
|
|
7173
|
+
links: [{
|
|
7174
|
+
name: "BPA_CITIZEN_HOME_ARCHITECT_USER_MANUAL_LABEL",
|
|
7175
|
+
code: "USERMANUALS_1",
|
|
7176
|
+
displayName: "Professional User manual",
|
|
7177
|
+
sectionCode: "USERMANUALS",
|
|
7178
|
+
link: "https://sdc-uat.lgpunjab.gov.in/filestore/v1/files/viewfile/?name=pb%2FBPA%2FMarch%2F13%2F1773381471615HJwwGxBMja.pdf",
|
|
7179
|
+
isSubsection: false,
|
|
7180
|
+
subsection: []
|
|
7181
|
+
}, {
|
|
7182
|
+
name: "BPA_CITIZEN_HOME_SCRUTINY_USER_MANUAL_LABEL",
|
|
7183
|
+
code: "USERMANUALS_2",
|
|
7184
|
+
displayName: "Scrutiny User manual",
|
|
7185
|
+
sectionCode: "USERMANUALS",
|
|
7186
|
+
link: "https://sdc-uat.lgpunjab.gov.in/filestore/v1/files/viewfile/?name=pb%2FBPA%2FMarch%2F13%2F1773381813315LWyyZgRJkC.pdf",
|
|
7187
|
+
isSubsection: false,
|
|
7188
|
+
subsection: []
|
|
7189
|
+
}]
|
|
7190
|
+
}, {
|
|
7191
|
+
name: "SAMPLE_FILES",
|
|
7192
|
+
code: "SAMPLEFILES",
|
|
7193
|
+
links: [{
|
|
7194
|
+
name: "BPA_CITIZEN_HOME_01_AMRITTSAR_SAMPLE_DXF",
|
|
7195
|
+
code: "SAMPLEFILES_1",
|
|
7196
|
+
displayName: "Sample File 01 - Amritsar",
|
|
7197
|
+
sectionCode: "SAMPLEFILES",
|
|
7198
|
+
link: "https://sdc-uat.lgpunjab.gov.in/edcr/rest/dcr/downloadfile?tenantId=amritsar&fileStoreId=cec63f19-d800-4fb9-9cd6-a97a55da6c8c",
|
|
7199
|
+
isSubsection: false,
|
|
7200
|
+
subsection: []
|
|
7201
|
+
}, {
|
|
7202
|
+
name: "BPA_CITIZEN_HOME_02_AMRITTSAR_SAMPLE_DXF",
|
|
7203
|
+
code: "SAMPLEFILES_2",
|
|
7204
|
+
displayName: "Sample File 02 - Amritsar",
|
|
7205
|
+
sectionCode: "SAMPLEFILES",
|
|
7206
|
+
link: "https://sdc-uat.lgpunjab.gov.in/edcr/rest/dcr/downloadfile?tenantId=amritsar&fileStoreId=3834dfdd-04e6-40f8-848c-182fe82d0d48",
|
|
7207
|
+
isSubsection: false,
|
|
7208
|
+
subsection: []
|
|
7209
|
+
}, {
|
|
7210
|
+
name: "BPA_CITIZEN_HOME_01_TESTING_SAMPLE_DXF",
|
|
7211
|
+
code: "SAMPLEFILES_3",
|
|
7212
|
+
displayName: "Sample File 01 - Testing",
|
|
7213
|
+
sectionCode: "SAMPLEFILES",
|
|
7214
|
+
link: "https://mseva-dev.lgpunjab.gov.in/edcr/rest/dcr/downloadfile?tenantId=testing&fileStoreId=ba8183a1-dcc6-4aa8-8f4d-75d525bf12e4",
|
|
7215
|
+
isSubsection: false,
|
|
7216
|
+
subsection: []
|
|
7217
|
+
}, {
|
|
7218
|
+
name: "BPA_CITIZEN_HOME_02_TESTING_SAMPLE_DXF",
|
|
7219
|
+
code: "SAMPLEFILES_4",
|
|
7220
|
+
displayName: "Sample File 02 - Testing",
|
|
7221
|
+
sectionCode: "SAMPLEFILES",
|
|
7222
|
+
link: "https://mseva-dev.lgpunjab.gov.in/edcr/rest/dcr/downloadfile?tenantId=testing&fileStoreId=ee19e32b-a3e3-4c13-86c8-e5c7cbb3993f",
|
|
7223
|
+
isSubsection: false,
|
|
7224
|
+
subsection: []
|
|
7225
|
+
}, {
|
|
7226
|
+
name: "BPA_CITIZEN_HOME_03_TESTING_SAMPLE_DXF",
|
|
7227
|
+
code: "SAMPLEFILES_5",
|
|
7228
|
+
displayName: "Sample File 03 - Testing",
|
|
7229
|
+
sectionCode: "SAMPLEFILES",
|
|
7230
|
+
link: "https://mseva-dev.lgpunjab.gov.in/edcr/rest/dcr/downloadfile?tenantId=testing&fileStoreId=edfb9c3c-4ffb-4fa2-8609-23a9ba5aff43",
|
|
7231
|
+
isSubsection: false,
|
|
7232
|
+
subsection: []
|
|
7233
|
+
}]
|
|
7234
|
+
}];
|
|
7235
|
+
function SubsectionMenu(props) {
|
|
7236
|
+
var items = props.items;
|
|
7237
|
+
var onClose = props.onClose;
|
|
7238
|
+
return React.createElement("ul", {
|
|
7239
|
+
className: "dropdown-submenu"
|
|
7240
|
+
}, items.map(function (sub) {
|
|
7241
|
+
return React.createElement("li", {
|
|
7242
|
+
key: sub.code,
|
|
7243
|
+
className: "dropdown-item"
|
|
7244
|
+
}, React.createElement("a", {
|
|
7245
|
+
href: sub.link,
|
|
7246
|
+
target: "_blank",
|
|
7247
|
+
rel: "noopener noreferrer",
|
|
7248
|
+
className: "dropdown-link dropdown-link--nested",
|
|
7249
|
+
onClick: function () {
|
|
7250
|
+
onClose();
|
|
7251
|
+
}
|
|
7252
|
+
}, sub.displayName));
|
|
7131
7253
|
}));
|
|
7132
|
-
}
|
|
7254
|
+
}
|
|
7255
|
+
function DropdownItem(props) {
|
|
7256
|
+
var linkItem = props.linkItem;
|
|
7257
|
+
var onClose = props.onClose;
|
|
7258
|
+
var expandState = useState(false);
|
|
7259
|
+
var isExpanded = expandState[0];
|
|
7260
|
+
var setIsExpanded = expandState[1];
|
|
7261
|
+
if (linkItem.isSubsection) {
|
|
7262
|
+
return React.createElement("li", {
|
|
7263
|
+
className: "dropdown-item dropdown-item--has-sub"
|
|
7264
|
+
}, React.createElement("button", {
|
|
7265
|
+
className: "dropdown-link dropdown-link--sub",
|
|
7266
|
+
onClick: function () {
|
|
7267
|
+
setIsExpanded(!isExpanded);
|
|
7268
|
+
},
|
|
7269
|
+
type: "button"
|
|
7270
|
+
}, React.createElement("span", null, linkItem.displayName), React.createElement("span", {
|
|
7271
|
+
className: "dropdown-arrow" + (isExpanded ? " dropdown-arrow--open" : "")
|
|
7272
|
+
}, "\u25B6")), isExpanded && React.createElement(SubsectionMenu, {
|
|
7273
|
+
items: linkItem.subsection,
|
|
7274
|
+
onClose: onClose
|
|
7275
|
+
}));
|
|
7276
|
+
}
|
|
7277
|
+
return React.createElement("li", {
|
|
7278
|
+
className: "dropdown-item"
|
|
7279
|
+
}, React.createElement("a", {
|
|
7280
|
+
href: linkItem.link,
|
|
7281
|
+
target: "_blank",
|
|
7282
|
+
rel: "noopener noreferrer",
|
|
7283
|
+
className: "dropdown-link",
|
|
7284
|
+
onClick: function () {
|
|
7285
|
+
onClose();
|
|
7286
|
+
}
|
|
7287
|
+
}, linkItem.displayName));
|
|
7288
|
+
}
|
|
7289
|
+
function Dropdown() {
|
|
7290
|
+
var openState = useState(false);
|
|
7291
|
+
var isOpen = openState[0];
|
|
7292
|
+
var setIsOpen = openState[1];
|
|
7293
|
+
var containerRef = useRef(null);
|
|
7294
|
+
var handleClickOutside = useCallback(function (e) {
|
|
7295
|
+
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
7296
|
+
setIsOpen(false);
|
|
7297
|
+
}
|
|
7298
|
+
}, []);
|
|
7299
|
+
useEffect(function () {
|
|
7300
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
7301
|
+
document.addEventListener("touchstart", handleClickOutside);
|
|
7302
|
+
return function () {
|
|
7303
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
7304
|
+
document.removeEventListener("touchstart", handleClickOutside);
|
|
7305
|
+
};
|
|
7306
|
+
}, [handleClickOutside]);
|
|
7307
|
+
function handleClose() {
|
|
7308
|
+
setIsOpen(false);
|
|
7309
|
+
}
|
|
7310
|
+
return React.createElement("div", {
|
|
7311
|
+
className: "dropdown-container",
|
|
7312
|
+
ref: containerRef
|
|
7313
|
+
}, React.createElement("button", {
|
|
7314
|
+
className: "dropdown-trigger",
|
|
7315
|
+
onClick: function () {
|
|
7316
|
+
setIsOpen(!isOpen);
|
|
7317
|
+
},
|
|
7318
|
+
type: "button"
|
|
7319
|
+
}, React.createElement("span", null, "Resources"), React.createElement("span", {
|
|
7320
|
+
className: "dropdown-caret" + (isOpen ? " dropdown-caret--open" : "")
|
|
7321
|
+
}, "\u25BC")), isOpen && React.createElement("div", {
|
|
7322
|
+
className: "dropdown-menu"
|
|
7323
|
+
}, dropdownData.map(function (section) {
|
|
7324
|
+
return React.createElement("div", {
|
|
7325
|
+
key: section.code,
|
|
7326
|
+
className: "dropdown-section"
|
|
7327
|
+
}, React.createElement("div", {
|
|
7328
|
+
className: "dropdown-section-title"
|
|
7329
|
+
}, section.name.replace(/_/g, " ")), React.createElement("ul", {
|
|
7330
|
+
className: "dropdown-list"
|
|
7331
|
+
}, section.links.map(function (linkItem) {
|
|
7332
|
+
return React.createElement(DropdownItem, {
|
|
7333
|
+
key: linkItem.code,
|
|
7334
|
+
linkItem: linkItem,
|
|
7335
|
+
onClose: handleClose
|
|
7336
|
+
});
|
|
7337
|
+
})));
|
|
7338
|
+
})));
|
|
7339
|
+
}
|
|
7133
7340
|
|
|
7134
7341
|
const CitizenHomeCardWithExternalLink = ({
|
|
7135
7342
|
header,
|
|
@@ -7140,18 +7347,25 @@ const CitizenHomeCardWithExternalLink = ({
|
|
|
7140
7347
|
isInfo: _isInfo = false,
|
|
7141
7348
|
styles
|
|
7142
7349
|
}) => {
|
|
7143
|
-
var _Digit$UserService, _user$info, _user$info$roles, _user$info2, _user$info2$roles;
|
|
7350
|
+
var _Digit$UserService, _user$info, _user$info$roles, _user$info2, _user$info2$roles, _apiData$commonMaste, _apiData$commonMaste$, _apiData$commonMaste$2;
|
|
7144
7351
|
const {
|
|
7145
7352
|
t
|
|
7146
7353
|
} = useTranslation();
|
|
7147
7354
|
const user = (_Digit$UserService = Digit.UserService) === null || _Digit$UserService === void 0 ? void 0 : _Digit$UserService.getUser();
|
|
7148
7355
|
const tenantId = localStorage.getItem("CITIZEN.CITY");
|
|
7356
|
+
const stateId = Digit.ULBService.getStateId();
|
|
7149
7357
|
const isUserLoggedIn = user === null || user === void 0 ? void 0 : user.access_token;
|
|
7150
7358
|
const isUserRegistered = (user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : (_user$info$roles = _user$info.roles) === null || _user$info$roles === void 0 ? void 0 : _user$info$roles.some(role => (role === null || role === void 0 ? void 0 : role.code) === "BPA_ARCHITECT")) || (user === null || user === void 0 ? void 0 : (_user$info2 = user.info) === null || _user$info2 === void 0 ? void 0 : (_user$info2$roles = _user$info2.roles) === null || _user$info2$roles === void 0 ? void 0 : _user$info2$roles.some(role => {
|
|
7151
7359
|
var _role$code;
|
|
7152
7360
|
return (role === null || role === void 0 ? void 0 : (_role$code = role.code) === null || _role$code === void 0 ? void 0 : _role$code.includes("BPA")) && (role === null || role === void 0 ? void 0 : role.tenantId) === tenantId;
|
|
7153
7361
|
}));
|
|
7154
|
-
|
|
7362
|
+
const {
|
|
7363
|
+
data: apiData,
|
|
7364
|
+
isLoading
|
|
7365
|
+
} = Digit.Hooks.useCustomMDMS(stateId, "common-masters", [{
|
|
7366
|
+
name: "uiObpsHomePage"
|
|
7367
|
+
}]);
|
|
7368
|
+
const items = (apiData === null || apiData === void 0 ? void 0 : (_apiData$commonMaste = apiData["common-masters"]) === null || _apiData$commonMaste === void 0 ? void 0 : (_apiData$commonMaste$ = _apiData$commonMaste.uiObpsHomePage) === null || _apiData$commonMaste$ === void 0 ? void 0 : (_apiData$commonMaste$2 = _apiData$commonMaste$[0]) === null || _apiData$commonMaste$2 === void 0 ? void 0 : _apiData$commonMaste$2.sectionHeaders) || [];
|
|
7155
7369
|
const getServiceIcon = (linkText, index) => {
|
|
7156
7370
|
const lowerText = linkText === null || linkText === void 0 ? void 0 : linkText.toLowerCase();
|
|
7157
7371
|
if (!!!lowerText) return;
|
|
@@ -7314,6 +7528,44 @@ const CitizenHomeCardWithExternalLink = ({
|
|
|
7314
7528
|
strokeLinecap: "round",
|
|
7315
7529
|
strokeLinejoin: "round"
|
|
7316
7530
|
}));
|
|
7531
|
+
const CardDropdown = ({
|
|
7532
|
+
links,
|
|
7533
|
+
index: _index = 0
|
|
7534
|
+
}) => {
|
|
7535
|
+
var _links$, _links$2, _links$links$, _menuOptions$;
|
|
7536
|
+
const [displayMenu, setDisplayMenu] = useState(false);
|
|
7537
|
+
const wrapperRef = useRef(null);
|
|
7538
|
+
const colorIdx = _index % 6;
|
|
7539
|
+
const menuOptions = Array.isArray(links) ? links : (links === null || links === void 0 ? void 0 : links.links) || [];
|
|
7540
|
+
const titleLabel = Array.isArray(links) ? (links === null || links === void 0 ? void 0 : (_links$ = links[0]) === null || _links$ === void 0 ? void 0 : _links$.displayName) || (links === null || links === void 0 ? void 0 : (_links$2 = links[0]) === null || _links$2 === void 0 ? void 0 : _links$2.name) : (links === null || links === void 0 ? void 0 : links.displayName) || (links === null || links === void 0 ? void 0 : links.name) || (links === null || links === void 0 ? void 0 : links.title) || (links === null || links === void 0 ? void 0 : links.links) && (links === null || links === void 0 ? void 0 : (_links$links$ = links.links[0]) === null || _links$links$ === void 0 ? void 0 : _links$links$.displayName);
|
|
7541
|
+
useEffect(() => {
|
|
7542
|
+
const onDocClick = e => {
|
|
7543
|
+
if (displayMenu && wrapperRef.current && !wrapperRef.current.contains(e.target)) {
|
|
7544
|
+
setDisplayMenu(false);
|
|
7545
|
+
}
|
|
7546
|
+
};
|
|
7547
|
+
document.addEventListener("click", onDocClick);
|
|
7548
|
+
return () => document.removeEventListener("click", onDocClick);
|
|
7549
|
+
}, [displayMenu]);
|
|
7550
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7551
|
+
ref: wrapperRef
|
|
7552
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
7553
|
+
className: `chcwe-card chcwe-card-bg-${colorIdx}`,
|
|
7554
|
+
onClick: () => setDisplayMenu(!displayMenu)
|
|
7555
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
7556
|
+
className: `chcwe-icon chcwe-icon-bg-${colorIdx}`
|
|
7557
|
+
}, getServiceIcon((menuOptions === null || menuOptions === void 0 ? void 0 : (_menuOptions$ = menuOptions[0]) === null || _menuOptions$ === void 0 ? void 0 : _menuOptions$.i18nKey) || (links === null || links === void 0 ? void 0 : links.i18nKey))), /*#__PURE__*/React.createElement("div", {
|
|
7558
|
+
className: "chcwe-content"
|
|
7559
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
7560
|
+
className: "chcwe-title"
|
|
7561
|
+
}, t(titleLabel))), /*#__PURE__*/React.createElement("div", {
|
|
7562
|
+
className: "chcwe-arrow-container"
|
|
7563
|
+
}, /*#__PURE__*/React.createElement(ArrowIcon, null))), /*#__PURE__*/React.createElement("div", {
|
|
7564
|
+
className: "action-bar-wrap-menu"
|
|
7565
|
+
}, displayMenu ?
|
|
7566
|
+
/*#__PURE__*/
|
|
7567
|
+
React.createElement(Dropdown, null) : null));
|
|
7568
|
+
};
|
|
7317
7569
|
const renderCardContent = (link, index) => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
7318
7570
|
className: `chcwe-icon chcwe-icon-bg-${index % 6}`
|
|
7319
7571
|
}, getServiceIcon(link.i18nKey)), /*#__PURE__*/React.createElement("div", {
|
|
@@ -7325,33 +7577,6 @@ const CitizenHomeCardWithExternalLink = ({
|
|
|
7325
7577
|
}, link.description)), /*#__PURE__*/React.createElement("div", {
|
|
7326
7578
|
className: "chcwe-arrow-container"
|
|
7327
7579
|
}, /*#__PURE__*/React.createElement(ArrowIcon, null)));
|
|
7328
|
-
const renderCardDropDownContent = link => {
|
|
7329
|
-
var _link$, _link$2;
|
|
7330
|
-
const [displayMenu, setDisplayMenu] = useState(false);
|
|
7331
|
-
const handleRedirect = url => {
|
|
7332
|
-
if (url !== null && url !== void 0 && url.navigationURL) window.open(url === null || url === void 0 ? void 0 : url.navigationURL, "_blank");
|
|
7333
|
-
};
|
|
7334
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
7335
|
-
className: `chcwe-card chcwe-card-bg-2`,
|
|
7336
|
-
onClick: () => setDisplayMenu(!displayMenu)
|
|
7337
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
7338
|
-
className: `chcwe-icon chcwe-icon-bg-2`
|
|
7339
|
-
}, getServiceIcon(link === null || link === void 0 ? void 0 : (_link$ = link[0]) === null || _link$ === void 0 ? void 0 : _link$.i18nKey)), /*#__PURE__*/React.createElement("div", {
|
|
7340
|
-
className: "chcwe-content"
|
|
7341
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
7342
|
-
className: "chcwe-title"
|
|
7343
|
-
}, t(link === null || link === void 0 ? void 0 : (_link$2 = link[0]) === null || _link$2 === void 0 ? void 0 : _link$2.displayName))), /*#__PURE__*/React.createElement("div", {
|
|
7344
|
-
className: "chcwe-arrow-container"
|
|
7345
|
-
}, /*#__PURE__*/React.createElement(ArrowIcon, null))), /*#__PURE__*/React.createElement("div", {
|
|
7346
|
-
className: "action-bar-wrap-menu"
|
|
7347
|
-
}, displayMenu ? /*#__PURE__*/React.createElement(CustomMenu, {
|
|
7348
|
-
localeKeyPrefix: ``,
|
|
7349
|
-
options: link,
|
|
7350
|
-
optionKey: "name",
|
|
7351
|
-
t: t,
|
|
7352
|
-
onSelect: handleRedirect
|
|
7353
|
-
}) : null));
|
|
7354
|
-
};
|
|
7355
7580
|
const linksToOpenInBlank = ["BPA_CITIZEN_HOME_ARCHITECT_FEEDBACK_LABEL"];
|
|
7356
7581
|
const shouldOpenInBlank = linkName => {
|
|
7357
7582
|
return linksToOpenInBlank === null || linksToOpenInBlank === void 0 ? void 0 : linksToOpenInBlank.includes(linkName);
|
|
@@ -7368,7 +7593,7 @@ const CitizenHomeCardWithExternalLink = ({
|
|
|
7368
7593
|
const remainingUserManualLinks = _links === null || _links === void 0 ? void 0 : _links.filter(value => isUserManual(value === null || value === void 0 ? void 0 : value.displayName));
|
|
7369
7594
|
const remainingSampleFilesLink = _links === null || _links === void 0 ? void 0 : _links.filter(value => isSampleFile(value === null || value === void 0 ? void 0 : value.displayName));
|
|
7370
7595
|
const remainingVideoLink = _links === null || _links === void 0 ? void 0 : _links.filter(value => isVideo(value === null || value === void 0 ? void 0 : value.displayName));
|
|
7371
|
-
console.log("
|
|
7596
|
+
console.log("apiData", items, _links, remainingUserManualLinks, remainingSampleFilesLink, remainingVideoLink);
|
|
7372
7597
|
return /*#__PURE__*/React.createElement("div", {
|
|
7373
7598
|
className: "chcwe-root",
|
|
7374
7599
|
style: styles ? styles : undefined
|
|
@@ -7409,11 +7634,30 @@ const CitizenHomeCardWithExternalLink = ({
|
|
|
7409
7634
|
}, renderCardContent(link, index));
|
|
7410
7635
|
}), (remainingUserManualLinks === null || remainingUserManualLinks === void 0 ? void 0 : remainingUserManualLinks.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
7411
7636
|
className: "card-dropdown-wrapper"
|
|
7412
|
-
},
|
|
7637
|
+
}, /*#__PURE__*/React.createElement(CardDropdown, {
|
|
7638
|
+
links: remainingUserManualLinks,
|
|
7639
|
+
index: 0
|
|
7640
|
+
})), (remainingSampleFilesLink === null || remainingSampleFilesLink === void 0 ? void 0 : remainingSampleFilesLink.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
7413
7641
|
className: "card-dropdown-wrapper"
|
|
7414
|
-
},
|
|
7642
|
+
}, /*#__PURE__*/React.createElement(CardDropdown, {
|
|
7643
|
+
links: remainingSampleFilesLink === null || remainingSampleFilesLink === void 0 ? void 0 : remainingSampleFilesLink.sort((a, b) => a.order - b.order),
|
|
7644
|
+
index: 1
|
|
7645
|
+
})), (remainingVideoLink === null || remainingVideoLink === void 0 ? void 0 : remainingVideoLink.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
7415
7646
|
className: "card-dropdown-wrapper"
|
|
7416
|
-
},
|
|
7647
|
+
}, /*#__PURE__*/React.createElement(CardDropdown, {
|
|
7648
|
+
links: remainingVideoLink,
|
|
7649
|
+
index: 2
|
|
7650
|
+
}))), /*#__PURE__*/React.createElement("h2", {
|
|
7651
|
+
className: "chcwe-header"
|
|
7652
|
+
}, t("BPA_CITIZEN_HOME_CARD_HEADER")), /*#__PURE__*/React.createElement("div", {
|
|
7653
|
+
className: "chcwe-card-container"
|
|
7654
|
+
}, items.map((item, idx) => /*#__PURE__*/React.createElement("div", {
|
|
7655
|
+
className: "card-dropdown-wrapper",
|
|
7656
|
+
key: item.code || item.name || idx
|
|
7657
|
+
}, /*#__PURE__*/React.createElement(CardDropdown, {
|
|
7658
|
+
links: item,
|
|
7659
|
+
index: idx
|
|
7660
|
+
})))), _isInfo && Info && /*#__PURE__*/React.createElement("div", {
|
|
7417
7661
|
className: "chcwe-info "
|
|
7418
7662
|
}, /*#__PURE__*/React.createElement(Info, null)));
|
|
7419
7663
|
};
|
|
@@ -11819,6 +12063,69 @@ const Header = () => {
|
|
|
11819
12063
|
});
|
|
11820
12064
|
};
|
|
11821
12065
|
|
|
12066
|
+
const OtpInput = ({
|
|
12067
|
+
otp,
|
|
12068
|
+
onOtpChange,
|
|
12069
|
+
onVerifyOtp,
|
|
12070
|
+
onResendOtp,
|
|
12071
|
+
canSubmit,
|
|
12072
|
+
isOtpValid
|
|
12073
|
+
}) => {
|
|
12074
|
+
const {
|
|
12075
|
+
t
|
|
12076
|
+
} = useTranslation();
|
|
12077
|
+
const [timeLeft, setTimeLeft] = useState(30);
|
|
12078
|
+
useEffect(() => {
|
|
12079
|
+
if (timeLeft === 0) return;
|
|
12080
|
+
const timer = setInterval(() => {
|
|
12081
|
+
setTimeLeft(prev => {
|
|
12082
|
+
if (prev <= 1) {
|
|
12083
|
+
clearInterval(timer);
|
|
12084
|
+
return 0;
|
|
12085
|
+
}
|
|
12086
|
+
return prev - 1;
|
|
12087
|
+
});
|
|
12088
|
+
}, 1000);
|
|
12089
|
+
return () => clearInterval(timer);
|
|
12090
|
+
}, [timeLeft]);
|
|
12091
|
+
const handleResendOtp = () => {
|
|
12092
|
+
onResendOtp && onResendOtp();
|
|
12093
|
+
setTimeLeft(30);
|
|
12094
|
+
};
|
|
12095
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
12096
|
+
className: "input-wrapper"
|
|
12097
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
12098
|
+
style: {
|
|
12099
|
+
paddingLeft: "20px"
|
|
12100
|
+
},
|
|
12101
|
+
className: "label"
|
|
12102
|
+
}, t("CS_LOGIN_OTP")), /*#__PURE__*/React.createElement(FormStep, {
|
|
12103
|
+
onSelect: onVerifyOtp,
|
|
12104
|
+
config: {
|
|
12105
|
+
texts: {
|
|
12106
|
+
submitBarLabel: t("CS_COMMON_SUBMIT")
|
|
12107
|
+
}
|
|
12108
|
+
},
|
|
12109
|
+
t: t,
|
|
12110
|
+
isDisabled: !((otp === null || otp === void 0 ? void 0 : otp.length) === 6 && canSubmit),
|
|
12111
|
+
cardStyle: {
|
|
12112
|
+
backgroundColor: "transparent",
|
|
12113
|
+
boxShadow: "none",
|
|
12114
|
+
WebkitBoxShadow: "none",
|
|
12115
|
+
padding: "20px"
|
|
12116
|
+
}
|
|
12117
|
+
}, /*#__PURE__*/React.createElement(OTPInput, {
|
|
12118
|
+
length: 6,
|
|
12119
|
+
onChange: onOtpChange,
|
|
12120
|
+
value: otp
|
|
12121
|
+
}), timeLeft > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
12122
|
+
className: "resendIn"
|
|
12123
|
+
}, t("CS_RESEND_ANOTHER_OTP"), " ", /*#__PURE__*/React.createElement("span", null, timeLeft), " ", t("CS_RESEND_SECONDS")) : /*#__PURE__*/React.createElement("div", {
|
|
12124
|
+
className: "card-text-button resend",
|
|
12125
|
+
onClick: handleResendOtp
|
|
12126
|
+
}, t("CS_RESEND_OTP")), !isOtpValid && /*#__PURE__*/React.createElement(CardLabelError$1, null, t("CS_INVALID_OTP"))));
|
|
12127
|
+
};
|
|
12128
|
+
|
|
11822
12129
|
const setEmployeeDetail = (userObject, token) => {
|
|
11823
12130
|
var _JSON$parse;
|
|
11824
12131
|
let locale = ((_JSON$parse = JSON.parse(sessionStorage.getItem("Digit.locale"))) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse.value) || "en_IN";
|
|
@@ -11849,9 +12156,13 @@ const Login = ({
|
|
|
11849
12156
|
const [showToast, setShowToast] = useState(null);
|
|
11850
12157
|
const [disable, setDisable] = useState(false);
|
|
11851
12158
|
const [isForgotPasswordView, setIsForgotPasswordView] = useState(false);
|
|
12159
|
+
const [showOTP, setShowOTP] = useState(false);
|
|
12160
|
+
const [otp, setOtp] = useState("");
|
|
12161
|
+
const [isOtpValid, setIsOtpValid] = useState(true);
|
|
12162
|
+
const [canSubmit, setCanSubmit] = useState(true);
|
|
11852
12163
|
const history = useHistory();
|
|
11853
12164
|
useEffect(() => {
|
|
11854
|
-
var _user$info, _user$info$roles, _user$info2, _user$info2$roles, _window, _window$location, _window$location$href
|
|
12165
|
+
var _user$info, _user$info$roles, _user$info2, _user$info2$roles, _window, _window$location, _window$location$href;
|
|
11855
12166
|
if (!user) {
|
|
11856
12167
|
return;
|
|
11857
12168
|
}
|
|
@@ -11865,20 +12176,12 @@ const Login = ({
|
|
|
11865
12176
|
var _window2, _window2$location, _window2$location$hre, _window2$location$hre2;
|
|
11866
12177
|
redirectPath = decodeURIComponent((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$location = _window2.location) === null || _window2$location === void 0 ? void 0 : (_window2$location$hre = _window2$location.href) === null || _window2$location$hre === void 0 ? void 0 : (_window2$location$hre2 = _window2$location$hre.split("from=")) === null || _window2$location$hre2 === void 0 ? void 0 : _window2$location$hre2[1]) || "/digit-ui/employee";
|
|
11867
12178
|
}
|
|
11868
|
-
if (user !== null && user !== void 0 && (_user$info3 = user.info) !== null && _user$info3 !== void 0 && _user$info3.roles && (user === null || user === void 0 ? void 0 : (_user$info4 = user.info) === null || _user$info4 === void 0 ? void 0 : (_user$info4$roles = _user$info4.roles) === null || _user$info4$roles === void 0 ? void 0 : _user$info4$roles.length) > 0 && user !== null && user !== void 0 && (_user$info5 = user.info) !== null && _user$info5 !== void 0 && (_user$info5$roles = _user$info5.roles) !== null && _user$info5$roles !== void 0 && _user$info5$roles.every(e => e.code === "NATADMIN")) {
|
|
11869
|
-
redirectPath = "/digit-ui/employee/dss/landing/NURT_DASHBOARD";
|
|
11870
|
-
}
|
|
11871
|
-
if (user !== null && user !== void 0 && (_user$info6 = user.info) !== null && _user$info6 !== void 0 && _user$info6.roles && (user === null || user === void 0 ? void 0 : (_user$info7 = user.info) === null || _user$info7 === void 0 ? void 0 : (_user$info7$roles = _user$info7.roles) === null || _user$info7$roles === void 0 ? void 0 : _user$info7$roles.length) > 0 && user !== null && user !== void 0 && (_user$info8 = user.info) !== null && _user$info8 !== void 0 && (_user$info8$roles = _user$info8.roles) !== null && _user$info8$roles !== void 0 && _user$info8$roles.every(e => e.code === "STADMIN")) {
|
|
11872
|
-
redirectPath = "/digit-ui/employee/dss/landing/home";
|
|
11873
|
-
}
|
|
11874
|
-
history.replace(redirectPath);
|
|
11875
12179
|
}, [user]);
|
|
11876
12180
|
const onLogin = async data => {
|
|
11877
12181
|
if (!data.city) {
|
|
11878
12182
|
alert("Please Select City!");
|
|
11879
12183
|
return;
|
|
11880
12184
|
}
|
|
11881
|
-
setDisable(true);
|
|
11882
12185
|
const requestData = {
|
|
11883
12186
|
...data,
|
|
11884
12187
|
userType: "EMPLOYEE"
|
|
@@ -11887,9 +12190,20 @@ const Login = ({
|
|
|
11887
12190
|
delete requestData.city;
|
|
11888
12191
|
try {
|
|
11889
12192
|
const {
|
|
11890
|
-
|
|
12193
|
+
user: users,
|
|
11891
12194
|
...tokens
|
|
11892
|
-
} = await Digit.UserService.
|
|
12195
|
+
} = await Digit.UserService.authenticateV1(requestData);
|
|
12196
|
+
const info = users[0];
|
|
12197
|
+
const _data = {
|
|
12198
|
+
mobileNumber: info === null || info === void 0 ? void 0 : info.mobileNumber,
|
|
12199
|
+
tenantId: info === null || info === void 0 ? void 0 : info.tenantId,
|
|
12200
|
+
userType: "EMPLOYEE",
|
|
12201
|
+
type: "login"
|
|
12202
|
+
};
|
|
12203
|
+
setShowOTP(true);
|
|
12204
|
+
sendOtp({
|
|
12205
|
+
otp: _data
|
|
12206
|
+
});
|
|
11893
12207
|
Digit.SessionStorage.set("Employee.tenantId", info === null || info === void 0 ? void 0 : info.tenantId);
|
|
11894
12208
|
setUser({
|
|
11895
12209
|
info,
|
|
@@ -11897,10 +12211,10 @@ const Login = ({
|
|
|
11897
12211
|
});
|
|
11898
12212
|
} catch (err) {
|
|
11899
12213
|
var _err$response, _err$response$data;
|
|
12214
|
+
setDisable(false);
|
|
11900
12215
|
setShowToast((err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.error_description) || "Invalid login credentials!");
|
|
11901
12216
|
setTimeout(closeToast, 5000);
|
|
11902
12217
|
}
|
|
11903
|
-
setDisable(false);
|
|
11904
12218
|
};
|
|
11905
12219
|
const closeToast = () => {
|
|
11906
12220
|
setShowToast(null);
|
|
@@ -11935,7 +12249,7 @@ const Login = ({
|
|
|
11935
12249
|
populators: {
|
|
11936
12250
|
name: city.name,
|
|
11937
12251
|
customProps: {},
|
|
11938
|
-
component: (props, customProps) => /*#__PURE__*/React.createElement(Dropdown, Object.assign({
|
|
12252
|
+
component: (props, customProps) => /*#__PURE__*/React.createElement(Dropdown$1, Object.assign({
|
|
11939
12253
|
option: cities,
|
|
11940
12254
|
optionKey: "i18nKey",
|
|
11941
12255
|
select: d => props.onChange(d),
|
|
@@ -11951,6 +12265,65 @@ const Login = ({
|
|
|
11951
12265
|
script.async = true;
|
|
11952
12266
|
document.body.appendChild(script);
|
|
11953
12267
|
}, []);
|
|
12268
|
+
const resendOtp = async () => {
|
|
12269
|
+
var _user$info3, _user$info4;
|
|
12270
|
+
const data = {
|
|
12271
|
+
mobileNumber: user === null || user === void 0 ? void 0 : (_user$info3 = user.info) === null || _user$info3 === void 0 ? void 0 : _user$info3.mobileNumber,
|
|
12272
|
+
tenantId: user === null || user === void 0 ? void 0 : (_user$info4 = user.info) === null || _user$info4 === void 0 ? void 0 : _user$info4.tenantId,
|
|
12273
|
+
userType: "employee",
|
|
12274
|
+
type: "login"
|
|
12275
|
+
};
|
|
12276
|
+
const [res, err] = await sendOtp({
|
|
12277
|
+
otp: data
|
|
12278
|
+
});
|
|
12279
|
+
};
|
|
12280
|
+
async function onVerifyOtp() {
|
|
12281
|
+
try {
|
|
12282
|
+
var _user$info5, _user$info6;
|
|
12283
|
+
setIsOtpValid(true);
|
|
12284
|
+
setCanSubmit(false);
|
|
12285
|
+
const requestData = {
|
|
12286
|
+
username: user === null || user === void 0 ? void 0 : (_user$info5 = user.info) === null || _user$info5 === void 0 ? void 0 : _user$info5.userName,
|
|
12287
|
+
password: otp,
|
|
12288
|
+
tenantId: user === null || user === void 0 ? void 0 : (_user$info6 = user.info) === null || _user$info6 === void 0 ? void 0 : _user$info6.tenantId,
|
|
12289
|
+
userType: "EMPLOYEE"
|
|
12290
|
+
};
|
|
12291
|
+
const {
|
|
12292
|
+
ResponseInfo,
|
|
12293
|
+
UserRequest: info,
|
|
12294
|
+
...tokens
|
|
12295
|
+
} = await Digit.UserService.authenticate(requestData);
|
|
12296
|
+
setUser({
|
|
12297
|
+
info,
|
|
12298
|
+
...tokens
|
|
12299
|
+
});
|
|
12300
|
+
history.push("/digit-ui/employee");
|
|
12301
|
+
} catch (e) {
|
|
12302
|
+
setCanSubmit(true);
|
|
12303
|
+
setIsOtpValid(false);
|
|
12304
|
+
}
|
|
12305
|
+
}
|
|
12306
|
+
const sendOtp = async data => {
|
|
12307
|
+
try {
|
|
12308
|
+
var _user$info7;
|
|
12309
|
+
const res = await Digit.UserService.sendOtp(data, user === null || user === void 0 ? void 0 : (_user$info7 = user.info) === null || _user$info7 === void 0 ? void 0 : _user$info7.tenantId);
|
|
12310
|
+
setDisable(true);
|
|
12311
|
+
return [res, null];
|
|
12312
|
+
} catch (err) {
|
|
12313
|
+
return [null, err];
|
|
12314
|
+
}
|
|
12315
|
+
};
|
|
12316
|
+
const prevRef = React.useRef({});
|
|
12317
|
+
const onFormValueChange = (setValue, data) => {
|
|
12318
|
+
var _prev$city, _data$city;
|
|
12319
|
+
const prev = prevRef.current;
|
|
12320
|
+
const isChanged = (prev === null || prev === void 0 ? void 0 : (_prev$city = prev.city) === null || _prev$city === void 0 ? void 0 : _prev$city.code) !== (data === null || data === void 0 ? void 0 : (_data$city = data.city) === null || _data$city === void 0 ? void 0 : _data$city.code) || (prev === null || prev === void 0 ? void 0 : prev.username) !== (data === null || data === void 0 ? void 0 : data.username) || (prev === null || prev === void 0 ? void 0 : prev.password) !== (data === null || data === void 0 ? void 0 : data.password);
|
|
12321
|
+
if (isChanged) {
|
|
12322
|
+
setDisable(false);
|
|
12323
|
+
setShowOTP(false);
|
|
12324
|
+
}
|
|
12325
|
+
prevRef.current = data;
|
|
12326
|
+
};
|
|
11954
12327
|
return isLoading || isStoreLoading ? /*#__PURE__*/React.createElement(Loader, null) :
|
|
11955
12328
|
/*#__PURE__*/
|
|
11956
12329
|
React.createElement(Background, null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -11975,24 +12348,9 @@ const Login = ({
|
|
|
11975
12348
|
onClick: onBackToLogin,
|
|
11976
12349
|
className: "employee-back-button",
|
|
11977
12350
|
type: "button"
|
|
11978
|
-
}, "\u2190 Back to Login"), /*#__PURE__*/React.createElement(
|
|
11979
|
-
className: "security-banner"
|
|
11980
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
11981
|
-
style: {
|
|
11982
|
-
fontSize: "24px"
|
|
11983
|
-
}
|
|
11984
|
-
}, "\uD83D\uDD10"), /*#__PURE__*/React.createElement("div", {
|
|
11985
|
-
style: {
|
|
11986
|
-
fontSize: "15px"
|
|
11987
|
-
}
|
|
11988
|
-
}, /*#__PURE__*/React.createElement("div", null, "Effective ", /*#__PURE__*/React.createElement("strong", null, "March 05, 2026"), ", extra login security has been enabled. Please make sure your mobile number is updated to receive OTP verification."), /*#__PURE__*/React.createElement("div", {
|
|
11989
|
-
style: {
|
|
11990
|
-
marginTop: "8px",
|
|
11991
|
-
fontWeight: "500"
|
|
11992
|
-
}
|
|
11993
|
-
}, "05 \u0A2E\u0A3E\u0A30\u0A1A, 2026 \u0A24\u0A4B\u0A02, \u0A35\u0A3E\u0A27\u0A42 \u0A32\u0A4C\u0A17\u0A07\u0A28 \u0A38\u0A41\u0A30\u0A71\u0A16\u0A3F\u0A06 \u0A38\u0A2E\u0A30\u0A71\u0A25 \u0A15\u0A40\u0A24\u0A40 \u0A17\u0A08 \u0A39\u0A48\u0964 \u0A15\u0A3F\u0A30\u0A2A\u0A3E \u0A15\u0A30\u0A15\u0A47 \u0A07\u0A39 \u0A2F\u0A15\u0A40\u0A28\u0A40 \u0A2C\u0A23\u0A3E\u0A13 \u0A15\u0A3F \u0A24\u0A41\u0A39\u0A3E\u0A21\u0A3E \u0A2E\u0A4B\u0A2C\u0A3E\u0A08\u0A32 \u0A28\u0A70\u0A2C\u0A30 OTP \u0A2A\u0A41\u0A38\u0A3C\u0A1F\u0A40\u0A15\u0A30\u0A28 \u0A2A\u0A4D\u0A30\u0A3E\u0A2A\u0A24 \u0A15\u0A30\u0A28 \u0A32\u0A08 \u0A05\u0A71\u0A2A\u0A21\u0A47\u0A1F \u0A15\u0A40\u0A24\u0A3E \u0A17\u0A3F\u0A06 \u0A39\u0A48\u0964"))), !isForgotPasswordView ? /*#__PURE__*/React.createElement(FormComposer, {
|
|
12351
|
+
}, "\u2190 Back to Login"), !isForgotPasswordView ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormComposer, {
|
|
11994
12352
|
onSubmit: onLogin,
|
|
11995
|
-
isDisabled:
|
|
12353
|
+
isDisabled: disable,
|
|
11996
12354
|
noBoxShadow: true,
|
|
11997
12355
|
inline: true,
|
|
11998
12356
|
submitInForm: true,
|
|
@@ -12001,6 +12359,7 @@ const Login = ({
|
|
|
12001
12359
|
secondaryActionLabel: propsConfig.texts.secondaryButtonLabel,
|
|
12002
12360
|
onSecondayActionClick: onForgotPassword,
|
|
12003
12361
|
heading: propsConfig.texts.header,
|
|
12362
|
+
onFormValueChange: onFormValueChange,
|
|
12004
12363
|
description: "Enter your details to access your account",
|
|
12005
12364
|
headingStyle: {
|
|
12006
12365
|
textAlign: "left",
|
|
@@ -12016,7 +12375,14 @@ const Login = ({
|
|
|
12016
12375
|
borderRadius: "8px",
|
|
12017
12376
|
padding: "12px"
|
|
12018
12377
|
}
|
|
12019
|
-
})
|
|
12378
|
+
}), showOTP && /*#__PURE__*/React.createElement(OtpInput, {
|
|
12379
|
+
otp: otp,
|
|
12380
|
+
onOtpChange: setOtp,
|
|
12381
|
+
onVerifyOtp: onVerifyOtp,
|
|
12382
|
+
onResendOtp: resendOtp,
|
|
12383
|
+
canSubmit: canSubmit,
|
|
12384
|
+
isOtpValid: isOtpValid
|
|
12385
|
+
})) : /*#__PURE__*/React.createElement("div", {
|
|
12020
12386
|
className: "employee-forgot-password-content"
|
|
12021
12387
|
}, /*#__PURE__*/React.createElement("h2", {
|
|
12022
12388
|
style: {
|
|
@@ -12424,7 +12790,7 @@ const ForgotPassword = ({
|
|
|
12424
12790
|
populators: {
|
|
12425
12791
|
name: city.name,
|
|
12426
12792
|
customProps: {},
|
|
12427
|
-
component: (props, customProps) => /*#__PURE__*/React.createElement(Dropdown, Object.assign({
|
|
12793
|
+
component: (props, customProps) => /*#__PURE__*/React.createElement(Dropdown$1, Object.assign({
|
|
12428
12794
|
option: cities,
|
|
12429
12795
|
optionKey: "name",
|
|
12430
12796
|
id: city.name,
|
|
@@ -12924,7 +13290,7 @@ const ChangeCity = prop => {
|
|
|
12924
13290
|
style: prop !== null && prop !== void 0 && prop.mobileView ? {
|
|
12925
13291
|
color: "#767676"
|
|
12926
13292
|
} : {}
|
|
12927
|
-
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
13293
|
+
}, /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
12928
13294
|
option: selectCityData,
|
|
12929
13295
|
selected: selectCityData.find(cityValue => cityValue.value === (dropDownData === null || dropDownData === void 0 ? void 0 : dropDownData.value)),
|
|
12930
13296
|
optionKey: "label",
|
|
@@ -13140,7 +13506,7 @@ const TopBar = ({
|
|
|
13140
13506
|
t: t
|
|
13141
13507
|
})), (userDetails === null || userDetails === void 0 ? void 0 : userDetails.access_token) && /*#__PURE__*/React.createElement("div", {
|
|
13142
13508
|
className: "left"
|
|
13143
|
-
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
13509
|
+
}, /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
13144
13510
|
option: userOptions,
|
|
13145
13511
|
optionKey: "name",
|
|
13146
13512
|
select: handleUserDropdownSelection,
|
|
@@ -15074,7 +15440,18 @@ const UserProfile = ({
|
|
|
15074
15440
|
});
|
|
15075
15441
|
}
|
|
15076
15442
|
} else if (responseInfo !== null && responseInfo !== void 0 && responseInfo.status && responseInfo.status === "200") {
|
|
15443
|
+
var _location$state;
|
|
15077
15444
|
showToast("success", t("CORE_COMMON_PROFILE_UPDATE_SUCCESS"), 5000);
|
|
15445
|
+
if (location !== null && location !== void 0 && (_location$state = location.state) !== null && _location$state !== void 0 && _location$state.from.includes("/engagement/surveys")) {
|
|
15446
|
+
history.push({
|
|
15447
|
+
pathname: location.state.from,
|
|
15448
|
+
state: {
|
|
15449
|
+
surveyDetails: location.state.surveyDetails,
|
|
15450
|
+
userInfo: location.state.userInfo,
|
|
15451
|
+
userType: location.state.userType
|
|
15452
|
+
}
|
|
15453
|
+
});
|
|
15454
|
+
}
|
|
15078
15455
|
}
|
|
15079
15456
|
} catch (error) {
|
|
15080
15457
|
const errorObj = JSON.parse(error);
|
|
@@ -15200,7 +15577,7 @@ const UserProfile = ({
|
|
|
15200
15577
|
className: "user-profile-field-wrapper"
|
|
15201
15578
|
}, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
15202
15579
|
className: "user-profile-label"
|
|
15203
|
-
}, `${t("CORE_COMMON_PROFILE_GENDER")}`), /*#__PURE__*/React.createElement(Dropdown, {
|
|
15580
|
+
}, `${t("CORE_COMMON_PROFILE_GENDER")}`), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
15204
15581
|
selected: (gender === null || gender === void 0 ? void 0 : gender.length) === 1 ? gender[0] : gender,
|
|
15205
15582
|
disable: (gender === null || gender === void 0 ? void 0 : gender.length) === 1 || editScreen,
|
|
15206
15583
|
option: menu,
|
|
@@ -15273,7 +15650,7 @@ const UserProfile = ({
|
|
|
15273
15650
|
className: "user-profile-field-wrapper"
|
|
15274
15651
|
}, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
15275
15652
|
className: "user-profile-label"
|
|
15276
|
-
}, t("BPA_STATE_TYPE"), "*"), /*#__PURE__*/React.createElement(Dropdown, {
|
|
15653
|
+
}, t("BPA_STATE_TYPE"), "*"), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
15277
15654
|
t: t,
|
|
15278
15655
|
optionKey: "state_name",
|
|
15279
15656
|
option: (stateOptions === null || stateOptions === void 0 ? void 0 : stateOptions.sort((a, b) => a.state_name.localeCompare(b.state_name))) || [],
|
|
@@ -15284,7 +15661,7 @@ const UserProfile = ({
|
|
|
15284
15661
|
className: "user-profile-field-wrapper"
|
|
15285
15662
|
}, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
15286
15663
|
className: "user-profile-label"
|
|
15287
|
-
}, t("BPA_DISTRICT_TYPE"), "*"), /*#__PURE__*/React.createElement(Dropdown, {
|
|
15664
|
+
}, t("BPA_DISTRICT_TYPE"), "*"), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
15288
15665
|
t: t,
|
|
15289
15666
|
optionKey: "district_name_english",
|
|
15290
15667
|
option: (uniqueDistricts === null || uniqueDistricts === void 0 ? void 0 : uniqueDistricts.sort((a, b) => a.district_name_english.localeCompare(b.district_name_english))) || [],
|
|
@@ -15337,7 +15714,7 @@ const UserProfile = ({
|
|
|
15337
15714
|
className: "user-profile-field-wrapper"
|
|
15338
15715
|
}, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
15339
15716
|
className: "user-profile-label"
|
|
15340
|
-
}, t("BPA_STATE_TYPE"), "*"), /*#__PURE__*/React.createElement(Dropdown, {
|
|
15717
|
+
}, t("BPA_STATE_TYPE"), "*"), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
15341
15718
|
t: t,
|
|
15342
15719
|
optionKey: "state_name",
|
|
15343
15720
|
option: (stateOptions === null || stateOptions === void 0 ? void 0 : stateOptions.sort((a, b) => a.state_name.localeCompare(b.state_name))) || [],
|
|
@@ -15348,7 +15725,7 @@ const UserProfile = ({
|
|
|
15348
15725
|
className: "user-profile-field-wrapper"
|
|
15349
15726
|
}, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
15350
15727
|
className: "user-profile-label"
|
|
15351
|
-
}, t("BPA_DISTRICT_TYPE"), "*"), /*#__PURE__*/React.createElement(Dropdown, {
|
|
15728
|
+
}, t("BPA_DISTRICT_TYPE"), "*"), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
15352
15729
|
t: t,
|
|
15353
15730
|
optionKey: "district_name_english",
|
|
15354
15731
|
option: (uniqueDistrictsCorrespondent === null || uniqueDistrictsCorrespondent === void 0 ? void 0 : uniqueDistrictsCorrespondent.sort((a, b) => a.district_name_english.localeCompare(b.district_name_english))) || [],
|
|
@@ -15396,7 +15773,7 @@ const UserProfile = ({
|
|
|
15396
15773
|
className: "user-profile-label-field-pair-flex"
|
|
15397
15774
|
}, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
15398
15775
|
className: "profile-label-margin user-profile-label-style-employee"
|
|
15399
|
-
}, `${t("CORE_COMMON_PROFILE_GENDER")}`), /*#__PURE__*/React.createElement(Dropdown, {
|
|
15776
|
+
}, `${t("CORE_COMMON_PROFILE_GENDER")}`), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
15400
15777
|
selected: (gender === null || gender === void 0 ? void 0 : gender.length) === 1 ? gender[0] : gender,
|
|
15401
15778
|
disable: (gender === null || gender === void 0 ? void 0 : gender.length) === 1 || editScreen,
|
|
15402
15779
|
option: menu,
|
|
@@ -16826,7 +17203,7 @@ const LocationSelect = ({
|
|
|
16826
17203
|
style: style.locationWrapper
|
|
16827
17204
|
}, /*#__PURE__*/React.createElement("div", {
|
|
16828
17205
|
className: "label"
|
|
16829
|
-
}, t("CS_COMMON_CHOOSE_LOCATION"), /*#__PURE__*/React.createElement("span", null, " *")), !isLoading && /*#__PURE__*/React.createElement(Dropdown, {
|
|
17206
|
+
}, t("CS_COMMON_CHOOSE_LOCATION"), /*#__PURE__*/React.createElement("span", null, " *")), !isLoading && /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
16830
17207
|
option: cityOptions,
|
|
16831
17208
|
optionKey: "displayName",
|
|
16832
17209
|
id: "city",
|
|
@@ -16881,7 +17258,7 @@ const MobileInput = ({
|
|
|
16881
17258
|
}))));
|
|
16882
17259
|
};
|
|
16883
17260
|
|
|
16884
|
-
const OtpInput = ({
|
|
17261
|
+
const OtpInput$1 = ({
|
|
16885
17262
|
otp,
|
|
16886
17263
|
onOtpChange,
|
|
16887
17264
|
onVerifyOtp,
|
|
@@ -17223,7 +17600,7 @@ const NewLogin = ({
|
|
|
17223
17600
|
onSendOtp: onSendOtp,
|
|
17224
17601
|
canSubmit: canSubmit && (lastSubmittedMobile ? mobileNumber !== lastSubmittedMobile : true),
|
|
17225
17602
|
step: step
|
|
17226
|
-
}), step === "OTP" && /*#__PURE__*/React.createElement(OtpInput, {
|
|
17603
|
+
}), step === "OTP" && /*#__PURE__*/React.createElement(OtpInput$1, {
|
|
17227
17604
|
otp: otp,
|
|
17228
17605
|
onOtpChange: setOtp,
|
|
17229
17606
|
onVerifyOtp: onVerifyOtp,
|
|
@@ -17639,7 +18016,7 @@ const NewRegistration = ({
|
|
|
17639
18016
|
className: "location-wrapper"
|
|
17640
18017
|
}, /*#__PURE__*/React.createElement("div", {
|
|
17641
18018
|
className: "label"
|
|
17642
|
-
}, t("CORE_COMMON_GENDER"), /*#__PURE__*/React.createElement("span", null, " *")), /*#__PURE__*/React.createElement(Dropdown, {
|
|
18019
|
+
}, t("CORE_COMMON_GENDER"), /*#__PURE__*/React.createElement("span", null, " *")), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
17643
18020
|
option: genders,
|
|
17644
18021
|
optionKey: "name",
|
|
17645
18022
|
id: "name",
|
|
@@ -17652,7 +18029,7 @@ const NewRegistration = ({
|
|
|
17652
18029
|
selectedLanguage: selectedLanguage,
|
|
17653
18030
|
selectedCity: selectedCity,
|
|
17654
18031
|
mobileNumber: (_location$state4 = location.state) === null || _location$state4 === void 0 ? void 0 : _location$state4.mobileNumber
|
|
17655
|
-
}), step === "OTP" && /*#__PURE__*/React.createElement(OtpInput, {
|
|
18032
|
+
}), step === "OTP" && /*#__PURE__*/React.createElement(OtpInput$1, {
|
|
17656
18033
|
otp: otp,
|
|
17657
18034
|
onOtpChange: setOtp,
|
|
17658
18035
|
onVerifyOtp: onVerifyOtp,
|
|
@@ -21106,6 +21483,12 @@ const Home$1 = ({
|
|
|
21106
21483
|
}, /*#__PURE__*/React.createElement(Route, {
|
|
21107
21484
|
key: index,
|
|
21108
21485
|
path: `${path}/${code.toLowerCase()}-home`
|
|
21486
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
21487
|
+
style: {
|
|
21488
|
+
display: "flex",
|
|
21489
|
+
flexDirection: "column",
|
|
21490
|
+
width: "100%"
|
|
21491
|
+
}
|
|
21109
21492
|
}, /*#__PURE__*/React.createElement("div", {
|
|
21110
21493
|
className: "moduleLinkHomePage",
|
|
21111
21494
|
style: {
|
|
@@ -21189,7 +21572,7 @@ const Home$1 = ({
|
|
|
21189
21572
|
text: t(`BPA_CITIZEN_HOME_STAKEHOLDER_INCLUDES_INFO_LABEL`)
|
|
21190
21573
|
}) : null,
|
|
21191
21574
|
isInfo: code === "OBPS" ? true : false
|
|
21192
|
-
}))))), /*#__PURE__*/React.createElement(Route, {
|
|
21575
|
+
})))))), /*#__PURE__*/React.createElement(Route, {
|
|
21193
21576
|
key: "faq" + index,
|
|
21194
21577
|
path: `${path}/${code.toLowerCase()}-faq`
|
|
21195
21578
|
}, /*#__PURE__*/React.createElement(FAQsSection, {
|