@djb25/digit-ui-module-ws 1.0.83 → 1.0.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useMemo, useEffect, useRef, Fragment as Fragment$2, useReducer, useCallback } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { Link, useHistory, useLocation, Switch, Route, useRouteMatch, Redirect, useParams } from 'react-router-dom';
4
- import { Loader, Card, KeyNote, SubmitBar, InfoBannerIcon, SearchForm, SearchField, Dropdown, TextInput, Table, Banner, CardText, ActionBar, HomeIcon, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, VerticalTimeline, CollapsibleCardPage, LabelFieldPair, CardLabel, CardLabelError, CheckBox, PrintBtnCommon, MultiLink, LinkButton, Toast, TickMark, FormStep, RadioOrSelect, CardHeader, CitizenInfoLabel, CardSubHeader, DatePicker, RadioButtons, UploadFile, ViewsIcon, Modal, DeleteIcon, WrapUnMaskComponent, MobileNumber, StatusTable, Row, CardSectionHeader, InfoIcon, TextArea, Header, FilterFormField, RemoveableTag as RemoveableTag$1, MultiSelectDropdown, InboxComposer, DropIcon, WSICon, EmployeeModuleCard, SearchAction, PopUp, DetailsCard, CloseSvg, Localities, DownloadBtnCommon, CollectionIcon, ResponseComposer, TelePhone, DisplayPhotos, PDFSvg, GenericFileIcon, EditIcon, Label, CardSectionSubText, DownloadIcon, CardLabelDesc, FormComposer, MultiUploadWrapper, Close as Close$f, BreakLine, AddIcon, CheckPoint, ConnectingCheckPoints, Menu, ButtonSelector as ButtonSelector$1, CitizenHomeCard } from '@djb25/digit-ui-react-components';
4
+ import { Loader, Card, KeyNote, SubmitBar, InfoBannerIcon, SearchForm, SearchField, Dropdown, TextInput, Table, Banner, CardText, ActionBar, HomeIcon, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, VerticalTimeline, CollapsibleCardPage, LabelFieldPair, CardLabel, CardLabelError, CheckBox, PrintBtnCommon, MultiLink, LinkButton, Toast, TickMark, FormStep, RadioOrSelect, CardHeader, CitizenInfoLabel, CardSubHeader, DatePicker, RadioButtons, UploadFile, ViewsIcon, Modal, DeleteIcon, WrapUnMaskComponent, MobileNumber, RemoveIcon, StatusTable, Row, CardSectionHeader, InfoIcon, TextArea, Header, FilterFormField, RemoveableTag as RemoveableTag$1, MultiSelectDropdown, InboxComposer, DropIcon, WSICon, EmployeeModuleCard, SearchAction, PopUp, DetailsCard, CloseSvg, Localities, DownloadBtnCommon, CollectionIcon, ResponseComposer, TelePhone, DisplayPhotos, PDFSvg, GenericFileIcon, EditIcon, Label, CardSectionSubText, DownloadIcon, CardLabelDesc, FormComposer, MultiUploadWrapper, Close as Close$f, BreakLine, AddIcon, CheckPoint, ConnectingCheckPoints, Menu, ButtonSelector as ButtonSelector$1, CitizenHomeCard } from '@djb25/digit-ui-react-components';
5
5
  import { useForm, Controller, useWatch, useFormContext } from 'react-hook-form';
6
6
  import { read, utils as utils$1 } from 'xlsx';
7
7
  import { useQueryClient, useQuery } from 'react-query';
@@ -531,7 +531,7 @@ const getFiles = function (filesArray, tenant) {
531
531
  };
