@mseva/digit-ui-module-ndc 1.0.71 → 1.0.72-UAT.2
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 +244 -71
- 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';
|
|
@@ -2030,6 +2030,7 @@ const getTimelineAcknowledgementData = (workflowDetails, tenantInfo, pdfFiles =
|
|
|
2030
2030
|
const formats = (downloadLink === null || downloadLink === void 0 ? void 0 : (_downloadLink$split = downloadLink.split(",")) === null || _downloadLink$split === void 0 ? void 0 : _downloadLink$split.filter(Boolean)) || [];
|
|
2031
2031
|
return (formats === null || formats === void 0 ? void 0 : formats.find(link => !(link !== null && link !== void 0 && link.includes("large")) && !(link !== null && link !== void 0 && link.includes("medium")) && !(link !== null && link !== void 0 && link.includes("small")))) || (formats === null || formats === void 0 ? void 0 : formats[0]) || "";
|
|
2032
2032
|
};
|
|
2033
|
+
const pattern = /\[#\?.*?\*\*\]/;
|
|
2033
2034
|
const timelineRows = timeline.map((item, index) => {
|
|
2034
2035
|
var _item$auditDetails, _item$auditDetails2, _item$assigner, _item$assigner2, _item$assigner3, _item$wfComment;
|
|
2035
2036
|
const createdDate = (item === null || item === void 0 ? void 0 : (_item$auditDetails = item.auditDetails) === null || _item$auditDetails === void 0 ? void 0 : _item$auditDetails.created) || "N/A";
|
|
@@ -2039,7 +2040,8 @@ const getTimelineAcknowledgementData = (workflowDetails, tenantInfo, pdfFiles =
|
|
|
2039
2040
|
const mobileNumber = (item === null || item === void 0 ? void 0 : (_item$assigner3 = item.assigner) === null || _item$assigner3 === void 0 ? void 0 : _item$assigner3.mobileNumber) || "N/A";
|
|
2040
2041
|
const action = (item === null || item === void 0 ? void 0 : item.performedAction) || "N/A";
|
|
2041
2042
|
const status = (item === null || item === void 0 ? void 0 : item.status) || (item === null || item === void 0 ? void 0 : item.state) || "N/A";
|
|
2042
|
-
const
|
|
2043
|
+
const rawComment = (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment[0]) || "-";
|
|
2044
|
+
const comment = typeof rawComment === "string" ? rawComment.split(pattern)[0] : rawComment;
|
|
2043
2045
|
const documents = (item === null || item === void 0 ? void 0 : item.wfDocuments) || [];
|
|
2044
2046
|
const sla = (item === null || item === void 0 ? void 0 : item.sla) || "N/A";
|
|
2045
2047
|
const assignedTo = Array.isArray(item === null || item === void 0 ? void 0 : item.assignes) ? item.assignes.map(a => a === null || a === void 0 ? void 0 : a.name).filter(Boolean).join(", ") : "";
|
|
@@ -2151,7 +2153,9 @@ function NewApplicationTimeline({
|
|
|
2151
2153
|
workflowDetails,
|
|
2152
2154
|
t,
|
|
2153
2155
|
tenantId = Digit.ULBService.getCurrentTenantId(),
|
|
2154
|
-
timeObj
|
|
2156
|
+
timeObj,
|
|
2157
|
+
empUserName = null,
|
|
2158
|
+
handleSetEmpDesignation = () => {}
|
|
2155
2159
|
}) {
|
|
2156
2160
|
var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _employeeData$data, _employeeData$data$Em;
|
|
2157
2161
|
const {
|
|
@@ -2226,6 +2230,9 @@ function NewApplicationTimeline({
|
|
|
2226
2230
|
const translationKey = `COMMON_MASTERS_DESIGNATION_${assignment === null || assignment === void 0 ? void 0 : assignment.designation}`;
|
|
2227
2231
|
deptMap[emp === null || emp === void 0 ? void 0 : emp.code] = translationKey;
|
|
2228
2232
|
});
|
|
2233
|
+
if (employeeData && empUserName) {
|
|
2234
|
+
handleSetEmpDesignation(t(deptMap[empUserName]));
|
|
2235
|
+
}
|
|
2229
2236
|
if (isLoading) return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
2230
2237
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
2231
2238
|
className: "custom-timeline-container"
|
|
@@ -2367,7 +2374,7 @@ const getReadableCity = (tenantId = "") => {
|
|
|
2367
2374
|
return cityMap[key] || capitalize(key);
|
|
2368
2375
|
};
|
|
2369
2376
|
const capitalize = text => (text === null || text === void 0 ? void 0 : text.charAt(0).toUpperCase()) + (text === null || text === void 0 ? void 0 : text.slice(1));
|
|
2370
|
-
const getAcknowledgementData = async (application, formattedAddress, tenantInfo, t, approver, ulbType, empData) => {
|
|
2377
|
+
const getAcknowledgementData = async (application, formattedAddress, tenantInfo, t, approver, ulbType, empData, approverStatement) => {
|
|
2371
2378
|
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$;
|
|
2372
2379
|
const appData = (application === null || application === void 0 ? void 0 : (_application$Applicat = application.Applications) === null || _application$Applicat === void 0 ? void 0 : _application$Applicat[0]) || {};
|
|
2373
2380
|
const owner = (appData === null || appData === void 0 ? void 0 : (_appData$owners = appData.owners) === null || _appData$owners === void 0 ? void 0 : _appData$owners[0]) || {};
|
|
@@ -2528,6 +2535,7 @@ const getAcknowledgementData = async (application, formattedAddress, tenantInfo,
|
|
|
2528
2535
|
approvalDate,
|
|
2529
2536
|
approver,
|
|
2530
2537
|
designation,
|
|
2538
|
+
approverStatement,
|
|
2531
2539
|
ulbType,
|
|
2532
2540
|
tenantId: appData === null || appData === void 0 ? void 0 : appData.tenantId,
|
|
2533
2541
|
name: ` No Dues Certificate `,
|
|
@@ -2549,7 +2557,7 @@ const availableOptions = [{
|
|
|
2549
2557
|
name: "No"
|
|
2550
2558
|
}];
|
|
2551
2559
|
const ApplicationOverview = () => {
|
|
2552
|
-
var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _user, _user$info, _user$info$roles, _user2, _user2$info, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetailsTemp$, _workflowDetailsTemp$2, _applicationDetails$
|
|
2560
|
+
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;
|
|
2553
2561
|
const {
|
|
2554
2562
|
id
|
|
2555
2563
|
} = useParams();
|
|
@@ -2582,6 +2590,8 @@ const ApplicationOverview = () => {
|
|
|
2582
2590
|
const [showModal, setShowModal] = useState(false);
|
|
2583
2591
|
const [getPropertyId, setPropertyId] = useState(null);
|
|
2584
2592
|
const [approver, setApprover] = useState(null);
|
|
2593
|
+
const [approverStatement, setApproverStatement] = useState(null);
|
|
2594
|
+
const [showOptions, setShowOptions] = useState(false);
|
|
2585
2595
|
const handleMarkPending = (consumerCode, value, index) => {
|
|
2586
2596
|
setMarkedPending(prev => {
|
|
2587
2597
|
const updated = {
|
|
@@ -2660,6 +2670,68 @@ const ApplicationOverview = () => {
|
|
|
2660
2670
|
const empData = EmployeeData(tenantId, approver);
|
|
2661
2671
|
console.log("approver for ndc", approver);
|
|
2662
2672
|
console.log("officerData", empData);
|
|
2673
|
+
const {
|
|
2674
|
+
data: reciept_data,
|
|
2675
|
+
isLoading: recieptDataLoading
|
|
2676
|
+
} = Digit.Hooks.useRecieptSearch({
|
|
2677
|
+
tenantId: tenantId,
|
|
2678
|
+
businessService: "NDC",
|
|
2679
|
+
consumerCodes: id,
|
|
2680
|
+
isEmployee: false
|
|
2681
|
+
}, {
|
|
2682
|
+
enabled: id ? true : false
|
|
2683
|
+
});
|
|
2684
|
+
async function getRecieptSearch({
|
|
2685
|
+
tenantId,
|
|
2686
|
+
payments,
|
|
2687
|
+
...params
|
|
2688
|
+
}) {
|
|
2689
|
+
setLoader(true);
|
|
2690
|
+
try {
|
|
2691
|
+
var _applicationDetails$A, _response;
|
|
2692
|
+
let response = null;
|
|
2693
|
+
let application = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : _applicationDetails$A[0];
|
|
2694
|
+
if (payments !== null && payments !== void 0 && payments.fileStoreId) {
|
|
2695
|
+
response = {
|
|
2696
|
+
filestoreIds: [payments === null || payments === void 0 ? void 0 : payments.fileStoreId]
|
|
2697
|
+
};
|
|
2698
|
+
} else {
|
|
2699
|
+
response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
2700
|
+
Payments: [{
|
|
2701
|
+
...(payments || {}),
|
|
2702
|
+
...application
|
|
2703
|
+
}]
|
|
2704
|
+
}, "ndc-receipt");
|
|
2705
|
+
}
|
|
2706
|
+
const fileStore = await Digit.PaymentService.printReciept(tenantId, {
|
|
2707
|
+
fileStoreIds: response.filestoreIds[0]
|
|
2708
|
+
});
|
|
2709
|
+
window.open(fileStore[(_response = response) === null || _response === void 0 ? void 0 : _response.filestoreIds[0]], "_blank");
|
|
2710
|
+
setLoader(false);
|
|
2711
|
+
} catch (error) {
|
|
2712
|
+
console.error(error);
|
|
2713
|
+
setLoader(false);
|
|
2714
|
+
}
|
|
2715
|
+
}
|
|
2716
|
+
const dowloadOptions = [];
|
|
2717
|
+
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") {
|
|
2718
|
+
dowloadOptions.push({
|
|
2719
|
+
label: t("DOWNLOAD_CERTIFICATE"),
|
|
2720
|
+
onClick: () => handleDownloadPdf()
|
|
2721
|
+
});
|
|
2722
|
+
if (reciept_data && (reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments.length) > 0 && !recieptDataLoading) {
|
|
2723
|
+
dowloadOptions.push({
|
|
2724
|
+
label: t("PTR_FEE_RECIEPT"),
|
|
2725
|
+
onClick: () => {
|
|
2726
|
+
var _reciept_data$Payment;
|
|
2727
|
+
return getRecieptSearch({
|
|
2728
|
+
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,
|
|
2729
|
+
payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0]
|
|
2730
|
+
});
|
|
2731
|
+
}
|
|
2732
|
+
});
|
|
2733
|
+
}
|
|
2734
|
+
}
|
|
2663
2735
|
let user = Digit.UserService.getUser();
|
|
2664
2736
|
const menuRef = useRef();
|
|
2665
2737
|
if (window.location.href.includes("/obps") || window.location.href.includes("/noc")) {
|
|
@@ -2668,7 +2740,7 @@ const ApplicationOverview = () => {
|
|
|
2668
2740
|
user = userInfo === null || userInfo === void 0 ? void 0 : userInfo.value;
|
|
2669
2741
|
}
|
|
2670
2742
|
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);
|
|
2671
|
-
const isCemp = (_user2 = user) === null || _user2 === void 0 ? void 0 : (_user2$info = _user2.info) === null || _user2$info === void 0 ? void 0 : _user2$info.roles.
|
|
2743
|
+
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;
|
|
2672
2744
|
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 => {
|
|
2673
2745
|
return (userRoles === null || userRoles === void 0 ? void 0 : userRoles.some(role => {
|
|
2674
2746
|
var _e$roles;
|
|
@@ -2702,8 +2774,8 @@ const ApplicationOverview = () => {
|
|
|
2702
2774
|
});
|
|
2703
2775
|
};
|
|
2704
2776
|
useEffect(() => {
|
|
2705
|
-
var _applicationDetails$
|
|
2706
|
-
const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
2777
|
+
var _applicationDetails$A6;
|
|
2778
|
+
const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A6 = applicationDetails.Applications) === null || _applicationDetails$A6 === void 0 ? void 0 : _applicationDetails$A6[0];
|
|
2707
2779
|
if (ndcObject) {
|
|
2708
2780
|
var _ndcObject$owners, _ndcObject$owners$, _ndcObject$owners2, _ndcObject$owners2$, _ndcObject$owners3, _ndcObject$owners3$, _ndcObject$NdcDetails, _ndcObject$NdcDetails2, _ndcObject$NdcDetails3, _removeDuplicatesByUU;
|
|
2709
2781
|
const applicantData = {
|
|
@@ -2755,7 +2827,7 @@ const ApplicationOverview = () => {
|
|
|
2755
2827
|
const ulbType = tenantInfo === null || tenantInfo === void 0 ? void 0 : (_tenantInfo$city = tenantInfo.city) === null || _tenantInfo$city === void 0 ? void 0 : _tenantInfo$city.ulbType;
|
|
2756
2828
|
let acknowledgementData;
|
|
2757
2829
|
if (empData) {
|
|
2758
|
-
acknowledgementData = await getAcknowledgementData(Property, formattedAddress, tenantInfo, t, approver, ulbType, empData);
|
|
2830
|
+
acknowledgementData = await getAcknowledgementData(Property, formattedAddress, tenantInfo, t, approver, ulbType, empData, approverStatement);
|
|
2759
2831
|
}
|
|
2760
2832
|
console.log("acknowledgementData", acknowledgementData);
|
|
2761
2833
|
setTimeout(() => {
|
|
@@ -2768,9 +2840,9 @@ const ApplicationOverview = () => {
|
|
|
2768
2840
|
}
|
|
2769
2841
|
};
|
|
2770
2842
|
function onActionSelect(action) {
|
|
2771
|
-
var _action$state, _applicationDetails$
|
|
2843
|
+
var _action$state, _applicationDetails$A8, _applicationDetails$A9, _action$state2, _action$state2$action, _filterNexState$, _filterRoles$, _displayData$applican;
|
|
2772
2844
|
console.log("action====???", action === null || action === void 0 ? void 0 : (_action$state = action.state) === null || _action$state === void 0 ? void 0 : _action$state.actions);
|
|
2773
|
-
const ndcDetails = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
2845
|
+
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) || [];
|
|
2774
2846
|
const hasDuePending = ndcDetails === null || ndcDetails === void 0 ? void 0 : ndcDetails.some(item => item.isDuePending === true);
|
|
2775
2847
|
console.log("hasDuePending", hasDuePending);
|
|
2776
2848
|
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));
|
|
@@ -2871,10 +2943,11 @@ const ApplicationOverview = () => {
|
|
|
2871
2943
|
};
|
|
2872
2944
|
useEffect(() => {
|
|
2873
2945
|
if (workflowDetails) {
|
|
2874
|
-
var _workflowDetails$data9, _workflowDetails$data0, _approveInstance$assi;
|
|
2875
|
-
console.log("workflowDetails here", workflowDetails);
|
|
2946
|
+
var _workflowDetails$data9, _workflowDetails$data0, _approveInstance$assi, _applicationDetails$A0, _applicationDetails$A1;
|
|
2876
2947
|
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");
|
|
2877
2948
|
const name = (approveInstance === null || approveInstance === void 0 ? void 0 : (_approveInstance$assi = approveInstance.assigner) === null || _approveInstance$assi === void 0 ? void 0 : _approveInstance$assi.name) || "NA";
|
|
2949
|
+
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;
|
|
2950
|
+
setApproverStatement(status ? `${t(status)} By` : "");
|
|
2878
2951
|
setApprover(name);
|
|
2879
2952
|
}
|
|
2880
2953
|
}, [workflowDetails]);
|
|
@@ -2909,7 +2982,7 @@ const ApplicationOverview = () => {
|
|
|
2909
2982
|
enabled: getPropertyId ? true : false,
|
|
2910
2983
|
privacy: Digit.Utils.getPrivacyObject()
|
|
2911
2984
|
});
|
|
2912
|
-
console.log("applicationDetails", applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
2985
|
+
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);
|
|
2913
2986
|
useEffect(() => {
|
|
2914
2987
|
const handleClickOutside = event => {
|
|
2915
2988
|
if (toastRef.current && !toastRef.current.contains(event.target)) {
|
|
@@ -2929,7 +3002,7 @@ const ApplicationOverview = () => {
|
|
|
2929
3002
|
address = propertyDetailsFetch.Properties[0].address;
|
|
2930
3003
|
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(", ");
|
|
2931
3004
|
}
|
|
2932
|
-
if (isLoading || isDetailsLoading) {
|
|
3005
|
+
if (isLoading || isDetailsLoading || recieptDataLoading) {
|
|
2933
3006
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
2934
3007
|
}
|
|
2935
3008
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -2941,16 +3014,19 @@ const ApplicationOverview = () => {
|
|
|
2941
3014
|
alignItems: "center",
|
|
2942
3015
|
padding: "16px"
|
|
2943
3016
|
}
|
|
2944
|
-
}, isCemp &&
|
|
2945
|
-
className: "
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
3017
|
+
}, isCemp && /*#__PURE__*/React.createElement("div", {
|
|
3018
|
+
className: "cardHeaderWithOptions ral-app-details-header"
|
|
3019
|
+
}, getLoader && /*#__PURE__*/React.createElement(Loader, null), dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React.createElement(MultiLink, {
|
|
3020
|
+
className: "multilinkWrapper",
|
|
3021
|
+
onHeadClick: () => setShowOptions(!showOptions),
|
|
3022
|
+
displayOptions: showOptions,
|
|
3023
|
+
options: dowloadOptions
|
|
3024
|
+
}))), /*#__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, {
|
|
2949
3025
|
key: key,
|
|
2950
3026
|
label: t(`${key === null || key === void 0 ? void 0 : key.toUpperCase()}`),
|
|
2951
3027
|
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")
|
|
2952
3028
|
}))))), /*#__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) => {
|
|
2953
|
-
var _applicationDetails$
|
|
3029
|
+
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;
|
|
2954
3030
|
const isPT = (detail === null || detail === void 0 ? void 0 : detail.businessService) === "NDC_PROPERTY_TAX";
|
|
2955
3031
|
const isSW = (detail === null || detail === void 0 ? void 0 : detail.businessService) === "NDC_SEWERAGE_SERVICE_CONNECTION";
|
|
2956
3032
|
const isWS = (detail === null || detail === void 0 ? void 0 : detail.businessService) === "NDC_WATER_SERVICE_CONNECTION";
|
|
@@ -3009,7 +3085,7 @@ const ApplicationOverview = () => {
|
|
|
3009
3085
|
text: t(detail.propertyType) || detail.propertyType
|
|
3010
3086
|
}), isPT && (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : propertyDetailsFetch.Properties) && /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Row, {
|
|
3011
3087
|
label: t("CHB_DISCOUNT_REASON"),
|
|
3012
|
-
text: t(`${(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
3088
|
+
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}`)
|
|
3013
3089
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
3014
3090
|
label: t("City"),
|
|
3015
3091
|
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
|
|
@@ -3033,7 +3109,7 @@ const ApplicationOverview = () => {
|
|
|
3033
3109
|
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
|
|
3034
3110
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
3035
3111
|
label: t("Remarks"),
|
|
3036
|
-
text: (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
3112
|
+
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"
|
|
3037
3113
|
}))), canRaiseFlag && /*#__PURE__*/React.createElement("div", {
|
|
3038
3114
|
className: "mychallan-custom"
|
|
3039
3115
|
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
@@ -3061,7 +3137,7 @@ const ApplicationOverview = () => {
|
|
|
3061
3137
|
}) : /*#__PURE__*/React.createElement("div", null, t("TL_NO_DOCUMENTS_MSG")))), /*#__PURE__*/React.createElement(NewApplicationTimeline, {
|
|
3062
3138
|
workflowDetails: workflowDetails,
|
|
3063
3139
|
t: t
|
|
3064
|
-
}), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
3140
|
+
}), (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, {
|
|
3065
3141
|
localeKeyPrefix: `WF_EDITRENEWAL`,
|
|
3066
3142
|
options: actions,
|
|
3067
3143
|
optionKey: "action",
|
|
@@ -3071,11 +3147,11 @@ const ApplicationOverview = () => {
|
|
|
3071
3147
|
ref: menuRef,
|
|
3072
3148
|
label: t("WF_TAKE_ACTION"),
|
|
3073
3149
|
onSubmit: () => setDisplayMenu(!displayMenu)
|
|
3074
|
-
})), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
3150
|
+
})), (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, {
|
|
3075
3151
|
label: t("COMMON_EDIT"),
|
|
3076
3152
|
onSubmit: () => {
|
|
3077
|
-
var _applicationDetails$
|
|
3078
|
-
const id = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
3153
|
+
var _applicationDetails$A30, _applicationDetails$A31;
|
|
3154
|
+
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;
|
|
3079
3155
|
history.push(`/digit-ui/employee/ndc/create/${id}`);
|
|
3080
3156
|
}
|
|
3081
3157
|
})), showModal ? /*#__PURE__*/React.createElement(NDCModal, {
|
|
@@ -10418,7 +10494,7 @@ var lodash = createCommonjsModule(function (module, exports) {
|
|
|
10418
10494
|
});
|
|
10419
10495
|
|
|
10420
10496
|
const CitizenApplicationOverview = () => {
|
|
10421
|
-
var _user, _user$info, _user$info$roles, _propertyDetailsFetch3, _propertyDetailsFetch4, _propertyDetailsFetch5, _ownerForName$map, _ownerForName$map$fil, _applicationDetails$
|
|
10497
|
+
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;
|
|
10422
10498
|
const {
|
|
10423
10499
|
id
|
|
10424
10500
|
} = useParams();
|
|
@@ -10431,6 +10507,8 @@ const CitizenApplicationOverview = () => {
|
|
|
10431
10507
|
const [appDetails, setAppDetails] = useState({});
|
|
10432
10508
|
const [showToast, setShowToast] = useState(null);
|
|
10433
10509
|
const [approver, setApprover] = useState(null);
|
|
10510
|
+
const [approverStatement, setApproverStatement] = useState(null);
|
|
10511
|
+
const [showOptions, setShowOptions] = useState(false);
|
|
10434
10512
|
const [ndcDatils, setNdcDetails] = useState([]);
|
|
10435
10513
|
const [displayData, setDisplayData] = useState({});
|
|
10436
10514
|
const [getLoader, setLoader] = useState(false);
|
|
@@ -10453,10 +10531,11 @@ const CitizenApplicationOverview = () => {
|
|
|
10453
10531
|
});
|
|
10454
10532
|
useEffect(() => {
|
|
10455
10533
|
if (workflowDetails) {
|
|
10456
|
-
var _workflowDetails$data, _workflowDetails$data2, _approveInstance$assi;
|
|
10457
|
-
|
|
10458
|
-
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");
|
|
10534
|
+
var _workflowDetails$data, _workflowDetails$data2, _approveInstance$assi, _applicationDetails$A, _applicationDetails$A2;
|
|
10535
|
+
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");
|
|
10459
10536
|
const name = (approveInstance === null || approveInstance === void 0 ? void 0 : (_approveInstance$assi = approveInstance.assigner) === null || _approveInstance$assi === void 0 ? void 0 : _approveInstance$assi.name) || "NA";
|
|
10537
|
+
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;
|
|
10538
|
+
setApproverStatement(status ? `${t(status)} By` : "");
|
|
10460
10539
|
setApprover(name);
|
|
10461
10540
|
}
|
|
10462
10541
|
}, [workflowDetails]);
|
|
@@ -10476,6 +10555,68 @@ const CitizenApplicationOverview = () => {
|
|
|
10476
10555
|
const userInfo = userInfos ? JSON.parse(userInfos) : {};
|
|
10477
10556
|
user = userInfo === null || userInfo === void 0 ? void 0 : userInfo.value;
|
|
10478
10557
|
}
|
|
10558
|
+
const {
|
|
10559
|
+
data: reciept_data,
|
|
10560
|
+
isLoading: recieptDataLoading
|
|
10561
|
+
} = Digit.Hooks.useRecieptSearch({
|
|
10562
|
+
tenantId: tenantId,
|
|
10563
|
+
businessService: "NDC",
|
|
10564
|
+
consumerCodes: id,
|
|
10565
|
+
isEmployee: false
|
|
10566
|
+
}, {
|
|
10567
|
+
enabled: id ? true : false
|
|
10568
|
+
});
|
|
10569
|
+
async function getRecieptSearch({
|
|
10570
|
+
tenantId,
|
|
10571
|
+
payments,
|
|
10572
|
+
...params
|
|
10573
|
+
}) {
|
|
10574
|
+
setLoader(true);
|
|
10575
|
+
try {
|
|
10576
|
+
var _applicationDetails$A3, _response;
|
|
10577
|
+
let response = null;
|
|
10578
|
+
let application = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A3 = applicationDetails.Applications) === null || _applicationDetails$A3 === void 0 ? void 0 : _applicationDetails$A3[0];
|
|
10579
|
+
if (payments !== null && payments !== void 0 && payments.fileStoreId) {
|
|
10580
|
+
response = {
|
|
10581
|
+
filestoreIds: [payments === null || payments === void 0 ? void 0 : payments.fileStoreId]
|
|
10582
|
+
};
|
|
10583
|
+
} else {
|
|
10584
|
+
response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
10585
|
+
Payments: [{
|
|
10586
|
+
...(payments || {}),
|
|
10587
|
+
...application
|
|
10588
|
+
}]
|
|
10589
|
+
}, "ndc-receipt");
|
|
10590
|
+
}
|
|
10591
|
+
const fileStore = await Digit.PaymentService.printReciept(tenantId, {
|
|
10592
|
+
fileStoreIds: response.filestoreIds[0]
|
|
10593
|
+
});
|
|
10594
|
+
window.open(fileStore[(_response = response) === null || _response === void 0 ? void 0 : _response.filestoreIds[0]], "_blank");
|
|
10595
|
+
setLoader(false);
|
|
10596
|
+
} catch (error) {
|
|
10597
|
+
console.error(error);
|
|
10598
|
+
setLoader(false);
|
|
10599
|
+
}
|
|
10600
|
+
}
|
|
10601
|
+
const dowloadOptions = [];
|
|
10602
|
+
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") {
|
|
10603
|
+
dowloadOptions.push({
|
|
10604
|
+
label: t("DOWNLOAD_CERTIFICATE"),
|
|
10605
|
+
onClick: () => handleDownloadPdf()
|
|
10606
|
+
});
|
|
10607
|
+
}
|
|
10608
|
+
if (reciept_data && (reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments.length) > 0 && !recieptDataLoading) {
|
|
10609
|
+
dowloadOptions.push({
|
|
10610
|
+
label: t("PTR_FEE_RECIEPT"),
|
|
10611
|
+
onClick: () => {
|
|
10612
|
+
var _reciept_data$Payment;
|
|
10613
|
+
return getRecieptSearch({
|
|
10614
|
+
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,
|
|
10615
|
+
payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0]
|
|
10616
|
+
});
|
|
10617
|
+
}
|
|
10618
|
+
});
|
|
10619
|
+
}
|
|
10479
10620
|
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);
|
|
10480
10621
|
const removeDuplicatesByUUID = arr => {
|
|
10481
10622
|
const seen = new Set();
|
|
@@ -10489,8 +10630,8 @@ const CitizenApplicationOverview = () => {
|
|
|
10489
10630
|
});
|
|
10490
10631
|
};
|
|
10491
10632
|
useEffect(() => {
|
|
10492
|
-
var _applicationDetails$
|
|
10493
|
-
const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
10633
|
+
var _applicationDetails$A8;
|
|
10634
|
+
const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A8 = applicationDetails.Applications) === null || _applicationDetails$A8 === void 0 ? void 0 : _applicationDetails$A8[0];
|
|
10494
10635
|
console.log("ndcObject", ndcObject);
|
|
10495
10636
|
if (ndcObject) {
|
|
10496
10637
|
var _ndcObject$owners, _ndcObject$owners2, _removeDuplicatesByUU;
|
|
@@ -10549,7 +10690,7 @@ const CitizenApplicationOverview = () => {
|
|
|
10549
10690
|
const ulbType = tenantInfo === null || tenantInfo === void 0 ? void 0 : (_tenantInfo$city = tenantInfo.city) === null || _tenantInfo$city === void 0 ? void 0 : _tenantInfo$city.ulbType;
|
|
10550
10691
|
let acknowledgementData;
|
|
10551
10692
|
if (empData) {
|
|
10552
|
-
acknowledgementData = await getAcknowledgementData(Property, formattedAddress, tenantInfo, t, approver, ulbType, empData);
|
|
10693
|
+
acknowledgementData = await getAcknowledgementData(Property, formattedAddress, tenantInfo, t, approver, ulbType, empData, approverStatement);
|
|
10553
10694
|
}
|
|
10554
10695
|
console.log("acknowledgementData", acknowledgementData);
|
|
10555
10696
|
setTimeout(() => {
|
|
@@ -10595,14 +10736,14 @@ const CitizenApplicationOverview = () => {
|
|
|
10595
10736
|
address = propertyDetailsFetch.Properties[0].address;
|
|
10596
10737
|
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(", ");
|
|
10597
10738
|
}
|
|
10598
|
-
if (isLoading || isDetailsLoading) {
|
|
10739
|
+
if (isLoading || isDetailsLoading || recieptDataLoading) {
|
|
10599
10740
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
10600
10741
|
}
|
|
10601
10742
|
console.log("propertyDetailsFetch", propertyDetailsFetch);
|
|
10602
10743
|
console.log("displayData?.applicantData", displayData);
|
|
10603
10744
|
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) || [];
|
|
10604
10745
|
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(", ");
|
|
10605
|
-
console.log("applicationDetails?.[0]", applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
10746
|
+
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]);
|
|
10606
10747
|
return /*#__PURE__*/React.createElement("div", {
|
|
10607
10748
|
className: "employee-main-application-details"
|
|
10608
10749
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -10614,15 +10755,18 @@ const CitizenApplicationOverview = () => {
|
|
|
10614
10755
|
alignItems: "center",
|
|
10615
10756
|
padding: "16px"
|
|
10616
10757
|
}
|
|
10617
|
-
},
|
|
10618
|
-
className: "
|
|
10619
|
-
|
|
10620
|
-
|
|
10621
|
-
|
|
10758
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
10759
|
+
className: "cardHeaderWithOptions ral-app-details-header"
|
|
10760
|
+
}, getLoader && /*#__PURE__*/React.createElement(Loader, null), dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React.createElement(MultiLink, {
|
|
10761
|
+
className: "multilinkWrapper",
|
|
10762
|
+
onHeadClick: () => setShowOptions(!showOptions),
|
|
10763
|
+
displayOptions: showOptions,
|
|
10764
|
+
options: dowloadOptions
|
|
10765
|
+
}))), ((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, {
|
|
10622
10766
|
label: t("COMMON_EDIT"),
|
|
10623
10767
|
onSubmit: () => {
|
|
10624
|
-
var _applicationDetails$
|
|
10625
|
-
const id = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
10768
|
+
var _applicationDetails$A13, _applicationDetails$A14;
|
|
10769
|
+
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;
|
|
10626
10770
|
history.push(`/digit-ui/citizen/ndc/new-application/${id}`);
|
|
10627
10771
|
}
|
|
10628
10772
|
}))), /*#__PURE__*/React.createElement(Card, {
|
|
@@ -10641,7 +10785,7 @@ const CitizenApplicationOverview = () => {
|
|
|
10641
10785
|
}, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
10642
10786
|
className: "ndc_label"
|
|
10643
10787
|
}, 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) => {
|
|
10644
|
-
var _detail$dueAmount, _applicationDetails$
|
|
10788
|
+
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;
|
|
10645
10789
|
console.log("detail", detail);
|
|
10646
10790
|
const isRed = detail.dueAmount > 0;
|
|
10647
10791
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -10671,7 +10815,7 @@ const CitizenApplicationOverview = () => {
|
|
|
10671
10815
|
text: t(detail.propertyType) || detail.propertyType
|
|
10672
10816
|
}), (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, {
|
|
10673
10817
|
label: t("CHB_DISCOUNT_REASON"),
|
|
10674
|
-
text: t(`${(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
10818
|
+
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}`)
|
|
10675
10819
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
10676
10820
|
label: t("City"),
|
|
10677
10821
|
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"
|
|
@@ -10695,7 +10839,7 @@ const CitizenApplicationOverview = () => {
|
|
|
10695
10839
|
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
|
|
10696
10840
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
10697
10841
|
label: t("Remarks"),
|
|
10698
|
-
text: (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
10842
|
+
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"
|
|
10699
10843
|
}))));
|
|
10700
10844
|
})), /*#__PURE__*/React.createElement(Card, {
|
|
10701
10845
|
className: "ndc_card_main"
|
|
@@ -12704,14 +12848,25 @@ function SelectNDCReason({
|
|
|
12704
12848
|
}, [ndcReason]);
|
|
12705
12849
|
useEffect(() => {
|
|
12706
12850
|
if (apiDataCheck && (ndcReasonOptions === null || ndcReasonOptions === void 0 ? void 0 : ndcReasonOptions.length) > 0) {
|
|
12851
|
+
var _formData$NDCReason;
|
|
12707
12852
|
console.log("check apiDataCheck", apiDataCheck);
|
|
12708
12853
|
const matchedOption = ndcReasonOptions.find(opt => {
|
|
12709
12854
|
var _apiDataCheck$;
|
|
12710
12855
|
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);
|
|
12711
12856
|
});
|
|
12712
|
-
if (matchedOption) {
|
|
12713
|
-
|
|
12714
|
-
|
|
12857
|
+
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))) {
|
|
12858
|
+
let updatedOption = {
|
|
12859
|
+
...matchedOption
|
|
12860
|
+
};
|
|
12861
|
+
if (matchedOption.code === "OTHERS") {
|
|
12862
|
+
var _apiDataCheck$2, _apiDataCheck$2$NdcDe, _ptDetail$additionalD;
|
|
12863
|
+
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");
|
|
12864
|
+
if (ptDetail !== null && ptDetail !== void 0 && (_ptDetail$additionalD = ptDetail.additionalDetails) !== null && _ptDetail$additionalD !== void 0 && _ptDetail$additionalD.reason) {
|
|
12865
|
+
updatedOption.reason = ptDetail.additionalDetails.reason;
|
|
12866
|
+
}
|
|
12867
|
+
}
|
|
12868
|
+
setNDCReason(updatedOption);
|
|
12869
|
+
setValue("NDCReason", updatedOption);
|
|
12715
12870
|
}
|
|
12716
12871
|
}
|
|
12717
12872
|
}, [apiDataCheck, ndcReasonOptions]);
|
|
@@ -12775,7 +12930,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12775
12930
|
formState,
|
|
12776
12931
|
clearErrors
|
|
12777
12932
|
}) => {
|
|
12778
|
-
var _formData$cpt, _formData$cpt$details, _checkApiDataCheck$Ap, _formData$cpt4, _Digit, _Digit$ComponentRegis, _formData$cpt5, _apiDataCheck$
|
|
12933
|
+
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;
|
|
12779
12934
|
const {
|
|
12780
12935
|
control,
|
|
12781
12936
|
formState: localFormState,
|
|
@@ -12866,7 +13021,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12866
13021
|
}
|
|
12867
13022
|
}];
|
|
12868
13023
|
useEffect(() => {
|
|
12869
|
-
var _formData$cpt3, _formData$cpt3$detail, _ownerForName$map, _ownerForName$map$fil, _apiDataCheck$, _apiDataCheck$$owners, _apiDataCheck$$owners2, _formData$PropertyDet, _formData$PropertyDet2, _formData$PropertyDet3;
|
|
13024
|
+
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;
|
|
12870
13025
|
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) || [];
|
|
12871
13026
|
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(", ");
|
|
12872
13027
|
const ownerObj = selectedRow;
|
|
@@ -12887,6 +13042,10 @@ const PropertyDetailsForm$1 = ({
|
|
|
12887
13042
|
isLoading: false,
|
|
12888
13043
|
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) || {}
|
|
12889
13044
|
};
|
|
13045
|
+
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");
|
|
13046
|
+
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)) {
|
|
13047
|
+
combinedObject.remarks = ptDetail.additionalDetails.remarks;
|
|
13048
|
+
}
|
|
12890
13049
|
setPropertyDetails(prev => {
|
|
12891
13050
|
return {
|
|
12892
13051
|
...prev,
|
|
@@ -12895,11 +13054,11 @@ const PropertyDetailsForm$1 = ({
|
|
|
12895
13054
|
});
|
|
12896
13055
|
}, [formData === null || formData === void 0 ? void 0 : (_formData$cpt4 = formData.cpt) === null || _formData$cpt4 === void 0 ? void 0 : _formData$cpt4.details, apiDataCheck, selectedRow]);
|
|
12897
13056
|
useEffect(() => {
|
|
12898
|
-
var _apiDataCheck$
|
|
13057
|
+
var _apiDataCheck$3;
|
|
12899
13058
|
let waterConnection;
|
|
12900
|
-
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$
|
|
12901
|
-
var _apiDataCheck$
|
|
12902
|
-
const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$
|
|
13059
|
+
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$3 = apiDataCheck[0]) !== null && _apiDataCheck$3 !== void 0 && _apiDataCheck$3.NdcDetails) {
|
|
13060
|
+
var _apiDataCheck$4, _apiDataCheck$4$NdcDe;
|
|
13061
|
+
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 => {
|
|
12903
13062
|
return item.businessService == "WS";
|
|
12904
13063
|
});
|
|
12905
13064
|
waterConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
|
|
@@ -12924,11 +13083,11 @@ const PropertyDetailsForm$1 = ({
|
|
|
12924
13083
|
}));
|
|
12925
13084
|
}, [waterConnectionData, apiDataCheck]);
|
|
12926
13085
|
useEffect(() => {
|
|
12927
|
-
var _apiDataCheck$
|
|
13086
|
+
var _apiDataCheck$5;
|
|
12928
13087
|
let sewerageConnection;
|
|
12929
|
-
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$
|
|
12930
|
-
var _apiDataCheck$
|
|
12931
|
-
const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$
|
|
13088
|
+
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$5 = apiDataCheck[0]) !== null && _apiDataCheck$5 !== void 0 && _apiDataCheck$5.NdcDetails) {
|
|
13089
|
+
var _apiDataCheck$6, _apiDataCheck$6$NdcDe;
|
|
13090
|
+
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 => {
|
|
12932
13091
|
return item.businessService == "SW";
|
|
12933
13092
|
});
|
|
12934
13093
|
sewerageConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
|
|
@@ -13000,15 +13159,15 @@ const PropertyDetailsForm$1 = ({
|
|
|
13000
13159
|
}));
|
|
13001
13160
|
}
|
|
13002
13161
|
try {
|
|
13003
|
-
var _result$Bill;
|
|
13162
|
+
var _result$Bill$, _result$Bill;
|
|
13004
13163
|
const result = await Digit.PaymentService.fetchBill(tenantId, {
|
|
13005
13164
|
businessService: bussinessService,
|
|
13006
13165
|
consumerCode: consumercodes
|
|
13007
13166
|
});
|
|
13008
13167
|
setPropertyLoader(false);
|
|
13168
|
+
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;
|
|
13009
13169
|
if ((result === null || result === void 0 ? void 0 : (_result$Bill = result.Bill) === null || _result$Bill === void 0 ? void 0 : _result$Bill.length) > 0) {
|
|
13010
|
-
|
|
13011
|
-
if ((result === null || result === void 0 ? void 0 : (_result$Bill$ = result.Bill[0]) === null || _result$Bill$ === void 0 ? void 0 : _result$Bill$.totalAmount) > 0) {
|
|
13170
|
+
if (amount > 0) {
|
|
13012
13171
|
setShowToast({
|
|
13013
13172
|
error: true,
|
|
13014
13173
|
label: t("NDC_MESSAGE_DUES_FOUND_PLEASE_PAY")
|
|
@@ -13212,8 +13371,8 @@ const PropertyDetailsForm$1 = ({
|
|
|
13212
13371
|
useEffect(() => {
|
|
13213
13372
|
var _checkApiDataCheck$Ap2;
|
|
13214
13373
|
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]) {
|
|
13215
|
-
var _checkApiDataCheck$Ap3, _checkApiDataCheck$Ap4, _apiDataCheck$
|
|
13216
|
-
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$
|
|
13374
|
+
var _checkApiDataCheck$Ap3, _checkApiDataCheck$Ap4, _apiDataCheck$7;
|
|
13375
|
+
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);
|
|
13217
13376
|
const filterRow = checkOwners === null || checkOwners === void 0 ? void 0 : checkOwners.find(owner => owner === null || owner === void 0 ? void 0 : owner.isPrimaryOwner);
|
|
13218
13377
|
console.log("filterRow===", filterRow);
|
|
13219
13378
|
setSelectedRow(filterRow);
|
|
@@ -13223,7 +13382,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13223
13382
|
style: {
|
|
13224
13383
|
marginBottom: "16px"
|
|
13225
13384
|
}
|
|
13226
|
-
}, ((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$
|
|
13385
|
+
}, ((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, {
|
|
13227
13386
|
style: {
|
|
13228
13387
|
marginTop: "40px"
|
|
13229
13388
|
}
|
|
@@ -13238,7 +13397,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13238
13397
|
width: "100%"
|
|
13239
13398
|
}
|
|
13240
13399
|
}, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.map((item, index) => {
|
|
13241
|
-
var _apiDataCheck$
|
|
13400
|
+
var _apiDataCheck$9, _item$billData, _item$billData2, _item$billData3, _item$billData4;
|
|
13242
13401
|
return /*#__PURE__*/React.createElement("div", {
|
|
13243
13402
|
className: "ndc_property_search",
|
|
13244
13403
|
key: index,
|
|
@@ -13279,7 +13438,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13279
13438
|
alignItems: "center",
|
|
13280
13439
|
gap: "12px"
|
|
13281
13440
|
}
|
|
13282
|
-
}, !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$
|
|
13441
|
+
}, !(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", {
|
|
13283
13442
|
className: "submit-bar",
|
|
13284
13443
|
type: "button",
|
|
13285
13444
|
style: {
|
|
@@ -13346,7 +13505,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13346
13505
|
width: "100%"
|
|
13347
13506
|
}
|
|
13348
13507
|
}, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$sewe = propertyDetails.sewerageConnection) === null || _propertyDetails$sewe === void 0 ? void 0 : _propertyDetails$sewe.map((item, index) => {
|
|
13349
|
-
var _apiDataCheck$
|
|
13508
|
+
var _apiDataCheck$0, _item$billData5, _item$billData6, _item$billData7, _item$billData8;
|
|
13350
13509
|
return /*#__PURE__*/React.createElement("div", {
|
|
13351
13510
|
className: "ndc_property_search",
|
|
13352
13511
|
key: index,
|
|
@@ -13387,7 +13546,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
13387
13546
|
alignItems: "center",
|
|
13388
13547
|
gap: "12px"
|
|
13389
13548
|
}
|
|
13390
|
-
}, !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$
|
|
13549
|
+
}, !(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", {
|
|
13391
13550
|
className: "submit-bar",
|
|
13392
13551
|
type: "button",
|
|
13393
13552
|
style: {
|
|
@@ -15237,7 +15396,7 @@ const NDCNewFormSummaryStepThreeEmployee = ({
|
|
|
15237
15396
|
}
|
|
15238
15397
|
};
|
|
15239
15398
|
function mapToNDCPayload(inputData, actionStatus) {
|
|
15240
|
-
var _Digit$UserService$ge, _ref, _inputData$apiData, _inputData$apiData$Ap, _inputData$apiData$Ap2, _formData$responseDat, _formData$apiData, _formData$apiData$App, _inputData$DocummentD, _inputData$DocummentD2;
|
|
15399
|
+
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;
|
|
15241
15400
|
const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
|
|
15242
15401
|
console.log("checkFormData", formData);
|
|
15243
15402
|
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(({
|
|
@@ -15252,7 +15411,21 @@ const NDCNewFormSummaryStepThreeEmployee = ({
|
|
|
15252
15411
|
action: actionStatus
|
|
15253
15412
|
},
|
|
15254
15413
|
owners: owners,
|
|
15255
|
-
NdcDetails: baseApplication === null || baseApplication === void 0 ? void 0 : baseApplication.NdcDetails
|
|
15414
|
+
NdcDetails: baseApplication === null || baseApplication === void 0 ? void 0 : (_baseApplication$NdcD = baseApplication.NdcDetails) === null || _baseApplication$NdcD === void 0 ? void 0 : _baseApplication$NdcD.map(detail => {
|
|
15415
|
+
if (detail.businessService === "PT") {
|
|
15416
|
+
var _formData$NDCDetails, _formData$NDCDetails$, _formData$NDCDetails2, _formData$NDCDetails3;
|
|
15417
|
+
return {
|
|
15418
|
+
...detail,
|
|
15419
|
+
additionalDetails: {
|
|
15420
|
+
...detail.additionalDetails,
|
|
15421
|
+
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,
|
|
15422
|
+
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
|
|
15423
|
+
}
|
|
15424
|
+
};
|
|
15425
|
+
}
|
|
15426
|
+
return detail;
|
|
15427
|
+
}),
|
|
15428
|
+
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,
|
|
15256
15429
|
Documents: []
|
|
15257
15430
|
};
|
|
15258
15431
|
((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 => {
|