@mseva/digit-ui-module-core 1.0.72 → 1.0.74
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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +160 -332
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React, { useState, useEffect, useRef,
|
|
1
|
+
import React, { useState, useEffect, useRef, Fragment as Fragment$1, createContext, useCallback, 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
|
|
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';
|
|
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,224 +7119,17 @@ var propTypes = createCommonjsModule(function (module) {
|
|
|
7119
7119
|
}
|
|
7120
7120
|
});
|
|
7121
7121
|
|
|
7122
|
-
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
|
|
7126
|
-
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
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));
|
|
7122
|
+
const CustomMenu = props => {
|
|
7123
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7124
|
+
className: "menu-wrap-position",
|
|
7125
|
+
style: props.style
|
|
7126
|
+
}, props.options.map((option, index) => {
|
|
7127
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7128
|
+
key: index,
|
|
7129
|
+
onClick: () => props.onSelect(option)
|
|
7130
|
+
}, /*#__PURE__*/React.createElement("p", null, props.t ? props.t(`${props.optionKey ? option[props.optionKey] : option}`) : option));
|
|
7253
7131
|
}));
|
|
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
|
-
}
|
|
7132
|
+
};
|
|
7340
7133
|
|
|
7341
7134
|
const CitizenHomeCardWithExternalLink = ({
|
|
7342
7135
|
header,
|
|
@@ -7347,25 +7140,18 @@ const CitizenHomeCardWithExternalLink = ({
|
|
|
7347
7140
|
isInfo: _isInfo = false,
|
|
7348
7141
|
styles
|
|
7349
7142
|
}) => {
|
|
7350
|
-
var _Digit$UserService, _user$info, _user$info$roles, _user$info2, _user$info2$roles
|
|
7143
|
+
var _Digit$UserService, _user$info, _user$info$roles, _user$info2, _user$info2$roles;
|
|
7351
7144
|
const {
|
|
7352
7145
|
t
|
|
7353
7146
|
} = useTranslation();
|
|
7354
7147
|
const user = (_Digit$UserService = Digit.UserService) === null || _Digit$UserService === void 0 ? void 0 : _Digit$UserService.getUser();
|
|
7355
7148
|
const tenantId = localStorage.getItem("CITIZEN.CITY");
|
|
7356
|
-
const stateId = Digit.ULBService.getStateId();
|
|
7357
7149
|
const isUserLoggedIn = user === null || user === void 0 ? void 0 : user.access_token;
|
|
7358
7150
|
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 => {
|
|
7359
7151
|
var _role$code;
|
|
7360
7152
|
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;
|
|
7361
7153
|
}));
|
|
7362
|
-
|
|
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) || [];
|
|
7154
|
+
console.log(_links, "links in CitizenHomeCardWithExternalLink");
|
|
7369
7155
|
const getServiceIcon = (linkText, index) => {
|
|
7370
7156
|
const lowerText = linkText === null || linkText === void 0 ? void 0 : linkText.toLowerCase();
|
|
7371
7157
|
if (!!!lowerText) return;
|
|
@@ -7528,44 +7314,6 @@ const CitizenHomeCardWithExternalLink = ({
|
|
|
7528
7314
|
strokeLinecap: "round",
|
|
7529
7315
|
strokeLinejoin: "round"
|
|
7530
7316
|
}));
|
|
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
|
-
};
|
|
7569
7317
|
const renderCardContent = (link, index) => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
7570
7318
|
className: `chcwe-icon chcwe-icon-bg-${index % 6}`
|
|
7571
7319
|
}, getServiceIcon(link.i18nKey)), /*#__PURE__*/React.createElement("div", {
|
|
@@ -7577,6 +7325,33 @@ const CitizenHomeCardWithExternalLink = ({
|
|
|
7577
7325
|
}, link.description)), /*#__PURE__*/React.createElement("div", {
|
|
7578
7326
|
className: "chcwe-arrow-container"
|
|
7579
7327
|
}, /*#__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
|
+
};
|
|
7580
7355
|
const linksToOpenInBlank = ["BPA_CITIZEN_HOME_ARCHITECT_FEEDBACK_LABEL"];
|
|
7581
7356
|
const shouldOpenInBlank = linkName => {
|
|
7582
7357
|
return linksToOpenInBlank === null || linksToOpenInBlank === void 0 ? void 0 : linksToOpenInBlank.includes(linkName);
|
|
@@ -7593,7 +7368,7 @@ const CitizenHomeCardWithExternalLink = ({
|
|
|
7593
7368
|
const remainingUserManualLinks = _links === null || _links === void 0 ? void 0 : _links.filter(value => isUserManual(value === null || value === void 0 ? void 0 : value.displayName));
|
|
7594
7369
|
const remainingSampleFilesLink = _links === null || _links === void 0 ? void 0 : _links.filter(value => isSampleFile(value === null || value === void 0 ? void 0 : value.displayName));
|
|
7595
7370
|
const remainingVideoLink = _links === null || _links === void 0 ? void 0 : _links.filter(value => isVideo(value === null || value === void 0 ? void 0 : value.displayName));
|
|
7596
|
-
console.log("
|
|
7371
|
+
console.log("remainingUserManualLinks", remainingUserManualLinks);
|
|
7597
7372
|
return /*#__PURE__*/React.createElement("div", {
|
|
7598
7373
|
className: "chcwe-root",
|
|
7599
7374
|
style: styles ? styles : undefined
|
|
@@ -7634,30 +7409,11 @@ const CitizenHomeCardWithExternalLink = ({
|
|
|
7634
7409
|
}, renderCardContent(link, index));
|
|
7635
7410
|
}), (remainingUserManualLinks === null || remainingUserManualLinks === void 0 ? void 0 : remainingUserManualLinks.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
7636
7411
|
className: "card-dropdown-wrapper"
|
|
7637
|
-
}, /*#__PURE__*/React.createElement(
|
|
7638
|
-
links: remainingUserManualLinks,
|
|
7639
|
-
index: 0
|
|
7640
|
-
})), (remainingSampleFilesLink === null || remainingSampleFilesLink === void 0 ? void 0 : remainingSampleFilesLink.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
7412
|
+
}, renderCardDropDownContent(remainingUserManualLinks)), (remainingSampleFilesLink === null || remainingSampleFilesLink === void 0 ? void 0 : remainingSampleFilesLink.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
7641
7413
|
className: "card-dropdown-wrapper"
|
|
7642
|
-
}, /*#__PURE__*/React.createElement(
|
|
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", {
|
|
7414
|
+
}, renderCardDropDownContent(remainingSampleFilesLink === null || remainingSampleFilesLink === void 0 ? void 0 : remainingSampleFilesLink.sort((a, b) => a.order - b.order))), (remainingVideoLink === null || remainingVideoLink === void 0 ? void 0 : remainingVideoLink.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
7646
7415
|
className: "card-dropdown-wrapper"
|
|
7647
|
-
}, /*#__PURE__*/React.createElement(
|
|
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", {
|
|
7416
|
+
}, renderCardDropDownContent(remainingVideoLink))), _isInfo && Info && /*#__PURE__*/React.createElement("div", {
|
|
7661
7417
|
className: "chcwe-info "
|
|
7662
7418
|
}, /*#__PURE__*/React.createElement(Info, null)));
|
|
7663
7419
|
};
|
|
@@ -12249,7 +12005,7 @@ const Login = ({
|
|
|
12249
12005
|
populators: {
|
|
12250
12006
|
name: city.name,
|
|
12251
12007
|
customProps: {},
|
|
12252
|
-
component: (props, customProps) => /*#__PURE__*/React.createElement(Dropdown
|
|
12008
|
+
component: (props, customProps) => /*#__PURE__*/React.createElement(Dropdown, Object.assign({
|
|
12253
12009
|
option: cities,
|
|
12254
12010
|
optionKey: "i18nKey",
|
|
12255
12011
|
select: d => props.onChange(d),
|
|
@@ -12790,7 +12546,7 @@ const ForgotPassword = ({
|
|
|
12790
12546
|
populators: {
|
|
12791
12547
|
name: city.name,
|
|
12792
12548
|
customProps: {},
|
|
12793
|
-
component: (props, customProps) => /*#__PURE__*/React.createElement(Dropdown
|
|
12549
|
+
component: (props, customProps) => /*#__PURE__*/React.createElement(Dropdown, Object.assign({
|
|
12794
12550
|
option: cities,
|
|
12795
12551
|
optionKey: "name",
|
|
12796
12552
|
id: city.name,
|
|
@@ -13290,7 +13046,7 @@ const ChangeCity = prop => {
|
|
|
13290
13046
|
style: prop !== null && prop !== void 0 && prop.mobileView ? {
|
|
13291
13047
|
color: "#767676"
|
|
13292
13048
|
} : {}
|
|
13293
|
-
}, /*#__PURE__*/React.createElement(Dropdown
|
|
13049
|
+
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
13294
13050
|
option: selectCityData,
|
|
13295
13051
|
selected: selectCityData.find(cityValue => cityValue.value === (dropDownData === null || dropDownData === void 0 ? void 0 : dropDownData.value)),
|
|
13296
13052
|
optionKey: "label",
|
|
@@ -13302,6 +13058,70 @@ const ChangeCity = prop => {
|
|
|
13302
13058
|
}));
|
|
13303
13059
|
};
|
|
13304
13060
|
|
|
13061
|
+
const ProfessionalChangeCity = prop => {
|
|
13062
|
+
var _cities$map;
|
|
13063
|
+
const {
|
|
13064
|
+
t
|
|
13065
|
+
} = useTranslation();
|
|
13066
|
+
const {
|
|
13067
|
+
data: cities,
|
|
13068
|
+
isLoading
|
|
13069
|
+
} = Digit.Hooks.useTenants();
|
|
13070
|
+
const {
|
|
13071
|
+
selectedCity,
|
|
13072
|
+
userInfo
|
|
13073
|
+
} = prop;
|
|
13074
|
+
const cityOptions = (cities === null || cities === void 0 ? void 0 : (_cities$map = cities.map(city => ({
|
|
13075
|
+
...city,
|
|
13076
|
+
displayName: t(city.i18nKey)
|
|
13077
|
+
}))) === null || _cities$map === void 0 ? void 0 : _cities$map.filter(city => city.code !== "pb.punjab")) || [];
|
|
13078
|
+
const roles = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.roles) || [];
|
|
13079
|
+
const hasBPAArchitect = roles.some(role => (role === null || role === void 0 ? void 0 : role.code) === "BPA_ARCHITECT");
|
|
13080
|
+
let filteredCityOptions = cityOptions;
|
|
13081
|
+
if (!hasBPAArchitect) {
|
|
13082
|
+
const bpaRoles = roles.filter(role => {
|
|
13083
|
+
var _role$code;
|
|
13084
|
+
return role === null || role === void 0 ? void 0 : (_role$code = role.code) === null || _role$code === void 0 ? void 0 : _role$code.startsWith("BPA");
|
|
13085
|
+
});
|
|
13086
|
+
const allowedTenantIds = bpaRoles.map(role => role === null || role === void 0 ? void 0 : role.tenantId);
|
|
13087
|
+
filteredCityOptions = cityOptions.filter(city => allowedTenantIds.includes(city === null || city === void 0 ? void 0 : city.code));
|
|
13088
|
+
}
|
|
13089
|
+
function setCity(city) {
|
|
13090
|
+
Digit.SessionStorage.set("CITIZEN.COMMON.HOME.CITY", city);
|
|
13091
|
+
localStorage.setItem("CITIZEN.CITY", city === null || city === void 0 ? void 0 : city.code);
|
|
13092
|
+
window.location.reload();
|
|
13093
|
+
}
|
|
13094
|
+
console.log("filteredCityOptions", selectedCity);
|
|
13095
|
+
const style = {
|
|
13096
|
+
locationWrapper: {
|
|
13097
|
+
width: "100%"
|
|
13098
|
+
}
|
|
13099
|
+
};
|
|
13100
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
13101
|
+
className: "location-wrapper",
|
|
13102
|
+
style: style.locationWrapper
|
|
13103
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
13104
|
+
style: prop !== null && prop !== void 0 && prop.mobileView ? {
|
|
13105
|
+
color: "#767676",
|
|
13106
|
+
width: "100%",
|
|
13107
|
+
height: "auto",
|
|
13108
|
+
overflow: "visible"
|
|
13109
|
+
} : {
|
|
13110
|
+
width: "150px",
|
|
13111
|
+
height: "auto",
|
|
13112
|
+
paddingRight: "16px",
|
|
13113
|
+
overflow: "visible"
|
|
13114
|
+
}
|
|
13115
|
+
}, !isLoading && /*#__PURE__*/React.createElement(Dropdown, {
|
|
13116
|
+
option: filteredCityOptions,
|
|
13117
|
+
optionKey: "displayName",
|
|
13118
|
+
id: "city",
|
|
13119
|
+
selected: selectedCity === null || selectedCity === void 0 ? void 0 : selectedCity.value,
|
|
13120
|
+
select: setCity,
|
|
13121
|
+
t: t
|
|
13122
|
+
})));
|
|
13123
|
+
};
|
|
13124
|
+
|
|
13305
13125
|
const TextToImg = props => {
|
|
13306
13126
|
var _props$name, _props$name$;
|
|
13307
13127
|
return /*#__PURE__*/React.createElement("span", {
|
|
@@ -13326,7 +13146,7 @@ const TopBar = ({
|
|
|
13326
13146
|
showLanguageChange: _showLanguageChange = true,
|
|
13327
13147
|
setSideBarScrollTop
|
|
13328
13148
|
}) => {
|
|
13329
|
-
var _userDetails$info2, _ulbDetails$value, _ulbDetails$value2, _ulbDetails$value2$ci, _ulbDetails$value3, _cityDetails$city, _cityDetails$city2, _stateInfo$code, _userDetails$info3, _userDetails$info4, _userDetails$info4$us;
|
|
13149
|
+
var _userDetails$info2, _ulbDetails$value, _ulbDetails$value2, _ulbDetails$value2$ci, _ulbDetails$value3, _Digit$UserService$ge3, _userInfo$roles, _cityDetails$city, _cityDetails$city2, _stateInfo$code, _userDetails$info3, _userDetails$info4, _userDetails$info4$us;
|
|
13330
13150
|
const [profilePic, setProfilePic] = React.useState(null);
|
|
13331
13151
|
React.useEffect(async () => {
|
|
13332
13152
|
var _userDetails$info;
|
|
@@ -13407,6 +13227,11 @@ const TopBar = ({
|
|
|
13407
13227
|
const ulbName = ulbDetails ? (ulbDetails === null || ulbDetails === void 0 ? void 0 : (_ulbDetails$value = ulbDetails.value) === null || _ulbDetails$value === void 0 ? void 0 : _ulbDetails$value.displayName) + " " + (ulbDetails === null || ulbDetails === void 0 ? void 0 : (_ulbDetails$value2 = ulbDetails.value) === null || _ulbDetails$value2 === void 0 ? void 0 : (_ulbDetails$value2$ci = _ulbDetails$value2.city) === null || _ulbDetails$value2$ci === void 0 ? void 0 : _ulbDetails$value2$ci.ulbType) : "";
|
|
13408
13228
|
const ulbLogo = ulbDetails ? ulbDetails === null || ulbDetails === void 0 ? void 0 : (_ulbDetails$value3 = ulbDetails.value) === null || _ulbDetails$value3 === void 0 ? void 0 : _ulbDetails$value3.logoId : "https://raw.githubusercontent.com/anujkit/msevaImages/refs/heads/main/download.png";
|
|
13409
13229
|
const isLoggedIn = !!(userDetails !== null && userDetails !== void 0 && userDetails.access_token);
|
|
13230
|
+
const userInfo = (_Digit$UserService$ge3 = Digit.UserService.getUser()) === null || _Digit$UserService$ge3 === void 0 ? void 0 : _Digit$UserService$ge3.info;
|
|
13231
|
+
const isUserProfessional = window.location.href.includes("/citizen") && (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$roles = userInfo.roles) === null || _userInfo$roles === void 0 ? void 0 : _userInfo$roles.some(role => {
|
|
13232
|
+
var _role$code;
|
|
13233
|
+
return role === null || role === void 0 ? void 0 : (_role$code = role.code) === null || _role$code === void 0 ? void 0 : _role$code.startsWith("BPA");
|
|
13234
|
+
}));
|
|
13410
13235
|
if (CITIZEN) {
|
|
13411
13236
|
return /*#__PURE__*/React.createElement("div", {
|
|
13412
13237
|
className: "navbar",
|
|
@@ -13455,7 +13280,14 @@ const TopBar = ({
|
|
|
13455
13280
|
style: {
|
|
13456
13281
|
marginTop: "20px"
|
|
13457
13282
|
}
|
|
13458
|
-
}),
|
|
13283
|
+
}), isUserProfessional && /*#__PURE__*/React.createElement("div", {
|
|
13284
|
+
className: "left"
|
|
13285
|
+
}, !window.location.href.includes("employee/user/login") && !window.location.href.includes("employee/user/language-selection") && /*#__PURE__*/React.createElement(ProfessionalChangeCity, {
|
|
13286
|
+
dropdown: true,
|
|
13287
|
+
t: t,
|
|
13288
|
+
selectedCity: ulbDetails,
|
|
13289
|
+
userInfo: userInfo
|
|
13290
|
+
})), !urlsToDisableNotificationIcon(pathname) && /*#__PURE__*/React.createElement("div", {
|
|
13459
13291
|
className: "notification-wrapper",
|
|
13460
13292
|
onClick: onNotificationIconClick
|
|
13461
13293
|
}, notificationCountLoaded && unreadNotificationCount ? /*#__PURE__*/React.createElement("span", {
|
|
@@ -13506,7 +13338,7 @@ const TopBar = ({
|
|
|
13506
13338
|
t: t
|
|
13507
13339
|
})), (userDetails === null || userDetails === void 0 ? void 0 : userDetails.access_token) && /*#__PURE__*/React.createElement("div", {
|
|
13508
13340
|
className: "left"
|
|
13509
|
-
}, /*#__PURE__*/React.createElement(Dropdown
|
|
13341
|
+
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
13510
13342
|
option: userOptions,
|
|
13511
13343
|
optionKey: "name",
|
|
13512
13344
|
select: handleUserDropdownSelection,
|
|
@@ -14976,7 +14808,6 @@ const UserProfile = ({
|
|
|
14976
14808
|
const [userDetails, setUserDetails] = useState(null);
|
|
14977
14809
|
const [name, setName] = useState(userInfo !== null && userInfo !== void 0 && userInfo.name ? userInfo === null || userInfo === void 0 ? void 0 : userInfo.name : "");
|
|
14978
14810
|
const dateOfBirth = userDetails === null || userDetails === void 0 ? void 0 : userDetails.dob;
|
|
14979
|
-
console.log("ddd", dateOfBirth);
|
|
14980
14811
|
const formattedDob = dateOfBirth !== undefined ? format(new Date(dateOfBirth), "MM/dd/yyyy") : "";
|
|
14981
14812
|
const [dob, setDob] = useState(dateOfBirth);
|
|
14982
14813
|
const [email, setEmail] = useState(userInfo !== null && userInfo !== void 0 && userInfo.emailId ? userInfo === null || userInfo === void 0 ? void 0 : userInfo.emailId : "");
|
|
@@ -15053,11 +14884,9 @@ const UserProfile = ({
|
|
|
15053
14884
|
return [];
|
|
15054
14885
|
}
|
|
15055
14886
|
}, [StateData, isStateLoading]);
|
|
15056
|
-
console.log("uniqueDistricts", uniqueDistrictsCorrespondent, selectedCorrespondentState);
|
|
15057
14887
|
useEffect(() => {
|
|
15058
14888
|
if (typeof selectedState === "string" && (stateOptions === null || stateOptions === void 0 ? void 0 : stateOptions.length) > 0) {
|
|
15059
14889
|
const state = stateOptions.find(state => state.state_name === selectedState);
|
|
15060
|
-
console.log("stateData", stateOptions, state, selectedState);
|
|
15061
14890
|
setSelectedState(state);
|
|
15062
14891
|
}
|
|
15063
14892
|
}, [selectedState, stateOptions]);
|
|
@@ -15079,8 +14908,8 @@ const UserProfile = ({
|
|
|
15079
14908
|
setSelectedDistrict(state);
|
|
15080
14909
|
}
|
|
15081
14910
|
}, [selectedDistrict, uniqueDistricts]);
|
|
15082
|
-
useEffect(() => {
|
|
15083
|
-
var _userDetails$photo;
|
|
14911
|
+
useEffect(async () => {
|
|
14912
|
+
var _userDetails$photo, _userDetails$photo$sp, _thumbs$images;
|
|
15084
14913
|
setLoading(true);
|
|
15085
14914
|
getUserInfo();
|
|
15086
14915
|
setGender({
|
|
@@ -15100,8 +14929,9 @@ const UserProfile = ({
|
|
|
15100
14929
|
if (userDetails !== null && userDetails !== void 0 && userDetails.isAddressSame) {
|
|
15101
14930
|
setIsAddressSame(userDetails === null || userDetails === void 0 ? void 0 : userDetails.isAddressSame);
|
|
15102
14931
|
}
|
|
15103
|
-
const
|
|
15104
|
-
|
|
14932
|
+
const imgFileStoreId = userDetails === null || userDetails === void 0 ? void 0 : (_userDetails$photo = userDetails.photo) === null || _userDetails$photo === void 0 ? void 0 : (_userDetails$photo$sp = _userDetails$photo.split(",")) === null || _userDetails$photo$sp === void 0 ? void 0 : _userDetails$photo$sp.at(0);
|
|
14933
|
+
const thumbs = imgFileStoreId ? await getThumbnails([imgFileStoreId], stateId) : null;
|
|
14934
|
+
setProfileImg(thumbs === null || thumbs === void 0 ? void 0 : (_thumbs$images = thumbs.images) === null || _thumbs$images === void 0 ? void 0 : _thumbs$images[0]);
|
|
15105
14935
|
setLoading(false);
|
|
15106
14936
|
}, [userDetails !== null]);
|
|
15107
14937
|
let validation = {};
|
|
@@ -15273,7 +15103,6 @@ const UserProfile = ({
|
|
|
15273
15103
|
message: t("CORE_COMMON_DOB_REQUIRED")
|
|
15274
15104
|
});
|
|
15275
15105
|
} else {
|
|
15276
|
-
console.log("requestData.dob", requestData.dob);
|
|
15277
15106
|
const [dd, mm, yyyy] = requestData.dob.split("/");
|
|
15278
15107
|
const dobDate = new Date(`${yyyy}-${mm}-${dd}`);
|
|
15279
15108
|
const today = new Date();
|
|
@@ -15393,17 +15222,22 @@ const UserProfile = ({
|
|
|
15393
15222
|
if (responseInfo && responseInfo.status === "200") {
|
|
15394
15223
|
const _user = Digit.UserService.getUser();
|
|
15395
15224
|
if (_user) {
|
|
15225
|
+
const userObject = {
|
|
15226
|
+
..._user.info,
|
|
15227
|
+
name,
|
|
15228
|
+
mobileNumber,
|
|
15229
|
+
emailId: email,
|
|
15230
|
+
permanentCity: city,
|
|
15231
|
+
photo: profileImg
|
|
15232
|
+
};
|
|
15396
15233
|
Digit.UserService.setUser({
|
|
15397
15234
|
..._user,
|
|
15398
15235
|
info: {
|
|
15399
|
-
...
|
|
15400
|
-
name,
|
|
15401
|
-
mobileNumber,
|
|
15402
|
-
emailId: email,
|
|
15403
|
-
permanentCity: city,
|
|
15404
|
-
photo: profileImg
|
|
15236
|
+
...userObject
|
|
15405
15237
|
}
|
|
15406
15238
|
});
|
|
15239
|
+
localStorage.setItem("user-info", JSON.stringify(userObject));
|
|
15240
|
+
localStorage.setItem("Citizen.user-info", JSON.stringify(userObject));
|
|
15407
15241
|
}
|
|
15408
15242
|
}
|
|
15409
15243
|
if (currentPassword.length && newPassword.length && confirmPassword.length) {
|
|
@@ -15471,9 +15305,10 @@ const UserProfile = ({
|
|
|
15471
15305
|
});
|
|
15472
15306
|
});
|
|
15473
15307
|
const setFileStoreId = async fileStoreId => {
|
|
15308
|
+
var _thumbnails$images;
|
|
15474
15309
|
setProfilePic(fileStoreId);
|
|
15475
15310
|
const thumbnails = fileStoreId ? await getThumbnails([fileStoreId], stateId) : null;
|
|
15476
|
-
setProfileImg(thumbnails === null || thumbnails === void 0 ? void 0 : thumbnails.
|
|
15311
|
+
setProfileImg(thumbnails === null || thumbnails === void 0 ? void 0 : (_thumbnails$images = thumbnails.images) === null || _thumbnails$images === void 0 ? void 0 : _thumbnails$images[0]);
|
|
15477
15312
|
closeFileUploadDrawer();
|
|
15478
15313
|
};
|
|
15479
15314
|
function selectPermanentAddress(e) {
|
|
@@ -15519,7 +15354,6 @@ const UserProfile = ({
|
|
|
15519
15354
|
}
|
|
15520
15355
|
};
|
|
15521
15356
|
if (loading) return /*#__PURE__*/React.createElement(Loader, null);
|
|
15522
|
-
console.log("stateOptions", stateOptions);
|
|
15523
15357
|
return /*#__PURE__*/React.createElement("div", {
|
|
15524
15358
|
className: "user-profile"
|
|
15525
15359
|
}, /*#__PURE__*/React.createElement("section", {
|
|
@@ -15572,12 +15406,12 @@ const UserProfile = ({
|
|
|
15572
15406
|
type: "tel",
|
|
15573
15407
|
title: t("CORE_COMMON_PROFILE_NAME_ERROR_MESSAGE")
|
|
15574
15408
|
}, {
|
|
15575
|
-
disable:
|
|
15409
|
+
disable: editScreen
|
|
15576
15410
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
15577
15411
|
className: "user-profile-field-wrapper"
|
|
15578
15412
|
}, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
15579
15413
|
className: "user-profile-label"
|
|
15580
|
-
}, `${t("CORE_COMMON_PROFILE_GENDER")}`), /*#__PURE__*/React.createElement(Dropdown
|
|
15414
|
+
}, `${t("CORE_COMMON_PROFILE_GENDER")}`), /*#__PURE__*/React.createElement(Dropdown, {
|
|
15581
15415
|
selected: (gender === null || gender === void 0 ? void 0 : gender.length) === 1 ? gender[0] : gender,
|
|
15582
15416
|
disable: (gender === null || gender === void 0 ? void 0 : gender.length) === 1 || editScreen,
|
|
15583
15417
|
option: menu,
|
|
@@ -15650,18 +15484,17 @@ const UserProfile = ({
|
|
|
15650
15484
|
className: "user-profile-field-wrapper"
|
|
15651
15485
|
}, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
15652
15486
|
className: "user-profile-label"
|
|
15653
|
-
}, t("BPA_STATE_TYPE"), "*"), /*#__PURE__*/React.createElement(Dropdown
|
|
15487
|
+
}, t("BPA_STATE_TYPE"), "*"), /*#__PURE__*/React.createElement(Dropdown, {
|
|
15654
15488
|
t: t,
|
|
15655
15489
|
optionKey: "state_name",
|
|
15656
15490
|
option: (stateOptions === null || stateOptions === void 0 ? void 0 : stateOptions.sort((a, b) => a.state_name.localeCompare(b.state_name))) || [],
|
|
15657
15491
|
selected: selectedState,
|
|
15658
|
-
select: SelectState
|
|
15659
|
-
disable: true
|
|
15492
|
+
select: SelectState
|
|
15660
15493
|
})), /*#__PURE__*/React.createElement("div", {
|
|
15661
15494
|
className: "user-profile-field-wrapper"
|
|
15662
15495
|
}, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
15663
15496
|
className: "user-profile-label"
|
|
15664
|
-
}, t("BPA_DISTRICT_TYPE"), "*"), /*#__PURE__*/React.createElement(Dropdown
|
|
15497
|
+
}, t("BPA_DISTRICT_TYPE"), "*"), /*#__PURE__*/React.createElement(Dropdown, {
|
|
15665
15498
|
t: t,
|
|
15666
15499
|
optionKey: "district_name_english",
|
|
15667
15500
|
option: (uniqueDistricts === null || uniqueDistricts === void 0 ? void 0 : uniqueDistricts.sort((a, b) => a.district_name_english.localeCompare(b.district_name_english))) || [],
|
|
@@ -15714,7 +15547,7 @@ const UserProfile = ({
|
|
|
15714
15547
|
className: "user-profile-field-wrapper"
|
|
15715
15548
|
}, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
15716
15549
|
className: "user-profile-label"
|
|
15717
|
-
}, t("BPA_STATE_TYPE"), "*"), /*#__PURE__*/React.createElement(Dropdown
|
|
15550
|
+
}, t("BPA_STATE_TYPE"), "*"), /*#__PURE__*/React.createElement(Dropdown, {
|
|
15718
15551
|
t: t,
|
|
15719
15552
|
optionKey: "state_name",
|
|
15720
15553
|
option: (stateOptions === null || stateOptions === void 0 ? void 0 : stateOptions.sort((a, b) => a.state_name.localeCompare(b.state_name))) || [],
|
|
@@ -15725,7 +15558,7 @@ const UserProfile = ({
|
|
|
15725
15558
|
className: "user-profile-field-wrapper"
|
|
15726
15559
|
}, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
15727
15560
|
className: "user-profile-label"
|
|
15728
|
-
}, t("BPA_DISTRICT_TYPE"), "*"), /*#__PURE__*/React.createElement(Dropdown
|
|
15561
|
+
}, t("BPA_DISTRICT_TYPE"), "*"), /*#__PURE__*/React.createElement(Dropdown, {
|
|
15729
15562
|
t: t,
|
|
15730
15563
|
optionKey: "district_name_english",
|
|
15731
15564
|
option: (uniqueDistrictsCorrespondent === null || uniqueDistrictsCorrespondent === void 0 ? void 0 : uniqueDistrictsCorrespondent.sort((a, b) => a.district_name_english.localeCompare(b.district_name_english))) || [],
|
|
@@ -15773,7 +15606,7 @@ const UserProfile = ({
|
|
|
15773
15606
|
className: "user-profile-label-field-pair-flex"
|
|
15774
15607
|
}, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
15775
15608
|
className: "profile-label-margin user-profile-label-style-employee"
|
|
15776
|
-
}, `${t("CORE_COMMON_PROFILE_GENDER")}`), /*#__PURE__*/React.createElement(Dropdown
|
|
15609
|
+
}, `${t("CORE_COMMON_PROFILE_GENDER")}`), /*#__PURE__*/React.createElement(Dropdown, {
|
|
15777
15610
|
selected: (gender === null || gender === void 0 ? void 0 : gender.length) === 1 ? gender[0] : gender,
|
|
15778
15611
|
disable: (gender === null || gender === void 0 ? void 0 : gender.length) === 1 || editScreen,
|
|
15779
15612
|
option: menu,
|
|
@@ -17175,6 +17008,7 @@ const LocationSelect = ({
|
|
|
17175
17008
|
onLocationChange,
|
|
17176
17009
|
selectedCity
|
|
17177
17010
|
}) => {
|
|
17011
|
+
var _cities$map;
|
|
17178
17012
|
const {
|
|
17179
17013
|
t
|
|
17180
17014
|
} = useTranslation();
|
|
@@ -17182,10 +17016,10 @@ const LocationSelect = ({
|
|
|
17182
17016
|
data: cities,
|
|
17183
17017
|
isLoading
|
|
17184
17018
|
} = Digit.Hooks.useTenants();
|
|
17185
|
-
const cityOptions = (cities === null || cities === void 0 ? void 0 : cities.map(city => ({
|
|
17019
|
+
const cityOptions = (cities === null || cities === void 0 ? void 0 : (_cities$map = cities.map(city => ({
|
|
17186
17020
|
...city,
|
|
17187
17021
|
displayName: t(city.i18nKey)
|
|
17188
|
-
}))) || [];
|
|
17022
|
+
}))) === null || _cities$map === void 0 ? void 0 : _cities$map.filter(city => city.code != "pb.punjab")) || [];
|
|
17189
17023
|
function setCity(city) {
|
|
17190
17024
|
Digit.SessionStorage.set("CITIZEN.COMMON.HOME.CITY", city);
|
|
17191
17025
|
localStorage.setItem("CITIZEN.CITY", city === null || city === void 0 ? void 0 : city.code);
|
|
@@ -17203,7 +17037,7 @@ const LocationSelect = ({
|
|
|
17203
17037
|
style: style.locationWrapper
|
|
17204
17038
|
}, /*#__PURE__*/React.createElement("div", {
|
|
17205
17039
|
className: "label"
|
|
17206
|
-
}, t("CS_COMMON_CHOOSE_LOCATION"), /*#__PURE__*/React.createElement("span", null, " *")), !isLoading && /*#__PURE__*/React.createElement(Dropdown
|
|
17040
|
+
}, t("CS_COMMON_CHOOSE_LOCATION"), /*#__PURE__*/React.createElement("span", null, " *")), !isLoading && /*#__PURE__*/React.createElement(Dropdown, {
|
|
17207
17041
|
option: cityOptions,
|
|
17208
17042
|
optionKey: "displayName",
|
|
17209
17043
|
id: "city",
|
|
@@ -18016,13 +17850,13 @@ const NewRegistration = ({
|
|
|
18016
17850
|
className: "location-wrapper"
|
|
18017
17851
|
}, /*#__PURE__*/React.createElement("div", {
|
|
18018
17852
|
className: "label"
|
|
18019
|
-
}, t("CORE_COMMON_GENDER"), /*#__PURE__*/React.createElement("span", null, " *")), /*#__PURE__*/React.createElement(Dropdown
|
|
17853
|
+
}, t("CORE_COMMON_GENDER"), /*#__PURE__*/React.createElement("span", null, " *")), /*#__PURE__*/React.createElement(Dropdown, {
|
|
18020
17854
|
option: genders,
|
|
18021
17855
|
optionKey: "name",
|
|
18022
17856
|
id: "name",
|
|
18023
17857
|
selected: getGender,
|
|
18024
17858
|
select: setGender,
|
|
18025
|
-
placeholder: t("
|
|
17859
|
+
placeholder: t("CORE_COMMON_GENDER")
|
|
18026
17860
|
})), step === "FORM" && /*#__PURE__*/React.createElement(RegistrationForm, {
|
|
18027
17861
|
onRegisterSubmit: onRegisterSubmit,
|
|
18028
17862
|
onAgeError: onAgeError,
|
|
@@ -21483,12 +21317,6 @@ const Home$1 = ({
|
|
|
21483
21317
|
}, /*#__PURE__*/React.createElement(Route, {
|
|
21484
21318
|
key: index,
|
|
21485
21319
|
path: `${path}/${code.toLowerCase()}-home`
|
|
21486
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
21487
|
-
style: {
|
|
21488
|
-
display: "flex",
|
|
21489
|
-
flexDirection: "column",
|
|
21490
|
-
width: "100%"
|
|
21491
|
-
}
|
|
21492
21320
|
}, /*#__PURE__*/React.createElement("div", {
|
|
21493
21321
|
className: "moduleLinkHomePage",
|
|
21494
21322
|
style: {
|
|
@@ -21572,7 +21400,7 @@ const Home$1 = ({
|
|
|
21572
21400
|
text: t(`BPA_CITIZEN_HOME_STAKEHOLDER_INCLUDES_INFO_LABEL`)
|
|
21573
21401
|
}) : null,
|
|
21574
21402
|
isInfo: code === "OBPS" ? true : false
|
|
21575
|
-
})))))
|
|
21403
|
+
}))))), /*#__PURE__*/React.createElement(Route, {
|
|
21576
21404
|
key: "faq" + index,
|
|
21577
21405
|
path: `${path}/${code.toLowerCase()}-faq`
|
|
21578
21406
|
}, /*#__PURE__*/React.createElement(FAQsSection, {
|