@mseva/digit-ui-module-ndc 1.0.34 → 1.0.35
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 -14942
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +25 -222
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1309,14 +1309,9 @@ const ApplicationOverview = () => {
|
|
|
1309
1309
|
workflow: {}
|
|
1310
1310
|
};
|
|
1311
1311
|
const filtData = data === null || data === void 0 ? void 0 : (_data$Licenses = data.Licenses) === null || _data$Licenses === void 0 ? void 0 : _data$Licenses[0];
|
|
1312
|
-
let checkAssigne;
|
|
1313
|
-
if (filtData.action == "SENDBACKTOCITIZEN") {
|
|
1314
|
-
var _payloadData$owners, _payloadData$owners$;
|
|
1315
|
-
checkAssigne = [payloadData === null || payloadData === void 0 ? void 0 : (_payloadData$owners = payloadData.owners) === null || _payloadData$owners === void 0 ? void 0 : (_payloadData$owners$ = _payloadData$owners[0]) === null || _payloadData$owners$ === void 0 ? void 0 : _payloadData$owners$.uuid];
|
|
1316
|
-
}
|
|
1317
1312
|
updatedApplicant.workflow = {
|
|
1318
1313
|
action: filtData.action,
|
|
1319
|
-
assignes:
|
|
1314
|
+
assignes: filtData === null || filtData === void 0 ? void 0 : filtData.assignee,
|
|
1320
1315
|
comment: filtData === null || filtData === void 0 ? void 0 : filtData.comment,
|
|
1321
1316
|
documents: filtData === null || filtData === void 0 ? void 0 : filtData.wfDocuments
|
|
1322
1317
|
};
|
|
@@ -8870,17 +8865,16 @@ function cleanEscapedString(input) {
|
|
|
8870
8865
|
const capitalize = text => text.substr(0, 1).toUpperCase() + text.substr(1);
|
|
8871
8866
|
const ulbCamel = ulb => ulb.toLowerCase().split(" ").map(capitalize).join(" ");
|
|
8872
8867
|
const getAcknowledgementData = async (application, tenantInfo, t) => {
|
|
8873
|
-
var _application$Applicat, _appData$owners, _appData$NdcDetails, _appData$additionalDe, _tenantInfo$city;
|
|
8868
|
+
var _application$Applicat, _appData$owners, _appData$NdcDetails, _appData$NdcDetails2, _appData$NdcDetails2$, _appData$NdcDetails3, _appData$NdcDetails3$, _appData$NdcDetails3$2, _appData$additionalDe, _tenantInfo$city;
|
|
8874
8869
|
const appData = (application === null || application === void 0 ? void 0 : (_application$Applicat = application.Applications) === null || _application$Applicat === void 0 ? void 0 : _application$Applicat[0]) || {};
|
|
8875
8870
|
const owner = (appData === null || appData === void 0 ? void 0 : (_appData$owners = appData.owners) === null || _appData$owners === void 0 ? void 0 : _appData$owners[0]) || {};
|
|
8876
8871
|
const ndc = (appData === null || appData === void 0 ? void 0 : (_appData$NdcDetails = appData.NdcDetails) === null || _appData$NdcDetails === void 0 ? void 0 : _appData$NdcDetails[0]) || {};
|
|
8877
8872
|
const add = (ndc === null || ndc === void 0 ? void 0 : ndc.additionalDetails) || {};
|
|
8878
8873
|
const applicationNumber = (appData === null || appData === void 0 ? void 0 : appData.uuid) || "NA";
|
|
8879
|
-
const propertyId =
|
|
8874
|
+
const propertyId = appData === null || appData === void 0 ? void 0 : (_appData$NdcDetails2 = appData.NdcDetails) === null || _appData$NdcDetails2 === void 0 ? void 0 : (_appData$NdcDetails2$ = _appData$NdcDetails2[3]) === null || _appData$NdcDetails2$ === void 0 ? void 0 : _appData$NdcDetails2$.consumerCode;
|
|
8880
8875
|
const propertyType = add !== null && add !== void 0 && add.propertyType ? t(add.propertyType) : "NA";
|
|
8881
8876
|
const applicantName = (owner === null || owner === void 0 ? void 0 : owner.name) || "NA";
|
|
8882
|
-
const address = (owner === null || owner === void 0 ? void 0 : owner.permanentAddress) || (owner === null || owner === void 0 ? void 0 : owner.correspondenceAddress) || "NA";
|
|
8883
|
-
const ulbName = (tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.name) || (appData === null || appData === void 0 ? void 0 : appData.tenantId) || "NA";
|
|
8877
|
+
const address = (appData === null || appData === void 0 ? void 0 : (_appData$NdcDetails3 = appData.NdcDetails) === null || _appData$NdcDetails3 === void 0 ? void 0 : (_appData$NdcDetails3$ = _appData$NdcDetails3[0]) === null || _appData$NdcDetails3$ === void 0 ? void 0 : (_appData$NdcDetails3$2 = _appData$NdcDetails3$.additionalDetails) === null || _appData$NdcDetails3$2 === void 0 ? void 0 : _appData$NdcDetails3$2.propertyAddress) || (owner === null || owner === void 0 ? void 0 : owner.permanentAddress) || (owner === null || owner === void 0 ? void 0 : owner.correspondenceAddress) || "NA";
|
|
8884
8878
|
const duesAmount = (add === null || add === void 0 ? void 0 : add.duesAmount) || (appData === null || appData === void 0 ? void 0 : (_appData$additionalDe = appData.additionalDetails) === null || _appData$additionalDe === void 0 ? void 0 : _appData$additionalDe.duesAmount) || "0";
|
|
8885
8879
|
const certificateBody = `${t("NDC_MSG_INTRO")}
|
|
8886
8880
|
|
|
@@ -8888,9 +8882,7 @@ ${t("NDC_MSG_APPLICATION_LABEL")}: ${applicationNumber}
|
|
|
8888
8882
|
|
|
8889
8883
|
${t("NDC_MSG_PROPERTY_LABEL")}: ${propertyId} ${t("NDC_MSG_PROPERTY_TYPE_LABEL")} ${propertyType}
|
|
8890
8884
|
|
|
8891
|
-
${t("NDC_MSG_APPLICANT_LABEL")}: ${applicantName} ${t("NDC_MSG_FOR_LAND")} ${address}
|
|
8892
|
-
|
|
8893
|
-
${t("NDC_MSG_FALLING_CLAUSE_PART1")} ${t("NDC_MSG_FALLING_CLAUSE_PART2")} ${ulbName} ${t("NDC_MSG_AFTER_RECOVERY")} ${duesAmount} ${t("NDC_MSG_DUES_LIST")}
|
|
8885
|
+
${t("NDC_MSG_APPLICANT_LABEL")}: ${applicantName} ${t("NDC_MSG_FOR_LAND")} ${address} ${t("NDC_MSG_FALLING_CLAUSE_PART1")} ${t("NDC_MSG_FALLING_CLAUSE_PART2")} Municipal Council/ Corporation ${t("NDC_MSG_AFTER_RECOVERY")} ${duesAmount} ${t("NDC_MSG_DUES_LIST")}
|
|
8894
8886
|
|
|
8895
8887
|
${t("NDC_MSG_DECLARATION_TITLE")}
|
|
8896
8888
|
${t("NDC_MSG_DECL_A")}
|
|
@@ -9126,7 +9118,6 @@ const CitizenApplicationOverview = () => {
|
|
|
9126
9118
|
className: "ndc_label"
|
|
9127
9119
|
}, t("NDC_APPLICATION_NDC_DETAILS_OVERVIEW")), displayData === null || displayData === void 0 ? void 0 : (_displayData$NdcDetai2 = displayData.NdcDetails) === null || _displayData$NdcDetai2 === void 0 ? void 0 : _displayData$NdcDetai2.map((detail, index) => {
|
|
9128
9120
|
var _detail$dueAmount, _propertyDetailsFetch, _propertyDetailsFetch2, _propertyDetailsFetch3, _propertyDetailsFetch4, _propertyDetailsFetch5, _propertyDetailsFetch6, _propertyDetailsFetch7, _propertyDetailsFetch8, _propertyDetailsFetch9, _propertyDetailsFetch0, _propertyDetailsFetch1, _propertyDetailsFetch10, _propertyDetailsFetch11, _propertyDetailsFetch12, _propertyDetailsFetch13, _propertyDetailsFetch14, _propertyDetailsFetch15, _propertyDetailsFetch16, _propertyDetailsFetch17, _propertyDetailsFetch18;
|
|
9129
|
-
const isRed = detail.dueAmount > 0;
|
|
9130
9121
|
return /*#__PURE__*/React.createElement("div", {
|
|
9131
9122
|
key: index,
|
|
9132
9123
|
style: {
|
|
@@ -9141,17 +9132,10 @@ const CitizenApplicationOverview = () => {
|
|
|
9141
9132
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9142
9133
|
label: t("NDC_CONSUMER_CODE"),
|
|
9143
9134
|
text: detail.consumerCode || "N/A"
|
|
9144
|
-
}), /*#__PURE__*/React.createElement(
|
|
9145
|
-
style: {
|
|
9146
|
-
background: isRed ? "red" : "none",
|
|
9147
|
-
color: isRed ? "white" : "black",
|
|
9148
|
-
paddingTop: isRed ? "8px" : "0",
|
|
9149
|
-
paddingLeft: isRed ? "10px" : "0"
|
|
9150
|
-
}
|
|
9151
|
-
}, /*#__PURE__*/React.createElement(Row, {
|
|
9135
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
9152
9136
|
label: t("NDC_DUE_AMOUNT"),
|
|
9153
9137
|
text: ((_detail$dueAmount = detail.dueAmount) === null || _detail$dueAmount === void 0 ? void 0 : _detail$dueAmount.toString()) || "0"
|
|
9154
|
-
})
|
|
9138
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
9155
9139
|
label: t("NDC_PROPERTY_TYPE"),
|
|
9156
9140
|
text: t(detail.propertyType) || detail.propertyType
|
|
9157
9141
|
}), (detail === null || detail === void 0 ? void 0 : detail.businessService) == "NDC_PROPERTY_TAX" && (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : propertyDetailsFetch.Properties) && /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Row, {
|
|
@@ -9325,7 +9309,7 @@ const SearchFormFieldsComponents = ({
|
|
|
9325
9309
|
name: "uuid",
|
|
9326
9310
|
inputRef: registerRef({})
|
|
9327
9311
|
})), /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement("label", null, t("CORE_COMMON_PHONE_NUMBER")), /*#__PURE__*/React.createElement(TextInput, {
|
|
9328
|
-
name: "
|
|
9312
|
+
name: "phoneNumber",
|
|
9329
9313
|
inputRef: registerRef({})
|
|
9330
9314
|
})), /*#__PURE__*/React.createElement("div", {
|
|
9331
9315
|
className: "search-action-wrapper",
|
|
@@ -9630,7 +9614,7 @@ const Inbox = ({
|
|
|
9630
9614
|
const onSearchFormReset = setSearchFormValue => {
|
|
9631
9615
|
setSearchFormValue("sourceRefId", null);
|
|
9632
9616
|
setSearchFormValue("uuid", null);
|
|
9633
|
-
setSearchFormValue("
|
|
9617
|
+
setSearchFormValue("phoneNumber", null);
|
|
9634
9618
|
dispatch({
|
|
9635
9619
|
action: "mutateSearchForm",
|
|
9636
9620
|
data: searchFormDefaultValues
|
|
@@ -11730,7 +11714,6 @@ const NewNDCStepForm = () => {
|
|
|
11730
11714
|
uuid: id
|
|
11731
11715
|
}, tenantId);
|
|
11732
11716
|
useEffect(() => {
|
|
11733
|
-
console.log("applicationDetails", applicationDetails);
|
|
11734
11717
|
if (applicationDetails !== null && applicationDetails !== void 0 && applicationDetails.Applications.length) {
|
|
11735
11718
|
dispatch(updateNDCForm("responseData", applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications));
|
|
11736
11719
|
}
|
|
@@ -11779,10 +11762,8 @@ const NewNDCStepFormOne = ({
|
|
|
11779
11762
|
const [showToast, setShowToast] = useState(false);
|
|
11780
11763
|
const [error, setError] = useState("");
|
|
11781
11764
|
const user = Digit.UserService.getUser();
|
|
11782
|
-
const id = window.location.pathname.split("/").pop();
|
|
11783
11765
|
const currentStepData = useSelector(state => state.ndc.NDCForm.formData && state.ndc.NDCForm.formData[config.key] ? state.ndc.NDCForm.formData[config.key] : {});
|
|
11784
11766
|
const checkFormData = useSelector(state => state.ndc.NDCForm.formData || {});
|
|
11785
|
-
const checkFormDatass = useSelector(state => state.ndc.NDCForm || {});
|
|
11786
11767
|
const tenantId = window.localStorage.getItem("CITIZEN.CITY");
|
|
11787
11768
|
function goNext(data) {
|
|
11788
11769
|
var _checkFormData$apiDat, _checkFormData$apiDat2, _checkFormData$apiDat3, _checkFormData$respon, _checkFormData$respon2;
|
|
@@ -11795,12 +11776,8 @@ const NewNDCStepFormOne = ({
|
|
|
11795
11776
|
}, 3000);
|
|
11796
11777
|
return;
|
|
11797
11778
|
}
|
|
11798
|
-
|
|
11799
|
-
|
|
11800
|
-
console.log("isRealId", isRealId);
|
|
11801
|
-
if (checkFormData !== null && checkFormData !== void 0 && (_checkFormData$apiDat = checkFormData.apiData) !== null && _checkFormData$apiDat !== void 0 && (_checkFormData$apiDat2 = _checkFormData$apiDat.Applications) !== null && _checkFormData$apiDat2 !== void 0 && (_checkFormData$apiDat3 = _checkFormData$apiDat2[0]) !== null && _checkFormData$apiDat3 !== void 0 && _checkFormData$apiDat3.uuid || 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$respon2.uuid || isRealId) {
|
|
11802
|
-
updateApplication(data);
|
|
11803
|
-
console.log("here bab");
|
|
11779
|
+
if (checkFormData !== null && checkFormData !== void 0 && (_checkFormData$apiDat = checkFormData.apiData) !== null && _checkFormData$apiDat !== void 0 && (_checkFormData$apiDat2 = _checkFormData$apiDat.Applications) !== null && _checkFormData$apiDat2 !== void 0 && (_checkFormData$apiDat3 = _checkFormData$apiDat2[0]) !== null && _checkFormData$apiDat3 !== void 0 && _checkFormData$apiDat3.uuid || 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$respon2.uuid) {
|
|
11780
|
+
onGoNext();
|
|
11804
11781
|
} else createApplication(data);
|
|
11805
11782
|
}
|
|
11806
11783
|
const createApplication = async data => {
|
|
@@ -11892,117 +11869,18 @@ const NewNDCStepFormOne = ({
|
|
|
11892
11869
|
};
|
|
11893
11870
|
}
|
|
11894
11871
|
};
|
|
11895
|
-
const updateApplication = async data => {
|
|
11896
|
-
var _Digit$UserService$ge2, _user$info5, _user$info6, _data$PropertyDetails1, _user$info7, _user$info8, _checkFormData$respon3, _checkFormData$respon4, _checkFormData$respon5, _data$NDCReason2, _data$cpt1, _data$cpt1$details, _response$ResponseInf2;
|
|
11897
|
-
const applicant = ((_Digit$UserService$ge2 = Digit.UserService.getUser()) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.info) || {};
|
|
11898
|
-
const applicantId = applicant === null || applicant === void 0 ? void 0 : applicant.uuid;
|
|
11899
|
-
console.log("data===?????", data);
|
|
11900
|
-
console.log("checkFormData???====", checkFormData);
|
|
11901
|
-
const owners = [{
|
|
11902
|
-
name: user === null || user === void 0 ? void 0 : (_user$info5 = user.info) === null || _user$info5 === void 0 ? void 0 : _user$info5.name,
|
|
11903
|
-
mobileNumber: user === null || user === void 0 ? void 0 : (_user$info6 = user.info) === null || _user$info6 === void 0 ? void 0 : _user$info6.mobileNumber,
|
|
11904
|
-
gender: data === null || data === void 0 ? void 0 : (_data$PropertyDetails1 = data.PropertyDetails) === null || _data$PropertyDetails1 === void 0 ? void 0 : _data$PropertyDetails1.gender,
|
|
11905
|
-
emailId: user === null || user === void 0 ? void 0 : (_user$info7 = user.info) === null || _user$info7 === void 0 ? void 0 : _user$info7.emailId,
|
|
11906
|
-
type: user === null || user === void 0 ? void 0 : (_user$info8 = user.info) === null || _user$info8 === void 0 ? void 0 : _user$info8.type
|
|
11907
|
-
}];
|
|
11908
|
-
let ndcDetails = [];
|
|
11909
|
-
if ((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$respon5 = _checkFormData$respon4.NdcDetails) === null || _checkFormData$respon5 === void 0 ? void 0 : _checkFormData$respon5.length) > 0) {
|
|
11910
|
-
ndcDetails = checkFormData.responseData[0].NdcDetails;
|
|
11911
|
-
} else {
|
|
11912
|
-
var _ref, _data$PropertyDetails10, _ref2, _data$PropertyDetails12, _data$PropertyDetails14, _data$PropertyDetails15;
|
|
11913
|
-
(_ref = (data === null || data === void 0 ? void 0 : (_data$PropertyDetails10 = data.PropertyDetails) === null || _data$PropertyDetails10 === void 0 ? void 0 : _data$PropertyDetails10.waterConnection) || []) === null || _ref === void 0 ? void 0 : _ref.forEach(wc => {
|
|
11914
|
-
var _wc$billData4, _data$PropertyDetails11, _data$cpt7, _data$cpt7$details, _wc$billData5, _wc$billData6;
|
|
11915
|
-
ndcDetails.push({
|
|
11916
|
-
uuid: wc === null || wc === void 0 ? void 0 : (_wc$billData4 = wc.billData) === null || _wc$billData4 === void 0 ? void 0 : _wc$billData4.id,
|
|
11917
|
-
applicantId: applicantId,
|
|
11918
|
-
businessService: "WS",
|
|
11919
|
-
consumerCode: wc === null || wc === void 0 ? void 0 : wc.connectionNo,
|
|
11920
|
-
additionalDetails: {
|
|
11921
|
-
propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails11 = data.PropertyDetails) === null || _data$PropertyDetails11 === void 0 ? void 0 : _data$PropertyDetails11.address,
|
|
11922
|
-
propertyType: data === null || data === void 0 ? void 0 : (_data$cpt7 = data.cpt) === null || _data$cpt7 === void 0 ? void 0 : (_data$cpt7$details = _data$cpt7.details) === null || _data$cpt7$details === void 0 ? void 0 : _data$cpt7$details.usageCategory
|
|
11923
|
-
},
|
|
11924
|
-
dueAmount: (wc === null || wc === void 0 ? void 0 : (_wc$billData5 = wc.billData) === null || _wc$billData5 === void 0 ? void 0 : _wc$billData5.totalAmount) || 0,
|
|
11925
|
-
status: wc === null || wc === void 0 ? void 0 : (_wc$billData6 = wc.billData) === null || _wc$billData6 === void 0 ? void 0 : _wc$billData6.status
|
|
11926
|
-
});
|
|
11927
|
-
});
|
|
11928
|
-
(_ref2 = (data === null || data === void 0 ? void 0 : (_data$PropertyDetails12 = data.PropertyDetails) === null || _data$PropertyDetails12 === void 0 ? void 0 : _data$PropertyDetails12.sewerageConnection) || []) === null || _ref2 === void 0 ? void 0 : _ref2.forEach(sc => {
|
|
11929
|
-
var _sc$billData4, _data$PropertyDetails13, _data$cpt8, _data$cpt8$details, _sc$billData5, _sc$billData6;
|
|
11930
|
-
ndcDetails.push({
|
|
11931
|
-
uuid: sc === null || sc === void 0 ? void 0 : (_sc$billData4 = sc.billData) === null || _sc$billData4 === void 0 ? void 0 : _sc$billData4.id,
|
|
11932
|
-
applicantId: applicantId,
|
|
11933
|
-
businessService: "SW",
|
|
11934
|
-
consumerCode: sc === null || sc === void 0 ? void 0 : sc.connectionNo,
|
|
11935
|
-
additionalDetails: {
|
|
11936
|
-
propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails13 = data.PropertyDetails) === null || _data$PropertyDetails13 === void 0 ? void 0 : _data$PropertyDetails13.address,
|
|
11937
|
-
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
|
|
11938
|
-
},
|
|
11939
|
-
dueAmount: (sc === null || sc === void 0 ? void 0 : (_sc$billData5 = sc.billData) === null || _sc$billData5 === void 0 ? void 0 : _sc$billData5.totalAmount) || 0,
|
|
11940
|
-
status: sc === null || sc === void 0 ? void 0 : (_sc$billData6 = sc.billData) === null || _sc$billData6 === void 0 ? void 0 : _sc$billData6.status
|
|
11941
|
-
});
|
|
11942
|
-
});
|
|
11943
|
-
if (data !== null && data !== void 0 && (_data$PropertyDetails14 = data.PropertyDetails) !== null && _data$PropertyDetails14 !== void 0 && (_data$PropertyDetails15 = _data$PropertyDetails14.propertyBillData) !== null && _data$PropertyDetails15 !== void 0 && _data$PropertyDetails15.billData) {
|
|
11944
|
-
var _data$PropertyDetails16, _data$PropertyDetails17, _data$cpt9, _data$PropertyDetails18, _data$cpt0, _data$cpt0$details;
|
|
11945
|
-
const billData = data === null || data === void 0 ? void 0 : (_data$PropertyDetails16 = data.PropertyDetails) === null || _data$PropertyDetails16 === void 0 ? void 0 : (_data$PropertyDetails17 = _data$PropertyDetails16.propertyBillData) === null || _data$PropertyDetails17 === void 0 ? void 0 : _data$PropertyDetails17.billData;
|
|
11946
|
-
ndcDetails.push({
|
|
11947
|
-
uuid: billData === null || billData === void 0 ? void 0 : billData.id,
|
|
11948
|
-
applicantId: applicantId,
|
|
11949
|
-
businessService: "PT",
|
|
11950
|
-
consumerCode: data === null || data === void 0 ? void 0 : (_data$cpt9 = data.cpt) === null || _data$cpt9 === void 0 ? void 0 : _data$cpt9.id,
|
|
11951
|
-
additionalDetails: {
|
|
11952
|
-
propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails18 = data.PropertyDetails) === null || _data$PropertyDetails18 === void 0 ? void 0 : _data$PropertyDetails18.address,
|
|
11953
|
-
propertyType: data === null || data === void 0 ? void 0 : (_data$cpt0 = data.cpt) === null || _data$cpt0 === void 0 ? void 0 : (_data$cpt0$details = _data$cpt0.details) === null || _data$cpt0$details === void 0 ? void 0 : _data$cpt0$details.usageCategory
|
|
11954
|
-
},
|
|
11955
|
-
dueAmount: (billData === null || billData === void 0 ? void 0 : billData.totalAmount) || 0,
|
|
11956
|
-
status: billData === null || billData === void 0 ? void 0 : billData.status
|
|
11957
|
-
});
|
|
11958
|
-
}
|
|
11959
|
-
}
|
|
11960
|
-
const payload = {
|
|
11961
|
-
Applications: [{
|
|
11962
|
-
tenantId,
|
|
11963
|
-
owners,
|
|
11964
|
-
NdcDetails: ndcDetails,
|
|
11965
|
-
Documents: [],
|
|
11966
|
-
active: true,
|
|
11967
|
-
reason: data === null || data === void 0 ? void 0 : (_data$NDCReason2 = data.NDCReason) === null || _data$NDCReason2 === void 0 ? void 0 : _data$NDCReason2.code,
|
|
11968
|
-
auditDetails: 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.auditDetails,
|
|
11969
|
-
uuid: id,
|
|
11970
|
-
workflow: {
|
|
11971
|
-
action: "DRAFT"
|
|
11972
|
-
}
|
|
11973
|
-
}]
|
|
11974
|
-
};
|
|
11975
|
-
console.log("payload", payload);
|
|
11976
|
-
const response = await Digit.NDCService.NDCUpdate({
|
|
11977
|
-
tenantId,
|
|
11978
|
-
details: payload
|
|
11979
|
-
});
|
|
11980
|
-
if ((response === null || response === void 0 ? void 0 : (_response$ResponseInf2 = response.ResponseInfo) === null || _response$ResponseInf2 === void 0 ? void 0 : _response$ResponseInf2.status) === "successful") {
|
|
11981
|
-
dispatch(updateNDCForm("apiData", response));
|
|
11982
|
-
onGoNext();
|
|
11983
|
-
return {
|
|
11984
|
-
isSuccess: true,
|
|
11985
|
-
response
|
|
11986
|
-
};
|
|
11987
|
-
} else {
|
|
11988
|
-
return {
|
|
11989
|
-
isSuccess: false,
|
|
11990
|
-
response
|
|
11991
|
-
};
|
|
11992
|
-
}
|
|
11993
|
-
};
|
|
11994
11872
|
function validateStepData(data) {
|
|
11995
|
-
var _data$
|
|
11873
|
+
var _data$cpt6, _data$cpt7, _data$cpt7$dues, _propertyDetails$wate, _propertyDetails$sewe;
|
|
11996
11874
|
const missingFields = [];
|
|
11997
11875
|
const invalidFields = [];
|
|
11998
11876
|
const cpt = (data === null || data === void 0 ? void 0 : data.cpt) || {};
|
|
11999
11877
|
const cptDetails = (cpt === null || cpt === void 0 ? void 0 : cpt.details) || {};
|
|
12000
11878
|
const propertyDetails = (data === null || data === void 0 ? void 0 : data.PropertyDetails) || {};
|
|
12001
11879
|
const NDCReason = (data === null || data === void 0 ? void 0 : data.NDCReason) || {};
|
|
12002
|
-
if (!(data !== null && data !== void 0 && (_data$
|
|
11880
|
+
if (!(data !== null && data !== void 0 && (_data$cpt6 = data.cpt) !== null && _data$cpt6 !== void 0 && _data$cpt6.dues)) {
|
|
12003
11881
|
missingFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
|
|
12004
11882
|
}
|
|
12005
|
-
if ((data === null || data === void 0 ? void 0 : (_data$
|
|
11883
|
+
if ((data === null || data === void 0 ? void 0 : (_data$cpt7 = data.cpt) === null || _data$cpt7 === void 0 ? void 0 : (_data$cpt7$dues = _data$cpt7.dues) === null || _data$cpt7$dues === void 0 ? void 0 : _data$cpt7$dues.totalAmount) > 0) {
|
|
12006
11884
|
missingFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
|
|
12007
11885
|
}
|
|
12008
11886
|
if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.length) > 0) {
|
|
@@ -12271,8 +12149,8 @@ const PropertyDetailsForm$1 = ({
|
|
|
12271
12149
|
var _apiDataCheck$2;
|
|
12272
12150
|
let waterConnection;
|
|
12273
12151
|
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$2 = apiDataCheck[0]) !== null && _apiDataCheck$2 !== void 0 && _apiDataCheck$2.NdcDetails) {
|
|
12274
|
-
var _apiDataCheck$3
|
|
12275
|
-
const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$3 = apiDataCheck[0]) === null || _apiDataCheck$3 === void 0 ? void 0 :
|
|
12152
|
+
var _apiDataCheck$3;
|
|
12153
|
+
const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$3 = apiDataCheck[0]) === null || _apiDataCheck$3 === void 0 ? void 0 : _apiDataCheck$3.NdcDetails.filter(item => {
|
|
12276
12154
|
return item.businessService == "WS";
|
|
12277
12155
|
});
|
|
12278
12156
|
waterConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
|
|
@@ -12299,10 +12177,9 @@ const PropertyDetailsForm$1 = ({
|
|
|
12299
12177
|
useEffect(() => {
|
|
12300
12178
|
var _apiDataCheck$4;
|
|
12301
12179
|
let sewerageConnection;
|
|
12302
|
-
console.log("apiDataCheck", apiDataCheck);
|
|
12303
12180
|
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$4 = apiDataCheck[0]) !== null && _apiDataCheck$4 !== void 0 && _apiDataCheck$4.NdcDetails) {
|
|
12304
|
-
var _apiDataCheck$5
|
|
12305
|
-
const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$5 = apiDataCheck[0]) === null || _apiDataCheck$5 === void 0 ? void 0 :
|
|
12181
|
+
var _apiDataCheck$5;
|
|
12182
|
+
const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$5 = apiDataCheck[0]) === null || _apiDataCheck$5 === void 0 ? void 0 : _apiDataCheck$5.NdcDetails.filter(item => {
|
|
12306
12183
|
return item.businessService == "SW";
|
|
12307
12184
|
});
|
|
12308
12185
|
sewerageConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
|
|
@@ -13328,13 +13205,11 @@ const SelectNDCDocuments = ({
|
|
|
13328
13205
|
const [error, setError] = useState(null);
|
|
13329
13206
|
useEffect(() => {
|
|
13330
13207
|
var _checkFormData$respon, _checkFormData$respon2, _checkFormData$respon3;
|
|
13331
|
-
|
|
13332
|
-
|
|
13333
|
-
|
|
13334
|
-
|
|
13335
|
-
|
|
13336
|
-
fileStoreId: doc === null || doc === void 0 ? void 0 : doc.documentAttachment,
|
|
13337
|
-
documentUid: doc === null || doc === void 0 ? void 0 : doc.documentAttachment
|
|
13208
|
+
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) {
|
|
13209
|
+
const apiDocs = checkFormData.responseData[0].Documents.map(doc => ({
|
|
13210
|
+
documentType: doc.documentType,
|
|
13211
|
+
fileStoreId: doc.documentAttachment,
|
|
13212
|
+
documentUid: doc.documentAttachment
|
|
13338
13213
|
}));
|
|
13339
13214
|
setDocuments(apiDocs);
|
|
13340
13215
|
}
|
|
@@ -13403,7 +13278,7 @@ function SelectDocument({
|
|
|
13403
13278
|
setFile(e.target.files[0]);
|
|
13404
13279
|
}
|
|
13405
13280
|
useEffect(() => {
|
|
13406
|
-
if (filteredDocument !== null && filteredDocument !== void 0 && filteredDocument.fileStoreId
|
|
13281
|
+
if (filteredDocument !== null && filteredDocument !== void 0 && filteredDocument.fileStoreId) {
|
|
13407
13282
|
setUploadedFile(filteredDocument.fileStoreId);
|
|
13408
13283
|
}
|
|
13409
13284
|
}, [filteredDocument]);
|
|
@@ -13485,26 +13360,10 @@ const NewNDCStepFormTwo = ({
|
|
|
13485
13360
|
const stateId = Digit.ULBService.getStateId();
|
|
13486
13361
|
const [showToast, setShowToast] = useState(false);
|
|
13487
13362
|
const [error, setError] = useState("");
|
|
13488
|
-
const tenantId = window.localStorage.getItem("CITIZEN.CITY");
|
|
13489
13363
|
const {
|
|
13490
13364
|
isLoading,
|
|
13491
13365
|
data
|
|
13492
13366
|
} = Digit.Hooks.pt.usePropertyMDMS(stateId, "NDC", ["Documents"]);
|
|
13493
|
-
const checkFormData = useSelector(state => state.ndc.NDCForm.formData || {});
|
|
13494
|
-
const id = window.location.pathname.split("/").pop();
|
|
13495
|
-
const user = Digit.UserService.getUser();
|
|
13496
|
-
const {
|
|
13497
|
-
isLoading: propertyLoading,
|
|
13498
|
-
data: applicationDetails,
|
|
13499
|
-
refetch
|
|
13500
|
-
} = Digit.Hooks.ndc.useSearchEmployeeApplication({
|
|
13501
|
-
uuid: id
|
|
13502
|
-
}, tenantId);
|
|
13503
|
-
useEffect(() => {
|
|
13504
|
-
if (applicationDetails !== null && applicationDetails !== void 0 && applicationDetails.Applications.length) {
|
|
13505
|
-
dispatch(updateNDCForm("responseData", applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications));
|
|
13506
|
-
}
|
|
13507
|
-
}, [applicationDetails]);
|
|
13508
13367
|
function goNext(finaldata) {
|
|
13509
13368
|
console.log(`Data in step ${config.currStepNumber} is: \n`, finaldata);
|
|
13510
13369
|
const missingFields = validation(finaldata);
|
|
@@ -13516,64 +13375,8 @@ const NewNDCStepFormTwo = ({
|
|
|
13516
13375
|
}, 3000);
|
|
13517
13376
|
return;
|
|
13518
13377
|
}
|
|
13519
|
-
|
|
13520
|
-
if (isRealId) {
|
|
13521
|
-
updateApplication(finaldata);
|
|
13522
|
-
console.log("here bab");
|
|
13523
|
-
}
|
|
13378
|
+
onGoNext();
|
|
13524
13379
|
}
|
|
13525
|
-
const updateApplication = async data => {
|
|
13526
|
-
var _Digit$UserService$ge, _user$info, _user$info2, _checkFormData$NDCDet, _checkFormData$NDCDet2, _user$info3, _user$info4, _checkFormData$respon, _ref, _data$documents, _response$ResponseInf;
|
|
13527
|
-
const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
|
|
13528
|
-
console.log("final data===?????", data);
|
|
13529
|
-
console.log("checkFormData???====", checkFormData);
|
|
13530
|
-
const owners = [{
|
|
13531
|
-
name: user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.name,
|
|
13532
|
-
mobileNumber: user === null || user === void 0 ? void 0 : (_user$info2 = user.info) === null || _user$info2 === void 0 ? void 0 : _user$info2.mobileNumber,
|
|
13533
|
-
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,
|
|
13534
|
-
emailId: user === null || user === void 0 ? void 0 : (_user$info3 = user.info) === null || _user$info3 === void 0 ? void 0 : _user$info3.emailId,
|
|
13535
|
-
type: user === null || user === void 0 ? void 0 : (_user$info4 = user.info) === null || _user$info4 === void 0 ? void 0 : _user$info4.type
|
|
13536
|
-
}];
|
|
13537
|
-
const baseApplication = (checkFormData === null || checkFormData === void 0 ? void 0 : (_checkFormData$respon = checkFormData.responseData) === null || _checkFormData$respon === void 0 ? void 0 : _checkFormData$respon[0]) || {};
|
|
13538
|
-
const updatedApplication = {
|
|
13539
|
-
...baseApplication,
|
|
13540
|
-
workflow: {
|
|
13541
|
-
...(baseApplication === null || baseApplication === void 0 ? void 0 : baseApplication.workflow)
|
|
13542
|
-
},
|
|
13543
|
-
owners: owners,
|
|
13544
|
-
NdcDetails: baseApplication === null || baseApplication === void 0 ? void 0 : baseApplication.NdcDetails,
|
|
13545
|
-
Documents: []
|
|
13546
|
-
};
|
|
13547
|
-
(_ref = (data === null || data === void 0 ? void 0 : (_data$documents = data.documents) === null || _data$documents === void 0 ? void 0 : _data$documents.documents) || []) === null || _ref === void 0 ? void 0 : _ref.forEach(doc => {
|
|
13548
|
-
var _updatedApplication$D;
|
|
13549
|
-
(_updatedApplication$D = updatedApplication.Documents) === null || _updatedApplication$D === void 0 ? void 0 : _updatedApplication$D.push({
|
|
13550
|
-
uuid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
|
|
13551
|
-
documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
13552
|
-
documentAttachment: doc === null || doc === void 0 ? void 0 : doc.fileStoreId
|
|
13553
|
-
});
|
|
13554
|
-
});
|
|
13555
|
-
const payload = {
|
|
13556
|
-
Applications: [updatedApplication]
|
|
13557
|
-
};
|
|
13558
|
-
console.log("payload", payload);
|
|
13559
|
-
const response = await Digit.NDCService.NDCUpdate({
|
|
13560
|
-
tenantId,
|
|
13561
|
-
details: payload
|
|
13562
|
-
});
|
|
13563
|
-
if ((response === null || response === void 0 ? void 0 : (_response$ResponseInf = response.ResponseInfo) === null || _response$ResponseInf === void 0 ? void 0 : _response$ResponseInf.status) === "successful") {
|
|
13564
|
-
dispatch(updateNDCForm("apiData", response));
|
|
13565
|
-
onGoNext();
|
|
13566
|
-
return {
|
|
13567
|
-
isSuccess: true,
|
|
13568
|
-
response
|
|
13569
|
-
};
|
|
13570
|
-
} else {
|
|
13571
|
-
return {
|
|
13572
|
-
isSuccess: false,
|
|
13573
|
-
response
|
|
13574
|
-
};
|
|
13575
|
-
}
|
|
13576
|
-
};
|
|
13577
13380
|
const closeToast = () => {
|
|
13578
13381
|
setShowToast(false);
|
|
13579
13382
|
setError("");
|