@mseva/digit-ui-module-ndc 1.0.72-dev.1 → 1.0.72-dev.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +284 -121
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Card, Banner, ActionBar, SubmitBar as SubmitBar$1, PrivateRoute, BreadCrumb, AppContainer, Dropdown, UploadFile, Modal, FormComposer, Toast, Loader as Loader$1,
|
|
1
|
+
import { Card, Banner, ActionBar, SubmitBar as SubmitBar$1, PrivateRoute, BreadCrumb, AppContainer, Dropdown, UploadFile, Modal, FormComposer, Toast, Loader as Loader$1, MultiLink, CardSubHeader, StatusTable, Row, TextInput, CardLabel, FilterFormField, RadioButtons, Menu, 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, useMemo, useRef, 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';
|
|
@@ -2153,7 +2153,9 @@ function NewApplicationTimeline({
|
|
|
2153
2153
|
workflowDetails,
|
|
2154
2154
|
t,
|
|
2155
2155
|
tenantId = Digit.ULBService.getCurrentTenantId(),
|
|
2156
|
-
timeObj
|
|
2156
|
+
timeObj,
|
|
2157
|
+
empUserName = null,
|
|
2158
|
+
handleSetEmpDesignation = () => {}
|
|
2157
2159
|
}) {
|
|
2158
2160
|
var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _employeeData$data, _employeeData$data$Em;
|
|
2159
2161
|
const {
|
|
@@ -2228,6 +2230,9 @@ function NewApplicationTimeline({
|
|
|
2228
2230
|
const translationKey = `COMMON_MASTERS_DESIGNATION_${assignment === null || assignment === void 0 ? void 0 : assignment.designation}`;
|
|
2229
2231
|
deptMap[emp === null || emp === void 0 ? void 0 : emp.code] = translationKey;
|
|
2230
2232
|
});
|
|
2233
|
+
if (employeeData && empUserName) {
|
|
2234
|
+
handleSetEmpDesignation(t(deptMap[empUserName]));
|
|
2235
|
+
}
|
|
2231
2236
|
if (isLoading) return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
2232
2237
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
2233
2238
|
className: "custom-timeline-container"
|
|
@@ -2258,7 +2263,7 @@ function NewApplicationTimeline({
|
|
|
2258
2263
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
2259
2264
|
className: "custom-timeline-entries"
|
|
2260
2265
|
}, sortedData === null || sortedData === void 0 ? void 0 : sortedData.map((item, index) => {
|
|
2261
|
-
var _item$auditDetails, _item$auditDetails2, _item$assigner2, _item$assigner3, _item$assigner4, _item$
|
|
2266
|
+
var _item$auditDetails, _item$auditDetails2, _item$assigner2, _item$assigner3, _item$assigner4, _item$wfComment, _item$wfComment2, _item$wfComment3, _item$assignes, _item$assignes$, _item$assignes$2, _item$assignes$3, _item$wfDocuments, _item$wfDocuments2;
|
|
2262
2267
|
return /*#__PURE__*/React.createElement("div", {
|
|
2263
2268
|
key: index,
|
|
2264
2269
|
className: "custom-timeline-entry"
|
|
@@ -2295,13 +2300,9 @@ function NewApplicationTimeline({
|
|
|
2295
2300
|
className: "custom-officer-info"
|
|
2296
2301
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2297
2302
|
className: "custom-officer-name"
|
|
2298
|
-
}, (item === null || item === void 0 ? void 0 : (_item$assigner2 = item.assigner) === null || _item$assigner2 === void 0 ? void 0 : _item$assigner2.name) || t("CS_COMMON_NA"), deptMap[item === null || item === void 0 ? void 0 : (_item$assigner3 = item.assigner) === null || _item$assigner3 === void 0 ? void 0 : _item$assigner3.userName] && /*#__PURE__*/React.createElement("
|
|
2303
|
+
}, (item === null || item === void 0 ? void 0 : (_item$assigner2 = item.assigner) === null || _item$assigner2 === void 0 ? void 0 : _item$assigner2.name) || t("CS_COMMON_NA")), deptMap[item === null || item === void 0 ? void 0 : (_item$assigner3 = item.assigner) === null || _item$assigner3 === void 0 ? void 0 : _item$assigner3.userName] && /*#__PURE__*/React.createElement("div", {
|
|
2299
2304
|
className: "custom-officer-name"
|
|
2300
|
-
},
|
|
2301
|
-
className: "custom-officer-email"
|
|
2302
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
2303
|
-
className: "custom-email-label"
|
|
2304
|
-
}, t("Email")), " ", item === null || item === void 0 ? void 0 : (_item$assigner6 = item.assigner) === null || _item$assigner6 === void 0 ? void 0 : _item$assigner6.emailId))), /*#__PURE__*/React.createElement("div", {
|
|
2305
|
+
}, t(deptMap[item === null || item === void 0 ? void 0 : (_item$assigner4 = item.assigner) === null || _item$assigner4 === void 0 ? void 0 : _item$assigner4.userName])))), /*#__PURE__*/React.createElement("div", {
|
|
2305
2306
|
className: "custom-card-column custom-card-column-mid"
|
|
2306
2307
|
}, (item === null || item === void 0 ? void 0 : item.sla) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("h3", {
|
|
2307
2308
|
className: "custom-action-title"
|
|
@@ -2369,7 +2370,7 @@ const getReadableCity = (tenantId = "") => {
|
|
|
2369
2370
|
return cityMap[key] || capitalize(key);
|
|
2370
2371
|
};
|
|
2371
2372
|
const capitalize = text => (text === null || text === void 0 ? void 0 : text.charAt(0).toUpperCase()) + (text === null || text === void 0 ? void 0 : text.slice(1));
|
|
2372
|
-
const getAcknowledgementData = async (application, formattedAddress, tenantInfo, t, approver, ulbType, empData) => {
|
|
2373
|
+
const getAcknowledgementData = async (application, formattedAddress, tenantInfo, t, approver, ulbType, empData, approverStatement) => {
|
|
2373
2374
|
var _application$Applicat, _appData$owners, _appData$NdcDetails, _appData$auditDetails, _appData$auditDetails2, _empData$officer, _appData$NdcDetails2, _appData$NdcDetails3, _appData$NdcDetails3$, _appData$NdcDetails3$2, _appData$NdcDetails4, _appData$NdcDetails4$, _appData$NdcDetails4$2, _appData$owners2, _appData$owners2$;
|
|
2374
2375
|
const appData = (application === null || application === void 0 ? void 0 : (_application$Applicat = application.Applications) === null || _application$Applicat === void 0 ? void 0 : _application$Applicat[0]) || {};
|
|
2375
2376
|
const owner = (appData === null || appData === void 0 ? void 0 : (_appData$owners = appData.owners) === null || _appData$owners === void 0 ? void 0 : _appData$owners[0]) || {};
|
|
@@ -2530,6 +2531,7 @@ const getAcknowledgementData = async (application, formattedAddress, tenantInfo,
|
|
|
2530
2531
|
approvalDate,
|
|
2531
2532
|
approver,
|
|
2532
2533
|
designation,
|
|
2534
|
+
approverStatement,
|
|
2533
2535
|
ulbType,
|
|
2534
2536
|
tenantId: appData === null || appData === void 0 ? void 0 : appData.tenantId,
|
|
2535
2537
|
name: ` No Dues Certificate `,
|
|
@@ -2551,7 +2553,7 @@ const availableOptions = [{
|
|
|
2551
2553
|
name: "No"
|
|
2552
2554
|
}];
|
|
2553
2555
|
const ApplicationOverview = () => {
|
|
2554
|
-
var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _user, _user$info, _user$info$roles, _user2, _user2$info, _user2$info$roles$fin, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetailsTemp$, _workflowDetailsTemp$2, _applicationDetails$
|
|
2556
|
+
var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _applicationDetails$A2, _applicationDetails$A3, _applicationDetails$A4, _applicationDetails$A5, _user, _user$info, _user$info$roles, _user2, _user2$info, _user2$info$roles$fin, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetailsTemp$, _workflowDetailsTemp$2, _applicationDetails$A10, _applicationDetails$A11, _propertyDetailsFetch3, _Object$entries, _displayData$NdcDetai2, _displayData$Document, _applicationDetails$A26, _applicationDetails$A27, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _applicationDetails$A28, _applicationDetails$A29, _workflowDetails$data12;
|
|
2555
2557
|
const {
|
|
2556
2558
|
id
|
|
2557
2559
|
} = useParams();
|
|
@@ -2584,6 +2586,8 @@ const ApplicationOverview = () => {
|
|
|
2584
2586
|
const [showModal, setShowModal] = useState(false);
|
|
2585
2587
|
const [getPropertyId, setPropertyId] = useState(null);
|
|
2586
2588
|
const [approver, setApprover] = useState(null);
|
|
2589
|
+
const [approverStatement, setApproverStatement] = useState(null);
|
|
2590
|
+
const [showOptions, setShowOptions] = useState(false);
|
|
2587
2591
|
const handleMarkPending = (consumerCode, value, index) => {
|
|
2588
2592
|
setMarkedPending(prev => {
|
|
2589
2593
|
const updated = {
|
|
@@ -2662,6 +2666,68 @@ const ApplicationOverview = () => {
|
|
|
2662
2666
|
const empData = EmployeeData(tenantId, approver);
|
|
2663
2667
|
console.log("approver for ndc", approver);
|
|
2664
2668
|
console.log("officerData", empData);
|
|
2669
|
+
const {
|
|
2670
|
+
data: reciept_data,
|
|
2671
|
+
isLoading: recieptDataLoading
|
|
2672
|
+
} = Digit.Hooks.useRecieptSearch({
|
|
2673
|
+
tenantId: tenantId,
|
|
2674
|
+
businessService: "NDC",
|
|
2675
|
+
consumerCodes: id,
|
|
2676
|
+
isEmployee: false
|
|
2677
|
+
}, {
|
|
2678
|
+
enabled: id ? true : false
|
|
2679
|
+
});
|
|
2680
|
+
async function getRecieptSearch({
|
|
2681
|
+
tenantId,
|
|
2682
|
+
payments,
|
|
2683
|
+
...params
|
|
2684
|
+
}) {
|
|
2685
|
+
setLoader(true);
|
|
2686
|
+
try {
|
|
2687
|
+
var _applicationDetails$A, _response;
|
|
2688
|
+
let response = null;
|
|
2689
|
+
let application = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : _applicationDetails$A[0];
|
|
2690
|
+
if (payments !== null && payments !== void 0 && payments.fileStoreId) {
|
|
2691
|
+
response = {
|
|
2692
|
+
filestoreIds: [payments === null || payments === void 0 ? void 0 : payments.fileStoreId]
|
|
2693
|
+
};
|
|
2694
|
+
} else {
|
|
2695
|
+
response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
2696
|
+
Payments: [{
|
|
2697
|
+
...(payments || {}),
|
|
2698
|
+
...application
|
|
2699
|
+
}]
|
|
2700
|
+
}, "ndc-receipt");
|
|
2701
|
+
}
|
|
2702
|
+
const fileStore = await Digit.PaymentService.printReciept(tenantId, {
|
|
2703
|
+
fileStoreIds: response.filestoreIds[0]
|
|
2704
|
+
});
|
|
2705
|
+
window.open(fileStore[(_response = response) === null || _response === void 0 ? void 0 : _response.filestoreIds[0]], "_blank");
|
|
2706
|
+
setLoader(false);
|
|
2707
|
+
} catch (error) {
|
|
2708
|
+
console.error(error);
|
|
2709
|
+
setLoader(false);
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
const dowloadOptions = [];
|
|
2713
|
+
if ((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A2 = applicationDetails.Applications) === null || _applicationDetails$A2 === void 0 ? void 0 : (_applicationDetails$A3 = _applicationDetails$A2[0]) === null || _applicationDetails$A3 === void 0 ? void 0 : _applicationDetails$A3.applicationStatus) === "APPROVED" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A4 = applicationDetails.Applications) === null || _applicationDetails$A4 === void 0 ? void 0 : (_applicationDetails$A5 = _applicationDetails$A4[0]) === null || _applicationDetails$A5 === void 0 ? void 0 : _applicationDetails$A5.applicationStatus) === "REJECTED") {
|
|
2714
|
+
dowloadOptions.push({
|
|
2715
|
+
label: t("DOWNLOAD_CERTIFICATE"),
|
|
2716
|
+
onClick: () => handleDownloadPdf()
|
|
2717
|
+
});
|
|
2718
|
+
if (reciept_data && (reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments.length) > 0 && !recieptDataLoading) {
|
|
2719
|
+
dowloadOptions.push({
|
|
2720
|
+
label: t("PTR_FEE_RECIEPT"),
|
|
2721
|
+
onClick: () => {
|
|
2722
|
+
var _reciept_data$Payment;
|
|
2723
|
+
return getRecieptSearch({
|
|
2724
|
+
tenantId: reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment = reciept_data.Payments[0]) === null || _reciept_data$Payment === void 0 ? void 0 : _reciept_data$Payment.tenantId,
|
|
2725
|
+
payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0]
|
|
2726
|
+
});
|
|
2727
|
+
}
|
|
2728
|
+
});
|
|
2729
|
+
}
|
|
2730
|
+
}
|
|
2665
2731
|
let user = Digit.UserService.getUser();
|
|
2666
2732
|
const menuRef = useRef();
|
|
2667
2733
|
if (window.location.href.includes("/obps") || window.location.href.includes("/noc")) {
|
|
@@ -2670,9 +2736,7 @@ const ApplicationOverview = () => {
|
|
|
2670
2736
|
user = userInfo === null || userInfo === void 0 ? void 0 : userInfo.value;
|
|
2671
2737
|
}
|
|
2672
2738
|
const userRoles = (_user = 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);
|
|
2673
|
-
console.log('userRoles', userRoles);
|
|
2674
2739
|
const isCemp = (_user2 = user) === null || _user2 === void 0 ? void 0 : (_user2$info = _user2.info) === null || _user2$info === void 0 ? void 0 : (_user2$info$roles$fin = _user2$info.roles.find(role => role.code === "CEMP")) === null || _user2$info$roles$fin === void 0 ? void 0 : _user2$info$roles$fin.code;
|
|
2675
|
-
console.log('isCemp', isCemp);
|
|
2676
2740
|
let actions = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data6 = workflowDetails.data) === null || _workflowDetails$data6 === void 0 ? void 0 : (_workflowDetails$data7 = _workflowDetails$data6.actionState) === null || _workflowDetails$data7 === void 0 ? void 0 : (_workflowDetails$data8 = _workflowDetails$data7.nextActions) === null || _workflowDetails$data8 === void 0 ? void 0 : _workflowDetails$data8.filter(e => {
|
|
2677
2741
|
return (userRoles === null || userRoles === void 0 ? void 0 : userRoles.some(role => {
|
|
2678
2742
|
var _e$roles;
|
|
@@ -2706,8 +2770,8 @@ const ApplicationOverview = () => {
|
|
|
2706
2770
|
});
|
|
2707
2771
|
};
|
|
2708
2772
|
useEffect(() => {
|
|
2709
|
-
var _applicationDetails$
|
|
2710
|
-
const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
2773
|
+
var _applicationDetails$A6;
|
|
2774
|
+
const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A6 = applicationDetails.Applications) === null || _applicationDetails$A6 === void 0 ? void 0 : _applicationDetails$A6[0];
|
|
2711
2775
|
if (ndcObject) {
|
|
2712
2776
|
var _ndcObject$owners, _ndcObject$owners$, _ndcObject$owners2, _ndcObject$owners2$, _ndcObject$owners3, _ndcObject$owners3$, _ndcObject$NdcDetails, _ndcObject$NdcDetails2, _ndcObject$NdcDetails3, _removeDuplicatesByUU;
|
|
2713
2777
|
const applicantData = {
|
|
@@ -2759,7 +2823,7 @@ const ApplicationOverview = () => {
|
|
|
2759
2823
|
const ulbType = tenantInfo === null || tenantInfo === void 0 ? void 0 : (_tenantInfo$city = tenantInfo.city) === null || _tenantInfo$city === void 0 ? void 0 : _tenantInfo$city.ulbType;
|
|
2760
2824
|
let acknowledgementData;
|
|
2761
2825
|
if (empData) {
|
|
2762
|
-
acknowledgementData = await getAcknowledgementData(Property, formattedAddress, tenantInfo, t, approver, ulbType, empData);
|
|
2826
|
+
acknowledgementData = await getAcknowledgementData(Property, formattedAddress, tenantInfo, t, approver, ulbType, empData, approverStatement);
|
|
2763
2827
|
}
|
|
2764
2828
|
console.log("acknowledgementData", acknowledgementData);
|
|
2765
2829
|
setTimeout(() => {
|
|
@@ -2772,18 +2836,18 @@ const ApplicationOverview = () => {
|
|
|
2772
2836
|
}
|
|
2773
2837
|
};
|
|
2774
2838
|
function onActionSelect(action) {
|
|
2775
|
-
var _action$state, _applicationDetails$
|
|
2776
|
-
console.log("action
|
|
2777
|
-
const ndcDetails = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
2839
|
+
var _action$state, _applicationDetails$A8, _applicationDetails$A9, _action$state2, _action$state2$action, _filterNexState$, _filterRoles$, _displayData$applican;
|
|
2840
|
+
console.log("action====||?", action === null || action === void 0 ? void 0 : (_action$state = action.state) === null || _action$state === void 0 ? void 0 : _action$state.actions);
|
|
2841
|
+
const ndcDetails = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A8 = applicationDetails.Applications) === null || _applicationDetails$A8 === void 0 ? void 0 : (_applicationDetails$A9 = _applicationDetails$A8[0]) === null || _applicationDetails$A9 === void 0 ? void 0 : _applicationDetails$A9.NdcDetails) || [];
|
|
2778
2842
|
const hasDuePending = ndcDetails === null || ndcDetails === void 0 ? void 0 : ndcDetails.some(item => item.isDuePending === true);
|
|
2779
2843
|
console.log("hasDuePending", hasDuePending);
|
|
2780
2844
|
const filterNexState = action === null || action === void 0 ? void 0 : (_action$state2 = action.state) === null || _action$state2 === void 0 ? void 0 : (_action$state2$action = _action$state2.actions) === null || _action$state2$action === void 0 ? void 0 : _action$state2$action.filter(item => item.action == (action === null || action === void 0 ? void 0 : action.action));
|
|
2781
|
-
console.log("filterNexState
|
|
2845
|
+
console.log("filterNexState====||?", (_filterNexState$ = filterNexState[0]) === null || _filterNexState$ === void 0 ? void 0 : _filterNexState$.nextState);
|
|
2782
2846
|
const filterRoles = getWorkflowService === null || getWorkflowService === void 0 ? void 0 : getWorkflowService.filter(item => {
|
|
2783
2847
|
var _filterNexState$2;
|
|
2784
2848
|
return (item === null || item === void 0 ? void 0 : item.uuid) == ((_filterNexState$2 = filterNexState[0]) === null || _filterNexState$2 === void 0 ? void 0 : _filterNexState$2.nextState);
|
|
2785
2849
|
});
|
|
2786
|
-
console.log("filterRoles
|
|
2850
|
+
console.log("filterRoles====||?", filterRoles);
|
|
2787
2851
|
console.log("action test", action === null || action === void 0 ? void 0 : action.action);
|
|
2788
2852
|
const checkactionApp = (action === null || action === void 0 ? void 0 : action.action) == "APPROVE";
|
|
2789
2853
|
console.log("filterRoles && checkactionApp", filterRoles && checkactionApp, checkactionApp, filterRoles);
|
|
@@ -2819,7 +2883,7 @@ const ApplicationOverview = () => {
|
|
|
2819
2883
|
const isPending = markedPending[detail.consumerCode];
|
|
2820
2884
|
return {
|
|
2821
2885
|
...detail,
|
|
2822
|
-
isDuePending: isPending
|
|
2886
|
+
isDuePending: isPending || detail.isDuePending || false,
|
|
2823
2887
|
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
|
|
2824
2888
|
};
|
|
2825
2889
|
}),
|
|
@@ -2875,10 +2939,11 @@ const ApplicationOverview = () => {
|
|
|
2875
2939
|
};
|
|
2876
2940
|
useEffect(() => {
|
|
2877
2941
|
if (workflowDetails) {
|
|
2878
|
-
var _workflowDetails$data9, _workflowDetails$data0, _approveInstance$assi;
|
|
2879
|
-
|
|
2880
|
-
const approveInstance = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data9 = workflowDetails.data) === null || _workflowDetails$data9 === void 0 ? void 0 : (_workflowDetails$data0 = _workflowDetails$data9.processInstances) === null || _workflowDetails$data0 === void 0 ? void 0 : _workflowDetails$data0.find(pi => (pi === null || pi === void 0 ? void 0 : pi.action) === "APPROVE");
|
|
2942
|
+
var _workflowDetails$data9, _workflowDetails$data0, _approveInstance$assi, _applicationDetails$A0, _applicationDetails$A1;
|
|
2943
|
+
const approveInstance = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data9 = workflowDetails.data) === null || _workflowDetails$data9 === void 0 ? void 0 : (_workflowDetails$data0 = _workflowDetails$data9.processInstances) === null || _workflowDetails$data0 === void 0 ? void 0 : _workflowDetails$data0.find(pi => (pi === null || pi === void 0 ? void 0 : pi.action) === "APPROVE" || (pi === null || pi === void 0 ? void 0 : pi.action) === "REJECT");
|
|
2881
2944
|
const name = (approveInstance === null || approveInstance === void 0 ? void 0 : (_approveInstance$assi = approveInstance.assigner) === null || _approveInstance$assi === void 0 ? void 0 : _approveInstance$assi.name) || "NA";
|
|
2945
|
+
const status = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A0 = applicationDetails.Applications) === null || _applicationDetails$A0 === void 0 ? void 0 : (_applicationDetails$A1 = _applicationDetails$A0[0]) === null || _applicationDetails$A1 === void 0 ? void 0 : _applicationDetails$A1.applicationStatus;
|
|
2946
|
+
setApproverStatement(status ? `${t(status)} By` : "");
|
|
2882
2947
|
setApprover(name);
|
|
2883
2948
|
}
|
|
2884
2949
|
}, [workflowDetails]);
|
|
@@ -2913,7 +2978,7 @@ const ApplicationOverview = () => {
|
|
|
2913
2978
|
enabled: getPropertyId ? true : false,
|
|
2914
2979
|
privacy: Digit.Utils.getPrivacyObject()
|
|
2915
2980
|
});
|
|
2916
|
-
console.log("applicationDetails", applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
2981
|
+
console.log("applicationDetails", applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A10 = applicationDetails.Applications) === null || _applicationDetails$A10 === void 0 ? void 0 : (_applicationDetails$A11 = _applicationDetails$A10[0]) === null || _applicationDetails$A11 === void 0 ? void 0 : _applicationDetails$A11.NdcDetails);
|
|
2917
2982
|
useEffect(() => {
|
|
2918
2983
|
const handleClickOutside = event => {
|
|
2919
2984
|
if (toastRef.current && !toastRef.current.contains(event.target)) {
|
|
@@ -2933,7 +2998,7 @@ const ApplicationOverview = () => {
|
|
|
2933
2998
|
address = propertyDetailsFetch.Properties[0].address;
|
|
2934
2999
|
formattedAddress = [(_address = address) === null || _address === void 0 ? void 0 : _address.doorNo, (_address2 = address) === null || _address2 === void 0 ? void 0 : _address2.buildingName, (_address3 = address) === null || _address3 === void 0 ? void 0 : _address3.street, (_address4 = address) === null || _address4 === void 0 ? void 0 : (_address4$locality = _address4.locality) === null || _address4$locality === void 0 ? void 0 : _address4$locality.name, (_address5 = address) === null || _address5 === void 0 ? void 0 : _address5.city].filter(Boolean).join(", ");
|
|
2935
3000
|
}
|
|
2936
|
-
if (isLoading || isDetailsLoading) {
|
|
3001
|
+
if (isLoading || isDetailsLoading || recieptDataLoading) {
|
|
2937
3002
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
2938
3003
|
}
|
|
2939
3004
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -2945,16 +3010,19 @@ const ApplicationOverview = () => {
|
|
|
2945
3010
|
alignItems: "center",
|
|
2946
3011
|
padding: "16px"
|
|
2947
3012
|
}
|
|
2948
|
-
}, isCemp &&
|
|
2949
|
-
className: "
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
3013
|
+
}, isCemp && /*#__PURE__*/React.createElement("div", {
|
|
3014
|
+
className: "cardHeaderWithOptions ral-app-details-header"
|
|
3015
|
+
}, getLoader && /*#__PURE__*/React.createElement(Loader, null), dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React.createElement(MultiLink, {
|
|
3016
|
+
className: "multilinkWrapper",
|
|
3017
|
+
onHeadClick: () => setShowOptions(!showOptions),
|
|
3018
|
+
displayOptions: showOptions,
|
|
3019
|
+
options: dowloadOptions
|
|
3020
|
+
}))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("NDC_APPLICATION_DETAILS_OVERVIEW")), /*#__PURE__*/React.createElement(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(([key, value]) => /*#__PURE__*/React.createElement(Row, {
|
|
2953
3021
|
key: key,
|
|
2954
3022
|
label: t(`${key === null || key === void 0 ? void 0 : key.toUpperCase()}`),
|
|
2955
3023
|
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")
|
|
2956
3024
|
}))))), /*#__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) => {
|
|
2957
|
-
var _applicationDetails$
|
|
3025
|
+
var _applicationDetails$A12, _applicationDetails$A13, _applicationDetails$A14, _applicationDetails$A15, _applicationDetails$A16, _applicationDetails$A17, _applicationDetails$A18, _applicationDetails$A19, _applicationDetails$A20, _propertyDetailsFetch4, _propertyDetailsFetch5, _propertyDetailsFetch6, _propertyDetailsFetch7, _propertyDetailsFetch8, _propertyDetailsFetch9, _propertyDetailsFetch0, _propertyDetailsFetch1, _propertyDetailsFetch10, _propertyDetailsFetch11, _propertyDetailsFetch12, _propertyDetailsFetch13, _propertyDetailsFetch14, _propertyDetailsFetch15, _propertyDetailsFetch16, _propertyDetailsFetch17, _propertyDetailsFetch18, _propertyDetailsFetch19, _propertyDetailsFetch20, _propertyDetailsFetch21, _applicationDetails$A21, _applicationDetails$A22, _applicationDetails$A23, _applicationDetails$A24, _applicationDetails$A25;
|
|
2958
3026
|
const isPT = (detail === null || detail === void 0 ? void 0 : detail.businessService) === "NDC_PROPERTY_TAX";
|
|
2959
3027
|
const isSW = (detail === null || detail === void 0 ? void 0 : detail.businessService) === "NDC_SEWERAGE_SERVICE_CONNECTION";
|
|
2960
3028
|
const isWS = (detail === null || detail === void 0 ? void 0 : detail.businessService) === "NDC_WATER_SERVICE_CONNECTION";
|
|
@@ -2982,14 +3050,14 @@ const ApplicationOverview = () => {
|
|
|
2982
3050
|
backgroundColor: isRed ? "red" : "none"
|
|
2983
3051
|
},
|
|
2984
3052
|
label: t("NDC_DUE_AMOUNT"),
|
|
2985
|
-
text: (markedPending[detail.consumerCode] === false ? "0" : (amounts === null || amounts === void 0 ? void 0 : amounts[detail.consumerCode])
|
|
3053
|
+
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()
|
|
2986
3054
|
})), canRaiseFlag && isMarked && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
|
|
2987
3055
|
label: "Due Amount",
|
|
2988
3056
|
text: /*#__PURE__*/React.createElement(Controller, {
|
|
2989
3057
|
key: index,
|
|
2990
3058
|
control: control,
|
|
2991
3059
|
name: `amount[${index}]`,
|
|
2992
|
-
defaultValue: markedPending[detail.consumerCode] === false ? 0 : (amounts === null || amounts === void 0 ? void 0 : amounts[detail.consumerCode])
|
|
3060
|
+
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,
|
|
2993
3061
|
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
2994
3062
|
type: "number",
|
|
2995
3063
|
value: props.value,
|
|
@@ -3013,7 +3081,7 @@ const ApplicationOverview = () => {
|
|
|
3013
3081
|
text: t(detail.propertyType) || detail.propertyType
|
|
3014
3082
|
}), isPT && (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : propertyDetailsFetch.Properties) && /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Row, {
|
|
3015
3083
|
label: t("CHB_DISCOUNT_REASON"),
|
|
3016
|
-
text: t(`${(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
3084
|
+
text: t(`${(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A12 = applicationDetails.Applications) === null || _applicationDetails$A12 === void 0 ? void 0 : (_applicationDetails$A13 = _applicationDetails$A12[0]) === null || _applicationDetails$A13 === void 0 ? void 0 : _applicationDetails$A13.reason) == "OTHERS" ? applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A14 = applicationDetails.Applications) === null || _applicationDetails$A14 === void 0 ? void 0 : (_applicationDetails$A15 = _applicationDetails$A14[0]) === null || _applicationDetails$A15 === void 0 ? void 0 : (_applicationDetails$A16 = _applicationDetails$A15.NdcDetails) === null || _applicationDetails$A16 === void 0 ? void 0 : (_applicationDetails$A17 = _applicationDetails$A16.find(item => (item === null || item === void 0 ? void 0 : item.businessService) === "PT")) === null || _applicationDetails$A17 === void 0 ? void 0 : (_applicationDetails$A18 = _applicationDetails$A17.additionalDetails) === null || _applicationDetails$A18 === void 0 ? void 0 : _applicationDetails$A18.reason : applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A19 = applicationDetails.Applications) === null || _applicationDetails$A19 === void 0 ? void 0 : (_applicationDetails$A20 = _applicationDetails$A19[0]) === null || _applicationDetails$A20 === void 0 ? void 0 : _applicationDetails$A20.reason}`)
|
|
3017
3085
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
3018
3086
|
label: t("City"),
|
|
3019
3087
|
text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch4 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch4 === void 0 ? void 0 : (_propertyDetailsFetch5 = _propertyDetailsFetch4[0]) === null || _propertyDetailsFetch5 === void 0 ? void 0 : (_propertyDetailsFetch6 = _propertyDetailsFetch5.address) === null || _propertyDetailsFetch6 === void 0 ? void 0 : _propertyDetailsFetch6.city
|
|
@@ -3037,7 +3105,7 @@ const ApplicationOverview = () => {
|
|
|
3037
3105
|
text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch19 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch19 === void 0 ? void 0 : (_propertyDetailsFetch20 = _propertyDetailsFetch19[0]) === null || _propertyDetailsFetch20 === void 0 ? void 0 : (_propertyDetailsFetch21 = _propertyDetailsFetch20.additionalDetails) === null || _propertyDetailsFetch21 === void 0 ? void 0 : _propertyDetailsFetch21.yearConstruction
|
|
3038
3106
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
3039
3107
|
label: t("Remarks"),
|
|
3040
|
-
text: (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
3108
|
+
text: (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A21 = applicationDetails.Applications) === null || _applicationDetails$A21 === void 0 ? void 0 : (_applicationDetails$A22 = _applicationDetails$A21[0]) === null || _applicationDetails$A22 === void 0 ? void 0 : (_applicationDetails$A23 = _applicationDetails$A22.NdcDetails) === null || _applicationDetails$A23 === void 0 ? void 0 : (_applicationDetails$A24 = _applicationDetails$A23.find(item => (item === null || item === void 0 ? void 0 : item.businessService) === "PT")) === null || _applicationDetails$A24 === void 0 ? void 0 : (_applicationDetails$A25 = _applicationDetails$A24.additionalDetails) === null || _applicationDetails$A25 === void 0 ? void 0 : _applicationDetails$A25.remarks) || "N/A"
|
|
3041
3109
|
}))), canRaiseFlag && /*#__PURE__*/React.createElement("div", {
|
|
3042
3110
|
className: "mychallan-custom"
|
|
3043
3111
|
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
@@ -3065,7 +3133,7 @@ const ApplicationOverview = () => {
|
|
|
3065
3133
|
}) : /*#__PURE__*/React.createElement("div", null, t("TL_NO_DOCUMENTS_MSG")))), /*#__PURE__*/React.createElement(NewApplicationTimeline, {
|
|
3066
3134
|
workflowDetails: workflowDetails,
|
|
3067
3135
|
t: t
|
|
3068
|
-
}), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
3136
|
+
}), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A26 = applicationDetails.Applications) === null || _applicationDetails$A26 === void 0 ? void 0 : (_applicationDetails$A27 = _applicationDetails$A26[0]) === null || _applicationDetails$A27 === void 0 ? void 0 : _applicationDetails$A27.applicationStatus) !== "INITIATED" && (actions === null || actions === void 0 ? void 0 : actions.length) > 0 && /*#__PURE__*/React.createElement(ActionBar, null, displayMenu && (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data1 = workflowDetails.data) !== null && _workflowDetails$data1 !== void 0 && (_workflowDetails$data10 = _workflowDetails$data1.actionState) !== null && _workflowDetails$data10 !== void 0 && _workflowDetails$data10.nextActions || workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data11 = workflowDetails.data) !== null && _workflowDetails$data11 !== void 0 && _workflowDetails$data11.nextActions) ? /*#__PURE__*/React.createElement(Menu, {
|
|
3069
3137
|
localeKeyPrefix: `WF_EDITRENEWAL`,
|
|
3070
3138
|
options: actions,
|
|
3071
3139
|
optionKey: "action",
|
|
@@ -3075,11 +3143,11 @@ const ApplicationOverview = () => {
|
|
|
3075
3143
|
ref: menuRef,
|
|
3076
3144
|
label: t("WF_TAKE_ACTION"),
|
|
3077
3145
|
onSubmit: () => setDisplayMenu(!displayMenu)
|
|
3078
|
-
})), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
3146
|
+
})), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A28 = applicationDetails.Applications) === null || _applicationDetails$A28 === void 0 ? void 0 : (_applicationDetails$A29 = _applicationDetails$A28[0]) === null || _applicationDetails$A29 === void 0 ? void 0 : _applicationDetails$A29.applicationStatus) == "INITIATED" && /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar$1, {
|
|
3079
3147
|
label: t("COMMON_EDIT"),
|
|
3080
3148
|
onSubmit: () => {
|
|
3081
|
-
var _applicationDetails$
|
|
3082
|
-
const id = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
3149
|
+
var _applicationDetails$A30, _applicationDetails$A31;
|
|
3150
|
+
const id = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A30 = applicationDetails.Applications) === null || _applicationDetails$A30 === void 0 ? void 0 : (_applicationDetails$A31 = _applicationDetails$A30[0]) === null || _applicationDetails$A31 === void 0 ? void 0 : _applicationDetails$A31.applicationNo;
|
|
3083
3151
|
history.push(`/digit-ui/employee/ndc/create/${id}`);
|
|
3084
3152
|
}
|
|
3085
3153
|
})), showModal ? /*#__PURE__*/React.createElement(NDCModal, {
|
|
@@ -10422,7 +10490,7 @@ var lodash = createCommonjsModule(function (module, exports) {
|
|
|
10422
10490
|
});
|
|
10423
10491
|
|
|
10424
10492
|
const CitizenApplicationOverview = () => {
|
|
10425
|
-
var _user, _user$info, _user$info$roles, _propertyDetailsFetch3, _propertyDetailsFetch4, _propertyDetailsFetch5, _ownerForName$map, _ownerForName$map$fil, _applicationDetails$
|
|
10493
|
+
var _applicationDetails$A4, _applicationDetails$A5, _applicationDetails$A6, _applicationDetails$A7, _user, _user$info, _user$info$roles, _propertyDetailsFetch3, _propertyDetailsFetch4, _propertyDetailsFetch5, _ownerForName$map, _ownerForName$map$fil, _applicationDetails$A0, _applicationDetails$A1, _applicationDetails$A10, _applicationDetails$A11, _applicationDetails$A12, _Object$entries, _Object$entries$filte, _displayData$NdcDetai2, _displayData$Document;
|
|
10426
10494
|
const {
|
|
10427
10495
|
id
|
|
10428
10496
|
} = useParams();
|
|
@@ -10435,6 +10503,8 @@ const CitizenApplicationOverview = () => {
|
|
|
10435
10503
|
const [appDetails, setAppDetails] = useState({});
|
|
10436
10504
|
const [showToast, setShowToast] = useState(null);
|
|
10437
10505
|
const [approver, setApprover] = useState(null);
|
|
10506
|
+
const [approverStatement, setApproverStatement] = useState(null);
|
|
10507
|
+
const [showOptions, setShowOptions] = useState(false);
|
|
10438
10508
|
const [ndcDatils, setNdcDetails] = useState([]);
|
|
10439
10509
|
const [displayData, setDisplayData] = useState({});
|
|
10440
10510
|
const [getLoader, setLoader] = useState(false);
|
|
@@ -10457,10 +10527,11 @@ const CitizenApplicationOverview = () => {
|
|
|
10457
10527
|
});
|
|
10458
10528
|
useEffect(() => {
|
|
10459
10529
|
if (workflowDetails) {
|
|
10460
|
-
var _workflowDetails$data, _workflowDetails$data2, _approveInstance$assi;
|
|
10461
|
-
|
|
10462
|
-
const approveInstance = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : (_workflowDetails$data2 = _workflowDetails$data.processInstances) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.find(pi => (pi === null || pi === void 0 ? void 0 : pi.action) === "APPROVE");
|
|
10530
|
+
var _workflowDetails$data, _workflowDetails$data2, _approveInstance$assi, _applicationDetails$A, _applicationDetails$A2;
|
|
10531
|
+
const approveInstance = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : (_workflowDetails$data2 = _workflowDetails$data.processInstances) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.find(pi => (pi === null || pi === void 0 ? void 0 : pi.action) === "APPROVE" || (pi === null || pi === void 0 ? void 0 : pi.action) === "REJECT");
|
|
10463
10532
|
const name = (approveInstance === null || approveInstance === void 0 ? void 0 : (_approveInstance$assi = approveInstance.assigner) === null || _approveInstance$assi === void 0 ? void 0 : _approveInstance$assi.name) || "NA";
|
|
10533
|
+
const status = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : (_applicationDetails$A2 = _applicationDetails$A[0]) === null || _applicationDetails$A2 === void 0 ? void 0 : _applicationDetails$A2.applicationStatus;
|
|
10534
|
+
setApproverStatement(status ? `${t(status)} By` : "");
|
|
10464
10535
|
setApprover(name);
|
|
10465
10536
|
}
|
|
10466
10537
|
}, [workflowDetails]);
|
|
@@ -10480,6 +10551,68 @@ const CitizenApplicationOverview = () => {
|
|
|
10480
10551
|
const userInfo = userInfos ? JSON.parse(userInfos) : {};
|
|
10481
10552
|
user = userInfo === null || userInfo === void 0 ? void 0 : userInfo.value;
|
|
10482
10553
|
}
|
|
10554
|
+
const {
|
|
10555
|
+
data: reciept_data,
|
|
10556
|
+
isLoading: recieptDataLoading
|
|
10557
|
+
} = Digit.Hooks.useRecieptSearch({
|
|
10558
|
+
tenantId: tenantId,
|
|
10559
|
+
businessService: "NDC",
|
|
10560
|
+
consumerCodes: id,
|
|
10561
|
+
isEmployee: false
|
|
10562
|
+
}, {
|
|
10563
|
+
enabled: id ? true : false
|
|
10564
|
+
});
|
|
10565
|
+
async function getRecieptSearch({
|
|
10566
|
+
tenantId,
|
|
10567
|
+
payments,
|
|
10568
|
+
...params
|
|
10569
|
+
}) {
|
|
10570
|
+
setLoader(true);
|
|
10571
|
+
try {
|
|
10572
|
+
var _applicationDetails$A3, _response;
|
|
10573
|
+
let response = null;
|
|
10574
|
+
let application = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A3 = applicationDetails.Applications) === null || _applicationDetails$A3 === void 0 ? void 0 : _applicationDetails$A3[0];
|
|
10575
|
+
if (payments !== null && payments !== void 0 && payments.fileStoreId) {
|
|
10576
|
+
response = {
|
|
10577
|
+
filestoreIds: [payments === null || payments === void 0 ? void 0 : payments.fileStoreId]
|
|
10578
|
+
};
|
|
10579
|
+
} else {
|
|
10580
|
+
response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
10581
|
+
Payments: [{
|
|
10582
|
+
...(payments || {}),
|
|
10583
|
+
...application
|
|
10584
|
+
}]
|
|
10585
|
+
}, "ndc-receipt");
|
|
10586
|
+
}
|
|
10587
|
+
const fileStore = await Digit.PaymentService.printReciept(tenantId, {
|
|
10588
|
+
fileStoreIds: response.filestoreIds[0]
|
|
10589
|
+
});
|
|
10590
|
+
window.open(fileStore[(_response = response) === null || _response === void 0 ? void 0 : _response.filestoreIds[0]], "_blank");
|
|
10591
|
+
setLoader(false);
|
|
10592
|
+
} catch (error) {
|
|
10593
|
+
console.error(error);
|
|
10594
|
+
setLoader(false);
|
|
10595
|
+
}
|
|
10596
|
+
}
|
|
10597
|
+
const dowloadOptions = [];
|
|
10598
|
+
if ((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A4 = applicationDetails.Applications) === null || _applicationDetails$A4 === void 0 ? void 0 : (_applicationDetails$A5 = _applicationDetails$A4[0]) === null || _applicationDetails$A5 === void 0 ? void 0 : _applicationDetails$A5.applicationStatus) === "APPROVED" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A6 = applicationDetails.Applications) === null || _applicationDetails$A6 === void 0 ? void 0 : (_applicationDetails$A7 = _applicationDetails$A6[0]) === null || _applicationDetails$A7 === void 0 ? void 0 : _applicationDetails$A7.applicationStatus) === "REJECTED") {
|
|
10599
|
+
dowloadOptions.push({
|
|
10600
|
+
label: t("DOWNLOAD_CERTIFICATE"),
|
|
10601
|
+
onClick: () => handleDownloadPdf()
|
|
10602
|
+
});
|
|
10603
|
+
}
|
|
10604
|
+
if (reciept_data && (reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments.length) > 0 && !recieptDataLoading) {
|
|
10605
|
+
dowloadOptions.push({
|
|
10606
|
+
label: t("PTR_FEE_RECIEPT"),
|
|
10607
|
+
onClick: () => {
|
|
10608
|
+
var _reciept_data$Payment;
|
|
10609
|
+
return getRecieptSearch({
|
|
10610
|
+
tenantId: reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment = reciept_data.Payments[0]) === null || _reciept_data$Payment === void 0 ? void 0 : _reciept_data$Payment.tenantId,
|
|
10611
|
+
payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0]
|
|
10612
|
+
});
|
|
10613
|
+
}
|
|
10614
|
+
});
|
|
10615
|
+
}
|
|
10483
10616
|
const userRoles = (_user = 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);
|
|
10484
10617
|
const removeDuplicatesByUUID = arr => {
|
|
10485
10618
|
const seen = new Set();
|
|
@@ -10493,8 +10626,8 @@ const CitizenApplicationOverview = () => {
|
|
|
10493
10626
|
});
|
|
10494
10627
|
};
|
|
10495
10628
|
useEffect(() => {
|
|
10496
|
-
var _applicationDetails$
|
|
10497
|
-
const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
10629
|
+
var _applicationDetails$A8;
|
|
10630
|
+
const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A8 = applicationDetails.Applications) === null || _applicationDetails$A8 === void 0 ? void 0 : _applicationDetails$A8[0];
|
|
10498
10631
|
console.log("ndcObject", ndcObject);
|
|
10499
10632
|
if (ndcObject) {
|
|
10500
10633
|
var _ndcObject$owners, _ndcObject$owners2, _removeDuplicatesByUU;
|
|
@@ -10553,7 +10686,7 @@ const CitizenApplicationOverview = () => {
|
|
|
10553
10686
|
const ulbType = tenantInfo === null || tenantInfo === void 0 ? void 0 : (_tenantInfo$city = tenantInfo.city) === null || _tenantInfo$city === void 0 ? void 0 : _tenantInfo$city.ulbType;
|
|
10554
10687
|
let acknowledgementData;
|
|
10555
10688
|
if (empData) {
|
|
10556
|
-
acknowledgementData = await getAcknowledgementData(Property, formattedAddress, tenantInfo, t, approver, ulbType, empData);
|
|
10689
|
+
acknowledgementData = await getAcknowledgementData(Property, formattedAddress, tenantInfo, t, approver, ulbType, empData, approverStatement);
|
|
10557
10690
|
}
|
|
10558
10691
|
console.log("acknowledgementData", acknowledgementData);
|
|
10559
10692
|
setTimeout(() => {
|
|
@@ -10599,14 +10732,14 @@ const CitizenApplicationOverview = () => {
|
|
|
10599
10732
|
address = propertyDetailsFetch.Properties[0].address;
|
|
10600
10733
|
formattedAddress = [(_address = address) === null || _address === void 0 ? void 0 : _address.doorNo, (_address2 = address) === null || _address2 === void 0 ? void 0 : _address2.buildingName, (_address3 = address) === null || _address3 === void 0 ? void 0 : _address3.street, (_address4 = address) === null || _address4 === void 0 ? void 0 : (_address4$locality = _address4.locality) === null || _address4$locality === void 0 ? void 0 : _address4$locality.name, (_address5 = address) === null || _address5 === void 0 ? void 0 : _address5.city].filter(Boolean).join(", ");
|
|
10601
10734
|
}
|
|
10602
|
-
if (isLoading || isDetailsLoading) {
|
|
10735
|
+
if (isLoading || isDetailsLoading || recieptDataLoading) {
|
|
10603
10736
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
10604
10737
|
}
|
|
10605
10738
|
console.log("propertyDetailsFetch", propertyDetailsFetch);
|
|
10606
10739
|
console.log("displayData?.applicantData", displayData);
|
|
10607
10740
|
const ownerForName = (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch4 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch4 === void 0 ? void 0 : (_propertyDetailsFetch5 = _propertyDetailsFetch4[0]) === null || _propertyDetailsFetch5 === void 0 ? void 0 : _propertyDetailsFetch5.owners) || [];
|
|
10608
10741
|
const ownerNames = ownerForName === null || ownerForName === void 0 ? void 0 : (_ownerForName$map = ownerForName.map(owner => owner === null || owner === void 0 ? void 0 : owner.name)) === null || _ownerForName$map === void 0 ? void 0 : (_ownerForName$map$fil = _ownerForName$map.filter(Boolean)) === null || _ownerForName$map$fil === void 0 ? void 0 : _ownerForName$map$fil.join(", ");
|
|
10609
|
-
console.log("applicationDetails?.[0]", applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
10742
|
+
console.log("applicationDetails?.[0]", applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A0 = applicationDetails.Applications) === null || _applicationDetails$A0 === void 0 ? void 0 : _applicationDetails$A0[0]);
|
|
10610
10743
|
return /*#__PURE__*/React.createElement("div", {
|
|
10611
10744
|
className: "employee-main-application-details"
|
|
10612
10745
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -10618,15 +10751,18 @@ const CitizenApplicationOverview = () => {
|
|
|
10618
10751
|
alignItems: "center",
|
|
10619
10752
|
padding: "16px"
|
|
10620
10753
|
}
|
|
10621
|
-
},
|
|
10622
|
-
className: "
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
|
|
10754
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
10755
|
+
className: "cardHeaderWithOptions ral-app-details-header"
|
|
10756
|
+
}, getLoader && /*#__PURE__*/React.createElement(Loader, null), dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React.createElement(MultiLink, {
|
|
10757
|
+
className: "multilinkWrapper",
|
|
10758
|
+
onHeadClick: () => setShowOptions(!showOptions),
|
|
10759
|
+
displayOptions: showOptions,
|
|
10760
|
+
options: dowloadOptions
|
|
10761
|
+
}))), ((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A1 = applicationDetails.Applications) === null || _applicationDetails$A1 === void 0 ? void 0 : (_applicationDetails$A10 = _applicationDetails$A1[0]) === null || _applicationDetails$A10 === void 0 ? void 0 : _applicationDetails$A10.applicationStatus) == "INITIATED" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A11 = applicationDetails.Applications) === null || _applicationDetails$A11 === void 0 ? void 0 : (_applicationDetails$A12 = _applicationDetails$A11[0]) === null || _applicationDetails$A12 === void 0 ? void 0 : _applicationDetails$A12.applicationStatus) == "CITIZENACTIONREQUIRED") && /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar$1, {
|
|
10626
10762
|
label: t("COMMON_EDIT"),
|
|
10627
10763
|
onSubmit: () => {
|
|
10628
|
-
var _applicationDetails$
|
|
10629
|
-
const id = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
10764
|
+
var _applicationDetails$A13, _applicationDetails$A14;
|
|
10765
|
+
const id = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A13 = applicationDetails.Applications) === null || _applicationDetails$A13 === void 0 ? void 0 : (_applicationDetails$A14 = _applicationDetails$A13[0]) === null || _applicationDetails$A14 === void 0 ? void 0 : _applicationDetails$A14.applicationNo;
|
|
10630
10766
|
history.push(`/digit-ui/citizen/ndc/new-application/${id}`);
|
|
10631
10767
|
}
|
|
10632
10768
|
}))), /*#__PURE__*/React.createElement(Card, {
|
|
@@ -10645,7 +10781,7 @@ const CitizenApplicationOverview = () => {
|
|
|
10645
10781
|
}, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
10646
10782
|
className: "ndc_label"
|
|
10647
10783
|
}, 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) => {
|
|
10648
|
-
var _detail$dueAmount, _applicationDetails$
|
|
10784
|
+
var _detail$dueAmount, _applicationDetails$A15, _applicationDetails$A16, _applicationDetails$A17, _applicationDetails$A18, _applicationDetails$A19, _applicationDetails$A20, _applicationDetails$A21, _applicationDetails$A22, _applicationDetails$A23, _propertyDetailsFetch6, _propertyDetailsFetch7, _propertyDetailsFetch8, _propertyDetailsFetch9, _propertyDetailsFetch0, _propertyDetailsFetch1, _propertyDetailsFetch10, _propertyDetailsFetch11, _propertyDetailsFetch12, _propertyDetailsFetch13, _propertyDetailsFetch14, _propertyDetailsFetch15, _propertyDetailsFetch16, _propertyDetailsFetch17, _propertyDetailsFetch18, _propertyDetailsFetch19, _propertyDetailsFetch20, _propertyDetailsFetch21, _propertyDetailsFetch22, _propertyDetailsFetch23, _applicationDetails$A24, _applicationDetails$A25, _applicationDetails$A26, _applicationDetails$A27, _applicationDetails$A28;
|
|
10649
10785
|
console.log("detail", detail);
|
|
10650
10786
|
const isRed = detail.dueAmount > 0;
|
|
10651
10787
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -10675,7 +10811,7 @@ const CitizenApplicationOverview = () => {
|
|
|
10675
10811
|
text: t(detail.propertyType) || detail.propertyType
|
|
10676
10812
|
}), (detail === null || detail === void 0 ? void 0 : detail.businessService) == "NDC_PROPERTY_TAX" && (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : propertyDetailsFetch.Properties) && /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Row, {
|
|
10677
10813
|
label: t("CHB_DISCOUNT_REASON"),
|
|
10678
|
-
text: t(`${(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
10814
|
+
text: t(`${(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A15 = applicationDetails.Applications) === null || _applicationDetails$A15 === void 0 ? void 0 : (_applicationDetails$A16 = _applicationDetails$A15[0]) === null || _applicationDetails$A16 === void 0 ? void 0 : _applicationDetails$A16.reason) === "OTHERS" ? applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A17 = applicationDetails.Applications) === null || _applicationDetails$A17 === void 0 ? void 0 : (_applicationDetails$A18 = _applicationDetails$A17[0]) === null || _applicationDetails$A18 === void 0 ? void 0 : (_applicationDetails$A19 = _applicationDetails$A18.NdcDetails) === null || _applicationDetails$A19 === void 0 ? void 0 : (_applicationDetails$A20 = _applicationDetails$A19.find(item => (item === null || item === void 0 ? void 0 : item.businessService) === "PT")) === null || _applicationDetails$A20 === void 0 ? void 0 : (_applicationDetails$A21 = _applicationDetails$A20.additionalDetails) === null || _applicationDetails$A21 === void 0 ? void 0 : _applicationDetails$A21.reason : applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A22 = applicationDetails.Applications) === null || _applicationDetails$A22 === void 0 ? void 0 : (_applicationDetails$A23 = _applicationDetails$A22[0]) === null || _applicationDetails$A23 === void 0 ? void 0 : _applicationDetails$A23.reason}`)
|
|
10679
10815
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
10680
10816
|
label: t("City"),
|
|
10681
10817
|
text: (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch6 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch6 === void 0 ? void 0 : (_propertyDetailsFetch7 = _propertyDetailsFetch6[0]) === null || _propertyDetailsFetch7 === void 0 ? void 0 : (_propertyDetailsFetch8 = _propertyDetailsFetch7.address) === null || _propertyDetailsFetch8 === void 0 ? void 0 : _propertyDetailsFetch8.city) || "N/A"
|
|
@@ -10699,7 +10835,7 @@ const CitizenApplicationOverview = () => {
|
|
|
10699
10835
|
text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch21 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch21 === void 0 ? void 0 : (_propertyDetailsFetch22 = _propertyDetailsFetch21[0]) === null || _propertyDetailsFetch22 === void 0 ? void 0 : (_propertyDetailsFetch23 = _propertyDetailsFetch22.additionalDetails) === null || _propertyDetailsFetch23 === void 0 ? void 0 : _propertyDetailsFetch23.yearConstruction
|
|
10700
10836
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
10701
10837
|
label: t("Remarks"),
|
|
10702
|
-
text: (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
10838
|
+
text: (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A24 = applicationDetails.Applications) === null || _applicationDetails$A24 === void 0 ? void 0 : (_applicationDetails$A25 = _applicationDetails$A24[0]) === null || _applicationDetails$A25 === void 0 ? void 0 : (_applicationDetails$A26 = _applicationDetails$A25.NdcDetails) === null || _applicationDetails$A26 === void 0 ? void 0 : (_applicationDetails$A27 = _applicationDetails$A26.find(item => (item === null || item === void 0 ? void 0 : item.businessService) === "PT")) === null || _applicationDetails$A27 === void 0 ? void 0 : (_applicationDetails$A28 = _applicationDetails$A27.additionalDetails) === null || _applicationDetails$A28 === void 0 ? void 0 : _applicationDetails$A28.remarks) || "N/A"
|
|
10703
10839
|
}))));
|
|
10704
10840
|
})), /*#__PURE__*/React.createElement(Card, {
|
|
10705
10841
|
className: "ndc_card_main"
|
|
@@ -12362,28 +12498,26 @@ const NewNDCStepFormOne = ({
|
|
|
12362
12498
|
} else createApplication(data);
|
|
12363
12499
|
}
|
|
12364
12500
|
const createApplication = async data => {
|
|
12365
|
-
var _Digit$UserService$ge, _data$cpt, _data$cpt$details, _ref, _data$PropertyDetails5, _ref2, _data$PropertyDetails7, _data$PropertyDetails9, _data$PropertyDetails0, _data$NDCReason2;
|
|
12501
|
+
var _Digit$UserService$ge, _data$cpt, _data$cpt$details, _data$cpt2, _data$cpt2$details, _ref, _data$PropertyDetails5, _ref2, _data$PropertyDetails7, _data$PropertyDetails9, _data$PropertyDetails0, _data$NDCReason2;
|
|
12366
12502
|
const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
|
|
12367
12503
|
const applicantId = applicant === null || applicant === void 0 ? void 0 : applicant.uuid;
|
|
12368
|
-
|
|
12369
|
-
|
|
12370
|
-
|
|
12371
|
-
|
|
12372
|
-
|
|
12373
|
-
if ((
|
|
12504
|
+
console.log("data?.cpt?.details?.owners", data === null || data === void 0 ? void 0 : (_data$cpt = data.cpt) === null || _data$cpt === void 0 ? void 0 : (_data$cpt$details = _data$cpt.details) === null || _data$cpt$details === void 0 ? void 0 : _data$cpt$details.owners);
|
|
12505
|
+
const owners = ((data === null || data === void 0 ? void 0 : (_data$cpt2 = data.cpt) === null || _data$cpt2 === void 0 ? void 0 : (_data$cpt2$details = _data$cpt2.details) === null || _data$cpt2$details === void 0 ? void 0 : _data$cpt2$details.owners) || []).map(owner => {
|
|
12506
|
+
var _newOwner$name, _newOwner$name$trim, _data$PropertyDetails, _data$PropertyDetails2, _data$PropertyDetails3;
|
|
12507
|
+
const newOwner = JSON.parse(JSON.stringify(owner));
|
|
12508
|
+
delete newOwner.status;
|
|
12509
|
+
if ((newOwner === null || newOwner === void 0 ? void 0 : (_newOwner$name = newOwner.name) === null || _newOwner$name === void 0 ? void 0 : (_newOwner$name$trim = _newOwner$name.trim()) === null || _newOwner$name$trim === void 0 ? void 0 : _newOwner$name$trim.toLowerCase()) === (data === null || data === void 0 ? void 0 : (_data$PropertyDetails = data.PropertyDetails) === null || _data$PropertyDetails === void 0 ? void 0 : (_data$PropertyDetails2 = _data$PropertyDetails.firstName) === null || _data$PropertyDetails2 === void 0 ? void 0 : (_data$PropertyDetails3 = _data$PropertyDetails2.trim()) === null || _data$PropertyDetails3 === void 0 ? void 0 : _data$PropertyDetails3.toLowerCase())) {
|
|
12374
12510
|
var _data$PropertyDetails4;
|
|
12375
|
-
|
|
12376
|
-
|
|
12377
|
-
emailId: data === null || data === void 0 ? void 0 : (_data$PropertyDetails4 = data.PropertyDetails) === null || _data$PropertyDetails4 === void 0 ? void 0 : _data$PropertyDetails4.email,
|
|
12378
|
-
isPrimaryOwner: true
|
|
12379
|
-
};
|
|
12511
|
+
newOwner.emailId = data === null || data === void 0 ? void 0 : (_data$PropertyDetails4 = data.PropertyDetails) === null || _data$PropertyDetails4 === void 0 ? void 0 : _data$PropertyDetails4.email;
|
|
12512
|
+
newOwner.isPrimaryOwner = true;
|
|
12380
12513
|
}
|
|
12381
|
-
return
|
|
12514
|
+
return newOwner;
|
|
12382
12515
|
});
|
|
12516
|
+
console.log("owners??==", owners);
|
|
12383
12517
|
console.log("checkData==", data);
|
|
12384
12518
|
const ndcDetails = [];
|
|
12385
12519
|
(_ref = (data === null || data === void 0 ? void 0 : (_data$PropertyDetails5 = data.PropertyDetails) === null || _data$PropertyDetails5 === void 0 ? void 0 : _data$PropertyDetails5.waterConnection) || []) === null || _ref === void 0 ? void 0 : _ref.forEach(wc => {
|
|
12386
|
-
var _wc$billData, _data$PropertyDetails6, _data$
|
|
12520
|
+
var _wc$billData, _data$PropertyDetails6, _data$cpt3, _data$cpt3$details, _wc$billData2, _wc$billData3;
|
|
12387
12521
|
ndcDetails.push({
|
|
12388
12522
|
uuid: wc === null || wc === void 0 ? void 0 : (_wc$billData = wc.billData) === null || _wc$billData === void 0 ? void 0 : _wc$billData.id,
|
|
12389
12523
|
applicantId: applicantId,
|
|
@@ -12391,14 +12525,14 @@ const NewNDCStepFormOne = ({
|
|
|
12391
12525
|
consumerCode: wc === null || wc === void 0 ? void 0 : wc.connectionNo,
|
|
12392
12526
|
additionalDetails: {
|
|
12393
12527
|
propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails6 = data.PropertyDetails) === null || _data$PropertyDetails6 === void 0 ? void 0 : _data$PropertyDetails6.address,
|
|
12394
|
-
propertyType: data === null || data === void 0 ? void 0 : (_data$
|
|
12528
|
+
propertyType: data === null || data === void 0 ? void 0 : (_data$cpt3 = data.cpt) === null || _data$cpt3 === void 0 ? void 0 : (_data$cpt3$details = _data$cpt3.details) === null || _data$cpt3$details === void 0 ? void 0 : _data$cpt3$details.usageCategory
|
|
12395
12529
|
},
|
|
12396
12530
|
dueAmount: (wc === null || wc === void 0 ? void 0 : (_wc$billData2 = wc.billData) === null || _wc$billData2 === void 0 ? void 0 : _wc$billData2.totalAmount) || 0,
|
|
12397
12531
|
status: wc === null || wc === void 0 ? void 0 : (_wc$billData3 = wc.billData) === null || _wc$billData3 === void 0 ? void 0 : _wc$billData3.status
|
|
12398
12532
|
});
|
|
12399
12533
|
});
|
|
12400
12534
|
(_ref2 = (data === null || data === void 0 ? void 0 : (_data$PropertyDetails7 = data.PropertyDetails) === null || _data$PropertyDetails7 === void 0 ? void 0 : _data$PropertyDetails7.sewerageConnection) || []) === null || _ref2 === void 0 ? void 0 : _ref2.forEach(sc => {
|
|
12401
|
-
var _sc$billData, _data$PropertyDetails8, _data$
|
|
12535
|
+
var _sc$billData, _data$PropertyDetails8, _data$cpt4, _data$cpt4$details, _sc$billData2, _sc$billData3;
|
|
12402
12536
|
ndcDetails.push({
|
|
12403
12537
|
uuid: sc === null || sc === void 0 ? void 0 : (_sc$billData = sc.billData) === null || _sc$billData === void 0 ? void 0 : _sc$billData.id,
|
|
12404
12538
|
applicantId: applicantId,
|
|
@@ -12406,23 +12540,23 @@ const NewNDCStepFormOne = ({
|
|
|
12406
12540
|
consumerCode: sc === null || sc === void 0 ? void 0 : sc.connectionNo,
|
|
12407
12541
|
additionalDetails: {
|
|
12408
12542
|
propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails8 = data.PropertyDetails) === null || _data$PropertyDetails8 === void 0 ? void 0 : _data$PropertyDetails8.address,
|
|
12409
|
-
propertyType: data === null || data === void 0 ? void 0 : (_data$
|
|
12543
|
+
propertyType: data === null || data === void 0 ? void 0 : (_data$cpt4 = data.cpt) === null || _data$cpt4 === void 0 ? void 0 : (_data$cpt4$details = _data$cpt4.details) === null || _data$cpt4$details === void 0 ? void 0 : _data$cpt4$details.usageCategory
|
|
12410
12544
|
},
|
|
12411
12545
|
dueAmount: (sc === null || sc === void 0 ? void 0 : (_sc$billData2 = sc.billData) === null || _sc$billData2 === void 0 ? void 0 : _sc$billData2.totalAmount) || 0,
|
|
12412
12546
|
status: sc === null || sc === void 0 ? void 0 : (_sc$billData3 = sc.billData) === null || _sc$billData3 === void 0 ? void 0 : _sc$billData3.status
|
|
12413
12547
|
});
|
|
12414
12548
|
});
|
|
12415
12549
|
if (data !== null && data !== void 0 && (_data$PropertyDetails9 = data.PropertyDetails) !== null && _data$PropertyDetails9 !== void 0 && (_data$PropertyDetails0 = _data$PropertyDetails9.propertyBillData) !== null && _data$PropertyDetails0 !== void 0 && _data$PropertyDetails0.billData) {
|
|
12416
|
-
var _data$PropertyDetails1, _data$PropertyDetails10, _data$
|
|
12550
|
+
var _data$PropertyDetails1, _data$PropertyDetails10, _data$cpt5, _data$PropertyDetails11, _data$cpt6, _data$cpt6$details, _data$NDCReason, _data$PropertyDetails12;
|
|
12417
12551
|
const billData = data === null || data === void 0 ? void 0 : (_data$PropertyDetails1 = data.PropertyDetails) === null || _data$PropertyDetails1 === void 0 ? void 0 : (_data$PropertyDetails10 = _data$PropertyDetails1.propertyBillData) === null || _data$PropertyDetails10 === void 0 ? void 0 : _data$PropertyDetails10.billData;
|
|
12418
12552
|
ndcDetails.push({
|
|
12419
12553
|
uuid: billData === null || billData === void 0 ? void 0 : billData.id,
|
|
12420
12554
|
applicantId: applicantId,
|
|
12421
12555
|
businessService: "PT",
|
|
12422
|
-
consumerCode: data === null || data === void 0 ? void 0 : (_data$
|
|
12556
|
+
consumerCode: data === null || data === void 0 ? void 0 : (_data$cpt5 = data.cpt) === null || _data$cpt5 === void 0 ? void 0 : _data$cpt5.id,
|
|
12423
12557
|
additionalDetails: {
|
|
12424
12558
|
propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails11 = data.PropertyDetails) === null || _data$PropertyDetails11 === void 0 ? void 0 : _data$PropertyDetails11.address,
|
|
12425
|
-
propertyType: data === null || data === void 0 ? void 0 : (_data$
|
|
12559
|
+
propertyType: data === null || data === void 0 ? void 0 : (_data$cpt6 = data.cpt) === null || _data$cpt6 === void 0 ? void 0 : (_data$cpt6$details = _data$cpt6.details) === null || _data$cpt6$details === void 0 ? void 0 : _data$cpt6$details.usageCategory,
|
|
12426
12560
|
reason: data === null || data === void 0 ? void 0 : (_data$NDCReason = data.NDCReason) === null || _data$NDCReason === void 0 ? void 0 : _data$NDCReason.reason,
|
|
12427
12561
|
remarks: data === null || data === void 0 ? void 0 : (_data$PropertyDetails12 = data.PropertyDetails) === null || _data$PropertyDetails12 === void 0 ? void 0 : _data$PropertyDetails12.remarks
|
|
12428
12562
|
},
|
|
@@ -12469,7 +12603,7 @@ const NewNDCStepFormOne = ({
|
|
|
12469
12603
|
}
|
|
12470
12604
|
};
|
|
12471
12605
|
const updateApplication = async data => {
|
|
12472
|
-
var _Digit$UserService$ge2, _checkApiDataCheck$Ap, _checkApiDataCheck$Ap2, _checkFormData$respon3, _checkFormData$respon4, _checkFormData$respon5, _checkFormData$respon6, _checkFormData$respon7, _checkApiDataCheck$Ap3, _checkApiDataCheck$Ap4, _checkFormData$respon8, _checkFormData$respon9, _checkApiDataCheck$Ap5, _checkApiDataCheck$Ap6, _checkFormData$respon0, _checkFormData$respon1, _data$NDCReason3, _data$
|
|
12606
|
+
var _Digit$UserService$ge2, _checkApiDataCheck$Ap, _checkApiDataCheck$Ap2, _checkFormData$respon3, _checkFormData$respon4, _checkFormData$respon5, _checkFormData$respon6, _checkFormData$respon7, _checkApiDataCheck$Ap3, _checkApiDataCheck$Ap4, _checkFormData$respon8, _checkFormData$respon9, _checkApiDataCheck$Ap5, _checkApiDataCheck$Ap6, _checkFormData$respon0, _checkFormData$respon1, _data$NDCReason3, _data$cpt10, _data$cpt10$details, _response$ResponseInf2;
|
|
12473
12607
|
const applicant = ((_Digit$UserService$ge2 = Digit.UserService.getUser()) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.info) || {};
|
|
12474
12608
|
const applicantId = applicant === null || applicant === void 0 ? void 0 : applicant.uuid;
|
|
12475
12609
|
const owners = (checkApiDataCheck === null || checkApiDataCheck === void 0 ? void 0 : (_checkApiDataCheck$Ap = checkApiDataCheck.Applications) === null || _checkApiDataCheck$Ap === void 0 ? void 0 : (_checkApiDataCheck$Ap2 = _checkApiDataCheck$Ap[0]) === null || _checkApiDataCheck$Ap2 === void 0 ? void 0 : _checkApiDataCheck$Ap2.owners) || (checkFormData === null || checkFormData === void 0 ? void 0 : (_checkFormData$respon3 = checkFormData.responseData) === null || _checkFormData$respon3 === void 0 ? void 0 : (_checkFormData$respon4 = _checkFormData$respon3[0]) === null || _checkFormData$respon4 === void 0 ? void 0 : _checkFormData$respon4.owners);
|
|
@@ -12479,7 +12613,7 @@ const NewNDCStepFormOne = ({
|
|
|
12479
12613
|
} else {
|
|
12480
12614
|
var _ref3, _data$PropertyDetails13, _ref4, _data$PropertyDetails15, _data$PropertyDetails17, _data$PropertyDetails18;
|
|
12481
12615
|
(_ref3 = (data === null || data === void 0 ? void 0 : (_data$PropertyDetails13 = data.PropertyDetails) === null || _data$PropertyDetails13 === void 0 ? void 0 : _data$PropertyDetails13.waterConnection) || []) === null || _ref3 === void 0 ? void 0 : _ref3.forEach(wc => {
|
|
12482
|
-
var _wc$billData4, _data$PropertyDetails14, _data$
|
|
12616
|
+
var _wc$billData4, _data$PropertyDetails14, _data$cpt8, _data$cpt8$details, _wc$billData5, _wc$billData6;
|
|
12483
12617
|
ndcDetails.push({
|
|
12484
12618
|
uuid: wc === null || wc === void 0 ? void 0 : (_wc$billData4 = wc.billData) === null || _wc$billData4 === void 0 ? void 0 : _wc$billData4.id,
|
|
12485
12619
|
applicantId: applicantId,
|
|
@@ -12487,14 +12621,14 @@ const NewNDCStepFormOne = ({
|
|
|
12487
12621
|
consumerCode: wc === null || wc === void 0 ? void 0 : wc.connectionNo,
|
|
12488
12622
|
additionalDetails: {
|
|
12489
12623
|
propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails14 = data.PropertyDetails) === null || _data$PropertyDetails14 === void 0 ? void 0 : _data$PropertyDetails14.address,
|
|
12490
|
-
propertyType: data === null || data === void 0 ? void 0 : (_data$
|
|
12624
|
+
propertyType: data === null || data === void 0 ? void 0 : (_data$cpt8 = data.cpt) === null || _data$cpt8 === void 0 ? void 0 : (_data$cpt8$details = _data$cpt8.details) === null || _data$cpt8$details === void 0 ? void 0 : _data$cpt8$details.usageCategory
|
|
12491
12625
|
},
|
|
12492
12626
|
dueAmount: (wc === null || wc === void 0 ? void 0 : (_wc$billData5 = wc.billData) === null || _wc$billData5 === void 0 ? void 0 : _wc$billData5.totalAmount) || 0,
|
|
12493
12627
|
status: wc === null || wc === void 0 ? void 0 : (_wc$billData6 = wc.billData) === null || _wc$billData6 === void 0 ? void 0 : _wc$billData6.status
|
|
12494
12628
|
});
|
|
12495
12629
|
});
|
|
12496
12630
|
(_ref4 = (data === null || data === void 0 ? void 0 : (_data$PropertyDetails15 = data.PropertyDetails) === null || _data$PropertyDetails15 === void 0 ? void 0 : _data$PropertyDetails15.sewerageConnection) || []) === null || _ref4 === void 0 ? void 0 : _ref4.forEach(sc => {
|
|
12497
|
-
var _sc$billData4, _data$PropertyDetails16, _data$
|
|
12631
|
+
var _sc$billData4, _data$PropertyDetails16, _data$cpt9, _data$cpt9$details, _sc$billData5, _sc$billData6;
|
|
12498
12632
|
ndcDetails.push({
|
|
12499
12633
|
uuid: sc === null || sc === void 0 ? void 0 : (_sc$billData4 = sc.billData) === null || _sc$billData4 === void 0 ? void 0 : _sc$billData4.id,
|
|
12500
12634
|
applicantId: applicantId,
|
|
@@ -12502,23 +12636,23 @@ const NewNDCStepFormOne = ({
|
|
|
12502
12636
|
consumerCode: sc === null || sc === void 0 ? void 0 : sc.connectionNo,
|
|
12503
12637
|
additionalDetails: {
|
|
12504
12638
|
propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails16 = data.PropertyDetails) === null || _data$PropertyDetails16 === void 0 ? void 0 : _data$PropertyDetails16.address,
|
|
12505
|
-
propertyType: data === null || data === void 0 ? void 0 : (_data$
|
|
12639
|
+
propertyType: data === null || data === void 0 ? void 0 : (_data$cpt9 = data.cpt) === null || _data$cpt9 === void 0 ? void 0 : (_data$cpt9$details = _data$cpt9.details) === null || _data$cpt9$details === void 0 ? void 0 : _data$cpt9$details.usageCategory
|
|
12506
12640
|
},
|
|
12507
12641
|
dueAmount: (sc === null || sc === void 0 ? void 0 : (_sc$billData5 = sc.billData) === null || _sc$billData5 === void 0 ? void 0 : _sc$billData5.totalAmount) || 0,
|
|
12508
12642
|
status: sc === null || sc === void 0 ? void 0 : (_sc$billData6 = sc.billData) === null || _sc$billData6 === void 0 ? void 0 : _sc$billData6.status
|
|
12509
12643
|
});
|
|
12510
12644
|
});
|
|
12511
12645
|
if (data !== null && data !== void 0 && (_data$PropertyDetails17 = data.PropertyDetails) !== null && _data$PropertyDetails17 !== void 0 && (_data$PropertyDetails18 = _data$PropertyDetails17.propertyBillData) !== null && _data$PropertyDetails18 !== void 0 && _data$PropertyDetails18.billData) {
|
|
12512
|
-
var _data$PropertyDetails19, _data$PropertyDetails20, _data$
|
|
12646
|
+
var _data$PropertyDetails19, _data$PropertyDetails20, _data$cpt0, _data$PropertyDetails21, _data$cpt1, _data$cpt1$details;
|
|
12513
12647
|
const billData = data === null || data === void 0 ? void 0 : (_data$PropertyDetails19 = data.PropertyDetails) === null || _data$PropertyDetails19 === void 0 ? void 0 : (_data$PropertyDetails20 = _data$PropertyDetails19.propertyBillData) === null || _data$PropertyDetails20 === void 0 ? void 0 : _data$PropertyDetails20.billData;
|
|
12514
12648
|
ndcDetails.push({
|
|
12515
12649
|
uuid: billData === null || billData === void 0 ? void 0 : billData.id,
|
|
12516
12650
|
applicantId: applicantId,
|
|
12517
12651
|
businessService: "PT",
|
|
12518
|
-
consumerCode: data === null || data === void 0 ? void 0 : (_data$
|
|
12652
|
+
consumerCode: data === null || data === void 0 ? void 0 : (_data$cpt0 = data.cpt) === null || _data$cpt0 === void 0 ? void 0 : _data$cpt0.id,
|
|
12519
12653
|
additionalDetails: {
|
|
12520
12654
|
propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails21 = data.PropertyDetails) === null || _data$PropertyDetails21 === void 0 ? void 0 : _data$PropertyDetails21.address,
|
|
12521
|
-
propertyType: data === null || data === void 0 ? void 0 : (_data$
|
|
12655
|
+
propertyType: data === null || data === void 0 ? void 0 : (_data$cpt1 = data.cpt) === null || _data$cpt1 === void 0 ? void 0 : (_data$cpt1$details = _data$cpt1.details) === null || _data$cpt1$details === void 0 ? void 0 : _data$cpt1$details.usageCategory
|
|
12522
12656
|
},
|
|
12523
12657
|
dueAmount: (billData === null || billData === void 0 ? void 0 : billData.totalAmount) || 0,
|
|
12524
12658
|
status: billData === null || billData === void 0 ? void 0 : billData.status
|
|
@@ -12535,7 +12669,7 @@ const NewNDCStepFormOne = ({
|
|
|
12535
12669
|
Documents: [],
|
|
12536
12670
|
active: true,
|
|
12537
12671
|
reason: data === null || data === void 0 ? void 0 : (_data$NDCReason3 = data.NDCReason) === null || _data$NDCReason3 === void 0 ? void 0 : _data$NDCReason3.code,
|
|
12538
|
-
auditDetails: data === null || data === void 0 ? void 0 : (_data$
|
|
12672
|
+
auditDetails: data === null || data === void 0 ? void 0 : (_data$cpt10 = data.cpt) === null || _data$cpt10 === void 0 ? void 0 : (_data$cpt10$details = _data$cpt10.details) === null || _data$cpt10$details === void 0 ? void 0 : _data$cpt10$details.auditDetails,
|
|
12539
12673
|
applicationNo: appNumber,
|
|
12540
12674
|
uuid: apUUid,
|
|
12541
12675
|
workflow: {
|
|
@@ -12563,17 +12697,17 @@ const NewNDCStepFormOne = ({
|
|
|
12563
12697
|
}
|
|
12564
12698
|
};
|
|
12565
12699
|
function validateStepData(data) {
|
|
12566
|
-
var _data$
|
|
12700
|
+
var _data$cpt11, _data$cpt12, _data$cpt12$dues, _propertyDetails$wate, _propertyDetails$sewe;
|
|
12567
12701
|
const missingFields = [];
|
|
12568
12702
|
const invalidFields = [];
|
|
12569
12703
|
const cpt = (data === null || data === void 0 ? void 0 : data.cpt) || {};
|
|
12570
12704
|
const cptDetails = (cpt === null || cpt === void 0 ? void 0 : cpt.details) || {};
|
|
12571
12705
|
const propertyDetails = (data === null || data === void 0 ? void 0 : data.PropertyDetails) || {};
|
|
12572
12706
|
const NDCReason = (data === null || data === void 0 ? void 0 : data.NDCReason) || {};
|
|
12573
|
-
if (!(data !== null && data !== void 0 && (_data$
|
|
12707
|
+
if (!(data !== null && data !== void 0 && (_data$cpt11 = data.cpt) !== null && _data$cpt11 !== void 0 && _data$cpt11.dues)) {
|
|
12574
12708
|
missingFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
|
|
12575
12709
|
}
|
|
12576
|
-
if ((data === null || data === void 0 ? void 0 : (_data$
|
|
12710
|
+
if ((data === null || data === void 0 ? void 0 : (_data$cpt12 = data.cpt) === null || _data$cpt12 === void 0 ? void 0 : (_data$cpt12$dues = _data$cpt12.dues) === null || _data$cpt12$dues === void 0 ? void 0 : _data$cpt12$dues.totalAmount) > 0) {
|
|
12577
12711
|
missingFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
|
|
12578
12712
|
}
|
|
12579
12713
|
if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.length) > 0) {
|
|
@@ -12708,14 +12842,25 @@ function SelectNDCReason({
|
|
|
12708
12842
|
}, [ndcReason]);
|
|
12709
12843
|
useEffect(() => {
|
|
12710
12844
|
if (apiDataCheck && (ndcReasonOptions === null || ndcReasonOptions === void 0 ? void 0 : ndcReasonOptions.length) > 0) {
|
|
12845
|
+
var _formData$NDCReason;
|
|
12711
12846
|
console.log("check apiDataCheck", apiDataCheck);
|
|
12712
12847
|
const matchedOption = ndcReasonOptions.find(opt => {
|
|
12713
12848
|
var _apiDataCheck$;
|
|
12714
12849
|
return (opt === null || opt === void 0 ? void 0 : opt.code) === (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$ = apiDataCheck[0]) === null || _apiDataCheck$ === void 0 ? void 0 : _apiDataCheck$.reason);
|
|
12715
12850
|
});
|
|
12716
|
-
if (matchedOption) {
|
|
12717
|
-
|
|
12718
|
-
|
|
12851
|
+
if (matchedOption && (lodash.isEmpty(formData === null || formData === void 0 ? void 0 : formData.NDCReason) || !(formData !== null && formData !== void 0 && (_formData$NDCReason = formData.NDCReason) !== null && _formData$NDCReason !== void 0 && _formData$NDCReason.code))) {
|
|
12852
|
+
let updatedOption = {
|
|
12853
|
+
...matchedOption
|
|
12854
|
+
};
|
|
12855
|
+
if (matchedOption.code === "OTHERS") {
|
|
12856
|
+
var _apiDataCheck$2, _apiDataCheck$2$NdcDe, _ptDetail$additionalD;
|
|
12857
|
+
const ptDetail = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$2 = apiDataCheck[0]) === null || _apiDataCheck$2 === void 0 ? void 0 : (_apiDataCheck$2$NdcDe = _apiDataCheck$2.NdcDetails) === null || _apiDataCheck$2$NdcDe === void 0 ? void 0 : _apiDataCheck$2$NdcDe.find(detail => detail.businessService === "PT");
|
|
12858
|
+
if (ptDetail !== null && ptDetail !== void 0 && (_ptDetail$additionalD = ptDetail.additionalDetails) !== null && _ptDetail$additionalD !== void 0 && _ptDetail$additionalD.reason) {
|
|
12859
|
+
updatedOption.reason = ptDetail.additionalDetails.reason;
|
|
12860
|
+
}
|
|
12861
|
+
}
|
|
12862
|
+
setNDCReason(updatedOption);
|
|
12863
|
+
setValue("NDCReason", updatedOption);
|
|
12719
12864
|
}
|
|
12720
12865
|
}
|
|
12721
12866
|
}, [apiDataCheck, ndcReasonOptions]);
|
|
@@ -12779,7 +12924,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12779
12924
|
formState,
|
|
12780
12925
|
clearErrors
|
|
12781
12926
|
}) => {
|
|
12782
|
-
var _formData$cpt, _formData$cpt$details, _checkApiDataCheck$Ap, _formData$cpt4, _Digit, _Digit$ComponentRegis, _formData$cpt5, _apiDataCheck$
|
|
12927
|
+
var _formData$cpt, _formData$cpt$details, _checkApiDataCheck$Ap, _formData$cpt4, _Digit, _Digit$ComponentRegis, _formData$cpt5, _apiDataCheck$8, _propertyDetails$wate, _propertyDetails$sewe, _formData$cpt6, _formData$cpt6$detail;
|
|
12783
12928
|
const {
|
|
12784
12929
|
control,
|
|
12785
12930
|
formState: localFormState,
|
|
@@ -12808,7 +12953,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12808
12953
|
const [propertyDetails, setPropertyDetails] = useState((formData === null || formData === void 0 ? void 0 : formData.PropertyDetails) || {});
|
|
12809
12954
|
const [selectedRow, setSelectedRow] = useState(null);
|
|
12810
12955
|
console.log("apiDataCheck", apiDataCheck);
|
|
12811
|
-
console.log("formData
|
|
12956
|
+
console.log("formData==?/||", formData);
|
|
12812
12957
|
console.log("checkApiDataCheck====", checkApiDataCheck === null || checkApiDataCheck === void 0 ? void 0 : (_checkApiDataCheck$Ap = checkApiDataCheck.Applications) === null || _checkApiDataCheck$Ap === void 0 ? void 0 : _checkApiDataCheck$Ap[0]);
|
|
12813
12958
|
const {
|
|
12814
12959
|
isLoading: waterConnectionLoading,
|
|
@@ -12870,7 +13015,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12870
13015
|
}
|
|
12871
13016
|
}];
|
|
12872
13017
|
useEffect(() => {
|
|
12873
|
-
var _formData$cpt3, _formData$cpt3$detail, _ownerForName$map, _ownerForName$map$fil, _apiDataCheck$, _apiDataCheck$$owners, _apiDataCheck$$owners2, _formData$PropertyDet, _formData$PropertyDet2, _formData$PropertyDet3;
|
|
13018
|
+
var _formData$cpt3, _formData$cpt3$detail, _ownerForName$map, _ownerForName$map$fil, _apiDataCheck$, _apiDataCheck$$owners, _apiDataCheck$$owners2, _formData$PropertyDet, _formData$PropertyDet2, _formData$PropertyDet3, _apiDataCheck$2, _apiDataCheck$2$NdcDe, _ptDetail$additionalD, _formData$PropertyDet4;
|
|
12874
13019
|
const ownerForName = (formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : (_formData$cpt3$detail = _formData$cpt3.details) === null || _formData$cpt3$detail === void 0 ? void 0 : _formData$cpt3$detail.owners) || [];
|
|
12875
13020
|
const ownerNames = ownerForName === null || ownerForName === void 0 ? void 0 : (_ownerForName$map = ownerForName.map(owner => owner === null || owner === void 0 ? void 0 : owner.name)) === null || _ownerForName$map === void 0 ? void 0 : (_ownerForName$map$fil = _ownerForName$map.filter(Boolean)) === null || _ownerForName$map$fil === void 0 ? void 0 : _ownerForName$map$fil.join(", ");
|
|
12876
13021
|
const ownerObj = selectedRow;
|
|
@@ -12891,6 +13036,10 @@ const PropertyDetailsForm$1 = ({
|
|
|
12891
13036
|
isLoading: false,
|
|
12892
13037
|
billData: (formData === null || formData === void 0 ? void 0 : (_formData$PropertyDet2 = formData.PropertyDetails) === null || _formData$PropertyDet2 === void 0 ? void 0 : (_formData$PropertyDet3 = _formData$PropertyDet2.propertyBillData) === null || _formData$PropertyDet3 === void 0 ? void 0 : _formData$PropertyDet3.billData) || {}
|
|
12893
13038
|
};
|
|
13039
|
+
const ptDetail = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$2 = apiDataCheck[0]) === null || _apiDataCheck$2 === void 0 ? void 0 : (_apiDataCheck$2$NdcDe = _apiDataCheck$2.NdcDetails) === null || _apiDataCheck$2$NdcDe === void 0 ? void 0 : _apiDataCheck$2$NdcDe.find(detail => detail.businessService === "PT");
|
|
13040
|
+
if (ptDetail !== null && ptDetail !== void 0 && (_ptDetail$additionalD = ptDetail.additionalDetails) !== null && _ptDetail$additionalD !== void 0 && _ptDetail$additionalD.remarks && !(formData !== null && formData !== void 0 && (_formData$PropertyDet4 = formData.PropertyDetails) !== null && _formData$PropertyDet4 !== void 0 && _formData$PropertyDet4.remarks)) {
|
|
13041
|
+
combinedObject.remarks = ptDetail.additionalDetails.remarks;
|
|
13042
|
+
}
|
|
12894
13043
|
setPropertyDetails(prev => {
|
|
12895
13044
|
return {
|
|
12896
13045
|
...prev,
|
|
@@ -12899,11 +13048,11 @@ const PropertyDetailsForm$1 = ({
|
|
|
12899
13048
|
});
|
|
12900
13049
|
}, [formData === null || formData === void 0 ? void 0 : (_formData$cpt4 = formData.cpt) === null || _formData$cpt4 === void 0 ? void 0 : _formData$cpt4.details, apiDataCheck, selectedRow]);
|
|
12901
13050
|
useEffect(() => {
|
|
12902
|
-
var _apiDataCheck$
|
|
13051
|
+
var _apiDataCheck$3;
|
|
12903
13052
|
let waterConnection;
|
|
12904
|
-
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$
|
|
12905
|
-
var _apiDataCheck$
|
|
12906
|
-
const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$
|
|
13053
|
+
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$3 = apiDataCheck[0]) !== null && _apiDataCheck$3 !== void 0 && _apiDataCheck$3.NdcDetails) {
|
|
13054
|
+
var _apiDataCheck$4, _apiDataCheck$4$NdcDe;
|
|
13055
|
+
const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$4 = apiDataCheck[0]) === null || _apiDataCheck$4 === void 0 ? void 0 : (_apiDataCheck$4$NdcDe = _apiDataCheck$4.NdcDetails) === null || _apiDataCheck$4$NdcDe === void 0 ? void 0 : _apiDataCheck$4$NdcDe.filter(item => {
|
|
12907
13056
|
return item.businessService == "WS";
|
|
12908
13057
|
});
|
|
12909
13058
|
waterConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
|
|
@@ -12928,11 +13077,11 @@ const PropertyDetailsForm$1 = ({
|
|
|
12928
13077
|
}));
|
|
12929
13078
|
}, [waterConnectionData, apiDataCheck]);
|
|
12930
13079
|
useEffect(() => {
|
|
12931
|
-
var _apiDataCheck$
|
|
13080
|
+
var _apiDataCheck$5;
|
|
12932
13081
|
let sewerageConnection;
|
|
12933
|
-
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$
|
|
12934
|
-
var _apiDataCheck$
|
|
12935
|
-
const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$
|
|
13082
|
+
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$5 = apiDataCheck[0]) !== null && _apiDataCheck$5 !== void 0 && _apiDataCheck$5.NdcDetails) {
|
|
13083
|
+
var _apiDataCheck$6, _apiDataCheck$6$NdcDe;
|
|
13084
|
+
const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$6 = apiDataCheck[0]) === null || _apiDataCheck$6 === void 0 ? void 0 : (_apiDataCheck$6$NdcDe = _apiDataCheck$6.NdcDetails) === null || _apiDataCheck$6$NdcDe === void 0 ? void 0 : _apiDataCheck$6$NdcDe.filter(item => {
|
|
12936
13085
|
return item.businessService == "SW";
|
|
12937
13086
|
});
|
|
12938
13087
|
sewerageConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
|
|
@@ -13004,15 +13153,15 @@ const PropertyDetailsForm$1 = ({
|
|
|
13004
13153
|
}));
|
|
13005
13154
|
}
|
|
13006
13155
|
try {
|
|
13007
|
-
var _result$Bill;
|
|
13156
|
+
var _result$Bill$, _result$Bill;
|
|
13008
13157
|
const result = await Digit.PaymentService.fetchBill(tenantId, {
|
|
13009
13158
|
businessService: bussinessService,
|
|
13010
13159
|
consumerCode: consumercodes
|
|
13011
13160
|
});
|
|
13012
13161
|
setPropertyLoader(false);
|
|
13162
|
+
const amount = (result === null || result === void 0 ? void 0 : (_result$Bill$ = result.Bill[0]) === null || _result$Bill$ === void 0 ? void 0 : _result$Bill$.totalAmount) || 0;
|
|
13013
13163
|
if ((result === null || result === void 0 ? void 0 : (_result$Bill = result.Bill) === null || _result$Bill === void 0 ? void 0 : _result$Bill.length) > 0) {
|
|
13014
|
-
|
|
13015
|
-
if ((result === null || result === void 0 ? void 0 : (_result$Bill$ = result.Bill[0]) === null || _result$Bill$ === void 0 ? void 0 : _result$Bill$.totalAmount) > 0) {
|
|
13164
|
+
if (amount > 0) {
|
|
13016
13165
|
setShowToast({
|
|
13017
13166
|
error: true,
|
|
13018
13167
|
label: t("NDC_MESSAGE_DUES_FOUND_PLEASE_PAY")
|
|
@@ -13216,8 +13365,8 @@ const PropertyDetailsForm$1 = ({
|
|
|
13216
13365
|
useEffect(() => {
|
|
13217
13366
|
var _checkApiDataCheck$Ap2;
|
|
13218
13367
|
if (checkApiDataCheck !== null && checkApiDataCheck !== void 0 && (_checkApiDataCheck$Ap2 = checkApiDataCheck.Applications) !== null && _checkApiDataCheck$Ap2 !== void 0 && _checkApiDataCheck$Ap2[0] || apiDataCheck !== null && apiDataCheck !== void 0 && apiDataCheck[0]) {
|
|
13219
|
-
var _checkApiDataCheck$Ap3, _checkApiDataCheck$Ap4, _apiDataCheck$
|
|
13220
|
-
const checkOwners = (checkApiDataCheck === null || checkApiDataCheck === void 0 ? void 0 : (_checkApiDataCheck$Ap3 = checkApiDataCheck.Applications) === null || _checkApiDataCheck$Ap3 === void 0 ? void 0 : (_checkApiDataCheck$Ap4 = _checkApiDataCheck$Ap3[0]) === null || _checkApiDataCheck$Ap4 === void 0 ? void 0 : _checkApiDataCheck$Ap4.owners) || (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$
|
|
13368
|
+
var _checkApiDataCheck$Ap3, _checkApiDataCheck$Ap4, _apiDataCheck$7;
|
|
13369
|
+
const checkOwners = (checkApiDataCheck === null || checkApiDataCheck === void 0 ? void 0 : (_checkApiDataCheck$Ap3 = checkApiDataCheck.Applications) === null || _checkApiDataCheck$Ap3 === void 0 ? void 0 : (_checkApiDataCheck$Ap4 = _checkApiDataCheck$Ap3[0]) === null || _checkApiDataCheck$Ap4 === void 0 ? void 0 : _checkApiDataCheck$Ap4.owners) || (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$7 = apiDataCheck[0]) === null || _apiDataCheck$7 === void 0 ? void 0 : _apiDataCheck$7.owners);
|
|
13221
13370
|
const filterRow = checkOwners === null || checkOwners === void 0 ? void 0 : checkOwners.find(owner => owner === null || owner === void 0 ? void 0 : owner.isPrimaryOwner);
|
|
13222
13371
|
console.log("filterRow===", filterRow);
|
|
13223
13372
|
setSelectedRow(filterRow);
|
|
@@ -13227,7 +13376,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13227
13376
|
style: {
|
|
13228
13377
|
marginBottom: "16px"
|
|
13229
13378
|
}
|
|
13230
|
-
}, ((formData === null || formData === void 0 ? void 0 : (_formData$cpt5 = formData.cpt) === null || _formData$cpt5 === void 0 ? void 0 : _formData$cpt5.details) || (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$
|
|
13379
|
+
}, ((formData === null || formData === void 0 ? void 0 : (_formData$cpt5 = formData.cpt) === null || _formData$cpt5 === void 0 ? void 0 : _formData$cpt5.details) || (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$8 = apiDataCheck[0]) === null || _apiDataCheck$8 === void 0 ? void 0 : _apiDataCheck$8.NdcDetails)) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, {
|
|
13231
13380
|
style: {
|
|
13232
13381
|
marginTop: "40px"
|
|
13233
13382
|
}
|
|
@@ -13242,7 +13391,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13242
13391
|
width: "100%"
|
|
13243
13392
|
}
|
|
13244
13393
|
}, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.map((item, index) => {
|
|
13245
|
-
var _apiDataCheck$
|
|
13394
|
+
var _apiDataCheck$9, _item$billData, _item$billData2, _item$billData3, _item$billData4;
|
|
13246
13395
|
return /*#__PURE__*/React.createElement("div", {
|
|
13247
13396
|
className: "ndc_property_search",
|
|
13248
13397
|
key: index,
|
|
@@ -13283,7 +13432,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13283
13432
|
alignItems: "center",
|
|
13284
13433
|
gap: "12px"
|
|
13285
13434
|
}
|
|
13286
|
-
}, !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$
|
|
13435
|
+
}, !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$9 = apiDataCheck[0]) !== null && _apiDataCheck$9 !== void 0 && _apiDataCheck$9.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.createElement("button", {
|
|
13287
13436
|
className: "submit-bar",
|
|
13288
13437
|
type: "button",
|
|
13289
13438
|
style: {
|
|
@@ -13350,7 +13499,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13350
13499
|
width: "100%"
|
|
13351
13500
|
}
|
|
13352
13501
|
}, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$sewe = propertyDetails.sewerageConnection) === null || _propertyDetails$sewe === void 0 ? void 0 : _propertyDetails$sewe.map((item, index) => {
|
|
13353
|
-
var _apiDataCheck$
|
|
13502
|
+
var _apiDataCheck$0, _item$billData5, _item$billData6, _item$billData7, _item$billData8;
|
|
13354
13503
|
return /*#__PURE__*/React.createElement("div", {
|
|
13355
13504
|
className: "ndc_property_search",
|
|
13356
13505
|
key: index,
|
|
@@ -13391,7 +13540,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13391
13540
|
alignItems: "center",
|
|
13392
13541
|
gap: "12px"
|
|
13393
13542
|
}
|
|
13394
|
-
}, !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$
|
|
13543
|
+
}, !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$0 = apiDataCheck[0]) !== null && _apiDataCheck$0 !== void 0 && _apiDataCheck$0.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.createElement("button", {
|
|
13395
13544
|
className: "submit-bar",
|
|
13396
13545
|
type: "button",
|
|
13397
13546
|
style: {
|
|
@@ -14199,8 +14348,8 @@ const NewNDCStepFormTwo = ({
|
|
|
14199
14348
|
const updateApplication = async data => {
|
|
14200
14349
|
var _Digit$UserService$ge, _user$info, _user$info2, _checkFormData$NDCDet, _checkFormData$NDCDet2, _user$info3, _user$info4, _checkFormData$respon, _ref, _data$documents, _response$ResponseInf;
|
|
14201
14350
|
const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
|
|
14202
|
-
console.log("final data
|
|
14203
|
-
console.log("checkFormData
|
|
14351
|
+
console.log("final data===||||?", data);
|
|
14352
|
+
console.log("checkFormData||?====", checkFormData);
|
|
14204
14353
|
const owners = [{
|
|
14205
14354
|
name: user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.name,
|
|
14206
14355
|
mobileNumber: user === null || user === void 0 ? void 0 : (_user$info2 = user.info) === null || _user$info2 === void 0 ? void 0 : _user$info2.mobileNumber,
|
|
@@ -14621,7 +14770,7 @@ const PayWSBillModal = ({
|
|
|
14621
14770
|
d: "M0 0h24v24H0V0z",
|
|
14622
14771
|
fill: "none"
|
|
14623
14772
|
}), /*#__PURE__*/React.createElement("path", {
|
|
14624
|
-
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41
|
|
14773
|
+
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
14625
14774
|
}));
|
|
14626
14775
|
const CloseBtn = ({
|
|
14627
14776
|
onClick
|
|
@@ -15241,7 +15390,7 @@ const NDCNewFormSummaryStepThreeEmployee = ({
|
|
|
15241
15390
|
}
|
|
15242
15391
|
};
|
|
15243
15392
|
function mapToNDCPayload(inputData, actionStatus) {
|
|
15244
|
-
var _Digit$UserService$ge, _ref, _inputData$apiData, _inputData$apiData$Ap, _inputData$apiData$Ap2, _formData$responseDat, _formData$apiData, _formData$apiData$App, _inputData$DocummentD, _inputData$DocummentD2;
|
|
15393
|
+
var _Digit$UserService$ge, _ref, _inputData$apiData, _inputData$apiData$Ap, _inputData$apiData$Ap2, _formData$responseDat, _formData$apiData, _formData$apiData$App, _baseApplication$NdcD, _formData$NDCDetails4, _formData$NDCDetails5, _inputData$DocummentD, _inputData$DocummentD2;
|
|
15245
15394
|
const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
|
|
15246
15395
|
console.log("checkFormData", formData);
|
|
15247
15396
|
const owners = (_ref = (inputData === null || inputData === void 0 ? void 0 : (_inputData$apiData = inputData.apiData) === null || _inputData$apiData === void 0 ? void 0 : (_inputData$apiData$Ap = _inputData$apiData.Applications) === null || _inputData$apiData$Ap === void 0 ? void 0 : (_inputData$apiData$Ap2 = _inputData$apiData$Ap[0]) === null || _inputData$apiData$Ap2 === void 0 ? void 0 : _inputData$apiData$Ap2.owners) || []) === null || _ref === void 0 ? void 0 : _ref.map(({
|
|
@@ -15256,7 +15405,21 @@ const NDCNewFormSummaryStepThreeEmployee = ({
|
|
|
15256
15405
|
action: actionStatus
|
|
15257
15406
|
},
|
|
15258
15407
|
owners: owners,
|
|
15259
|
-
NdcDetails: baseApplication === null || baseApplication === void 0 ? void 0 : baseApplication.NdcDetails
|
|
15408
|
+
NdcDetails: baseApplication === null || baseApplication === void 0 ? void 0 : (_baseApplication$NdcD = baseApplication.NdcDetails) === null || _baseApplication$NdcD === void 0 ? void 0 : _baseApplication$NdcD.map(detail => {
|
|
15409
|
+
if (detail.businessService === "PT") {
|
|
15410
|
+
var _formData$NDCDetails, _formData$NDCDetails$, _formData$NDCDetails2, _formData$NDCDetails3;
|
|
15411
|
+
return {
|
|
15412
|
+
...detail,
|
|
15413
|
+
additionalDetails: {
|
|
15414
|
+
...detail.additionalDetails,
|
|
15415
|
+
reason: formData === null || formData === void 0 ? void 0 : (_formData$NDCDetails = formData.NDCDetails) === null || _formData$NDCDetails === void 0 ? void 0 : (_formData$NDCDetails$ = _formData$NDCDetails.NDCReason) === null || _formData$NDCDetails$ === void 0 ? void 0 : _formData$NDCDetails$.reason,
|
|
15416
|
+
remarks: 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.remarks
|
|
15417
|
+
}
|
|
15418
|
+
};
|
|
15419
|
+
}
|
|
15420
|
+
return detail;
|
|
15421
|
+
}),
|
|
15422
|
+
reason: formData === null || formData === void 0 ? void 0 : (_formData$NDCDetails4 = formData.NDCDetails) === null || _formData$NDCDetails4 === void 0 ? void 0 : (_formData$NDCDetails5 = _formData$NDCDetails4.NDCReason) === null || _formData$NDCDetails5 === void 0 ? void 0 : _formData$NDCDetails5.code,
|
|
15260
15423
|
Documents: []
|
|
15261
15424
|
};
|
|
15262
15425
|
((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 => {
|