@mseva/digit-ui-module-ndc 1.0.33 → 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.
@@ -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: (filtData === null || filtData === void 0 ? void 0 : filtData.assignee) || checkAssigne,
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 = (ndc === null || ndc === void 0 ? void 0 : ndc.consumerCode) || "NA";
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("div", {
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
- })), /*#__PURE__*/React.createElement(Row, {
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: "mobileNumber",
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("mobileNumber", null);
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
- console.log("checkFormData", checkFormData);
11799
- const isRealId = id && id.startsWith("NDC-");
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,112 +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, _data$PropertyDetails10, _data$PropertyDetails12, _data$PropertyDetails14, _data$PropertyDetails15, _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
- const ndcDetails = [];
11909
- ((data === null || data === void 0 ? void 0 : (_data$PropertyDetails10 = data.PropertyDetails) === null || _data$PropertyDetails10 === void 0 ? void 0 : _data$PropertyDetails10.waterConnection) || []).forEach(wc => {
11910
- var _wc$billData4, _data$PropertyDetails11, _data$cpt7, _data$cpt7$details, _wc$billData5, _wc$billData6;
11911
- ndcDetails.push({
11912
- uuid: wc === null || wc === void 0 ? void 0 : (_wc$billData4 = wc.billData) === null || _wc$billData4 === void 0 ? void 0 : _wc$billData4.id,
11913
- applicantId: applicantId,
11914
- businessService: "WS",
11915
- consumerCode: wc === null || wc === void 0 ? void 0 : wc.connectionNo,
11916
- additionalDetails: {
11917
- propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails11 = data.PropertyDetails) === null || _data$PropertyDetails11 === void 0 ? void 0 : _data$PropertyDetails11.address,
11918
- 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
11919
- },
11920
- dueAmount: (wc === null || wc === void 0 ? void 0 : (_wc$billData5 = wc.billData) === null || _wc$billData5 === void 0 ? void 0 : _wc$billData5.totalAmount) || 0,
11921
- status: wc === null || wc === void 0 ? void 0 : (_wc$billData6 = wc.billData) === null || _wc$billData6 === void 0 ? void 0 : _wc$billData6.status
11922
- });
11923
- });
11924
- ((data === null || data === void 0 ? void 0 : (_data$PropertyDetails12 = data.PropertyDetails) === null || _data$PropertyDetails12 === void 0 ? void 0 : _data$PropertyDetails12.sewerageConnection) || []).forEach(sc => {
11925
- var _sc$billData4, _data$PropertyDetails13, _data$cpt8, _data$cpt8$details, _sc$billData5, _sc$billData6;
11926
- ndcDetails.push({
11927
- uuid: sc === null || sc === void 0 ? void 0 : (_sc$billData4 = sc.billData) === null || _sc$billData4 === void 0 ? void 0 : _sc$billData4.id,
11928
- applicantId: applicantId,
11929
- businessService: "SW",
11930
- consumerCode: sc === null || sc === void 0 ? void 0 : sc.connectionNo,
11931
- additionalDetails: {
11932
- propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails13 = data.PropertyDetails) === null || _data$PropertyDetails13 === void 0 ? void 0 : _data$PropertyDetails13.address,
11933
- 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
11934
- },
11935
- dueAmount: (sc === null || sc === void 0 ? void 0 : (_sc$billData5 = sc.billData) === null || _sc$billData5 === void 0 ? void 0 : _sc$billData5.totalAmount) || 0,
11936
- status: sc === null || sc === void 0 ? void 0 : (_sc$billData6 = sc.billData) === null || _sc$billData6 === void 0 ? void 0 : _sc$billData6.status
11937
- });
11938
- });
11939
- 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) {
11940
- var _data$PropertyDetails16, _data$PropertyDetails17, _data$cpt9, _data$PropertyDetails18, _data$cpt0, _data$cpt0$details;
11941
- 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;
11942
- ndcDetails.push({
11943
- uuid: billData === null || billData === void 0 ? void 0 : billData.id,
11944
- applicantId: applicantId,
11945
- businessService: "PT",
11946
- consumerCode: data === null || data === void 0 ? void 0 : (_data$cpt9 = data.cpt) === null || _data$cpt9 === void 0 ? void 0 : _data$cpt9.id,
11947
- additionalDetails: {
11948
- propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails18 = data.PropertyDetails) === null || _data$PropertyDetails18 === void 0 ? void 0 : _data$PropertyDetails18.address,
11949
- 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
11950
- },
11951
- dueAmount: (billData === null || billData === void 0 ? void 0 : billData.totalAmount) || 0,
11952
- status: billData === null || billData === void 0 ? void 0 : billData.status
11953
- });
11954
- }
11955
- const payload = {
11956
- Applications: [{
11957
- tenantId,
11958
- owners,
11959
- NdcDetails: ndcDetails,
11960
- Documents: [],
11961
- active: true,
11962
- reason: data === null || data === void 0 ? void 0 : (_data$NDCReason2 = data.NDCReason) === null || _data$NDCReason2 === void 0 ? void 0 : _data$NDCReason2.code,
11963
- 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,
11964
- uuid: id,
11965
- workflow: {
11966
- action: "DRAFT"
11967
- }
11968
- }]
11969
- };
11970
- console.log("payload", payload);
11971
- const response = await Digit.NDCService.NDCUpdate({
11972
- tenantId,
11973
- details: payload
11974
- });
11975
- if ((response === null || response === void 0 ? void 0 : (_response$ResponseInf2 = response.ResponseInfo) === null || _response$ResponseInf2 === void 0 ? void 0 : _response$ResponseInf2.status) === "successful") {
11976
- dispatch(updateNDCForm("apiData", response));
11977
- onGoNext();
11978
- return {
11979
- isSuccess: true,
11980
- response
11981
- };
11982
- } else {
11983
- return {
11984
- isSuccess: false,
11985
- response
11986
- };
11987
- }
11988
- };
11989
11872
  function validateStepData(data) {
11990
- var _data$cpt10, _data$cpt11, _data$cpt11$dues, _propertyDetails$wate, _propertyDetails$sewe;
11873
+ var _data$cpt6, _data$cpt7, _data$cpt7$dues, _propertyDetails$wate, _propertyDetails$sewe;
11991
11874
  const missingFields = [];
11992
11875
  const invalidFields = [];
11993
11876
  const cpt = (data === null || data === void 0 ? void 0 : data.cpt) || {};
11994
11877
  const cptDetails = (cpt === null || cpt === void 0 ? void 0 : cpt.details) || {};
11995
11878
  const propertyDetails = (data === null || data === void 0 ? void 0 : data.PropertyDetails) || {};
11996
11879
  const NDCReason = (data === null || data === void 0 ? void 0 : data.NDCReason) || {};
11997
- if (!(data !== null && data !== void 0 && (_data$cpt10 = data.cpt) !== null && _data$cpt10 !== void 0 && _data$cpt10.dues)) {
11880
+ if (!(data !== null && data !== void 0 && (_data$cpt6 = data.cpt) !== null && _data$cpt6 !== void 0 && _data$cpt6.dues)) {
11998
11881
  missingFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
11999
11882
  }
12000
- if ((data === null || data === void 0 ? void 0 : (_data$cpt11 = data.cpt) === null || _data$cpt11 === void 0 ? void 0 : (_data$cpt11$dues = _data$cpt11.dues) === null || _data$cpt11$dues === void 0 ? void 0 : _data$cpt11$dues.totalAmount) > 0) {
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) {
12001
11884
  missingFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
12002
11885
  }
12003
11886
  if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.length) > 0) {
@@ -12266,8 +12149,8 @@ const PropertyDetailsForm$1 = ({
12266
12149
  var _apiDataCheck$2;
12267
12150
  let waterConnection;
12268
12151
  if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$2 = apiDataCheck[0]) !== null && _apiDataCheck$2 !== void 0 && _apiDataCheck$2.NdcDetails) {
12269
- var _apiDataCheck$3, _apiDataCheck$3$NdcDe;
12270
- const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$3 = apiDataCheck[0]) === null || _apiDataCheck$3 === void 0 ? void 0 : (_apiDataCheck$3$NdcDe = _apiDataCheck$3.NdcDetails) === null || _apiDataCheck$3$NdcDe === void 0 ? void 0 : _apiDataCheck$3$NdcDe.filter(item => {
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 => {
12271
12154
  return item.businessService == "WS";
12272
12155
  });
12273
12156
  waterConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
@@ -12294,10 +12177,9 @@ const PropertyDetailsForm$1 = ({
12294
12177
  useEffect(() => {
12295
12178
  var _apiDataCheck$4;
12296
12179
  let sewerageConnection;
12297
- console.log("apiDataCheck", apiDataCheck);
12298
12180
  if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$4 = apiDataCheck[0]) !== null && _apiDataCheck$4 !== void 0 && _apiDataCheck$4.NdcDetails) {
12299
- var _apiDataCheck$5, _apiDataCheck$5$NdcDe;
12300
- const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$5 = apiDataCheck[0]) === null || _apiDataCheck$5 === void 0 ? void 0 : (_apiDataCheck$5$NdcDe = _apiDataCheck$5.NdcDetails) === null || _apiDataCheck$5$NdcDe === void 0 ? void 0 : _apiDataCheck$5$NdcDe.filter(item => {
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 => {
12301
12183
  return item.businessService == "SW";
12302
12184
  });
12303
12185
  sewerageConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
@@ -13323,13 +13205,11 @@ const SelectNDCDocuments = ({
13323
13205
  const [error, setError] = useState(null);
13324
13206
  useEffect(() => {
13325
13207
  var _checkFormData$respon, _checkFormData$respon2, _checkFormData$respon3;
13326
- console.log("coming here again");
13327
- 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) {
13328
- var _checkFormData$respon4, _checkFormData$respon5, _checkFormData$respon6;
13329
- 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 => ({
13330
- documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
13331
- fileStoreId: doc === null || doc === void 0 ? void 0 : doc.documentAttachment,
13332
- 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
13333
13213
  }));
13334
13214
  setDocuments(apiDocs);
13335
13215
  }
@@ -13398,7 +13278,7 @@ function SelectDocument({
13398
13278
  setFile(e.target.files[0]);
13399
13279
  }
13400
13280
  useEffect(() => {
13401
- if (filteredDocument !== null && filteredDocument !== void 0 && filteredDocument.fileStoreId && !file) {
13281
+ if (filteredDocument !== null && filteredDocument !== void 0 && filteredDocument.fileStoreId) {
13402
13282
  setUploadedFile(filteredDocument.fileStoreId);
13403
13283
  }
13404
13284
  }, [filteredDocument]);
@@ -13480,26 +13360,10 @@ const NewNDCStepFormTwo = ({
13480
13360
  const stateId = Digit.ULBService.getStateId();
13481
13361
  const [showToast, setShowToast] = useState(false);
13482
13362
  const [error, setError] = useState("");
13483
- const tenantId = window.localStorage.getItem("CITIZEN.CITY");
13484
13363
  const {
13485
13364
  isLoading,
13486
13365
  data
13487
13366
  } = Digit.Hooks.pt.usePropertyMDMS(stateId, "NDC", ["Documents"]);
13488
- const checkFormData = useSelector(state => state.ndc.NDCForm.formData || {});
13489
- const id = window.location.pathname.split("/").pop();
13490
- const user = Digit.UserService.getUser();
13491
- const {
13492
- isLoading: propertyLoading,
13493
- data: applicationDetails,
13494
- refetch
13495
- } = Digit.Hooks.ndc.useSearchEmployeeApplication({
13496
- uuid: id
13497
- }, tenantId);
13498
- useEffect(() => {
13499
- if (applicationDetails !== null && applicationDetails !== void 0 && applicationDetails.Applications.length) {
13500
- dispatch(updateNDCForm("responseData", applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications));
13501
- }
13502
- }, [applicationDetails]);
13503
13367
  function goNext(finaldata) {
13504
13368
  console.log(`Data in step ${config.currStepNumber} is: \n`, finaldata);
13505
13369
  const missingFields = validation(finaldata);
@@ -13511,64 +13375,8 @@ const NewNDCStepFormTwo = ({
13511
13375
  }, 3000);
13512
13376
  return;
13513
13377
  }
13514
- const isRealId = id && id.startsWith("NDC-");
13515
- if (isRealId) {
13516
- updateApplication(finaldata);
13517
- console.log("here bab");
13518
- }
13378
+ onGoNext();
13519
13379
  }
13520
- const updateApplication = async data => {
13521
- var _Digit$UserService$ge, _user$info, _user$info2, _checkFormData$NDCDet, _checkFormData$NDCDet2, _user$info3, _user$info4, _checkFormData$respon, _ref, _data$documents, _response$ResponseInf;
13522
- const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
13523
- console.log("final data===?????", data);
13524
- console.log("checkFormData???====", checkFormData);
13525
- const owners = [{
13526
- name: user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.name,
13527
- mobileNumber: user === null || user === void 0 ? void 0 : (_user$info2 = user.info) === null || _user$info2 === void 0 ? void 0 : _user$info2.mobileNumber,
13528
- 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,
13529
- emailId: user === null || user === void 0 ? void 0 : (_user$info3 = user.info) === null || _user$info3 === void 0 ? void 0 : _user$info3.emailId,
13530
- type: user === null || user === void 0 ? void 0 : (_user$info4 = user.info) === null || _user$info4 === void 0 ? void 0 : _user$info4.type
13531
- }];
13532
- const baseApplication = (checkFormData === null || checkFormData === void 0 ? void 0 : (_checkFormData$respon = checkFormData.responseData) === null || _checkFormData$respon === void 0 ? void 0 : _checkFormData$respon[0]) || {};
13533
- const updatedApplication = {
13534
- ...baseApplication,
13535
- workflow: {
13536
- ...(baseApplication === null || baseApplication === void 0 ? void 0 : baseApplication.workflow)
13537
- },
13538
- owners: owners,
13539
- NdcDetails: baseApplication === null || baseApplication === void 0 ? void 0 : baseApplication.NdcDetails,
13540
- Documents: []
13541
- };
13542
- (_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 => {
13543
- var _updatedApplication$D;
13544
- (_updatedApplication$D = updatedApplication.Documents) === null || _updatedApplication$D === void 0 ? void 0 : _updatedApplication$D.push({
13545
- uuid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
13546
- documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
13547
- documentAttachment: doc === null || doc === void 0 ? void 0 : doc.fileStoreId
13548
- });
13549
- });
13550
- const payload = {
13551
- Applications: [updatedApplication]
13552
- };
13553
- console.log("payload", payload);
13554
- const response = await Digit.NDCService.NDCUpdate({
13555
- tenantId,
13556
- details: payload
13557
- });
13558
- if ((response === null || response === void 0 ? void 0 : (_response$ResponseInf = response.ResponseInfo) === null || _response$ResponseInf === void 0 ? void 0 : _response$ResponseInf.status) === "successful") {
13559
- dispatch(updateNDCForm("apiData", response));
13560
- onGoNext();
13561
- return {
13562
- isSuccess: true,
13563
- response
13564
- };
13565
- } else {
13566
- return {
13567
- isSuccess: false,
13568
- response
13569
- };
13570
- }
13571
- };
13572
13380
  const closeToast = () => {
13573
13381
  setShowToast(false);
13574
13382
  setError("");