@mseva/digit-ui-module-ndc 1.0.15 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -14291
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +261 -115
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1221,13 +1221,14 @@ const ApplicationOverview = () => {
|
|
|
1221
1221
|
useEffect(() => {
|
|
1222
1222
|
var _applicationDetails$A;
|
|
1223
1223
|
const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : _applicationDetails$A[0];
|
|
1224
|
+
console.log("ndcObject", ndcObject);
|
|
1224
1225
|
if (ndcObject) {
|
|
1225
|
-
var _ndcObject$
|
|
1226
|
+
var _ndcObject$owners, _ndcObject$owners$, _ndcObject$owners2, _ndcObject$owners2$, _ndcObject$owners3, _ndcObject$owners3$, _ndcObject$NdcDetails, _ndcObject$NdcDetails2, _ndcObject$NdcDetails3, _removeDuplicatesByUU;
|
|
1226
1227
|
const applicantData = {
|
|
1227
|
-
|
|
1228
|
-
email: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$owners = ndcObject.owners) === null || _ndcObject$owners === void 0 ? void 0 : (_ndcObject$owners$ = _ndcObject$owners[0]) === null || _ndcObject$owners$ === void 0 ? void 0 : _ndcObject$owners$.emailId,
|
|
1228
|
+
name: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$owners = ndcObject.owners) === null || _ndcObject$owners === void 0 ? void 0 : (_ndcObject$owners$ = _ndcObject$owners[0]) === null || _ndcObject$owners$ === void 0 ? void 0 : _ndcObject$owners$.name,
|
|
1229
1229
|
mobile: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$owners2 = ndcObject.owners) === null || _ndcObject$owners2 === void 0 ? void 0 : (_ndcObject$owners2$ = _ndcObject$owners2[0]) === null || _ndcObject$owners2$ === void 0 ? void 0 : _ndcObject$owners2$.mobileNumber,
|
|
1230
|
-
|
|
1230
|
+
email: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$owners3 = ndcObject.owners) === null || _ndcObject$owners3 === void 0 ? void 0 : (_ndcObject$owners3$ = _ndcObject$owners3[0]) === null || _ndcObject$owners3$ === void 0 ? void 0 : _ndcObject$owners3$.emailId,
|
|
1231
|
+
address: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$NdcDetails = ndcObject.NdcDetails) === null || _ndcObject$NdcDetails === void 0 ? void 0 : (_ndcObject$NdcDetails2 = _ndcObject$NdcDetails[0]) === null || _ndcObject$NdcDetails2 === void 0 ? void 0 : (_ndcObject$NdcDetails3 = _ndcObject$NdcDetails2.additionalDetails) === null || _ndcObject$NdcDetails3 === void 0 ? void 0 : _ndcObject$NdcDetails3.propertyAddress,
|
|
1231
1232
|
applicationNo: ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.uuid
|
|
1232
1233
|
};
|
|
1233
1234
|
const Documents = removeDuplicatesByUUID((ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.Documents) || []);
|
|
@@ -1375,9 +1376,9 @@ const ApplicationOverview = () => {
|
|
|
1375
1376
|
value: {
|
|
1376
1377
|
workflowDocs: displayData === null || displayData === void 0 ? void 0 : displayData.Documents
|
|
1377
1378
|
}
|
|
1378
|
-
}) : /*#__PURE__*/React.createElement("div", null, t("TL_NO_DOCUMENTS_MSG")))), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data9 = workflowDetails.data) === null || _workflowDetails$data9 === void 0 ? void 0 : _workflowDetails$data9.timeline) && /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("
|
|
1379
|
+
}) : /*#__PURE__*/React.createElement("div", null, t("TL_NO_DOCUMENTS_MSG")))), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data9 = workflowDetails.data) === null || _workflowDetails$data9 === void 0 ? void 0 : _workflowDetails$data9.timeline) && /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("CS_APPLICATION_DETAILS_APPLICATION_TIMELINE")), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data0 = workflowDetails.data) === null || _workflowDetails$data0 === void 0 ? void 0 : _workflowDetails$data0.timeline.length) === 1 ? /*#__PURE__*/React.createElement(CheckPoint, {
|
|
1379
1380
|
isCompleted: true,
|
|
1380
|
-
label: t(
|
|
1381
|
+
label: t(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data1 = workflowDetails.data) === null || _workflowDetails$data1 === void 0 ? void 0 : (_workflowDetails$data10 = _workflowDetails$data1.timeline[0]) === null || _workflowDetails$data10 === void 0 ? void 0 : _workflowDetails$data10.status)
|
|
1381
1382
|
}) : /*#__PURE__*/React.createElement(ConnectingCheckPoints, null, workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data11 = workflowDetails.data) === null || _workflowDetails$data11 === void 0 ? void 0 : _workflowDetails$data11.timeline.map((checkpoint, index, arr) => /*#__PURE__*/React.createElement(CheckPoint, {
|
|
1382
1383
|
keyValue: index,
|
|
1383
1384
|
isCompleted: index === 0,
|
|
@@ -9005,7 +9006,7 @@ const CitizenApplicationOverview = () => {
|
|
|
9005
9006
|
value: {
|
|
9006
9007
|
workflowDocs: displayData === null || displayData === void 0 ? void 0 : displayData.Documents
|
|
9007
9008
|
}
|
|
9008
|
-
}) : /*#__PURE__*/React.createElement("div", null, t("TL_NO_DOCUMENTS_MSG")))), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.timeline) && /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("
|
|
9009
|
+
}) : /*#__PURE__*/React.createElement("div", null, t("TL_NO_DOCUMENTS_MSG")))), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.timeline) && /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("CS_APPLICATION_DETAILS_APPLICATION_TIMELINE")), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data2 = workflowDetails.data) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.timeline.length) === 1 ? /*#__PURE__*/React.createElement(CheckPoint, {
|
|
9009
9010
|
isCompleted: true,
|
|
9010
9011
|
label: t("NDC_STATUS_" + (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data3 = workflowDetails.data) === null || _workflowDetails$data3 === void 0 ? void 0 : (_workflowDetails$data4 = _workflowDetails$data3.timeline[0]) === null || _workflowDetails$data4 === void 0 ? void 0 : _workflowDetails$data4.status))
|
|
9011
9012
|
}) : /*#__PURE__*/React.createElement(ConnectingCheckPoints, null, workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data5 = workflowDetails.data) === null || _workflowDetails$data5 === void 0 ? void 0 : _workflowDetails$data5.timeline.map((checkpoint, index, arr) => /*#__PURE__*/React.createElement(CheckPoint, {
|
|
@@ -11435,7 +11436,7 @@ const PropertyDetailsStep2 = ({
|
|
|
11435
11436
|
};
|
|
11436
11437
|
|
|
11437
11438
|
const config = [{
|
|
11438
|
-
head: "
|
|
11439
|
+
head: "",
|
|
11439
11440
|
stepNumber: 1,
|
|
11440
11441
|
body: [{
|
|
11441
11442
|
name: "",
|
|
@@ -11477,8 +11478,8 @@ const config = [{
|
|
|
11477
11478
|
}];
|
|
11478
11479
|
|
|
11479
11480
|
const createEmployeeConfig = [{
|
|
11480
|
-
head: "
|
|
11481
|
-
stepLabel: "
|
|
11481
|
+
head: "Applicant Details",
|
|
11482
|
+
stepLabel: "Applicant Details",
|
|
11482
11483
|
stepNumber: 1,
|
|
11483
11484
|
isStepEnabled: true,
|
|
11484
11485
|
type: "component",
|
|
@@ -11542,7 +11543,7 @@ const NewNDCStepForm = () => {
|
|
|
11542
11543
|
color: "#1C1D1F"
|
|
11543
11544
|
},
|
|
11544
11545
|
divider: true
|
|
11545
|
-
}, t("
|
|
11546
|
+
}, t("ndc_header_application")), /*#__PURE__*/React.createElement(Stepper, {
|
|
11546
11547
|
stepsList: updatedCreateEmployeeconfig,
|
|
11547
11548
|
onSubmit: handleSubmit,
|
|
11548
11549
|
step: step,
|
|
@@ -11572,7 +11573,6 @@ const NewNDCStepFormOne = ({
|
|
|
11572
11573
|
const tenantId = window.localStorage.getItem("CITIZEN.CITY");
|
|
11573
11574
|
function goNext(data) {
|
|
11574
11575
|
var _checkFormData$apiDat, _checkFormData$apiDat2, _checkFormData$apiDat3;
|
|
11575
|
-
console.log(`Data in step ${config.currStepNumber} is: \n`, data);
|
|
11576
11576
|
const missingFields = validateStepData(currentStepData);
|
|
11577
11577
|
if (missingFields.length > 0) {
|
|
11578
11578
|
setError(`${missingFields[0]}`);
|
|
@@ -11675,19 +11675,43 @@ const NewNDCStepFormOne = ({
|
|
|
11675
11675
|
};
|
|
11676
11676
|
}
|
|
11677
11677
|
};
|
|
11678
|
-
const validatePropertyId = value => {
|
|
11679
|
-
const regex = /^PT-\d{4}-\d{7,8}$/;
|
|
11680
|
-
return regex.test(value);
|
|
11681
|
-
};
|
|
11682
11678
|
function validateStepData(data) {
|
|
11679
|
+
var _data$cpt6, _data$cpt6$dues, _data$cpt7, _data$cpt7$dues, _data$dues, _propertyDetails$wate, _propertyDetails$sewe;
|
|
11683
11680
|
const missingFields = [];
|
|
11684
11681
|
const invalidFields = [];
|
|
11685
11682
|
const cpt = (data === null || data === void 0 ? void 0 : data.cpt) || {};
|
|
11686
11683
|
const cptDetails = (cpt === null || cpt === void 0 ? void 0 : cpt.details) || {};
|
|
11687
11684
|
const propertyDetails = (data === null || data === void 0 ? void 0 : data.PropertyDetails) || {};
|
|
11688
11685
|
const NDCReason = (data === null || data === void 0 ? void 0 : data.NDCReason) || {};
|
|
11686
|
+
if ((data === null || data === void 0 ? void 0 : (_data$cpt6 = data.cpt) === null || _data$cpt6 === void 0 ? void 0 : (_data$cpt6$dues = _data$cpt6.dues) === null || _data$cpt6$dues === void 0 ? void 0 : _data$cpt6$dues.totalAmount) != 0) {
|
|
11687
|
+
missingFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
|
|
11688
|
+
}
|
|
11689
|
+
if (data !== null && data !== void 0 && (_data$cpt7 = data.cpt) !== null && _data$cpt7 !== void 0 && (_data$cpt7$dues = _data$cpt7.dues) !== null && _data$cpt7$dues !== void 0 && _data$cpt7$dues.id && (data === null || data === void 0 ? void 0 : (_data$dues = data.dues) === null || _data$dues === void 0 ? void 0 : _data$dues.totalAmount) > 0) {
|
|
11690
|
+
missingFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
|
|
11691
|
+
}
|
|
11692
|
+
if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.length) > 0) {
|
|
11693
|
+
propertyDetails.waterConnection.forEach(value => {
|
|
11694
|
+
var _value$billData, _value$billData2, _value$billData3;
|
|
11695
|
+
if ((value === null || value === void 0 ? void 0 : (_value$billData = value.billData) === null || _value$billData === void 0 ? void 0 : _value$billData.totalAmount) != 0) {
|
|
11696
|
+
missingFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_WATER_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
|
|
11697
|
+
}
|
|
11698
|
+
if (value !== null && value !== void 0 && (_value$billData2 = value.billData) !== null && _value$billData2 !== void 0 && _value$billData2.id && (value === null || value === void 0 ? void 0 : (_value$billData3 = value.billData) === null || _value$billData3 === void 0 ? void 0 : _value$billData3.totalAmount) > 0) {
|
|
11699
|
+
missingFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_WATER_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
|
|
11700
|
+
}
|
|
11701
|
+
});
|
|
11702
|
+
}
|
|
11703
|
+
if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$sewe = propertyDetails.sewerageConnection) === null || _propertyDetails$sewe === void 0 ? void 0 : _propertyDetails$sewe.length) > 0) {
|
|
11704
|
+
propertyDetails.sewerageConnection.forEach(value => {
|
|
11705
|
+
var _value$billData4, _value$billData5, _value$billData6;
|
|
11706
|
+
if ((value === null || value === void 0 ? void 0 : (_value$billData4 = value.billData) === null || _value$billData4 === void 0 ? void 0 : _value$billData4.totalAmount) != 0) {
|
|
11707
|
+
missingFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_SEWERAGE_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
|
|
11708
|
+
}
|
|
11709
|
+
if (value !== null && value !== void 0 && (_value$billData5 = value.billData) !== null && _value$billData5 !== void 0 && _value$billData5.id && (value === null || value === void 0 ? void 0 : (_value$billData6 = value.billData) === null || _value$billData6 === void 0 ? void 0 : _value$billData6.totalAmount) > 0) {
|
|
11710
|
+
missingFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_SEWERAGE_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
|
|
11711
|
+
}
|
|
11712
|
+
});
|
|
11713
|
+
}
|
|
11689
11714
|
if (!(cpt !== null && cpt !== void 0 && cpt.id)) missingFields.push(t("NDC_MESSAGE_PROPERTY_ID"));
|
|
11690
|
-
if (!validatePropertyId(cpt === null || cpt === void 0 ? void 0 : cpt.id)) missingFields.push(t("PT_PROPERTY_ID_INVALID"));
|
|
11691
11715
|
if (!cptDetails || Object.keys(cptDetails).length === 0) missingFields.push(t("NDC_MESSAGE_PLEASE_SEARCH_PROPERTY_ID"));
|
|
11692
11716
|
if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.firstName)) missingFields.push(t("NDC_MESSAGE_FIRST_NAME"));
|
|
11693
11717
|
if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.lastName)) missingFields.push(t("NDC_MESSAGE_LAST_NAME"));
|
|
@@ -11701,8 +11725,12 @@ const NewNDCStepFormOne = ({
|
|
|
11701
11725
|
if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.firstName && !nameRegex.test(propertyDetails.firstName)) {
|
|
11702
11726
|
invalidFields.push(t("NDC_MESSAGE_FIRST_NAME_ONLY_ALPHABETS_ALLOWED"));
|
|
11703
11727
|
}
|
|
11704
|
-
if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.lastName
|
|
11705
|
-
|
|
11728
|
+
if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.lastName) {
|
|
11729
|
+
if (!nameRegex.test(propertyDetails.lastName)) {
|
|
11730
|
+
invalidFields.push(t("NDC_MESSAGE_LAST_NAME_ONLY_ALPHABETS_ALLOWED"));
|
|
11731
|
+
} else if (propertyDetails.lastName.length > 100) {
|
|
11732
|
+
invalidFields.push(t("NDC_MESSAGE_LAST_NAME_MAX_100_CHARACTERS"));
|
|
11733
|
+
}
|
|
11706
11734
|
}
|
|
11707
11735
|
if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.email && !emailRegex.test(propertyDetails.email)) {
|
|
11708
11736
|
invalidFields.push(t("NDC_MESSAGE_EMAIL_INVALID_FORMAT"));
|
|
@@ -11834,7 +11862,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
11834
11862
|
formState,
|
|
11835
11863
|
clearErrors
|
|
11836
11864
|
}) => {
|
|
11837
|
-
var _formData$cpt, _formData$cpt$details, _formData$cpt3, _Digit, _Digit$ComponentRegis, _formData$cpt4,
|
|
11865
|
+
var _formData$cpt, _formData$cpt$details, _formData$cpt3, _Digit, _Digit$ComponentRegis, _formData$cpt4, _propertyDetails$wate, _propertyDetails$sewe;
|
|
11838
11866
|
const {
|
|
11839
11867
|
control,
|
|
11840
11868
|
formState: localFormState,
|
|
@@ -12002,6 +12030,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12002
12030
|
consumerCode: consumercodes
|
|
12003
12031
|
});
|
|
12004
12032
|
setPropertyLoader(false);
|
|
12033
|
+
console.log("result======???????", result);
|
|
12005
12034
|
if ((result === null || result === void 0 ? void 0 : (_result$Bill = result.Bill) === null || _result$Bill === void 0 ? void 0 : _result$Bill.length) > 0) {
|
|
12006
12035
|
var _result$Bill$;
|
|
12007
12036
|
if ((result === null || result === void 0 ? void 0 : (_result$Bill$ = result.Bill[0]) === null || _result$Bill$ === void 0 ? void 0 : _result$Bill$.totalAmount) > 0) {
|
|
@@ -12044,11 +12073,14 @@ const PropertyDetailsForm$1 = ({
|
|
|
12044
12073
|
}
|
|
12045
12074
|
} else if (result !== null && result !== void 0 && result.Bill) {
|
|
12046
12075
|
setShowToast({
|
|
12047
|
-
error:
|
|
12076
|
+
error: false,
|
|
12048
12077
|
label: t("NDC_MESSAGE_NO_BILLS_FOUND_FOR_THIS_CONSUMER_NUMBER")
|
|
12049
12078
|
});
|
|
12050
12079
|
if (bussinessService === "WS") {
|
|
12051
12080
|
const updated = [...propertyDetails.waterConnection];
|
|
12081
|
+
updated[index].billData = {
|
|
12082
|
+
totalAmount: 0
|
|
12083
|
+
};
|
|
12052
12084
|
updated[index].isLoading = false;
|
|
12053
12085
|
setPropertyDetails(prev => ({
|
|
12054
12086
|
...prev,
|
|
@@ -12056,6 +12088,9 @@ const PropertyDetailsForm$1 = ({
|
|
|
12056
12088
|
}));
|
|
12057
12089
|
} else if (bussinessService === "SW") {
|
|
12058
12090
|
const updated = [...propertyDetails.sewerageConnection];
|
|
12091
|
+
updated[index].billData = {
|
|
12092
|
+
totalAmount: 0
|
|
12093
|
+
};
|
|
12059
12094
|
updated[index].isLoading = false;
|
|
12060
12095
|
setPropertyDetails(prev => ({
|
|
12061
12096
|
...prev,
|
|
@@ -12073,12 +12108,15 @@ const PropertyDetailsForm$1 = ({
|
|
|
12073
12108
|
}
|
|
12074
12109
|
} else {
|
|
12075
12110
|
setShowToast({
|
|
12076
|
-
error:
|
|
12077
|
-
label: t("
|
|
12111
|
+
error: false,
|
|
12112
|
+
label: t("NDC_MESSAGE_NO_BILLS_FOUND_FOR_THIS_CONSUMER_NUMBER")
|
|
12078
12113
|
});
|
|
12079
12114
|
if (bussinessService === "WS") {
|
|
12080
12115
|
const updated = [...propertyDetails.waterConnection];
|
|
12081
12116
|
updated[index].isLoading = false;
|
|
12117
|
+
updated[index].billData = {
|
|
12118
|
+
totalAmount: 0
|
|
12119
|
+
};
|
|
12082
12120
|
setPropertyDetails(prev => ({
|
|
12083
12121
|
...prev,
|
|
12084
12122
|
waterConnection: updated
|
|
@@ -12086,6 +12124,9 @@ const PropertyDetailsForm$1 = ({
|
|
|
12086
12124
|
} else if (bussinessService === "SW") {
|
|
12087
12125
|
const updated = [...propertyDetails.sewerageConnection];
|
|
12088
12126
|
updated[index].isLoading = false;
|
|
12127
|
+
updated[index].billData = {
|
|
12128
|
+
totalAmount: 0
|
|
12129
|
+
};
|
|
12089
12130
|
setPropertyDetails(prev => ({
|
|
12090
12131
|
...prev,
|
|
12091
12132
|
sewerageConnection: updated
|
|
@@ -12174,44 +12215,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12174
12215
|
style: {
|
|
12175
12216
|
marginBottom: "16px"
|
|
12176
12217
|
}
|
|
12177
|
-
}, (formData === null || formData === void 0 ? void 0 : (_formData$cpt4 = formData.cpt) === null || _formData$cpt4 === void 0 ? void 0 : _formData$cpt4.details) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair,
|
|
12178
|
-
className: "field",
|
|
12179
|
-
style: {
|
|
12180
|
-
display: "flex",
|
|
12181
|
-
flexDirection: "column",
|
|
12182
|
-
gap: "4px"
|
|
12183
|
-
}
|
|
12184
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
12185
|
-
style: {
|
|
12186
|
-
display: "flex",
|
|
12187
|
-
flexDirection: "row"
|
|
12188
|
-
}
|
|
12189
|
-
}, propertyLoader ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", null, (formData === null || formData === void 0 ? void 0 : (_formData$cpt5 = formData.cpt) === null || _formData$cpt5 === void 0 ? void 0 : _formData$cpt5.id) && !(propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$prop = propertyDetails.propertyBillData) !== null && _propertyDetails$prop !== void 0 && (_propertyDetails$prop2 = _propertyDetails$prop.billData) !== null && _propertyDetails$prop2 !== void 0 && _propertyDetails$prop2.id) && /*#__PURE__*/React.createElement("button", {
|
|
12190
|
-
className: "submit-bar",
|
|
12191
|
-
type: "button",
|
|
12192
|
-
style: {
|
|
12193
|
-
color: "white",
|
|
12194
|
-
fontSize: "13px"
|
|
12195
|
-
},
|
|
12196
|
-
onClick: () => {
|
|
12197
|
-
var _formData$cpt6;
|
|
12198
|
-
fetchBill("PT", formData === null || formData === void 0 ? void 0 : (_formData$cpt6 = formData.cpt) === null || _formData$cpt6 === void 0 ? void 0 : _formData$cpt6.id);
|
|
12199
|
-
}
|
|
12200
|
-
}, "Check Status for Property"), (formData === null || formData === void 0 ? void 0 : (_formData$cpt7 = formData.cpt) === null || _formData$cpt7 === void 0 ? void 0 : _formData$cpt7.id) && (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$prop3 = propertyDetails.propertyBillData) === null || _propertyDetails$prop3 === void 0 ? void 0 : (_propertyDetails$prop4 = _propertyDetails$prop3.billData) === null || _propertyDetails$prop4 === void 0 ? void 0 : _propertyDetails$prop4.totalAmount) > 0 && /*#__PURE__*/React.createElement("button", {
|
|
12201
|
-
className: "submit-bar",
|
|
12202
|
-
type: "button",
|
|
12203
|
-
style: {
|
|
12204
|
-
color: "white"
|
|
12205
|
-
},
|
|
12206
|
-
onClick: () => {
|
|
12207
|
-
var _propertyDetails$prop5;
|
|
12208
|
-
redirectToPayBill(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$prop5 = propertyDetails.propertyBillData) === null || _propertyDetails$prop5 === void 0 ? void 0 : _propertyDetails$prop5.billData);
|
|
12209
|
-
}
|
|
12210
|
-
}, `${t("PAY_DUES")}`), (formData === null || formData === void 0 ? void 0 : (_formData$cpt8 = formData.cpt) === null || _formData$cpt8 === void 0 ? void 0 : _formData$cpt8.id) && (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$prop6 = propertyDetails.propertyBillData) === null || _propertyDetails$prop6 === void 0 ? void 0 : (_propertyDetails$prop7 = _propertyDetails$prop6.billData) === null || _propertyDetails$prop7 === void 0 ? void 0 : _propertyDetails$prop7.totalAmount) == 0 && /*#__PURE__*/React.createElement("div", {
|
|
12211
|
-
style: {
|
|
12212
|
-
color: "green"
|
|
12213
|
-
}
|
|
12214
|
-
}, t("NO_DUES_FOUND_FOR_PROPERTY")))))), /*#__PURE__*/React.createElement(LabelFieldPair, {
|
|
12218
|
+
}, (formData === null || formData === void 0 ? void 0 : (_formData$cpt4 = formData.cpt) === null || _formData$cpt4 === void 0 ? void 0 : _formData$cpt4.details) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, {
|
|
12215
12219
|
style: {
|
|
12216
12220
|
marginTop: "40px"
|
|
12217
12221
|
}
|
|
@@ -12222,11 +12226,13 @@ const PropertyDetailsForm$1 = ({
|
|
|
12222
12226
|
style: {
|
|
12223
12227
|
display: "flex",
|
|
12224
12228
|
flexDirection: "column",
|
|
12225
|
-
gap: "8px"
|
|
12229
|
+
gap: "8px",
|
|
12230
|
+
width: "100%"
|
|
12226
12231
|
}
|
|
12227
12232
|
}, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.map((item, index) => {
|
|
12228
|
-
var _item$billData, _item$billData2, _item$billData3;
|
|
12233
|
+
var _item$billData, _item$billData2, _item$billData3, _item$billData4;
|
|
12229
12234
|
return /*#__PURE__*/React.createElement("div", {
|
|
12235
|
+
className: "ndc_property_search",
|
|
12230
12236
|
key: index,
|
|
12231
12237
|
style: {
|
|
12232
12238
|
display: "flex",
|
|
@@ -12265,7 +12271,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12265
12271
|
alignItems: "center",
|
|
12266
12272
|
gap: "12px"
|
|
12267
12273
|
}
|
|
12268
|
-
}, (item === null || item === void 0 ? void 0 : item.connectionNo) && !(item !== null && item !== void 0 && (_item$billData = item.billData) !== null && _item$billData !== void 0 && _item$billData.id) && /*#__PURE__*/React.createElement("button", {
|
|
12274
|
+
}, (item === null || item === void 0 ? void 0 : item.connectionNo) && !(item !== null && item !== void 0 && (_item$billData = item.billData) !== null && _item$billData !== void 0 && _item$billData.id) && (item === null || item === void 0 ? void 0 : (_item$billData2 = item.billData) === null || _item$billData2 === void 0 ? void 0 : _item$billData2.totalAmount) != 0 && /*#__PURE__*/React.createElement("button", {
|
|
12269
12275
|
className: "submit-bar",
|
|
12270
12276
|
type: "button",
|
|
12271
12277
|
style: {
|
|
@@ -12275,7 +12281,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12275
12281
|
onClick: () => {
|
|
12276
12282
|
fetchBill("WS", item.connectionNo, index);
|
|
12277
12283
|
}
|
|
12278
|
-
}, "
|
|
12284
|
+
}, `${t("CHECK_STATUS_WATER")}`), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$billData3 = item.billData) === null || _item$billData3 === void 0 ? void 0 : _item$billData3.totalAmount) > 0 && /*#__PURE__*/React.createElement("button", {
|
|
12279
12285
|
className: "submit-bar",
|
|
12280
12286
|
type: "button",
|
|
12281
12287
|
style: {
|
|
@@ -12284,7 +12290,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12284
12290
|
onClick: () => {
|
|
12285
12291
|
redirectToPayBill(item === null || item === void 0 ? void 0 : item.billData, index, item.isEdit);
|
|
12286
12292
|
}
|
|
12287
|
-
}, `${t("PAY_DUES")}`), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$
|
|
12293
|
+
}, `${t("PAY_DUES")}`), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$billData4 = item.billData) === null || _item$billData4 === void 0 ? void 0 : _item$billData4.totalAmount) == 0 && /*#__PURE__*/React.createElement("div", {
|
|
12288
12294
|
style: {
|
|
12289
12295
|
color: "green"
|
|
12290
12296
|
}
|
|
@@ -12311,7 +12317,8 @@ const PropertyDetailsForm$1 = ({
|
|
|
12311
12317
|
className: "submit-bar",
|
|
12312
12318
|
type: "button",
|
|
12313
12319
|
style: {
|
|
12314
|
-
color: "white"
|
|
12320
|
+
color: "white",
|
|
12321
|
+
fontSize: "12px"
|
|
12315
12322
|
},
|
|
12316
12323
|
onClick: () => {
|
|
12317
12324
|
addWaterConnection();
|
|
@@ -12327,11 +12334,13 @@ const PropertyDetailsForm$1 = ({
|
|
|
12327
12334
|
style: {
|
|
12328
12335
|
display: "flex",
|
|
12329
12336
|
flexDirection: "column",
|
|
12330
|
-
gap: "8px"
|
|
12337
|
+
gap: "8px",
|
|
12338
|
+
width: "100%"
|
|
12331
12339
|
}
|
|
12332
12340
|
}, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$sewe = propertyDetails.sewerageConnection) === null || _propertyDetails$sewe === void 0 ? void 0 : _propertyDetails$sewe.map((item, index) => {
|
|
12333
|
-
var _item$
|
|
12341
|
+
var _item$billData5, _item$billData6, _item$billData7, _item$billData8;
|
|
12334
12342
|
return /*#__PURE__*/React.createElement("div", {
|
|
12343
|
+
className: "ndc_property_search",
|
|
12335
12344
|
key: index,
|
|
12336
12345
|
style: {
|
|
12337
12346
|
display: "flex",
|
|
@@ -12370,7 +12379,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12370
12379
|
alignItems: "center",
|
|
12371
12380
|
gap: "12px"
|
|
12372
12381
|
}
|
|
12373
|
-
}, (item === null || item === void 0 ? void 0 : item.connectionNo) && !(item !== null && item !== void 0 && (_item$
|
|
12382
|
+
}, (item === null || item === void 0 ? void 0 : item.connectionNo) && !(item !== null && item !== void 0 && (_item$billData5 = item.billData) !== null && _item$billData5 !== void 0 && _item$billData5.id) && (item === null || item === void 0 ? void 0 : (_item$billData6 = item.billData) === null || _item$billData6 === void 0 ? void 0 : _item$billData6.totalAmount) != 0 && /*#__PURE__*/React.createElement("button", {
|
|
12374
12383
|
className: "submit-bar",
|
|
12375
12384
|
type: "button",
|
|
12376
12385
|
style: {
|
|
@@ -12380,7 +12389,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12380
12389
|
onClick: () => {
|
|
12381
12390
|
fetchBill("SW", item.connectionNo, index);
|
|
12382
12391
|
}
|
|
12383
|
-
}, "
|
|
12392
|
+
}, `${t("CHECK_STATUS_SEWERAGE")}`), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$billData7 = item.billData) === null || _item$billData7 === void 0 ? void 0 : _item$billData7.totalAmount) > 0 && /*#__PURE__*/React.createElement("button", {
|
|
12384
12393
|
className: "submit-bar",
|
|
12385
12394
|
type: "button",
|
|
12386
12395
|
style: {
|
|
@@ -12389,7 +12398,11 @@ const PropertyDetailsForm$1 = ({
|
|
|
12389
12398
|
onClick: () => {
|
|
12390
12399
|
redirectToPayBill(item === null || item === void 0 ? void 0 : item.billData, index);
|
|
12391
12400
|
}
|
|
12392
|
-
}, `${t("PAY_DUES")}`), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$
|
|
12401
|
+
}, `${t("PAY_DUES")}`), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$billData8 = item.billData) === null || _item$billData8 === void 0 ? void 0 : _item$billData8.totalAmount) == 0 && /*#__PURE__*/React.createElement("div", {
|
|
12402
|
+
style: {
|
|
12403
|
+
color: "green"
|
|
12404
|
+
}
|
|
12405
|
+
}, t("NO_DUES")), (item === null || item === void 0 ? void 0 : item.isEdit) && /*#__PURE__*/React.createElement("button", {
|
|
12393
12406
|
onClick: () => {
|
|
12394
12407
|
let updated = [...propertyDetails.sewerageConnection];
|
|
12395
12408
|
updated.splice(index, 1);
|
|
@@ -12412,7 +12425,8 @@ const PropertyDetailsForm$1 = ({
|
|
|
12412
12425
|
className: "submit-bar",
|
|
12413
12426
|
type: "button",
|
|
12414
12427
|
style: {
|
|
12415
|
-
color: "white"
|
|
12428
|
+
color: "white",
|
|
12429
|
+
fontSize: " 12px"
|
|
12416
12430
|
},
|
|
12417
12431
|
onClick: () => {
|
|
12418
12432
|
addSewerageConnection();
|
|
@@ -12436,7 +12450,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12436
12450
|
}
|
|
12437
12451
|
},
|
|
12438
12452
|
render: props => {
|
|
12439
|
-
var _formData$
|
|
12453
|
+
var _formData$cpt5, _formData$cpt5$detail, _formData$cpt5$detail2, _formData$cpt5$detail3, _formData$cpt5$detail4, _formData$cpt5$detail5, _formData$cpt5$detail6;
|
|
12440
12454
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
12441
12455
|
value: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.firstName) || "",
|
|
12442
12456
|
onChange: e => {
|
|
@@ -12449,7 +12463,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12449
12463
|
onBlur: e => {
|
|
12450
12464
|
props.onBlur(e);
|
|
12451
12465
|
},
|
|
12452
|
-
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12466
|
+
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$cpt5 = formData.cpt) === null || _formData$cpt5 === void 0 ? void 0 : (_formData$cpt5$detail = _formData$cpt5.details) === null || _formData$cpt5$detail === void 0 ? void 0 : (_formData$cpt5$detail2 = _formData$cpt5$detail.owners) === null || _formData$cpt5$detail2 === void 0 ? void 0 : (_formData$cpt5$detail3 = _formData$cpt5$detail2[0]) === null || _formData$cpt5$detail3 === void 0 ? void 0 : (_formData$cpt5$detail4 = _formData$cpt5$detail3.name) === null || _formData$cpt5$detail4 === void 0 ? void 0 : (_formData$cpt5$detail5 = _formData$cpt5$detail4.split(" ")) === null || _formData$cpt5$detail5 === void 0 ? void 0 : (_formData$cpt5$detail6 = _formData$cpt5$detail5[0]) === null || _formData$cpt5$detail6 === void 0 ? void 0 : _formData$cpt5$detail6.length) > 0
|
|
12453
12467
|
});
|
|
12454
12468
|
}
|
|
12455
12469
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
@@ -12467,7 +12481,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12467
12481
|
}
|
|
12468
12482
|
},
|
|
12469
12483
|
render: props => {
|
|
12470
|
-
var _formData$
|
|
12484
|
+
var _formData$cpt6, _formData$cpt6$detail, _formData$cpt6$detail2, _formData$cpt6$detail3, _formData$cpt6$detail4, _formData$cpt6$detail5, _formData$cpt6$detail6;
|
|
12471
12485
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
12472
12486
|
value: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.lastName) || "",
|
|
12473
12487
|
onChange: e => {
|
|
@@ -12480,7 +12494,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12480
12494
|
onBlur: e => {
|
|
12481
12495
|
props.onBlur(e);
|
|
12482
12496
|
},
|
|
12483
|
-
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12497
|
+
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$cpt6 = formData.cpt) === null || _formData$cpt6 === void 0 ? void 0 : (_formData$cpt6$detail = _formData$cpt6.details) === null || _formData$cpt6$detail === void 0 ? void 0 : (_formData$cpt6$detail2 = _formData$cpt6$detail.owners) === null || _formData$cpt6$detail2 === void 0 ? void 0 : (_formData$cpt6$detail3 = _formData$cpt6$detail2[0]) === null || _formData$cpt6$detail3 === void 0 ? void 0 : (_formData$cpt6$detail4 = _formData$cpt6$detail3.name) === null || _formData$cpt6$detail4 === void 0 ? void 0 : (_formData$cpt6$detail5 = _formData$cpt6$detail4.split(" ")) === null || _formData$cpt6$detail5 === void 0 ? void 0 : (_formData$cpt6$detail6 = _formData$cpt6$detail5[1]) === null || _formData$cpt6$detail6 === void 0 ? void 0 : _formData$cpt6$detail6.length) > 0
|
|
12484
12498
|
});
|
|
12485
12499
|
}
|
|
12486
12500
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
@@ -12492,7 +12506,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12492
12506
|
name: "email",
|
|
12493
12507
|
defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.email) || "",
|
|
12494
12508
|
render: props => {
|
|
12495
|
-
var _formData$
|
|
12509
|
+
var _formData$cpt7, _formData$cpt7$detail, _formData$cpt7$detail2, _formData$cpt7$detail3, _formData$cpt7$detail4;
|
|
12496
12510
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
12497
12511
|
value: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.email,
|
|
12498
12512
|
onChange: e => {
|
|
@@ -12505,7 +12519,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12505
12519
|
onBlur: e => {
|
|
12506
12520
|
props.onBlur(e);
|
|
12507
12521
|
},
|
|
12508
|
-
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12522
|
+
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$cpt7 = formData.cpt) === null || _formData$cpt7 === void 0 ? void 0 : (_formData$cpt7$detail = _formData$cpt7.details) === null || _formData$cpt7$detail === void 0 ? void 0 : (_formData$cpt7$detail2 = _formData$cpt7$detail.owners) === null || _formData$cpt7$detail2 === void 0 ? void 0 : (_formData$cpt7$detail3 = _formData$cpt7$detail2[0]) === null || _formData$cpt7$detail3 === void 0 ? void 0 : (_formData$cpt7$detail4 = _formData$cpt7$detail3.email) === null || _formData$cpt7$detail4 === void 0 ? void 0 : _formData$cpt7$detail4.length) > 0
|
|
12509
12523
|
});
|
|
12510
12524
|
}
|
|
12511
12525
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
@@ -12538,7 +12552,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12538
12552
|
name: "address",
|
|
12539
12553
|
defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address) || "",
|
|
12540
12554
|
render: props => {
|
|
12541
|
-
var _formData$
|
|
12555
|
+
var _formData$cpt8, _formData$cpt8$detail, _formData$cpt8$detail2, _formData$cpt8$detail3, _formData$cpt8$detail4;
|
|
12542
12556
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
12543
12557
|
value: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address,
|
|
12544
12558
|
onChange: e => {
|
|
@@ -12551,7 +12565,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12551
12565
|
onBlur: e => {
|
|
12552
12566
|
props.onBlur(e);
|
|
12553
12567
|
},
|
|
12554
|
-
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12568
|
+
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$cpt8 = formData.cpt) === null || _formData$cpt8 === void 0 ? void 0 : (_formData$cpt8$detail = _formData$cpt8.details) === null || _formData$cpt8$detail === void 0 ? void 0 : (_formData$cpt8$detail2 = _formData$cpt8$detail.owners) === null || _formData$cpt8$detail2 === void 0 ? void 0 : (_formData$cpt8$detail3 = _formData$cpt8$detail2[0]) === null || _formData$cpt8$detail3 === void 0 ? void 0 : (_formData$cpt8$detail4 = _formData$cpt8$detail3.permanentAddress) === null || _formData$cpt8$detail4 === void 0 ? void 0 : _formData$cpt8$detail4.length) > 0
|
|
12555
12569
|
});
|
|
12556
12570
|
}
|
|
12557
12571
|
})))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
@@ -12595,28 +12609,23 @@ const getAddress = (address, t) => {
|
|
|
12595
12609
|
const PropertySearchNSummary = ({
|
|
12596
12610
|
config,
|
|
12597
12611
|
onSelect,
|
|
12598
|
-
|
|
12599
|
-
formData,
|
|
12600
|
-
setError,
|
|
12601
|
-
formState,
|
|
12602
|
-
clearErrors
|
|
12612
|
+
formData
|
|
12603
12613
|
}) => {
|
|
12604
|
-
var _formData$cpt, _formData$cpt2, _propertyDetails$Prop3;
|
|
12614
|
+
var _formData$cpt, _formData$cpt2, _propertyDetails$Prop3, _formData$cpt11, _formData$cpt12, _formData$cpt14, _formData$cpt15, _formData$cpt15$dues, _formData$cpt17, _formData$cpt18, _formData$cpt18$dues;
|
|
12605
12615
|
const {
|
|
12606
12616
|
t
|
|
12607
12617
|
} = useTranslation();
|
|
12608
|
-
const
|
|
12618
|
+
const myElementRef = useRef(null);
|
|
12609
12619
|
let {
|
|
12610
12620
|
pathname,
|
|
12611
12621
|
state
|
|
12612
12622
|
} = useLocation();
|
|
12613
12623
|
state = state && (typeof state === "string" || state instanceof String) ? JSON.parse(state) : state;
|
|
12614
12624
|
const isEditScreen = pathname.includes("/modify-application/");
|
|
12615
|
-
const tenantId = Digit.ULBService.getCurrentPermanentCity();
|
|
12616
|
-
const isEmpNewApplication = window.location.href.includes("/employee/tl/new-application") || window.location.href.includes("/citizen/tl/tradelicence/new-application");
|
|
12617
|
-
const isEmpRenewLicense = window.location.href.includes("/employee/tl/renew-application-details") || window.location.href.includes("/employee/tl/edit-application-details");
|
|
12625
|
+
const tenantId = window.location.href.includes("employee") ? Digit.ULBService.getCurrentPermanentCity() : localStorage.getItem("CITIZEN.CITY");
|
|
12618
12626
|
const search = useLocation().search;
|
|
12619
12627
|
const urlPropertyId = new URLSearchParams(search).get("propertyId");
|
|
12628
|
+
const isfirstRender = useRef(true);
|
|
12620
12629
|
const [propertyId, setPropertyId] = useState((formData === null || formData === void 0 ? void 0 : (_formData$cpt = formData.cpt) === null || _formData$cpt === void 0 ? void 0 : _formData$cpt.id) || (urlPropertyId !== "null" ? urlPropertyId : "") || "");
|
|
12621
12630
|
const [searchPropertyId, setSearchPropertyId] = useState(formData !== null && formData !== void 0 && (_formData$cpt2 = formData.cpt) !== null && _formData$cpt2 !== void 0 && _formData$cpt2.id || urlPropertyId !== "null" ? urlPropertyId : "");
|
|
12622
12631
|
const [showToast, setShowToast] = useState(null);
|
|
@@ -12635,9 +12644,22 @@ const PropertySearchNSummary = ({
|
|
|
12635
12644
|
};
|
|
12636
12645
|
}
|
|
12637
12646
|
});
|
|
12638
|
-
const
|
|
12639
|
-
|
|
12640
|
-
|
|
12647
|
+
const [propertyDues, setPropertyDues] = useState(() => {
|
|
12648
|
+
var _formData$cpt6, _formData$cpt7;
|
|
12649
|
+
if (formData !== null && formData !== void 0 && (_formData$cpt6 = formData.cpt) !== null && _formData$cpt6 !== void 0 && _formData$cpt6.dues && Object.keys(formData === null || formData === void 0 ? void 0 : (_formData$cpt7 = formData.cpt) === null || _formData$cpt7 === void 0 ? void 0 : _formData$cpt7.dues).length > 0) {
|
|
12650
|
+
var _formData$cpt8;
|
|
12651
|
+
return {
|
|
12652
|
+
dues: {
|
|
12653
|
+
...(formData === null || formData === void 0 ? void 0 : (_formData$cpt8 = formData.cpt) === null || _formData$cpt8 === void 0 ? void 0 : _formData$cpt8.dues)
|
|
12654
|
+
}
|
|
12655
|
+
};
|
|
12656
|
+
} else {
|
|
12657
|
+
return {
|
|
12658
|
+
dues: {}
|
|
12659
|
+
};
|
|
12660
|
+
}
|
|
12661
|
+
});
|
|
12662
|
+
const [isSearchClicked, setIsSearchClicked] = useState(false);
|
|
12641
12663
|
const {
|
|
12642
12664
|
isLoading,
|
|
12643
12665
|
isError,
|
|
@@ -12656,19 +12678,18 @@ const PropertySearchNSummary = ({
|
|
|
12656
12678
|
enabled: searchPropertyId ? true : false,
|
|
12657
12679
|
privacy: Digit.Utils.getPrivacyObject()
|
|
12658
12680
|
});
|
|
12659
|
-
const isfirstRender = useRef(true);
|
|
12660
12681
|
useEffect(() => {
|
|
12661
12682
|
var _propertyDetailsFetch;
|
|
12662
12683
|
if (propertyDetailsFetch && propertyDetailsFetch !== null && propertyDetailsFetch !== void 0 && propertyDetailsFetch.Properties && (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch === void 0 ? void 0 : _propertyDetailsFetch.length) > 0) {
|
|
12663
12684
|
setPropertyDetails(propertyDetailsFetch);
|
|
12664
12685
|
setShowToast(null);
|
|
12665
12686
|
} else {
|
|
12666
|
-
var _formData$
|
|
12687
|
+
var _formData$cpt9;
|
|
12667
12688
|
if (isfirstRender.current) {
|
|
12668
12689
|
isfirstRender.current = false;
|
|
12669
12690
|
return;
|
|
12670
12691
|
}
|
|
12671
|
-
if (!(formData !== null && formData !== void 0 && (_formData$
|
|
12692
|
+
if (!(formData !== null && formData !== void 0 && (_formData$cpt9 = formData.cpt) !== null && _formData$cpt9 !== void 0 && _formData$cpt9.details)) {
|
|
12672
12693
|
console.log("Property Id not found in response", propertyId);
|
|
12673
12694
|
setPropertyDetails({});
|
|
12674
12695
|
setShowToast({
|
|
@@ -12698,6 +12719,12 @@ const PropertySearchNSummary = ({
|
|
|
12698
12719
|
details: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop2 = propertyDetails.Properties) === null || _propertyDetails$Prop2 === void 0 ? void 0 : _propertyDetails$Prop2[0]
|
|
12699
12720
|
});
|
|
12700
12721
|
}, [propertyDetails, pathname]);
|
|
12722
|
+
useEffect(() => {
|
|
12723
|
+
onSelect(config.key, {
|
|
12724
|
+
...formData[config.key],
|
|
12725
|
+
dues: propertyDues === null || propertyDues === void 0 ? void 0 : propertyDues.dues
|
|
12726
|
+
});
|
|
12727
|
+
}, [propertyDues, pathname]);
|
|
12701
12728
|
const searchProperty = () => {
|
|
12702
12729
|
if (!propertyId) {
|
|
12703
12730
|
setShowToast({
|
|
@@ -12711,8 +12738,14 @@ const PropertySearchNSummary = ({
|
|
|
12711
12738
|
Properties: []
|
|
12712
12739
|
});
|
|
12713
12740
|
setSearchPropertyId(propertyId);
|
|
12741
|
+
setIsSearchClicked(true);
|
|
12714
12742
|
}
|
|
12715
12743
|
};
|
|
12744
|
+
const handlePropertyChange = e => {
|
|
12745
|
+
setPropertyId(e.target.value);
|
|
12746
|
+
setValue(e.target.value, propertyIdInput.name);
|
|
12747
|
+
setIsSearchClicked(false);
|
|
12748
|
+
};
|
|
12716
12749
|
if (isEditScreen) {
|
|
12717
12750
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
12718
12751
|
}
|
|
@@ -12743,7 +12776,65 @@ const PropertySearchNSummary = ({
|
|
|
12743
12776
|
function getValue(input) {
|
|
12744
12777
|
return formData && formData[config.key] ? formData[config.key][input] : undefined;
|
|
12745
12778
|
}
|
|
12746
|
-
|
|
12779
|
+
async function fetchBill() {
|
|
12780
|
+
try {
|
|
12781
|
+
var _formData$cpt0, _result$Bill;
|
|
12782
|
+
const result = await Digit.PaymentService.fetchBill(tenantId, {
|
|
12783
|
+
businessService: "PT",
|
|
12784
|
+
consumerCode: formData === null || formData === void 0 ? void 0 : (_formData$cpt0 = formData.cpt) === null || _formData$cpt0 === void 0 ? void 0 : _formData$cpt0.id
|
|
12785
|
+
});
|
|
12786
|
+
if ((result === null || result === void 0 ? void 0 : (_result$Bill = result.Bill) === null || _result$Bill === void 0 ? void 0 : _result$Bill.length) > 0) {
|
|
12787
|
+
var _result$Bill$;
|
|
12788
|
+
if ((result === null || result === void 0 ? void 0 : (_result$Bill$ = result.Bill[0]) === null || _result$Bill$ === void 0 ? void 0 : _result$Bill$.totalAmount) > 0) {
|
|
12789
|
+
setShowToast({
|
|
12790
|
+
error: true,
|
|
12791
|
+
label: t("NDC_MESSAGE_DUES_FOUND_PLEASE_PAY")
|
|
12792
|
+
});
|
|
12793
|
+
} else {
|
|
12794
|
+
setShowToast({
|
|
12795
|
+
error: false,
|
|
12796
|
+
label: t("NDC_MESSAGE_NO_DUES_FOUND")
|
|
12797
|
+
});
|
|
12798
|
+
}
|
|
12799
|
+
setPropertyDues({
|
|
12800
|
+
dues: result === null || result === void 0 ? void 0 : result.Bill[0]
|
|
12801
|
+
});
|
|
12802
|
+
} else if (result !== null && result !== void 0 && result.Bill) {
|
|
12803
|
+
setShowToast({
|
|
12804
|
+
error: false,
|
|
12805
|
+
label: t("NDC_MESSAGE_NO_BILLS_FOUND_FOR_THIS_CONSUMER_NUMBER")
|
|
12806
|
+
});
|
|
12807
|
+
setPropertyDues({
|
|
12808
|
+
dues: {
|
|
12809
|
+
totalAmount: 0
|
|
12810
|
+
}
|
|
12811
|
+
});
|
|
12812
|
+
} else {
|
|
12813
|
+
setShowToast({
|
|
12814
|
+
error: false,
|
|
12815
|
+
label: t("NDC_MESSAGE_NO_BILLS_FOUND_FOR_THIS_CONSUMER_NUMBER")
|
|
12816
|
+
});
|
|
12817
|
+
setPropertyDues({
|
|
12818
|
+
dues: {
|
|
12819
|
+
totalAmount: 0
|
|
12820
|
+
}
|
|
12821
|
+
});
|
|
12822
|
+
}
|
|
12823
|
+
} catch (error) {
|
|
12824
|
+
setShowToast({
|
|
12825
|
+
error: true,
|
|
12826
|
+
label: t("NDC_MESSAGE_FETCH_FAILED")
|
|
12827
|
+
});
|
|
12828
|
+
}
|
|
12829
|
+
}
|
|
12830
|
+
function redirectToPayBill(billData, index, isEdit) {
|
|
12831
|
+
var _formData$cpt1, _formData$cpt10, _formData$cpt10$detai;
|
|
12832
|
+
const userType = window.location.href.includes("employee") ? "employee" : "citizen";
|
|
12833
|
+
const payUrl = "https://sdc-uat.lgpunjab.gov.in" + `/${userType}/egov-common/pay?consumerCode=${formData === null || formData === void 0 ? void 0 : (_formData$cpt1 = formData.cpt) === null || _formData$cpt1 === void 0 ? void 0 : _formData$cpt1.id}&tenantId=${formData === null || formData === void 0 ? void 0 : (_formData$cpt10 = formData.cpt) === null || _formData$cpt10 === void 0 ? void 0 : (_formData$cpt10$detai = _formData$cpt10.details) === null || _formData$cpt10$detai === void 0 ? void 0 : _formData$cpt10$detai.tenantId}&businessService=PT`;
|
|
12834
|
+
window.open(payUrl, "_blank");
|
|
12835
|
+
setPropertyDues({});
|
|
12836
|
+
}
|
|
12837
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, isLoading && /*#__PURE__*/React.createElement(Loader, null), /*#__PURE__*/React.createElement("div", {
|
|
12747
12838
|
style: {
|
|
12748
12839
|
marginBottom: "16px"
|
|
12749
12840
|
}
|
|
@@ -12751,36 +12842,62 @@ const PropertySearchNSummary = ({
|
|
|
12751
12842
|
className: "card-label-smaller",
|
|
12752
12843
|
style: getInputStyles()
|
|
12753
12844
|
}, `${t(propertyIdInput.label)}`, null), /*#__PURE__*/React.createElement("div", {
|
|
12754
|
-
className: "field",
|
|
12845
|
+
className: "field ndc_property_search",
|
|
12755
12846
|
style: {
|
|
12756
12847
|
marginTop: "20px",
|
|
12757
|
-
display: "flex"
|
|
12848
|
+
display: "flex",
|
|
12849
|
+
gap: "16px",
|
|
12850
|
+
alignItems: "baseline",
|
|
12851
|
+
width: "100%"
|
|
12758
12852
|
},
|
|
12759
12853
|
ref: myElementRef,
|
|
12760
12854
|
id: "search-property-field"
|
|
12761
12855
|
}, /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
12762
12856
|
key: propertyIdInput.name,
|
|
12763
12857
|
value: getValue(propertyIdInput.name),
|
|
12764
|
-
onChange:
|
|
12765
|
-
setPropertyId(e.target.value);
|
|
12766
|
-
setValue(e.target.value, propertyIdInput.name);
|
|
12767
|
-
},
|
|
12858
|
+
onChange: handlePropertyChange,
|
|
12768
12859
|
disable: false,
|
|
12769
12860
|
maxlength: 16,
|
|
12770
|
-
defaultValue: undefined
|
|
12861
|
+
defaultValue: undefined
|
|
12862
|
+
}, propertyIdInput.validation)), !isSearchClicked && /*#__PURE__*/React.createElement("button", {
|
|
12863
|
+
className: "submit-bar",
|
|
12864
|
+
type: "button",
|
|
12865
|
+
style: {
|
|
12866
|
+
color: "white",
|
|
12867
|
+
width: "100%",
|
|
12868
|
+
maxWidth: "100px"
|
|
12869
|
+
},
|
|
12870
|
+
onClick: searchProperty
|
|
12871
|
+
}, `${t("PT_SEARCH")}`), (formData === null || formData === void 0 ? void 0 : (_formData$cpt11 = formData.cpt) === null || _formData$cpt11 === void 0 ? void 0 : _formData$cpt11.details) && !(formData !== null && formData !== void 0 && (_formData$cpt12 = formData.cpt) !== null && _formData$cpt12 !== void 0 && _formData$cpt12.dues) && /*#__PURE__*/React.createElement("button", {
|
|
12872
|
+
className: "submit-bar",
|
|
12873
|
+
type: "button",
|
|
12771
12874
|
style: {
|
|
12772
|
-
|
|
12773
|
-
|
|
12774
|
-
|
|
12875
|
+
color: "white",
|
|
12876
|
+
fontSize: "13px",
|
|
12877
|
+
width: "100%",
|
|
12878
|
+
maxWidth: "180px"
|
|
12879
|
+
},
|
|
12880
|
+
onClick: () => {
|
|
12881
|
+
fetchBill();
|
|
12775
12882
|
}
|
|
12776
|
-
},
|
|
12883
|
+
}, `${t("CHECK_STATUS_PROPERTY")}`), (formData === null || formData === void 0 ? void 0 : (_formData$cpt14 = formData.cpt) === null || _formData$cpt14 === void 0 ? void 0 : _formData$cpt14.id) && (formData === null || formData === void 0 ? void 0 : (_formData$cpt15 = formData.cpt) === null || _formData$cpt15 === void 0 ? void 0 : (_formData$cpt15$dues = _formData$cpt15.dues) === null || _formData$cpt15$dues === void 0 ? void 0 : _formData$cpt15$dues.totalAmount) > 0 && /*#__PURE__*/React.createElement("button", {
|
|
12777
12884
|
className: "submit-bar",
|
|
12778
12885
|
type: "button",
|
|
12779
12886
|
style: {
|
|
12780
|
-
color: "white"
|
|
12887
|
+
color: "white",
|
|
12888
|
+
width: "100%",
|
|
12889
|
+
maxWidth: "100px"
|
|
12781
12890
|
},
|
|
12782
|
-
onClick:
|
|
12783
|
-
|
|
12891
|
+
onClick: () => {
|
|
12892
|
+
redirectToPayBill();
|
|
12893
|
+
}
|
|
12894
|
+
}, `${t("PAY_DUES")}`), (formData === null || formData === void 0 ? void 0 : (_formData$cpt17 = formData.cpt) === null || _formData$cpt17 === void 0 ? void 0 : _formData$cpt17.id) && (formData === null || formData === void 0 ? void 0 : (_formData$cpt18 = formData.cpt) === null || _formData$cpt18 === void 0 ? void 0 : (_formData$cpt18$dues = _formData$cpt18.dues) === null || _formData$cpt18$dues === void 0 ? void 0 : _formData$cpt18$dues.totalAmount) == 0 && /*#__PURE__*/React.createElement("div", {
|
|
12895
|
+
style: {
|
|
12896
|
+
color: "green",
|
|
12897
|
+
width: "100%",
|
|
12898
|
+
maxWidth: "75px"
|
|
12899
|
+
}
|
|
12900
|
+
}, t("NO_DUES_FOUND_FOR_PROPERTY")))), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
12784
12901
|
isDleteBtn: true,
|
|
12785
12902
|
labelstyle: {
|
|
12786
12903
|
width: "100%"
|
|
@@ -13493,8 +13610,8 @@ const PayWSBillModal = ({
|
|
|
13493
13610
|
};
|
|
13494
13611
|
|
|
13495
13612
|
const createEmployeeConfig$1 = [{
|
|
13496
|
-
head: "
|
|
13497
|
-
stepLabel: "
|
|
13613
|
+
head: "Applicant Details",
|
|
13614
|
+
stepLabel: "Applicant Details",
|
|
13498
13615
|
stepNumber: 1,
|
|
13499
13616
|
isStepEnabled: true,
|
|
13500
13617
|
type: "component",
|
|
@@ -13555,7 +13672,7 @@ const NewNDCStepForm$1 = () => {
|
|
|
13555
13672
|
color: "#1C1D1F"
|
|
13556
13673
|
},
|
|
13557
13674
|
divider: true
|
|
13558
|
-
}, t("
|
|
13675
|
+
}, t("ndc_header_application")), /*#__PURE__*/React.createElement(Stepper, {
|
|
13559
13676
|
stepsList: updatedCreateEmployeeconfig$1,
|
|
13560
13677
|
onSubmit: handleSubmit,
|
|
13561
13678
|
step: step,
|
|
@@ -13695,12 +13812,41 @@ const NewNDCStepFormOne$1 = ({
|
|
|
13695
13812
|
}
|
|
13696
13813
|
};
|
|
13697
13814
|
function validateStepData(data) {
|
|
13815
|
+
var _data$cpt6, _data$cpt6$dues, _data$cpt7, _data$cpt7$dues, _data$dues, _propertyDetails$wate, _propertyDetails$sewe;
|
|
13698
13816
|
const missingFields = [];
|
|
13699
13817
|
const invalidFields = [];
|
|
13700
13818
|
const cpt = (data === null || data === void 0 ? void 0 : data.cpt) || {};
|
|
13701
13819
|
const cptDetails = (cpt === null || cpt === void 0 ? void 0 : cpt.details) || {};
|
|
13702
13820
|
const propertyDetails = (data === null || data === void 0 ? void 0 : data.PropertyDetails) || {};
|
|
13703
13821
|
const NDCReason = (data === null || data === void 0 ? void 0 : data.NDCReason) || {};
|
|
13822
|
+
if ((data === null || data === void 0 ? void 0 : (_data$cpt6 = data.cpt) === null || _data$cpt6 === void 0 ? void 0 : (_data$cpt6$dues = _data$cpt6.dues) === null || _data$cpt6$dues === void 0 ? void 0 : _data$cpt6$dues.totalAmount) != 0) {
|
|
13823
|
+
invalidFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
|
|
13824
|
+
}
|
|
13825
|
+
if (data !== null && data !== void 0 && (_data$cpt7 = data.cpt) !== null && _data$cpt7 !== void 0 && (_data$cpt7$dues = _data$cpt7.dues) !== null && _data$cpt7$dues !== void 0 && _data$cpt7$dues.id && (data === null || data === void 0 ? void 0 : (_data$dues = data.dues) === null || _data$dues === void 0 ? void 0 : _data$dues.totalAmount) > 0) {
|
|
13826
|
+
invalidFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
|
|
13827
|
+
}
|
|
13828
|
+
if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.length) > 0) {
|
|
13829
|
+
propertyDetails.waterConnection.forEach(value => {
|
|
13830
|
+
var _value$billData, _value$billData2, _value$billData3;
|
|
13831
|
+
if ((value === null || value === void 0 ? void 0 : (_value$billData = value.billData) === null || _value$billData === void 0 ? void 0 : _value$billData.totalAmount) != 0) {
|
|
13832
|
+
invalidFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_WATER_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
|
|
13833
|
+
}
|
|
13834
|
+
if (value !== null && value !== void 0 && (_value$billData2 = value.billData) !== null && _value$billData2 !== void 0 && _value$billData2.id && (value === null || value === void 0 ? void 0 : (_value$billData3 = value.billData) === null || _value$billData3 === void 0 ? void 0 : _value$billData3.totalAmount) > 0) {
|
|
13835
|
+
invalidFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_WATER_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
|
|
13836
|
+
}
|
|
13837
|
+
});
|
|
13838
|
+
}
|
|
13839
|
+
if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$sewe = propertyDetails.sewerageConnection) === null || _propertyDetails$sewe === void 0 ? void 0 : _propertyDetails$sewe.length) > 0) {
|
|
13840
|
+
propertyDetails.sewerageConnection.forEach(value => {
|
|
13841
|
+
var _value$billData4, _value$billData5, _value$billData6;
|
|
13842
|
+
if ((value === null || value === void 0 ? void 0 : (_value$billData4 = value.billData) === null || _value$billData4 === void 0 ? void 0 : _value$billData4.totalAmount) != 0) {
|
|
13843
|
+
invalidFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_SEWERAGE_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
|
|
13844
|
+
}
|
|
13845
|
+
if (value !== null && value !== void 0 && (_value$billData5 = value.billData) !== null && _value$billData5 !== void 0 && _value$billData5.id && (value === null || value === void 0 ? void 0 : (_value$billData6 = value.billData) === null || _value$billData6 === void 0 ? void 0 : _value$billData6.totalAmount) > 0) {
|
|
13846
|
+
invalidFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_SEWERAGE_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
|
|
13847
|
+
}
|
|
13848
|
+
});
|
|
13849
|
+
}
|
|
13704
13850
|
if (!(cpt !== null && cpt !== void 0 && cpt.id)) missingFields.push(t("NDC_MESSAGE_PROPERTY_ID"));
|
|
13705
13851
|
if (!cptDetails || Object.keys(cptDetails).length === 0) missingFields.push(t("NDC_MESSAGE_PLEASE_SEARCH_PROPERTY_ID"));
|
|
13706
13852
|
if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.firstName)) missingFields.push(t("NDC_MESSAGE_FIRST_NAME"));
|