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

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
@@ -6,8 +6,8 @@ var React__default = _interopDefault(React);
6
6
  var reactRouterDom = require('react-router-dom');
7
7
  var reactI18next = require('react-i18next');
8
8
  var reactRedux = require('react-redux');
9
- require('react-query');
10
9
  var reactHookForm = require('react-hook-form');
10
+ require('react-query');
11
11
  var redux = require('redux');
12
12
 
13
13
  function _extends() {
@@ -1221,6 +1221,13 @@ const getTimelineCaptions = (checkpoint, index, arr, t) => {
1221
1221
  }
1222
1222
  }, caption.date && /*#__PURE__*/React__default.createElement("p", null, caption.date), caption.name && /*#__PURE__*/React__default.createElement("p", null, caption.name), caption.mobileNumber && /*#__PURE__*/React__default.createElement("p", null, caption.mobileNumber), caption.source && /*#__PURE__*/React__default.createElement("p", null, t("ES_COMMON_FILED_VIA_" + caption.source.toUpperCase()))));
1223
1223
  };
1224
+ const availableOptions = [{
1225
+ code: "yes",
1226
+ name: "Yes"
1227
+ }, {
1228
+ code: "no",
1229
+ name: "No"
1230
+ }];
1224
1231
  const ApplicationOverview = () => {
1225
1232
  var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _user, _user$info, _user$info$roles, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetailsTemp$, _workflowDetailsTemp$2, _Object$entries, _displayData$NdcDetai2, _displayData$Document, _workflowDetails$data9, _workflowDetails$data0, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _applicationDetails$A3, _applicationDetails$A4, _workflowDetails$data12, _workflowDetails$data13, _workflowDetails$data14, _applicationDetails$A5, _applicationDetails$A6, _workflowDetails$data15;
1226
1233
  const {
@@ -1234,27 +1241,33 @@ const ApplicationOverview = () => {
1234
1241
  const state = tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0];
1235
1242
  const [showToast, setShowToast] = React.useState(null);
1236
1243
  const [error, setError] = React.useState(null);
1244
+ const {
1245
+ control,
1246
+ handleSubmit,
1247
+ setValue
1248
+ } = reactHookForm.useForm();
1237
1249
  const [showErrorToast, setShowErrorToastt] = React.useState(null);
1238
1250
  const [errorOne, setErrorOne] = React.useState(null);
1239
1251
  const [displayData, setDisplayData] = React.useState({});
1240
1252
  const [isDetailsLoading, setIsDetailsLoading] = React.useState(false);
1241
- const [markedPending, setMarkedPending] = React.useState({});
1242
- const handleMarkPending = consumerCode => {
1253
+ const [markedPending, setMarkedPending] = React.useState(false);
1254
+ const [amounts, setAmounts] = React.useState({});
1255
+ const handleMarkPending = (consumerCode, value, index) => {
1243
1256
  setMarkedPending(prev => {
1244
1257
  const updated = _extends({}, prev, {
1245
- [consumerCode]: !prev[consumerCode]
1258
+ [consumerCode]: value === "yes"
1246
1259
  });
1247
1260
  if (updated[consumerCode]) {
1248
1261
  console.log("✅ Marked dues pending for", consumerCode);
1249
1262
  } else {
1250
- console.log("↩️ Undo marking dues pending for", consumerCode);
1263
+ setAmounts(prevAmounts => _extends({}, prevAmounts, {
1264
+ [consumerCode]: 0
1265
+ }));
1266
+ setValue("amount[" + index + "]", 0);
1251
1267
  }
1252
1268
  return updated;
1253
1269
  });
1254
1270
  };
1255
- React.useEffect(() => {
1256
- console.log("markedPending", markedPending);
1257
- }, [markedPending]);
1258
1271
  const {
1259
1272
  isLoading,
1260
1273
  data: applicationDetails
@@ -1361,7 +1374,8 @@ const ApplicationOverview = () => {
1361
1374
  consumerCode: (item === null || item === void 0 ? void 0 : item.consumerCode) || "",
1362
1375
  status: (item === null || item === void 0 ? void 0 : item.status) || "",
1363
1376
  dueAmount: (item === null || item === void 0 ? void 0 : item.dueAmount) || 0,
1364
- propertyType: (item === null || item === void 0 ? void 0 : (_item$additionalDetai = item.additionalDetails) === null || _item$additionalDetai === void 0 ? void 0 : _item$additionalDetai.propertyType) || ""
1377
+ propertyType: (item === null || item === void 0 ? void 0 : (_item$additionalDetai = item.additionalDetails) === null || _item$additionalDetai === void 0 ? void 0 : _item$additionalDetai.propertyType) || "",
1378
+ isDuePending: item === null || item === void 0 ? void 0 : item.isDuePending
1365
1379
  };
1366
1380
  });
1367
1381
  setDisplayData({
@@ -1399,12 +1413,16 @@ const ApplicationOverview = () => {
1399
1413
  var _data$Licenses;
1400
1414
  const payloadData = applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications[0];
1401
1415
  const updatedApplicant = _extends({}, payloadData, {
1402
- NdcDetails: payloadData.NdcDetails.map(detail => _extends({}, detail, {
1403
- isDuePending: markedPending[detail.consumerCode] || false
1404
- })),
1416
+ NdcDetails: payloadData.NdcDetails.map(detail => {
1417
+ var _ref;
1418
+ const isPending = markedPending[detail.consumerCode];
1419
+ return _extends({}, detail, {
1420
+ isDuePending: (_ref = isPending != null ? isPending : detail.isDuePending) != null ? _ref : false,
1421
+ dueAmount: isPending === false ? 0 : (amounts === null || amounts === void 0 ? void 0 : amounts[detail.consumerCode]) !== undefined ? Number(amounts[detail.consumerCode]) : (detail === null || detail === void 0 ? void 0 : detail.dueAmount) || 0
1422
+ });
1423
+ }),
1405
1424
  workflow: {}
1406
1425
  });
1407
- console.log("updatedApplicant", updatedApplicant);
1408
1426
  const filtData = data === null || data === void 0 ? void 0 : (_data$Licenses = data.Licenses) === null || _data$Licenses === void 0 ? void 0 : _data$Licenses[0];
1409
1427
  updatedApplicant.workflow = {
1410
1428
  action: filtData.action,
@@ -1412,7 +1430,6 @@ const ApplicationOverview = () => {
1412
1430
  comment: filtData === null || filtData === void 0 ? void 0 : filtData.comment,
1413
1431
  documents: filtData === null || filtData === void 0 ? void 0 : filtData.wfDocuments
1414
1432
  };
1415
- console.log("filtData action", filtData.action);
1416
1433
  if (!(filtData !== null && filtData !== void 0 && filtData.assignee) && filtData.action !== "SENDBACKTOCITIZEN" && filtData.action !== "APPROVE" && filtData.action !== "REJECT" && filtData.action !== "SENDBACK") {
1417
1434
  setErrorOne("Assignee is Mandatory");
1418
1435
  setShowErrorToastt(true);
@@ -1490,20 +1507,21 @@ const ApplicationOverview = () => {
1490
1507
  }
1491
1508
  return /*#__PURE__*/React__default.createElement("div", {
1492
1509
  className: "employee-main-application-details"
1493
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("NDC_APPLICATION_DETAILS_OVERVIEW")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, (displayData === null || displayData === void 0 ? void 0 : displayData.applicantData) && ((_Object$entries = Object.entries(displayData === null || displayData === void 0 ? void 0 : displayData.applicantData)) === null || _Object$entries === void 0 ? void 0 : _Object$entries.map(_ref => {
1494
- let [key, value] = _ref;
1510
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("NDC_APPLICATION_DETAILS_OVERVIEW")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, (displayData === null || displayData === void 0 ? void 0 : displayData.applicantData) && ((_Object$entries = Object.entries(displayData === null || displayData === void 0 ? void 0 : displayData.applicantData)) === null || _Object$entries === void 0 ? void 0 : _Object$entries.map(_ref2 => {
1511
+ let [key, value] = _ref2;
1495
1512
  return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
1496
1513
  key: key,
1497
1514
  label: t("" + (key === null || key === void 0 ? void 0 : key.toUpperCase())),
1498
1515
  text: Array.isArray(value) ? value.map(item => typeof item === "object" ? t((item === null || item === void 0 ? void 0 : item.code) || "N/A") : t(item || "N/A")).join(", ") : typeof value === "object" ? t((value === null || value === void 0 ? void 0 : value.code) || "N/A") : t(value || "N/A")
1499
1516
  });
1500
1517
  })))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, 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) => {
1501
- var _detail$dueAmount, _propertyDetailsFetch, _propertyDetailsFetch2, _propertyDetailsFetch3, _propertyDetailsFetch4, _propertyDetailsFetch5, _propertyDetailsFetch6, _propertyDetailsFetch7, _propertyDetailsFetch8, _propertyDetailsFetch9, _propertyDetailsFetch0, _propertyDetailsFetch1, _propertyDetailsFetch10, _propertyDetailsFetch11, _propertyDetailsFetch12, _propertyDetailsFetch13, _propertyDetailsFetch14, _propertyDetailsFetch15, _propertyDetailsFetch16, _propertyDetailsFetch17, _propertyDetailsFetch18;
1518
+ var _ref4, _amounts$detail$consu2, _ref5, _amounts$detail$consu3, _propertyDetailsFetch, _propertyDetailsFetch2, _propertyDetailsFetch3, _propertyDetailsFetch4, _propertyDetailsFetch5, _propertyDetailsFetch6, _propertyDetailsFetch7, _propertyDetailsFetch8, _propertyDetailsFetch9, _propertyDetailsFetch0, _propertyDetailsFetch1, _propertyDetailsFetch10, _propertyDetailsFetch11, _propertyDetailsFetch12, _propertyDetailsFetch13, _propertyDetailsFetch14, _propertyDetailsFetch15, _propertyDetailsFetch16, _propertyDetailsFetch17, _propertyDetailsFetch18;
1502
1519
  const isPT = (detail === null || detail === void 0 ? void 0 : detail.businessService) === "NDC_PROPERTY_TAX";
1503
1520
  const isSW = (detail === null || detail === void 0 ? void 0 : detail.businessService) === "NDC_SEWERAGE_SERVICE_CONNECTION";
1504
1521
  const isWS = (detail === null || detail === void 0 ? void 0 : detail.businessService) === "NDC_WATER_SERVICE_CONNECTION";
1505
1522
  const canRaiseFlag = isPT && (userRoles === null || userRoles === void 0 ? void 0 : userRoles.includes("NDC_PT_VERIFIER")) || (isSW || isWS) && (userRoles === null || userRoles === void 0 ? void 0 : userRoles.includes("NDC_WS_SW_VERIFIER"));
1506
- const isMarked = markedPending[detail.consumerCode];
1523
+ const isMarked = markedPending[detail.consumerCode] || (detail === null || detail === void 0 ? void 0 : detail.isDuePending);
1524
+ const isRed = detail.dueAmount > 0;
1507
1525
  return /*#__PURE__*/React__default.createElement("div", {
1508
1526
  key: index,
1509
1527
  style: {
@@ -1518,10 +1536,41 @@ const ApplicationOverview = () => {
1518
1536
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
1519
1537
  label: t("NDC_CONSUMER_CODE"),
1520
1538
  text: detail.consumerCode || "N/A"
1521
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
1539
+ }), (!canRaiseFlag || !isMarked) && /*#__PURE__*/React__default.createElement("div", {
1540
+ style: {
1541
+ background: isRed ? "red" : "none",
1542
+ color: isRed ? "white" : "black",
1543
+ paddingTop: isRed ? "8px" : "0",
1544
+ paddingLeft: isRed ? "10px" : "0"
1545
+ }
1546
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
1522
1547
  label: t("NDC_DUE_AMOUNT"),
1523
- text: ((_detail$dueAmount = detail.dueAmount) === null || _detail$dueAmount === void 0 ? void 0 : _detail$dueAmount.toString()) || "0"
1524
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
1548
+ text: (markedPending[detail.consumerCode] === false ? "0" : (_ref4 = (_amounts$detail$consu2 = amounts === null || amounts === void 0 ? void 0 : amounts[detail.consumerCode]) != null ? _amounts$detail$consu2 : detail === null || detail === void 0 ? void 0 : detail.dueAmount) != null ? _ref4 : 0).toString()
1549
+ })), canRaiseFlag && isMarked && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
1550
+ label: "Due Amount",
1551
+ text: /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
1552
+ key: index,
1553
+ control: control,
1554
+ name: "amount[" + index + "]",
1555
+ defaultValue: markedPending[detail.consumerCode] === false ? 0 : (_ref5 = (_amounts$detail$consu3 = amounts === null || amounts === void 0 ? void 0 : amounts[detail.consumerCode]) != null ? _amounts$detail$consu3 : detail === null || detail === void 0 ? void 0 : detail.dueAmount) != null ? _ref5 : 0,
1556
+ render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
1557
+ type: "number",
1558
+ value: props.value,
1559
+ onChange: e => {
1560
+ props.onChange(e.target.value);
1561
+ const newValue = e.target.value;
1562
+ setAmounts(prev => _extends({}, prev, {
1563
+ [detail.consumerCode]: newValue
1564
+ }));
1565
+ },
1566
+ style: {
1567
+ maxWidth: "200px"
1568
+ },
1569
+ onBlur: props.onBlur,
1570
+ disabled: markedPending[detail.consumerCode] === false
1571
+ })
1572
+ })
1573
+ })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
1525
1574
  label: t("NDC_PROPERTY_TYPE"),
1526
1575
  text: t(detail.propertyType) || detail.propertyType
1527
1576
  }), isPT && (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : propertyDetailsFetch.Properties) && /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
@@ -1547,14 +1596,26 @@ const ApplicationOverview = () => {
1547
1596
  text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch16 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch16 === void 0 ? void 0 : (_propertyDetailsFetch17 = _propertyDetailsFetch16[0]) === null || _propertyDetailsFetch17 === void 0 ? void 0 : (_propertyDetailsFetch18 = _propertyDetailsFetch17.additionalDetails) === null || _propertyDetailsFetch18 === void 0 ? void 0 : _propertyDetailsFetch18.yearConstruction
1548
1597
  }))), canRaiseFlag && /*#__PURE__*/React__default.createElement("div", {
1549
1598
  style: {
1550
- marginTop: "16px",
1551
- display: "flex",
1552
- justifyContent: "right"
1599
+ marginTop: "16px"
1553
1600
  }
1554
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
1555
- label: isMarked ? "Undo Mark Pending" : "Mark Dues Pending",
1556
- onSubmit: () => handleMarkPending(detail === null || detail === void 0 ? void 0 : detail.consumerCode)
1557
- })));
1601
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
1602
+ className: "card-label-smaller ndc_card_labels"
1603
+ }, /*#__PURE__*/React__default.createElement("b", null, " Pending Dues")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.FilterFormField, {
1604
+ className: "radioButtonSection"
1605
+ }, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
1606
+ name: "assignee" + index,
1607
+ control: control,
1608
+ defaultValue: detail !== null && detail !== void 0 && detail.isDuePending ? "yes" : "no",
1609
+ render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.RadioButtons, {
1610
+ onSelect: e => {
1611
+ props.onChange(e.code);
1612
+ handleMarkPending(detail.consumerCode, e.code, index);
1613
+ },
1614
+ selectedOption: availableOptions.filter(option => option.code === props.value)[0],
1615
+ optionsKey: "name",
1616
+ options: availableOptions
1617
+ })
1618
+ }))));
1558
1619
  })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("NDC_APPLICATION_DOCUMENTS_OVERVIEW")), /*#__PURE__*/React__default.createElement("div", {
1559
1620
  style: {
1560
1621
  display: "flex",
@@ -9758,8 +9819,8 @@ const Inbox = _ref => {
9758
9819
  logoIcon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.ComplaintIcon, null),
9759
9820
  headerText: "" + t("MODULE_NKS_NO_DUE_CERTIFICATE_FEES"),
9760
9821
  links: [{
9761
- text: "Create NDC Application",
9762
- link: "/digit-ui/employee/ndc/create",
9822
+ text: "",
9823
+ link: "",
9763
9824
  accessTo: [""]
9764
9825
  }]
9765
9826
  };
@@ -9851,14 +9912,16 @@ const Inbox = _ref => {
9851
9912
  };
9852
9913
  return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Header, null, t("ES_COMMON_INBOX"), totalCount ? /*#__PURE__*/React__default.createElement("p", {
9853
9914
  className: "inbox-count"
9854
- }, totalCount) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.InboxComposer, _extends({
9915
+ }, totalCount) : null), /*#__PURE__*/React__default.createElement("div", {
9916
+ className: "NDCSection"
9917
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.InboxComposer, _extends({
9855
9918
  isInboxLoading,
9856
9919
  PropsForInboxLinks
9857
9920
  }, propsForSearchForm, propsForFilterForm, propsForMobileSortForm, {
9858
9921
  propsForInboxTable,
9859
9922
  propsForInboxMobileCards,
9860
9923
  formState
9861
- })));
9924
+ }))));
9862
9925
  };