532
532
  const createPayloadOfWS = function (data) {
533
533
  try {
534
- var _Digit$UserService$ge, _userInfo$roles, _data$cpt, _data$cpt$details, _data$cpt$details$own, _data$applicationSele, _data$ConnectionDetai, _data$ConnectionDetai2, _ref, _data$ConnectionHolde, _data$documents, _data$djbEmployee, _data$governmentEmplo, _connectionHolder$gen, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ow, _data$cpt2$details$ow2, _connectionHolder$own, _connectionHolder$rel, _data$propertyAddress, _data$applicant, _data$useDetails, _data$useDetails$gend, _data$contact, _data$applicant2, _data$applicant3, _data$applicant4, _data$contact2, _data$contact3, _data$applicationSele2, _data$applicationSele3, _data$contact4, _data$cpt3, _data$cpt4, _data$cpt4$details, _data$propertyAddress2, _data$propertyAddress3, _data$propertyAddress4, _data$cpt5, _data$cpt5$details, _data$cpt5$details$ad, _data$propertyAddress5, _data$cpt6, _data$cpt6$details, _data$cpt6$details$ad, _data$propertyAddress6, _data$cpt7, _data$cpt7$details, _data$cpt7$details$ad, _data$propertyAddress7, _data$cpt8, _data$cpt8$details, _data$cpt8$details$ad, _data$propertyAddress8, _data$cpt9, _data$cpt9$details, _data$cpt9$details$ad, _data$propertyAddress9, _data$cpt0, _data$cpt0$details, _data$cpt0$details$ad, _data$propertyAddress0, _data$cpt1, _data$cpt1$details, _data$cpt1$details$ad, _data$propertyAddress1, _data$cpt10, _data$cpt10$details, _data$cpt10$details$a, _data$propertyAddress10, _data$cpt11, _data$cpt11$details, _data$cpt11$details$a, _data$cpt12, _data$cpt12$details, _data$cpt12$details$a, _data$propertyAddress11, _data$cpt13, _data$cpt13$details, _data$cpt13$details$a, _data$cpt13$details$a2, _data$propertyAddress12, _data$cpt14, _data$cpt14$details, _data$cpt14$details$a, _data$cpt14$details$a2, _data$propertyAddress13, _data$cpt15, _data$cpt15$details, _data$cpt15$details$a, _data$cpt15$details$a2, _data$cpt16, _data$cpt16$details, _data$roadCuttingDeta, _data$plumberDetails, _data$djbEmployee4, _data$djbEmployee4$do, _data$djbEmployee5, _data$zro, _data$propertyAddress14, _data$propertyAddress15, _data$cpt17, _data$cpt17$details, _data$cpt17$details$a, _data$cpt17$details$a2, _data$plumberDetails2, _data$plumberDetails3, _data$plumberDetails4, _data$plumberDetails5, _data$plumberDetails6, _data$applicationSele4, _data$applicationSele5, _data$applicationSele6, _data$applicationSele7, _connectionDetailsObj, _useDetailsObject$cat, _data$applicationSele8, _data$applicationSele9, _connectionHolder$own2, _useDetailsObject$noO, _data$applicationSele0, _data$applicationSele1, _data$applicationSele10, _data$applicationSele11, _data$applicationSele12, _data$applicationSele13, _data$applicationSele14, _data$applicationSele15, _data$applicationSele16, _data$applicationSele17, _data$applicationSele18, _data$applicationSele19, _data$applicationSele20, _data$applicationSele21, _data$applicationSele22, _data$applicationSele23, _data$applicationSele24, _data$contact5, _data$documents2, _data$documents3, _data$documents4, _data$cpt18, _Digit, _Digit$Customizations, _Digit$Customizations2, _Digit2, _Digit2$Customization, _Digit2$Customization2;
534
+ var _Digit$UserService$ge, _userInfo$roles, _data$cpt, _data$cpt$details, _data$cpt$details$own, _data$applicationSele, _data$ConnectionDetai, _data$ConnectionDetai2, _ref, _data$ConnectionHolde, _data$documents, _data$djbEmployee, _data$governmentEmplo, _connectionHolder$gen, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ow, _data$cpt2$details$ow2, _connectionHolder$own, _connectionHolder$rel, _data$propertyAddress, _data$applicant, _data$useDetails, _data$useDetails$gend, _data$contact, _data$applicant2, _data$applicant3, _data$applicant4, _data$contact2, _data$contact3, _data$applicationSele2, _data$applicationSele3, _data$contact4, _data$cpt3, _data$cpt4, _data$cpt4$details, _data$propertyAddress2, _data$propertyAddress3, _data$propertyAddress4, _data$cpt5, _data$cpt5$details, _data$cpt5$details$ad, _data$propertyAddress5, _data$cpt6, _data$cpt6$details, _data$cpt6$details$ad, _data$propertyAddress6, _data$cpt7, _data$cpt7$details, _data$cpt7$details$ad, _data$propertyAddress7, _data$cpt8, _data$cpt8$details, _data$cpt8$details$ad, _data$propertyAddress8, _data$cpt9, _data$cpt9$details, _data$cpt9$details$ad, _data$propertyAddress9, _data$cpt0, _data$cpt0$details, _data$cpt0$details$ad, _data$propertyAddress0, _data$cpt1, _data$cpt1$details, _data$cpt1$details$ad, _data$propertyAddress1, _data$cpt10, _data$cpt10$details, _data$cpt10$details$a, _data$propertyAddress10, _data$cpt11, _data$cpt11$details, _data$cpt11$details$a, _data$cpt12, _data$cpt12$details, _data$cpt12$details$a, _data$propertyAddress11, _data$cpt13, _data$cpt13$details, _data$cpt13$details$a, _data$cpt13$details$a2, _data$propertyAddress12, _data$cpt14, _data$cpt14$details, _data$cpt14$details$a, _data$cpt14$details$a2, _data$propertyAddress13, _data$cpt15, _data$cpt15$details, _data$cpt15$details$a, _data$cpt15$details$a2, _data$cpt16, _data$cpt16$details, _data$roadCuttingDeta, _data$plumberDetails, _data$disability, _data$djbEmployee4, _data$djbEmployee4$do, _data$djbEmployee5, _data$zro, _data$propertyAddress14, _data$propertyAddress15, _data$cpt17, _data$cpt17$details, _data$cpt17$details$a, _data$cpt17$details$a2, _data$plumberDetails2, _data$plumberDetails3, _data$plumberDetails4, _data$plumberDetails5, _data$plumberDetails6, _data$applicationSele4, _data$applicationSele5, _data$applicationSele6, _data$applicationSele7, _connectionDetailsObj, _useDetailsObject$cat, _data$applicationSele8, _data$applicationSele9, _connectionHolder$own2, _useDetailsObject$noO, _data$applicationSele0, _data$applicationSele1, _data$applicationSele10, _data$applicationSele11, _data$applicationSele12, _data$applicationSele13, _data$applicationSele14, _data$applicationSele15, _data$applicationSele16, _data$applicationSele17, _data$applicationSele18, _data$applicationSele19, _data$applicationSele20, _data$applicationSele21, _data$applicationSele22, _data$applicationSele23, _data$applicationSele24, _data$contact5, _data$documents2, _data$documents3, _data$documents4, _data$cpt18, _Digit, _Digit$Customizations, _Digit$Customizations2, _Digit2, _Digit2$Customization, _Digit2$Customization2;
535
535
  const userInfo = (_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info;
536
536
  const isCitizen = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.type) === "CITIZEN" || (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$roles = userInfo.roles) === null || _userInfo$roles === void 0 ? void 0 : _userInfo$roles.some(role => role.code === "CITIZEN"));
537
537
  data === null || data === void 0 ? void 0 : (_data$cpt = data.cpt) === null || _data$cpt === void 0 ? void 0 : (_data$cpt$details = _data$cpt.details) === null || _data$cpt$details === void 0 ? void 0 : (_data$cpt$details$own = _data$cpt$details.owners) === null || _data$cpt$details$own === void 0 ? void 0 : _data$cpt$details$own.forEach(owner => {
@@ -642,7 +642,8 @@ const createPayloadOfWS = function (data) {
642
642
  name: details === null || details === void 0 ? void 0 : details.plumberName,
643
643
  mobileNumber: details === null || details === void 0 ? void 0 : details.plumberMobileNo
644
644
  })),
645
- additionalDetails: _extends({}, useDetailsObject, data === null || data === void 0 ? void 0 : data.djbEmployee, {
645
+ additionalDetails: _extends({}, useDetailsObject, data === null || data === void 0 ? void 0 : data.djbEmployee, data === null || data === void 0 ? void 0 : data.disability, {
646
+ isDivyangjan: !!(data !== null && data !== void 0 && (_data$disability = data.disability) !== null && _data$disability !== void 0 && _data$disability.isDivyangjan),
646
647
  document: (data === null || data === void 0 ? void 0 : (_data$djbEmployee4 = data.djbEmployee) === null || _data$djbEmployee4 === void 0 ? void 0 : (_data$djbEmployee4$do = _data$djbEmployee4.document) === null || _data$djbEmployee4$do === void 0 ? void 0 : _data$djbEmployee4$do.fileStoreId) || (data === null || data === void 0 ? void 0 : (_data$djbEmployee5 = data.djbEmployee) === null || _data$djbEmployee5 === void 0 ? void 0 : _data$djbEmployee5.document) || undefined
647
648
  }, data === null || data === void 0 ? void 0 : data.bankDetails, data === null || data === void 0 ? void 0 : data.declarationData, data === null || data === void 0 ? void 0 : data.declaration, {
648
649
  zro: (data === null || data === void 0 ? void 0 : (_data$zro = data.zro) === null || _data$zro === void 0 ? void 0 : _data$zro.code) || (data === null || data === void 0 ? void 0 : data.zro),
@@ -18047,6 +18048,14 @@ const UploadFileDigiLocker = props => {
18047
18048
  };
18048
18049
 
18049
18050
  const DIGILOCKER_SUPPORTED_CODES = ["AADHAAR", "AADHAR", "DRIVING", "DRVLC", "PAN"];
18051
+ const ENVIRONMENT_FILE_STORE_IDS = {
18052
+ uat: "261542df-8dae-41e7-aa17-00cd288faf3b",
18053
+ dev: "0d394691-45ed-4036-97e8-8de8b0f166b1"
18054
+ };
18055
+ const getEnvironmentFileStoreId = () => {
18056
+ const hostname = window.location.hostname.toLowerCase();
18057
+ return hostname.includes("uat") ? ENVIRONMENT_FILE_STORE_IDS.uat : ENVIRONMENT_FILE_STORE_IDS.dev;
18058
+ };
18050
18059
  const isDigiLockerEligible = function (code) {
18051
18060
  if (code === void 0) {
18052
18061
  code = "";
@@ -18054,8 +18063,26 @@ const isDigiLockerEligible = function (code) {
18054
18063
  const upper = code.toUpperCase();
18055
18064
  return DIGILOCKER_SUPPORTED_CODES.some(keyword => upper.includes(keyword));
18056
18065
  };
18066
+ const isOtherDocument = function (code) {
18067
+ if (code === void 0) {
18068
+ code = "";
18069
+ }
18070
+ return code.toUpperCase().includes("OTHER");
18071
+ };
18072
+ const removeDuplicateOtherDocuments = function (documentList) {
18073
+ if (documentList === void 0) {
18074
+ documentList = [];
18075
+ }
18076
+ const documentTypes = new Set();
18077
+ return documentList.filter(document => {
18078
+ if (!isOtherDocument(document === null || document === void 0 ? void 0 : document.documentType)) return true;
18079
+ if (documentTypes.has(document.documentType)) return false;
18080
+ documentTypes.add(document.documentType);
18081
+ return true;
18082
+ });
18083
+ };
18057
18084
  const WSDocumentsEmployee = _ref => {
18058
- var _formData$documents, _formData$DocumentsRe, _applicationDetailsDa, _applicationDetailsDa2, _wsDocs$wsDocsData3;
18085
+ var _applicationDetailsDa, _applicationDetailsDa2, _wsDocs$wsDocsData3;
18059
18086
  let t = _ref.t,
18060
18087
  config = _ref.config,
18061
18088
  onSelect = _ref.onSelect,
@@ -18065,7 +18092,10 @@ const WSDocumentsEmployee = _ref => {
18065
18092
  clearFormErrors = _ref.clearErrors,
18066
18093
  formState = _ref.formState;
18067
18094
  const tenantId = Digit.ULBService.getCurrentTenantId();
18068
- const _useState = useState(userType === "citizen" ? (formData === null || formData === void 0 ? void 0 : (_formData$documents = formData.documents) === null || _formData$documents === void 0 ? void 0 : _formData$documents.documents) || (formData === null || formData === void 0 ? void 0 : formData.documents) || [] : (formData === null || formData === void 0 ? void 0 : (_formData$DocumentsRe = formData.DocumentsRequired) === null || _formData$DocumentsRe === void 0 ? void 0 : _formData$DocumentsRe.documents) || []),
18095
+ const _useState = useState(() => {
18096
+ var _formData$documents, _formData$DocumentsRe;
18097
+ return removeDuplicateOtherDocuments(userType === "citizen" ? (formData === null || formData === void 0 ? void 0 : (_formData$documents = formData.documents) === null || _formData$documents === void 0 ? void 0 : _formData$documents.documents) || (formData === null || formData === void 0 ? void 0 : formData.documents) || [] : (formData === null || formData === void 0 ? void 0 : (_formData$DocumentsRe = formData.DocumentsRequired) === null || _formData$DocumentsRe === void 0 ? void 0 : _formData$DocumentsRe.documents) || []);
18098
+ }),
18069
18099
  documents = _useState[0],
18070
18100
  setDocuments = _useState[1];
18071
18101
  const _useState2 = useState(true),
@@ -18092,10 +18122,21 @@ const WSDocumentsEmployee = _ref => {
18092
18122
  onSelect(config.key, documentStep);
18093
18123
  } else {
18094
18124
  onSelect(config.key, {
18095
- documents
18125
+ documents: removeDuplicateOtherDocuments(documents)
18096
18126
  });
18097
18127
  }
18098
18128
  };
18129
+ const downloadDocument = function () {
18130
+ try {
18131
+ return Promise.resolve(Digit.UploadServices.DownloadFile(getEnvironmentFileStoreId(), "dl", "NOC for New Delhi Jal Board Connection.pdf")).then(function (downloaded) {
18132
+ if (!downloaded) {
18133
+ setError(t("CS_FILE_DOWNLOAD_ERROR") || "PDF download failed");
18134
+ }
18135
+ });
18136
+ } catch (e) {
18137
+ return Promise.reject(e);
18138
+ }
18139
+ };
18099
18140
  useEffect(() => {
18100
18141
  var _wsDocs$wsDocsData;
18101
18142
  let count = 0;
@@ -18152,7 +18193,8 @@ const WSDocumentsEmployee = _ref => {
18152
18193
  setFormError: setFormError,
18153
18194
  clearFormErrors: clearFormErrors,
18154
18195
  config: config,
18155
- formState: formState
18196
+ formState: formState,
18197
+ isOtherDocument: isOtherDocument(document === null || document === void 0 ? void 0 : document.code)
18156
18198
  });
18157
18199
  }));
18158
18200
  if (userType === "citizen") {
@@ -18173,14 +18215,32 @@ const WSDocumentsEmployee = _ref => {
18173
18215
  return /*#__PURE__*/React.createElement(CollapsibleCardPage, {
18174
18216
  title: t("WS_DOCUMENTS"),
18175
18217
  defaultOpen: true
18176
- }, innerContent, error && /*#__PURE__*/React.createElement(Toast, {
18218
+ }, /*#__PURE__*/React.createElement("button", {
18219
+ type: "button",
18220
+ onClick: event => {
18221
+ event.stopPropagation();
18222
+ downloadDocument();
18223
+ },
18224
+ style: {
18225
+ cursor: "pointer",
18226
+ color: "#fff",
18227
+ fontWeight: "bold",
18228
+ padding: "6px 14px",
18229
+ border: "1px solid #00497e",
18230
+ borderRadius: "4px",
18231
+ backgroundColor: "#00497e",
18232
+ marginLeft: "auto",
18233
+ marginRight: "32px",
18234
+ whiteSpace: "nowrap"
18235
+ }
18236
+ }, t("WS_DOWNLOAD_DOCUMENT")), innerContent, error && /*#__PURE__*/React.createElement(Toast, {
18177
18237
  label: error,
18178
18238
  onClose: () => setError(null),
18179
18239
  error: true
18180
18240
  }));
18181
18241
  };
18182
18242
  function SelectDocument(_ref2) {
18183
- var _formData$ConnectionD, _doc$i18nKey, _selectedDocument$cod2, _selectedDocument$cod3, _selectedDocument$cod4, _selectedDocument$cod5, _selectedDocument$cod6, _selectedDocument$cod7, _selectedDocument$cod8, _selectedDocument$cod9, _selectedDocument$cod0, _selectedDocument$cod1, _selectedDocument$cod10, _selectedDocument$cod11, _selectedDocument$cod12, _selectedDocument$cod13, _selectedDocument$cod14, _selectedDocument$cod15, _doc$i18nKey2, _doc$i18nKey3;
18243
+ var _formData$ConnectionD, _doc$i18nKey, _selectedDocument$cod2, _selectedDocument$cod3, _selectedDocument$cod4, _selectedDocument$cod5, _selectedDocument$cod6, _selectedDocument$cod7, _selectedDocument$cod8, _selectedDocument$cod9, _selectedDocument$cod0, _selectedDocument$cod1, _selectedDocument$cod10, _selectedDocument$cod11, _selectedDocument$cod12, _selectedDocument$cod13, _selectedDocument$cod14, _selectedDocument$cod15, _doc$i18nKey2;
18184
18244
  let t = _ref2.t,
18185
18245
  doc = _ref2.document,
18186
18246
  setDocuments = _ref2.setDocuments,
@@ -18191,11 +18251,17 @@ function SelectDocument(_ref2) {
18191
18251
  clearFormErrors = _ref2.clearFormErrors,
18192
18252
  config = _ref2.config,
18193
18253
  formState = _ref2.formState,
18194
- id = _ref2.id;
18254
+ id = _ref2.id,
18255
+ _ref2$isOtherDocument = _ref2.isOtherDocument,
18256
+ isOther = _ref2$isOtherDocument === void 0 ? false : _ref2$isOtherDocument;
18195
18257
  const fileRef = useRef();
18196
- const filteredDocument = documents === null || documents === void 0 ? void 0 : documents.filter(item => {
18258
+ const otherUploadedDocuments = isOther ? (documents === null || documents === void 0 ? void 0 : documents.filter(item => {
18197
18259
  var _item$documentType;
18198
18260
  return item === null || item === void 0 ? void 0 : (_item$documentType = item.documentType) === null || _item$documentType === void 0 ? void 0 : _item$documentType.includes(doc === null || doc === void 0 ? void 0 : doc.code);
18261
+ })) || [] : [];
18262
+ const filteredDocument = isOther ? null : documents === null || documents === void 0 ? void 0 : documents.filter(item => {
18263
+ var _item$documentType2;
18264
+ return item === null || item === void 0 ? void 0 : (_item$documentType2 = item.documentType) === null || _item$documentType2 === void 0 ? void 0 : _item$documentType2.includes(doc === null || doc === void 0 ? void 0 : doc.code);
18199
18265
  })[0];
18200
18266
  const _useState4 = useState(() => {
18201
18267
  var _filteredDocument$doc, _doc$dropdownData2;
@@ -18214,10 +18280,10 @@ function SelectDocument(_ref2) {
18214
18280
  const _useState5 = useState(null),
18215
18281
  file = _useState5[0],
18216
18282
  setFile = _useState5[1];
18217
- const _useState6 = useState(() => (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId) || null),
18283
+ const _useState6 = useState(() => isOther ? null : (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId) || null),
18218
18284
  uploadedFile = _useState6[0],
18219
18285
  setUploadedFile = _useState6[1];
18220
- const _useState7 = useState(() => (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentUid) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentNumber) || ""),
18286
+ const _useState7 = useState(() => isOther ? "" : (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentUid) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentNumber) || ""),
18221
18287
  documentUid = _useState7[0],
18222
18288
  setDocumentUid = _useState7[1];
18223
18289
  const _useState8 = useState(false),
@@ -18276,12 +18342,23 @@ function SelectDocument(_ref2) {
18276
18342
  setShowCamera(false);
18277
18343
  };
18278
18344
  const handleSelectDocument = value => setSelectedDocument(value);
18279
- const viewDocument = function () {
18345
+ const removeUploadedDocument = fileStoreId => {
18346
+ setDocuments(previousDocuments => previousDocuments.filter(item => (item === null || item === void 0 ? void 0 : item.fileStoreId) !== fileStoreId));
18347
+ if (fileStoreId === uploadedFile) {
18348
+ setUploadedFile(null);
18349
+ setFile(null);
18350
+ setDocumentUid("");
18351
+ }
18352
+ };
18353
+ const viewDocument = function (fileStoreId) {
18354
+ if (fileStoreId === void 0) {
18355
+ fileStoreId = uploadedFile;
18356
+ }
18280
18357
  try {
18281
18358
  const _temp2 = function () {
18282
- if (uploadedFile) {
18359
+ if (fileStoreId) {
18283
18360
  const _temp = _catch(function () {
18284
- return Promise.resolve(Digit.UploadServices.FileFetchbyid(uploadedFile, Digit.ULBService.getStateId())).then(function (res) {
18361
+ return Promise.resolve(Digit.UploadServices.FileFetchbyid(fileStoreId, Digit.ULBService.getStateId())).then(function (res) {
18285
18362
  if (res !== null && res !== void 0 && res.data) {
18286
18363
  var _res$headers, _res$headers2;
18287
18364
  const contentType = ((_res$headers = res.headers) === null || _res$headers === void 0 ? void 0 : _res$headers["content-type"]) || ((_res$headers2 = res.headers) === null || _res$headers2 === void 0 ? void 0 : _res$headers2["Content-Type"]) || "";
@@ -18362,7 +18439,7 @@ function SelectDocument(_ref2) {
18362
18439
  useEffect(() => {
18363
18440
  if (selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.code) {
18364
18441
  setDocuments(prev => {
18365
- const filteredDocumentsByDocumentType = prev === null || prev === void 0 ? void 0 : prev.filter(item => (item === null || item === void 0 ? void 0 : item.documentType) !== (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code));
18442
+ const filteredDocumentsByDocumentType = isOther ? prev === null || prev === void 0 ? void 0 : prev.filter(item => (item === null || item === void 0 ? void 0 : item.fileStoreId) !== (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId)) : prev === null || prev === void 0 ? void 0 : prev.filter(item => (item === null || item === void 0 ? void 0 : item.documentType) !== (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code));
18366
18443
  if ((uploadedFile === null || uploadedFile === void 0 ? void 0 : uploadedFile.length) === 0 || uploadedFile === null) {
18367
18444
  return filteredDocumentsByDocumentType;
18368
18445
  }
@@ -18371,6 +18448,7 @@ function SelectDocument(_ref2) {
18371
18448
  documentType: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code,
18372
18449
  fileStoreId: uploadedFile,
18373
18450
  fileName: (file === null || file === void 0 ? void 0 : file.name) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileName) || "",
18451
+ documentName: (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.i18nKey) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) || "",
18374
18452
  documentUid: documentUid,
18375
18453
  documentNumber: documentUid,
18376
18454
  i18nKey: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code,
@@ -18400,48 +18478,60 @@ function SelectDocument(_ref2) {
18400
18478
  (function () {
18401
18479
  try {
18402
18480
  setError(null);
18403
- const _temp6 = function () {
18481
+ const _temp7 = function () {
18404
18482
  if (file) {
18405
- const _temp5 = function () {
18406
- if (file.size >= 5242880) {
18407
- setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
18483
+ const isDuplicateDocument = isOther && documents.some(item => (item === null || item === void 0 ? void 0 : item.documentType) === (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code));
18484
+ const _temp6 = function () {
18485
+ if (isDuplicateDocument) {
18486
+ const documentNameKey = (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.i18nKey) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) || "This";
18487
+ const translatedDocumentName = t(documentNameKey);
18488
+ const documentName = translatedDocumentName === documentNameKey ? documentNameKey.replaceAll("_", " ") : translatedDocumentName;
18489
+ setError("Document \"" + documentName + "\" has already been uploaded.");
18490
+ setFile(null);
18408
18491
  } else {
18409
- const _temp4 = function () {
18410
- if ((doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.APPLICANTPHOTO" && !file.type.match(/image\/(jpeg|png)/i) && !file.name.match(/\.(jpg|jpeg|png)$/i)) {
18411
- setError(t("WS_ONLY_JPG_PNG_ALLOWED") || "Only JPG and PNG files are allowed for Applicant Photo");
18412
- setFile(null);
18492
+ const _temp5 = function () {
18493
+ if (file.size >= 5242880) {
18494
+ setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
18413
18495
  } else {
18414
- const _temp3 = _finallyRethrows(function () {
18415
- return _catch(function () {
18416
- setUploadedFile(null);
18417
- setIsUploading(true);
18418
- return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getStateId())).then(function (response) {
18419
- var _response$data, _response$data$files;
18420
- if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
18421
- var _response$data2, _response$data2$files;
18422
- setUploadedFile(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files[0]) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.fileStoreId);
18423
- } else {
18496
+ const _temp4 = function () {
18497
+ if ((doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.APPLICANTPHOTO" && !file.type.match(/image\/(jpeg|png)/i) && !file.name.match(/\.(jpg|jpeg|png)$/i)) {
18498
+ setError(t("WS_ONLY_JPG_PNG_ALLOWED") || "Only JPG and PNG files are allowed for Applicant Photo");
18499
+ setFile(null);
18500
+ } else {
18501
+ const _temp3 = _finallyRethrows(function () {
18502
+ return _catch(function () {
18503
+ setUploadedFile(null);
18504
+ setIsUploading(true);
18505
+ return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getStateId())).then(function (response) {
18506
+ var _response$data, _response$data$files;
18507
+ if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
18508
+ var _response$data2, _response$data2$files;
18509
+ setUploadedFile(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files[0]) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.fileStoreId);
18510
+ } else {
18511
+ setError(t("CS_FILE_UPLOAD_ERROR"));
18512
+ }
18513
+ });
18514
+ }, function () {
18424
18515
  setError(t("CS_FILE_UPLOAD_ERROR"));
18425
- }
18516
+ });
18517
+ }, function (_wasThrown, _result) {
18518
+ setIsUploading(false);
18519
+ if (_wasThrown) throw _result;
18520
+ return _result;
18426
18521
  });
18427
- }, function () {
18428
- setError(t("CS_FILE_UPLOAD_ERROR"));
18429
- });
18430
- }, function (_wasThrown, _result) {
18431
- setIsUploading(false);
18432
- if (_wasThrown) throw _result;
18433
- return _result;
18434
- });
18435
- if (_temp3 && _temp3.then) return _temp3.then(function () {});
18522
+ if (_temp3 && _temp3.then) return _temp3.then(function () {});
18523
+ }
18524
+ }();
18525
+ if (_temp4 && _temp4.then) return _temp4.then(function () {});
18436
18526
  }
18437
18527
  }();
18438
- if (_temp4 && _temp4.then) return _temp4.then(function () {});
18528
+ if (_temp5 && _temp5.then) return _temp5.then(function () {});
18439
18529
  }
18440
18530
  }();
18441
- if (_temp5 && _temp5.then) return _temp5.then(function () {});
18531
+ if (_temp6 && _temp6.then) return _temp6.then(function () {});
18442
18532
  }
18443
18533
  }();
18444
- return _temp6 && _temp6.then ? _temp6.then(function () {}) : void 0;
18534
+ return _temp7 && _temp7.then ? _temp7.then(function () {}) : void 0;
18445
18535
  } catch (e) {
18446
18536
  Promise.reject(e);
18447
18537
  }
@@ -18567,11 +18657,35 @@ function SelectDocument(_ref2) {
18567
18657
  gap: "8px",
18568
18658
  gridColumn: "span 1"
18569
18659
  }
18660
+ }, /*#__PURE__*/React.createElement("div", {
18661
+ style: {
18662
+ display: "flex",
18663
+ alignItems: "center",
18664
+ justifyContent: "space-between"
18665
+ }
18570
18666
  }, /*#__PURE__*/React.createElement(CardLabel, {
18571
18667
  style: {
18572
18668
  margin: 0
18573
18669
  }
18574
- }, doc !== null && doc !== void 0 && doc.required ? t((doc === null || doc === void 0 ? void 0 : (_doc$i18nKey2 = doc.i18nKey) === null || _doc$i18nKey2 === void 0 ? void 0 : _doc$i18nKey2.replaceAll(".", "_")) + "_UPLOAD_DOCUMENT") + "*" : "" + t((doc === null || doc === void 0 ? void 0 : (_doc$i18nKey3 = doc.i18nKey) === null || _doc$i18nKey3 === void 0 ? void 0 : _doc$i18nKey3.replaceAll(".", "_")) + "_UPLOAD_DOCUMENT")), /*#__PURE__*/React.createElement("div", {
18670
+ }, t((doc === null || doc === void 0 ? void 0 : (_doc$i18nKey2 = doc.i18nKey) === null || _doc$i18nKey2 === void 0 ? void 0 : _doc$i18nKey2.replaceAll(".", "_")) + "_UPLOAD_DOCUMENT"), doc !== null && doc !== void 0 && doc.required ? "*" : ""), isOther && /*#__PURE__*/React.createElement("button", {
18671
+ type: "button",
18672
+ onClick: () => {
18673
+ setUploadedFile(null);
18674
+ setFile(null);
18675
+ setSelectedDocument(doc !== null && doc !== void 0 && doc.hasDropdown ? {} : doc);
18676
+ setDocumentUid("");
18677
+ setDocNumberError(null);
18678
+ },
18679
+ style: {
18680
+ border: "1px solid #00497e",
18681
+ background: "#fff",
18682
+ color: "#00497e",
18683
+ borderRadius: "4px",
18684
+ padding: "4px 10px",
18685
+ cursor: "pointer",
18686
+ fontWeight: "bold"
18687
+ }
18688
+ }, "+ Add")), /*#__PURE__*/React.createElement("div", {
18575
18689
  className: "field",
18576
18690
  style: {
18577
18691
  display: "flex",
@@ -18642,7 +18756,47 @@ function SelectDocument(_ref2) {
18642
18756
  setIsDocumentUidLocked(false);
18643
18757
  setDocumentUid("");
18644
18758
  }
18645
- })))), /*#__PURE__*/React.createElement("div", {
18759
+ }))), (isOther ? otherUploadedDocuments : uploadedFile ? [{
18760
+ fileStoreId: uploadedFile,
18761
+ fileName: (file === null || file === void 0 ? void 0 : file.name) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileName),
18762
+ documentNumber: documentUid
18763
+ }] : []).map((uploadedDocument, index) => /*#__PURE__*/React.createElement("div", {
18764
+ key: uploadedDocument.fileStoreId || index,
18765
+ style: {
18766
+ display: "flex",
18767
+ alignItems: "center",
18768
+ gap: "12px",
18769
+ marginTop: "4px",
18770
+ color: "#00497e"
18771
+ }
18772
+ }, /*#__PURE__*/React.createElement("span", {
18773
+ style: {
18774
+ fontWeight: "bold"
18775
+ }
18776
+ }, uploadedDocument.documentName || uploadedDocument.i18nKey || uploadedDocument.documentType ? t(uploadedDocument.documentName || uploadedDocument.i18nKey || uploadedDocument.documentType) : t("CS_COMMON_DOCUMENT"), " - ", uploadedDocument.fileName || t("CS_COMMON_DOCUMENT")), uploadedDocument.documentNumber && /*#__PURE__*/React.createElement("span", null, uploadedDocument.documentNumber), /*#__PURE__*/React.createElement("button", {
18777
+ type: "button",
18778
+ onClick: () => viewDocument(uploadedDocument.fileStoreId),
18779
+ title: t("WS_VIEW_DOCUMENT") || "View Document",
18780
+ style: {
18781
+ border: "none",
18782
+ background: "transparent",
18783
+ color: "#00497e",
18784
+ cursor: "pointer",
18785
+ padding: 0
18786
+ }
18787
+ }, /*#__PURE__*/React.createElement(ViewsIcon, null)), /*#__PURE__*/React.createElement("button", {
18788
+ type: "button",
18789
+ onClick: () => removeUploadedDocument(uploadedDocument.fileStoreId),
18790
+ title: "Remove Document",
18791
+ style: {
18792
+ border: "none",
18793
+ background: "transparent",
18794
+ color: "#d32f2f",
18795
+ cursor: "pointer",
18796
+ padding: 0,
18797
+ fontSize: "18px"
18798
+ }
18799
+ }, /*#__PURE__*/React.createElement(RemoveIcon, null))))), /*#__PURE__*/React.createElement("div", {
18646
18800
  style: {
18647
18801
  display: "flex",
18648
18802
  flexDirection: "column",
@@ -18695,21 +18849,7 @@ function SelectDocument(_ref2) {
18695
18849
  fontWeight: "bold",
18696
18850
  fontSize: "14px"
18697
18851
  }
18698
- }, "\u2714 Uploaded")), uploadedFile && /*#__PURE__*/React.createElement("div", {
18699
- onClick: viewDocument,
18700
- style: {
18701
- display: "flex",
18702
- alignItems: "center",
18703
- gap: "8px",
18704
- cursor: "pointer",
18705
- color: "#00497e",
18706
- fontWeight: "bold",
18707
- padding: "8px 16px",
18708
- border: "1px solid #00497e",
18709
- borderRadius: "4px",
18710
- backgroundColor: "#fff"
18711
- }
18712
- }, /*#__PURE__*/React.createElement(ViewsIcon, null), /*#__PURE__*/React.createElement("span", null, t("WS_VIEW_DOCUMENT") || "View Document")))), showCamera && /*#__PURE__*/React.createElement(CameraCaptureModal, {
18852
+ }, "\u2714 Uploaded")))), showCamera && /*#__PURE__*/React.createElement(CameraCaptureModal, {
18713
18853
  onCapture: handleCapture,
18714
18854
  onClose: () => setShowCamera(false),
18715
18855
  t: t
@@ -18785,7 +18925,7 @@ const CameraCaptureModal = _ref4 => {
18785
18925
  useEffect(() => {
18786
18926
  const startCamera = function () {
18787
18927
  try {
18788
- const _temp7 = _catch(function () {
18928
+ const _temp8 = _catch(function () {
18789
18929
  return Promise.resolve(navigator.mediaDevices.getUserMedia({
18790
18930
  video: true
18791
18931
  })).then(function (mediaStream) {
@@ -18798,7 +18938,7 @@ const CameraCaptureModal = _ref4 => {
18798
18938
  setError(t("WS_CAMERA_ACCESS_ERROR") || "Camera Access Error");
18799
18939
  console.error("Error accessing camera: ", err);
18800
18940
  });
18801
- return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(function () {}) : void 0);
18941
+ return Promise.resolve(_temp8 && _temp8.then ? _temp8.then(function () {}) : void 0);
18802
18942
  } catch (e) {
18803
18943
  return Promise.reject(e);
18804
18944
  }
@@ -23546,6 +23686,57 @@ const WSDjbEmployee = _ref => {
23546
23686
  return /*#__PURE__*/React.createElement(React.Fragment, null, FormContent);
23547
23687
  };
23548
23688
 
23689
+ const WSDivyangjan = _ref => {
23690
+ var _formData$disability, _formData$additionalD;
23691
+ let config = _ref.config,
23692
+ onSelect = _ref.onSelect,
23693
+ userType = _ref.userType,
23694
+ formData = _ref.formData;
23695
+ const _useTranslation = useTranslation(),
23696
+ t = _useTranslation.t;
23697
+ const _useForm = useForm({
23698
+ defaultValues: {
23699
+ isDivyangjan: !!(formData !== null && formData !== void 0 && (_formData$disability = formData.disability) !== null && _formData$disability !== void 0 && _formData$disability.isDivyangjan || formData !== null && formData !== void 0 && (_formData$additionalD = formData.additionalDetails) !== null && _formData$additionalD !== void 0 && _formData$additionalD.isDivyangjan)
23700
+ }
23701
+ }),
23702
+ control = _useForm.control,
23703
+ watch = _useForm.watch;
23704
+ const formValue = watch();
23705
+ const goNext = () => onSelect(config.key, {
23706
+ isDivyangjan: !!formValue.isDivyangjan
23707
+ });
23708
+ const onSkip = () => onSelect();
23709
+ useEffect(() => {
23710
+ if (userType === "employee") {
23711
+ onSelect(config.key, {
23712
+ isDivyangjan: !!formValue.isDivyangjan
23713
+ });
23714
+ }
23715
+ }, [config.key, formValue.isDivyangjan, onSelect, userType]);
23716
+ const content = /*#__PURE__*/React.createElement(CollapsibleCardPage, {
23717
+ title: "Divyangjan/Person with Disability?",
23718
+ defaultOpen: true
23719
+ }, /*#__PURE__*/React.createElement("div", {
23720
+ style: {
23721
+ width: "max-content"
23722
+ }
23723
+ }, /*#__PURE__*/React.createElement(Controller, {
23724
+ control: control,
23725
+ name: "isDivyangjan",
23726
+ render: props => /*#__PURE__*/React.createElement(CheckBox, {
23727
+ label: "Divyangjan/Person with Disability?",
23728
+ checked: !!props.value,
23729
+ onChange: event => props.onChange(event.target.checked)
23730
+ })
23731
+ })));
23732
+ return userType === "citizen" ? /*#__PURE__*/React.createElement(FormStep, {
23733
+ t: t,
23734
+ config: config,
23735
+ onSelect: goNext,
23736
+ onSkip: onSkip
23737
+ }, content) : content;
23738
+ };
23739
+
23549
23740
  const _excluded$1 = ["t", "config", "onSelect", "formData", "formState", "setError", "clearErrors"];
23550
23741
  const NUMBER_PATTERN$1 = /^\d+$/;
23551
23742
  const DECIMAL_PATTERN$1 = /^\d+(\.\d{1,2})?$/;
@@ -27621,12 +27812,25 @@ const newConfig = [{
27621
27812
  cardText: "",
27622
27813
  submitBarLabel: "CS_COMMON_NEXT"
27623
27814
  }
27815
+ }, {
27816
+ route: "disability-details",
27817
+ component: "WSDivyangjan",
27818
+ key: "disability",
27819
+ nextStep: "document-details",
27820
+ WATER: "document-details",
27821
+ hideInEmployee: true,
27822
+ texts: {
27823
+ headerCaption: "WS_COMMON_CONNECTION_DETAIL",
27824
+ header: "Divyangjan/Person with Disability?",
27825
+ cardText: "",
27826
+ submitBarLabel: "CS_COMMON_NEXT"
27827
+ }
27624
27828
  }, {
27625
27829
  route: "djb-employee-details",
27626
27830
  component: "WSDjbEmployee",
27627
27831
  key: "djbEmployee",
27628
- nextStep: "document-details",
27629
- WATER: "document-details",
27832
+ nextStep: "disability-details",
27833
+ WATER: "disability-details",
27630
27834
  hideInEmployee: true,
27631
27835
  texts: {
27632
27836
  headerCaption: "WS_COMMON_CONNECTION_DETAIL",
@@ -35143,6 +35347,7 @@ const CheckPage = _ref => {
35143
35347
  const propertyAddress = (value === null || value === void 0 ? void 0 : value.propertyLocationDetails) || {};
35144
35348
  const useDetails = (value === null || value === void 0 ? void 0 : (_value$waterConnectio = value.waterConnection) === null || _value$waterConnectio === void 0 ? void 0 : _value$waterConnectio.useDetails) || {};
35145
35349
  const djbEmployee = (value === null || value === void 0 ? void 0 : value.djbEmployee) || {};
35350
+ const disability = (value === null || value === void 0 ? void 0 : value.disability) || (value === null || value === void 0 ? void 0 : value.additionalDetails) || {};
35146
35351
  const bankDetails = (value === null || value === void 0 ? void 0 : value.bankDetails) || {};
35147
35352
  const additionalDetails = {};
35148
35353
  const checkForNA = val => val ? val : "CS_NA";
@@ -35450,7 +35655,15 @@ const CheckPage = _ref => {
35450
35655
  },
35451
35656
  onClick: () => openFilePDF(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document)
35452
35657
  }, /*#__PURE__*/React.createElement(GenericFileIcon, null), " ", t("CS_COMMON_VIEW"))
35453
- }))), /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_BANK_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, {
35658
+ }))), /*#__PURE__*/React.createElement(CardSubHeader, null, "Divyangjan/Person with Disability?"), /*#__PURE__*/React.createElement(StatusTable, {
35659
+ style: {
35660
+ marginTop: "10px",
35661
+ marginBottom: "30px"
35662
+ }
35663
+ }, /*#__PURE__*/React.createElement(Row, {
35664
+ label: "Divyangjan/Person with Disability?",
35665
+ text: "" + (disability !== null && disability !== void 0 && disability.isDivyangjan ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO"))
35666
+ })), /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_BANK_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, {
35454
35667
  style: {
35455
35668
  marginTop: "10px",
35456
35669
  marginBottom: "30px"
@@ -36904,20 +37117,22 @@ const getAddress$1 = (address, t) => {
36904
37117
  return (address !== null && address !== void 0 && address.doorNo ? (address === null || address === void 0 ? void 0 : address.doorNo) + ", " : "") + " " + (address !== null && address !== void 0 && address.street ? (address === null || address === void 0 ? void 0 : address.street) + ", " : "") + (address !== null && address !== void 0 && address.landmark ? (address === null || address === void 0 ? void 0 : address.landmark) + ", " : "") + t(Digit.Utils.pt.getMohallaLocale(address === null || address === void 0 ? void 0 : address.locality.code, address === null || address === void 0 ? void 0 : address.tenantId)) + ", " + t(Digit.Utils.pt.getCityLocale(address === null || address === void 0 ? void 0 : address.tenantId)) + (address !== null && address !== void 0 && address.pincode && t(address === null || address === void 0 ? void 0 : address.pincode) ? ", " + address.pincode : " ");
36905
37118
  };
36906
37119
  const WSInfoPage = () => {
36907
- var _Digit$UserService$ge, _Digit$UserService$ge2, _propertyDetails$Prop;
37120
+ var _user$info, _user$info$userName, _user$info2, _propertyDetails$Prop;
36908
37121
  const _useTranslation = useTranslation(),
36909
37122
  t = _useTranslation.t;
36910
37123
  const history = useHistory();
36911
37124
  const location = useLocation();
36912
37125
  const match = useRouteMatch();
36913
37126
  const isEmployee = window.location.href.includes("/employee");
37127
+ const user = Digit.UserService.getUser();
37128
+ const userMobileNumber = user !== null && user !== void 0 && (_user$info = user.info) !== null && _user$info !== void 0 && (_user$info$userName = _user$info.userName) !== null && _user$info$userName !== void 0 && _user$info$userName.match(/^[0-9]{10}$/) ? user.info.userName : user === null || user === void 0 ? void 0 : (_user$info2 = user.info) === null || _user$info2 === void 0 ? void 0 : _user$info2.mobileNumber;
36914
37129
  const _useState = useState(null),
36915
37130
  hasProperty = _useState[0],
36916
37131
  setHasProperty = _useState[1];
36917
37132
  const _useState2 = useState(null),
36918
37133
  selectedProperty = _useState2[0],
36919
37134
  setSelectedProperty = _useState2[1];
36920
- const _useState3 = useState(""),
37135
+ const _useState3 = useState(isEmployee ? "" : userMobileNumber || ""),
36921
37136
  searchMobileNumber = _useState3[0],
36922
37137
  setSearchMobileNumber = _useState3[1];
36923
37138
  const _useState4 = useState(false),
@@ -36935,9 +37150,11 @@ const WSInfoPage = () => {
36935
37150
  const _useState8 = useState(null),
36936
37151
  showToast = _useState8[0],
36937
37152
  setShowToast = _useState8[1];
37153
+ useEffect(() => {
37154
+ sessionStorage.removeItem("WS_OTP_VERIFIED_PROPERTY_ID");
37155
+ }, []);
36938
37156
  const tenantId = Digit.ULBService.getCurrentTenantId();
36939
- const userMobileNumber = (_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : (_Digit$UserService$ge2 = _Digit$UserService$ge.info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.mobileNumber;
36940
- const mobileNumberToSearch = isEmployee ? searchMobileNumber : userMobileNumber;
37157
+ const mobileNumberToSearch = searchMobileNumber;
36941
37158
  const _Digit$Hooks$pt$usePr = Digit.Hooks.pt.usePropertySearch({
36942
37159
  filters: {
36943
37160
  mobileNumber: mobileNumberToSearch
@@ -36963,6 +37180,7 @@ const WSInfoPage = () => {
36963
37180
  const isEmployee = window.location.href.includes("/employee");
36964
37181
  const baseUrl = isEmployee ? "/digit-ui/employee/ws" : "/digit-ui/citizen/ws";
36965
37182
  if ((hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && selectedProperty) {
37183
+ sessionStorage.setItem("WS_OTP_VERIFIED_PROPERTY_ID", selectedProperty.propertyId);
36966
37184
  history.push(baseUrl + "/old-application?propertyId=" + selectedProperty.propertyId);
36967
37185
  } else {
36968
37186
  history.push(baseUrl + "/old-application");
@@ -36981,7 +37199,7 @@ const WSInfoPage = () => {
36981
37199
  mobileNumber: mobileNumberToSearch,
36982
37200
  tenantId: "dl",
36983
37201
  type: "register",
36984
- userType: isEmployee ? "EMPLOYEE" : "CITIZEN"
37202
+ userType: "EMPLOYEE"
36985
37203
  }
36986
37204
  };
36987
37205
  return Promise.resolve(Digit.UserService.sendOtp(payload, "dl")).then(function (response) {
@@ -37115,11 +37333,7 @@ const WSInfoPage = () => {
37115
37333
  if (e.stopPropagation) e.stopPropagation();
37116
37334
  }
37117
37335
  if ((hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && selectedProperty) {
37118
- if (!isEmployee) {
37119
- proceedToNext();
37120
- } else {
37121
- handleSendOtp(e);
37122
- }
37336
+ handleSendOtp(e);
37123
37337
  } else if ((hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && !selectedProperty) {
37124
37338
  return;
37125
37339
  } else {
@@ -37228,7 +37442,26 @@ const WSInfoPage = () => {
37228
37442
  style: {
37229
37443
  marginBottom: "24px"
37230
37444
  }
37231
- }, isEmployee && /*#__PURE__*/React.createElement("div", {
37445
+ }, !isEmployee && /*#__PURE__*/React.createElement("div", {
37446
+ style: {
37447
+ marginBottom: "16px"
37448
+ }
37449
+ }, /*#__PURE__*/React.createElement(Label, null, t("CORE_COMMON_MOBILE_NUMBER")), /*#__PURE__*/React.createElement(TextInput, {
37450
+ t: t,
37451
+ type: "number",
37452
+ isMandatory: false,
37453
+ name: "mobileNumber",
37454
+ value: searchMobileNumber,
37455
+ onChange: e => {
37456
+ const val = e.target.value.replace(/\D/g, "").slice(0, 10);
37457
+ setSearchMobileNumber(val);
37458
+ setSelectedProperty(null);
37459
+ setShowOtpVerification(false);
37460
+ setOtp("");
37461
+ },
37462
+ placeholder: t("Enter mobile number"),
37463
+ maxLength: 10
37464
+ })), isEmployee && /*#__PURE__*/React.createElement("div", {
37232
37465
  style: {
37233
37466
  display: "flex",
37234
37467
  flexDirection: "column",
@@ -38639,6 +38872,7 @@ const DEFAULT_SECTION_STATE = {
38639
38872
  applicant: true,
38640
38873
  contact: true,
38641
38874
  djbEmployee: true,
38875
+ disability: true,
38642
38876
  governmentEmployee: true,
38643
38877
  address: true,
38644
38878
  usage: true,
@@ -38691,6 +38925,9 @@ const DEFAULT_FORM_VALUES = {
38691
38925
  retirementDate: "",
38692
38926
  officeNameAndAddress: ""
38693
38927
  },
38928
+ disability: {
38929
+ isDivyangjan: false
38930
+ },
38694
38931
  governmentEmployee: {
38695
38932
  isGovernmentEmployee: false,
38696
38933
  organizationName: "",
@@ -38844,6 +39081,7 @@ const buildDefaultValues = () => ({
38844
39081
  applicant: _extends({}, DEFAULT_FORM_VALUES.applicant),
38845
39082
  contact: _extends({}, DEFAULT_FORM_VALUES.contact),
38846
39083
  djbEmployee: _extends({}, DEFAULT_FORM_VALUES.djbEmployee),
39084
+ disability: _extends({}, DEFAULT_FORM_VALUES.disability),
38847
39085
  propertyAddress: _extends({}, DEFAULT_FORM_VALUES.propertyAddress),
38848
39086
  useDetails: _extends({}, DEFAULT_FORM_VALUES.useDetails),
38849
39087
  bankDetails: _extends({}, DEFAULT_FORM_VALUES.bankDetails),
@@ -39109,7 +39347,7 @@ const FileUploadField = _ref6 => {
39109
39347
  })))));
39110
39348
  };
39111
39349
  const NewApplication = () => {
39112
- var _Digit$SessionStorage, _getFieldError, _getFieldError2, _getFieldError3, _getFieldError4, _getFieldError5, _getFieldError6, _getFieldError7, _getFieldError8, _getFieldError9, _getFieldError0, _getFieldError1, _getFieldError10, _getFieldError11, _watch, _watch3, _watch5, _watch7, _watch9, _formValues$applicati, _formValues$applicati2, _formValues$applicati3, _formValues$applicati4, _formValues$applicati5, _formValues$applicati6, _formValues$applicati7, _formValues$applicati8, _formValues$applicati9, _formValues$applicati0, _formValues$applicati1, _formValues$applicati10, _formValues$applicati11, _formValues$applicati12, _formValues$applicati13, _formValues$applicati14, _formValues$applicati15, _formValues$applicati16, _formValues$applicati17, _formValues$applicati18, _formValues$applicati19, _formValues$applicati20, _formValues$applicati21, _formValues$applicati22, _formValues$applicati23, _formValues$applicant, _formValues$applicant2, _formValues$applicant3, _formValues$applicant4, _formValues$applicant5, _formValues$applicant6, _formValues$applicant7, _formValues$useDetail, _formValues$applicant8, _formValues$contact, _formValues$contact2, _formValues$contact3, _formValues$documents, _formValues$djbEmploy, _formValues$djbEmploy2, _formValues$djbEmploy3, _formValues$djbEmploy4, _formValues$djbEmploy5, _formValues$governmen, _formValues$governmen2, _formValues$governmen3, _formValues$governmen4, _formValues$propertyA, _formValues$propertyA2, _formValues$propertyA3, _formValues$propertyA4, _formValues$propertyA5, _formValues$propertyA6, _formValues$propertyA7, _formValues$propertyA8, _formValues$propertyA9, _formValues$propertyA0, _formValues$propertyA1, _formValues$useDetail2, _formValues$useDetail3, _formValues$useDetail4, _formValues$useDetail5, _formValues$useDetail6, _formValues$useDetail7, _formValues$useDetail8, _formValues$useDetail9, _formValues$useDetail0, _formValues$useDetail1, _formValues$useDetail10, _formValues$useDetail11, _formValues$bankDetai, _formValues$bankDetai2, _formValues$bankDetai3, _formValues$bankDetai4, _formValues$documents2, _formValues$documents3, _formValues$documents4, _formValues$documents5, _formValues$documents6, _formValues$documents7, _formValues$documents8, _formValues$documents9, _formValues$documents0, _formValues$documents1, _formValues$declarati, _formValues$declarati2, _formValues$declarati3, _formValues$declarati4, _formValues$declarati5;
39350
+ var _Digit$SessionStorage, _getFieldError, _getFieldError2, _getFieldError3, _getFieldError4, _getFieldError5, _getFieldError6, _getFieldError7, _getFieldError8, _getFieldError9, _getFieldError0, _getFieldError1, _getFieldError10, _getFieldError11, _watch, _watch3, _watch5, _watch7, _watch9, _formValues$applicati, _formValues$applicati2, _formValues$applicati3, _formValues$applicati4, _formValues$applicati5, _formValues$applicati6, _formValues$applicati7, _formValues$applicati8, _formValues$applicati9, _formValues$applicati0, _formValues$applicati1, _formValues$applicati10, _formValues$applicati11, _formValues$applicati12, _formValues$applicati13, _formValues$applicati14, _formValues$applicati15, _formValues$applicati16, _formValues$applicati17, _formValues$applicati18, _formValues$applicati19, _formValues$applicati20, _formValues$applicati21, _formValues$applicati22, _formValues$applicati23, _formValues$applicant, _formValues$applicant2, _formValues$applicant3, _formValues$applicant4, _formValues$applicant5, _formValues$applicant6, _formValues$applicant7, _formValues$useDetail, _formValues$applicant8, _formValues$contact, _formValues$contact2, _formValues$contact3, _formValues$documents, _formValues$djbEmploy, _formValues$djbEmploy2, _formValues$djbEmploy3, _formValues$djbEmploy4, _formValues$djbEmploy5, _formValues$disabilit, _formValues$governmen, _formValues$governmen2, _formValues$governmen3, _formValues$governmen4, _formValues$propertyA, _formValues$propertyA2, _formValues$propertyA3, _formValues$propertyA4, _formValues$propertyA5, _formValues$propertyA6, _formValues$propertyA7, _formValues$propertyA8, _formValues$propertyA9, _formValues$propertyA0, _formValues$propertyA1, _formValues$useDetail2, _formValues$useDetail3, _formValues$useDetail4, _formValues$useDetail5, _formValues$useDetail6, _formValues$useDetail7, _formValues$useDetail8, _formValues$useDetail9, _formValues$useDetail0, _formValues$useDetail1, _formValues$useDetail10, _formValues$useDetail11, _formValues$bankDetai, _formValues$bankDetai2, _formValues$bankDetai3, _formValues$bankDetai4, _formValues$documents2, _formValues$documents3, _formValues$documents4, _formValues$documents5, _formValues$documents6, _formValues$documents7, _formValues$documents8, _formValues$documents9, _formValues$documents0, _formValues$documents1, _formValues$declarati, _formValues$declarati2, _formValues$declarati3, _formValues$declarati4, _formValues$declarati5;
39113
39351
  const _useTranslation2 = useTranslation(),
39114
39352
  t = _useTranslation2.t;
39115
39353
  const history = useHistory();
@@ -39151,6 +39389,7 @@ const NewApplication = () => {
39151
39389
  setWaterAndSewerageBoth = _useState12[1];
39152
39390
  const _useState13 = useState(new URLSearchParams(location.search).get("propertyId")),
39153
39391
  propertyId = _useState13[0];
39392
+ const initialPropertyQuery = useRef(location.search);
39154
39393
  const initialFormValues = buildDefaultValues();
39155
39394
  const _useState14 = useState(""),
39156
39395
  city = _useState14[0],
@@ -39243,6 +39482,7 @@ const NewApplication = () => {
39243
39482
  applicant: React.useRef(null),
39244
39483
  contact: React.useRef(null),
39245
39484
  djbEmployee: React.useRef(null),
39485
+ disability: React.useRef(null),
39246
39486
  governmentEmployee: React.useRef(null),
39247
39487
  propertyAddress: React.useRef(null),
39248
39488
  useDetails: React.useRef(null),
@@ -39318,7 +39558,11 @@ const NewApplication = () => {
39318
39558
  sectionId: "djbEmployee",
39319
39559
  route: "djb-employee",
39320
39560
  actions: "For DJB Employee"
39321
- }] : []), ...(isGovernmentEmployee ? [{
39561
+ }] : []), {
39562
+ sectionId: "disability",
39563
+ route: "disability",
39564
+ actions: "Divyangjan/Person with Disability"
39565
+ }, ...(isGovernmentEmployee ? [{
39322
39566
  sectionId: "governmentEmployee",
39323
39567
  route: "government-employee",
39324
39568
  actions: "For Government Employee"
@@ -39399,6 +39643,12 @@ const NewApplication = () => {
39399
39643
  sewerageMutation = _Digit$Hooks$ws$useWa2.mutate;
39400
39644
  const _Digit$Hooks$ws$useWS4 = Digit.Hooks.ws.useWSApplicationActions("SEWERAGE"),
39401
39645
  sewerageUpdateMutation = _Digit$Hooks$ws$useWS4.mutate;
39646
+ useEffect(() => {
39647
+ if (location.search !== initialPropertyQuery.current) {
39648
+ window.sessionStorage.removeItem(FORM_STORAGE_KEY);
39649
+ history.replace("/digit-ui/employee/ws/info");
39650
+ }
39651
+ }, [history, location.search]);
39402
39652
  useEffect(() => {
39403
39653
  if (!isGovernmentOrganization) {
39404
39654
  setValue("applicant.governmentOrganizationName", "");
@@ -40471,6 +40721,23 @@ const NewApplication = () => {
40471
40721
  minHeight: "96px"
40472
40722
  }
40473
40723
  })))), /*#__PURE__*/React.createElement(SectionCard, {
40724
+ description: "Please indicate whether the applicant is a Divyangjan/Person with Disability.",
40725
+ isOpen: collapsedSections.disability,
40726
+ onToggle: toggleSection,
40727
+ sectionKey: "disability",
40728
+ title: "Divyangjan/Person with Disability?",
40729
+ sectionRef: sectionRefs.disability
40730
+ }, /*#__PURE__*/React.createElement(FieldBlock, {
40731
+ label: "Divyangjan/Person with Disability?"
40732
+ }, /*#__PURE__*/React.createElement(Controller, {
40733
+ control: control,
40734
+ name: "disability.isDivyangjan",
40735
+ render: props => /*#__PURE__*/React.createElement(CheckBox, {
40736
+ checked: !!props.value,
40737
+ label: "Divyangjan/Person with Disability?",
40738
+ onChange: event => props.onChange(event.target.checked)
40739
+ })
40740
+ }))), /*#__PURE__*/React.createElement(SectionCard, {
40474
40741
  description: t("WS_PROPERTY_ADDRESS_DESC"),
40475
40742
  isOpen: collapsedSections.address,
40476
40743
  onToggle: toggleSection,
@@ -41292,7 +41559,17 @@ const NewApplication = () => {
41292
41559
  isFullWidth: true,
41293
41560
  label: "Office Name & Address",
41294
41561
  value: formValues === null || formValues === void 0 ? void 0 : (_formValues$djbEmploy5 = formValues.djbEmployee) === null || _formValues$djbEmploy5 === void 0 ? void 0 : _formValues$djbEmploy5.officeNameAndAddress
41295
- })) : null), (formValues === null || formValues === void 0 ? void 0 : (_formValues$governmen = formValues.governmentEmployee) === null || _formValues$governmen === void 0 ? void 0 : _formValues$governmen.isGovernmentEmployee) && /*#__PURE__*/React.createElement(SectionCard, {
41562
+ })) : null), /*#__PURE__*/React.createElement(SectionCard, {
41563
+ description: "Divyangjan/Person with Disability declaration.",
41564
+ isOpen: collapsedSections.disability,
41565
+ onToggle: toggleSection,
41566
+ sectionKey: "disability",
41567
+ title: "Divyangjan/Person with Disability?",
41568
+ onEditClick: () => handleSectionEdit("disability")
41569
+ }, /*#__PURE__*/React.createElement(PreviewItem, {
41570
+ label: "Divyangjan/Person with Disability?",
41571
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$disabilit = formValues.disability) === null || _formValues$disabilit === void 0 ? void 0 : _formValues$disabilit.isDivyangjan
41572
+ })), (formValues === null || formValues === void 0 ? void 0 : (_formValues$governmen = formValues.governmentEmployee) === null || _formValues$governmen === void 0 ? void 0 : _formValues$governmen.isGovernmentEmployee) && /*#__PURE__*/React.createElement(SectionCard, {
41296
41573
  description: "Government employee organization details.",
41297
41574
  isOpen: collapsedSections.governmentEmployee,
41298
41575
  onToggle: toggleSection,
@@ -56039,7 +56316,7 @@ const openFilePDF = fileId => {
56039
56316
  }).catch(error => console.error("Error fetching file:", error));
56040
56317
  };
56041
56318
  const CheckPage$4 = _ref2 => {
56042
- var _data$cpt, _data$ConnectionDetai, _data$connectionDetai, _data$ConnectionHolde, _data$connectionHolde, _data$useDetails, _data$bankDetails, _data$DocumentsRequir, _data$documents, _data$djbEmployee, _connectionDetails, _connectionDetails$se, _connectionDetails2, _connectionDetails2$s, _connectionDetails3, _connectionDetails4, _connectionDetails4$c, _connectionDetails5, _connectionDetails5$c, _connectionDetails6, _connectionDetails7, _connectionDetails7$w, _connectionDetails8, _connectionDetails8$w, _connectionDetails9, _connectionDetails0, _connectionDetails0$a, _connectionDetails1, _connectionDetails1$a, _connectionDetails10, _connectionDetails11, _connectionDetails11$, _connectionDetails12, _connectionDetails12$, _connectionDetails13, _connectionDetails14, _connectionDetails14$, _connectionDetails15, _connectionDetails15$, _connectionDetails16, _connectionDetails16$, _connectionDetails17, _connectionDetails18, _connectionDetails19, _connectionDetails20, _holderDetails, _holderDetails2, _holderDetails3, _holderDetails4, _holderDetails4$gende, _holderDetails5, _holderDetails5$gende, _holderDetails6, _holderDetails7, _holderDetails8, _holderDetails8$relat, _holderDetails9, _holderDetails9$relat, _holderDetails0, _holderDetails1, _holderDetails10, _holderDetails11, _propertyAddress, _propertyAddress$zro, _propertyAddress2, _propertyAddress3, _propertyAddress4, _propertyAddress4$add, _propertyAddress5, _propertyAddress5$add, _propertyAddress6, _propertyAddress6$add, _propertyAddress7, _propertyAddress8, _propertyAddress8$cit, _propertyAddress9, _propertyAddress9$cit, _propertyAddress0, _propertyAddress1, _propertyAddress10, _propertyAddress11, _propertyAddress11$lo, _propertyAddress12, _propertyAddress12$lo, _propertyAddress13, _propertyAddress14, _propertyAddress14$su, _propertyAddress15, _propertyAddress15$su, _propertyAddress16, _propertyAddress17, _propertyAddress18, _propertyAddress19, _propertyAddress20, _propertyAddress21, _propertyAddress22, _propertyAddress23, _propertyAddress24, _propertyAddress25, _propertyAddress26, _propertyAddress26$as, _propertyAddress27, _propertyAddress27$as, _propertyAddress28, _propertyAddress29, _propertyAddress29$bl, _propertyAddress30, _propertyAddress30$bl, _propertyAddress31, _propertyAddress32, _propertyAddress32$wa, _propertyAddress33, _propertyAddress33$wa, _propertyAddress34, _propertyAddress35, _propertyAddress35$zo, _propertyAddress36, _propertyAddress36$zo, _propertyAddress37, _propertyAddress38, _propertyAddress39, _propertyAddress40, _propertyAddress41, _useDetails$categoryT, _useDetails$categoryT2, _useDetails$propertyC, _useDetails$propertyC2, _useDetails$propertyT, _useDetails$propertyT2, _useDetails$WaterConn, _useDetails$WaterConn2, _useDetails$waterConn, _useDetails$waterConn2, _useDetails$noOfFloor, _useDetails$noOfFloor2, _useDetails$SelectYea, _useDetails$SelectYea2, _useDetails$SelectYea3, _useDetails$construct, _useDetails$construct2, _declaration$submitte, _declaration$submitte2, _declaration$signatur;
56319
+ var _data$cpt, _data$ConnectionDetai, _data$connectionDetai, _data$ConnectionHolde, _data$connectionHolde, _data$useDetails, _data$bankDetails, _data$DocumentsRequir, _data$documents, _data$djbEmployee, _data$disability, _connectionDetails, _connectionDetails$se, _connectionDetails2, _connectionDetails2$s, _connectionDetails3, _connectionDetails4, _connectionDetails4$c, _connectionDetails5, _connectionDetails5$c, _connectionDetails6, _connectionDetails7, _connectionDetails7$w, _connectionDetails8, _connectionDetails8$w, _connectionDetails9, _connectionDetails0, _connectionDetails0$a, _connectionDetails1, _connectionDetails1$a, _connectionDetails10, _connectionDetails11, _connectionDetails11$, _connectionDetails12, _connectionDetails12$, _connectionDetails13, _connectionDetails14, _connectionDetails14$, _connectionDetails15, _connectionDetails15$, _connectionDetails16, _connectionDetails16$, _connectionDetails17, _connectionDetails18, _connectionDetails19, _connectionDetails20, _holderDetails, _holderDetails2, _holderDetails3, _holderDetails4, _holderDetails4$gende, _holderDetails5, _holderDetails5$gende, _holderDetails6, _holderDetails7, _holderDetails8, _holderDetails8$relat, _holderDetails9, _holderDetails9$relat, _holderDetails0, _holderDetails1, _holderDetails10, _holderDetails11, _propertyAddress, _propertyAddress$zro, _propertyAddress2, _propertyAddress3, _propertyAddress4, _propertyAddress4$add, _propertyAddress5, _propertyAddress5$add, _propertyAddress6, _propertyAddress6$add, _propertyAddress7, _propertyAddress8, _propertyAddress8$cit, _propertyAddress9, _propertyAddress9$cit, _propertyAddress0, _propertyAddress1, _propertyAddress10, _propertyAddress11, _propertyAddress11$lo, _propertyAddress12, _propertyAddress12$lo, _propertyAddress13, _propertyAddress14, _propertyAddress14$su, _propertyAddress15, _propertyAddress15$su, _propertyAddress16, _propertyAddress17, _propertyAddress18, _propertyAddress19, _propertyAddress20, _propertyAddress21, _propertyAddress22, _propertyAddress23, _propertyAddress24, _propertyAddress25, _propertyAddress26, _propertyAddress26$as, _propertyAddress27, _propertyAddress27$as, _propertyAddress28, _propertyAddress29, _propertyAddress29$bl, _propertyAddress30, _propertyAddress30$bl, _propertyAddress31, _propertyAddress32, _propertyAddress32$wa, _propertyAddress33, _propertyAddress33$wa, _propertyAddress34, _propertyAddress35, _propertyAddress35$zo, _propertyAddress36, _propertyAddress36$zo, _propertyAddress37, _propertyAddress38, _propertyAddress39, _propertyAddress40, _propertyAddress41, _useDetails$categoryT, _useDetails$categoryT2, _useDetails$propertyC, _useDetails$propertyC2, _useDetails$propertyT, _useDetails$propertyT2, _useDetails$WaterConn, _useDetails$WaterConn2, _useDetails$waterConn, _useDetails$waterConn2, _useDetails$noOfFloor, _useDetails$noOfFloor2, _useDetails$SelectYea, _useDetails$SelectYea2, _useDetails$SelectYea3, _useDetails$construct, _useDetails$construct2, _declaration$submitte, _declaration$submitte2, _declaration$signatur;
56043
56320
  let data = _ref2.data,
56044
56321
  onSubmit = _ref2.onSubmit,
56045
56322
  onEdit = _ref2.onEdit;
@@ -56119,6 +56396,7 @@ const CheckPage$4 = _ref2 => {
56119
56396
  const documents = (data === null || data === void 0 ? void 0 : (_data$DocumentsRequir = data.DocumentsRequired) === null || _data$DocumentsRequir === void 0 ? void 0 : _data$DocumentsRequir.documents) || (data === null || data === void 0 ? void 0 : (_data$documents = data.documents) === null || _data$documents === void 0 ? void 0 : _data$documents.documents) || [];
56120
56397
  const declaration = (data === null || data === void 0 ? void 0 : data.declarationData) || (data === null || data === void 0 ? void 0 : data.declaration) || {};
56121
56398
  const djbEmployee = (data === null || data === void 0 ? void 0 : (_data$djbEmployee = data.djbEmployee) === null || _data$djbEmployee === void 0 ? void 0 : _data$djbEmployee.djbEmployee) || (data === null || data === void 0 ? void 0 : data.djbEmployee) || {};
56399
+ const disability = (data === null || data === void 0 ? void 0 : (_data$disability = data.disability) === null || _data$disability === void 0 ? void 0 : _data$disability.disability) || (data === null || data === void 0 ? void 0 : data.disability) || (data === null || data === void 0 ? void 0 : data.additionalDetails) || {};
56122
56400
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
56123
56401
  className: "overflow-y-scroll"
56124
56402
  }, /*#__PURE__*/React.createElement(CardHeader, null, t("WS_COMMON_SUMMARY")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_COMMON_PROPERTY_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, {
@@ -56346,7 +56624,15 @@ const CheckPage$4 = _ref2 => {
56346
56624
  },
56347
56625
  onClick: () => openFilePDF(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document)
56348
56626
  }, /*#__PURE__*/React.createElement(GenericFileIcon, null), " ", t("CS_COMMON_VIEW"))
56349
- }))), /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_BANK_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, {
56627
+ }))), /*#__PURE__*/React.createElement(CardSubHeader, null, "Divyangjan/Person with Disability?"), /*#__PURE__*/React.createElement(StatusTable, {
56628
+ style: {
56629
+ marginTop: "10px",
56630
+ marginBottom: "30px"
56631
+ }
56632
+ }, /*#__PURE__*/React.createElement(Row, {
56633
+ label: "Divyangjan/Person with Disability?",
56634
+ text: disability !== null && disability !== void 0 && disability.isDivyangjan ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO")
56635
+ })), /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_BANK_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, {
56350
56636
  style: {
56351
56637
  marginTop: "10px",
56352
56638
  marginBottom: "30px"
@@ -56489,6 +56775,7 @@ const OLDApplication = () => {
56489
56775
  const _useTranslation = useTranslation(),
56490
56776
  t = _useTranslation.t;
56491
56777
  const history = useHistory();
56778
+ const location = useLocation();
56492
56779
  const _useState = useState(false),
56493
56780
  isEnableLoader = _useState[0],
56494
56781
  setIsEnableLoader = _useState[1];
@@ -56537,9 +56824,12 @@ const OLDApplication = () => {
56537
56824
  let _Digit$Hooks$ws$useWS = Digit.Hooks.ws.useWSConfigMDMS.WSCreateConfig(stateId, {}),
56538
56825
  newConfig = _Digit$Hooks$ws$useWS.data,
56539
56826
  isLoading = _Digit$Hooks$ws$useWS.isLoading;
56540
- const _useState5 = useState(new URLSearchParams(useLocation().search).get("propertyId")),
56827
+ const requestedPropertyId = new URLSearchParams(location.search).get("propertyId");
56828
+ const _useState5 = useState(requestedPropertyId),
56541
56829
  propertyId = _useState5[0],
56542
56830
  setPropertyId = _useState5[1];
56831
+ const initialPropertyId = useRef(requestedPropertyId);
56832
+ const verifiedPropertyId = useRef(sessionStorage.getItem("WS_OTP_VERIFIED_PROPERTY_ID"));
56543
56833
  const _Digit$Hooks$useSessi = Digit.Hooks.useSessionStorage("PT_CREATE_EMP_WS_NEW_FORM", {}),
56544
56834
  sessionFormData = _Digit$Hooks$useSessi[0],
56545
56835
  setSessionFormData = _Digit$Hooks$useSessi[1],
@@ -56554,9 +56844,16 @@ const OLDApplication = () => {
56554
56844
  propertyIds: propertyId
56555
56845
  },
56556
56846
  tenantId: tenantId,
56557
- enabled: propertyId && propertyId !== "" ? true : false
56847
+ enabled: propertyId && propertyId === requestedPropertyId && propertyId === verifiedPropertyId.current
56558
56848
  }),
56559
56849
  propertyDetails = _Digit$Hooks$pt$usePr.data;
56850
+ useEffect(() => {
56851
+ if (requestedPropertyId !== initialPropertyId.current || requestedPropertyId && requestedPropertyId !== verifiedPropertyId.current) {
56852
+ clearSessionFormData();
56853
+ sessionStorage.removeItem("WS_OTP_VERIFIED_PROPERTY_ID");
56854
+ history.replace("/digit-ui/employee/ws/info");
56855
+ }
56856
+ }, [clearSessionFormData, history, requestedPropertyId]);
56560
56857
  useEffect(() => {
56561
56858
  sessionStorage.removeItem("FORMSTATE_ERRORS");
56562
56859
  }, []);
@@ -56566,7 +56863,7 @@ const OLDApplication = () => {
56566
56863
  if (config) {
56567
56864
  var _config$body;
56568
56865
  const allCreateSections = (config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.filter(section => section === null || section === void 0 ? void 0 : section.isCreateConnection)) || [];
56569
- const desiredComponentOrder = ["CPTPropertySearchNSummary", "WSConnectionDetails", "WSConnectionHolderDetails", "WSPropertyLocationDetails", "PropertyWaterConnection", "WSDjbEmployee", "WSActivationPlumberDetails", "WSRoadCuttingDetails", "WSBankDetails", "WSDocumentsEmployee", "WSDeclaration"];
56866
+ const desiredComponentOrder = ["CPTPropertySearchNSummary", "WSConnectionDetails", "WSConnectionHolderDetails", "WSPropertyLocationDetails", "PropertyWaterConnection", "WSDjbEmployee", "WSDivyangjan", "WSActivationPlumberDetails", "WSRoadCuttingDetails", "WSBankDetails", "WSDocumentsEmployee", "WSDeclaration"];
56570
56867
  const reorderedBody = [];
56571
56868
  desiredComponentOrder.forEach(compName => {
56572
56869
  const section = allCreateSections.find(s => {
@@ -56632,6 +56929,19 @@ const OLDApplication = () => {
56632
56929
  withoutLabel: true
56633
56930
  }]
56634
56931
  });
56932
+ } else if (compName === "WSDivyangjan") {
56933
+ reorderedBody.push({
56934
+ isCreateConnection: true,
56935
+ body: [{
56936
+ type: "component",
56937
+ key: "disability",
56938
+ component: "WSDivyangjan",
56939
+ withoutLabel: true,
56940
+ texts: {
56941
+ header: "Divyangjan/Person with Disability?"
56942
+ }
56943
+ }]
56944
+ });
56635
56945
  }
56636
56946
  });
56637
56947
  allCreateSections.forEach(section => {
@@ -56896,6 +57206,7 @@ const OLDApplication = () => {
56896
57206
  try {
56897
57207
  var _waterUpdateData$Wate, _waterUpdateData$Wate2, _sewerageUpdateData$S, _sewerageUpdateData$S2;
56898
57208
  clearSessionFormData();
57209
+ sessionStorage.removeItem("WS_OTP_VERIFIED_PROPERTY_ID");
56899
57210
  history.push(basePath + "/ws-response?applicationNumber=" + (waterUpdateData === null || waterUpdateData === void 0 ? void 0 : (_waterUpdateData$Wate = waterUpdateData.WaterConnection) === null || _waterUpdateData$Wate === void 0 ? void 0 : (_waterUpdateData$Wate2 = _waterUpdateData$Wate[0]) === null || _waterUpdateData$Wate2 === void 0 ? void 0 : _waterUpdateData$Wate2.applicationNo) + "&applicationNumber1=" + (sewerageUpdateData === null || sewerageUpdateData === void 0 ? void 0 : (_sewerageUpdateData$S = sewerageUpdateData.SewerageConnections) === null || _sewerageUpdateData$S === void 0 ? void 0 : (_sewerageUpdateData$S2 = _sewerageUpdateData$S[0]) === null || _sewerageUpdateData$S2 === void 0 ? void 0 : _sewerageUpdateData$S2.applicationNo));
56900
57211
  return Promise.resolve();
56901
57212
  } catch (e) {
@@ -56959,6 +57270,7 @@ const OLDApplication = () => {
56959
57270
  onSuccess: data => {
56960
57271
  var _data$WaterConnection2, _data$WaterConnection3;
56961
57272
  clearSessionFormData();
57273
+ sessionStorage.removeItem("WS_OTP_VERIFIED_PROPERTY_ID");
56962
57274
  history.push(basePath + "/ws-response?applicationNumber=" + (data === null || data === void 0 ? void 0 : (_data$WaterConnection2 = data.WaterConnection) === null || _data$WaterConnection2 === void 0 ? void 0 : (_data$WaterConnection3 = _data$WaterConnection2[0]) === null || _data$WaterConnection3 === void 0 ? void 0 : _data$WaterConnection3.applicationNo));
56963
57275
  }
56964
57276
  });
@@ -57007,6 +57319,7 @@ const OLDApplication = () => {
57007
57319
  onSuccess: data => {
57008
57320
  var _data$SewerageConnect2, _data$SewerageConnect3;
57009
57321
  clearSessionFormData();
57322
+ sessionStorage.removeItem("WS_OTP_VERIFIED_PROPERTY_ID");
57010
57323
  history.push(basePath + "/ws-response?applicationNumber1=" + (data === null || data === void 0 ? void 0 : (_data$SewerageConnect2 = data.SewerageConnections) === null || _data$SewerageConnect2 === void 0 ? void 0 : (_data$SewerageConnect3 = _data$SewerageConnect2[0]) === null || _data$SewerageConnect3 === void 0 ? void 0 : _data$SewerageConnect3.applicationNo));
57011
57324
  }
57012
57325
  })).then(function () {});
@@ -57232,7 +57545,8 @@ const componentsToRegister = {
57232
57545
  WSSearchIntegrated: SearchIntegrated,
57233
57546
  WSSearchWaterConnectionViewIntegrated: SearchWaterConnectionViewIntegrated,
57234
57547
  WSBulkBillGeneration: BulkBillGeneration,
57235
- WSOLDApplication: OLDApplication
57548
+ WSOLDApplication: OLDApplication,
57549
+ WSDivyangjan: WSDivyangjan
57236
57550
  };
57237
57551
  const initWSComponents = () => {
57238
57552
  Object.entries(componentsToRegister).forEach(_ref3 => {