@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 +115 -42
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +110 -42
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Card, Banner, ActionBar, SubmitBar as SubmitBar$1, PrivateRoute, BreadCrumb, BackButton, AppContainer, Loader, Dropdown, UploadFile, Modal, FormComposer, Toast, CardSubHeader, StatusTable, Row, CheckPoint, ConnectingCheckPoints, DisplayPhotos, Menu, LinkButton, EmployeeModuleCard, SearchField,
|
|
1
|
+
import { Card, Banner, ActionBar, SubmitBar as SubmitBar$1, PrivateRoute, BreadCrumb, BackButton, AppContainer, Loader, Dropdown, UploadFile, Modal, FormComposer, Toast, CardSubHeader, StatusTable, Row, TextInput, CardLabel, FilterFormField, RadioButtons, CheckPoint, ConnectingCheckPoints, DisplayPhotos, Menu, LinkButton, EmployeeModuleCard, SearchField, CheckBox, ComplaintIcon, Header, InboxComposer, MobileNumber, CardLabelError, SearchAction, PopUp, DetailsCard, SearchForm, CloseSvg, Table, CardHeader, LabelFieldPair, DeleteIcon, KeyNote } from '@mseva/digit-ui-react-components';
|
|
2
2
|
import React, { Fragment as Fragment$1, useState, useEffect, useRef, useMemo, useReducer, useCallback, forwardRef } from 'react';
|
|
3
3
|
import { useHistory, useLocation, Switch, Route, useRouteMatch, useParams, Link } from 'react-router-dom';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { useDispatch, useSelector } from 'react-redux';
|
|
6
|
+
import { useForm, Controller, useFormContext, FormProvider, useFieldArray } from 'react-hook-form';
|
|
6
7
|
import 'react-query';
|
|
7
|
-
import { Controller, useFormContext, useForm, FormProvider, useFieldArray } from 'react-hook-form';
|
|
8
8
|
import { combineReducers } from 'redux';
|
|
9
9
|
|
|
10
10
|
const businessServiceList = (isCode = false) => {
|
|
@@ -1100,6 +1100,13 @@ const getTimelineCaptions = (checkpoint, index, arr, t) => {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
}, caption.date && /*#__PURE__*/React.createElement("p", null, caption.date), caption.name && /*#__PURE__*/React.createElement("p", null, caption.name), caption.mobileNumber && /*#__PURE__*/React.createElement("p", null, caption.mobileNumber), caption.source && /*#__PURE__*/React.createElement("p", null, t("ES_COMMON_FILED_VIA_" + caption.source.toUpperCase()))));
|
|
1102
1102
|
};
|
|
1103
|
+
const availableOptions = [{
|
|
1104
|
+
code: "yes",
|
|
1105
|
+
name: "Yes"
|
|
1106
|
+
}, {
|
|
1107
|
+
code: "no",
|
|
1108
|
+
name: "No"
|
|
1109
|
+
}];
|
|
1103
1110
|
const ApplicationOverview = () => {
|
|
1104
1111
|
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;
|
|
1105
1112
|
const {
|
|
@@ -1113,28 +1120,35 @@ const ApplicationOverview = () => {
|
|
|
1113
1120
|
const state = tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0];
|
|
1114
1121
|
const [showToast, setShowToast] = useState(null);
|
|
1115
1122
|
const [error, setError] = useState(null);
|
|
1123
|
+
const {
|
|
1124
|
+
control,
|
|
1125
|
+
handleSubmit,
|
|
1126
|
+
setValue
|
|
1127
|
+
} = useForm();
|
|
1116
1128
|
const [showErrorToast, setShowErrorToastt] = useState(null);
|
|
1117
1129
|
const [errorOne, setErrorOne] = useState(null);
|
|
1118
1130
|
const [displayData, setDisplayData] = useState({});
|
|
1119
1131
|
const [isDetailsLoading, setIsDetailsLoading] = useState(false);
|
|
1120
|
-
const [markedPending, setMarkedPending] = useState(
|
|
1121
|
-
const
|
|
1132
|
+
const [markedPending, setMarkedPending] = useState(false);
|
|
1133
|
+
const [amounts, setAmounts] = useState({});
|
|
1134
|
+
const handleMarkPending = (consumerCode, value, index) => {
|
|
1122
1135
|
setMarkedPending(prev => {
|
|
1123
1136
|
const updated = {
|
|
1124
1137
|
...prev,
|
|
1125
|
-
[consumerCode]:
|
|
1138
|
+
[consumerCode]: value === "yes"
|
|
1126
1139
|
};
|
|
1127
1140
|
if (updated[consumerCode]) {
|
|
1128
1141
|
console.log("✅ Marked dues pending for", consumerCode);
|
|
1129
1142
|
} else {
|
|
1130
|
-
|
|
1143
|
+
setAmounts(prevAmounts => ({
|
|
1144
|
+
...prevAmounts,
|
|
1145
|
+
[consumerCode]: 0
|
|
1146
|
+
}));
|
|
1147
|
+
setValue(`amount[${index}]`, 0);
|
|
1131
1148
|
}
|
|
1132
1149
|
return updated;
|
|
1133
1150
|
});
|
|
1134
1151
|
};
|
|
1135
|
-
useEffect(() => {
|
|
1136
|
-
console.log("markedPending", markedPending);
|
|
1137
|
-
}, [markedPending]);
|
|
1138
1152
|
const {
|
|
1139
1153
|
isLoading,
|
|
1140
1154
|
data: applicationDetails
|
|
@@ -1245,7 +1259,8 @@ const ApplicationOverview = () => {
|
|
|
1245
1259
|
consumerCode: (item === null || item === void 0 ? void 0 : item.consumerCode) || "",
|
|
1246
1260
|
status: (item === null || item === void 0 ? void 0 : item.status) || "",
|
|
1247
1261
|
dueAmount: (item === null || item === void 0 ? void 0 : item.dueAmount) || 0,
|
|
1248
|
-
propertyType: (item === null || item === void 0 ? void 0 : (_item$additionalDetai = item.additionalDetails) === null || _item$additionalDetai === void 0 ? void 0 : _item$additionalDetai.propertyType) || ""
|
|
1262
|
+
propertyType: (item === null || item === void 0 ? void 0 : (_item$additionalDetai = item.additionalDetails) === null || _item$additionalDetai === void 0 ? void 0 : _item$additionalDetai.propertyType) || "",
|
|
1263
|
+
isDuePending: item === null || item === void 0 ? void 0 : item.isDuePending
|
|
1249
1264
|
};
|
|
1250
1265
|
});
|
|
1251
1266
|
setDisplayData({
|
|
@@ -1283,13 +1298,16 @@ const ApplicationOverview = () => {
|
|
|
1283
1298
|
const payloadData = applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications[0];
|
|
1284
1299
|
const updatedApplicant = {
|
|
1285
1300
|
...payloadData,
|
|
1286
|
-
NdcDetails: payloadData.NdcDetails.map(detail =>
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1301
|
+
NdcDetails: payloadData.NdcDetails.map(detail => {
|
|
1302
|
+
const isPending = markedPending[detail.consumerCode];
|
|
1303
|
+
return {
|
|
1304
|
+
...detail,
|
|
1305
|
+
isDuePending: isPending ?? detail.isDuePending ?? false,
|
|
1306
|
+
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
|
|
1307
|
+
};
|
|
1308
|
+
}),
|
|
1290
1309
|
workflow: {}
|
|
1291
1310
|
};
|
|
1292
|
-
console.log("updatedApplicant", updatedApplicant);
|
|
1293
1311
|
const filtData = data === null || data === void 0 ? void 0 : (_data$Licenses = data.Licenses) === null || _data$Licenses === void 0 ? void 0 : _data$Licenses[0];
|
|
1294
1312
|
updatedApplicant.workflow = {
|
|
1295
1313
|
action: filtData.action,
|
|
@@ -1297,7 +1315,6 @@ const ApplicationOverview = () => {
|
|
|
1297
1315
|
comment: filtData === null || filtData === void 0 ? void 0 : filtData.comment,
|
|
1298
1316
|
documents: filtData === null || filtData === void 0 ? void 0 : filtData.wfDocuments
|
|
1299
1317
|
};
|
|
1300
|
-
console.log("filtData action", filtData.action);
|
|
1301
1318
|
if (!(filtData !== null && filtData !== void 0 && filtData.assignee) && filtData.action !== "SENDBACKTOCITIZEN" && filtData.action !== "APPROVE" && filtData.action !== "REJECT" && filtData.action !== "SENDBACK") {
|
|
1302
1319
|
setErrorOne("Assignee is Mandatory");
|
|
1303
1320
|
setShowErrorToastt(true);
|
|
@@ -1375,12 +1392,13 @@ const ApplicationOverview = () => {
|
|
|
1375
1392
|
label: t(`${key === null || key === void 0 ? void 0 : key.toUpperCase()}`),
|
|
1376
1393
|
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")
|
|
1377
1394
|
}))))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(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) => {
|
|
1378
|
-
var
|
|
1395
|
+
var _propertyDetailsFetch, _propertyDetailsFetch2, _propertyDetailsFetch3, _propertyDetailsFetch4, _propertyDetailsFetch5, _propertyDetailsFetch6, _propertyDetailsFetch7, _propertyDetailsFetch8, _propertyDetailsFetch9, _propertyDetailsFetch0, _propertyDetailsFetch1, _propertyDetailsFetch10, _propertyDetailsFetch11, _propertyDetailsFetch12, _propertyDetailsFetch13, _propertyDetailsFetch14, _propertyDetailsFetch15, _propertyDetailsFetch16, _propertyDetailsFetch17, _propertyDetailsFetch18;
|
|
1379
1396
|
const isPT = (detail === null || detail === void 0 ? void 0 : detail.businessService) === "NDC_PROPERTY_TAX";
|
|
1380
1397
|
const isSW = (detail === null || detail === void 0 ? void 0 : detail.businessService) === "NDC_SEWERAGE_SERVICE_CONNECTION";
|
|
1381
1398
|
const isWS = (detail === null || detail === void 0 ? void 0 : detail.businessService) === "NDC_WATER_SERVICE_CONNECTION";
|
|
1382
1399
|
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"));
|
|
1383
|
-
const isMarked = markedPending[detail.consumerCode];
|
|
1400
|
+
const isMarked = markedPending[detail.consumerCode] || (detail === null || detail === void 0 ? void 0 : detail.isDuePending);
|
|
1401
|
+
const isRed = detail.dueAmount > 0;
|
|
1384
1402
|
return /*#__PURE__*/React.createElement("div", {
|
|
1385
1403
|
key: index,
|
|
1386
1404
|
style: {
|
|
@@ -1395,10 +1413,42 @@ const ApplicationOverview = () => {
|
|
|
1395
1413
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
1396
1414
|
label: t("NDC_CONSUMER_CODE"),
|
|
1397
1415
|
text: detail.consumerCode || "N/A"
|
|
1398
|
-
}), /*#__PURE__*/React.createElement(
|
|
1416
|
+
}), (!canRaiseFlag || !isMarked) && /*#__PURE__*/React.createElement("div", {
|
|
1417
|
+
style: {
|
|
1418
|
+
background: isRed ? "red" : "none",
|
|
1419
|
+
color: isRed ? "white" : "black",
|
|
1420
|
+
paddingTop: isRed ? "8px" : "0",
|
|
1421
|
+
paddingLeft: isRed ? "10px" : "0"
|
|
1422
|
+
}
|
|
1423
|
+
}, /*#__PURE__*/React.createElement(Row, {
|
|
1399
1424
|
label: t("NDC_DUE_AMOUNT"),
|
|
1400
|
-
text: ((
|
|
1401
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
1425
|
+
text: (markedPending[detail.consumerCode] === false ? "0" : (amounts === null || amounts === void 0 ? void 0 : amounts[detail.consumerCode]) ?? (detail === null || detail === void 0 ? void 0 : detail.dueAmount) ?? 0).toString()
|
|
1426
|
+
})), canRaiseFlag && isMarked && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
|
|
1427
|
+
label: "Due Amount",
|
|
1428
|
+
text: /*#__PURE__*/React.createElement(Controller, {
|
|
1429
|
+
key: index,
|
|
1430
|
+
control: control,
|
|
1431
|
+
name: `amount[${index}]`,
|
|
1432
|
+
defaultValue: markedPending[detail.consumerCode] === false ? 0 : (amounts === null || amounts === void 0 ? void 0 : amounts[detail.consumerCode]) ?? (detail === null || detail === void 0 ? void 0 : detail.dueAmount) ?? 0,
|
|
1433
|
+
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
1434
|
+
type: "number",
|
|
1435
|
+
value: props.value,
|
|
1436
|
+
onChange: e => {
|
|
1437
|
+
props.onChange(e.target.value);
|
|
1438
|
+
const newValue = e.target.value;
|
|
1439
|
+
setAmounts(prev => ({
|
|
1440
|
+
...prev,
|
|
1441
|
+
[detail.consumerCode]: newValue
|
|
1442
|
+
}));
|
|
1443
|
+
},
|
|
1444
|
+
style: {
|
|
1445
|
+
maxWidth: "200px"
|
|
1446
|
+
},
|
|
1447
|
+
onBlur: props.onBlur,
|
|
1448
|
+
disabled: markedPending[detail.consumerCode] === false
|
|
1449
|
+
})
|
|
1450
|
+
})
|
|
1451
|
+
})), /*#__PURE__*/React.createElement(Row, {
|
|
1402
1452
|
label: t("NDC_PROPERTY_TYPE"),
|
|
1403
1453
|
text: t(detail.propertyType) || detail.propertyType
|
|
1404
1454
|
}), isPT && (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : propertyDetailsFetch.Properties) && /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Row, {
|
|
@@ -1424,14 +1474,26 @@ const ApplicationOverview = () => {
|
|
|
1424
1474
|
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
|
|
1425
1475
|
}))), canRaiseFlag && /*#__PURE__*/React.createElement("div", {
|
|
1426
1476
|
style: {
|
|
1427
|
-
marginTop: "16px"
|
|
1428
|
-
display: "flex",
|
|
1429
|
-
justifyContent: "right"
|
|
1477
|
+
marginTop: "16px"
|
|
1430
1478
|
}
|
|
1431
|
-
}, /*#__PURE__*/React.createElement(
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1479
|
+
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
1480
|
+
className: "card-label-smaller ndc_card_labels"
|
|
1481
|
+
}, /*#__PURE__*/React.createElement("b", null, " Pending Dues")), /*#__PURE__*/React.createElement(FilterFormField, {
|
|
1482
|
+
className: "radioButtonSection"
|
|
1483
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
1484
|
+
name: `assignee${index}`,
|
|
1485
|
+
control: control,
|
|
1486
|
+
defaultValue: detail !== null && detail !== void 0 && detail.isDuePending ? "yes" : "no",
|
|
1487
|
+
render: props => /*#__PURE__*/React.createElement(RadioButtons, {
|
|
1488
|
+
onSelect: e => {
|
|
1489
|
+
props.onChange(e.code);
|
|
1490
|
+
handleMarkPending(detail.consumerCode, e.code, index);
|
|
1491
|
+
},
|
|
1492
|
+
selectedOption: availableOptions.filter(option => option.code === props.value)[0],
|
|
1493
|
+
optionsKey: "name",
|
|
1494
|
+
options: availableOptions
|
|
1495
|
+
})
|
|
1496
|
+
}))));
|
|
1435
1497
|
})), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("NDC_APPLICATION_DOCUMENTS_OVERVIEW")), /*#__PURE__*/React.createElement("div", {
|
|
1436
1498
|
style: {
|
|
1437
1499
|
display: "flex",
|
|
@@ -9659,8 +9721,8 @@ const Inbox = ({
|
|
|
9659
9721
|
logoIcon: /*#__PURE__*/React.createElement(ComplaintIcon, null),
|
|
9660
9722
|
headerText: `${t("MODULE_NKS_NO_DUE_CERTIFICATE_FEES")}`,
|
|
9661
9723
|
links: [{
|
|
9662
|
-
text: "
|
|
9663
|
-
link: "
|
|
9724
|
+
text: "",
|
|
9725
|
+
link: "",
|
|
9664
9726
|
accessTo: [""]
|
|
9665
9727
|
}]
|
|
9666
9728
|
};
|
|
@@ -9753,14 +9815,16 @@ const Inbox = ({
|
|
|
9753
9815
|
};
|
|
9754
9816
|
return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Header, null, t("ES_COMMON_INBOX"), totalCount ? /*#__PURE__*/React.createElement("p", {
|
|
9755
9817
|
className: "inbox-count"
|
|
9756
|
-
}, totalCount) : null), /*#__PURE__*/React.createElement(
|
|
9818
|
+
}, totalCount) : null), /*#__PURE__*/React.createElement("div", {
|
|
9819
|
+
className: "NDCSection"
|
|
9820
|
+
}, /*#__PURE__*/React.createElement(InboxComposer, _extends({
|
|
9757
9821
|
isInboxLoading,
|
|
9758
9822
|
PropsForInboxLinks
|
|
9759
9823
|
}, propsForSearchForm, propsForFilterForm, propsForMobileSortForm, {
|
|
9760
9824
|
propsForInboxTable,
|
|
9761
9825
|
propsForInboxMobileCards,
|
|
9762
9826
|
formState
|
|
9763
|
-
})));
|
|
9827
|
+
}))));
|
|
9764
9828
|
};
|
|
9765
9829
|
|
|
9766
9830
|
const SearchFormFieldsComponent = props => {
|
|
@@ -13489,7 +13553,7 @@ const NDCSummary = ({
|
|
|
13489
13553
|
key: index
|
|
13490
13554
|
}, 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.createElement("div", {
|
|
13491
13555
|
key: index
|
|
13492
|
-
}, 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("
|
|
13556
|
+
}, 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", {
|
|
13493
13557
|
style: "currency",
|
|
13494
13558
|
currency: "INR"
|
|
13495
13559
|
}).format(getData === null || getData === void 0 ? void 0 : getData.totalAmount) : "NA")), /*#__PURE__*/React.createElement("h2", {
|
|
@@ -13537,6 +13601,7 @@ const NDCNewFormSummaryStepThreeCitizen = ({
|
|
|
13537
13601
|
const dispatch = useDispatch();
|
|
13538
13602
|
const history = useHistory();
|
|
13539
13603
|
const tenantId = window.localStorage.getItem("CITIZEN.CITY");
|
|
13604
|
+
const user = Digit.UserService.getUser();
|
|
13540
13605
|
const formData = useSelector(state => state.ndc.NDCForm.formData || {});
|
|
13541
13606
|
const goNext = async action => {
|
|
13542
13607
|
const actionStatus = action === null || action === void 0 ? void 0 : action.action;
|
|
@@ -13553,14 +13618,15 @@ const NDCNewFormSummaryStepThreeCitizen = ({
|
|
|
13553
13618
|
}
|
|
13554
13619
|
};
|
|
13555
13620
|
function mapToNDCPayload(inputData, actionStatus) {
|
|
13556
|
-
var _Digit$UserService$ge,
|
|
13621
|
+
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;
|
|
13557
13622
|
const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
|
|
13623
|
+
console.log("formData mobile number", formData);
|
|
13558
13624
|
const owners = [{
|
|
13559
|
-
name:
|
|
13560
|
-
mobileNumber:
|
|
13561
|
-
gender: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
13562
|
-
emailId:
|
|
13563
|
-
type:
|
|
13625
|
+
name: user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.name,
|
|
13626
|
+
mobileNumber: user === null || user === void 0 ? void 0 : (_user$info2 = user.info) === null || _user$info2 === void 0 ? void 0 : _user$info2.mobileNumber,
|
|
13627
|
+
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,
|
|
13628
|
+
emailId: user === null || user === void 0 ? void 0 : (_user$info3 = user.info) === null || _user$info3 === void 0 ? void 0 : _user$info3.emailId,
|
|
13629
|
+
type: user === null || user === void 0 ? void 0 : (_user$info4 = user.info) === null || _user$info4 === void 0 ? void 0 : _user$info4.type
|
|
13564
13630
|
}];
|
|
13565
13631
|
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]) || {};
|
|
13566
13632
|
const updatedApplication = {
|
|
@@ -13605,9 +13671,13 @@ const NDCNewFormSummaryStepThreeCitizen = ({
|
|
|
13605
13671
|
};
|
|
13606
13672
|
}
|
|
13607
13673
|
};
|
|
13674
|
+
const onGoBack = data => {
|
|
13675
|
+
onBackClick(config.key, data);
|
|
13676
|
+
};
|
|
13608
13677
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(NDCSummary, {
|
|
13609
13678
|
formData: formData,
|
|
13610
|
-
goNext: goNext
|
|
13679
|
+
goNext: goNext,
|
|
13680
|
+
onGoBack: onGoBack
|
|
13611
13681
|
}));
|
|
13612
13682
|
};
|
|
13613
13683
|
|
|
@@ -13967,7 +14037,6 @@ const NewNDCStepFormOne$1 = ({
|
|
|
13967
14037
|
}, 3000);
|
|
13968
14038
|
return;
|
|
13969
14039
|
}
|
|
13970
|
-
console.log("checkFormData", checkFormData);
|
|
13971
14040
|
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) {
|
|
13972
14041
|
onGoNext();
|
|
13973
14042
|
} else createApplication(data);
|
|
@@ -14071,7 +14140,6 @@ const NewNDCStepFormOne$1 = ({
|
|
|
14071
14140
|
};
|
|
14072
14141
|
function validateStepData(data) {
|
|
14073
14142
|
var _data$cpt6, _data$cpt7, _data$cpt7$dues, _propertyDetails$wate, _propertyDetails$sewe;
|
|
14074
|
-
console.log("data", data);
|
|
14075
14143
|
const missingFields = [];
|
|
14076
14144
|
const invalidFields = [];
|
|
14077
14145
|
const cpt = (data === null || data === void 0 ? void 0 : data.cpt) || {};
|