9863
9926
 
9864
9927
  const SearchFormFieldsComponent = props => {
@@ -13601,7 +13664,7 @@ const NDCSummary = _ref => {
13601
13664
  key: index
13602
13665
  }, item === null || item === void 0 ? void 0 : item.connectionNo)) : "NA"), renderLabel(t("Sewerage Connection"), (formData === null || formData === void 0 ? void 0 : (_formData$NDCDetails14 = formData.NDCDetails) === null || _formData$NDCDetails14 === void 0 ? void 0 : (_formData$NDCDetails15 = _formData$NDCDetails14.PropertyDetails) === null || _formData$NDCDetails15 === void 0 ? void 0 : (_formData$NDCDetails16 = _formData$NDCDetails15.sewerageConnection) === null || _formData$NDCDetails16 === void 0 ? void 0 : _formData$NDCDetails16.length) > 0 ? formData === null || formData === void 0 ? void 0 : (_formData$NDCDetails17 = formData.NDCDetails) === null || _formData$NDCDetails17 === void 0 ? void 0 : (_formData$NDCDetails18 = _formData$NDCDetails17.PropertyDetails) === null || _formData$NDCDetails18 === void 0 ? void 0 : (_formData$NDCDetails19 = _formData$NDCDetails18.sewerageConnection) === null || _formData$NDCDetails19 === void 0 ? void 0 : _formData$NDCDetails19.map((item, index) => /*#__PURE__*/React__default.createElement("div", {
13603
13666
  key: index
13604
- }, item === null || item === void 0 ? void 0 : item.connectionNo)) : "NA"), renderLabel(t("Property ID"), formData === null || formData === void 0 ? void 0 : (_formData$NDCDetails20 = formData.NDCDetails) === null || _formData$NDCDetails20 === void 0 ? void 0 : (_formData$NDCDetails21 = _formData$NDCDetails20.cpt) === null || _formData$NDCDetails21 === void 0 ? void 0 : _formData$NDCDetails21.id), renderLabel(t("Amount"), getData !== null && getData !== void 0 && getData.totalAmount ? new Intl.NumberFormat("en-IN", {
13667
+ }, item === null || item === void 0 ? void 0 : item.connectionNo)) : "NA"), renderLabel(t("Property ID"), formData === null || formData === void 0 ? void 0 : (_formData$NDCDetails20 = formData.NDCDetails) === null || _formData$NDCDetails20 === void 0 ? void 0 : (_formData$NDCDetails21 = _formData$NDCDetails20.cpt) === null || _formData$NDCDetails21 === void 0 ? void 0 : _formData$NDCDetails21.id), renderLabel(t("Application Fees"), getData !== null && getData !== void 0 && getData.totalAmount ? new Intl.NumberFormat("en-IN", {
13605
13668
  style: "currency",
13606
13669
  currency: "INR"
13607
13670
  }).format(getData === null || getData === void 0 ? void 0 : getData.totalAmount) : "NA")), /*#__PURE__*/React__default.createElement("h2", {
@@ -13641,9 +13704,16 @@ const NDCSummary = _ref => {
13641
13704
  };
13642
13705
 
13643
13706
  const NDCNewFormSummaryStepThreeCitizen = _ref => {
13707
+ let {
13708
+ config,
13709
+ onGoNext,
13710
+ onBackClick,
13711
+ t
13712
+ } = _ref;
13644
13713
  const dispatch = reactRedux.useDispatch();
13645
13714
  const history = reactRouterDom.useHistory();
13646
13715
  const tenantId = window.localStorage.getItem("CITIZEN.CITY");
13716
+ const user = Digit.UserService.getUser();
13647
13717
  const formData = reactRedux.useSelector(state => state.ndc.NDCForm.formData || {});
13648
13718
  const goNext = function (action) {
13649
13719
  try {
@@ -13666,14 +13736,15 @@ const NDCNewFormSummaryStepThreeCitizen = _ref => {
13666
13736
  }
13667
13737
  };
13668
13738
  function mapToNDCPayload(inputData, actionStatus) {
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;
13739
+ var _Digit$UserService$ge, _user$info, _user$info2, _formData$NDCDetails, _formData$NDCDetails$, _user$info3, _user$info4, _formData$responseDat, _formData$apiData, _formData$apiData$App, _inputData$DocummentD, _inputData$DocummentD2;
13670
13740
  const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
13741
+ console.log("formData mobile number", formData);
13671
13742
  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"
13743
+ name: user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.name,
13744
+ mobileNumber: user === null || user === void 0 ? void 0 : (_user$info2 = user.info) === null || _user$info2 === void 0 ? void 0 : _user$info2.mobileNumber,
13745
+ gender: 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$.gender,
13746
+ emailId: user === null || user === void 0 ? void 0 : (_user$info3 = user.info) === null || _user$info3 === void 0 ? void 0 : _user$info3.emailId,
13747
+ type: user === null || user === void 0 ? void 0 : (_user$info4 = user.info) === null || _user$info4 === void 0 ? void 0 : _user$info4.type
13677
13748
  }];
13678
13749
  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
13750
  const updatedApplication = _extends({}, baseApplication, {
@@ -13721,9 +13792,13 @@ const NDCNewFormSummaryStepThreeCitizen = _ref => {
13721
13792
  return Promise.reject(e);
13722
13793
  }
13723
13794
  };
13795
+ const onGoBack = data => {
13796
+ onBackClick(config.key, data);
13797
+ };
13724
13798
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(NDCSummary, {
13725
13799
  formData: formData,
13726
- goNext: goNext
13800
+ goNext: goNext,
13801
+ onGoBack: onGoBack
13727
13802
  }));
13728
13803
  };
13729
13804
 
@@ -14087,7 +14162,6 @@ const NewNDCStepFormOne$1 = _ref => {
14087
14162
  }, 3000);
14088
14163
  return;
14089
14164
  }
14090
- console.log("checkFormData", checkFormData);
14091
14165
  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) {
14092
14166
  onGoNext();
14093
14167
  } else createApplication(data);
@@ -14198,7 +14272,6 @@ const NewNDCStepFormOne$1 = _ref => {
14198
14272
  };
14199
14273
  function validateStepData(data) {
14200
14274
  var _data$cpt6, _data$cpt7, _data$cpt7$dues, _propertyDetails$wate, _propertyDetails$sewe;
14201
- console.log("data", data);
14202
14275
  const missingFields = [];
14203
14276
  const invalidFields = [];
14204
14277
  const cpt = (data === null || data === void 0 ? void 0 : data.cpt) || {};