@mseva/digit-ui-module-ndc 1.0.28 → 1.0.30

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 CHANGED
@@ -1378,15 +1378,17 @@ const ApplicationOverview = () => {
1378
1378
  }
1379
1379
  }, [applicationDetails]);
1380
1380
  function onActionSelect(action) {
1381
+ var _displayData$applican;
1381
1382
  const payload = {
1382
1383
  Licenses: [action]
1383
1384
  };
1385
+ const appNo = displayData === null || displayData === void 0 ? void 0 : (_displayData$applican = displayData.applicantData) === null || _displayData$applican === void 0 ? void 0 : _displayData$applican.applicationNo;
1384
1386
  if ((action === null || action === void 0 ? void 0 : action.action) == "APPLY") {
1385
1387
  submitAction(payload);
1386
1388
  } else if ((action === null || action === void 0 ? void 0 : action.action) == "PAY") {
1387
- var _displayData$applican;
1388
- const appNo = displayData === null || displayData === void 0 ? void 0 : (_displayData$applican = displayData.applicantData) === null || _displayData$applican === void 0 ? void 0 : _displayData$applican.applicationNo;
1389
1389
  history.push("/digit-ui/employee/payment/collect/NDC/" + appNo + "/" + tenantId + "?tenantId=" + tenantId);
1390
+ } else if ((action === null || action === void 0 ? void 0 : action.action) == "EDIT") {
1391
+ history.push("/digit-ui/employee/ndc/create/" + appNo);
1390
1392
  } else {
1391
1393
  setShowModal(true);
1392
1394
  setSelectedAction(action);
@@ -8993,7 +8995,7 @@ const getTimelineCaptions$1 = (checkpoint, index, arr, t) => {
8993
8995
  }, caption.date && /*#__PURE__*/React__default.createElement("p", null, caption.date), caption.name && /*#__PURE__*/React__default.createElement("p", null, caption.name), caption.mobileNumber , caption.source && /*#__PURE__*/React__default.createElement("p", null, t("ES_COMMON_FILED_VIA_" + caption.source.toUpperCase()))));
8994
8996
  };
8995
8997
  const CitizenApplicationOverview = () => {
8996
- var _user, _user$info, _user$info$roles, _applicationDetails$A3, _applicationDetails$A4, _applicationDetails$A5, _applicationDetails$A6, _Object$entries, _displayData$NdcDetai2, _displayData$Document, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5;
8998
+ var _user, _user$info, _user$info$roles, _applicationDetails$A3, _applicationDetails$A4, _applicationDetails$A5, _applicationDetails$A6, _applicationDetails$A7, _applicationDetails$A8, _Object$entries, _displayData$NdcDetai2, _displayData$Document, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5;
8997
8999
  const {
8998
9000
  id
8999
9001
  } = reactRouterDom.useParams();
@@ -9133,6 +9135,7 @@ const CitizenApplicationOverview = () => {
9133
9135
  if (isLoading || isDetailsLoading) {
9134
9136
  return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
9135
9137
  }
9138
+ console.log("applicationDetails", applicationDetails);
9136
9139
  return /*#__PURE__*/React__default.createElement("div", {
9137
9140
  className: "employee-main-application-details"
9138
9141
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -9146,11 +9149,11 @@ const CitizenApplicationOverview = () => {
9146
9149
  className: "downLoadButton",
9147
9150
  label: t("DOWNLOAD_CERTIFICATE"),
9148
9151
  onClick: handleDownloadPdf
9149
- }), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A5 = applicationDetails.Applications) === null || _applicationDetails$A5 === void 0 ? void 0 : (_applicationDetails$A6 = _applicationDetails$A5[0]) === null || _applicationDetails$A6 === void 0 ? void 0 : _applicationDetails$A6.applicationStatus) == "INITIATED" && /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionBar, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
9152
+ }), ((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A5 = applicationDetails.Applications) === null || _applicationDetails$A5 === void 0 ? void 0 : (_applicationDetails$A6 = _applicationDetails$A5[0]) === null || _applicationDetails$A6 === void 0 ? void 0 : _applicationDetails$A6.applicationStatus) == "INITIATED" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A7 = applicationDetails.Applications) === null || _applicationDetails$A7 === void 0 ? void 0 : (_applicationDetails$A8 = _applicationDetails$A7[0]) === null || _applicationDetails$A8 === void 0 ? void 0 : _applicationDetails$A8.applicationStatus) == "CITIZENACTIONREQUIRED") && /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionBar, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
9150
9153
  label: t("COMMON_EDIT"),
