@mseva/digit-ui-module-ndc 1.0.77 → 1.0.79
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 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +240 -108
- package/dist/index.modern.js.map +1 -1
- package/package.json +10 -9
package/dist/index.modern.js
CHANGED
|
@@ -567,7 +567,7 @@ const resetNDCForm = () => ({
|
|
|
567
567
|
});
|
|
568
568
|
|
|
569
569
|
const Response = props => {
|
|
570
|
-
var _state$data, _state$data$Noc, _history$location;
|
|
570
|
+
var _state$data, _state$data$Noc, _history$location, _applicationDetails$A, _applicationDetails$A2;
|
|
571
571
|
const {
|
|
572
572
|
state
|
|
573
573
|
} = props.location;
|
|
@@ -588,6 +588,12 @@ const Response = props => {
|
|
|
588
588
|
const handlePayment = () => {
|
|
589
589
|
history.push(`/digit-ui/employee/payment/collect/NDC/${ndcCode}/${tenantId}?tenantId=${tenantId}`);
|
|
590
590
|
};
|
|
591
|
+
const {
|
|
592
|
+
isLoading,
|
|
593
|
+
data: applicationDetails
|
|
594
|
+
} = Digit.Hooks.ndc.useSearchEmployeeApplication({
|
|
595
|
+
applicationNo: ndcCode
|
|
596
|
+
}, tenantId);
|
|
591
597
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(Banner, {
|
|
592
598
|
message: "NDC Application Submitted Successfully",
|
|
593
599
|
applicationNumber: ndcCode,
|
|
@@ -608,7 +614,7 @@ const Response = props => {
|
|
|
608
614
|
}), /*#__PURE__*/React.createElement(SubmitBar$1, {
|
|
609
615
|
label: t("CORE_COMMON_GO_TO_NDC"),
|
|
610
616
|
onSubmit: onGoToNDC
|
|
611
|
-
}), /*#__PURE__*/React.createElement(SubmitBar$1, {
|
|
617
|
+
}), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : (_applicationDetails$A2 = _applicationDetails$A[0]) === null || _applicationDetails$A2 === void 0 ? void 0 : _applicationDetails$A2.applicationStatus) == "PENDINGPAYMENT" && /*#__PURE__*/React.createElement(SubmitBar$1, {
|
|
612
618
|
label: t("CS_APPLICATION_DETAILS_MAKE_PAYMENT"),
|
|
613
619
|
onSubmit: handlePayment
|
|
614
620
|
}))));
|
|
@@ -3145,7 +3151,7 @@ const ApplicationOverview = () => {
|
|
|
3145
3151
|
}) : /*#__PURE__*/React.createElement("div", null, t("TL_NO_DOCUMENTS_MSG")))), /*#__PURE__*/React.createElement(NewApplicationTimeline, {
|
|
3146
3152
|
workflowDetails: workflowDetails,
|
|
3147
3153
|
t: t
|
|
3148
|
-
}), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A26 = applicationDetails.Applications) === null || _applicationDetails$A26 === void 0 ? void 0 : (_applicationDetails$A27 = _applicationDetails$A26[0]) === null || _applicationDetails$A27 === void 0 ? void 0 : _applicationDetails$A27.applicationStatus) !== "INITIATED" && (actions === null || actions === void 0 ? void 0 : actions.length) && /*#__PURE__*/React.createElement(ActionBar, null, displayMenu && (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data1 = workflowDetails.data) !== null && _workflowDetails$data1 !== void 0 && (_workflowDetails$data10 = _workflowDetails$data1.actionState) !== null && _workflowDetails$data10 !== void 0 && _workflowDetails$data10.nextActions || workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data11 = workflowDetails.data) !== null && _workflowDetails$data11 !== void 0 && _workflowDetails$data11.nextActions) ? /*#__PURE__*/React.createElement(Menu, {
|
|
3154
|
+
}), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A26 = applicationDetails.Applications) === null || _applicationDetails$A26 === void 0 ? void 0 : (_applicationDetails$A27 = _applicationDetails$A26[0]) === null || _applicationDetails$A27 === void 0 ? void 0 : _applicationDetails$A27.applicationStatus) !== "INITIATED" && (actions === null || actions === void 0 ? void 0 : actions.length) > 0 && /*#__PURE__*/React.createElement(ActionBar, null, displayMenu && (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data1 = workflowDetails.data) !== null && _workflowDetails$data1 !== void 0 && (_workflowDetails$data10 = _workflowDetails$data1.actionState) !== null && _workflowDetails$data10 !== void 0 && _workflowDetails$data10.nextActions || workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data11 = workflowDetails.data) !== null && _workflowDetails$data11 !== void 0 && _workflowDetails$data11.nextActions) ? /*#__PURE__*/React.createElement(Menu, {
|
|
3149
3155
|
localeKeyPrefix: `WF_EDITRENEWAL`,
|
|
3150
3156
|
options: actions,
|
|
3151
3157
|
optionKey: "action",
|
|
@@ -12510,10 +12516,12 @@ const NewNDCStepFormOne = ({
|
|
|
12510
12516
|
} else createApplication(data);
|
|
12511
12517
|
}
|
|
12512
12518
|
const createApplication = async data => {
|
|
12513
|
-
var _Digit$UserService$ge,
|
|
12519
|
+
var _Digit$UserService$ge, _data$cpt, _data$cpt$details, _data$cpt2, _data$cpt2$details, _ref, _data$PropertyDetails5, _ref2, _data$PropertyDetails7, _data$PropertyDetails9, _data$PropertyDetails0, _data$NDCReason2;
|
|
12520
|
+
setLoader(true);
|
|
12514
12521
|
const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
|
|
12515
12522
|
const applicantId = applicant === null || applicant === void 0 ? void 0 : applicant.uuid;
|
|
12516
|
-
|
|
12523
|
+
console.log("data?.cpt?.details?.owners", 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.owners);
|
|
12524
|
+
const owners = ((data === null || data === void 0 ? void 0 : (_data$cpt2 = data.cpt) === null || _data$cpt2 === void 0 ? void 0 : (_data$cpt2$details = _data$cpt2.details) === null || _data$cpt2$details === void 0 ? void 0 : _data$cpt2$details.owners) || []).map(owner => {
|
|
12517
12525
|
var _newOwner$name, _newOwner$name$trim, _data$PropertyDetails, _data$PropertyDetails2, _data$PropertyDetails3;
|
|
12518
12526
|
const newOwner = JSON.parse(JSON.stringify(owner));
|
|
12519
12527
|
delete newOwner.status;
|
|
@@ -12524,10 +12532,9 @@ const NewNDCStepFormOne = ({
|
|
|
12524
12532
|
}
|
|
12525
12533
|
return newOwner;
|
|
12526
12534
|
});
|
|
12527
|
-
console.log("checkData==", data);
|
|
12528
12535
|
const ndcDetails = [];
|
|
12529
|
-
(
|
|
12530
|
-
var _wc$billData, _data$PropertyDetails6, _data$
|
|
12536
|
+
(_ref = (data === null || data === void 0 ? void 0 : (_data$PropertyDetails5 = data.PropertyDetails) === null || _data$PropertyDetails5 === void 0 ? void 0 : _data$PropertyDetails5.waterConnection) || []) === null || _ref === void 0 ? void 0 : _ref.forEach(wc => {
|
|
12537
|
+
var _wc$billData, _data$PropertyDetails6, _data$cpt3, _data$cpt3$details, _wc$billData2, _wc$billData3;
|
|
12531
12538
|
ndcDetails.push({
|
|
12532
12539
|
uuid: wc === null || wc === void 0 ? void 0 : (_wc$billData = wc.billData) === null || _wc$billData === void 0 ? void 0 : _wc$billData.id,
|
|
12533
12540
|
applicantId: applicantId,
|
|
@@ -12535,14 +12542,14 @@ const NewNDCStepFormOne = ({
|
|
|
12535
12542
|
consumerCode: wc === null || wc === void 0 ? void 0 : wc.connectionNo,
|
|
12536
12543
|
additionalDetails: {
|
|
12537
12544
|
propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails6 = data.PropertyDetails) === null || _data$PropertyDetails6 === void 0 ? void 0 : _data$PropertyDetails6.address,
|
|
12538
|
-
propertyType: data === null || data === void 0 ? void 0 : (_data$
|
|
12545
|
+
propertyType: data === null || data === void 0 ? void 0 : (_data$cpt3 = data.cpt) === null || _data$cpt3 === void 0 ? void 0 : (_data$cpt3$details = _data$cpt3.details) === null || _data$cpt3$details === void 0 ? void 0 : _data$cpt3$details.usageCategory
|
|
12539
12546
|
},
|
|
12540
12547
|
dueAmount: (wc === null || wc === void 0 ? void 0 : (_wc$billData2 = wc.billData) === null || _wc$billData2 === void 0 ? void 0 : _wc$billData2.totalAmount) || 0,
|
|
12541
12548
|
status: wc === null || wc === void 0 ? void 0 : (_wc$billData3 = wc.billData) === null || _wc$billData3 === void 0 ? void 0 : _wc$billData3.status
|
|
12542
12549
|
});
|
|
12543
12550
|
});
|
|
12544
|
-
(
|
|
12545
|
-
var _sc$billData, _data$PropertyDetails8, _data$
|
|
12551
|
+
(_ref2 = (data === null || data === void 0 ? void 0 : (_data$PropertyDetails7 = data.PropertyDetails) === null || _data$PropertyDetails7 === void 0 ? void 0 : _data$PropertyDetails7.sewerageConnection) || []) === null || _ref2 === void 0 ? void 0 : _ref2.forEach(sc => {
|
|
12552
|
+
var _sc$billData, _data$PropertyDetails8, _data$cpt4, _data$cpt4$details, _sc$billData2, _sc$billData3;
|
|
12546
12553
|
ndcDetails.push({
|
|
12547
12554
|
uuid: sc === null || sc === void 0 ? void 0 : (_sc$billData = sc.billData) === null || _sc$billData === void 0 ? void 0 : _sc$billData.id,
|
|
12548
12555
|
applicantId: applicantId,
|
|
@@ -12550,23 +12557,23 @@ const NewNDCStepFormOne = ({
|
|
|
12550
12557
|
consumerCode: sc === null || sc === void 0 ? void 0 : sc.connectionNo,
|
|
12551
12558
|
additionalDetails: {
|
|
12552
12559
|
propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails8 = data.PropertyDetails) === null || _data$PropertyDetails8 === void 0 ? void 0 : _data$PropertyDetails8.address,
|
|
12553
|
-
propertyType: data === null || data === void 0 ? void 0 : (_data$
|
|
12560
|
+
propertyType: data === null || data === void 0 ? void 0 : (_data$cpt4 = data.cpt) === null || _data$cpt4 === void 0 ? void 0 : (_data$cpt4$details = _data$cpt4.details) === null || _data$cpt4$details === void 0 ? void 0 : _data$cpt4$details.usageCategory
|
|
12554
12561
|
},
|
|
12555
12562
|
dueAmount: (sc === null || sc === void 0 ? void 0 : (_sc$billData2 = sc.billData) === null || _sc$billData2 === void 0 ? void 0 : _sc$billData2.totalAmount) || 0,
|
|
12556
12563
|
status: sc === null || sc === void 0 ? void 0 : (_sc$billData3 = sc.billData) === null || _sc$billData3 === void 0 ? void 0 : _sc$billData3.status
|
|
12557
12564
|
});
|
|
12558
12565
|
});
|
|
12559
12566
|
if (data !== null && data !== void 0 && (_data$PropertyDetails9 = data.PropertyDetails) !== null && _data$PropertyDetails9 !== void 0 && (_data$PropertyDetails0 = _data$PropertyDetails9.propertyBillData) !== null && _data$PropertyDetails0 !== void 0 && _data$PropertyDetails0.billData) {
|
|
12560
|
-
var _data$PropertyDetails1, _data$PropertyDetails10, _data$
|
|
12567
|
+
var _data$PropertyDetails1, _data$PropertyDetails10, _data$cpt5, _data$PropertyDetails11, _data$cpt6, _data$cpt6$details, _data$NDCReason, _data$PropertyDetails12;
|
|
12561
12568
|
const billData = data === null || data === void 0 ? void 0 : (_data$PropertyDetails1 = data.PropertyDetails) === null || _data$PropertyDetails1 === void 0 ? void 0 : (_data$PropertyDetails10 = _data$PropertyDetails1.propertyBillData) === null || _data$PropertyDetails10 === void 0 ? void 0 : _data$PropertyDetails10.billData;
|
|
12562
12569
|
ndcDetails.push({
|
|
12563
12570
|
uuid: billData === null || billData === void 0 ? void 0 : billData.id,
|
|
12564
12571
|
applicantId: applicantId,
|
|
12565
12572
|
businessService: "PT",
|
|
12566
|
-
consumerCode: data === null || data === void 0 ? void 0 : (_data$
|
|
12573
|
+
consumerCode: data === null || data === void 0 ? void 0 : (_data$cpt5 = data.cpt) === null || _data$cpt5 === void 0 ? void 0 : _data$cpt5.id,
|
|
12567
12574
|
additionalDetails: {
|
|
12568
12575
|
propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails11 = data.PropertyDetails) === null || _data$PropertyDetails11 === void 0 ? void 0 : _data$PropertyDetails11.address,
|
|
12569
|
-
propertyType: data === null || data === void 0 ? void 0 : (_data$
|
|
12576
|
+
propertyType: data === null || data === void 0 ? void 0 : (_data$cpt6 = data.cpt) === null || _data$cpt6 === void 0 ? void 0 : (_data$cpt6$details = _data$cpt6.details) === null || _data$cpt6$details === void 0 ? void 0 : _data$cpt6$details.usageCategory,
|
|
12570
12577
|
reason: data === null || data === void 0 ? void 0 : (_data$NDCReason = data.NDCReason) === null || _data$NDCReason === void 0 ? void 0 : _data$NDCReason.reason,
|
|
12571
12578
|
remarks: data === null || data === void 0 ? void 0 : (_data$PropertyDetails12 = data.PropertyDetails) === null || _data$PropertyDetails12 === void 0 ? void 0 : _data$PropertyDetails12.remarks
|
|
12572
12579
|
},
|
|
@@ -12613,7 +12620,7 @@ const NewNDCStepFormOne = ({
|
|
|
12613
12620
|
}
|
|
12614
12621
|
};
|
|
12615
12622
|
const updateApplication = async data => {
|
|
12616
|
-
var _Digit$UserService$ge2, _checkApiDataCheck$Ap, _checkApiDataCheck$Ap2, _checkFormData$respon3, _checkFormData$respon4, _checkFormData$respon5, _checkFormData$respon6, _checkFormData$respon7, _checkApiDataCheck$Ap3, _checkApiDataCheck$Ap4, _checkFormData$respon8, _checkFormData$respon9, _checkApiDataCheck$Ap5, _checkApiDataCheck$Ap6, _checkFormData$respon0, _checkFormData$respon1, _data$NDCReason3, _data$
|
|
12623
|
+
var _Digit$UserService$ge2, _checkApiDataCheck$Ap, _checkApiDataCheck$Ap2, _checkFormData$respon3, _checkFormData$respon4, _checkFormData$respon5, _checkFormData$respon6, _checkFormData$respon7, _checkApiDataCheck$Ap3, _checkApiDataCheck$Ap4, _checkFormData$respon8, _checkFormData$respon9, _checkApiDataCheck$Ap5, _checkApiDataCheck$Ap6, _checkFormData$respon0, _checkFormData$respon1, _data$NDCReason3, _data$cpt10, _data$cpt10$details, _response$ResponseInf2;
|
|
12617
12624
|
const applicant = ((_Digit$UserService$ge2 = Digit.UserService.getUser()) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.info) || {};
|
|
12618
12625
|
const applicantId = applicant === null || applicant === void 0 ? void 0 : applicant.uuid;
|
|
12619
12626
|
const owners = (checkApiDataCheck === null || checkApiDataCheck === void 0 ? void 0 : (_checkApiDataCheck$Ap = checkApiDataCheck.Applications) === null || _checkApiDataCheck$Ap === void 0 ? void 0 : (_checkApiDataCheck$Ap2 = _checkApiDataCheck$Ap[0]) === null || _checkApiDataCheck$Ap2 === void 0 ? void 0 : _checkApiDataCheck$Ap2.owners) || (checkFormData === null || checkFormData === void 0 ? void 0 : (_checkFormData$respon3 = checkFormData.responseData) === null || _checkFormData$respon3 === void 0 ? void 0 : (_checkFormData$respon4 = _checkFormData$respon3[0]) === null || _checkFormData$respon4 === void 0 ? void 0 : _checkFormData$respon4.owners);
|
|
@@ -12621,9 +12628,9 @@ const NewNDCStepFormOne = ({
|
|
|
12621
12628
|
if ((checkFormData === null || checkFormData === void 0 ? void 0 : (_checkFormData$respon5 = checkFormData.responseData) === null || _checkFormData$respon5 === void 0 ? void 0 : (_checkFormData$respon6 = _checkFormData$respon5[0]) === null || _checkFormData$respon6 === void 0 ? void 0 : (_checkFormData$respon7 = _checkFormData$respon6.NdcDetails) === null || _checkFormData$respon7 === void 0 ? void 0 : _checkFormData$respon7.length) > 0) {
|
|
12622
12629
|
ndcDetails = checkFormData.responseData[0].NdcDetails;
|
|
12623
12630
|
} else {
|
|
12624
|
-
var
|
|
12625
|
-
(
|
|
12626
|
-
var _wc$billData4, _data$PropertyDetails14, _data$
|
|
12631
|
+
var _ref3, _data$PropertyDetails13, _ref4, _data$PropertyDetails15, _data$PropertyDetails17, _data$PropertyDetails18;
|
|
12632
|
+
(_ref3 = (data === null || data === void 0 ? void 0 : (_data$PropertyDetails13 = data.PropertyDetails) === null || _data$PropertyDetails13 === void 0 ? void 0 : _data$PropertyDetails13.waterConnection) || []) === null || _ref3 === void 0 ? void 0 : _ref3.forEach(wc => {
|
|
12633
|
+
var _wc$billData4, _data$PropertyDetails14, _data$cpt8, _data$cpt8$details, _wc$billData5, _wc$billData6;
|
|
12627
12634
|
ndcDetails.push({
|
|
12628
12635
|
uuid: wc === null || wc === void 0 ? void 0 : (_wc$billData4 = wc.billData) === null || _wc$billData4 === void 0 ? void 0 : _wc$billData4.id,
|
|
12629
12636
|
applicantId: applicantId,
|
|
@@ -12631,14 +12638,14 @@ const NewNDCStepFormOne = ({
|
|
|
12631
12638
|
consumerCode: wc === null || wc === void 0 ? void 0 : wc.connectionNo,
|
|
12632
12639
|
additionalDetails: {
|
|
12633
12640
|
propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails14 = data.PropertyDetails) === null || _data$PropertyDetails14 === void 0 ? void 0 : _data$PropertyDetails14.address,
|
|
12634
|
-
propertyType: data === null || data === void 0 ? void 0 : (_data$
|
|
12641
|
+
propertyType: data === null || data === void 0 ? void 0 : (_data$cpt8 = data.cpt) === null || _data$cpt8 === void 0 ? void 0 : (_data$cpt8$details = _data$cpt8.details) === null || _data$cpt8$details === void 0 ? void 0 : _data$cpt8$details.usageCategory
|
|
12635
12642
|
},
|
|
12636
12643
|
dueAmount: (wc === null || wc === void 0 ? void 0 : (_wc$billData5 = wc.billData) === null || _wc$billData5 === void 0 ? void 0 : _wc$billData5.totalAmount) || 0,
|
|
12637
12644
|
status: wc === null || wc === void 0 ? void 0 : (_wc$billData6 = wc.billData) === null || _wc$billData6 === void 0 ? void 0 : _wc$billData6.status
|
|
12638
12645
|
});
|
|
12639
12646
|
});
|
|
12640
|
-
(
|
|
12641
|
-
var _sc$billData4, _data$PropertyDetails16, _data$
|
|
12647
|
+
(_ref4 = (data === null || data === void 0 ? void 0 : (_data$PropertyDetails15 = data.PropertyDetails) === null || _data$PropertyDetails15 === void 0 ? void 0 : _data$PropertyDetails15.sewerageConnection) || []) === null || _ref4 === void 0 ? void 0 : _ref4.forEach(sc => {
|
|
12648
|
+
var _sc$billData4, _data$PropertyDetails16, _data$cpt9, _data$cpt9$details, _sc$billData5, _sc$billData6;
|
|
12642
12649
|
ndcDetails.push({
|
|
12643
12650
|
uuid: sc === null || sc === void 0 ? void 0 : (_sc$billData4 = sc.billData) === null || _sc$billData4 === void 0 ? void 0 : _sc$billData4.id,
|
|
12644
12651
|
applicantId: applicantId,
|
|
@@ -12646,23 +12653,23 @@ const NewNDCStepFormOne = ({
|
|
|
12646
12653
|
consumerCode: sc === null || sc === void 0 ? void 0 : sc.connectionNo,
|
|
12647
12654
|
additionalDetails: {
|
|
12648
12655
|
propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails16 = data.PropertyDetails) === null || _data$PropertyDetails16 === void 0 ? void 0 : _data$PropertyDetails16.address,
|
|
12649
|
-
propertyType: data === null || data === void 0 ? void 0 : (_data$
|
|
12656
|
+
propertyType: data === null || data === void 0 ? void 0 : (_data$cpt9 = data.cpt) === null || _data$cpt9 === void 0 ? void 0 : (_data$cpt9$details = _data$cpt9.details) === null || _data$cpt9$details === void 0 ? void 0 : _data$cpt9$details.usageCategory
|
|
12650
12657
|
},
|
|
12651
12658
|
dueAmount: (sc === null || sc === void 0 ? void 0 : (_sc$billData5 = sc.billData) === null || _sc$billData5 === void 0 ? void 0 : _sc$billData5.totalAmount) || 0,
|
|
12652
12659
|
status: sc === null || sc === void 0 ? void 0 : (_sc$billData6 = sc.billData) === null || _sc$billData6 === void 0 ? void 0 : _sc$billData6.status
|
|
12653
12660
|
});
|
|
12654
12661
|
});
|
|
12655
12662
|
if (data !== null && data !== void 0 && (_data$PropertyDetails17 = data.PropertyDetails) !== null && _data$PropertyDetails17 !== void 0 && (_data$PropertyDetails18 = _data$PropertyDetails17.propertyBillData) !== null && _data$PropertyDetails18 !== void 0 && _data$PropertyDetails18.billData) {
|
|
12656
|
-
var _data$PropertyDetails19, _data$PropertyDetails20, _data$
|
|
12663
|
+
var _data$PropertyDetails19, _data$PropertyDetails20, _data$cpt0, _data$PropertyDetails21, _data$cpt1, _data$cpt1$details;
|
|
12657
12664
|
const billData = data === null || data === void 0 ? void 0 : (_data$PropertyDetails19 = data.PropertyDetails) === null || _data$PropertyDetails19 === void 0 ? void 0 : (_data$PropertyDetails20 = _data$PropertyDetails19.propertyBillData) === null || _data$PropertyDetails20 === void 0 ? void 0 : _data$PropertyDetails20.billData;
|
|
12658
12665
|
ndcDetails.push({
|
|
12659
12666
|
uuid: billData === null || billData === void 0 ? void 0 : billData.id,
|
|
12660
12667
|
applicantId: applicantId,
|
|
12661
12668
|
businessService: "PT",
|
|
12662
|
-
consumerCode: data === null || data === void 0 ? void 0 : (_data$
|
|
12669
|
+
consumerCode: data === null || data === void 0 ? void 0 : (_data$cpt0 = data.cpt) === null || _data$cpt0 === void 0 ? void 0 : _data$cpt0.id,
|
|
12663
12670
|
additionalDetails: {
|
|
12664
12671
|
propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails21 = data.PropertyDetails) === null || _data$PropertyDetails21 === void 0 ? void 0 : _data$PropertyDetails21.address,
|
|
12665
|
-
propertyType: data === null || data === void 0 ? void 0 : (_data$
|
|
12672
|
+
propertyType: data === null || data === void 0 ? void 0 : (_data$cpt1 = data.cpt) === null || _data$cpt1 === void 0 ? void 0 : (_data$cpt1$details = _data$cpt1.details) === null || _data$cpt1$details === void 0 ? void 0 : _data$cpt1$details.usageCategory
|
|
12666
12673
|
},
|
|
12667
12674
|
dueAmount: (billData === null || billData === void 0 ? void 0 : billData.totalAmount) || 0,
|
|
12668
12675
|
status: billData === null || billData === void 0 ? void 0 : billData.status
|
|
@@ -12679,7 +12686,7 @@ const NewNDCStepFormOne = ({
|
|
|
12679
12686
|
Documents: [],
|
|
12680
12687
|
active: true,
|
|
12681
12688
|
reason: data === null || data === void 0 ? void 0 : (_data$NDCReason3 = data.NDCReason) === null || _data$NDCReason3 === void 0 ? void 0 : _data$NDCReason3.code,
|
|
12682
|
-
auditDetails: data === null || data === void 0 ? void 0 : (_data$
|
|
12689
|
+
auditDetails: data === null || data === void 0 ? void 0 : (_data$cpt10 = data.cpt) === null || _data$cpt10 === void 0 ? void 0 : (_data$cpt10$details = _data$cpt10.details) === null || _data$cpt10$details === void 0 ? void 0 : _data$cpt10$details.auditDetails,
|
|
12683
12690
|
applicationNo: appNumber,
|
|
12684
12691
|
uuid: apUUid,
|
|
12685
12692
|
workflow: {
|
|
@@ -12707,17 +12714,17 @@ const NewNDCStepFormOne = ({
|
|
|
12707
12714
|
}
|
|
12708
12715
|
};
|
|
12709
12716
|
function validateStepData(data) {
|
|
12710
|
-
var _data$
|
|
12717
|
+
var _data$cpt11, _data$cpt12, _data$cpt12$dues, _propertyDetails$wate, _propertyDetails$sewe;
|
|
12711
12718
|
const missingFields = [];
|
|
12712
12719
|
const invalidFields = [];
|
|
12713
12720
|
const cpt = (data === null || data === void 0 ? void 0 : data.cpt) || {};
|
|
12714
12721
|
const cptDetails = (cpt === null || cpt === void 0 ? void 0 : cpt.details) || {};
|
|
12715
12722
|
const propertyDetails = (data === null || data === void 0 ? void 0 : data.PropertyDetails) || {};
|
|
12716
12723
|
const NDCReason = (data === null || data === void 0 ? void 0 : data.NDCReason) || {};
|
|
12717
|
-
if (!(data !== null && data !== void 0 && (_data$
|
|
12724
|
+
if (!(data !== null && data !== void 0 && (_data$cpt11 = data.cpt) !== null && _data$cpt11 !== void 0 && _data$cpt11.dues)) {
|
|
12718
12725
|
missingFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
|
|
12719
12726
|
}
|
|
12720
|
-
if ((data === null || data === void 0 ? void 0 : (_data$
|
|
12727
|
+
if ((data === null || data === void 0 ? void 0 : (_data$cpt12 = data.cpt) === null || _data$cpt12 === void 0 ? void 0 : (_data$cpt12$dues = _data$cpt12.dues) === null || _data$cpt12$dues === void 0 ? void 0 : _data$cpt12$dues.totalAmount) > 0) {
|
|
12721
12728
|
missingFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
|
|
12722
12729
|
}
|
|
12723
12730
|
if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.length) > 0) {
|
|
@@ -12770,7 +12777,7 @@ const NewNDCStepFormOne = ({
|
|
|
12770
12777
|
onBackClick(config.key, data);
|
|
12771
12778
|
}
|
|
12772
12779
|
const onFormValueChange = (setValue = true, data) => {
|
|
12773
|
-
if (!
|
|
12780
|
+
if (!lodash.isEqual(data, currentStepData)) {
|
|
12774
12781
|
dispatch(updateNDCForm(config.key, data));
|
|
12775
12782
|
}
|
|
12776
12783
|
};
|
|
@@ -12852,14 +12859,25 @@ function SelectNDCReason({
|
|
|
12852
12859
|
}, [ndcReason]);
|
|
12853
12860
|
useEffect(() => {
|
|
12854
12861
|
if (apiDataCheck && (ndcReasonOptions === null || ndcReasonOptions === void 0 ? void 0 : ndcReasonOptions.length) > 0) {
|
|
12862
|
+
var _formData$NDCReason;
|
|
12855
12863
|
console.log("check apiDataCheck", apiDataCheck);
|
|
12856
12864
|
const matchedOption = ndcReasonOptions.find(opt => {
|
|
12857
12865
|
var _apiDataCheck$;
|
|
12858
12866
|
return (opt === null || opt === void 0 ? void 0 : opt.code) === (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$ = apiDataCheck[0]) === null || _apiDataCheck$ === void 0 ? void 0 : _apiDataCheck$.reason);
|
|
12859
12867
|
});
|
|
12860
|
-
if (matchedOption) {
|
|
12861
|
-
|
|
12862
|
-
|
|
12868
|
+
if (matchedOption && (lodash.isEmpty(formData === null || formData === void 0 ? void 0 : formData.NDCReason) || !(formData !== null && formData !== void 0 && (_formData$NDCReason = formData.NDCReason) !== null && _formData$NDCReason !== void 0 && _formData$NDCReason.code))) {
|
|
12869
|
+
let updatedOption = {
|
|
12870
|
+
...matchedOption
|
|
12871
|
+
};
|
|
12872
|
+
if (matchedOption.code === "OTHERS") {
|
|
12873
|
+
var _apiDataCheck$2, _apiDataCheck$2$NdcDe, _ptDetail$additionalD;
|
|
12874
|
+
const ptDetail = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$2 = apiDataCheck[0]) === null || _apiDataCheck$2 === void 0 ? void 0 : (_apiDataCheck$2$NdcDe = _apiDataCheck$2.NdcDetails) === null || _apiDataCheck$2$NdcDe === void 0 ? void 0 : _apiDataCheck$2$NdcDe.find(detail => detail.businessService === "PT");
|
|
12875
|
+
if (ptDetail !== null && ptDetail !== void 0 && (_ptDetail$additionalD = ptDetail.additionalDetails) !== null && _ptDetail$additionalD !== void 0 && _ptDetail$additionalD.reason) {
|
|
12876
|
+
updatedOption.reason = ptDetail.additionalDetails.reason;
|
|
12877
|
+
}
|
|
12878
|
+
}
|
|
12879
|
+
setNDCReason(updatedOption);
|
|
12880
|
+
setValue("NDCReason", updatedOption);
|
|
12863
12881
|
}
|
|
12864
12882
|
}
|
|
12865
12883
|
}, [apiDataCheck, ndcReasonOptions]);
|
|
@@ -12923,7 +12941,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12923
12941
|
formState,
|
|
12924
12942
|
clearErrors
|
|
12925
12943
|
}) => {
|
|
12926
|
-
var _formData$cpt, _formData$cpt$details,
|
|
12944
|
+
var _formData$cpt, _formData$cpt$details, _formData$cpt5, _Digit, _Digit$ComponentRegis, _formData$cpt7, _apiDataCheck$8, _propertyDetails$wate, _propertyDetails$sewe, _formData$cpt8, _formData$cpt8$detail;
|
|
12927
12945
|
const {
|
|
12928
12946
|
control,
|
|
12929
12947
|
formState: localFormState,
|
|
@@ -12951,14 +12969,11 @@ const PropertyDetailsForm$1 = ({
|
|
|
12951
12969
|
const propertyId = formData === null || formData === void 0 ? void 0 : (_formData$cpt = formData.cpt) === null || _formData$cpt === void 0 ? void 0 : (_formData$cpt$details = _formData$cpt.details) === null || _formData$cpt$details === void 0 ? void 0 : _formData$cpt$details.propertyId;
|
|
12952
12970
|
const [propertyDetails, setPropertyDetails] = useState((formData === null || formData === void 0 ? void 0 : formData.PropertyDetails) || {});
|
|
12953
12971
|
const [selectedRow, setSelectedRow] = useState(null);
|
|
12954
|
-
console.log("apiDataCheck", apiDataCheck);
|
|
12955
|
-
console.log("formData==?/||", formData);
|
|
12956
|
-
console.log("checkApiDataCheck====", checkApiDataCheck === null || checkApiDataCheck === void 0 ? void 0 : (_checkApiDataCheck$Ap = checkApiDataCheck.Applications) === null || _checkApiDataCheck$Ap === void 0 ? void 0 : _checkApiDataCheck$Ap[0]);
|
|
12957
12972
|
const {
|
|
12958
12973
|
isLoading: waterConnectionLoading,
|
|
12959
12974
|
data: waterConnectionData,
|
|
12960
12975
|
error: waterConnectionError
|
|
12961
|
-
} = Digit.Hooks.
|
|
12976
|
+
} = Digit.Hooks.ndc.useSearchWS({
|
|
12962
12977
|
tenantId,
|
|
12963
12978
|
filters: {
|
|
12964
12979
|
searchType: "CONNECTION",
|
|
@@ -13007,47 +13022,53 @@ const PropertyDetailsForm$1 = ({
|
|
|
13007
13022
|
name: "applicationFee",
|
|
13008
13023
|
checked: (selectedRow === null || selectedRow === void 0 ? void 0 : selectedRow.uuid) === (row === null || row === void 0 ? void 0 : (_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.uuid),
|
|
13009
13024
|
onChange: () => {
|
|
13010
|
-
console.log("row?.original", row === null || row === void 0 ? void 0 : row.original);
|
|
13011
13025
|
setSelectedRow(row === null || row === void 0 ? void 0 : row.original);
|
|
13012
13026
|
}
|
|
13013
13027
|
});
|
|
13014
13028
|
}
|
|
13015
13029
|
}];
|
|
13016
13030
|
useEffect(() => {
|
|
13017
|
-
var _formData$cpt3, _formData$cpt3$detail, _ownerForName$map, _ownerForName$map$fil, _apiDataCheck$, _apiDataCheck$$owners, _apiDataCheck$$owners2, _formData$PropertyDet, _formData$PropertyDet2, _formData$PropertyDet3;
|
|
13031
|
+
var _formData$cpt3, _formData$cpt3$detail, _ownerForName$map, _ownerForName$map$fil, _apiDataCheck$, _apiDataCheck$$owners, _apiDataCheck$$owners2, _formData$cpt4, _formData$cpt4$detail, _formData$PropertyDet, _formData$PropertyDet2, _apiDataCheck$2, _apiDataCheck$2$NdcDe, _ptDetail$additionalD, _formData$PropertyDet3;
|
|
13018
13032
|
const ownerForName = (formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : (_formData$cpt3$detail = _formData$cpt3.details) === null || _formData$cpt3$detail === void 0 ? void 0 : _formData$cpt3$detail.owners) || [];
|
|
13019
13033
|
const ownerNames = ownerForName === null || ownerForName === void 0 ? void 0 : (_ownerForName$map = ownerForName.map(owner => owner === null || owner === void 0 ? void 0 : owner.name)) === null || _ownerForName$map === void 0 ? void 0 : (_ownerForName$map$fil = _ownerForName$map.filter(Boolean)) === null || _ownerForName$map$fil === void 0 ? void 0 : _ownerForName$map$fil.join(", ");
|
|
13034
|
+
console.log("formData====????", formData);
|
|
13020
13035
|
const ownerObj = selectedRow;
|
|
13021
13036
|
const emailApi = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$ = apiDataCheck[0]) === null || _apiDataCheck$ === void 0 ? void 0 : (_apiDataCheck$$owners = _apiDataCheck$.owners) === null || _apiDataCheck$$owners === void 0 ? void 0 : (_apiDataCheck$$owners2 = _apiDataCheck$$owners[0]) === null || _apiDataCheck$$owners2 === void 0 ? void 0 : _apiDataCheck$$owners2.emailId;
|
|
13022
13037
|
const firstName = ownerObj === null || ownerObj === void 0 ? void 0 : ownerObj.name;
|
|
13023
|
-
console.log("ownerObj
|
|
13024
|
-
console.log("formData?.PropertyDetails?.email", formData === null || formData === void 0 ? void 0 : (_formData$PropertyDet = formData.PropertyDetails) === null || _formData$PropertyDet === void 0 ? void 0 : _formData$PropertyDet.email);
|
|
13025
|
-
console.log("emailApi", emailApi);
|
|
13038
|
+
console.log("ownerObj", ownerObj);
|
|
13026
13039
|
const email = (ownerObj === null || ownerObj === void 0 ? void 0 : ownerObj.emailId) || emailApi || "";
|
|
13027
13040
|
const mobileNumber = ownerObj === null || ownerObj === void 0 ? void 0 : ownerObj.mobileNumber;
|
|
13028
13041
|
const address = ownerObj === null || ownerObj === void 0 ? void 0 : ownerObj.permanentAddress;
|
|
13042
|
+
const fatherOrHusbandName = ownerObj === null || ownerObj === void 0 ? void 0 : ownerObj.fatherOrHusbandName;
|
|
13043
|
+
const landArea = formData === null || formData === void 0 ? void 0 : (_formData$cpt4 = formData.cpt) === null || _formData$cpt4 === void 0 ? void 0 : (_formData$cpt4$detail = _formData$cpt4.details) === null || _formData$cpt4$detail === void 0 ? void 0 : _formData$cpt4$detail.landArea;
|
|
13029
13044
|
const combinedObject = {};
|
|
13030
13045
|
if (firstName) combinedObject.firstName = firstName;
|
|
13031
13046
|
combinedObject.email = email;
|
|
13032
13047
|
if (mobileNumber) combinedObject.mobileNumber = mobileNumber;
|
|
13033
13048
|
if (address) combinedObject.address = address;
|
|
13049
|
+
if (landArea) combinedObject.landArea = landArea;
|
|
13050
|
+
if (fatherOrHusbandName) combinedObject.fatherOrHusbandName = fatherOrHusbandName;
|
|
13034
13051
|
combinedObject.propertyBillData = {
|
|
13035
13052
|
isLoading: false,
|
|
13036
|
-
billData: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
13053
|
+
billData: (formData === null || formData === void 0 ? void 0 : (_formData$PropertyDet = formData.PropertyDetails) === null || _formData$PropertyDet === void 0 ? void 0 : (_formData$PropertyDet2 = _formData$PropertyDet.propertyBillData) === null || _formData$PropertyDet2 === void 0 ? void 0 : _formData$PropertyDet2.billData) || {}
|
|
13037
13054
|
};
|
|
13055
|
+
const ptDetail = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$2 = apiDataCheck[0]) === null || _apiDataCheck$2 === void 0 ? void 0 : (_apiDataCheck$2$NdcDe = _apiDataCheck$2.NdcDetails) === null || _apiDataCheck$2$NdcDe === void 0 ? void 0 : _apiDataCheck$2$NdcDe.find(detail => detail.businessService === "PT");
|
|
13056
|
+
if (ptDetail !== null && ptDetail !== void 0 && (_ptDetail$additionalD = ptDetail.additionalDetails) !== null && _ptDetail$additionalD !== void 0 && _ptDetail$additionalD.remarks && !(formData !== null && formData !== void 0 && (_formData$PropertyDet3 = formData.PropertyDetails) !== null && _formData$PropertyDet3 !== void 0 && _formData$PropertyDet3.remarks)) {
|
|
13057
|
+
combinedObject.remarks = ptDetail.additionalDetails.remarks;
|
|
13058
|
+
}
|
|
13038
13059
|
setPropertyDetails(prev => {
|
|
13039
13060
|
return {
|
|
13040
13061
|
...prev,
|
|
13041
13062
|
...combinedObject
|
|
13042
13063
|
};
|
|
13043
13064
|
});
|
|
13044
|
-
}, [formData === null || formData === void 0 ? void 0 : (_formData$
|
|
13065
|
+
}, [formData === null || formData === void 0 ? void 0 : (_formData$cpt5 = formData.cpt) === null || _formData$cpt5 === void 0 ? void 0 : _formData$cpt5.details, apiDataCheck, selectedRow]);
|
|
13045
13066
|
useEffect(() => {
|
|
13046
|
-
var _apiDataCheck$
|
|
13067
|
+
var _apiDataCheck$3;
|
|
13047
13068
|
let waterConnection;
|
|
13048
|
-
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$
|
|
13049
|
-
var _apiDataCheck$
|
|
13050
|
-
const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$
|
|
13069
|
+
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$3 = apiDataCheck[0]) !== null && _apiDataCheck$3 !== void 0 && _apiDataCheck$3.NdcDetails) {
|
|
13070
|
+
var _apiDataCheck$4, _apiDataCheck$4$NdcDe;
|
|
13071
|
+
const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$4 = apiDataCheck[0]) === null || _apiDataCheck$4 === void 0 ? void 0 : (_apiDataCheck$4$NdcDe = _apiDataCheck$4.NdcDetails) === null || _apiDataCheck$4$NdcDe === void 0 ? void 0 : _apiDataCheck$4$NdcDe.filter(item => {
|
|
13051
13072
|
return item.businessService == "WS";
|
|
13052
13073
|
});
|
|
13053
13074
|
waterConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
|
|
@@ -13072,11 +13093,11 @@ const PropertyDetailsForm$1 = ({
|
|
|
13072
13093
|
}));
|
|
13073
13094
|
}, [waterConnectionData, apiDataCheck]);
|
|
13074
13095
|
useEffect(() => {
|
|
13075
|
-
var _apiDataCheck$
|
|
13096
|
+
var _apiDataCheck$5;
|
|
13076
13097
|
let sewerageConnection;
|
|
13077
|
-
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$
|
|
13078
|
-
var _apiDataCheck$
|
|
13079
|
-
const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$
|
|
13098
|
+
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$5 = apiDataCheck[0]) !== null && _apiDataCheck$5 !== void 0 && _apiDataCheck$5.NdcDetails) {
|
|
13099
|
+
var _apiDataCheck$6, _apiDataCheck$6$NdcDe;
|
|
13100
|
+
const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$6 = apiDataCheck[0]) === null || _apiDataCheck$6 === void 0 ? void 0 : (_apiDataCheck$6$NdcDe = _apiDataCheck$6.NdcDetails) === null || _apiDataCheck$6$NdcDe === void 0 ? void 0 : _apiDataCheck$6$NdcDe.filter(item => {
|
|
13080
13101
|
return item.businessService == "SW";
|
|
13081
13102
|
});
|
|
13082
13103
|
sewerageConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
|
|
@@ -13121,7 +13142,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13121
13142
|
}]
|
|
13122
13143
|
}));
|
|
13123
13144
|
}
|
|
13124
|
-
async
|
|
13145
|
+
const fetchBill = async (bussinessService, consumercodes, index) => {
|
|
13125
13146
|
if (bussinessService === "WS") {
|
|
13126
13147
|
const updated = [...propertyDetails.waterConnection];
|
|
13127
13148
|
updated[index].isLoading = true;
|
|
@@ -13148,15 +13169,15 @@ const PropertyDetailsForm$1 = ({
|
|
|
13148
13169
|
}));
|
|
13149
13170
|
}
|
|
13150
13171
|
try {
|
|
13151
|
-
var _result$Bill;
|
|
13172
|
+
var _result$Bill$, _result$Bill;
|
|
13152
13173
|
const result = await Digit.PaymentService.fetchBill(tenantId, {
|
|
13153
13174
|
businessService: bussinessService,
|
|
13154
13175
|
consumerCode: consumercodes
|
|
13155
13176
|
});
|
|
13156
13177
|
setPropertyLoader(false);
|
|
13178
|
+
const amount = (result === null || result === void 0 ? void 0 : (_result$Bill$ = result.Bill[0]) === null || _result$Bill$ === void 0 ? void 0 : _result$Bill$.totalAmount) || 0;
|
|
13157
13179
|
if ((result === null || result === void 0 ? void 0 : (_result$Bill = result.Bill) === null || _result$Bill === void 0 ? void 0 : _result$Bill.length) > 0) {
|
|
13158
|
-
|
|
13159
|
-
if ((result === null || result === void 0 ? void 0 : (_result$Bill$ = result.Bill[0]) === null || _result$Bill$ === void 0 ? void 0 : _result$Bill$.totalAmount) > 0) {
|
|
13180
|
+
if (amount > 0) {
|
|
13160
13181
|
setShowToast({
|
|
13161
13182
|
error: true,
|
|
13162
13183
|
label: t("NDC_MESSAGE_DUES_FOUND_PLEASE_PAY")
|
|
@@ -13282,13 +13303,65 @@ const PropertyDetailsForm$1 = ({
|
|
|
13282
13303
|
}
|
|
13283
13304
|
}
|
|
13284
13305
|
} catch (error) {
|
|
13306
|
+
var _error$response, _error$response2, _error$response2$data, _error$response2$data2;
|
|
13307
|
+
console.log("error", error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.data);
|
|
13308
|
+
const checkError = error === null || error === void 0 ? void 0 : (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : (_error$response2$data = _error$response2.data) === null || _error$response2$data === void 0 ? void 0 : (_error$response2$data2 = _error$response2$data.Errors[0]) === null || _error$response2$data2 === void 0 ? void 0 : _error$response2$data2.code;
|
|
13309
|
+
if (checkError == "EMPTY_DEMANDS") {
|
|
13310
|
+
if (bussinessService === "WS") {
|
|
13311
|
+
const updated = [...propertyDetails.waterConnection];
|
|
13312
|
+
updated[index].isLoading = false;
|
|
13313
|
+
updated[index].billData = {
|
|
13314
|
+
totalAmount: 0
|
|
13315
|
+
};
|
|
13316
|
+
setPropertyDetails(prev => ({
|
|
13317
|
+
...prev,
|
|
13318
|
+
waterConnection: updated
|
|
13319
|
+
}));
|
|
13320
|
+
setShowToast({
|
|
13321
|
+
error: false,
|
|
13322
|
+
label: t("NDC_NO_BILLS_FOUND_WS")
|
|
13323
|
+
});
|
|
13324
|
+
} else if (bussinessService === "SW") {
|
|
13325
|
+
const updated = [...propertyDetails.sewerageConnection];
|
|
13326
|
+
updated[index].isLoading = false;
|
|
13327
|
+
updated[index].billData = {
|
|
13328
|
+
totalAmount: 0
|
|
13329
|
+
};
|
|
13330
|
+
setPropertyDetails(prev => ({
|
|
13331
|
+
...prev,
|
|
13332
|
+
sewerageConnection: updated
|
|
13333
|
+
}));
|
|
13334
|
+
setShowToast({
|
|
13335
|
+
error: false,
|
|
13336
|
+
label: t("NDC_NO_BILLS_FOUND_SW")
|
|
13337
|
+
});
|
|
13338
|
+
}
|
|
13339
|
+
return;
|
|
13340
|
+
}
|
|
13341
|
+
if (bussinessService === "WS") {
|
|
13342
|
+
const updated = [...propertyDetails.waterConnection];
|
|
13343
|
+
updated[index].isLoading = false;
|
|
13344
|
+
updated[index].billData = {};
|
|
13345
|
+
setPropertyDetails(prev => ({
|
|
13346
|
+
...prev,
|
|
13347
|
+
waterConnection: updated
|
|
13348
|
+
}));
|
|
13349
|
+
} else if (bussinessService === "SW") {
|
|
13350
|
+
const updated = [...propertyDetails.sewerageConnection];
|
|
13351
|
+
updated[index].isLoading = false;
|
|
13352
|
+
updated[index].billData = {};
|
|
13353
|
+
setPropertyDetails(prev => ({
|
|
13354
|
+
...prev,
|
|
13355
|
+
sewerageConnection: updated
|
|
13356
|
+
}));
|
|
13357
|
+
}
|
|
13285
13358
|
setPropertyLoader(false);
|
|
13286
13359
|
setShowToast({
|
|
13287
13360
|
error: true,
|
|
13288
13361
|
label: t("NDC_MESSAGE_FETCH_FAILED")
|
|
13289
13362
|
});
|
|
13290
13363
|
}
|
|
13291
|
-
}
|
|
13364
|
+
};
|
|
13292
13365
|
const closeToast = () => {
|
|
13293
13366
|
setShowToast(null);
|
|
13294
13367
|
};
|
|
@@ -13348,6 +13421,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13348
13421
|
}));
|
|
13349
13422
|
}
|
|
13350
13423
|
}
|
|
13424
|
+
console.log("propertyDetails", propertyDetails);
|
|
13351
13425
|
const PayWSBillModal = (_Digit = Digit) === null || _Digit === void 0 ? void 0 : (_Digit$ComponentRegis = _Digit.ComponentRegistryService) === null || _Digit$ComponentRegis === void 0 ? void 0 : _Digit$ComponentRegis.getComponent("PayWSBillModal");
|
|
13352
13426
|
useEffect(() => {
|
|
13353
13427
|
if (showToast) {
|
|
@@ -13358,12 +13432,11 @@ const PropertyDetailsForm$1 = ({
|
|
|
13358
13432
|
}
|
|
13359
13433
|
}, [showToast]);
|
|
13360
13434
|
useEffect(() => {
|
|
13361
|
-
var _checkApiDataCheck$
|
|
13362
|
-
if (checkApiDataCheck !== null && checkApiDataCheck !== void 0 && (_checkApiDataCheck$
|
|
13363
|
-
var _checkApiDataCheck$
|
|
13364
|
-
const checkOwners = (checkApiDataCheck === null || checkApiDataCheck === void 0 ? void 0 : (_checkApiDataCheck$
|
|
13435
|
+
var _checkApiDataCheck$Ap;
|
|
13436
|
+
if (checkApiDataCheck !== null && checkApiDataCheck !== void 0 && (_checkApiDataCheck$Ap = checkApiDataCheck.Applications) !== null && _checkApiDataCheck$Ap !== void 0 && _checkApiDataCheck$Ap[0] || apiDataCheck !== null && apiDataCheck !== void 0 && apiDataCheck[0]) {
|
|
13437
|
+
var _checkApiDataCheck$Ap2, _checkApiDataCheck$Ap3, _apiDataCheck$7;
|
|
13438
|
+
const checkOwners = (checkApiDataCheck === null || checkApiDataCheck === void 0 ? void 0 : (_checkApiDataCheck$Ap2 = checkApiDataCheck.Applications) === null || _checkApiDataCheck$Ap2 === void 0 ? void 0 : (_checkApiDataCheck$Ap3 = _checkApiDataCheck$Ap2[0]) === null || _checkApiDataCheck$Ap3 === void 0 ? void 0 : _checkApiDataCheck$Ap3.owners) || (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$7 = apiDataCheck[0]) === null || _apiDataCheck$7 === void 0 ? void 0 : _apiDataCheck$7.owners);
|
|
13365
13439
|
const filterRow = checkOwners === null || checkOwners === void 0 ? void 0 : checkOwners.find(owner => owner === null || owner === void 0 ? void 0 : owner.isPrimaryOwner);
|
|
13366
|
-
console.log("filterRow===", filterRow);
|
|
13367
13440
|
setSelectedRow(filterRow);
|
|
13368
13441
|
}
|
|
13369
13442
|
}, [checkApiDataCheck, apiDataCheck]);
|
|
@@ -13371,7 +13444,32 @@ const PropertyDetailsForm$1 = ({
|
|
|
13371
13444
|
style: {
|
|
13372
13445
|
marginBottom: "16px"
|
|
13373
13446
|
}
|
|
13374
|
-
},
|
|
13447
|
+
}, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
13448
|
+
className: "card-label-smaller ndc_card_labels"
|
|
13449
|
+
}, `${t("Land Area")} * `), /*#__PURE__*/React.createElement("div", {
|
|
13450
|
+
className: "form-field"
|
|
13451
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
13452
|
+
control: control,
|
|
13453
|
+
name: "landArea",
|
|
13454
|
+
defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.landArea) || "",
|
|
13455
|
+
render: props => {
|
|
13456
|
+
var _formData$cpt6, _formData$cpt6$detail;
|
|
13457
|
+
return /*#__PURE__*/React.createElement(TextInput, {
|
|
13458
|
+
value: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.landArea,
|
|
13459
|
+
onChange: e => {
|
|
13460
|
+
setPropertyDetails(prev => ({
|
|
13461
|
+
...prev,
|
|
13462
|
+
landArea: e.target.value
|
|
13463
|
+
}));
|
|
13464
|
+
props.onChange(e.target.value);
|
|
13465
|
+
},
|
|
13466
|
+
onBlur: e => {
|
|
13467
|
+
props.onBlur(e);
|
|
13468
|
+
},
|
|
13469
|
+
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$detail.landArea
|
|
13470
|
+
});
|
|
13471
|
+
}
|
|
13472
|
+
}))), ((formData === null || formData === void 0 ? void 0 : (_formData$cpt7 = formData.cpt) === null || _formData$cpt7 === void 0 ? void 0 : _formData$cpt7.details) || (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$8 = apiDataCheck[0]) === null || _apiDataCheck$8 === void 0 ? void 0 : _apiDataCheck$8.NdcDetails)) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, {
|
|
13375
13473
|
style: {
|
|
13376
13474
|
marginTop: "40px"
|
|
13377
13475
|
}
|
|
@@ -13386,7 +13484,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13386
13484
|
width: "100%"
|
|
13387
13485
|
}
|
|
13388
13486
|
}, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.map((item, index) => {
|
|
13389
|
-
var _apiDataCheck$
|
|
13487
|
+
var _apiDataCheck$9, _item$billData, _item$billData2, _item$billData3, _item$billData4;
|
|
13390
13488
|
return /*#__PURE__*/React.createElement("div", {
|
|
13391
13489
|
className: "ndc_property_search",
|
|
13392
13490
|
key: index,
|
|
@@ -13427,7 +13525,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13427
13525
|
alignItems: "center",
|
|
13428
13526
|
gap: "12px"
|
|
13429
13527
|
}
|
|
13430
|
-
}, !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$
|
|
13528
|
+
}, !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$9 = apiDataCheck[0]) !== null && _apiDataCheck$9 !== void 0 && _apiDataCheck$9.NdcDetails) && (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", {
|
|
13431
13529
|
className: "submit-bar",
|
|
13432
13530
|
type: "button",
|
|
13433
13531
|
style: {
|
|
@@ -13494,7 +13592,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13494
13592
|
width: "100%"
|
|
13495
13593
|
}
|
|
13496
13594
|
}, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$sewe = propertyDetails.sewerageConnection) === null || _propertyDetails$sewe === void 0 ? void 0 : _propertyDetails$sewe.map((item, index) => {
|
|
13497
|
-
var _apiDataCheck$
|
|
13595
|
+
var _apiDataCheck$0, _item$billData5, _item$billData6, _item$billData7, _item$billData8;
|
|
13498
13596
|
return /*#__PURE__*/React.createElement("div", {
|
|
13499
13597
|
className: "ndc_property_search",
|
|
13500
13598
|
key: index,
|
|
@@ -13535,7 +13633,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13535
13633
|
alignItems: "center",
|
|
13536
13634
|
gap: "12px"
|
|
13537
13635
|
}
|
|
13538
|
-
}, !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$
|
|
13636
|
+
}, !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$0 = apiDataCheck[0]) !== null && _apiDataCheck$0 !== void 0 && _apiDataCheck$0.NdcDetails) && (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", {
|
|
13539
13637
|
className: "submit-bar",
|
|
13540
13638
|
type: "button",
|
|
13541
13639
|
style: {
|
|
@@ -13601,7 +13699,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13601
13699
|
}, "Please Select One Owner Name Who will have the access of No Due Certificate"), /*#__PURE__*/React.createElement(Table, {
|
|
13602
13700
|
className: "customTable table-border-style",
|
|
13603
13701
|
t: t,
|
|
13604
|
-
data: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
13702
|
+
data: (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$detail.owners) || [],
|
|
13605
13703
|
columns: applicationFeeColumns,
|
|
13606
13704
|
getCellProps: () => ({
|
|
13607
13705
|
style: {}
|
|
@@ -13628,7 +13726,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13628
13726
|
}
|
|
13629
13727
|
},
|
|
13630
13728
|
render: props => {
|
|
13631
|
-
var _formData$
|
|
13729
|
+
var _formData$cpt9, _formData$cpt9$detail, _formData$cpt9$detail2, _formData$cpt9$detail3, _formData$cpt9$detail4, _formData$cpt9$detail5, _formData$cpt9$detail6;
|
|
13632
13730
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
13633
13731
|
value: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.firstName) || "",
|
|
13634
13732
|
onChange: e => {
|
|
@@ -13641,7 +13739,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13641
13739
|
onBlur: e => {
|
|
13642
13740
|
props.onBlur(e);
|
|
13643
13741
|
},
|
|
13644
|
-
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
13742
|
+
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$cpt9 = formData.cpt) === null || _formData$cpt9 === void 0 ? void 0 : (_formData$cpt9$detail = _formData$cpt9.details) === null || _formData$cpt9$detail === void 0 ? void 0 : (_formData$cpt9$detail2 = _formData$cpt9$detail.owners) === null || _formData$cpt9$detail2 === void 0 ? void 0 : (_formData$cpt9$detail3 = _formData$cpt9$detail2[0]) === null || _formData$cpt9$detail3 === void 0 ? void 0 : (_formData$cpt9$detail4 = _formData$cpt9$detail3.name) === null || _formData$cpt9$detail4 === void 0 ? void 0 : (_formData$cpt9$detail5 = _formData$cpt9$detail4.split(" ")) === null || _formData$cpt9$detail5 === void 0 ? void 0 : (_formData$cpt9$detail6 = _formData$cpt9$detail5[0]) === null || _formData$cpt9$detail6 === void 0 ? void 0 : _formData$cpt9$detail6.length) > 0
|
|
13645
13743
|
});
|
|
13646
13744
|
}
|
|
13647
13745
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
@@ -13667,6 +13765,31 @@ const PropertyDetailsForm$1 = ({
|
|
|
13667
13765
|
})
|
|
13668
13766
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
13669
13767
|
className: "card-label-smaller ndc_card_labels"
|
|
13768
|
+
}, `${t("Father Name")} * `), /*#__PURE__*/React.createElement("div", {
|
|
13769
|
+
className: "form-field"
|
|
13770
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
13771
|
+
control: control,
|
|
13772
|
+
name: "fatherOrHusbandName",
|
|
13773
|
+
defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.fatherOrHusbandName) || "",
|
|
13774
|
+
render: props => {
|
|
13775
|
+
var _formData$cpt0, _formData$cpt0$detail, _formData$cpt0$detail2, _formData$cpt0$detail3;
|
|
13776
|
+
return /*#__PURE__*/React.createElement(TextInput, {
|
|
13777
|
+
value: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.fatherOrHusbandName,
|
|
13778
|
+
onChange: e => {
|
|
13779
|
+
setPropertyDetails(prev => ({
|
|
13780
|
+
...prev,
|
|
13781
|
+
fatherOrHusbandName: e.target.value
|
|
13782
|
+
}));
|
|
13783
|
+
props.onChange(e.target.value);
|
|
13784
|
+
},
|
|
13785
|
+
onBlur: e => {
|
|
13786
|
+
props.onBlur(e);
|
|
13787
|
+
},
|
|
13788
|
+
disabled: formData === null || formData === void 0 ? void 0 : (_formData$cpt0 = formData.cpt) === null || _formData$cpt0 === void 0 ? void 0 : (_formData$cpt0$detail = _formData$cpt0.details) === null || _formData$cpt0$detail === void 0 ? void 0 : (_formData$cpt0$detail2 = _formData$cpt0$detail.owners) === null || _formData$cpt0$detail2 === void 0 ? void 0 : (_formData$cpt0$detail3 = _formData$cpt0$detail2[0]) === null || _formData$cpt0$detail3 === void 0 ? void 0 : _formData$cpt0$detail3.fatherOrHusbandName
|
|
13789
|
+
});
|
|
13790
|
+
}
|
|
13791
|
+
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
13792
|
+
className: "card-label-smaller ndc_card_labels"
|
|
13670
13793
|
}, `${t("NDC_MOBILE_NUMBER")} * `), /*#__PURE__*/React.createElement("div", {
|
|
13671
13794
|
className: "form-field"
|
|
13672
13795
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -13674,7 +13797,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13674
13797
|
name: "mobileNumber",
|
|
13675
13798
|
defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.mobileNumber) || "",
|
|
13676
13799
|
render: props => {
|
|
13677
|
-
var _formData$
|
|
13800
|
+
var _formData$cpt1, _formData$cpt1$detail, _formData$cpt1$detail2, _formData$cpt1$detail3;
|
|
13678
13801
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
13679
13802
|
value: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.mobileNumber,
|
|
13680
13803
|
onChange: e => {
|
|
@@ -13687,7 +13810,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13687
13810
|
onBlur: e => {
|
|
13688
13811
|
props.onBlur(e);
|
|
13689
13812
|
},
|
|
13690
|
-
disabled: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
13813
|
+
disabled: formData === null || formData === void 0 ? void 0 : (_formData$cpt1 = formData.cpt) === null || _formData$cpt1 === void 0 ? void 0 : (_formData$cpt1$detail = _formData$cpt1.details) === null || _formData$cpt1$detail === void 0 ? void 0 : (_formData$cpt1$detail2 = _formData$cpt1$detail.owners) === null || _formData$cpt1$detail2 === void 0 ? void 0 : (_formData$cpt1$detail3 = _formData$cpt1$detail2[0]) === null || _formData$cpt1$detail3 === void 0 ? void 0 : _formData$cpt1$detail3.mobileNumber
|
|
13691
13814
|
});
|
|
13692
13815
|
}
|
|
13693
13816
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
@@ -13699,7 +13822,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13699
13822
|
name: "address",
|
|
13700
13823
|
defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address) || "",
|
|
13701
13824
|
render: props => {
|
|
13702
|
-
var _formData$
|
|
13825
|
+
var _formData$cpt10, _formData$cpt10$detai, _formData$cpt10$detai2, _formData$cpt10$detai3, _formData$cpt10$detai4;
|
|
13703
13826
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
13704
13827
|
value: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address,
|
|
13705
13828
|
onChange: e => {
|
|
@@ -13712,7 +13835,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13712
13835
|
onBlur: e => {
|
|
13713
13836
|
props.onBlur(e);
|
|
13714
13837
|
},
|
|
13715
|
-
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
13838
|
+
disabled: (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$detai2 = _formData$cpt10$detai.owners) === null || _formData$cpt10$detai2 === void 0 ? void 0 : (_formData$cpt10$detai3 = _formData$cpt10$detai2[0]) === null || _formData$cpt10$detai3 === void 0 ? void 0 : (_formData$cpt10$detai4 = _formData$cpt10$detai3.permanentAddress) === null || _formData$cpt10$detai4 === void 0 ? void 0 : _formData$cpt10$detai4.length) > 0
|
|
13716
13839
|
});
|
|
13717
13840
|
}
|
|
13718
13841
|
}))))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
@@ -13989,7 +14112,7 @@ const PropertySearchNSummary = ({
|
|
|
13989
14112
|
[input]: value
|
|
13990
14113
|
});
|
|
13991
14114
|
}
|
|
13992
|
-
async
|
|
14115
|
+
const fetchBill = async () => {
|
|
13993
14116
|
setLoader(true);
|
|
13994
14117
|
try {
|
|
13995
14118
|
var _formData$cpt0, _result$Bill;
|
|
@@ -14049,7 +14172,7 @@ const PropertySearchNSummary = ({
|
|
|
14049
14172
|
label: t("NDC_MESSAGE_FETCH_FAILED")
|
|
14050
14173
|
});
|
|
14051
14174
|
}
|
|
14052
|
-
}
|
|
14175
|
+
};
|
|
14053
14176
|
function redirectToPayBill(billData, index, isEdit) {
|
|
14054
14177
|
var _formData$cpt1, _formData$cpt10, _formData$cpt10$detai;
|
|
14055
14178
|
const userType = window.location.href.includes("employee") ? "employee" : "citizen";
|
|
@@ -14137,13 +14260,13 @@ const SelectNDCDocuments = ({
|
|
|
14137
14260
|
const [error, setError] = useState(null);
|
|
14138
14261
|
useEffect(() => {
|
|
14139
14262
|
var _checkFormData$respon, _checkFormData$respon2, _checkFormData$respon3;
|
|
14140
|
-
console.log("coming here again");
|
|
14263
|
+
console.log("coming here again", checkFormData);
|
|
14141
14264
|
if (checkFormData !== null && checkFormData !== void 0 && (_checkFormData$respon = checkFormData.responseData) !== null && _checkFormData$respon !== void 0 && (_checkFormData$respon2 = _checkFormData$respon[0]) !== null && _checkFormData$respon2 !== void 0 && (_checkFormData$respon3 = _checkFormData$respon2.Documents) !== null && _checkFormData$respon3 !== void 0 && _checkFormData$respon3.length && documents.length === 0) {
|
|
14142
14265
|
var _checkFormData$respon4, _checkFormData$respon5, _checkFormData$respon6;
|
|
14143
14266
|
const apiDocs = checkFormData === null || checkFormData === void 0 ? void 0 : (_checkFormData$respon4 = checkFormData.responseData) === null || _checkFormData$respon4 === void 0 ? void 0 : (_checkFormData$respon5 = _checkFormData$respon4[0]) === null || _checkFormData$respon5 === void 0 ? void 0 : (_checkFormData$respon6 = _checkFormData$respon5.Documents) === null || _checkFormData$respon6 === void 0 ? void 0 : _checkFormData$respon6.map(doc => ({
|
|
14144
14267
|
documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
14145
|
-
fileStoreId: doc === null || doc === void 0 ? void 0 : doc.
|
|
14146
|
-
documentUid: doc === null || doc === void 0 ? void 0 : doc.
|
|
14268
|
+
fileStoreId: doc === null || doc === void 0 ? void 0 : doc.uuid,
|
|
14269
|
+
documentUid: doc === null || doc === void 0 ? void 0 : doc.uuid
|
|
14147
14270
|
}));
|
|
14148
14271
|
setDocuments(apiDocs);
|
|
14149
14272
|
}
|
|
@@ -14341,24 +14464,14 @@ const NewNDCStepFormTwo = ({
|
|
|
14341
14464
|
}
|
|
14342
14465
|
}
|
|
14343
14466
|
const updateApplication = async data => {
|
|
14344
|
-
var _Digit$UserService$ge,
|
|
14467
|
+
var _Digit$UserService$ge, _checkFormData$respon, _ref, _data$documents, _response$ResponseInf;
|
|
14345
14468
|
const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
|
|
14346
|
-
console.log("final data===||||?", data);
|
|
14347
|
-
console.log("checkFormData||?====", checkFormData);
|
|
14348
|
-
const owners = [{
|
|
14349
|
-
name: user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.name,
|
|
14350
|
-
mobileNumber: user === null || user === void 0 ? void 0 : (_user$info2 = user.info) === null || _user$info2 === void 0 ? void 0 : _user$info2.mobileNumber,
|
|
14351
|
-
gender: checkFormData === null || checkFormData === void 0 ? void 0 : (_checkFormData$NDCDet = checkFormData.NDCDetails) === null || _checkFormData$NDCDet === void 0 ? void 0 : (_checkFormData$NDCDet2 = _checkFormData$NDCDet.PropertyDetails) === null || _checkFormData$NDCDet2 === void 0 ? void 0 : _checkFormData$NDCDet2.gender,
|
|
14352
|
-
emailId: user === null || user === void 0 ? void 0 : (_user$info3 = user.info) === null || _user$info3 === void 0 ? void 0 : _user$info3.emailId,
|
|
14353
|
-
type: user === null || user === void 0 ? void 0 : (_user$info4 = user.info) === null || _user$info4 === void 0 ? void 0 : _user$info4.type
|
|
14354
|
-
}];
|
|
14355
14469
|
const baseApplication = (checkFormData === null || checkFormData === void 0 ? void 0 : (_checkFormData$respon = checkFormData.responseData) === null || _checkFormData$respon === void 0 ? void 0 : _checkFormData$respon[0]) || {};
|
|
14356
14470
|
const updatedApplication = {
|
|
14357
14471
|
...baseApplication,
|
|
14358
14472
|
workflow: {
|
|
14359
|
-
|
|
14473
|
+
action: "DRAFT"
|
|
14360
14474
|
},
|
|
14361
|
-
owners: owners,
|
|
14362
14475
|
NdcDetails: baseApplication === null || baseApplication === void 0 ? void 0 : baseApplication.NdcDetails,
|
|
14363
14476
|
Documents: []
|
|
14364
14477
|
};
|
|
@@ -14412,7 +14525,7 @@ const NewNDCStepFormTwo = ({
|
|
|
14412
14525
|
onBackClick(config.key, data);
|
|
14413
14526
|
}
|
|
14414
14527
|
const onFormValueChange = (setValue = true, data) => {
|
|
14415
|
-
if (!
|
|
14528
|
+
if (!lodash.isEqual(data, currentStepData)) {
|
|
14416
14529
|
dispatch(updateNDCForm(config.key, data));
|
|
14417
14530
|
}
|
|
14418
14531
|
};
|
|
@@ -14668,10 +14781,10 @@ const NDCNewFormSummaryStepThreeCitizen = ({
|
|
|
14668
14781
|
}
|
|
14669
14782
|
};
|
|
14670
14783
|
function mapToNDCPayload(inputData, actionStatus) {
|
|
14671
|
-
var _Digit$UserService$ge,
|
|
14784
|
+
var _Digit$UserService$ge, _inputData$apiData, _inputData$apiData$Ap, _inputData$apiData$Ap2, _formData$responseDat, _formData$apiData, _formData$apiData$App, _inputData$DocummentD, _inputData$DocummentD2;
|
|
14672
14785
|
const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
|
|
14673
14786
|
console.log("inputData", inputData);
|
|
14674
|
-
const owners = (
|
|
14787
|
+
const owners = ((inputData === null || inputData === void 0 ? void 0 : (_inputData$apiData = inputData.apiData) === null || _inputData$apiData === void 0 ? void 0 : (_inputData$apiData$Ap = _inputData$apiData.Applications) === null || _inputData$apiData$Ap === void 0 ? void 0 : (_inputData$apiData$Ap2 = _inputData$apiData$Ap[0]) === null || _inputData$apiData$Ap2 === void 0 ? void 0 : _inputData$apiData$Ap2.owners) || []).map(item => {
|
|
14675
14788
|
const obj = JSON.parse(JSON.stringify(item));
|
|
14676
14789
|
delete obj.status;
|
|
14677
14790
|
return obj;
|
|
@@ -14766,7 +14879,7 @@ const PayWSBillModal = ({
|
|
|
14766
14879
|
d: "M0 0h24v24H0V0z",
|
|
14767
14880
|
fill: "none"
|
|
14768
14881
|
}), /*#__PURE__*/React.createElement("path", {
|
|
14769
|
-
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41
|
|
14882
|
+
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
14770
14883
|
}));
|
|
14771
14884
|
const CloseBtn = ({
|
|
14772
14885
|
onClick
|
|
@@ -15095,11 +15208,11 @@ const NewNDCStepFormOne$1 = ({
|
|
|
15095
15208
|
onGoNext();
|
|
15096
15209
|
}
|
|
15097
15210
|
const createApplication = async data => {
|
|
15098
|
-
var _Digit$UserService$ge,
|
|
15211
|
+
var _Digit$UserService$ge, _data$cpt2, _data$cpt2$details, _data$PropertyDetails5, _data$PropertyDetails7, _data$PropertyDetails9, _data$PropertyDetails1, _data$PropertyDetails10, _data$NDCReason2;
|
|
15099
15212
|
setLoader(true);
|
|
15100
15213
|
const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
|
|
15101
15214
|
const applicantId = applicant === null || applicant === void 0 ? void 0 : applicant.uuid;
|
|
15102
|
-
const owners = (
|
|
15215
|
+
const owners = ((data === null || data === void 0 ? void 0 : (_data$cpt2 = data.cpt) === null || _data$cpt2 === void 0 ? void 0 : (_data$cpt2$details = _data$cpt2.details) === null || _data$cpt2$details === void 0 ? void 0 : _data$cpt2$details.owners) || []).map(owner => {
|
|
15103
15216
|
var _newOwner$name, _newOwner$name$trim, _data$PropertyDetails, _data$PropertyDetails2, _data$PropertyDetails3;
|
|
15104
15217
|
const newOwner = JSON.parse(JSON.stringify(owner));
|
|
15105
15218
|
delete newOwner.status;
|
|
@@ -15259,7 +15372,7 @@ const NewNDCStepFormOne$1 = ({
|
|
|
15259
15372
|
onBackClick(config.key, data);
|
|
15260
15373
|
}
|
|
15261
15374
|
const onFormValueChange = (setValue = true, data) => {
|
|
15262
|
-
if (!
|
|
15375
|
+
if (!lodash.isEqual(data, currentStepData)) {
|
|
15263
15376
|
dispatch(updateNDCForm(config.key, data));
|
|
15264
15377
|
}
|
|
15265
15378
|
};
|
|
@@ -15333,7 +15446,7 @@ const NewNDCStepFormTwo$1 = ({
|
|
|
15333
15446
|
onBackClick(config.key, data);
|
|
15334
15447
|
}
|
|
15335
15448
|
const onFormValueChange = (setValue = true, data) => {
|
|
15336
|
-
if (!
|
|
15449
|
+
if (!lodash.isEqual(data, currentStepData)) {
|
|
15337
15450
|
dispatch(updateNDCForm(config.key, data));
|
|
15338
15451
|
}
|
|
15339
15452
|
};
|
|
@@ -15382,15 +15495,14 @@ const NDCNewFormSummaryStepThreeEmployee = ({
|
|
|
15382
15495
|
}
|
|
15383
15496
|
};
|
|
15384
15497
|
function mapToNDCPayload(inputData, actionStatus) {
|
|
15385
|
-
var _Digit$UserService$ge, _ref, _inputData$apiData, _inputData$apiData$Ap, _inputData$apiData$Ap2,
|
|
15498
|
+
var _Digit$UserService$ge, _formData$responseDat, _formData$apiData, _formData$apiData$App, _ref, _inputData$apiData, _inputData$apiData$Ap, _inputData$apiData$Ap2, _baseApplication$NdcD, _formData$NDCDetails4, _formData$NDCDetails5, _inputData$DocummentD, _inputData$DocummentD2;
|
|
15386
15499
|
const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
|
|
15387
|
-
|
|
15388
|
-
const owners = (_ref = (inputData === null || inputData === void 0 ? void 0 : (_inputData$apiData = inputData.apiData) === null || _inputData$apiData === void 0 ? void 0 : (_inputData$apiData$Ap = _inputData$apiData.Applications) === null || _inputData$apiData$Ap === void 0 ? void 0 : (_inputData$apiData$Ap2 = _inputData$apiData$Ap[0]) === null || _inputData$apiData$Ap2 === void 0 ? void 0 : _inputData$apiData$Ap2.owners) ||
|
|
15500
|
+
const baseApplication = (formData === null || formData === void 0 ? void 0 : (_formData$responseDat = formData.responseData) === null || _formData$responseDat === void 0 ? void 0 : _formData$responseDat[0]) || (formData === null || formData === void 0 ? void 0 : (_formData$apiData = formData.apiData) === null || _formData$apiData === void 0 ? void 0 : (_formData$apiData$App = _formData$apiData.Applications) === null || _formData$apiData$App === void 0 ? void 0 : _formData$apiData$App[0]) || {};
|
|
15501
|
+
const owners = (_ref = (inputData === null || inputData === void 0 ? void 0 : (_inputData$apiData = inputData.apiData) === null || _inputData$apiData === void 0 ? void 0 : (_inputData$apiData$Ap = _inputData$apiData.Applications) === null || _inputData$apiData$Ap === void 0 ? void 0 : (_inputData$apiData$Ap2 = _inputData$apiData$Ap[0]) === null || _inputData$apiData$Ap2 === void 0 ? void 0 : _inputData$apiData$Ap2.owners) || (baseApplication === null || baseApplication === void 0 ? void 0 : baseApplication.owners)) === null || _ref === void 0 ? void 0 : _ref.map(item => {
|
|
15389
15502
|
const obj = JSON.parse(JSON.stringify(item));
|
|
15390
15503
|
delete obj.status;
|
|
15391
15504
|
return obj;
|
|
15392
15505
|
});
|
|
15393
|
-
const baseApplication = (formData === null || formData === void 0 ? void 0 : (_formData$responseDat = formData.responseData) === null || _formData$responseDat === void 0 ? void 0 : _formData$responseDat[0]) || (formData === null || formData === void 0 ? void 0 : (_formData$apiData = formData.apiData) === null || _formData$apiData === void 0 ? void 0 : (_formData$apiData$App = _formData$apiData.Applications) === null || _formData$apiData$App === void 0 ? void 0 : _formData$apiData$App[0]) || {};
|
|
15394
15506
|
const updatedApplication = {
|
|
15395
15507
|
...baseApplication,
|
|
15396
15508
|
workflow: {
|
|
@@ -15398,7 +15510,21 @@ const NDCNewFormSummaryStepThreeEmployee = ({
|
|
|
15398
15510
|
action: actionStatus
|
|
15399
15511
|
},
|
|
15400
15512
|
owners: owners,
|
|
15401
|
-
NdcDetails: baseApplication === null || baseApplication === void 0 ? void 0 : baseApplication.NdcDetails
|
|
15513
|
+
NdcDetails: baseApplication === null || baseApplication === void 0 ? void 0 : (_baseApplication$NdcD = baseApplication.NdcDetails) === null || _baseApplication$NdcD === void 0 ? void 0 : _baseApplication$NdcD.map(detail => {
|
|
15514
|
+
if (detail.businessService === "PT") {
|
|
15515
|
+
var _formData$NDCDetails, _formData$NDCDetails$, _formData$NDCDetails2, _formData$NDCDetails3;
|
|
15516
|
+
return {
|
|
15517
|
+
...detail,
|
|
15518
|
+
additionalDetails: {
|
|
15519
|
+
...detail.additionalDetails,
|
|
15520
|
+
reason: formData === null || formData === void 0 ? void 0 : (_formData$NDCDetails = formData.NDCDetails) === null || _formData$NDCDetails === void 0 ? void 0 : (_formData$NDCDetails$ = _formData$NDCDetails.NDCReason) === null || _formData$NDCDetails$ === void 0 ? void 0 : _formData$NDCDetails$.reason,
|
|
15521
|
+
remarks: formData === null || formData === void 0 ? void 0 : (_formData$NDCDetails2 = formData.NDCDetails) === null || _formData$NDCDetails2 === void 0 ? void 0 : (_formData$NDCDetails3 = _formData$NDCDetails2.PropertyDetails) === null || _formData$NDCDetails3 === void 0 ? void 0 : _formData$NDCDetails3.remarks
|
|
15522
|
+
}
|
|
15523
|
+
};
|
|
15524
|
+
}
|
|
15525
|
+
return detail;
|
|
15526
|
+
}),
|
|
15527
|
+
reason: formData === null || formData === void 0 ? void 0 : (_formData$NDCDetails4 = formData.NDCDetails) === null || _formData$NDCDetails4 === void 0 ? void 0 : (_formData$NDCDetails5 = _formData$NDCDetails4.NDCReason) === null || _formData$NDCDetails5 === void 0 ? void 0 : _formData$NDCDetails5.code,
|
|
15402
15528
|
Documents: []
|
|
15403
15529
|
};
|
|
15404
15530
|
((inputData === null || inputData === void 0 ? void 0 : (_inputData$DocummentD = inputData.DocummentDetails) === null || _inputData$DocummentD === void 0 ? void 0 : (_inputData$DocummentD2 = _inputData$DocummentD.documents) === null || _inputData$DocummentD2 === void 0 ? void 0 : _inputData$DocummentD2.documents) || []).forEach(doc => {
|
|
@@ -15524,7 +15650,7 @@ const MyApplications = ({
|
|
|
15524
15650
|
};
|
|
15525
15651
|
|
|
15526
15652
|
const NDCResponseCitizen = props => {
|
|
15527
|
-
var _state$data, _state$data$Noc, _history$location;
|
|
15653
|
+
var _state$data, _state$data$Noc, _history$location, _applicationDetails$A, _applicationDetails$A2;
|
|
15528
15654
|
const {
|
|
15529
15655
|
state
|
|
15530
15656
|
} = props.location;
|
|
@@ -15545,6 +15671,12 @@ const NDCResponseCitizen = props => {
|
|
|
15545
15671
|
const handlePayment = () => {
|
|
15546
15672
|
history.push(`/digit-ui/citizen/payment/collect/NDC/${ndcCode}/${tenantId}?tenantId=${tenantId}`);
|
|
15547
15673
|
};
|
|
15674
|
+
const {
|
|
15675
|
+
isLoading,
|
|
15676
|
+
data: applicationDetails
|
|
15677
|
+
} = Digit.Hooks.ndc.useSearchEmployeeApplication({
|
|
15678
|
+
applicationNo: ndcCode
|
|
15679
|
+
}, tenantId);
|
|
15548
15680
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(Banner, {
|
|
15549
15681
|
message: "NDC Application Submitted Successfully",
|
|
15550
15682
|
applicationNumber: ndcCode,
|
|
@@ -15565,7 +15697,7 @@ const NDCResponseCitizen = props => {
|
|
|
15565
15697
|
}), /*#__PURE__*/React.createElement(SubmitBar$1, {
|
|
15566
15698
|
label: t("CORE_COMMON_GO_TO_NDC"),
|
|
15567
15699
|
onSubmit: onGoToNDC
|
|
15568
|
-
}), /*#__PURE__*/React.createElement(SubmitBar$1, {
|
|
15700
|
+
}), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : (_applicationDetails$A2 = _applicationDetails$A[0]) === null || _applicationDetails$A2 === void 0 ? void 0 : _applicationDetails$A2.applicationStatus) == "PENDINGPAYMENT" && /*#__PURE__*/React.createElement(SubmitBar$1, {
|
|
15569
15701
|
label: t("CS_APPLICATION_DETAILS_MAKE_PAYMENT"),
|
|
15570
15702
|
onSubmit: handlePayment
|
|
15571
15703
|
}))));
|