@djb25/digit-ui-module-ws 1.0.82 → 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.
- package/dist/index.js +542 -117
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +543 -118
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -534,7 +534,7 @@ const getFiles = function (filesArray, tenant) {
|
|
|
534
534
|
};
|
|
535
535
|
const createPayloadOfWS = function (data) {
|
|
536
536
|
try {
|
|
537
|
-
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;
|
|
537
|
+
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;
|
|
538
538
|
const userInfo = (_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info;
|
|
539
539
|
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"));
|
|
540
540
|
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 => {
|
|
@@ -645,7 +645,8 @@ const createPayloadOfWS = function (data) {
|
|
|
645
645
|
name: details === null || details === void 0 ? void 0 : details.plumberName,
|
|
646
646
|
mobileNumber: details === null || details === void 0 ? void 0 : details.plumberMobileNo
|
|
647
647
|
})),
|
|
648
|
-
additionalDetails: _extends({}, useDetailsObject, data === null || data === void 0 ? void 0 : data.djbEmployee, {
|
|
648
|
+
additionalDetails: _extends({}, useDetailsObject, data === null || data === void 0 ? void 0 : data.djbEmployee, data === null || data === void 0 ? void 0 : data.disability, {
|
|
649
|
+
isDivyangjan: !!(data !== null && data !== void 0 && (_data$disability = data.disability) !== null && _data$disability !== void 0 && _data$disability.isDivyangjan),
|
|
649
650
|
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
|
|
650
651
|
}, 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, {
|
|
651
652
|
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),
|
|
@@ -18050,6 +18051,14 @@ const UploadFileDigiLocker = props => {
|
|
|
18050
18051
|
};
|
|
18051
18052
|
|
|
18052
18053
|
const DIGILOCKER_SUPPORTED_CODES = ["AADHAAR", "AADHAR", "DRIVING", "DRVLC", "PAN"];
|
|
18054
|
+
const ENVIRONMENT_FILE_STORE_IDS = {
|
|
18055
|
+
uat: "261542df-8dae-41e7-aa17-00cd288faf3b",
|
|
18056
|
+
dev: "0d394691-45ed-4036-97e8-8de8b0f166b1"
|
|
18057
|
+
};
|
|
18058
|
+
const getEnvironmentFileStoreId = () => {
|
|
18059
|
+
const hostname = window.location.hostname.toLowerCase();
|
|
18060
|
+
return hostname.includes("uat") ? ENVIRONMENT_FILE_STORE_IDS.uat : ENVIRONMENT_FILE_STORE_IDS.dev;
|
|
18061
|
+
};
|
|
18053
18062
|
const isDigiLockerEligible = function (code) {
|
|
18054
18063
|
if (code === void 0) {
|
|
18055
18064
|
code = "";
|
|
@@ -18057,8 +18066,26 @@ const isDigiLockerEligible = function (code) {
|
|
|
18057
18066
|
const upper = code.toUpperCase();
|
|
18058
18067
|
return DIGILOCKER_SUPPORTED_CODES.some(keyword => upper.includes(keyword));
|
|
18059
18068
|
};
|
|
18069
|
+
const isOtherDocument = function (code) {
|
|
18070
|
+
if (code === void 0) {
|
|
18071
|
+
code = "";
|
|
18072
|
+
}
|
|
18073
|
+
return code.toUpperCase().includes("OTHER");
|
|
18074
|
+
};
|
|
18075
|
+
const removeDuplicateOtherDocuments = function (documentList) {
|
|
18076
|
+
if (documentList === void 0) {
|
|
18077
|
+
documentList = [];
|
|
18078
|
+
}
|
|
18079
|
+
const documentTypes = new Set();
|
|
18080
|
+
return documentList.filter(document => {
|
|
18081
|
+
if (!isOtherDocument(document === null || document === void 0 ? void 0 : document.documentType)) return true;
|
|
18082
|
+
if (documentTypes.has(document.documentType)) return false;
|
|
18083
|
+
documentTypes.add(document.documentType);
|
|
18084
|
+
return true;
|
|
18085
|
+
});
|
|
18086
|
+
};
|
|
18060
18087
|
const WSDocumentsEmployee = _ref => {
|
|
18061
|
-
var
|
|
18088
|
+
var _applicationDetailsDa, _applicationDetailsDa2, _wsDocs$wsDocsData3;
|
|
18062
18089
|
let t = _ref.t,
|
|
18063
18090
|
config = _ref.config,
|
|
18064
18091
|
onSelect = _ref.onSelect,
|
|
@@ -18068,7 +18095,10 @@ const WSDocumentsEmployee = _ref => {
|
|
|
18068
18095
|
clearFormErrors = _ref.clearErrors,
|
|
18069
18096
|
formState = _ref.formState;
|
|
18070
18097
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
18071
|
-
const _useState = React.useState(
|
|
18098
|
+
const _useState = React.useState(() => {
|
|
18099
|
+
var _formData$documents, _formData$DocumentsRe;
|
|
18100
|
+
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) || []);
|
|
18101
|
+
}),
|
|
18072
18102
|
documents = _useState[0],
|
|
18073
18103
|
setDocuments = _useState[1];
|
|
18074
18104
|
const _useState2 = React.useState(true),
|
|
@@ -18095,10 +18125,21 @@ const WSDocumentsEmployee = _ref => {
|
|
|
18095
18125
|
onSelect(config.key, documentStep);
|
|
18096
18126
|
} else {
|
|
18097
18127
|
onSelect(config.key, {
|
|
18098
|
-
documents
|
|
18128
|
+
documents: removeDuplicateOtherDocuments(documents)
|
|
18099
18129
|
});
|
|
18100
18130
|
}
|
|
18101
18131
|
};
|
|
18132
|
+
const downloadDocument = function () {
|
|
18133
|
+
try {
|
|
18134
|
+
return Promise.resolve(Digit.UploadServices.DownloadFile(getEnvironmentFileStoreId(), "dl", "NOC for New Delhi Jal Board Connection.pdf")).then(function (downloaded) {
|
|
18135
|
+
if (!downloaded) {
|
|
18136
|
+
setError(t("CS_FILE_DOWNLOAD_ERROR") || "PDF download failed");
|
|
18137
|
+
}
|
|
18138
|
+
});
|
|
18139
|
+
} catch (e) {
|
|
18140
|
+
return Promise.reject(e);
|
|
18141
|
+
}
|
|
18142
|
+
};
|
|
18102
18143
|
React.useEffect(() => {
|
|
18103
18144
|
var _wsDocs$wsDocsData;
|
|
18104
18145
|
let count = 0;
|
|
@@ -18155,7 +18196,8 @@ const WSDocumentsEmployee = _ref => {
|
|
|
18155
18196
|
setFormError: setFormError,
|
|
18156
18197
|
clearFormErrors: clearFormErrors,
|
|
18157
18198
|
config: config,
|
|
18158
|
-
formState: formState
|
|
18199
|
+
formState: formState,
|
|
18200
|
+
isOtherDocument: isOtherDocument(document === null || document === void 0 ? void 0 : document.code)
|
|
18159
18201
|
});
|
|
18160
18202
|
}));
|
|
18161
18203
|
if (userType === "citizen") {
|
|
@@ -18176,14 +18218,32 @@ const WSDocumentsEmployee = _ref => {
|
|
|
18176
18218
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.CollapsibleCardPage, {
|
|
18177
18219
|
title: t("WS_DOCUMENTS"),
|
|
18178
18220
|
defaultOpen: true
|
|
18179
|
-
},
|
|
18221
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
18222
|
+
type: "button",
|
|
18223
|
+
onClick: event => {
|
|
18224
|
+
event.stopPropagation();
|
|
18225
|
+
downloadDocument();
|
|
18226
|
+
},
|
|
18227
|
+
style: {
|
|
18228
|
+
cursor: "pointer",
|
|
18229
|
+
color: "#fff",
|
|
18230
|
+
fontWeight: "bold",
|
|
18231
|
+
padding: "6px 14px",
|
|
18232
|
+
border: "1px solid #00497e",
|
|
18233
|
+
borderRadius: "4px",
|
|
18234
|
+
backgroundColor: "#00497e",
|
|
18235
|
+
marginLeft: "auto",
|
|
18236
|
+
marginRight: "32px",
|
|
18237
|
+
whiteSpace: "nowrap"
|
|
18238
|
+
}
|
|
18239
|
+
}, t("WS_DOWNLOAD_DOCUMENT")), innerContent, error && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
18180
18240
|
label: error,
|
|
18181
18241
|
onClose: () => setError(null),
|
|
18182
18242
|
error: true
|
|
18183
18243
|
}));
|
|
18184
18244
|
};
|
|
18185
18245
|
function SelectDocument(_ref2) {
|
|
18186
|
-
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
|
|
18246
|
+
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;
|
|
18187
18247
|
let t = _ref2.t,
|
|
18188
18248
|
doc = _ref2.document,
|
|
18189
18249
|
setDocuments = _ref2.setDocuments,
|
|
@@ -18194,11 +18254,17 @@ function SelectDocument(_ref2) {
|
|
|
18194
18254
|
clearFormErrors = _ref2.clearFormErrors,
|
|
18195
18255
|
config = _ref2.config,
|
|
18196
18256
|
formState = _ref2.formState,
|
|
18197
|
-
id = _ref2.id
|
|
18257
|
+
id = _ref2.id,
|
|
18258
|
+
_ref2$isOtherDocument = _ref2.isOtherDocument,
|
|
18259
|
+
isOther = _ref2$isOtherDocument === void 0 ? false : _ref2$isOtherDocument;
|
|
18198
18260
|
const fileRef = React.useRef();
|
|
18199
|
-
const
|
|
18261
|
+
const otherUploadedDocuments = isOther ? (documents === null || documents === void 0 ? void 0 : documents.filter(item => {
|
|
18200
18262
|
var _item$documentType;
|
|
18201
18263
|
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);
|
|
18264
|
+
})) || [] : [];
|
|
18265
|
+
const filteredDocument = isOther ? null : documents === null || documents === void 0 ? void 0 : documents.filter(item => {
|
|
18266
|
+
var _item$documentType2;
|
|
18267
|
+
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);
|
|
18202
18268
|
})[0];
|
|
18203
18269
|
const _useState4 = React.useState(() => {
|
|
18204
18270
|
var _filteredDocument$doc, _doc$dropdownData2;
|
|
@@ -18217,10 +18283,10 @@ function SelectDocument(_ref2) {
|
|
|
18217
18283
|
const _useState5 = React.useState(null),
|
|
18218
18284
|
file = _useState5[0],
|
|
18219
18285
|
setFile = _useState5[1];
|
|
18220
|
-
const _useState6 = React.useState(() => (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId) || null),
|
|
18286
|
+
const _useState6 = React.useState(() => isOther ? null : (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId) || null),
|
|
18221
18287
|
uploadedFile = _useState6[0],
|
|
18222
18288
|
setUploadedFile = _useState6[1];
|
|
18223
|
-
const _useState7 = React.useState(() => (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentUid) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentNumber) || ""),
|
|
18289
|
+
const _useState7 = React.useState(() => isOther ? "" : (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentUid) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentNumber) || ""),
|
|
18224
18290
|
documentUid = _useState7[0],
|
|
18225
18291
|
setDocumentUid = _useState7[1];
|
|
18226
18292
|
const _useState8 = React.useState(false),
|
|
@@ -18279,12 +18345,23 @@ function SelectDocument(_ref2) {
|
|
|
18279
18345
|
setShowCamera(false);
|
|
18280
18346
|
};
|
|
18281
18347
|
const handleSelectDocument = value => setSelectedDocument(value);
|
|
18282
|
-
const
|
|
18348
|
+
const removeUploadedDocument = fileStoreId => {
|
|
18349
|
+
setDocuments(previousDocuments => previousDocuments.filter(item => (item === null || item === void 0 ? void 0 : item.fileStoreId) !== fileStoreId));
|
|
18350
|
+
if (fileStoreId === uploadedFile) {
|
|
18351
|
+
setUploadedFile(null);
|
|
18352
|
+
setFile(null);
|
|
18353
|
+
setDocumentUid("");
|
|
18354
|
+
}
|
|
18355
|
+
};
|
|
18356
|
+
const viewDocument = function (fileStoreId) {
|
|
18357
|
+
if (fileStoreId === void 0) {
|
|
18358
|
+
fileStoreId = uploadedFile;
|
|
18359
|
+
}
|
|
18283
18360
|
try {
|
|
18284
18361
|
const _temp2 = function () {
|
|
18285
|
-
if (
|
|
18362
|
+
if (fileStoreId) {
|
|
18286
18363
|
const _temp = _catch(function () {
|
|
18287
|
-
return Promise.resolve(Digit.UploadServices.FileFetchbyid(
|
|
18364
|
+
return Promise.resolve(Digit.UploadServices.FileFetchbyid(fileStoreId, Digit.ULBService.getStateId())).then(function (res) {
|
|
18288
18365
|
if (res !== null && res !== void 0 && res.data) {
|
|
18289
18366
|
var _res$headers, _res$headers2;
|
|
18290
18367
|
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"]) || "";
|
|
@@ -18365,7 +18442,7 @@ function SelectDocument(_ref2) {
|
|
|
18365
18442
|
React.useEffect(() => {
|
|
18366
18443
|
if (selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.code) {
|
|
18367
18444
|
setDocuments(prev => {
|
|
18368
|
-
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));
|
|
18445
|
+
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));
|
|
18369
18446
|
if ((uploadedFile === null || uploadedFile === void 0 ? void 0 : uploadedFile.length) === 0 || uploadedFile === null) {
|
|
18370
18447
|
return filteredDocumentsByDocumentType;
|
|
18371
18448
|
}
|
|
@@ -18374,6 +18451,7 @@ function SelectDocument(_ref2) {
|
|
|
18374
18451
|
documentType: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code,
|
|
18375
18452
|
fileStoreId: uploadedFile,
|
|
18376
18453
|
fileName: (file === null || file === void 0 ? void 0 : file.name) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileName) || "",
|
|
18454
|
+
documentName: (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.i18nKey) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) || "",
|
|
18377
18455
|
documentUid: documentUid,
|
|
18378
18456
|
documentNumber: documentUid,
|
|
18379
18457
|
i18nKey: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code,
|
|
@@ -18403,48 +18481,60 @@ function SelectDocument(_ref2) {
|
|
|
18403
18481
|
(function () {
|
|
18404
18482
|
try {
|
|
18405
18483
|
setError(null);
|
|
18406
|
-
const
|
|
18484
|
+
const _temp7 = function () {
|
|
18407
18485
|
if (file) {
|
|
18408
|
-
const
|
|
18409
|
-
|
|
18410
|
-
|
|
18486
|
+
const isDuplicateDocument = isOther && documents.some(item => (item === null || item === void 0 ? void 0 : item.documentType) === (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code));
|
|
18487
|
+
const _temp6 = function () {
|
|
18488
|
+
if (isDuplicateDocument) {
|
|
18489
|
+
const documentNameKey = (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.i18nKey) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) || "This";
|
|
18490
|
+
const translatedDocumentName = t(documentNameKey);
|
|
18491
|
+
const documentName = translatedDocumentName === documentNameKey ? documentNameKey.replaceAll("_", " ") : translatedDocumentName;
|
|
18492
|
+
setError("Document \"" + documentName + "\" has already been uploaded.");
|
|
18493
|
+
setFile(null);
|
|
18411
18494
|
} else {
|
|
18412
|
-
const
|
|
18413
|
-
if (
|
|
18414
|
-
setError(t("
|
|
18415
|
-
setFile(null);
|
|
18495
|
+
const _temp5 = function () {
|
|
18496
|
+
if (file.size >= 5242880) {
|
|
18497
|
+
setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
|
|
18416
18498
|
} else {
|
|
18417
|
-
const
|
|
18418
|
-
|
|
18419
|
-
|
|
18420
|
-
|
|
18421
|
-
|
|
18422
|
-
|
|
18423
|
-
|
|
18424
|
-
|
|
18425
|
-
|
|
18426
|
-
|
|
18499
|
+
const _temp4 = function () {
|
|
18500
|
+
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)) {
|
|
18501
|
+
setError(t("WS_ONLY_JPG_PNG_ALLOWED") || "Only JPG and PNG files are allowed for Applicant Photo");
|
|
18502
|
+
setFile(null);
|
|
18503
|
+
} else {
|
|
18504
|
+
const _temp3 = _finallyRethrows(function () {
|
|
18505
|
+
return _catch(function () {
|
|
18506
|
+
setUploadedFile(null);
|
|
18507
|
+
setIsUploading(true);
|
|
18508
|
+
return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getStateId())).then(function (response) {
|
|
18509
|
+
var _response$data, _response$data$files;
|
|
18510
|
+
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) {
|
|
18511
|
+
var _response$data2, _response$data2$files;
|
|
18512
|
+
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);
|
|
18513
|
+
} else {
|
|
18514
|
+
setError(t("CS_FILE_UPLOAD_ERROR"));
|
|
18515
|
+
}
|
|
18516
|
+
});
|
|
18517
|
+
}, function () {
|
|
18427
18518
|
setError(t("CS_FILE_UPLOAD_ERROR"));
|
|
18428
|
-
}
|
|
18519
|
+
});
|
|
18520
|
+
}, function (_wasThrown, _result) {
|
|
18521
|
+
setIsUploading(false);
|
|
18522
|
+
if (_wasThrown) throw _result;
|
|
18523
|
+
return _result;
|
|
18429
18524
|
});
|
|
18430
|
-
|
|
18431
|
-
|
|
18432
|
-
|
|
18433
|
-
|
|
18434
|
-
setIsUploading(false);
|
|
18435
|
-
if (_wasThrown) throw _result;
|
|
18436
|
-
return _result;
|
|
18437
|
-
});
|
|
18438
|
-
if (_temp3 && _temp3.then) return _temp3.then(function () {});
|
|
18525
|
+
if (_temp3 && _temp3.then) return _temp3.then(function () {});
|
|
18526
|
+
}
|
|
18527
|
+
}();
|
|
18528
|
+
if (_temp4 && _temp4.then) return _temp4.then(function () {});
|
|
18439
18529
|
}
|
|
18440
18530
|
}();
|
|
18441
|
-
if (
|
|
18531
|
+
if (_temp5 && _temp5.then) return _temp5.then(function () {});
|
|
18442
18532
|
}
|
|
18443
18533
|
}();
|
|
18444
|
-
if (
|
|
18534
|
+
if (_temp6 && _temp6.then) return _temp6.then(function () {});
|
|
18445
18535
|
}
|
|
18446
18536
|
}();
|
|
18447
|
-
return
|
|
18537
|
+
return _temp7 && _temp7.then ? _temp7.then(function () {}) : void 0;
|
|
18448
18538
|
} catch (e) {
|
|
18449
18539
|
Promise.reject(e);
|
|
18450
18540
|
}
|
|
@@ -18570,11 +18660,35 @@ function SelectDocument(_ref2) {
|
|
|
18570
18660
|
gap: "8px",
|
|
18571
18661
|
gridColumn: "span 1"
|
|
18572
18662
|
}
|
|
18663
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
18664
|
+
style: {
|
|
18665
|
+
display: "flex",
|
|
18666
|
+
alignItems: "center",
|
|
18667
|
+
justifyContent: "space-between"
|
|
18668
|
+
}
|
|
18573
18669
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
18574
18670
|
style: {
|
|
18575
18671
|
margin: 0
|
|
18576
18672
|
}
|
|
18577
|
-
},
|
|
18673
|
+
}, 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__default.createElement("button", {
|
|
18674
|
+
type: "button",
|
|
18675
|
+
onClick: () => {
|
|
18676
|
+
setUploadedFile(null);
|
|
18677
|
+
setFile(null);
|
|
18678
|
+
setSelectedDocument(doc !== null && doc !== void 0 && doc.hasDropdown ? {} : doc);
|
|
18679
|
+
setDocumentUid("");
|
|
18680
|
+
setDocNumberError(null);
|
|
18681
|
+
},
|
|
18682
|
+
style: {
|
|
18683
|
+
border: "1px solid #00497e",
|
|
18684
|
+
background: "#fff",
|
|
18685
|
+
color: "#00497e",
|
|
18686
|
+
borderRadius: "4px",
|
|
18687
|
+
padding: "4px 10px",
|
|
18688
|
+
cursor: "pointer",
|
|
18689
|
+
fontWeight: "bold"
|
|
18690
|
+
}
|
|
18691
|
+
}, "+ Add")), /*#__PURE__*/React__default.createElement("div", {
|
|
18578
18692
|
className: "field",
|
|
18579
18693
|
style: {
|
|
18580
18694
|
display: "flex",
|
|
@@ -18645,7 +18759,47 @@ function SelectDocument(_ref2) {
|
|
|
18645
18759
|
setIsDocumentUidLocked(false);
|
|
18646
18760
|
setDocumentUid("");
|
|
18647
18761
|
}
|
|
18648
|
-
})))
|
|
18762
|
+
}))), (isOther ? otherUploadedDocuments : uploadedFile ? [{
|
|
18763
|
+
fileStoreId: uploadedFile,
|
|
18764
|
+
fileName: (file === null || file === void 0 ? void 0 : file.name) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileName),
|
|
18765
|
+
documentNumber: documentUid
|
|
18766
|
+
}] : []).map((uploadedDocument, index) => /*#__PURE__*/React__default.createElement("div", {
|
|
18767
|
+
key: uploadedDocument.fileStoreId || index,
|
|
18768
|
+
style: {
|
|
18769
|
+
display: "flex",
|
|
18770
|
+
alignItems: "center",
|
|
18771
|
+
gap: "12px",
|
|
18772
|
+
marginTop: "4px",
|
|
18773
|
+
color: "#00497e"
|
|
18774
|
+
}
|
|
18775
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
18776
|
+
style: {
|
|
18777
|
+
fontWeight: "bold"
|
|
18778
|
+
}
|
|
18779
|
+
}, 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__default.createElement("span", null, uploadedDocument.documentNumber), /*#__PURE__*/React__default.createElement("button", {
|
|
18780
|
+
type: "button",
|
|
18781
|
+
onClick: () => viewDocument(uploadedDocument.fileStoreId),
|
|
18782
|
+
title: t("WS_VIEW_DOCUMENT") || "View Document",
|
|
18783
|
+
style: {
|
|
18784
|
+
border: "none",
|
|
18785
|
+
background: "transparent",
|
|
18786
|
+
color: "#00497e",
|
|
18787
|
+
cursor: "pointer",
|
|
18788
|
+
padding: 0
|
|
18789
|
+
}
|
|
18790
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.ViewsIcon, null)), /*#__PURE__*/React__default.createElement("button", {
|
|
18791
|
+
type: "button",
|
|
18792
|
+
onClick: () => removeUploadedDocument(uploadedDocument.fileStoreId),
|
|
18793
|
+
title: "Remove Document",
|
|
18794
|
+
style: {
|
|
18795
|
+
border: "none",
|
|
18796
|
+
background: "transparent",
|
|
18797
|
+
color: "#d32f2f",
|
|
18798
|
+
cursor: "pointer",
|
|
18799
|
+
padding: 0,
|
|
18800
|
+
fontSize: "18px"
|
|
18801
|
+
}
|
|
18802
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.RemoveIcon, null))))), /*#__PURE__*/React__default.createElement("div", {
|
|
18649
18803
|
style: {
|
|
18650
18804
|
display: "flex",
|
|
18651
18805
|
flexDirection: "column",
|
|
@@ -18698,21 +18852,7 @@ function SelectDocument(_ref2) {
|
|
|
18698
18852
|
fontWeight: "bold",
|
|
18699
18853
|
fontSize: "14px"
|
|
18700
18854
|
}
|
|
18701
|
-
}, "\u2714 Uploaded")),
|
|
18702
|
-
onClick: viewDocument,
|
|
18703
|
-
style: {
|
|
18704
|
-
display: "flex",
|
|
18705
|
-
alignItems: "center",
|
|
18706
|
-
gap: "8px",
|
|
18707
|
-
cursor: "pointer",
|
|
18708
|
-
color: "#00497e",
|
|
18709
|
-
fontWeight: "bold",
|
|
18710
|
-
padding: "8px 16px",
|
|
18711
|
-
border: "1px solid #00497e",
|
|
18712
|
-
borderRadius: "4px",
|
|
18713
|
-
backgroundColor: "#fff"
|
|
18714
|
-
}
|
|
18715
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.ViewsIcon, null), /*#__PURE__*/React__default.createElement("span", null, t("WS_VIEW_DOCUMENT") || "View Document")))), showCamera && /*#__PURE__*/React__default.createElement(CameraCaptureModal, {
|
|
18855
|
+
}, "\u2714 Uploaded")))), showCamera && /*#__PURE__*/React__default.createElement(CameraCaptureModal, {
|
|
18716
18856
|
onCapture: handleCapture,
|
|
18717
18857
|
onClose: () => setShowCamera(false),
|
|
18718
18858
|
t: t
|
|
@@ -18788,7 +18928,7 @@ const CameraCaptureModal = _ref4 => {
|
|
|
18788
18928
|
React.useEffect(() => {
|
|
18789
18929
|
const startCamera = function () {
|
|
18790
18930
|
try {
|
|
18791
|
-
const
|
|
18931
|
+
const _temp8 = _catch(function () {
|
|
18792
18932
|
return Promise.resolve(navigator.mediaDevices.getUserMedia({
|
|
18793
18933
|
video: true
|
|
18794
18934
|
})).then(function (mediaStream) {
|
|
@@ -18801,7 +18941,7 @@ const CameraCaptureModal = _ref4 => {
|
|
|
18801
18941
|
setError(t("WS_CAMERA_ACCESS_ERROR") || "Camera Access Error");
|
|
18802
18942
|
console.error("Error accessing camera: ", err);
|
|
18803
18943
|
});
|
|
18804
|
-
return Promise.resolve(
|
|
18944
|
+
return Promise.resolve(_temp8 && _temp8.then ? _temp8.then(function () {}) : void 0);
|
|
18805
18945
|
} catch (e) {
|
|
18806
18946
|
return Promise.reject(e);
|
|
18807
18947
|
}
|
|
@@ -23549,6 +23689,57 @@ const WSDjbEmployee = _ref => {
|
|
|
23549
23689
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, FormContent);
|
|
23550
23690
|
};
|
|
23551
23691
|
|
|
23692
|
+
const WSDivyangjan = _ref => {
|
|
23693
|
+
var _formData$disability, _formData$additionalD;
|
|
23694
|
+
let config = _ref.config,
|
|
23695
|
+
onSelect = _ref.onSelect,
|
|
23696
|
+
userType = _ref.userType,
|
|
23697
|
+
formData = _ref.formData;
|
|
23698
|
+
const _useTranslation = reactI18next.useTranslation(),
|
|
23699
|
+
t = _useTranslation.t;
|
|
23700
|
+
const _useForm = reactHookForm.useForm({
|
|
23701
|
+
defaultValues: {
|
|
23702
|
+
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)
|
|
23703
|
+
}
|
|
23704
|
+
}),
|
|
23705
|
+
control = _useForm.control,
|
|
23706
|
+
watch = _useForm.watch;
|
|
23707
|
+
const formValue = watch();
|
|
23708
|
+
const goNext = () => onSelect(config.key, {
|
|
23709
|
+
isDivyangjan: !!formValue.isDivyangjan
|
|
23710
|
+
});
|
|
23711
|
+
const onSkip = () => onSelect();
|
|
23712
|
+
React.useEffect(() => {
|
|
23713
|
+
if (userType === "employee") {
|
|
23714
|
+
onSelect(config.key, {
|
|
23715
|
+
isDivyangjan: !!formValue.isDivyangjan
|
|
23716
|
+
});
|
|
23717
|
+
}
|
|
23718
|
+
}, [config.key, formValue.isDivyangjan, onSelect, userType]);
|
|
23719
|
+
const content = /*#__PURE__*/React__default.createElement(digitUiReactComponents.CollapsibleCardPage, {
|
|
23720
|
+
title: "Divyangjan/Person with Disability?",
|
|
23721
|
+
defaultOpen: true
|
|
23722
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
23723
|
+
style: {
|
|
23724
|
+
width: "max-content"
|
|
23725
|
+
}
|
|
23726
|
+
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
23727
|
+
control: control,
|
|
23728
|
+
name: "isDivyangjan",
|
|
23729
|
+
render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.CheckBox, {
|
|
23730
|
+
label: "Divyangjan/Person with Disability?",
|
|
23731
|
+
checked: !!props.value,
|
|
23732
|
+
onChange: event => props.onChange(event.target.checked)
|
|
23733
|
+
})
|
|
23734
|
+
})));
|
|
23735
|
+
return userType === "citizen" ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.FormStep, {
|
|
23736
|
+
t: t,
|
|
23737
|
+
config: config,
|
|
23738
|
+
onSelect: goNext,
|
|
23739
|
+
onSkip: onSkip
|
|
23740
|
+
}, content) : content;
|
|
23741
|
+
};
|
|
23742
|
+
|
|
23552
23743
|
const _excluded$1 = ["t", "config", "onSelect", "formData", "formState", "setError", "clearErrors"];
|
|
23553
23744
|
const NUMBER_PATTERN$1 = /^\d+$/;
|
|
23554
23745
|
const DECIMAL_PATTERN$1 = /^\d+(\.\d{1,2})?$/;
|
|
@@ -27624,12 +27815,25 @@ const newConfig = [{
|
|
|
27624
27815
|
cardText: "",
|
|
27625
27816
|
submitBarLabel: "CS_COMMON_NEXT"
|
|
27626
27817
|
}
|
|
27818
|
+
}, {
|
|
27819
|
+
route: "disability-details",
|
|
27820
|
+
component: "WSDivyangjan",
|
|
27821
|
+
key: "disability",
|
|
27822
|
+
nextStep: "document-details",
|
|
27823
|
+
WATER: "document-details",
|
|
27824
|
+
hideInEmployee: true,
|
|
27825
|
+
texts: {
|
|
27826
|
+
headerCaption: "WS_COMMON_CONNECTION_DETAIL",
|
|
27827
|
+
header: "Divyangjan/Person with Disability?",
|
|
27828
|
+
cardText: "",
|
|
27829
|
+
submitBarLabel: "CS_COMMON_NEXT"
|
|
27830
|
+
}
|
|
27627
27831
|
}, {
|
|
27628
27832
|
route: "djb-employee-details",
|
|
27629
27833
|
component: "WSDjbEmployee",
|
|
27630
27834
|
key: "djbEmployee",
|
|
27631
|
-
nextStep: "
|
|
27632
|
-
WATER: "
|
|
27835
|
+
nextStep: "disability-details",
|
|
27836
|
+
WATER: "disability-details",
|
|
27633
27837
|
hideInEmployee: true,
|
|
27634
27838
|
texts: {
|
|
27635
27839
|
headerCaption: "WS_COMMON_CONNECTION_DETAIL",
|
|
@@ -33635,7 +33839,7 @@ const getConnectionDetailsPDF = function (application, property, tenantInfo, t)
|
|
|
33635
33839
|
};
|
|
33636
33840
|
|
|
33637
33841
|
const ConnectionDetails$5 = () => {
|
|
33638
|
-
var _Digit$SessionStorage, _user$info, _data$SewerageConnect, _data$SewerageConnect2, _data$WaterConnection, _data$WaterConnection2, _Object$keys, _connectionData$Water, _connectionData$Sewer, _data$WaterConnection3, _data$WaterConnection4, _data$WaterConnection5, _data$WaterConnection6, _data$WaterConnection7, _data$WaterConnection8, _data$WaterConnection9, _data$WaterConnection0, _data$SewerageConnect3, _data$SewerageConnect4, _data$SewerageConnect5, _data$SewerageConnect6, _state, _state$applicationNo, _state2, _state3, _state4, _state4$applicationTy, _state5, _state6, _state7, _state8, _state8$applicationTy, _state9, _state0, _state1, _state10, _state10$applicationT, _state11, _state12, _state13, _state14, _state15, _state15$applicationT, _state16, _state16$waterSource, _state16$waterSource$, _state17, _state18, _state18$waterSource, _state18$waterSource$, _state19, _state20, _state21, _state22, _state22$additionalDe, _state23, _state23$applicationT, _state24, _state24$additionalDe, _state24$additionalDe2, _state25, _state25$additionalDe, _state25$additionalDe2, _state26, _state26$additionalDe, _state27, _state27$additionalDe, _state28, _state28$additionalDe, _state28$additionalDe2, _state29, _state29$additionalDe, _state30, _state31, _state32, _state33, _state33$property, _state33$property$own, _PTData$Properties2, _PTData$Properties2$, _PTData$Properties3, _PTData$Properties3$, _PTData$Properties3$$, _PTData$Properties3$$2, _PTData$Properties4, _PTData$Properties4$, _user$info2, _user$info2$userName, _user$info3, _user$info4, _state34, _state34$additionalDe, _state34$additionalDe2, _state35, _state35$additionalDe, _state35$additionalDe2, _state36, _state36$additionalDe, _state37, _state37$additionalDe, _state38, _state38$additionalDe, _state39, _state39$additionalDe, _state40, _state40$additionalDe, _state41, _state42, _state43, _state44, _state44$connectionHo, _state44$connectionHo2, _data$WaterConnection16, _data$WaterConnection17, _data$WaterConnection18, _data$WaterConnection19, _data$SewerageConnect0, _data$SewerageConnect1, _data$SewerageConnect10, _data$SewerageConnect11, _data$WaterConnection20, _data$WaterConnection21, _data$WaterConnection22, _data$WaterConnection23, _data$SewerageConnect12, _data$SewerageConnect13, _data$SewerageConnect14, _data$SewerageConnect15, _data$WaterConnection24, _data$WaterConnection25, _data$WaterConnection26, _data$WaterConnection27, _data$SewerageConnect16, _data$SewerageConnect17, _data$SewerageConnect18, _data$SewerageConnect19, _data$WaterConnection28, _data$WaterConnection29, _data$WaterConnection30, _data$WaterConnection31, _data$SewerageConnect20, _data$SewerageConnect21, _data$SewerageConnect22, _data$SewerageConnect23, _data$WaterConnection32, _data$WaterConnection33, _data$WaterConnection34, _data$WaterConnection35, _data$SewerageConnect24, _data$SewerageConnect25, _data$SewerageConnect26, _data$SewerageConnect27, _data$WaterConnection36, _data$WaterConnection37, _data$WaterConnection38, _data$WaterConnection39, _data$SewerageConnect28, _data$SewerageConnect29, _data$SewerageConnect30, _data$SewerageConnect31, _data$WaterConnection40, _data$WaterConnection41, _data$WaterConnection42, _data$WaterConnection43, _data$SewerageConnect32, _data$SewerageConnect33, _data$SewerageConnect34, _data$SewerageConnect35, _data$WaterConnection44, _data$WaterConnection45, _data$WaterConnection46, _data$WaterConnection47, _data$SewerageConnect36, _data$SewerageConnect37, _data$SewerageConnect38, _data$SewerageConnect39, _data$WaterConnection48, _data$WaterConnection49, _data$WaterConnection50, _data$WaterConnection51, _data$SewerageConnect40, _data$SewerageConnect41, _data$SewerageConnect42, _data$SewerageConnect43, _data$WaterConnection52, _data$WaterConnection53, _data$WaterConnection54, _data$WaterConnection55, _data$SewerageConnect44, _data$SewerageConnect45, _data$SewerageConnect46, _data$SewerageConnect47, _state45, _state45$additionalDe, _state46, _state46$additionalDe, _state47, _state47$additionalDe, _state48, _state48$additionalDe, _state49, _state49$additionalDe, _state50, _state51, _state54, _state55, _state56, _state57, _state58, _state59, _paymentDetails$data17, _paymentDetails$data18;
|
|
33842
|
+
var _Digit$SessionStorage, _user$info, _data$SewerageConnect, _data$SewerageConnect2, _data$WaterConnection, _data$WaterConnection2, _Object$keys, _connectionData$Water, _connectionData$Water2, _connectionData$Sewer, _connectionData$Sewer2, _data$WaterConnection3, _data$WaterConnection4, _data$WaterConnection5, _data$WaterConnection6, _data$WaterConnection7, _data$WaterConnection8, _data$WaterConnection9, _data$WaterConnection0, _data$SewerageConnect3, _data$SewerageConnect4, _data$SewerageConnect5, _data$SewerageConnect6, _state, _state$applicationNo, _state2, _state3, _state4, _state4$applicationTy, _state5, _state6, _state7, _state8, _state8$applicationTy, _state9, _state0, _state1, _state10, _state10$applicationT, _state11, _state12, _state13, _state14, _state15, _state15$applicationT, _state16, _state16$waterSource, _state16$waterSource$, _state17, _state18, _state18$waterSource, _state18$waterSource$, _state19, _state20, _state21, _state22, _state22$additionalDe, _state23, _state23$applicationT, _state24, _state24$additionalDe, _state24$additionalDe2, _state25, _state25$additionalDe, _state25$additionalDe2, _state26, _state26$additionalDe, _state27, _state27$additionalDe, _state28, _state28$additionalDe, _state28$additionalDe2, _state29, _state29$additionalDe, _state30, _state31, _state32, _state33, _state33$property, _state33$property$own, _PTData$Properties2, _PTData$Properties2$, _PTData$Properties3, _PTData$Properties3$, _PTData$Properties3$$, _PTData$Properties3$$2, _PTData$Properties4, _PTData$Properties4$, _user$info2, _user$info2$userName, _user$info3, _user$info4, _state34, _state34$additionalDe, _state34$additionalDe2, _state35, _state35$additionalDe, _state35$additionalDe2, _state36, _state36$additionalDe, _state37, _state37$additionalDe, _state38, _state38$additionalDe, _state39, _state39$additionalDe, _state40, _state40$additionalDe, _state41, _state42, _state43, _state44, _state44$connectionHo, _state44$connectionHo2, _data$WaterConnection16, _data$WaterConnection17, _data$WaterConnection18, _data$WaterConnection19, _data$SewerageConnect0, _data$SewerageConnect1, _data$SewerageConnect10, _data$SewerageConnect11, _data$WaterConnection20, _data$WaterConnection21, _data$WaterConnection22, _data$WaterConnection23, _data$SewerageConnect12, _data$SewerageConnect13, _data$SewerageConnect14, _data$SewerageConnect15, _data$WaterConnection24, _data$WaterConnection25, _data$WaterConnection26, _data$WaterConnection27, _data$SewerageConnect16, _data$SewerageConnect17, _data$SewerageConnect18, _data$SewerageConnect19, _data$WaterConnection28, _data$WaterConnection29, _data$WaterConnection30, _data$WaterConnection31, _data$SewerageConnect20, _data$SewerageConnect21, _data$SewerageConnect22, _data$SewerageConnect23, _data$WaterConnection32, _data$WaterConnection33, _data$WaterConnection34, _data$WaterConnection35, _data$SewerageConnect24, _data$SewerageConnect25, _data$SewerageConnect26, _data$SewerageConnect27, _data$WaterConnection36, _data$WaterConnection37, _data$WaterConnection38, _data$WaterConnection39, _data$SewerageConnect28, _data$SewerageConnect29, _data$SewerageConnect30, _data$SewerageConnect31, _data$WaterConnection40, _data$WaterConnection41, _data$WaterConnection42, _data$WaterConnection43, _data$SewerageConnect32, _data$SewerageConnect33, _data$SewerageConnect34, _data$SewerageConnect35, _data$WaterConnection44, _data$WaterConnection45, _data$WaterConnection46, _data$WaterConnection47, _data$SewerageConnect36, _data$SewerageConnect37, _data$SewerageConnect38, _data$SewerageConnect39, _data$WaterConnection48, _data$WaterConnection49, _data$WaterConnection50, _data$WaterConnection51, _data$SewerageConnect40, _data$SewerageConnect41, _data$SewerageConnect42, _data$SewerageConnect43, _data$WaterConnection52, _data$WaterConnection53, _data$WaterConnection54, _data$WaterConnection55, _data$SewerageConnect44, _data$SewerageConnect45, _data$SewerageConnect46, _data$SewerageConnect47, _state45, _state45$additionalDe, _state46, _state46$additionalDe, _state47, _state47$additionalDe, _state48, _state48$additionalDe, _state49, _state49$additionalDe, _state50, _state51, _state54, _state55, _state56, _state57, _state58, _state59, _paymentDetails$data17, _paymentDetails$data18;
|
|
33639
33843
|
const _useTranslation = reactI18next.useTranslation(),
|
|
33640
33844
|
t = _useTranslation.t;
|
|
33641
33845
|
const menuRef = React.useRef();
|
|
@@ -33686,7 +33890,7 @@ const ConnectionDetails$5 = () => {
|
|
|
33686
33890
|
enabled: filter2 !== null && filter2 !== void 0 && filter2.connectionNumber ? true : false
|
|
33687
33891
|
}, true),
|
|
33688
33892
|
connectionData = _Digit$Hooks$ws$useMy2.data;
|
|
33689
|
-
state = ((_Object$keys = Object.keys(state)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) > 0 ? state : applicationNobyData !== null && applicationNobyData !== void 0 && applicationNobyData.includes("WS") ? connectionData === null || connectionData === void 0 ? void 0 : (_connectionData$Water = connectionData.WaterConnection) === null || _connectionData$Water === void 0 ? void 0 : _connectionData$Water[0] : connectionData === null || connectionData === void 0 ? void 0 : (_connectionData$Sewer = connectionData.SewerageConnections) === null || _connectionData$Sewer === void 0 ? void 0 : _connectionData$Sewer[0];
|
|
33893
|
+
state = ((_Object$keys = Object.keys(state)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) > 0 ? state : applicationNobyData !== null && applicationNobyData !== void 0 && applicationNobyData.includes("WS") ? (connectionData === null || connectionData === void 0 ? void 0 : (_connectionData$Water = connectionData.WaterConnection) === null || _connectionData$Water === void 0 ? void 0 : _connectionData$Water.find(c => c.applicationStatus === "CONNECTION_ACTIVATED")) || (connectionData === null || connectionData === void 0 ? void 0 : (_connectionData$Water2 = connectionData.WaterConnection) === null || _connectionData$Water2 === void 0 ? void 0 : _connectionData$Water2[0]) : (connectionData === null || connectionData === void 0 ? void 0 : (_connectionData$Sewer = connectionData.SewerageConnections) === null || _connectionData$Sewer === void 0 ? void 0 : _connectionData$Sewer.find(c => c.applicationStatus === "CONNECTION_ACTIVATED")) || (connectionData === null || connectionData === void 0 ? void 0 : (_connectionData$Sewer2 = connectionData.SewerageConnections) === null || _connectionData$Sewer2 === void 0 ? void 0 : _connectionData$Sewer2[0]);
|
|
33690
33894
|
const closeModal = () => {
|
|
33691
33895
|
setShowOptions(false);
|
|
33692
33896
|
};
|
|
@@ -35146,6 +35350,7 @@ const CheckPage = _ref => {
|
|
|
35146
35350
|
const propertyAddress = (value === null || value === void 0 ? void 0 : value.propertyLocationDetails) || {};
|
|
35147
35351
|
const useDetails = (value === null || value === void 0 ? void 0 : (_value$waterConnectio = value.waterConnection) === null || _value$waterConnectio === void 0 ? void 0 : _value$waterConnectio.useDetails) || {};
|
|
35148
35352
|
const djbEmployee = (value === null || value === void 0 ? void 0 : value.djbEmployee) || {};
|
|
35353
|
+
const disability = (value === null || value === void 0 ? void 0 : value.disability) || (value === null || value === void 0 ? void 0 : value.additionalDetails) || {};
|
|
35149
35354
|
const bankDetails = (value === null || value === void 0 ? void 0 : value.bankDetails) || {};
|
|
35150
35355
|
const additionalDetails = {};
|
|
35151
35356
|
const checkForNA = val => val ? val : "CS_NA";
|
|
@@ -35453,7 +35658,15 @@ const CheckPage = _ref => {
|
|
|
35453
35658
|
},
|
|
35454
35659
|
onClick: () => openFilePDF(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document)
|
|
35455
35660
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.GenericFileIcon, null), " ", t("CS_COMMON_VIEW"))
|
|
35456
|
-
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null,
|
|
35661
|
+
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, "Divyangjan/Person with Disability?"), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
|
|
35662
|
+
style: {
|
|
35663
|
+
marginTop: "10px",
|
|
35664
|
+
marginBottom: "30px"
|
|
35665
|
+
}
|
|
35666
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
35667
|
+
label: "Divyangjan/Person with Disability?",
|
|
35668
|
+
text: "" + (disability !== null && disability !== void 0 && disability.isDivyangjan ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO"))
|
|
35669
|
+
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("WS_BANK_DETAILS")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
|
|
35457
35670
|
style: {
|
|
35458
35671
|
marginTop: "10px",
|
|
35459
35672
|
marginBottom: "30px"
|
|
@@ -36907,20 +37120,22 @@ const getAddress$1 = (address, t) => {
|
|
|
36907
37120
|
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 : " ");
|
|
36908
37121
|
};
|
|
36909
37122
|
const WSInfoPage = () => {
|
|
36910
|
-
var
|
|
37123
|
+
var _user$info, _user$info$userName, _user$info2, _propertyDetails$Prop;
|
|
36911
37124
|
const _useTranslation = reactI18next.useTranslation(),
|
|
36912
37125
|
t = _useTranslation.t;
|
|
36913
37126
|
const history = reactRouterDom.useHistory();
|
|
36914
37127
|
const location = reactRouterDom.useLocation();
|
|
36915
37128
|
const match = reactRouterDom.useRouteMatch();
|
|
36916
37129
|
const isEmployee = window.location.href.includes("/employee");
|
|
37130
|
+
const user = Digit.UserService.getUser();
|
|
37131
|
+
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;
|
|
36917
37132
|
const _useState = React.useState(null),
|
|
36918
37133
|
hasProperty = _useState[0],
|
|
36919
37134
|
setHasProperty = _useState[1];
|
|
36920
37135
|
const _useState2 = React.useState(null),
|
|
36921
37136
|
selectedProperty = _useState2[0],
|
|
36922
37137
|
setSelectedProperty = _useState2[1];
|
|
36923
|
-
const _useState3 = React.useState(""),
|
|
37138
|
+
const _useState3 = React.useState(isEmployee ? "" : userMobileNumber || ""),
|
|
36924
37139
|
searchMobileNumber = _useState3[0],
|
|
36925
37140
|
setSearchMobileNumber = _useState3[1];
|
|
36926
37141
|
const _useState4 = React.useState(false),
|
|
@@ -36938,9 +37153,11 @@ const WSInfoPage = () => {
|
|
|
36938
37153
|
const _useState8 = React.useState(null),
|
|
36939
37154
|
showToast = _useState8[0],
|
|
36940
37155
|
setShowToast = _useState8[1];
|
|
37156
|
+
React.useEffect(() => {
|
|
37157
|
+
sessionStorage.removeItem("WS_OTP_VERIFIED_PROPERTY_ID");
|
|
37158
|
+
}, []);
|
|
36941
37159
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
36942
|
-
const
|
|
36943
|
-
const mobileNumberToSearch = isEmployee ? searchMobileNumber : userMobileNumber;
|
|
37160
|
+
const mobileNumberToSearch = searchMobileNumber;
|
|
36944
37161
|
const _Digit$Hooks$pt$usePr = Digit.Hooks.pt.usePropertySearch({
|
|
36945
37162
|
filters: {
|
|
36946
37163
|
mobileNumber: mobileNumberToSearch
|
|
@@ -36966,6 +37183,7 @@ const WSInfoPage = () => {
|
|
|
36966
37183
|
const isEmployee = window.location.href.includes("/employee");
|
|
36967
37184
|
const baseUrl = isEmployee ? "/digit-ui/employee/ws" : "/digit-ui/citizen/ws";
|
|
36968
37185
|
if ((hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && selectedProperty) {
|
|
37186
|
+
sessionStorage.setItem("WS_OTP_VERIFIED_PROPERTY_ID", selectedProperty.propertyId);
|
|
36969
37187
|
history.push(baseUrl + "/old-application?propertyId=" + selectedProperty.propertyId);
|
|
36970
37188
|
} else {
|
|
36971
37189
|
history.push(baseUrl + "/old-application");
|
|
@@ -36984,7 +37202,7 @@ const WSInfoPage = () => {
|
|
|
36984
37202
|
mobileNumber: mobileNumberToSearch,
|
|
36985
37203
|
tenantId: "dl",
|
|
36986
37204
|
type: "register",
|
|
36987
|
-
userType:
|
|
37205
|
+
userType: "EMPLOYEE"
|
|
36988
37206
|
}
|
|
36989
37207
|
};
|
|
36990
37208
|
return Promise.resolve(Digit.UserService.sendOtp(payload, "dl")).then(function (response) {
|
|
@@ -37118,11 +37336,7 @@ const WSInfoPage = () => {
|
|
|
37118
37336
|
if (e.stopPropagation) e.stopPropagation();
|
|
37119
37337
|
}
|
|
37120
37338
|
if ((hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && selectedProperty) {
|
|
37121
|
-
|
|
37122
|
-
proceedToNext();
|
|
37123
|
-
} else {
|
|
37124
|
-
handleSendOtp(e);
|
|
37125
|
-
}
|
|
37339
|
+
handleSendOtp(e);
|
|
37126
37340
|
} else if ((hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && !selectedProperty) {
|
|
37127
37341
|
return;
|
|
37128
37342
|
} else {
|
|
@@ -37231,7 +37445,26 @@ const WSInfoPage = () => {
|
|
|
37231
37445
|
style: {
|
|
37232
37446
|
marginBottom: "24px"
|
|
37233
37447
|
}
|
|
37234
|
-
}, isEmployee && /*#__PURE__*/React__default.createElement("div", {
|
|
37448
|
+
}, !isEmployee && /*#__PURE__*/React__default.createElement("div", {
|
|
37449
|
+
style: {
|
|
37450
|
+
marginBottom: "16px"
|
|
37451
|
+
}
|
|
37452
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Label, null, t("CORE_COMMON_MOBILE_NUMBER")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
37453
|
+
t: t,
|
|
37454
|
+
type: "number",
|
|
37455
|
+
isMandatory: false,
|
|
37456
|
+
name: "mobileNumber",
|
|
37457
|
+
value: searchMobileNumber,
|
|
37458
|
+
onChange: e => {
|
|
37459
|
+
const val = e.target.value.replace(/\D/g, "").slice(0, 10);
|
|
37460
|
+
setSearchMobileNumber(val);
|
|
37461
|
+
setSelectedProperty(null);
|
|
37462
|
+
setShowOtpVerification(false);
|
|
37463
|
+
setOtp("");
|
|
37464
|
+
},
|
|
37465
|
+
placeholder: t("Enter mobile number"),
|
|
37466
|
+
maxLength: 10
|
|
37467
|
+
})), isEmployee && /*#__PURE__*/React__default.createElement("div", {
|
|
37235
37468
|
style: {
|
|
37236
37469
|
display: "flex",
|
|
37237
37470
|
flexDirection: "column",
|
|
@@ -38642,6 +38875,7 @@ const DEFAULT_SECTION_STATE = {
|
|
|
38642
38875
|
applicant: true,
|
|
38643
38876
|
contact: true,
|
|
38644
38877
|
djbEmployee: true,
|
|
38878
|
+
disability: true,
|
|
38645
38879
|
governmentEmployee: true,
|
|
38646
38880
|
address: true,
|
|
38647
38881
|
usage: true,
|
|
@@ -38694,6 +38928,9 @@ const DEFAULT_FORM_VALUES = {
|
|
|
38694
38928
|
retirementDate: "",
|
|
38695
38929
|
officeNameAndAddress: ""
|
|
38696
38930
|
},
|
|
38931
|
+
disability: {
|
|
38932
|
+
isDivyangjan: false
|
|
38933
|
+
},
|
|
38697
38934
|
governmentEmployee: {
|
|
38698
38935
|
isGovernmentEmployee: false,
|
|
38699
38936
|
organizationName: "",
|
|
@@ -38847,6 +39084,7 @@ const buildDefaultValues = () => ({
|
|
|
38847
39084
|
applicant: _extends({}, DEFAULT_FORM_VALUES.applicant),
|
|
38848
39085
|
contact: _extends({}, DEFAULT_FORM_VALUES.contact),
|
|
38849
39086
|
djbEmployee: _extends({}, DEFAULT_FORM_VALUES.djbEmployee),
|
|
39087
|
+
disability: _extends({}, DEFAULT_FORM_VALUES.disability),
|
|
38850
39088
|
propertyAddress: _extends({}, DEFAULT_FORM_VALUES.propertyAddress),
|
|
38851
39089
|
useDetails: _extends({}, DEFAULT_FORM_VALUES.useDetails),
|
|
38852
39090
|
bankDetails: _extends({}, DEFAULT_FORM_VALUES.bankDetails),
|
|
@@ -39112,7 +39350,7 @@ const FileUploadField = _ref6 => {
|
|
|
39112
39350
|
})))));
|
|
39113
39351
|
};
|
|
39114
39352
|
const NewApplication = () => {
|
|
39115
|
-
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;
|
|
39353
|
+
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;
|
|
39116
39354
|
const _useTranslation2 = reactI18next.useTranslation(),
|
|
39117
39355
|
t = _useTranslation2.t;
|
|
39118
39356
|
const history = reactRouterDom.useHistory();
|
|
@@ -39154,6 +39392,7 @@ const NewApplication = () => {
|
|
|
39154
39392
|
setWaterAndSewerageBoth = _useState12[1];
|
|
39155
39393
|
const _useState13 = React.useState(new URLSearchParams(location.search).get("propertyId")),
|
|
39156
39394
|
propertyId = _useState13[0];
|
|
39395
|
+
const initialPropertyQuery = React.useRef(location.search);
|
|
39157
39396
|
const initialFormValues = buildDefaultValues();
|
|
39158
39397
|
const _useState14 = React.useState(""),
|
|
39159
39398
|
city = _useState14[0],
|
|
@@ -39246,6 +39485,7 @@ const NewApplication = () => {
|
|
|
39246
39485
|
applicant: React__default.useRef(null),
|
|
39247
39486
|
contact: React__default.useRef(null),
|
|
39248
39487
|
djbEmployee: React__default.useRef(null),
|
|
39488
|
+
disability: React__default.useRef(null),
|
|
39249
39489
|
governmentEmployee: React__default.useRef(null),
|
|
39250
39490
|
propertyAddress: React__default.useRef(null),
|
|
39251
39491
|
useDetails: React__default.useRef(null),
|
|
@@ -39321,7 +39561,11 @@ const NewApplication = () => {
|
|
|
39321
39561
|
sectionId: "djbEmployee",
|
|
39322
39562
|
route: "djb-employee",
|
|
39323
39563
|
actions: "For DJB Employee"
|
|
39324
|
-
}] : []),
|
|
39564
|
+
}] : []), {
|
|
39565
|
+
sectionId: "disability",
|
|
39566
|
+
route: "disability",
|
|
39567
|
+
actions: "Divyangjan/Person with Disability"
|
|
39568
|
+
}, ...(isGovernmentEmployee ? [{
|
|
39325
39569
|
sectionId: "governmentEmployee",
|
|
39326
39570
|
route: "government-employee",
|
|
39327
39571
|
actions: "For Government Employee"
|
|
@@ -39402,6 +39646,12 @@ const NewApplication = () => {
|
|
|
39402
39646
|
sewerageMutation = _Digit$Hooks$ws$useWa2.mutate;
|
|
39403
39647
|
const _Digit$Hooks$ws$useWS4 = Digit.Hooks.ws.useWSApplicationActions("SEWERAGE"),
|
|
39404
39648
|
sewerageUpdateMutation = _Digit$Hooks$ws$useWS4.mutate;
|
|
39649
|
+
React.useEffect(() => {
|
|
39650
|
+
if (location.search !== initialPropertyQuery.current) {
|
|
39651
|
+
window.sessionStorage.removeItem(FORM_STORAGE_KEY);
|
|
39652
|
+
history.replace("/digit-ui/employee/ws/info");
|
|
39653
|
+
}
|
|
39654
|
+
}, [history, location.search]);
|
|
39405
39655
|
React.useEffect(() => {
|
|
39406
39656
|
if (!isGovernmentOrganization) {
|
|
39407
39657
|
setValue("applicant.governmentOrganizationName", "");
|
|
@@ -40474,6 +40724,23 @@ const NewApplication = () => {
|
|
|
40474
40724
|
minHeight: "96px"
|
|
40475
40725
|
}
|
|
40476
40726
|
})))), /*#__PURE__*/React__default.createElement(SectionCard, {
|
|
40727
|
+
description: "Please indicate whether the applicant is a Divyangjan/Person with Disability.",
|
|
40728
|
+
isOpen: collapsedSections.disability,
|
|
40729
|
+
onToggle: toggleSection,
|
|
40730
|
+
sectionKey: "disability",
|
|
40731
|
+
title: "Divyangjan/Person with Disability?",
|
|
40732
|
+
sectionRef: sectionRefs.disability
|
|
40733
|
+
}, /*#__PURE__*/React__default.createElement(FieldBlock, {
|
|
40734
|
+
label: "Divyangjan/Person with Disability?"
|
|
40735
|
+
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
40736
|
+
control: control,
|
|
40737
|
+
name: "disability.isDivyangjan",
|
|
40738
|
+
render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.CheckBox, {
|
|
40739
|
+
checked: !!props.value,
|
|
40740
|
+
label: "Divyangjan/Person with Disability?",
|
|
40741
|
+
onChange: event => props.onChange(event.target.checked)
|
|
40742
|
+
})
|
|
40743
|
+
}))), /*#__PURE__*/React__default.createElement(SectionCard, {
|
|
40477
40744
|
description: t("WS_PROPERTY_ADDRESS_DESC"),
|
|
40478
40745
|
isOpen: collapsedSections.address,
|
|
40479
40746
|
onToggle: toggleSection,
|
|
@@ -41295,7 +41562,17 @@ const NewApplication = () => {
|
|
|
41295
41562
|
isFullWidth: true,
|
|
41296
41563
|
label: "Office Name & Address",
|
|
41297
41564
|
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$djbEmploy5 = formValues.djbEmployee) === null || _formValues$djbEmploy5 === void 0 ? void 0 : _formValues$djbEmploy5.officeNameAndAddress
|
|
41298
|
-
})) : null),
|
|
41565
|
+
})) : null), /*#__PURE__*/React__default.createElement(SectionCard, {
|
|
41566
|
+
description: "Divyangjan/Person with Disability declaration.",
|
|
41567
|
+
isOpen: collapsedSections.disability,
|
|
41568
|
+
onToggle: toggleSection,
|
|
41569
|
+
sectionKey: "disability",
|
|
41570
|
+
title: "Divyangjan/Person with Disability?",
|
|
41571
|
+
onEditClick: () => handleSectionEdit("disability")
|
|
41572
|
+
}, /*#__PURE__*/React__default.createElement(PreviewItem, {
|
|
41573
|
+
label: "Divyangjan/Person with Disability?",
|
|
41574
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$disabilit = formValues.disability) === null || _formValues$disabilit === void 0 ? void 0 : _formValues$disabilit.isDivyangjan
|
|
41575
|
+
})), (formValues === null || formValues === void 0 ? void 0 : (_formValues$governmen = formValues.governmentEmployee) === null || _formValues$governmen === void 0 ? void 0 : _formValues$governmen.isGovernmentEmployee) && /*#__PURE__*/React__default.createElement(SectionCard, {
|
|
41299
41576
|
description: "Government employee organization details.",
|
|
41300
41577
|
isOpen: collapsedSections.governmentEmployee,
|
|
41301
41578
|
onToggle: toggleSection,
|
|
@@ -51357,7 +51634,8 @@ const EditModifyApplication = () => {
|
|
|
51357
51634
|
};
|
|
51358
51635
|
|
|
51359
51636
|
const Step1_SearchConnection = _ref => {
|
|
51360
|
-
let
|
|
51637
|
+
let t = _ref.t,
|
|
51638
|
+
defaultKNumber = _ref.defaultKNumber,
|
|
51361
51639
|
onNext = _ref.onNext,
|
|
51362
51640
|
isEditFlow = _ref.isEditFlow;
|
|
51363
51641
|
const _useState = React.useState(defaultKNumber || ""),
|
|
@@ -51366,9 +51644,55 @@ const Step1_SearchConnection = _ref => {
|
|
|
51366
51644
|
const _useState2 = React.useState(false),
|
|
51367
51645
|
isLoading = _useState2[0],
|
|
51368
51646
|
setIsLoading = _useState2[1];
|
|
51369
|
-
const _useState3 = React.useState(
|
|
51370
|
-
|
|
51371
|
-
|
|
51647
|
+
const _useState3 = React.useState(false),
|
|
51648
|
+
isConsenting = _useState3[0],
|
|
51649
|
+
setIsConsenting = _useState3[1];
|
|
51650
|
+
const _useState4 = React.useState(null),
|
|
51651
|
+
showToast = _useState4[0],
|
|
51652
|
+
setShowToast = _useState4[1];
|
|
51653
|
+
const handleDigiLockerConsent = function (e) {
|
|
51654
|
+
try {
|
|
51655
|
+
if (e !== null && e !== void 0 && e.preventDefault) e.preventDefault();
|
|
51656
|
+
if (e !== null && e !== void 0 && e.stopPropagation) e.stopPropagation();
|
|
51657
|
+
setIsConsenting(true);
|
|
51658
|
+
const _temp = _finallyRethrows(function () {
|
|
51659
|
+
return _catch(function () {
|
|
51660
|
+
const tenantId = Digit.ULBService.getCurrentTenantId() || "dl";
|
|
51661
|
+
return Promise.resolve(Digit.DigiLockerService.authorization({
|
|
51662
|
+
module: "WS",
|
|
51663
|
+
tenantId
|
|
51664
|
+
})).then(function (data) {
|
|
51665
|
+
const redirectUrl = (data === null || data === void 0 ? void 0 : data.redirectURL) || (data === null || data === void 0 ? void 0 : data.redirectUrl);
|
|
51666
|
+
const verifier = (data === null || data === void 0 ? void 0 : data.dlReqRef) || (data === null || data === void 0 ? void 0 : data.codeverifier) || (data === null || data === void 0 ? void 0 : data.codeVerifier) || (data === null || data === void 0 ? void 0 : data.code_verifier);
|
|
51667
|
+
if (verifier) {
|
|
51668
|
+
sessionStorage.setItem("code_verfier_register", verifier);
|
|
51669
|
+
}
|
|
51670
|
+
if (redirectUrl) {
|
|
51671
|
+
window.location.href = redirectUrl;
|
|
51672
|
+
} else {
|
|
51673
|
+
setShowToast({
|
|
51674
|
+
key: "error",
|
|
51675
|
+
message: "No redirect URL returned from DigiLocker API"
|
|
51676
|
+
});
|
|
51677
|
+
}
|
|
51678
|
+
});
|
|
51679
|
+
}, function (err) {
|
|
51680
|
+
var _err$response, _err$response$data, _err$response$data$Er, _err$response$data$Er2;
|
|
51681
|
+
setShowToast({
|
|
51682
|
+
key: "error",
|
|
51683
|
+
message: (err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : (_err$response$data$Er = _err$response$data.Errors) === null || _err$response$data$Er === void 0 ? void 0 : (_err$response$data$Er2 = _err$response$data$Er[0]) === null || _err$response$data$Er2 === void 0 ? void 0 : _err$response$data$Er2.message) || (err === null || err === void 0 ? void 0 : err.message) || "Error fetching DigiLocker authorization URL"
|
|
51684
|
+
});
|
|
51685
|
+
});
|
|
51686
|
+
}, function (_wasThrown, _result) {
|
|
51687
|
+
setIsConsenting(false);
|
|
51688
|
+
if (_wasThrown) throw _result;
|
|
51689
|
+
return _result;
|
|
51690
|
+
});
|
|
51691
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
51692
|
+
} catch (e) {
|
|
51693
|
+
return Promise.reject(e);
|
|
51694
|
+
}
|
|
51695
|
+
};
|
|
51372
51696
|
const handleSendOtp = function () {
|
|
51373
51697
|
try {
|
|
51374
51698
|
if (!kNumber) {
|
|
@@ -51392,7 +51716,7 @@ const Step1_SearchConnection = _ref => {
|
|
|
51392
51716
|
businessService: "WS"
|
|
51393
51717
|
}).catch(() => null)).then(function (wsResponse) {
|
|
51394
51718
|
var _wsResponse$WaterConn;
|
|
51395
|
-
function
|
|
51719
|
+
function _temp3() {
|
|
51396
51720
|
var _connection, _connection$connectio, _connection$connectio2, _connection2;
|
|
51397
51721
|
if (!connection) {
|
|
51398
51722
|
setIsLoading(false);
|
|
@@ -51411,6 +51735,16 @@ const Step1_SearchConnection = _ref => {
|
|
|
51411
51735
|
});
|
|
51412
51736
|
return;
|
|
51413
51737
|
}
|
|
51738
|
+
if (isEditFlow) {
|
|
51739
|
+
setIsLoading(false);
|
|
51740
|
+
onNext({
|
|
51741
|
+
kNumber,
|
|
51742
|
+
mobileNumber: fetchedMobileNumber,
|
|
51743
|
+
serviceType: detectedServiceType,
|
|
51744
|
+
activeConnection: connection
|
|
51745
|
+
});
|
|
51746
|
+
return;
|
|
51747
|
+
}
|
|
51414
51748
|
const userType = Digit.UserService.getType().toUpperCase();
|
|
51415
51749
|
const payload = {
|
|
51416
51750
|
otp: {
|
|
@@ -51431,7 +51765,7 @@ const Step1_SearchConnection = _ref => {
|
|
|
51431
51765
|
});
|
|
51432
51766
|
}
|
|
51433
51767
|
let connection = wsResponse === null || wsResponse === void 0 ? void 0 : (_wsResponse$WaterConn = wsResponse.WaterConnection) === null || _wsResponse$WaterConn === void 0 ? void 0 : _wsResponse$WaterConn.find(c => c.applicationStatus === 'CONNECTION_ACTIVATED');
|
|
51434
|
-
const
|
|
51768
|
+
const _temp2 = function () {
|
|
51435
51769
|
if (!connection) {
|
|
51436
51770
|
return Promise.resolve(Digit.WSService.search({
|
|
51437
51771
|
tenantId,
|
|
@@ -51444,14 +51778,14 @@ const Step1_SearchConnection = _ref => {
|
|
|
51444
51778
|
});
|
|
51445
51779
|
}
|
|
51446
51780
|
}();
|
|
51447
|
-
return
|
|
51781
|
+
return _temp2 && _temp2.then ? _temp2.then(_temp3) : _temp3(_temp2);
|
|
51448
51782
|
});
|
|
51449
51783
|
}, function (err) {
|
|
51450
|
-
var _err$
|
|
51784
|
+
var _err$response2, _err$response2$data, _err$response2$data$E, _err$response2$data$E2;
|
|
51451
51785
|
setIsLoading(false);
|
|
51452
51786
|
setShowToast({
|
|
51453
51787
|
key: "error",
|
|
51454
|
-
message: (err === null || err === void 0 ? void 0 : (_err$
|
|
51788
|
+
message: (err === null || err === void 0 ? void 0 : (_err$response2 = err.response) === null || _err$response2 === void 0 ? void 0 : (_err$response2$data = _err$response2.data) === null || _err$response2$data === void 0 ? void 0 : (_err$response2$data$E = _err$response2$data.Errors) === null || _err$response2$data$E === void 0 ? void 0 : (_err$response2$data$E2 = _err$response2$data$E[0]) === null || _err$response2$data$E2 === void 0 ? void 0 : _err$response2$data$E2.message) || "Failed to send OTP"
|
|
51455
51789
|
});
|
|
51456
51790
|
}));
|
|
51457
51791
|
} catch (e) {
|
|
@@ -51486,7 +51820,7 @@ const Step1_SearchConnection = _ref => {
|
|
|
51486
51820
|
style: {
|
|
51487
51821
|
fontSize: isMobileView ? "13px" : undefined
|
|
51488
51822
|
}
|
|
51489
|
-
}, "Please enter your K Number to proceed with the mutation application. An OTP will be sent to the registered mobile number."), /*#__PURE__*/React__default.createElement("div", {
|
|
51823
|
+
}, isEditFlow ? "Please verify the K Number to proceed with the mutation edit." : "Please enter your K Number to proceed with the mutation application. An OTP will be sent to the registered mobile number."), /*#__PURE__*/React__default.createElement("div", {
|
|
51490
51824
|
style: {
|
|
51491
51825
|
marginBottom: "24px",
|
|
51492
51826
|
marginTop: "16px",
|
|
@@ -51513,6 +51847,11 @@ const Step1_SearchConnection = _ref => {
|
|
|
51513
51847
|
width: "100%"
|
|
51514
51848
|
},
|
|
51515
51849
|
disabled: isEditFlow
|
|
51850
|
+
})), !isEditFlow && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
51851
|
+
label: t("WS_LOGIN_WITH_DIGILOCKER") || "Login with DigiLocker",
|
|
51852
|
+
onSubmit: handleDigiLockerConsent,
|
|
51853
|
+
disabled: isConsenting,
|
|
51854
|
+
submit: true
|
|
51516
51855
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
51517
51856
|
style: {
|
|
51518
51857
|
display: "flex",
|
|
@@ -51534,7 +51873,7 @@ const Step1_SearchConnection = _ref => {
|
|
|
51534
51873
|
maxWidth: isMobileView ? "100%" : "200px",
|
|
51535
51874
|
fontSize: isMobileView ? "14px" : undefined
|
|
51536
51875
|
}
|
|
51537
|
-
}, isLoading ? "Sending OTP..." : "Send OTP →"))), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
51876
|
+
}, isLoading ? isEditFlow ? "Proceeding..." : "Sending OTP..." : isEditFlow ? "Proceed →" : "Send OTP →"))), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
51538
51877
|
error: showToast.key === "error",
|
|
51539
51878
|
warning: showToast.key === "warning",
|
|
51540
51879
|
label: showToast.message,
|
|
@@ -53472,7 +53811,7 @@ const Step5_Submission = _ref => {
|
|
|
53472
53811
|
};
|
|
53473
53812
|
|
|
53474
53813
|
const MutationApplication = () => {
|
|
53475
|
-
var _Digit$SessionStorage, _user$info,
|
|
53814
|
+
var _state, _state2, _state3, _Digit$SessionStorage, _user$info, _state4, _user$info2, _user$info2$userName, _user$info3, _user$info4, _details$applicationD, _applicationDetails$a, _applicationDetails$a2, _applicationDetails$a4, _applicationDetails$a8, _applicationDetails$a9;
|
|
53476
53815
|
const _useTranslation = reactI18next.useTranslation(),
|
|
53477
53816
|
t = _useTranslation.t;
|
|
53478
53817
|
const _useRouteMatch = reactRouterDom.useRouteMatch(),
|
|
@@ -53523,14 +53862,45 @@ const MutationApplication = () => {
|
|
|
53523
53862
|
authActiveConnection = _Digit$Hooks$useSessi6[0],
|
|
53524
53863
|
setAuthActiveConnection = _Digit$Hooks$useSessi6[1],
|
|
53525
53864
|
clearAuthActiveConnection = _Digit$Hooks$useSessi6[2];
|
|
53865
|
+
const _Digit$Hooks$useSessi7 = Digit.Hooks.useSessionStorage("MUTATION_EDIT_PARAMS", {}),
|
|
53866
|
+
persistedEditParams = _Digit$Hooks$useSessi7[0],
|
|
53867
|
+
setPersistedEditParams = _Digit$Hooks$useSessi7[1];
|
|
53526
53868
|
const user = Digit.UserService.getUser();
|
|
53527
|
-
|
|
53528
|
-
const
|
|
53529
|
-
const
|
|
53530
|
-
const
|
|
53869
|
+
const urlParams = new URLSearchParams(location.search);
|
|
53870
|
+
const urlAppNo = (filters === null || filters === void 0 ? void 0 : filters.applicationNumber) || urlParams.get("applicationNumber") || ((_state = state) === null || _state === void 0 ? void 0 : _state.id);
|
|
53871
|
+
const urlTenantId = (filters === null || filters === void 0 ? void 0 : filters.tenantId) || urlParams.get("tenantId") || ((_state2 = state) === null || _state2 === void 0 ? void 0 : _state2.tenantId);
|
|
53872
|
+
const urlService = (filters === null || filters === void 0 ? void 0 : filters.service) || urlParams.get("service") || ((_state3 = state) === null || _state3 === void 0 ? void 0 : _state3.service);
|
|
53873
|
+
React.useEffect(() => {
|
|
53874
|
+
if (location.pathname.endsWith("/search-connection") && !urlAppNo) {
|
|
53875
|
+
setPersistedEditParams({});
|
|
53876
|
+
} else if (urlAppNo || urlTenantId || urlService) {
|
|
53877
|
+
setPersistedEditParams({
|
|
53878
|
+
applicationNumber: urlAppNo || (persistedEditParams === null || persistedEditParams === void 0 ? void 0 : persistedEditParams.applicationNumber),
|
|
53879
|
+
tenantId: urlTenantId || (persistedEditParams === null || persistedEditParams === void 0 ? void 0 : persistedEditParams.tenantId),
|
|
53880
|
+
service: urlService || (persistedEditParams === null || persistedEditParams === void 0 ? void 0 : persistedEditParams.service)
|
|
53881
|
+
});
|
|
53882
|
+
}
|
|
53883
|
+
}, [urlAppNo, urlTenantId, urlService, location.pathname]);
|
|
53884
|
+
const applicationNumber = urlAppNo || (persistedEditParams === null || persistedEditParams === void 0 ? void 0 : persistedEditParams.applicationNumber);
|
|
53885
|
+
const serviceType = urlService || (persistedEditParams === null || persistedEditParams === void 0 ? void 0 : persistedEditParams.service);
|
|
53886
|
+
let tenantId = urlTenantId || (persistedEditParams === null || persistedEditParams === void 0 ? void 0 : persistedEditParams.tenantId) || ((_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code) || (user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.permanentCity) || Digit.ULBService.getCurrentTenantId();
|
|
53887
|
+
const details = cloneDeep_1((_state4 = state) === null || _state4 === void 0 ? void 0 : _state4.data);
|
|
53531
53888
|
const mobileNumber = user !== null && user !== void 0 && (_user$info2 = user.info) !== null && _user$info2 !== void 0 && (_user$info2$userName = _user$info2.userName) !== null && _user$info2$userName !== void 0 && _user$info2$userName.match(/^[0-9]{10}$/) ? user === null || user === void 0 ? void 0 : (_user$info3 = user.info) === null || _user$info3 === void 0 ? void 0 : _user$info3.userName : user === null || user === void 0 ? void 0 : (_user$info4 = user.info) === null || _user$info4 === void 0 ? void 0 : _user$info4.mobileNumber;
|
|
53532
53889
|
const hasStateData = !!(details !== null && details !== void 0 && (_details$applicationD = details.applicationData) !== null && _details$applicationD !== void 0 && _details$applicationD.id);
|
|
53890
|
+
React.useEffect(() => {
|
|
53891
|
+
if (location.pathname === path) {
|
|
53892
|
+
if (typeof clearFormData === "function") clearFormData();
|
|
53893
|
+
if (typeof clearSessionFormData === "function") clearSessionFormData();
|
|
53894
|
+
if (typeof clearCompletedSteps === "function") clearCompletedSteps();
|
|
53895
|
+
if (typeof clearAuthKNumber === "function") clearAuthKNumber();
|
|
53896
|
+
if (typeof clearAuthMobileNumber === "function") clearAuthMobileNumber();
|
|
53897
|
+
if (typeof clearAuthServiceType === "function") clearAuthServiceType();
|
|
53898
|
+
if (typeof clearAuthActiveConnection === "function") clearAuthActiveConnection();
|
|
53899
|
+
if (typeof setPersistedEditParams === "function") setPersistedEditParams({});
|
|
53900
|
+
}
|
|
53901
|
+
}, [location.pathname, path]);
|
|
53533
53902
|
const editApplicationNumber = (details === null || details === void 0 ? void 0 : details.applicationNo) || applicationNumber;
|
|
53903
|
+
console.log(editApplicationNumber, "editApplicationNumber");
|
|
53534
53904
|
const _useQuery = reactQuery.useQuery(["WORKFLOW_SEARCH", editApplicationNumber, tenantId], function () {
|
|
53535
53905
|
try {
|
|
53536
53906
|
return Promise.resolve(Digit.WorkflowService.getByBusinessId(tenantId, editApplicationNumber)).then(function (res) {
|
|
@@ -53545,8 +53915,9 @@ const MutationApplication = () => {
|
|
|
53545
53915
|
}),
|
|
53546
53916
|
isWorkflowLoading = _useQuery.isLoading,
|
|
53547
53917
|
workflowData = _useQuery.data;
|
|
53918
|
+
console.log(workflowData, "workflowData");
|
|
53548
53919
|
const isEmployee = window.location.href.includes("/employee/");
|
|
53549
|
-
const isEditFlow = !!editApplicationNumber && (
|
|
53920
|
+
const isEditFlow = !!editApplicationNumber && (!!urlAppNo || (workflowData === null || workflowData === void 0 ? void 0 : workflowData.businessService) === "mutationWSConnection" || (workflowData === null || workflowData === void 0 ? void 0 : workflowData.action) === "SEND_BACK_TO_CITIZEN");
|
|
53550
53921
|
const querySearchParam = isEditFlow ? editApplicationNumber : authKNumber;
|
|
53551
53922
|
const fallbackServiceType = serviceType || authServiceType;
|
|
53552
53923
|
const businessService = (fallbackServiceType === null || fallbackServiceType === void 0 ? void 0 : fallbackServiceType.toUpperCase()) === "SEWERAGE" ? "SW" : "WS";
|
|
@@ -53575,8 +53946,8 @@ const MutationApplication = () => {
|
|
|
53575
53946
|
}
|
|
53576
53947
|
return wsData ? {
|
|
53577
53948
|
applicationData: wsData,
|
|
53578
|
-
WaterConnection:
|
|
53579
|
-
SewerageConnections:
|
|
53949
|
+
WaterConnection: [wsData],
|
|
53950
|
+
SewerageConnections: [wsData],
|
|
53580
53951
|
propertyDetails: null,
|
|
53581
53952
|
processInstancesDetails: []
|
|
53582
53953
|
} : null;
|
|
@@ -53607,10 +53978,10 @@ const MutationApplication = () => {
|
|
|
53607
53978
|
}),
|
|
53608
53979
|
propertyDetails = _Digit$Hooks$pt$usePr.data,
|
|
53609
53980
|
isPropertyLoading = _Digit$Hooks$pt$usePr.isLoading;
|
|
53610
|
-
const _Digit$Hooks$
|
|
53611
|
-
sessionFormData = _Digit$Hooks$
|
|
53612
|
-
setSessionFormData = _Digit$Hooks$
|
|
53613
|
-
clearSessionFormData = _Digit$Hooks$
|
|
53981
|
+
const _Digit$Hooks$useSessi8 = Digit.Hooks.useSessionStorage("PT_CREATE_EMP_WS_NEW_FORM", {}),
|
|
53982
|
+
sessionFormData = _Digit$Hooks$useSessi8[0],
|
|
53983
|
+
setSessionFormData = _Digit$Hooks$useSessi8[1],
|
|
53984
|
+
clearSessionFormData = _Digit$Hooks$useSessi8[2];
|
|
53614
53985
|
React.useEffect(() => {
|
|
53615
53986
|
var _applicationDetails$a3;
|
|
53616
53987
|
const fetchAppData = function () {
|
|
@@ -53808,6 +54179,7 @@ const MutationApplication = () => {
|
|
|
53808
54179
|
let updatePayload = _extends({}, convertAppData, {
|
|
53809
54180
|
id: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a6 = applicationDetails.applicationData) === null || _applicationDetails$a6 === void 0 ? void 0 : _applicationDetails$a6.id,
|
|
53810
54181
|
applicationNo: editApplicationNumber,
|
|
54182
|
+
action: "RESUBMIT_APPLICATION",
|
|
53811
54183
|
processInstance: _extends({}, applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a7 = applicationDetails.applicationData) === null || _applicationDetails$a7 === void 0 ? void 0 : _applicationDetails$a7.processInstance, convertAppData === null || convertAppData === void 0 ? void 0 : convertAppData.processInstance, {
|
|
53812
54184
|
action: "RESUBMIT_APPLICATION"
|
|
53813
54185
|
})
|
|
@@ -54073,7 +54445,13 @@ const MutationApplication = () => {
|
|
|
54073
54445
|
}
|
|
54074
54446
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Switch, null, /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
54075
54447
|
path: path + "/search-connection"
|
|
54076
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
54448
|
+
}, isEditFlow ? /*#__PURE__*/React__default.createElement(reactRouterDom.Redirect, {
|
|
54449
|
+
to: {
|
|
54450
|
+
pathname: path + "/consumer-details",
|
|
54451
|
+
search: location.search,
|
|
54452
|
+
state: location.state
|
|
54453
|
+
}
|
|
54454
|
+
}) : /*#__PURE__*/React__default.createElement(Step1_SearchConnection, {
|
|
54077
54455
|
t: t,
|
|
54078
54456
|
defaultKNumber: isEditFlow ? applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a8 = applicationDetails.applicationData) === null || _applicationDetails$a8 === void 0 ? void 0 : _applicationDetails$a8.connectionNo : "",
|
|
54079
54457
|
isEditFlow: isEditFlow,
|
|
@@ -54091,7 +54469,13 @@ const MutationApplication = () => {
|
|
|
54091
54469
|
}
|
|
54092
54470
|
})), /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
54093
54471
|
path: path + "/existing-connection"
|
|
54094
|
-
},
|
|
54472
|
+
}, isEditFlow ? /*#__PURE__*/React__default.createElement(reactRouterDom.Redirect, {
|
|
54473
|
+
to: {
|
|
54474
|
+
pathname: path + "/consumer-details",
|
|
54475
|
+
search: location.search,
|
|
54476
|
+
state: location.state
|
|
54477
|
+
}
|
|
54478
|
+
}) : /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(Step1_ExistingConnection, {
|
|
54095
54479
|
t: t,
|
|
54096
54480
|
applicationDetails: authActiveConnection ? {
|
|
54097
54481
|
applicationData: authActiveConnection
|
|
@@ -54146,7 +54530,11 @@ const MutationApplication = () => {
|
|
|
54146
54530
|
exact: true,
|
|
54147
54531
|
path: path
|
|
54148
54532
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Redirect, {
|
|
54149
|
-
to:
|
|
54533
|
+
to: {
|
|
54534
|
+
pathname: isEditFlow ? path + "/consumer-details" : path + "/search-connection",
|
|
54535
|
+
search: location.search,
|
|
54536
|
+
state: location.state
|
|
54537
|
+
}
|
|
54150
54538
|
}))), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
54151
54539
|
error: (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error",
|
|
54152
54540
|
warning: (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "warning",
|
|
@@ -55931,7 +56319,7 @@ const openFilePDF = fileId => {
|
|
|
55931
56319
|
}).catch(error => console.error("Error fetching file:", error));
|
|
55932
56320
|
};
|
|
55933
56321
|
const CheckPage$4 = _ref2 => {
|
|
55934
|
-
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;
|
|
56322
|
+
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;
|
|
55935
56323
|
let data = _ref2.data,
|
|
55936
56324
|
onSubmit = _ref2.onSubmit,
|
|
55937
56325
|
onEdit = _ref2.onEdit;
|
|
@@ -56011,6 +56399,7 @@ const CheckPage$4 = _ref2 => {
|
|
|
56011
56399
|
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) || [];
|
|
56012
56400
|
const declaration = (data === null || data === void 0 ? void 0 : data.declarationData) || (data === null || data === void 0 ? void 0 : data.declaration) || {};
|
|
56013
56401
|
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) || {};
|
|
56402
|
+
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) || {};
|
|
56014
56403
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
56015
56404
|
className: "overflow-y-scroll"
|
|
56016
56405
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, null, t("WS_COMMON_SUMMARY")), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("WS_COMMON_PROPERTY_DETAILS")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
|
|
@@ -56238,7 +56627,15 @@ const CheckPage$4 = _ref2 => {
|
|
|
56238
56627
|
},
|
|
56239
56628
|
onClick: () => openFilePDF(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document)
|
|
56240
56629
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.GenericFileIcon, null), " ", t("CS_COMMON_VIEW"))
|
|
56241
|
-
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null,
|
|
56630
|
+
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, "Divyangjan/Person with Disability?"), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
|
|
56631
|
+
style: {
|
|
56632
|
+
marginTop: "10px",
|
|
56633
|
+
marginBottom: "30px"
|
|
56634
|
+
}
|
|
56635
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
56636
|
+
label: "Divyangjan/Person with Disability?",
|
|
56637
|
+
text: disability !== null && disability !== void 0 && disability.isDivyangjan ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO")
|
|
56638
|
+
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("WS_BANK_DETAILS")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
|
|
56242
56639
|
style: {
|
|
56243
56640
|
marginTop: "10px",
|
|
56244
56641
|
marginBottom: "30px"
|
|
@@ -56381,6 +56778,7 @@ const OLDApplication = () => {
|
|
|
56381
56778
|
const _useTranslation = reactI18next.useTranslation(),
|
|
56382
56779
|
t = _useTranslation.t;
|
|
56383
56780
|
const history = reactRouterDom.useHistory();
|
|
56781
|
+
const location = reactRouterDom.useLocation();
|
|
56384
56782
|
const _useState = React.useState(false),
|
|
56385
56783
|
isEnableLoader = _useState[0],
|
|
56386
56784
|
setIsEnableLoader = _useState[1];
|
|
@@ -56429,9 +56827,12 @@ const OLDApplication = () => {
|
|
|
56429
56827
|
let _Digit$Hooks$ws$useWS = Digit.Hooks.ws.useWSConfigMDMS.WSCreateConfig(stateId, {}),
|
|
56430
56828
|
newConfig = _Digit$Hooks$ws$useWS.data,
|
|
56431
56829
|
isLoading = _Digit$Hooks$ws$useWS.isLoading;
|
|
56432
|
-
const
|
|
56830
|
+
const requestedPropertyId = new URLSearchParams(location.search).get("propertyId");
|
|
56831
|
+
const _useState5 = React.useState(requestedPropertyId),
|
|
56433
56832
|
propertyId = _useState5[0],
|
|
56434
56833
|
setPropertyId = _useState5[1];
|
|
56834
|
+
const initialPropertyId = React.useRef(requestedPropertyId);
|
|
56835
|
+
const verifiedPropertyId = React.useRef(sessionStorage.getItem("WS_OTP_VERIFIED_PROPERTY_ID"));
|
|
56435
56836
|
const _Digit$Hooks$useSessi = Digit.Hooks.useSessionStorage("PT_CREATE_EMP_WS_NEW_FORM", {}),
|
|
56436
56837
|
sessionFormData = _Digit$Hooks$useSessi[0],
|
|
56437
56838
|
setSessionFormData = _Digit$Hooks$useSessi[1],
|
|
@@ -56446,9 +56847,16 @@ const OLDApplication = () => {
|
|
|
56446
56847
|
propertyIds: propertyId
|
|
56447
56848
|
},
|
|
56448
56849
|
tenantId: tenantId,
|
|
56449
|
-
enabled: propertyId && propertyId
|
|
56850
|
+
enabled: propertyId && propertyId === requestedPropertyId && propertyId === verifiedPropertyId.current
|
|
56450
56851
|
}),
|
|
56451
56852
|
propertyDetails = _Digit$Hooks$pt$usePr.data;
|
|
56853
|
+
React.useEffect(() => {
|
|
56854
|
+
if (requestedPropertyId !== initialPropertyId.current || requestedPropertyId && requestedPropertyId !== verifiedPropertyId.current) {
|
|
56855
|
+
clearSessionFormData();
|
|
56856
|
+
sessionStorage.removeItem("WS_OTP_VERIFIED_PROPERTY_ID");
|
|
56857
|
+
history.replace("/digit-ui/employee/ws/info");
|
|
56858
|
+
}
|
|
56859
|
+
}, [clearSessionFormData, history, requestedPropertyId]);
|
|
56452
56860
|
React.useEffect(() => {
|
|
56453
56861
|
sessionStorage.removeItem("FORMSTATE_ERRORS");
|
|
56454
56862
|
}, []);
|
|
@@ -56458,7 +56866,7 @@ const OLDApplication = () => {
|
|
|
56458
56866
|
if (config) {
|
|
56459
56867
|
var _config$body;
|
|
56460
56868
|
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)) || [];
|
|
56461
|
-
const desiredComponentOrder = ["CPTPropertySearchNSummary", "WSConnectionDetails", "WSConnectionHolderDetails", "WSPropertyLocationDetails", "PropertyWaterConnection", "WSDjbEmployee", "WSActivationPlumberDetails", "WSRoadCuttingDetails", "WSBankDetails", "WSDocumentsEmployee", "WSDeclaration"];
|
|
56869
|
+
const desiredComponentOrder = ["CPTPropertySearchNSummary", "WSConnectionDetails", "WSConnectionHolderDetails", "WSPropertyLocationDetails", "PropertyWaterConnection", "WSDjbEmployee", "WSDivyangjan", "WSActivationPlumberDetails", "WSRoadCuttingDetails", "WSBankDetails", "WSDocumentsEmployee", "WSDeclaration"];
|
|
56462
56870
|
const reorderedBody = [];
|
|
56463
56871
|
desiredComponentOrder.forEach(compName => {
|
|
56464
56872
|
const section = allCreateSections.find(s => {
|
|
@@ -56524,6 +56932,19 @@ const OLDApplication = () => {
|
|
|
56524
56932
|
withoutLabel: true
|
|
56525
56933
|
}]
|
|
56526
56934
|
});
|
|
56935
|
+
} else if (compName === "WSDivyangjan") {
|
|
56936
|
+
reorderedBody.push({
|
|
56937
|
+
isCreateConnection: true,
|
|
56938
|
+
body: [{
|
|
56939
|
+
type: "component",
|
|
56940
|
+
key: "disability",
|
|
56941
|
+
component: "WSDivyangjan",
|
|
56942
|
+
withoutLabel: true,
|
|
56943
|
+
texts: {
|
|
56944
|
+
header: "Divyangjan/Person with Disability?"
|
|
56945
|
+
}
|
|
56946
|
+
}]
|
|
56947
|
+
});
|
|
56527
56948
|
}
|
|
56528
56949
|
});
|
|
56529
56950
|
allCreateSections.forEach(section => {
|
|
@@ -56788,6 +57209,7 @@ const OLDApplication = () => {
|
|
|
56788
57209
|
try {
|
|
56789
57210
|
var _waterUpdateData$Wate, _waterUpdateData$Wate2, _sewerageUpdateData$S, _sewerageUpdateData$S2;
|
|
56790
57211
|
clearSessionFormData();
|
|
57212
|
+
sessionStorage.removeItem("WS_OTP_VERIFIED_PROPERTY_ID");
|
|
56791
57213
|
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));
|
|
56792
57214
|
return Promise.resolve();
|
|
56793
57215
|
} catch (e) {
|
|
@@ -56851,6 +57273,7 @@ const OLDApplication = () => {
|
|
|
56851
57273
|
onSuccess: data => {
|
|
56852
57274
|
var _data$WaterConnection2, _data$WaterConnection3;
|
|
56853
57275
|
clearSessionFormData();
|
|
57276
|
+
sessionStorage.removeItem("WS_OTP_VERIFIED_PROPERTY_ID");
|
|
56854
57277
|
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));
|
|
56855
57278
|
}
|
|
56856
57279
|
});
|
|
@@ -56899,6 +57322,7 @@ const OLDApplication = () => {
|
|
|
56899
57322
|
onSuccess: data => {
|
|
56900
57323
|
var _data$SewerageConnect2, _data$SewerageConnect3;
|
|
56901
57324
|
clearSessionFormData();
|
|
57325
|
+
sessionStorage.removeItem("WS_OTP_VERIFIED_PROPERTY_ID");
|
|
56902
57326
|
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));
|
|
56903
57327
|
}
|
|
56904
57328
|
})).then(function () {});
|
|
@@ -57124,7 +57548,8 @@ const componentsToRegister = {
|
|
|
57124
57548
|
WSSearchIntegrated: SearchIntegrated,
|
|
57125
57549
|
WSSearchWaterConnectionViewIntegrated: SearchWaterConnectionViewIntegrated,
|
|
57126
57550
|
WSBulkBillGeneration: BulkBillGeneration,
|
|
57127
|
-
WSOLDApplication: OLDApplication
|
|
57551
|
+
WSOLDApplication: OLDApplication,
|
|
57552
|
+
WSDivyangjan: WSDivyangjan
|
|
57128
57553
|
};
|
|
57129
57554
|
const initWSComponents = () => {
|
|
57130
57555
|
Object.entries(componentsToRegister).forEach(_ref3 => {
|