@djb25/digit-ui-module-ws 1.0.83 → 1.0.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +403 -89
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +404 -90
- 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",
|
|
@@ -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,
|
|
@@ -56042,7 +56319,7 @@ const openFilePDF = fileId => {
|
|
|
56042
56319
|
}).catch(error => console.error("Error fetching file:", error));
|
|
56043
56320
|
};
|
|
56044
56321
|
const CheckPage$4 = _ref2 => {
|
|
56045
|
-
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;
|
|
56046
56323
|
let data = _ref2.data,
|
|
56047
56324
|
onSubmit = _ref2.onSubmit,
|
|
56048
56325
|
onEdit = _ref2.onEdit;
|
|
@@ -56122,6 +56399,7 @@ const CheckPage$4 = _ref2 => {
|
|
|
56122
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) || [];
|
|
56123
56400
|
const declaration = (data === null || data === void 0 ? void 0 : data.declarationData) || (data === null || data === void 0 ? void 0 : data.declaration) || {};
|
|
56124
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) || {};
|
|
56125
56403
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
56126
56404
|
className: "overflow-y-scroll"
|
|
56127
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, {
|
|
@@ -56349,7 +56627,15 @@ const CheckPage$4 = _ref2 => {
|
|
|
56349
56627
|
},
|
|
56350
56628
|
onClick: () => openFilePDF(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document)
|
|
56351
56629
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.GenericFileIcon, null), " ", t("CS_COMMON_VIEW"))
|
|
56352
|
-
}))), /*#__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, {
|
|
56353
56639
|
style: {
|
|
56354
56640
|
marginTop: "10px",
|
|
56355
56641
|
marginBottom: "30px"
|
|
@@ -56492,6 +56778,7 @@ const OLDApplication = () => {
|
|
|
56492
56778
|
const _useTranslation = reactI18next.useTranslation(),
|
|
56493
56779
|
t = _useTranslation.t;
|
|
56494
56780
|
const history = reactRouterDom.useHistory();
|
|
56781
|
+
const location = reactRouterDom.useLocation();
|
|
56495
56782
|
const _useState = React.useState(false),
|
|
56496
56783
|
isEnableLoader = _useState[0],
|
|
56497
56784
|
setIsEnableLoader = _useState[1];
|
|
@@ -56540,9 +56827,12 @@ const OLDApplication = () => {
|
|
|
56540
56827
|
let _Digit$Hooks$ws$useWS = Digit.Hooks.ws.useWSConfigMDMS.WSCreateConfig(stateId, {}),
|
|
56541
56828
|
newConfig = _Digit$Hooks$ws$useWS.data,
|
|
56542
56829
|
isLoading = _Digit$Hooks$ws$useWS.isLoading;
|
|
56543
|
-
const
|
|
56830
|
+
const requestedPropertyId = new URLSearchParams(location.search).get("propertyId");
|
|
56831
|
+
const _useState5 = React.useState(requestedPropertyId),
|
|
56544
56832
|
propertyId = _useState5[0],
|
|
56545
56833
|
setPropertyId = _useState5[1];
|
|
56834
|
+
const initialPropertyId = React.useRef(requestedPropertyId);
|
|
56835
|
+
const verifiedPropertyId = React.useRef(sessionStorage.getItem("WS_OTP_VERIFIED_PROPERTY_ID"));
|
|
56546
56836
|
const _Digit$Hooks$useSessi = Digit.Hooks.useSessionStorage("PT_CREATE_EMP_WS_NEW_FORM", {}),
|
|
56547
56837
|
sessionFormData = _Digit$Hooks$useSessi[0],
|
|
56548
56838
|
setSessionFormData = _Digit$Hooks$useSessi[1],
|
|
@@ -56557,9 +56847,16 @@ const OLDApplication = () => {
|
|
|
56557
56847
|
propertyIds: propertyId
|
|
56558
56848
|
},
|
|
56559
56849
|
tenantId: tenantId,
|
|
56560
|
-
enabled: propertyId && propertyId
|
|
56850
|
+
enabled: propertyId && propertyId === requestedPropertyId && propertyId === verifiedPropertyId.current
|
|
56561
56851
|
}),
|
|
56562
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]);
|
|
56563
56860
|
React.useEffect(() => {
|
|
56564
56861
|
sessionStorage.removeItem("FORMSTATE_ERRORS");
|
|
56565
56862
|
}, []);
|
|
@@ -56569,7 +56866,7 @@ const OLDApplication = () => {
|
|
|
56569
56866
|
if (config) {
|
|
56570
56867
|
var _config$body;
|
|
56571
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)) || [];
|
|
56572
|
-
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"];
|
|
56573
56870
|
const reorderedBody = [];
|
|
56574
56871
|
desiredComponentOrder.forEach(compName => {
|
|
56575
56872
|
const section = allCreateSections.find(s => {
|
|
@@ -56635,6 +56932,19 @@ const OLDApplication = () => {
|
|
|
56635
56932
|
withoutLabel: true
|
|
56636
56933
|
}]
|
|
56637
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
|
+
});
|
|
56638
56948
|
}
|
|
56639
56949
|
});
|
|
56640
56950
|
allCreateSections.forEach(section => {
|
|
@@ -56899,6 +57209,7 @@ const OLDApplication = () => {
|
|
|
56899
57209
|
try {
|
|
56900
57210
|
var _waterUpdateData$Wate, _waterUpdateData$Wate2, _sewerageUpdateData$S, _sewerageUpdateData$S2;
|
|
56901
57211
|
clearSessionFormData();
|
|
57212
|
+
sessionStorage.removeItem("WS_OTP_VERIFIED_PROPERTY_ID");
|
|
56902
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));
|
|
56903
57214
|
return Promise.resolve();
|
|
56904
57215
|
} catch (e) {
|
|
@@ -56962,6 +57273,7 @@ const OLDApplication = () => {
|
|
|
56962
57273
|
onSuccess: data => {
|
|
56963
57274
|
var _data$WaterConnection2, _data$WaterConnection3;
|
|
56964
57275
|
clearSessionFormData();
|
|
57276
|
+
sessionStorage.removeItem("WS_OTP_VERIFIED_PROPERTY_ID");
|
|
56965
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));
|
|
56966
57278
|
}
|
|
56967
57279
|
});
|
|
@@ -57010,6 +57322,7 @@ const OLDApplication = () => {
|
|
|
57010
57322
|
onSuccess: data => {
|
|
57011
57323
|
var _data$SewerageConnect2, _data$SewerageConnect3;
|
|
57012
57324
|
clearSessionFormData();
|
|
57325
|
+
sessionStorage.removeItem("WS_OTP_VERIFIED_PROPERTY_ID");
|
|
57013
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));
|
|
57014
57327
|
}
|
|
57015
57328
|
})).then(function () {});
|
|
@@ -57235,7 +57548,8 @@ const componentsToRegister = {
|
|
|
57235
57548
|
WSSearchIntegrated: SearchIntegrated,
|
|
57236
57549
|
WSSearchWaterConnectionViewIntegrated: SearchWaterConnectionViewIntegrated,
|
|
57237
57550
|
WSBulkBillGeneration: BulkBillGeneration,
|
|
57238
|
-
WSOLDApplication: OLDApplication
|
|
57551
|
+
WSOLDApplication: OLDApplication,
|
|
57552
|
+
WSDivyangjan: WSDivyangjan
|
|
57239
57553
|
};
|
|
57240
57554
|
const initWSComponents = () => {
|
|
57241
57555
|
Object.entries(componentsToRegister).forEach(_ref3 => {
|