9151
9154
  onSubmit: () => {
9152
- var _applicationDetails$A7, _applicationDetails$A8;
9153
- const id = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A7 = applicationDetails.Applications) === null || _applicationDetails$A7 === void 0 ? void 0 : (_applicationDetails$A8 = _applicationDetails$A7[0]) === null || _applicationDetails$A8 === void 0 ? void 0 : _applicationDetails$A8.uuid;
9155
+ var _applicationDetails$A9, _applicationDetails$A0;
9156
+ const id = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A9 = applicationDetails.Applications) === null || _applicationDetails$A9 === void 0 ? void 0 : (_applicationDetails$A0 = _applicationDetails$A9[0]) === null || _applicationDetails$A0 === void 0 ? void 0 : _applicationDetails$A0.uuid;
9154
9157
  history.push("/digit-ui/citizen/ndc/new-application/" + id);
9155
9158
  }
9156
9159
  }))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
@@ -9331,6 +9334,7 @@ const SearchFormFieldsComponents = _ref => {
9331
9334
  t
9332
9335
  } = reactI18next.useTranslation();
9333
9336
  const isMobile = window.Digit.Utils.browser.isMobile();
9337
+ console.log("searchFieldComponents", searchFieldComponents);
9334
9338
  if (!isMobile) {
9335
9339
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
9336
9340
  className: "search-container",
@@ -9351,9 +9355,6 @@ const SearchFormFieldsComponents = _ref => {
9351
9355
  })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.SearchField, null, /*#__PURE__*/React__default.createElement("label", null, t("CORE_COMMON_PHONE_NUMBER")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
9352
9356
  name: "phoneNumber",
9353
9357
  inputRef: registerRef({})
9354
- })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.SearchField, null, /*#__PURE__*/React__default.createElement("label", null, t("NDC_MSG_PROPERTY_LABEL")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
9355
- name: "propertyId",
9356
- inputRef: registerRef({})
9357
9358
  })), /*#__PURE__*/React__default.createElement("div", {
9358
9359
  className: "search-action-wrapper",
9359
9360
  style: {
@@ -9657,6 +9658,7 @@ const Inbox = _ref => {
9657
9658
  const onSearchFormReset = setSearchFormValue => {
9658
9659
  setSearchFormValue("sourceRefId", null);
9659
9660
  setSearchFormValue("uuid", null);
9661
+ setSearchFormValue("phoneNumber", null);
9660
9662
  dispatch({
9661
9663
  action: "mutateSearchForm",
9662
9664
  data: searchFormDefaultValues
@@ -11758,7 +11760,7 @@ const NewNDCStepForm = () => {
11758
11760
  const [showToast, setShowToast] = React.useState(null);
11759
11761
  const formState = reactRedux.useSelector(state => state.ndc.NDCForm);
11760
11762
  const step = formState.step;
11761
- const tenantId = Digit.ULBService.getCurrentTenantId();
11763
+ const tenantId = window.localStorage.getItem("CITIZEN.CITY");
11762
11764
  const id = window.location.pathname.split("/").pop();
11763
11765
  const {
11764
11766
  isLoading,
@@ -11820,7 +11822,7 @@ const NewNDCStepFormOne = _ref => {
11820
11822
  const checkFormData = reactRedux.useSelector(state => state.ndc.NDCForm.formData || {});
11821
11823
  const tenantId = window.localStorage.getItem("CITIZEN.CITY");
11822
11824
  function goNext(data) {
11823
- var _checkFormData$apiDat, _checkFormData$apiDat2, _checkFormData$apiDat3;
11825
+ var _checkFormData$apiDat, _checkFormData$apiDat2, _checkFormData$apiDat3, _checkFormData$respon, _checkFormData$respon2;
11824
11826
  const missingFields = validateStepData(currentStepData);
11825
11827
  if (missingFields.length > 0) {
11826
11828
  setError("" + missingFields[0]);
@@ -11830,7 +11832,7 @@ const NewNDCStepFormOne = _ref => {
11830
11832
  }, 3000);
11831
11833
  return;
11832
11834
  }
11833
- 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) {
11835
+ 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) {
11834
11836
  onGoNext();
11835
11837
  } else createApplication(data);
11836
11838
  }
@@ -12120,7 +12122,7 @@ function SelectNDCReason(_ref) {
12120
12122
  }
12121
12123
 
12122
12124
  const PropertyDetailsForm$1 = _ref => {
12123
- var _formData$cpt, _formData$cpt$details, _formData$cpt3, _Digit, _Digit$ComponentRegis, _formData$cpt4, _apiDataCheck$5, _propertyDetails$wate, _propertyDetails$sewe;
12125
+ var _formData$cpt, _formData$cpt$details, _formData$cpt3, _Digit, _Digit$ComponentRegis, _formData$cpt4, _apiDataCheck$6, _propertyDetails$wate, _propertyDetails$sewe;
12124
12126
  const fetchBill = function (bussinessService, consumercodes, index) {
12125
12127
  try {
12126
12128
  if (bussinessService === "WS") {
@@ -12263,8 +12265,7 @@ const PropertyDetailsForm$1 = _ref => {
12263
12265
  }
12264
12266
  }
12265
12267
  });
12266
- }, function (error) {
12267
- console.error("Error fetching bill:", error);
12268
+ }, function () {
12268
12269
  setPropertyLoader(false);
12269
12270
  setShowToast({
12270
12271
  error: true,
@@ -12339,13 +12340,12 @@ const PropertyDetailsForm$1 = _ref => {
12339
12340
  t
12340
12341
  });
12341
12342
  React.useEffect(() => {
12342
- var _formData$cpt2, _formData$cpt2$detail, _formData$cpt2$detail2, _owner$name, _formData$PropertyDet, _formData$PropertyDet2, _formData$PropertyDet3;
12343
- console.log("coming here everytime", formData);
12343
+ var _formData$cpt2, _formData$cpt2$detail, _formData$cpt2$detail2, _apiDataCheck$, _apiDataCheck$$owners, _apiDataCheck$$owners2, _owner$name, _formData$PropertyDet, _formData$PropertyDet2, _formData$PropertyDet3;
12344
12344
  const owner = formData === null || formData === void 0 ? void 0 : (_formData$cpt2 = formData.cpt) === null || _formData$cpt2 === void 0 ? void 0 : (_formData$cpt2$detail = _formData$cpt2.details) === null || _formData$cpt2$detail === void 0 ? void 0 : (_formData$cpt2$detail2 = _formData$cpt2$detail.owners) === null || _formData$cpt2$detail2 === void 0 ? void 0 : _formData$cpt2$detail2[0];
12345
+ 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;
12345
12346
  const fullName = owner === null || owner === void 0 ? void 0 : (_owner$name = owner.name) === null || _owner$name === void 0 ? void 0 : _owner$name.split(" ");
12346
12347
  const firstName = owner === null || owner === void 0 ? void 0 : owner.name;
12347
- console.log("ikiki email", owner === null || owner === void 0 ? void 0 : owner.emailId);
12348
- const email = (owner === null || owner === void 0 ? void 0 : owner.emailId) || (formData === null || formData === void 0 ? void 0 : (_formData$PropertyDet = formData.PropertyDetails) === null || _formData$PropertyDet === void 0 ? void 0 : _formData$PropertyDet.email) || "";
12348
+ const email = (owner === null || owner === void 0 ? void 0 : owner.emailId) || (formData === null || formData === void 0 ? void 0 : (_formData$PropertyDet = formData.PropertyDetails) === null || _formData$PropertyDet === void 0 ? void 0 : _formData$PropertyDet.email) || emailApi || "";
12349
12349
  const mobileNumber = owner === null || owner === void 0 ? void 0 : owner.mobileNumber;
12350
12350
  const address = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
12351
12351
  const combinedObject = {};
@@ -12360,16 +12360,13 @@ const PropertyDetailsForm$1 = _ref => {
12360
12360
  setPropertyDetails(prev => {
12361
12361
  return _extends({}, prev, combinedObject);
12362
12362
  });
12363
- }, [formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : _formData$cpt3.details]);
12364
- React.useEffect(() => {
12365
- console.log("updated propertyDetails", propertyDetails);
12366
- }, [propertyDetails]);
12363
+ }, [formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : _formData$cpt3.details, apiDataCheck]);
12367
12364
  React.useEffect(() => {
12368
- var _apiDataCheck$;
12365
+ var _apiDataCheck$2;
12369
12366
  let waterConnection;
12370
- if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$ = apiDataCheck[0]) !== null && _apiDataCheck$ !== void 0 && _apiDataCheck$.NdcDetails) {
12371
- var _apiDataCheck$2;
12372
- const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$2 = apiDataCheck[0]) === null || _apiDataCheck$2 === void 0 ? void 0 : _apiDataCheck$2.NdcDetails.filter(item => {
12367
+ if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$2 = apiDataCheck[0]) !== null && _apiDataCheck$2 !== void 0 && _apiDataCheck$2.NdcDetails) {
12368
+ var _apiDataCheck$3;
12369
+ 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 => {
12373
12370
  return item.businessService == "WS";
12374
12371
  });
12375
12372
  waterConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
@@ -12393,11 +12390,11 @@ const PropertyDetailsForm$1 = _ref => {
12393
12390
  }));
12394
12391
  }, [waterConnectionData, apiDataCheck]);
12395
12392
  React.useEffect(() => {
12396
- var _apiDataCheck$3;
12393
+ var _apiDataCheck$4;
12397
12394
  let sewerageConnection;
12398
- if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$3 = apiDataCheck[0]) !== null && _apiDataCheck$3 !== void 0 && _apiDataCheck$3.NdcDetails) {
12399
- var _apiDataCheck$4;
12400
- const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$4 = apiDataCheck[0]) === null || _apiDataCheck$4 === void 0 ? void 0 : _apiDataCheck$4.NdcDetails.filter(item => {
12395
+ if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$4 = apiDataCheck[0]) !== null && _apiDataCheck$4 !== void 0 && _apiDataCheck$4.NdcDetails) {
12396
+ var _apiDataCheck$5;
12397
+ 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 => {
12401
12398
  return item.businessService == "SW";
12402
12399
  });
12403
12400
  sewerageConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
@@ -12506,7 +12503,7 @@ const PropertyDetailsForm$1 = _ref => {
12506
12503
  style: {
12507
12504
  marginBottom: "16px"
12508
12505
  }
12509
- }, ((formData === null || formData === void 0 ? void 0 : (_formData$cpt4 = formData.cpt) === null || _formData$cpt4 === void 0 ? void 0 : _formData$cpt4.details) || (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$5 = apiDataCheck[0]) === null || _apiDataCheck$5 === void 0 ? void 0 : _apiDataCheck$5.NdcDetails)) && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, {
12506
+ }, ((formData === null || formData === void 0 ? void 0 : (_formData$cpt4 = formData.cpt) === null || _formData$cpt4 === void 0 ? void 0 : _formData$cpt4.details) || (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$6 = apiDataCheck[0]) === null || _apiDataCheck$6 === void 0 ? void 0 : _apiDataCheck$6.NdcDetails)) && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, {
12510
12507
  style: {
12511
12508
  marginTop: "40px"
12512
12509
  }
@@ -12521,7 +12518,7 @@ const PropertyDetailsForm$1 = _ref => {
12521
12518
  width: "100%"
12522
12519
  }
12523
12520
  }, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.map((item, index) => {
12524
- var _apiDataCheck$6, _item$billData, _item$billData2, _item$billData3, _item$billData4;
12521
+ var _apiDataCheck$7, _item$billData, _item$billData2, _item$billData3, _item$billData4;
12525
12522
  return /*#__PURE__*/React__default.createElement("div", {
12526
12523
  className: "ndc_property_search",
12527
12524
  key: index,
@@ -12561,7 +12558,7 @@ const PropertyDetailsForm$1 = _ref => {
12561
12558
  alignItems: "center",
12562
12559
  gap: "12px"
12563
12560
  }
12564
- }, !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$6 = apiDataCheck[0]) !== null && _apiDataCheck$6 !== void 0 && _apiDataCheck$6.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__default.createElement("button", {
12561
+ }, !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$7 = apiDataCheck[0]) !== null && _apiDataCheck$7 !== void 0 && _apiDataCheck$7.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__default.createElement("button", {
12565
12562
  className: "submit-bar",
12566
12563
  type: "button",
12567
12564
  style: {
@@ -12627,7 +12624,7 @@ const PropertyDetailsForm$1 = _ref => {
12627
12624
  width: "100%"
12628
12625
  }
12629
12626
  }, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$sewe = propertyDetails.sewerageConnection) === null || _propertyDetails$sewe === void 0 ? void 0 : _propertyDetails$sewe.map((item, index) => {
12630
- var _apiDataCheck$7, _item$billData5, _item$billData6, _item$billData7, _item$billData8;
12627
+ var _apiDataCheck$8, _item$billData5, _item$billData6, _item$billData7, _item$billData8;
12631
12628
  return /*#__PURE__*/React__default.createElement("div", {
12632
12629
  className: "ndc_property_search",
12633
12630
  key: index,
@@ -12667,7 +12664,7 @@ const PropertyDetailsForm$1 = _ref => {
12667
12664
  alignItems: "center",
12668
12665
  gap: "12px"
12669
12666
  }
12670
- }, !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$7 = apiDataCheck[0]) !== null && _apiDataCheck$7 !== void 0 && _apiDataCheck$7.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__default.createElement("button", {
12667
+ }, !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$8 = apiDataCheck[0]) !== null && _apiDataCheck$8 !== void 0 && _apiDataCheck$8.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__default.createElement("button", {
12671
12668
  className: "submit-bar",
12672
12669
  type: "button",
12673
12670
  style: {
@@ -13002,6 +12999,11 @@ const PropertySearchNSummary = _ref => {
13002
12999
  setPropertyId(ptFromApi.consumerCode);
13003
13000
  setSearchPropertyId(ptFromApi.consumerCode);
13004
13001
  setNoDue(true);
13002
+ setPropertyDues({
13003
+ dues: {
13004
+ totalAmount: 0
13005
+ }
13006
+ });
13005
13007
  onSelect(config.key, _extends({}, formData[config.key], {
13006
13008
  id: ptFromApi.consumerCode
13007
13009
  }));
@@ -13228,9 +13230,21 @@ const SelectNDCDocuments = _ref => {
13228
13230
  formState
13229
13231
  } = _ref;
13230
13232
  const tenantId = Digit.ULBService.getCurrentTenantId();
13233
+ const checkFormData = reactRedux.useSelector(state => state.ndc.NDCForm.formData || {});
13231
13234
  const stateId = Digit.ULBService.getStateId();
13232
13235
  const [documents, setDocuments] = React.useState((formData === null || formData === void 0 ? void 0 : (_formData$documents = formData.documents) === null || _formData$documents === void 0 ? void 0 : _formData$documents.documents) || []);
13233
13236
  const [error, setError] = React.useState(null);
13237
+ React.useEffect(() => {
13238
+ var _checkFormData$respon, _checkFormData$respon2, _checkFormData$respon3;
13239
+ 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) {
13240
+ const apiDocs = checkFormData.responseData[0].Documents.map(doc => ({
13241
+ documentType: doc.documentType,
13242
+ fileStoreId: doc.documentAttachment,
13243
+ documentUid: doc.documentAttachment
13244
+ }));
13245
+ setDocuments(apiDocs);
13246
+ }
13247
+ }, [checkFormData]);
13234
13248
  const {
13235
13249
  action = "create"
13236
13250
  } = Digit.Hooks.useQueryParams();
@@ -13279,13 +13293,9 @@ function SelectDocument(_ref2) {
13279
13293
  t,
13280
13294
  document: doc,
13281
13295
  setDocuments,
13282
- error,
13283
13296
  setError,
13284
13297
  documents,
13285
- action,
13286
- formData,
13287
13298
  setFormError,
13288
- clearFormErrors,
13289
13299
  config,
13290
13300
  formState
13291
13301
  } = _ref2;
@@ -13299,8 +13309,11 @@ function SelectDocument(_ref2) {
13299
13309
  function selectfile(e) {
13300
13310
  setFile(e.target.files[0]);
13301
13311
  }
13302
- let hideInput = false;
13303
- const [isHidden, setHidden] = React.useState(hideInput);
13312
+ React.useEffect(() => {
13313
+ if (filteredDocument !== null && filteredDocument !== void 0 && filteredDocument.fileStoreId) {
13314
+ setUploadedFile(filteredDocument.fileStoreId);
13315
+ }
13316
+ }, [filteredDocument]);
13304
13317
  React.useEffect(() => {
13305
13318
  if (uploadedFile) {
13306
13319
  setDocuments(prev => {
@@ -13318,7 +13331,7 @@ function SelectDocument(_ref2) {
13318
13331
  } else if (uploadedFile === null) {
13319
13332
  setDocuments(prev => prev.filter(item => (item === null || item === void 0 ? void 0 : item.documentType) !== (doc === null || doc === void 0 ? void 0 : doc.code)));
13320
13333
  }
13321
- }, [uploadedFile, isHidden]);
13334
+ }, [uploadedFile]);
13322
13335
  React.useEffect(() => {
13323
13336
  (function () {
13324
13337
  try {
@@ -13450,7 +13463,7 @@ const NewNDCStepFormTwo = _ref => {
13450
13463
  };
13451
13464
 
13452
13465
  const NDCSummary = _ref => {
13453
- var _formData$DocummentDe, _formData$DocummentDe2, _formData$apiData2, _formData$apiData2$Ap, _formData$apiData2$Ap2, _user$info, _user$info$roles, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _formData$NDCDetails, _formData$NDCDetails$, _formData$NDCDetails2, _formData$NDCDetails3, _formData$NDCDetails4, _formData$NDCDetails5, _formData$NDCDetails6, _formData$NDCDetails7, _formData$NDCDetails8, _formData$NDCDetails9, _formData$NDCDetails0, _formData$NDCDetails1, _formData$NDCDetails10, _formData$NDCDetails11, _formData$NDCDetails12, _formData$NDCDetails13, _formData$NDCDetails14, _formData$NDCDetails15, _formData$NDCDetails16, _formData$NDCDetails17, _formData$NDCDetails18, _formData$NDCDetails19, _formData$NDCDetails20, _formData$NDCDetails21, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9;
13466
+ var _formData$DocummentDe, _formData$DocummentDe2, _formData$apiData, _formData$apiData$App, _formData$apiData$App2, _formData$responseDat, _formData$responseDat2, _user$info, _user$info$roles, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _formData$NDCDetails, _formData$NDCDetails$, _formData$NDCDetails2, _formData$NDCDetails3, _formData$NDCDetails4, _formData$NDCDetails5, _formData$NDCDetails6, _formData$NDCDetails7, _formData$NDCDetails8, _formData$NDCDetails9, _formData$NDCDetails0, _formData$NDCDetails1, _formData$NDCDetails10, _formData$NDCDetails11, _formData$NDCDetails12, _formData$NDCDetails13, _formData$NDCDetails14, _formData$NDCDetails15, _formData$NDCDetails16, _formData$NDCDetails17, _formData$NDCDetails18, _formData$NDCDetails19, _formData$NDCDetails20, _formData$NDCDetails21, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9;
13454
13467
  let {
13455
13468
  formData,
13456
13469
  goNext,
@@ -13469,6 +13482,7 @@ const NDCSummary = _ref => {
13469
13482
  let user = Digit.UserService.getUser();
13470
13483
  console.log("formData", formData);
13471
13484
  let docs = formData === null || formData === void 0 ? void 0 : (_formData$DocummentDe = formData.DocummentDetails) === null || _formData$DocummentDe === void 0 ? void 0 : (_formData$DocummentDe2 = _formData$DocummentDe.documents) === null || _formData$DocummentDe2 === void 0 ? void 0 : _formData$DocummentDe2.documents;
13485
+ const appId = (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$App2 = _formData$apiData$App[0]) === null || _formData$apiData$App2 === void 0 ? void 0 : _formData$apiData$App2.uuid) || (formData === null || formData === void 0 ? void 0 : (_formData$responseDat = formData.responseData) === null || _formData$responseDat === void 0 ? void 0 : (_formData$responseDat2 = _formData$responseDat[0]) === null || _formData$responseDat2 === void 0 ? void 0 : _formData$responseDat2.uuid);
13472
13486
  const tenantId = window.location.href.includes("citizen") ? window.localStorage.getItem("CITIZEN.CITY") : window.localStorage.getItem("Employee.tenant-id");
13473
13487
  const isCitizen = window.location.href.includes("citizen");
13474
13488
  const [getData, setData] = React.useState();
@@ -13479,10 +13493,9 @@ const NDCSummary = _ref => {
13479
13493
  Digit.Hooks.useClickOutside(menuRef, closeMenu, displayMenu);
13480
13494
  const fetchCalculations = function () {
13481
13495
  try {
13482
- var _formData$apiData, _formData$apiData$App, _formData$apiData$App2;
13483
13496
  const payload = {
13484
13497
  CalculationCriteria: [{
13485
- applicationNumber: 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$App2 = _formData$apiData$App[0]) === null || _formData$apiData$App2 === void 0 ? void 0 : _formData$apiData$App2.uuid,
13498
+ applicationNumber: appId,
13486
13499
  tenantId: tenantId
13487
13500
  }]
13488
13501
  };
@@ -13506,7 +13519,7 @@ const NDCSummary = _ref => {
13506
13519
  }, []);
13507
13520
  const workflowDetails = Digit.Hooks.useWorkflowDetails({
13508
13521
  tenantId: tenantId,
13509
- id: formData === null || formData === void 0 ? void 0 : (_formData$apiData2 = formData.apiData) === null || _formData$apiData2 === void 0 ? void 0 : (_formData$apiData2$Ap = _formData$apiData2.Applications) === null || _formData$apiData2$Ap === void 0 ? void 0 : (_formData$apiData2$Ap2 = _formData$apiData2$Ap[0]) === null || _formData$apiData2$Ap2 === void 0 ? void 0 : _formData$apiData2$Ap2.uuid,
13522
+ id: appId,
13510
13523
  moduleCode: "ndc-services"
13511
13524
  });
13512
13525
  const userRoles = user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : (_user$info$roles = _user$info.roles) === null || _user$info$roles === void 0 ? void 0 : _user$info$roles.map(e => e.code);
@@ -13525,6 +13538,7 @@ const NDCSummary = _ref => {
13525
13538
  goNext(action);
13526
13539
  }
13527
13540
  console.log("workflowDetails", workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data6 = workflowDetails.data) === null || _workflowDetails$data6 === void 0 ? void 0 : _workflowDetails$data6.nextActions);
13541
+ console.log("actions", actions);
13528
13542
  const pageStyle = {
13529
13543
  padding: "2rem",
13530
13544
  backgroundColor: "#f9f9f9",
@@ -13652,13 +13666,22 @@ const NDCNewFormSummaryStepThreeCitizen = _ref => {
13652
13666
  }
13653
13667
  };
13654
13668
  function mapToNDCPayload(inputData, actionStatus) {
13655
- var _Digit$UserService$ge, _formData$apiData, _formData$apiData$App, _formData$apiData2, _formData$apiData2$Ap, _formData$apiData2$Ap2, _formData$apiData3, _formData$apiData3$Ap, _formData$apiData3$Ap2, _inputData$DocummentD, _inputData$DocummentD2;
13669
+ var _Digit$UserService$ge, _formData$NDCDetails, _formData$NDCDetails$, _formData$NDCDetails2, _formData$NDCDetails3, _formData$NDCDetails4, _formData$NDCDetails5, _formData$NDCDetails6, _formData$NDCDetails7, _formData$NDCDetails8, _formData$NDCDetails9, _formData$responseDat, _formData$apiData, _formData$apiData$App, _inputData$DocummentD, _inputData$DocummentD2;
13656
13670
  const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
13657
- const updatedApplication = _extends({}, 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], {
13658
- workflow: _extends({}, formData === null || formData === void 0 ? void 0 : (_formData$apiData2 = formData.apiData) === null || _formData$apiData2 === void 0 ? void 0 : (_formData$apiData2$Ap = _formData$apiData2.Applications) === null || _formData$apiData2$Ap === void 0 ? void 0 : (_formData$apiData2$Ap2 = _formData$apiData2$Ap[0]) === null || _formData$apiData2$Ap2 === void 0 ? void 0 : _formData$apiData2$Ap2.workflow, {
13671
+ const owners = [{
13672
+ name: ((formData === null || formData === void 0 ? void 0 : (_formData$NDCDetails = formData.NDCDetails) === null || _formData$NDCDetails === void 0 ? void 0 : (_formData$NDCDetails$ = _formData$NDCDetails.PropertyDetails) === null || _formData$NDCDetails$ === void 0 ? void 0 : _formData$NDCDetails$.firstName) + " " + (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.lastName)).trim(),
13673
+ mobileNumber: formData === null || formData === void 0 ? void 0 : (_formData$NDCDetails4 = formData.NDCDetails) === null || _formData$NDCDetails4 === void 0 ? void 0 : (_formData$NDCDetails5 = _formData$NDCDetails4.PropertyDetails) === null || _formData$NDCDetails5 === void 0 ? void 0 : _formData$NDCDetails5.mobileNumber,
13674
+ gender: formData === null || formData === void 0 ? void 0 : (_formData$NDCDetails6 = formData.NDCDetails) === null || _formData$NDCDetails6 === void 0 ? void 0 : (_formData$NDCDetails7 = _formData$NDCDetails6.PropertyDetails) === null || _formData$NDCDetails7 === void 0 ? void 0 : _formData$NDCDetails7.gender,
13675
+ emailId: formData === null || formData === void 0 ? void 0 : (_formData$NDCDetails8 = formData.NDCDetails) === null || _formData$NDCDetails8 === void 0 ? void 0 : (_formData$NDCDetails9 = _formData$NDCDetails8.PropertyDetails) === null || _formData$NDCDetails9 === void 0 ? void 0 : _formData$NDCDetails9.email,
13676
+ type: "CITIZEN"
13677
+ }];
13678
+ 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]) || {};
13679
+ const updatedApplication = _extends({}, baseApplication, {
13680
+ workflow: _extends({}, baseApplication === null || baseApplication === void 0 ? void 0 : baseApplication.workflow, {
13659
13681
  action: actionStatus
13660
13682
  }),
13661
- NdcDetails: formData === null || formData === void 0 ? void 0 : (_formData$apiData3 = formData.apiData) === null || _formData$apiData3 === void 0 ? void 0 : (_formData$apiData3$Ap = _formData$apiData3.Applications) === null || _formData$apiData3$Ap === void 0 ? void 0 : (_formData$apiData3$Ap2 = _formData$apiData3$Ap[0]) === null || _formData$apiData3$Ap2 === void 0 ? void 0 : _formData$apiData3$Ap2.NdcDetails,
13683
+ owners: owners,
13684
+ NdcDetails: baseApplication === null || baseApplication === void 0 ? void 0 : baseApplication.NdcDetails,
13662
13685
  Documents: []
13663
13686
  });
13664
13687
  ((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 => {
@@ -14054,7 +14077,7 @@ const NewNDCStepFormOne$1 = _ref => {
14054
14077
  const checkFormData = reactRedux.useSelector(state => state.ndc.NDCForm.formData || {});
14055
14078
  const tenantId = window.localStorage.getItem("Employee.tenant-id");
14056
14079
  function goNext(data) {
14057
- var _checkFormData$apiDat, _checkFormData$apiDat2, _checkFormData$apiDat3;
14080
+ var _checkFormData$apiDat, _checkFormData$apiDat2, _checkFormData$apiDat3, _checkFormData$respon, _checkFormData$respon2;
14058
14081
  const missingFields = validateStepData(currentStepData);
14059
14082
  if (missingFields.length > 0) {
14060
14083
  setError("" + missingFields[0]);
@@ -14064,9 +14087,11 @@ const NewNDCStepFormOne$1 = _ref => {
14064
14087
  }, 3000);
14065
14088
  return;
14066
14089
  }
14067
- 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) {
14090
+ console.log("checkFormData", checkFormData);
14091
+ 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) {
14068
14092
  onGoNext();
14069
14093
  } else createApplication(data);
14094
+ onGoNext();
14070
14095
  }
14071
14096
  const createApplication = function (data) {
14072
14097
  try {
@@ -14337,6 +14362,7 @@ const NDCNewFormSummaryStepThreeEmployee = _ref => {
14337
14362
  const dispatch = reactRedux.useDispatch();
14338
14363
  const history = reactRouterDom.useHistory();
14339
14364
  const tenantId = window.localStorage.getItem("CITIZEN.CITY");
14365
+ const checkFormData = reactRedux.useSelector(state => state.ndc.NDCForm.formData || {});
14340
14366
  const formData = reactRedux.useSelector(state => state.ndc.NDCForm.formData || {});
14341
14367
  console.log("formData", formData);
14342
14368
  const goNext = function (action) {
@@ -14362,8 +14388,9 @@ const NDCNewFormSummaryStepThreeEmployee = _ref => {
14362
14388
  }
14363
14389
  };
14364
14390
  function mapToNDCPayload(inputData, actionStatus) {
14365
- var _Digit$UserService$ge, _formData$NDCDetails, _formData$NDCDetails$, _formData$NDCDetails2, _formData$NDCDetails3, _formData$NDCDetails4, _formData$NDCDetails5, _formData$NDCDetails6, _formData$NDCDetails7, _formData$NDCDetails8, _formData$NDCDetails9, _formData$apiData, _formData$apiData$App, _formData$apiData2, _formData$apiData2$Ap, _formData$apiData2$Ap2, _formData$apiData3, _formData$apiData3$Ap, _formData$apiData3$Ap2, _inputData$DocummentD, _inputData$DocummentD2;
14391
+ var _Digit$UserService$ge, _formData$NDCDetails, _formData$NDCDetails$, _formData$NDCDetails2, _formData$NDCDetails3, _formData$NDCDetails4, _formData$NDCDetails5, _formData$NDCDetails6, _formData$NDCDetails7, _formData$NDCDetails8, _formData$NDCDetails9, _formData$responseDat, _formData$apiData, _formData$apiData$App, _inputData$DocummentD, _inputData$DocummentD2;
14366
14392
  const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
14393
+ console.log("checkFormData", formData);
14367
14394
  const owners = [{
14368
14395
  name: ((formData === null || formData === void 0 ? void 0 : (_formData$NDCDetails = formData.NDCDetails) === null || _formData$NDCDetails === void 0 ? void 0 : (_formData$NDCDetails$ = _formData$NDCDetails.PropertyDetails) === null || _formData$NDCDetails$ === void 0 ? void 0 : _formData$NDCDetails$.firstName) + " " + (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.lastName)).trim(),
14369
14396
  mobileNumber: formData === null || formData === void 0 ? void 0 : (_formData$NDCDetails4 = formData.NDCDetails) === null || _formData$NDCDetails4 === void 0 ? void 0 : (_formData$NDCDetails5 = _formData$NDCDetails4.PropertyDetails) === null || _formData$NDCDetails5 === void 0 ? void 0 : _formData$NDCDetails5.mobileNumber,
@@ -14371,12 +14398,13 @@ const NDCNewFormSummaryStepThreeEmployee = _ref => {
14371
14398
  emailId: formData === null || formData === void 0 ? void 0 : (_formData$NDCDetails8 = formData.NDCDetails) === null || _formData$NDCDetails8 === void 0 ? void 0 : (_formData$NDCDetails9 = _formData$NDCDetails8.PropertyDetails) === null || _formData$NDCDetails9 === void 0 ? void 0 : _formData$NDCDetails9.email,
14372
14399
  type: "CITIZEN"
14373
14400
  }];
14374
- const updatedApplication = _extends({}, 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], {
14375
- workflow: _extends({}, formData === null || formData === void 0 ? void 0 : (_formData$apiData2 = formData.apiData) === null || _formData$apiData2 === void 0 ? void 0 : (_formData$apiData2$Ap = _formData$apiData2.Applications) === null || _formData$apiData2$Ap === void 0 ? void 0 : (_formData$apiData2$Ap2 = _formData$apiData2$Ap[0]) === null || _formData$apiData2$Ap2 === void 0 ? void 0 : _formData$apiData2$Ap2.workflow, {
14401
+ 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]) || {};
14402
+ const updatedApplication = _extends({}, baseApplication, {
14403
+ workflow: _extends({}, baseApplication === null || baseApplication === void 0 ? void 0 : baseApplication.workflow, {
14376
14404
  action: actionStatus
14377
14405
  }),
14378
14406
  owners: owners,
14379
- NdcDetails: formData === null || formData === void 0 ? void 0 : (_formData$apiData3 = formData.apiData) === null || _formData$apiData3 === void 0 ? void 0 : (_formData$apiData3$Ap = _formData$apiData3.Applications) === null || _formData$apiData3$Ap === void 0 ? void 0 : (_formData$apiData3$Ap2 = _formData$apiData3$Ap[0]) === null || _formData$apiData3$Ap2 === void 0 ? void 0 : _formData$apiData3$Ap2.NdcDetails,
14407
+ NdcDetails: baseApplication === null || baseApplication === void 0 ? void 0 : baseApplication.NdcDetails,
14380
14408
  Documents: []
14381
14409
  });
14382
14410
  ((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 => {