@djb25/digit-ui-module-ws 1.0.73 → 1.0.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +243 -70
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +244 -71
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9100,7 +9100,9 @@ const App = _ref => {
|
|
|
9100
9100
|
component: WSCitizenEditApplication
|
|
9101
9101
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
9102
9102
|
path: path + "/old-application",
|
|
9103
|
-
component:
|
|
9103
|
+
component: () => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
|
|
9104
|
+
layoutClass: "action"
|
|
9105
|
+
}, /*#__PURE__*/React__default.createElement(WSOLDApplication, null))
|
|
9104
9106
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
9105
9107
|
path: path + "/info",
|
|
9106
9108
|
component: WSInfoPage
|
|
@@ -11119,7 +11121,9 @@ const App$1 = _ref2 => {
|
|
|
11119
11121
|
component: WSModifyApplicationDetails
|
|
11120
11122
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
11121
11123
|
path: path + "/connection-details",
|
|
11122
|
-
component:
|
|
11124
|
+
component: () => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
|
|
11125
|
+
layoutClass: "action"
|
|
11126
|
+
}, /*#__PURE__*/React__default.createElement(WSGetConnectionDetails, null))
|
|
11123
11127
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
11124
11128
|
path: path + "/bill-amendment",
|
|
11125
11129
|
component: () => /*#__PURE__*/React__default.createElement(WSApplicationBillAmendment, {
|
|
@@ -17966,7 +17970,7 @@ const WSDocumentsEmployee = _ref => {
|
|
|
17966
17970
|
}));
|
|
17967
17971
|
};
|
|
17968
17972
|
function SelectDocument(_ref2) {
|
|
17969
|
-
var _formData$ConnectionD, _doc$i18nKey, _doc$i18nKey2, _doc$i18nKey3;
|
|
17973
|
+
var _formData$ConnectionD, _doc$i18nKey, _selectedDocument$cod2, _selectedDocument$cod3, _selectedDocument$cod4, _selectedDocument$cod5, _selectedDocument$cod6, _selectedDocument$cod7, _selectedDocument$cod8, _selectedDocument$cod9, _selectedDocument$cod0, _selectedDocument$cod1, _selectedDocument$cod10, _selectedDocument$cod11, _selectedDocument$cod12, _selectedDocument$cod13, _selectedDocument$cod14, _selectedDocument$cod15, _doc$i18nKey2, _doc$i18nKey3;
|
|
17970
17974
|
let t = _ref2.t,
|
|
17971
17975
|
doc = _ref2.document,
|
|
17972
17976
|
setDocuments = _ref2.setDocuments,
|
|
@@ -18029,6 +18033,29 @@ function SelectDocument(_ref2) {
|
|
|
18029
18033
|
const _useState13 = React.useState(false),
|
|
18030
18034
|
digiLockerUpload = _useState13[0],
|
|
18031
18035
|
setDigilockerUpload = _useState13[1];
|
|
18036
|
+
const _useState14 = React.useState(null),
|
|
18037
|
+
docNumberError = _useState14[0],
|
|
18038
|
+
setDocNumberError = _useState14[1];
|
|
18039
|
+
const validateDocumentNumber = (value, docTypeCode, isReq, hasFile) => {
|
|
18040
|
+
if (!isReq && !hasFile && (!value || !value.trim())) return null;
|
|
18041
|
+
if (!value || !value.trim()) return t("WS_DOCUMENT_NUMBER_REQUIRED") || "Document number is required";
|
|
18042
|
+
const trimmed = value.trim();
|
|
18043
|
+
const upperCode = (docTypeCode || "").toUpperCase();
|
|
18044
|
+
if (upperCode.includes("AADHAAR") || upperCode.includes("AADHAR")) {
|
|
18045
|
+
if (!/^\d{12}$/.test(trimmed)) return t("WS_AADHAAR_VALIDATION_ERROR") || "Aadhaar number must be exactly 12 digits";
|
|
18046
|
+
} else if (upperCode.includes("PAN")) {
|
|
18047
|
+
if (!/^[A-Z]{5}[0-9]{4}[A-Z]{1}$/.test(trimmed.toUpperCase())) return t("WS_PAN_VALIDATION_ERROR") || "PAN must be in format ABCDE1234F";
|
|
18048
|
+
} else if (upperCode.includes("VOTER") || upperCode.includes("VOTERID")) {
|
|
18049
|
+
if (!/^[A-Z]{3}\d{7}$/.test(trimmed.toUpperCase())) return t("WS_VOTERID_VALIDATION_ERROR") || "Voter ID must be in format ABC1234567";
|
|
18050
|
+
} else if (upperCode.includes("DRIVING") || upperCode.includes("DRVLC")) {
|
|
18051
|
+
if (!/^[A-Z]{2}\d{13}$/.test(trimmed.toUpperCase())) return t("WS_DRIVING_LICENSE_VALIDATION_ERROR") || "Driving License must be 15 characters (e.g. MH1420110012345)";
|
|
18052
|
+
} else if (upperCode.includes("PASSPORT")) {
|
|
18053
|
+
if (!/^[A-Z]{1}\d{7}$/.test(trimmed.toUpperCase())) return t("WS_PASSPORT_VALIDATION_ERROR") || "Passport must be 8 characters (e.g. A1234567)";
|
|
18054
|
+
} else {
|
|
18055
|
+
if (trimmed.length < 3) return t("WS_DOC_NO_MIN_LENGTH") || "Document number must be at least 3 characters";
|
|
18056
|
+
}
|
|
18057
|
+
return null;
|
|
18058
|
+
};
|
|
18032
18059
|
React.useEffect(() => {
|
|
18033
18060
|
const eligible = isDigiLockerEligible((selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) || "");
|
|
18034
18061
|
setDigilockerUpload(eligible);
|
|
@@ -18094,8 +18121,8 @@ function SelectDocument(_ref2) {
|
|
|
18094
18121
|
}
|
|
18095
18122
|
const dropdownData = doc.dropdownData;
|
|
18096
18123
|
var dropDownData = dropdownData;
|
|
18097
|
-
const
|
|
18098
|
-
isHidden =
|
|
18124
|
+
const _useState15 = React.useState(false),
|
|
18125
|
+
isHidden = _useState15[0];
|
|
18099
18126
|
const addError = () => {
|
|
18100
18127
|
var _formState$errors, _formState$errors$con;
|
|
18101
18128
|
let type = formState === null || formState === void 0 ? void 0 : (_formState$errors = formState.errors) === null || _formState$errors === void 0 ? void 0 : (_formState$errors$con = _formState$errors[config.key]) === null || _formState$errors$con === void 0 ? void 0 : _formState$errors$con.type;
|
|
@@ -18143,10 +18170,15 @@ function SelectDocument(_ref2) {
|
|
|
18143
18170
|
return data;
|
|
18144
18171
|
});
|
|
18145
18172
|
}
|
|
18173
|
+
const err = validateDocumentNumber(documentUid, selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code, doc === null || doc === void 0 ? void 0 : doc.required, !!uploadedFile);
|
|
18146
18174
|
if (!isHidden) {
|
|
18147
|
-
if ((!uploadedFile || !(selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.code)) && doc !== null && doc !== void 0 && doc.required) {
|
|
18175
|
+
if ((!uploadedFile || !(selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.code) || err) && doc !== null && doc !== void 0 && doc.required) {
|
|
18148
18176
|
addError();
|
|
18149
|
-
} else if (
|
|
18177
|
+
} else if (err) {
|
|
18178
|
+
addError();
|
|
18179
|
+
} else if (uploadedFile && selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.code && !err) {
|
|
18180
|
+
removeError();
|
|
18181
|
+
} else if (!(doc !== null && doc !== void 0 && doc.required) && !err) {
|
|
18150
18182
|
removeError();
|
|
18151
18183
|
}
|
|
18152
18184
|
} else if (isHidden) {
|
|
@@ -18216,7 +18248,17 @@ function SelectDocument(_ref2) {
|
|
|
18216
18248
|
width: "100%",
|
|
18217
18249
|
marginBottom: "20px"
|
|
18218
18250
|
}
|
|
18219
|
-
}, doc !== null && doc !== void 0 && doc.hasDropdown ? /*#__PURE__*/React__default.createElement(
|
|
18251
|
+
}, doc !== null && doc !== void 0 && doc.hasDropdown ? /*#__PURE__*/React__default.createElement("div", {
|
|
18252
|
+
style: {
|
|
18253
|
+
display: "flex",
|
|
18254
|
+
flexDirection: "column",
|
|
18255
|
+
gap: "8px"
|
|
18256
|
+
}
|
|
18257
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
18258
|
+
style: {
|
|
18259
|
+
margin: 0
|
|
18260
|
+
}
|
|
18261
|
+
}, doc !== null && doc !== void 0 && doc.required ? t(doc === null || doc === void 0 ? void 0 : doc.i18nKey) + "*" : "" + t(doc === null || doc === void 0 ? void 0 : doc.i18nKey)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
18220
18262
|
id: "doc-" + (doc === null || doc === void 0 ? void 0 : doc.code),
|
|
18221
18263
|
key: "doc-" + (doc === null || doc === void 0 ? void 0 : doc.code),
|
|
18222
18264
|
className: "form-field",
|
|
@@ -18230,13 +18272,36 @@ function SelectDocument(_ref2) {
|
|
|
18230
18272
|
select: handleSelectDocument,
|
|
18231
18273
|
optionKey: "i18nKey",
|
|
18232
18274
|
t: t
|
|
18233
|
-
})) : null, (doc === null || doc === void 0 ? void 0 : doc.code) !== "OWNER.APPLICANTPHOTO" && /*#__PURE__*/React__default.createElement(
|
|
18275
|
+
})) : null, (doc === null || doc === void 0 ? void 0 : doc.code) !== "OWNER.APPLICANTPHOTO" && /*#__PURE__*/React__default.createElement("div", {
|
|
18276
|
+
style: {
|
|
18277
|
+
display: "flex",
|
|
18278
|
+
flexDirection: "column",
|
|
18279
|
+
gap: "8px"
|
|
18280
|
+
}
|
|
18281
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
18282
|
+
style: {
|
|
18283
|
+
margin: 0
|
|
18284
|
+
}
|
|
18285
|
+
}, t((doc === null || doc === void 0 ? void 0 : (_doc$i18nKey = doc.i18nKey) === null || _doc$i18nKey === void 0 ? void 0 : _doc$i18nKey.replaceAll(".", "_")) + "_DOCUMENT_NO")), /*#__PURE__*/React__default.createElement("div", {
|
|
18234
18286
|
className: "field"
|
|
18235
18287
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
18236
18288
|
type: "text",
|
|
18237
18289
|
value: documentUid,
|
|
18238
18290
|
onChange: e => {
|
|
18239
|
-
if (!isDocumentUidLocked)
|
|
18291
|
+
if (!isDocumentUidLocked) {
|
|
18292
|
+
var _selectedDocument$cod;
|
|
18293
|
+
let val = e.target.value;
|
|
18294
|
+
const upperCode = (selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod = selectedDocument.code) === null || _selectedDocument$cod === void 0 ? void 0 : _selectedDocument$cod.toUpperCase()) || "";
|
|
18295
|
+
const maxLen = upperCode.includes("AADHAAR") || upperCode.includes("AADHAR") ? 12 : upperCode.includes("PAN") ? 10 : upperCode.includes("VOTER") || upperCode.includes("VOTERID") ? 10 : upperCode.includes("DRIVING") || upperCode.includes("DRVLC") ? 15 : upperCode.includes("PASSPORT") ? 8 : 64;
|
|
18296
|
+
if (val.length > maxLen) {
|
|
18297
|
+
val = val.substring(0, maxLen);
|
|
18298
|
+
}
|
|
18299
|
+
setDocumentUid(val);
|
|
18300
|
+
setDocNumberError(null);
|
|
18301
|
+
}
|
|
18302
|
+
},
|
|
18303
|
+
onBlur: () => {
|
|
18304
|
+
setDocNumberError(validateDocumentNumber(documentUid, selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code, doc === null || doc === void 0 ? void 0 : doc.required, !!uploadedFile));
|
|
18240
18305
|
},
|
|
18241
18306
|
placeholder: t("WS_IDENTITY_NO_PLACEHOLDER"),
|
|
18242
18307
|
disabled: isDocumentUidLocked,
|
|
@@ -18244,8 +18309,58 @@ function SelectDocument(_ref2) {
|
|
|
18244
18309
|
backgroundColor: "#f0f0f0",
|
|
18245
18310
|
cursor: "not-allowed",
|
|
18246
18311
|
color: "#555"
|
|
18247
|
-
} : {
|
|
18248
|
-
|
|
18312
|
+
} : docNumberError ? {
|
|
18313
|
+
border: "1px solid #d32f2f"
|
|
18314
|
+
} : {},
|
|
18315
|
+
maxLength: selectedDocument !== null && selectedDocument !== void 0 && (_selectedDocument$cod2 = selectedDocument.code) !== null && _selectedDocument$cod2 !== void 0 && _selectedDocument$cod2.toUpperCase().includes("AADHAAR") || selectedDocument !== null && selectedDocument !== void 0 && (_selectedDocument$cod3 = selectedDocument.code) !== null && _selectedDocument$cod3 !== void 0 && _selectedDocument$cod3.toUpperCase().includes("AADHAR") ? 12 : selectedDocument !== null && selectedDocument !== void 0 && (_selectedDocument$cod4 = selectedDocument.code) !== null && _selectedDocument$cod4 !== void 0 && _selectedDocument$cod4.toUpperCase().includes("PAN") ? 10 : selectedDocument !== null && selectedDocument !== void 0 && (_selectedDocument$cod5 = selectedDocument.code) !== null && _selectedDocument$cod5 !== void 0 && _selectedDocument$cod5.toUpperCase().includes("VOTER") || selectedDocument !== null && selectedDocument !== void 0 && (_selectedDocument$cod6 = selectedDocument.code) !== null && _selectedDocument$cod6 !== void 0 && _selectedDocument$cod6.toUpperCase().includes("VOTERID") ? 10 : selectedDocument !== null && selectedDocument !== void 0 && (_selectedDocument$cod7 = selectedDocument.code) !== null && _selectedDocument$cod7 !== void 0 && _selectedDocument$cod7.toUpperCase().includes("DRIVING") || selectedDocument !== null && selectedDocument !== void 0 && (_selectedDocument$cod8 = selectedDocument.code) !== null && _selectedDocument$cod8 !== void 0 && _selectedDocument$cod8.toUpperCase().includes("DRVLC") ? 15 : selectedDocument !== null && selectedDocument !== void 0 && (_selectedDocument$cod9 = selectedDocument.code) !== null && _selectedDocument$cod9 !== void 0 && _selectedDocument$cod9.toUpperCase().includes("PASSPORT") ? 8 : 64
|
|
18316
|
+
}), docNumberError && /*#__PURE__*/React__default.createElement("div", {
|
|
18317
|
+
style: {
|
|
18318
|
+
fontSize: "12px",
|
|
18319
|
+
color: "#d32f2f",
|
|
18320
|
+
marginTop: "4px"
|
|
18321
|
+
}
|
|
18322
|
+
}, docNumberError), ((selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod0 = selectedDocument.code) === null || _selectedDocument$cod0 === void 0 ? void 0 : _selectedDocument$cod0.toUpperCase().includes("AADHAAR")) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod1 = selectedDocument.code) === null || _selectedDocument$cod1 === void 0 ? void 0 : _selectedDocument$cod1.toUpperCase().includes("AADHAR"))) && !docNumberError && /*#__PURE__*/React__default.createElement("div", {
|
|
18323
|
+
style: {
|
|
18324
|
+
fontSize: "11px",
|
|
18325
|
+
color: "#000000",
|
|
18326
|
+
marginTop: "4px"
|
|
18327
|
+
}
|
|
18328
|
+
}, t("WS_AADHAAR_VALIDATION_ERROR") || "Format: 12-digit numeric (e.g. 123456789012)"), (selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod10 = selectedDocument.code) === null || _selectedDocument$cod10 === void 0 ? void 0 : _selectedDocument$cod10.toUpperCase().includes("PAN")) && !docNumberError && /*#__PURE__*/React__default.createElement("div", {
|
|
18329
|
+
style: {
|
|
18330
|
+
fontSize: "11px",
|
|
18331
|
+
color: "#000000",
|
|
18332
|
+
marginTop: "4px"
|
|
18333
|
+
}
|
|
18334
|
+
}, t("WS_PAN_VALIDATION_ERROR") || "Format: ABCDE1234F"), ((selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod11 = selectedDocument.code) === null || _selectedDocument$cod11 === void 0 ? void 0 : _selectedDocument$cod11.toUpperCase().includes("VOTER")) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod12 = selectedDocument.code) === null || _selectedDocument$cod12 === void 0 ? void 0 : _selectedDocument$cod12.toUpperCase().includes("VOTERID"))) && !docNumberError && /*#__PURE__*/React__default.createElement("div", {
|
|
18335
|
+
style: {
|
|
18336
|
+
fontSize: "11px",
|
|
18337
|
+
color: "#000000",
|
|
18338
|
+
marginTop: "4px"
|
|
18339
|
+
}
|
|
18340
|
+
}, t("WS_VOTERID_VALIDATION_ERROR") || "Format: ABC1234567"), ((selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod13 = selectedDocument.code) === null || _selectedDocument$cod13 === void 0 ? void 0 : _selectedDocument$cod13.toUpperCase().includes("DRIVING")) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod14 = selectedDocument.code) === null || _selectedDocument$cod14 === void 0 ? void 0 : _selectedDocument$cod14.toUpperCase().includes("DRVLC"))) && !docNumberError && /*#__PURE__*/React__default.createElement("div", {
|
|
18341
|
+
style: {
|
|
18342
|
+
fontSize: "11px",
|
|
18343
|
+
color: "#000000",
|
|
18344
|
+
marginTop: "4px"
|
|
18345
|
+
}
|
|
18346
|
+
}, t("WS_DRIVING_LICENSE_VALIDATION_ERROR") || "Format: MH1420110012345"), (selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod15 = selectedDocument.code) === null || _selectedDocument$cod15 === void 0 ? void 0 : _selectedDocument$cod15.toUpperCase().includes("PASSPORT")) && !docNumberError && /*#__PURE__*/React__default.createElement("div", {
|
|
18347
|
+
style: {
|
|
18348
|
+
fontSize: "11px",
|
|
18349
|
+
color: "#000000",
|
|
18350
|
+
marginTop: "4px"
|
|
18351
|
+
}
|
|
18352
|
+
}, t("WS_PASSPORT_VALIDATION_ERROR") || "Format: A1234567"))), /*#__PURE__*/React__default.createElement("div", {
|
|
18353
|
+
style: {
|
|
18354
|
+
display: "flex",
|
|
18355
|
+
flexDirection: "column",
|
|
18356
|
+
gap: "8px",
|
|
18357
|
+
gridColumn: "span 1"
|
|
18358
|
+
}
|
|
18359
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
18360
|
+
style: {
|
|
18361
|
+
margin: 0
|
|
18362
|
+
}
|
|
18363
|
+
}, doc !== null && doc !== void 0 && doc.required ? t((doc === null || doc === void 0 ? void 0 : (_doc$i18nKey2 = doc.i18nKey) === null || _doc$i18nKey2 === void 0 ? void 0 : _doc$i18nKey2.replaceAll(".", "_")) + "_UPLOAD_DOCUMENT") + "*" : "" + t((doc === null || doc === void 0 ? void 0 : (_doc$i18nKey3 = doc.i18nKey) === null || _doc$i18nKey3 === void 0 ? void 0 : _doc$i18nKey3.replaceAll(".", "_")) + "_UPLOAD_DOCUMENT")), /*#__PURE__*/React__default.createElement("div", {
|
|
18249
18364
|
className: "field",
|
|
18250
18365
|
style: {
|
|
18251
18366
|
display: "flex",
|
|
@@ -18316,19 +18431,25 @@ function SelectDocument(_ref2) {
|
|
|
18316
18431
|
setIsDocumentUidLocked(false);
|
|
18317
18432
|
setDocumentUid("");
|
|
18318
18433
|
}
|
|
18319
|
-
})),
|
|
18320
|
-
onClick: viewDocument,
|
|
18434
|
+
})))), /*#__PURE__*/React__default.createElement("div", {
|
|
18321
18435
|
style: {
|
|
18322
|
-
|
|
18436
|
+
display: "flex",
|
|
18437
|
+
flexDirection: "column",
|
|
18438
|
+
gap: "8px",
|
|
18439
|
+
gridColumn: "span 1"
|
|
18323
18440
|
}
|
|
18324
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
18441
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
18442
|
+
style: {
|
|
18443
|
+
margin: 0
|
|
18444
|
+
}
|
|
18445
|
+
}, (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.APPLICANTPHOTO" ? t("WS_CLICK_APPLICANT_PHOTO") || "Click Applicant Photo" : "\u00A0"), /*#__PURE__*/React__default.createElement("div", {
|
|
18325
18446
|
style: {
|
|
18326
|
-
flex: 1,
|
|
18327
18447
|
display: "flex",
|
|
18328
|
-
|
|
18329
|
-
|
|
18448
|
+
alignItems: "center",
|
|
18449
|
+
gap: "20px",
|
|
18450
|
+
height: "100%"
|
|
18330
18451
|
}
|
|
18331
|
-
},
|
|
18452
|
+
}, (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.APPLICANTPHOTO" && /*#__PURE__*/React__default.createElement("div", {
|
|
18332
18453
|
style: {
|
|
18333
18454
|
display: "flex",
|
|
18334
18455
|
alignItems: "center",
|
|
@@ -18363,7 +18484,21 @@ function SelectDocument(_ref2) {
|
|
|
18363
18484
|
fontWeight: "bold",
|
|
18364
18485
|
fontSize: "14px"
|
|
18365
18486
|
}
|
|
18366
|
-
}, "\u2714 Uploaded"))
|
|
18487
|
+
}, "\u2714 Uploaded")), uploadedFile && /*#__PURE__*/React__default.createElement("div", {
|
|
18488
|
+
onClick: viewDocument,
|
|
18489
|
+
style: {
|
|
18490
|
+
display: "flex",
|
|
18491
|
+
alignItems: "center",
|
|
18492
|
+
gap: "8px",
|
|
18493
|
+
cursor: "pointer",
|
|
18494
|
+
color: "#00497e",
|
|
18495
|
+
fontWeight: "bold",
|
|
18496
|
+
padding: "8px 16px",
|
|
18497
|
+
border: "1px solid #00497e",
|
|
18498
|
+
borderRadius: "4px",
|
|
18499
|
+
backgroundColor: "#fff"
|
|
18500
|
+
}
|
|
18501
|
+
}, /*#__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, {
|
|
18367
18502
|
onCapture: handleCapture,
|
|
18368
18503
|
onClose: () => setShowCamera(false),
|
|
18369
18504
|
t: t
|
|
@@ -18430,12 +18565,12 @@ const CameraCaptureModal = _ref4 => {
|
|
|
18430
18565
|
t = _ref4.t;
|
|
18431
18566
|
const videoRef = React.useRef(null);
|
|
18432
18567
|
const canvasRef = React.useRef(null);
|
|
18433
|
-
const _useState15 = React.useState(null),
|
|
18434
|
-
stream = _useState15[0],
|
|
18435
|
-
setStream = _useState15[1];
|
|
18436
18568
|
const _useState16 = React.useState(null),
|
|
18437
|
-
|
|
18438
|
-
|
|
18569
|
+
stream = _useState16[0],
|
|
18570
|
+
setStream = _useState16[1];
|
|
18571
|
+
const _useState17 = React.useState(null),
|
|
18572
|
+
error = _useState17[0],
|
|
18573
|
+
setError = _useState17[1];
|
|
18439
18574
|
React.useEffect(() => {
|
|
18440
18575
|
const startCamera = function () {
|
|
18441
18576
|
try {
|
|
@@ -47724,7 +47859,7 @@ const ApplicationDetails = props => {
|
|
|
47724
47859
|
};
|
|
47725
47860
|
|
|
47726
47861
|
const ApplicationDetails$1 = () => {
|
|
47727
|
-
var _mdmsCommonmastersDat, _commonPayInfo, _applicationDetails$p4, _applicationDetails$p5, _applicationDetails$p6, _applicationDetails$p7, _applicationDetails$a3, _applicationDetails$a4, _applicationDetails$a5, _newValueFilter$, _applicationDetails$a6, _applicationDetails$a7, _applicationDetails$a8, _applicationDetails$a9, _applicationDetails$p8, _applicationDetails$p9, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data0, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _workflowDetails$data12, _workflowDetails$data13, _workflowDetails$data14, _workflowDetails$data21, _workflowDetails$data22, _workflowDetails$data23, _oldData$WaterConnect, _oldData$WaterConnect2, _oldData$SewerageConn, _oldData$SewerageConn2, _applicationDetails$
|
|
47862
|
+
var _mdmsCommonmastersDat, _commonPayInfo, _applicationDetails$p4, _applicationDetails$p5, _applicationDetails$p6, _applicationDetails$p7, _applicationDetails$a3, _applicationDetails$a4, _applicationDetails$a5, _newValueFilter$, _applicationDetails$a6, _applicationDetails$a7, _applicationDetails$a8, _applicationDetails$a9, _applicationDetails$p8, _applicationDetails$p9, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data0, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _workflowDetails$data12, _workflowDetails$data13, _workflowDetails$data14, _workflowDetails$data21, _workflowDetails$data22, _workflowDetails$data23, _oldData$WaterConnect, _oldData$WaterConnect2, _oldData$SewerageConn, _oldData$SewerageConn2, _applicationDetails$a22, _applicationDetails$a23, _reciept_data$Payment2, _applicationDetails$p18, _applicationDetails$p19, _applicationDetails$p20, _applicationDetails$p21, _applicationDetails$p22, _applicationDetails$p23;
|
|
47728
47863
|
const getRecieptSearch = function (tenantId, payments, consumerCodes, receiptKey) {
|
|
47729
47864
|
try {
|
|
47730
47865
|
let response = null;
|
|
@@ -47918,8 +48053,9 @@ const ApplicationDetails$1 = () => {
|
|
|
47918
48053
|
};
|
|
47919
48054
|
}
|
|
47920
48055
|
if ((action === null || action === void 0 ? void 0 : action.action) === "RESUBMIT_APPLICATION") {
|
|
47921
|
-
var _applicationDetails$p11, _servicesMasterData$w, _userConfig$, _userConfig$2;
|
|
47922
|
-
|
|
48056
|
+
var _applicationDetails$a0, _applicationDetails$a1, _applicationDetails$p11, _applicationDetails$p12, _servicesMasterData$w, _userConfig$, _userConfig$2;
|
|
48057
|
+
const isMutation = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a0 = applicationDetails.applicationData) === null || _applicationDetails$a0 === void 0 ? void 0 : (_applicationDetails$a1 = _applicationDetails$a0.applicationType) === null || _applicationDetails$a1 === void 0 ? void 0 : _applicationDetails$a1.includes("MUTATION");
|
|
48058
|
+
let pathName = isMutation ? "/digit-ui/employee/ws/mutation-application?applicationNumber=" + applicationNumber + "&tenantId=" + tenantId + "&service=" + serviceType + "&propertyId=" + (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p11 = applicationDetails.propertyDetails) === null || _applicationDetails$p11 === void 0 ? void 0 : _applicationDetails$p11.propertyId) : "/digit-ui/employee/ws/edit-application?applicationNumber=" + applicationNumber + "&service=" + serviceType + "&propertyId=" + (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p12 = applicationDetails.propertyDetails) === null || _applicationDetails$p12 === void 0 ? void 0 : _applicationDetails$p12.propertyId);
|
|
47923
48059
|
const userConfig = (servicesMasterData === null || servicesMasterData === void 0 ? void 0 : (_servicesMasterData$w = servicesMasterData["ws-services-masters"]) === null || _servicesMasterData$w === void 0 ? void 0 : _servicesMasterData$w.WSEditApplicationByConfigUser) || [];
|
|
47924
48060
|
const editApplicationUserRole = (userConfig === null || userConfig === void 0 ? void 0 : (_userConfig$ = userConfig[0]) === null || _userConfig$ === void 0 ? void 0 : _userConfig$.roles) || [];
|
|
47925
48061
|
const mdmsApplicationStatus = userConfig === null || userConfig === void 0 ? void 0 : (_userConfig$2 = userConfig[0]) === null || _userConfig$2 === void 0 ? void 0 : _userConfig$2.status;
|
|
@@ -47928,9 +48064,9 @@ const ApplicationDetails$1 = () => {
|
|
|
47928
48064
|
isFieldInspector = ifUserRoleExists(role);
|
|
47929
48065
|
if (isFieldInspector) return false;else return true;
|
|
47930
48066
|
});
|
|
47931
|
-
if (isFieldInspector && appStatus === mdmsApplicationStatus) {
|
|
47932
|
-
var _applicationDetails$
|
|
47933
|
-
pathName = "/digit-ui/employee/ws/edit-application-by-config?applicationNumber=" + applicationNumber + "&service=" + serviceType + "&propertyId=" + (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
48067
|
+
if (!isMutation && isFieldInspector && appStatus === mdmsApplicationStatus) {
|
|
48068
|
+
var _applicationDetails$p13;
|
|
48069
|
+
pathName = "/digit-ui/employee/ws/edit-application-by-config?applicationNumber=" + applicationNumber + "&service=" + serviceType + "&propertyId=" + (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p13 = applicationDetails.propertyDetails) === null || _applicationDetails$p13 === void 0 ? void 0 : _applicationDetails$p13.propertyId);
|
|
47934
48070
|
}
|
|
47935
48071
|
action.redirectionUrll = {
|
|
47936
48072
|
action: "ACTIVATE_CONNECTION",
|
|
@@ -47942,18 +48078,19 @@ const ApplicationDetails$1 = () => {
|
|
|
47942
48078
|
};
|
|
47943
48079
|
}
|
|
47944
48080
|
if ((action === null || action === void 0 ? void 0 : action.action) === "SUBMIT_APPLICATION") {
|
|
47945
|
-
var _applicationDetails$
|
|
48081
|
+
var _applicationDetails$p14;
|
|
47946
48082
|
action.redirectionUrll = {
|
|
47947
48083
|
action: "ACTIVATE_CONNECTION",
|
|
47948
|
-
pathname: "/digit-ui/employee/ws/modify-application-edit?applicationNumber=" + applicationNumber + "&service=" + serviceType + "&propertyId=" + (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
48084
|
+
pathname: "/digit-ui/employee/ws/modify-application-edit?applicationNumber=" + applicationNumber + "&service=" + serviceType + "&propertyId=" + (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p14 = applicationDetails.propertyDetails) === null || _applicationDetails$p14 === void 0 ? void 0 : _applicationDetails$p14.propertyId),
|
|
47949
48085
|
state: applicationDetails
|
|
47950
48086
|
};
|
|
47951
48087
|
}
|
|
47952
48088
|
});
|
|
47953
48089
|
workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data7 = workflowDetails.data) === null || _workflowDetails$data7 === void 0 ? void 0 : (_workflowDetails$data8 = _workflowDetails$data7.actionState) === null || _workflowDetails$data8 === void 0 ? void 0 : (_workflowDetails$data9 = _workflowDetails$data8.nextActions) === null || _workflowDetails$data9 === void 0 ? void 0 : _workflowDetails$data9.forEach(action => {
|
|
47954
48090
|
if ((action === null || action === void 0 ? void 0 : action.action) === "EDIT") {
|
|
47955
|
-
var _applicationDetails$
|
|
47956
|
-
|
|
48091
|
+
var _applicationDetails$a10, _applicationDetails$a11, _applicationDetails$p15, _applicationDetails$p16, _servicesMasterData$w2, _userConfig$3, _userConfig$4;
|
|
48092
|
+
const isMutation = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a10 = applicationDetails.applicationData) === null || _applicationDetails$a10 === void 0 ? void 0 : (_applicationDetails$a11 = _applicationDetails$a10.applicationType) === null || _applicationDetails$a11 === void 0 ? void 0 : _applicationDetails$a11.includes("MUTATION");
|
|
48093
|
+
let pathName = isMutation ? "/digit-ui/employee/ws/mutation-application?applicationNumber=" + applicationNumber + "&tenantId=" + tenantId + "&service=" + serviceType + "&propertyId=" + (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p15 = applicationDetails.propertyDetails) === null || _applicationDetails$p15 === void 0 ? void 0 : _applicationDetails$p15.propertyId) : "/digit-ui/employee/ws/edit-application?applicationNumber=" + applicationNumber + "&service=" + serviceType + "&propertyId=" + (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p16 = applicationDetails.propertyDetails) === null || _applicationDetails$p16 === void 0 ? void 0 : _applicationDetails$p16.propertyId);
|
|
47957
48094
|
const userConfig = (servicesMasterData === null || servicesMasterData === void 0 ? void 0 : (_servicesMasterData$w2 = servicesMasterData["ws-services-masters"]) === null || _servicesMasterData$w2 === void 0 ? void 0 : _servicesMasterData$w2.WSEditApplicationByConfigUser) || [];
|
|
47958
48095
|
const editApplicationUserRole = (userConfig === null || userConfig === void 0 ? void 0 : (_userConfig$3 = userConfig[0]) === null || _userConfig$3 === void 0 ? void 0 : _userConfig$3.roles) || [];
|
|
47959
48096
|
const mdmsApplicationStatus = userConfig === null || userConfig === void 0 ? void 0 : (_userConfig$4 = userConfig[0]) === null || _userConfig$4 === void 0 ? void 0 : _userConfig$4.status;
|
|
@@ -47962,9 +48099,9 @@ const ApplicationDetails$1 = () => {
|
|
|
47962
48099
|
isFieldInspector = ifUserRoleExists(role);
|
|
47963
48100
|
if (isFieldInspector) return false;else return true;
|
|
47964
48101
|
});
|
|
47965
|
-
if (isFieldInspector && appStatus === mdmsApplicationStatus) {
|
|
47966
|
-
var _applicationDetails$
|
|
47967
|
-
pathName = "/digit-ui/employee/ws/edit-application-by-config?applicationNumber=" + applicationNumber + "&service=" + serviceType + "&propertyId=" + (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
48102
|
+
if (!isMutation && isFieldInspector && appStatus === mdmsApplicationStatus) {
|
|
48103
|
+
var _applicationDetails$p17;
|
|
48104
|
+
pathName = "/digit-ui/employee/ws/edit-application-by-config?applicationNumber=" + applicationNumber + "&service=" + serviceType + "&propertyId=" + (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p17 = applicationDetails.propertyDetails) === null || _applicationDetails$p17 === void 0 ? void 0 : _applicationDetails$p17.propertyId);
|
|
47968
48105
|
}
|
|
47969
48106
|
action.redirectionUrll = {
|
|
47970
48107
|
action: "ACTIVATE_CONNECTION",
|
|
@@ -48033,10 +48170,10 @@ const ApplicationDetails$1 = () => {
|
|
|
48033
48170
|
const oldApplication = serviceType === "WATER" ? oldData === null || oldData === void 0 ? void 0 : (_oldData$WaterConnect = oldData.WaterConnection) === null || _oldData$WaterConnect === void 0 ? void 0 : _oldData$WaterConnect[(oldData === null || oldData === void 0 ? void 0 : (_oldData$WaterConnect2 = oldData.WaterConnection) === null || _oldData$WaterConnect2 === void 0 ? void 0 : _oldData$WaterConnect2.length) - 1] : oldData === null || oldData === void 0 ? void 0 : (_oldData$SewerageConn = oldData.SewerageConnections) === null || _oldData$SewerageConn === void 0 ? void 0 : _oldData$SewerageConn[(oldData === null || oldData === void 0 ? void 0 : (_oldData$SewerageConn2 = oldData.SewerageConnections) === null || _oldData$SewerageConn2 === void 0 ? void 0 : _oldData$SewerageConn2.length) - 1];
|
|
48034
48171
|
const handleDownloadPdf = function () {
|
|
48035
48172
|
try {
|
|
48036
|
-
var _applicationDetails$
|
|
48037
|
-
const tenantInfo = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
48173
|
+
var _applicationDetails$a12, _applicationDetails$a13, _applicationDetails$a14;
|
|
48174
|
+
const tenantInfo = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a12 = applicationDetails.applicationData) === null || _applicationDetails$a12 === void 0 ? void 0 : _applicationDetails$a12.tenantId;
|
|
48038
48175
|
let result = applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData;
|
|
48039
|
-
if (applicationDetails !== null && applicationDetails !== void 0 && (_applicationDetails$
|
|
48176
|
+
if (applicationDetails !== null && applicationDetails !== void 0 && (_applicationDetails$a13 = applicationDetails.applicationData) !== null && _applicationDetails$a13 !== void 0 && (_applicationDetails$a14 = _applicationDetails$a13.applicationType) !== null && _applicationDetails$a14 !== void 0 && _applicationDetails$a14.includes("MODIFY_")) {
|
|
48040
48177
|
const PDFdata = getWSAcknowledgementData$1(_extends({}, result), _extends({}, applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.propertyDetails), tenantInfo, t, oldApplication);
|
|
48041
48178
|
PDFdata.then(ress => Digit.Utils.pdf.generateModifyPdf(ress));
|
|
48042
48179
|
return Promise.resolve();
|
|
@@ -48050,10 +48187,10 @@ const ApplicationDetails$1 = () => {
|
|
|
48050
48187
|
};
|
|
48051
48188
|
const handleEstimateDownload = function () {
|
|
48052
48189
|
try {
|
|
48053
|
-
const _temp2 = function (_applicationDetails$
|
|
48054
|
-
if (applicationDetails !== null && applicationDetails !== void 0 && (_applicationDetails$
|
|
48055
|
-
var _applicationDetails$
|
|
48056
|
-
getFiles([applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
48190
|
+
const _temp2 = function (_applicationDetails$a15, _applicationDetails$a16) {
|
|
48191
|
+
if (applicationDetails !== null && applicationDetails !== void 0 && (_applicationDetails$a15 = applicationDetails.applicationData) !== null && _applicationDetails$a15 !== void 0 && (_applicationDetails$a16 = _applicationDetails$a15.additionalDetails) !== null && _applicationDetails$a16 !== void 0 && _applicationDetails$a16.estimationFileStoreId) {
|
|
48192
|
+
var _applicationDetails$a17, _applicationDetails$a18;
|
|
48193
|
+
getFiles([applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a17 = applicationDetails.applicationData) === null || _applicationDetails$a17 === void 0 ? void 0 : (_applicationDetails$a18 = _applicationDetails$a17.additionalDetails) === null || _applicationDetails$a18 === void 0 ? void 0 : _applicationDetails$a18.estimationFileStoreId], applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId);
|
|
48057
48194
|
} else {
|
|
48058
48195
|
const warningCount = sessionStorage.getItem("WARINIG_COUNT") || "0";
|
|
48059
48196
|
const warningCountDetails = JSON.parse(warningCount);
|
|
@@ -48111,8 +48248,8 @@ const ApplicationDetails$1 = () => {
|
|
|
48111
48248
|
order: 2,
|
|
48112
48249
|
label: t("WS_SANCTION_LETTER"),
|
|
48113
48250
|
onClick: () => {
|
|
48114
|
-
var _applicationDetails$
|
|
48115
|
-
return getFiles([applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
48251
|
+
var _applicationDetails$a19, _applicationDetails$a20;
|
|
48252
|
+
return getFiles([applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a19 = applicationDetails.applicationData) === null || _applicationDetails$a19 === void 0 ? void 0 : (_applicationDetails$a20 = _applicationDetails$a19.additionalDetails) === null || _applicationDetails$a20 === void 0 ? void 0 : _applicationDetails$a20.sanctionFileStoreId], applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId);
|
|
48116
48253
|
}
|
|
48117
48254
|
};
|
|
48118
48255
|
const applicationDownloadObject = {
|
|
@@ -48124,8 +48261,8 @@ const ApplicationDetails$1 = () => {
|
|
|
48124
48261
|
order: 4,
|
|
48125
48262
|
label: t("DOWNLOAD_RECEIPT_HEADER"),
|
|
48126
48263
|
onClick: () => {
|
|
48127
|
-
var _reciept_data$Payment, _applicationDetails$
|
|
48128
|
-
return getRecieptSearch(Digit.ULBService.getStateId(), reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment = reciept_data.Payments) === null || _reciept_data$Payment === void 0 ? void 0 : _reciept_data$Payment[0], applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
48264
|
+
var _reciept_data$Payment, _applicationDetails$a21;
|
|
48265
|
+
return getRecieptSearch(Digit.ULBService.getStateId(), reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment = reciept_data.Payments) === null || _reciept_data$Payment === void 0 ? void 0 : _reciept_data$Payment[0], applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a21 = applicationDetails.applicationData) === null || _applicationDetails$a21 === void 0 ? void 0 : _applicationDetails$a21.applicationNo, receiptKey);
|
|
48129
48266
|
}
|
|
48130
48267
|
};
|
|
48131
48268
|
switch (appStatus) {
|
|
@@ -48140,7 +48277,7 @@ const ApplicationDetails$1 = () => {
|
|
|
48140
48277
|
break;
|
|
48141
48278
|
case "PENDING_FOR_CONNECTION_ACTIVATION":
|
|
48142
48279
|
case "CONNECTION_ACTIVATED":
|
|
48143
|
-
if (applicationDetails !== null && applicationDetails !== void 0 && (_applicationDetails$
|
|
48280
|
+
if (applicationDetails !== null && applicationDetails !== void 0 && (_applicationDetails$a22 = applicationDetails.applicationData) !== null && _applicationDetails$a22 !== void 0 && (_applicationDetails$a23 = _applicationDetails$a22.applicationType) !== null && _applicationDetails$a23 !== void 0 && _applicationDetails$a23.includes("NEW_") && (reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment2 = reciept_data.Payments) === null || _reciept_data$Payment2 === void 0 ? void 0 : _reciept_data$Payment2.length) > 0) dowloadOptions = [sanctionDownloadObject, wsEstimateDownloadObject, applicationDownloadObject, appFeeDownloadReceipt];else dowloadOptions = [sanctionDownloadObject, wsEstimateDownloadObject, applicationDownloadObject];
|
|
48144
48281
|
break;
|
|
48145
48282
|
case "REJECTED":
|
|
48146
48283
|
dowloadOptions = [applicationDownloadObject];
|
|
@@ -48186,12 +48323,12 @@ const ApplicationDetails$1 = () => {
|
|
|
48186
48323
|
mutate: mutate,
|
|
48187
48324
|
id: "timeline",
|
|
48188
48325
|
workflowDetails: workflowDetails,
|
|
48189
|
-
businessService: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
48326
|
+
businessService: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p18 = applicationDetails.processInstancesDetails) === null || _applicationDetails$p18 === void 0 ? void 0 : (_applicationDetails$p19 = _applicationDetails$p18[0]) === null || _applicationDetails$p19 === void 0 ? void 0 : (_applicationDetails$p20 = _applicationDetails$p19.businessService) === null || _applicationDetails$p20 === void 0 ? void 0 : _applicationDetails$p20.toUpperCase(),
|
|
48190
48327
|
moduleCode: "WS",
|
|
48191
48328
|
showToast: showToast,
|
|
48192
48329
|
setShowToast: setShowToast,
|
|
48193
48330
|
closeToast: closeToast,
|
|
48194
|
-
timelineStatusPrefix: "WF_" + (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
48331
|
+
timelineStatusPrefix: "WF_" + (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p21 = applicationDetails.processInstancesDetails) === null || _applicationDetails$p21 === void 0 ? void 0 : (_applicationDetails$p22 = _applicationDetails$p21[0]) === null || _applicationDetails$p22 === void 0 ? void 0 : (_applicationDetails$p23 = _applicationDetails$p22.businessService) === null || _applicationDetails$p23 === void 0 ? void 0 : _applicationDetails$p23.toUpperCase()) + "_",
|
|
48195
48332
|
oldValue: res,
|
|
48196
48333
|
isInfoLabel: checkforPrivacyenablement(),
|
|
48197
48334
|
clearDataDetails: clearDataDetails,
|
|
@@ -48484,7 +48621,10 @@ const GetConnectionDetails = () => {
|
|
|
48484
48621
|
};
|
|
48485
48622
|
return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
48486
48623
|
style: {
|
|
48487
|
-
position: "relative"
|
|
48624
|
+
position: "relative",
|
|
48625
|
+
width: "100%",
|
|
48626
|
+
height: "100%",
|
|
48627
|
+
overflowY: "scroll"
|
|
48488
48628
|
}
|
|
48489
48629
|
}, dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React__default.createElement("div", {
|
|
48490
48630
|
style: {
|
|
@@ -52257,7 +52397,7 @@ const Step5_Submission = _ref => {
|
|
|
52257
52397
|
flexWrap: "wrap",
|
|
52258
52398
|
gap: "6px"
|
|
52259
52399
|
}
|
|
52260
|
-
}, /*#__PURE__*/React__default.createElement("span", null, "\u2705"), " Your application has been submitted successfully!"), /*#__PURE__*/React__default.createElement("div", {
|
|
52400
|
+
}, /*#__PURE__*/React__default.createElement("span", null, "\u2705"), " Your application has been submitted successfully to the respective Zonal Officer !"), /*#__PURE__*/React__default.createElement("div", {
|
|
52261
52401
|
style: {
|
|
52262
52402
|
color: "#666",
|
|
52263
52403
|
marginTop: "4px",
|
|
@@ -52370,7 +52510,8 @@ const MutationApplication = () => {
|
|
|
52370
52510
|
}),
|
|
52371
52511
|
isWorkflowLoading = _useQuery.isLoading,
|
|
52372
52512
|
workflowData = _useQuery.data;
|
|
52373
|
-
const
|
|
52513
|
+
const isEmployee = window.location.href.includes("/employee/");
|
|
52514
|
+
const isEditFlow = !!editApplicationNumber && (isEmployee || (workflowData === null || workflowData === void 0 ? void 0 : workflowData.action) === "SEND_BACK_TO_CITIZEN");
|
|
52374
52515
|
const querySearchParam = isEditFlow ? editApplicationNumber : authKNumber;
|
|
52375
52516
|
const fallbackServiceType = serviceType || authServiceType;
|
|
52376
52517
|
const businessService = (fallbackServiceType === null || fallbackServiceType === void 0 ? void 0 : fallbackServiceType.toUpperCase()) === "SEWERAGE" ? "SW" : "WS";
|
|
@@ -52454,7 +52595,8 @@ const MutationApplication = () => {
|
|
|
52454
52595
|
}, [applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a4 = applicationDetails.applicationData) === null || _applicationDetails$a4 === void 0 ? void 0 : _applicationDetails$a4.id]);
|
|
52455
52596
|
React.useEffect(() => {
|
|
52456
52597
|
const isCitizen = window.location.href.includes("/citizen/");
|
|
52457
|
-
|
|
52598
|
+
const isEmployee = window.location.href.includes("/employee/");
|
|
52599
|
+
if ((isCitizen || isEmployee) && isEditFlow && applicationDetails !== null && applicationDetails !== void 0 && applicationDetails.applicationData) {
|
|
52458
52600
|
const data = applicationDetails.applicationData;
|
|
52459
52601
|
const holders = (data === null || data === void 0 ? void 0 : data.connectionHolders) || [];
|
|
52460
52602
|
const primaryHolder = holders.find(h => h.isPrimaryOwner) || holders[0] || {};
|
|
@@ -52467,6 +52609,36 @@ const MutationApplication = () => {
|
|
|
52467
52609
|
return ["AADHAAR", "VOTERID", "VOTER_ID", "PAN", "DRIVING_LICENSE", "PASSPORT"].includes((_d$documentType = d.documentType) === null || _d$documentType === void 0 ? void 0 : _d$documentType.toUpperCase());
|
|
52468
52610
|
});
|
|
52469
52611
|
const mutationDoc = documents.find(d => d.documentType === "REGISTERED_SALE_DEED" || d.documentType === "SALE_DEED" || d.documentType === "GIFT_DEED" || d.documentType === "WILL");
|
|
52612
|
+
const reasonOptions = [{
|
|
52613
|
+
code: "SALE_PURCHASE",
|
|
52614
|
+
i18nKey: "Purchase of Property"
|
|
52615
|
+
}, {
|
|
52616
|
+
code: "DEVOLUTION_INHERITANCE",
|
|
52617
|
+
i18nKey: "Devolution/Inheritance"
|
|
52618
|
+
}, {
|
|
52619
|
+
code: "OTHER",
|
|
52620
|
+
i18nKey: "Other Reason(Gift Deed, Lease Agreement, etc)"
|
|
52621
|
+
}];
|
|
52622
|
+
const relationshipOptions = [{
|
|
52623
|
+
code: "BLOOD_RELATION",
|
|
52624
|
+
i18nKey: "Blood Relation (Son / Daughter / Spouse)"
|
|
52625
|
+
}, {
|
|
52626
|
+
code: "LEGAL_HEIR",
|
|
52627
|
+
i18nKey: "Legal Heir"
|
|
52628
|
+
}, {
|
|
52629
|
+
code: "OTHER",
|
|
52630
|
+
i18nKey: "Other"
|
|
52631
|
+
}];
|
|
52632
|
+
const reasonCode = additionalDetails.reasonForNameChange;
|
|
52633
|
+
const reasonObj = reasonOptions.find(o => o.code === reasonCode) || (reasonCode ? {
|
|
52634
|
+
code: reasonCode,
|
|
52635
|
+
i18nKey: reasonCode
|
|
52636
|
+
} : null);
|
|
52637
|
+
const relationCode = additionalDetails.relationshipWithExistingConsumer;
|
|
52638
|
+
const relationObj = relationshipOptions.find(o => o.code === relationCode) || (relationCode ? {
|
|
52639
|
+
code: relationCode,
|
|
52640
|
+
i18nKey: relationCode
|
|
52641
|
+
} : null);
|
|
52470
52642
|
return {
|
|
52471
52643
|
proposedNewConsumerName: primaryHolder.name || "",
|
|
52472
52644
|
gender: primaryHolder.gender ? {
|
|
@@ -52475,21 +52647,18 @@ const MutationApplication = () => {
|
|
|
52475
52647
|
} : null,
|
|
52476
52648
|
newOwnerMobileNumber: primaryHolder.mobileNumber || "",
|
|
52477
52649
|
newOwnerEmailAddress: primaryHolder.emailId || "",
|
|
52478
|
-
reasonForNameChange:
|
|
52479
|
-
|
|
52480
|
-
|
|
52481
|
-
|
|
52482
|
-
|
|
52483
|
-
code: additionalDetails.
|
|
52484
|
-
i18nKey: additionalDetails.
|
|
52485
|
-
} : null
|
|
52486
|
-
saleDeedDocumentId: (mutationDoc === null || mutationDoc === void 0 ? void 0 : mutationDoc.fileStoreId) || additionalDetails.saleDeedDocumentId || "",
|
|
52487
|
-
identityProofDocumentId: (identityDoc === null || identityDoc === void 0 ? void 0 : identityDoc.fileStoreId) || "",
|
|
52488
|
-
identityProofType: identityDoc !== null && identityDoc !== void 0 && identityDoc.documentType ? {
|
|
52650
|
+
reasonForNameChange: reasonObj,
|
|
52651
|
+
relationshipWithExistingConsumer: relationObj,
|
|
52652
|
+
saleDeedDocumentId: additionalDetails.saleDeedDocumentId || (mutationDoc === null || mutationDoc === void 0 ? void 0 : mutationDoc.fileStoreId) || "",
|
|
52653
|
+
identityProofDocumentId: additionalDetails.identityProofDocumentId || (identityDoc === null || identityDoc === void 0 ? void 0 : identityDoc.fileStoreId) || "",
|
|
52654
|
+
identityProofType: additionalDetails.identityProofDocumentName ? {
|
|
52655
|
+
code: additionalDetails.identityProofDocumentName,
|
|
52656
|
+
i18nKey: additionalDetails.identityProofDocumentName
|
|
52657
|
+
} : identityDoc !== null && identityDoc !== void 0 && identityDoc.documentType ? {
|
|
52489
52658
|
code: identityDoc.documentType,
|
|
52490
52659
|
i18nKey: identityDoc.documentType
|
|
52491
52660
|
} : null,
|
|
52492
|
-
documentNumber: additionalDetails.identityProofNumber || (identityDoc === null || identityDoc === void 0 ? void 0 : identityDoc.documentUid) || ""
|
|
52661
|
+
documentNumber: additionalDetails.identityProofDocumentNumber || additionalDetails.identityProofNumber || (identityDoc === null || identityDoc === void 0 ? void 0 : identityDoc.documentUid) || ""
|
|
52493
52662
|
};
|
|
52494
52663
|
});
|
|
52495
52664
|
}
|
|
@@ -52586,7 +52755,7 @@ const MutationApplication = () => {
|
|
|
52586
52755
|
});
|
|
52587
52756
|
}
|
|
52588
52757
|
if (mutDetails.identityProofDocumentId) {
|
|
52589
|
-
var _mutDetails$identityP;
|
|
52758
|
+
var _mutDetails$identityP, _mutDetails$identityP2;
|
|
52590
52759
|
if (!convertAppData.documents) convertAppData.documents = [];
|
|
52591
52760
|
convertAppData.documents.push({
|
|
52592
52761
|
documentType: ((_mutDetails$identityP = mutDetails.identityProofType) === null || _mutDetails$identityP === void 0 ? void 0 : _mutDetails$identityP.code) || "IDENTITY_PROOF",
|
|
@@ -52595,6 +52764,10 @@ const MutationApplication = () => {
|
|
|
52595
52764
|
documentNumber: mutDetails.documentNumber,
|
|
52596
52765
|
status: "ACTIVE"
|
|
52597
52766
|
});
|
|
52767
|
+
if (!convertAppData.additionalDetails) convertAppData.additionalDetails = {};
|
|
52768
|
+
convertAppData.additionalDetails.identityProofDocumentNumber = mutDetails.documentNumber || "";
|
|
52769
|
+
convertAppData.additionalDetails.identityProofDocumentName = ((_mutDetails$identityP2 = mutDetails.identityProofType) === null || _mutDetails$identityP2 === void 0 ? void 0 : _mutDetails$identityP2.code) || "IDENTITY_PROOF";
|
|
52770
|
+
convertAppData.additionalDetails.identityProofDocumentId = mutDetails.identityProofDocumentId || "";
|
|
52598
52771
|
}
|
|
52599
52772
|
}
|
|
52600
52773
|
convertAppData.applicationType = resolvedServiceType === "WATER" ? "MUTATION_WATER_CONNECTION" : "MUTATION_SEWERAGE_CONNECTION";
|