@mseva/digit-ui-module-ndc 1.0.36 → 1.0.37
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 -14946
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +212 -105
- 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, BackButton, AppContainer, Loader, Dropdown, UploadFile, Modal, FormComposer, Toast, CardSubHeader, StatusTable, Row, TextInput, CardLabel, FilterFormField, RadioButtons, CheckPoint, ConnectingCheckPoints, DisplayPhotos, Menu, LinkButton, EmployeeModuleCard, SearchField, CheckBox, ComplaintIcon, Header, InboxComposer, MobileNumber, CardLabelError, SearchAction, PopUp, DetailsCard, SearchForm, CloseSvg, Table, CardHeader, LabelFieldPair, DeleteIcon, KeyNote } from '@mseva/digit-ui-react-components';
|
|
1
|
+
import { Card, Banner, ActionBar, SubmitBar as SubmitBar$1, PrivateRoute, BreadCrumb, BackButton, AppContainer, Loader as Loader$1, Dropdown, UploadFile, Modal, FormComposer, Toast, CardSubHeader, StatusTable, Row, TextInput, CardLabel, FilterFormField, RadioButtons, CheckPoint, ConnectingCheckPoints, DisplayPhotos, Menu, LinkButton, EmployeeModuleCard, SearchField, CheckBox, ComplaintIcon, Header, InboxComposer, MobileNumber, CardLabelError, SearchAction, PopUp, DetailsCard, SearchForm, CloseSvg, Table, CardHeader, LabelFieldPair, DeleteIcon, CardSectionHeader, KeyNote } from '@mseva/digit-ui-react-components';
|
|
2
2
|
import React, { Fragment as Fragment$1, useState, useEffect, useRef, useMemo, useReducer, useCallback, forwardRef } from 'react';
|
|
3
3
|
import { useHistory, useLocation, Switch, Route, useRouteMatch, useParams, Link } from 'react-router-dom';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
@@ -781,7 +781,7 @@ function NDCDocument$1({
|
|
|
781
781
|
documentType: doc.documentType.replace(/\./g, "_")
|
|
782
782
|
}));
|
|
783
783
|
if (isLoading) {
|
|
784
|
-
return /*#__PURE__*/React.createElement(Loader, null);
|
|
784
|
+
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
785
785
|
}
|
|
786
786
|
return /*#__PURE__*/React.createElement("div", {
|
|
787
787
|
style: {
|
|
@@ -911,7 +911,7 @@ const NDCModal = ({
|
|
|
911
911
|
errorOne,
|
|
912
912
|
closeToastOne
|
|
913
913
|
}) => {
|
|
914
|
-
var _action$
|
|
914
|
+
var _action$state;
|
|
915
915
|
const [config, setConfig] = useState({});
|
|
916
916
|
const [defaultValues, setDefaultValues] = useState({});
|
|
917
917
|
const [approvers, setApprovers] = useState([]);
|
|
@@ -921,12 +921,14 @@ const NDCModal = ({
|
|
|
921
921
|
const [error, setError] = useState(null);
|
|
922
922
|
const [financialYears, setFinancialYears] = useState([]);
|
|
923
923
|
const [selectedFinancialYear, setSelectedFinancialYear] = useState(null);
|
|
924
|
+
const checkRole = action === null || action === void 0 ? void 0 : (_action$state = action.state) === null || _action$state === void 0 ? void 0 : _action$state.actions;
|
|
925
|
+
const allRoles = [...new Set(checkRole === null || checkRole === void 0 ? void 0 : checkRole.flatMap(a => a.roles))];
|
|
924
926
|
const {
|
|
925
927
|
data: approverData,
|
|
926
928
|
isLoading: PTALoading
|
|
927
929
|
} = Digit.Hooks.useEmployeeSearch(tenantId, {
|
|
928
|
-
roles:
|
|
929
|
-
code:
|
|
930
|
+
roles: allRoles === null || allRoles === void 0 ? void 0 : allRoles.map(role => ({
|
|
931
|
+
code: role
|
|
930
932
|
})),
|
|
931
933
|
isActive: true
|
|
932
934
|
}, {
|
|
@@ -1059,7 +1061,7 @@ const NDCModal = ({
|
|
|
1059
1061
|
label: errorOne,
|
|
1060
1062
|
isDleteBtn: true,
|
|
1061
1063
|
onClose: closeToastOne
|
|
1062
|
-
})) : /*#__PURE__*/React.createElement(Loader, null);
|
|
1064
|
+
})) : /*#__PURE__*/React.createElement(Loader$1, null);
|
|
1063
1065
|
};
|
|
1064
1066
|
|
|
1065
1067
|
const getTimelineCaptions = (checkpoint, index, arr, t) => {
|
|
@@ -1153,7 +1155,7 @@ const ApplicationOverview = () => {
|
|
|
1153
1155
|
isLoading,
|
|
1154
1156
|
data: applicationDetails
|
|
1155
1157
|
} = Digit.Hooks.ndc.useSearchEmployeeApplication({
|
|
1156
|
-
|
|
1158
|
+
applicationNo: id
|
|
1157
1159
|
}, tenantId);
|
|
1158
1160
|
const workflowDetails = Digit.Hooks.useWorkflowDetails({
|
|
1159
1161
|
tenantId: tenantId,
|
|
@@ -1161,6 +1163,7 @@ const ApplicationOverview = () => {
|
|
|
1161
1163
|
moduleCode: "ndc-services",
|
|
1162
1164
|
role: "EMPLOYEE"
|
|
1163
1165
|
});
|
|
1166
|
+
console.log("workflowDetails", workflowDetails);
|
|
1164
1167
|
if (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data = workflowDetails.data) !== null && _workflowDetails$data !== void 0 && (_workflowDetails$data2 = _workflowDetails$data.actionState) !== null && _workflowDetails$data2 !== void 0 && _workflowDetails$data2.nextActions && !workflowDetails.isLoading) workflowDetails.data.actionState.nextActions = [...(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data3 = workflowDetails.data) === null || _workflowDetails$data3 === void 0 ? void 0 : _workflowDetails$data3.nextActions)];
|
|
1165
1168
|
if (workflowDetails && workflowDetails.data && !workflowDetails.isLoading) {
|
|
1166
1169
|
var _workflowDetails$data4, _workflowDetails$data5;
|
|
@@ -1215,6 +1218,7 @@ const ApplicationOverview = () => {
|
|
|
1215
1218
|
return (_e$roles2 = e.roles) === null || _e$roles2 === void 0 ? void 0 : _e$roles2.includes(role);
|
|
1216
1219
|
})) || !e.roles;
|
|
1217
1220
|
}));
|
|
1221
|
+
console.log("actions", actions);
|
|
1218
1222
|
const [displayMenu, setDisplayMenu] = useState(false);
|
|
1219
1223
|
const [selectedAction, setSelectedAction] = useState(null);
|
|
1220
1224
|
const [showModal, setShowModal] = useState(false);
|
|
@@ -1249,7 +1253,7 @@ const ApplicationOverview = () => {
|
|
|
1249
1253
|
mobile: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$owners2 = ndcObject.owners) === null || _ndcObject$owners2 === void 0 ? void 0 : (_ndcObject$owners2$ = _ndcObject$owners2[0]) === null || _ndcObject$owners2$ === void 0 ? void 0 : _ndcObject$owners2$.mobileNumber,
|
|
1250
1254
|
email: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$owners3 = ndcObject.owners) === null || _ndcObject$owners3 === void 0 ? void 0 : (_ndcObject$owners3$ = _ndcObject$owners3[0]) === null || _ndcObject$owners3$ === void 0 ? void 0 : _ndcObject$owners3$.emailId,
|
|
1251
1255
|
address: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$NdcDetails = ndcObject.NdcDetails) === null || _ndcObject$NdcDetails === void 0 ? void 0 : (_ndcObject$NdcDetails2 = _ndcObject$NdcDetails[0]) === null || _ndcObject$NdcDetails2 === void 0 ? void 0 : (_ndcObject$NdcDetails3 = _ndcObject$NdcDetails2.additionalDetails) === null || _ndcObject$NdcDetails3 === void 0 ? void 0 : _ndcObject$NdcDetails3.propertyAddress,
|
|
1252
|
-
applicationNo: ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.
|
|
1256
|
+
applicationNo: ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.applicationNo
|
|
1253
1257
|
};
|
|
1254
1258
|
const Documents = removeDuplicatesByUUID((ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.Documents) || []);
|
|
1255
1259
|
const NdcDetails = (_removeDuplicatesByUU = removeDuplicatesByUUID((ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.NdcDetails) || [])) === null || _removeDuplicatesByUU === void 0 ? void 0 : _removeDuplicatesByUU.map(item => {
|
|
@@ -1278,6 +1282,7 @@ const ApplicationOverview = () => {
|
|
|
1278
1282
|
}, [applicationDetails]);
|
|
1279
1283
|
function onActionSelect(action) {
|
|
1280
1284
|
var _displayData$applican;
|
|
1285
|
+
console.log("action====???", action);
|
|
1281
1286
|
const payload = {
|
|
1282
1287
|
Licenses: [action]
|
|
1283
1288
|
};
|
|
@@ -1350,11 +1355,8 @@ const ApplicationOverview = () => {
|
|
|
1350
1355
|
setSelectedAction(null);
|
|
1351
1356
|
setShowModal(false);
|
|
1352
1357
|
} catch (err) {
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
message: "Something went wrong"
|
|
1356
|
-
});
|
|
1357
|
-
setError("Something went wrong");
|
|
1358
|
+
setErrorOne("Something went wrong");
|
|
1359
|
+
setShowErrorToastt(true);
|
|
1358
1360
|
}
|
|
1359
1361
|
};
|
|
1360
1362
|
const closeModal = () => {
|
|
@@ -1388,7 +1390,7 @@ const ApplicationOverview = () => {
|
|
|
1388
1390
|
privacy: Digit.Utils.getPrivacyObject()
|
|
1389
1391
|
});
|
|
1390
1392
|
if (isLoading || isDetailsLoading || checkLoading) {
|
|
1391
|
-
return /*#__PURE__*/React.createElement(Loader, null);
|
|
1393
|
+
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
1392
1394
|
}
|
|
1393
1395
|
return /*#__PURE__*/React.createElement("div", {
|
|
1394
1396
|
className: "employee-main-application-details"
|
|
@@ -1530,7 +1532,7 @@ const ApplicationOverview = () => {
|
|
|
1530
1532
|
label: t("COMMON_EDIT"),
|
|
1531
1533
|
onSubmit: () => {
|
|
1532
1534
|
var _applicationDetails$A7, _applicationDetails$A8;
|
|
1533
|
-
const id = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A7 = applicationDetails.Applications) === null || _applicationDetails$A7 === void 0 ? void 0 : (_applicationDetails$A8 = _applicationDetails$A7[0]) === null || _applicationDetails$A8 === void 0 ? void 0 : _applicationDetails$A8.
|
|
1535
|
+
const id = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A7 = applicationDetails.Applications) === null || _applicationDetails$A7 === void 0 ? void 0 : (_applicationDetails$A8 = _applicationDetails$A7[0]) === null || _applicationDetails$A8 === void 0 ? void 0 : _applicationDetails$A8.applicationNo;
|
|
1534
1536
|
history.push(`/digit-ui/employee/ndc/create/${id}`);
|
|
1535
1537
|
}
|
|
1536
1538
|
})), showModal ? /*#__PURE__*/React.createElement(NDCModal, {
|
|
@@ -8870,17 +8872,16 @@ function cleanEscapedString(input) {
|
|
|
8870
8872
|
const capitalize = text => text.substr(0, 1).toUpperCase() + text.substr(1);
|
|
8871
8873
|
const ulbCamel = ulb => ulb.toLowerCase().split(" ").map(capitalize).join(" ");
|
|
8872
8874
|
const getAcknowledgementData = async (application, tenantInfo, t) => {
|
|
8873
|
-
var _application$Applicat, _appData$owners, _appData$NdcDetails, _appData$additionalDe, _tenantInfo$city;
|
|
8875
|
+
var _application$Applicat, _appData$owners, _appData$NdcDetails, _appData$NdcDetails2, _appData$NdcDetails2$, _appData$NdcDetails3, _appData$NdcDetails3$, _appData$NdcDetails3$2, _appData$additionalDe, _tenantInfo$city;
|
|
8874
8876
|
const appData = (application === null || application === void 0 ? void 0 : (_application$Applicat = application.Applications) === null || _application$Applicat === void 0 ? void 0 : _application$Applicat[0]) || {};
|
|
8875
8877
|
const owner = (appData === null || appData === void 0 ? void 0 : (_appData$owners = appData.owners) === null || _appData$owners === void 0 ? void 0 : _appData$owners[0]) || {};
|
|
8876
8878
|
const ndc = (appData === null || appData === void 0 ? void 0 : (_appData$NdcDetails = appData.NdcDetails) === null || _appData$NdcDetails === void 0 ? void 0 : _appData$NdcDetails[0]) || {};
|
|
8877
8879
|
const add = (ndc === null || ndc === void 0 ? void 0 : ndc.additionalDetails) || {};
|
|
8878
|
-
const applicationNumber = (appData === null || appData === void 0 ? void 0 : appData.
|
|
8879
|
-
const propertyId =
|
|
8880
|
+
const applicationNumber = (appData === null || appData === void 0 ? void 0 : appData.applicationNo) || "NA";
|
|
8881
|
+
const propertyId = appData === null || appData === void 0 ? void 0 : (_appData$NdcDetails2 = appData.NdcDetails) === null || _appData$NdcDetails2 === void 0 ? void 0 : (_appData$NdcDetails2$ = _appData$NdcDetails2[3]) === null || _appData$NdcDetails2$ === void 0 ? void 0 : _appData$NdcDetails2$.consumerCode;
|
|
8880
8882
|
const propertyType = add !== null && add !== void 0 && add.propertyType ? t(add.propertyType) : "NA";
|
|
8881
8883
|
const applicantName = (owner === null || owner === void 0 ? void 0 : owner.name) || "NA";
|
|
8882
|
-
const address = (owner === null || owner === void 0 ? void 0 : owner.permanentAddress) || (owner === null || owner === void 0 ? void 0 : owner.correspondenceAddress) || "NA";
|
|
8883
|
-
const ulbName = (tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.name) || (appData === null || appData === void 0 ? void 0 : appData.tenantId) || "NA";
|
|
8884
|
+
const address = (appData === null || appData === void 0 ? void 0 : (_appData$NdcDetails3 = appData.NdcDetails) === null || _appData$NdcDetails3 === void 0 ? void 0 : (_appData$NdcDetails3$ = _appData$NdcDetails3[0]) === null || _appData$NdcDetails3$ === void 0 ? void 0 : (_appData$NdcDetails3$2 = _appData$NdcDetails3$.additionalDetails) === null || _appData$NdcDetails3$2 === void 0 ? void 0 : _appData$NdcDetails3$2.propertyAddress) || (owner === null || owner === void 0 ? void 0 : owner.permanentAddress) || (owner === null || owner === void 0 ? void 0 : owner.correspondenceAddress) || "NA";
|
|
8884
8885
|
const duesAmount = (add === null || add === void 0 ? void 0 : add.duesAmount) || (appData === null || appData === void 0 ? void 0 : (_appData$additionalDe = appData.additionalDetails) === null || _appData$additionalDe === void 0 ? void 0 : _appData$additionalDe.duesAmount) || "0";
|
|
8885
8886
|
const certificateBody = `${t("NDC_MSG_INTRO")}
|
|
8886
8887
|
|
|
@@ -8888,9 +8889,7 @@ ${t("NDC_MSG_APPLICATION_LABEL")}: ${applicationNumber}
|
|
|
8888
8889
|
|
|
8889
8890
|
${t("NDC_MSG_PROPERTY_LABEL")}: ${propertyId} ${t("NDC_MSG_PROPERTY_TYPE_LABEL")} ${propertyType}
|
|
8890
8891
|
|
|
8891
|
-
${t("NDC_MSG_APPLICANT_LABEL")}: ${applicantName} ${t("NDC_MSG_FOR_LAND")} ${address}
|
|
8892
|
-
|
|
8893
|
-
${t("NDC_MSG_FALLING_CLAUSE_PART1")} ${t("NDC_MSG_FALLING_CLAUSE_PART2")} ${ulbName} ${t("NDC_MSG_AFTER_RECOVERY")} ${duesAmount} ${t("NDC_MSG_DUES_LIST")}
|
|
8892
|
+
${t("NDC_MSG_APPLICANT_LABEL")}: ${applicantName} ${t("NDC_MSG_FOR_LAND")} ${address} ${t("NDC_MSG_FALLING_CLAUSE_PART1")} ${t("NDC_MSG_FALLING_CLAUSE_PART2")} Municipal Council/ Corporation ${t("NDC_MSG_AFTER_RECOVERY")} ${duesAmount} ${t("NDC_MSG_DUES_LIST")}
|
|
8894
8893
|
|
|
8895
8894
|
${t("NDC_MSG_DECLARATION_TITLE")}
|
|
8896
8895
|
${t("NDC_MSG_DECL_A")}
|
|
@@ -8979,7 +8978,7 @@ const CitizenApplicationOverview = () => {
|
|
|
8979
8978
|
isLoading,
|
|
8980
8979
|
data: applicationDetails
|
|
8981
8980
|
} = Digit.Hooks.ndc.useSearchEmployeeApplication({
|
|
8982
|
-
|
|
8981
|
+
applicationNo: id
|
|
8983
8982
|
}, tenantId);
|
|
8984
8983
|
const workflowDetails = Digit.Hooks.useWorkflowDetails({
|
|
8985
8984
|
tenantId: tenantId,
|
|
@@ -9021,7 +9020,7 @@ const CitizenApplicationOverview = () => {
|
|
|
9021
9020
|
mobile: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$owners2 = ndcObject.owners) === null || _ndcObject$owners2 === void 0 ? void 0 : (_ndcObject$owners2$ = _ndcObject$owners2[0]) === null || _ndcObject$owners2$ === void 0 ? void 0 : _ndcObject$owners2$.mobileNumber,
|
|
9022
9021
|
email: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$owners3 = ndcObject.owners) === null || _ndcObject$owners3 === void 0 ? void 0 : (_ndcObject$owners3$ = _ndcObject$owners3[0]) === null || _ndcObject$owners3$ === void 0 ? void 0 : _ndcObject$owners3$.emailId,
|
|
9023
9022
|
address: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$NdcDetails = ndcObject.NdcDetails) === null || _ndcObject$NdcDetails === void 0 ? void 0 : (_ndcObject$NdcDetails2 = _ndcObject$NdcDetails[0]) === null || _ndcObject$NdcDetails2 === void 0 ? void 0 : (_ndcObject$NdcDetails3 = _ndcObject$NdcDetails2.additionalDetails) === null || _ndcObject$NdcDetails3 === void 0 ? void 0 : _ndcObject$NdcDetails3.propertyAddress,
|
|
9024
|
-
applicationNo: ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.
|
|
9023
|
+
applicationNo: ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.applicationNo
|
|
9025
9024
|
};
|
|
9026
9025
|
const Documents = removeDuplicatesByUUID((ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.Documents) || []);
|
|
9027
9026
|
const NdcDetails = (_removeDuplicatesByUU = removeDuplicatesByUUID((ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.NdcDetails) || [])) === null || _removeDuplicatesByUU === void 0 ? void 0 : _removeDuplicatesByUU.map(item => {
|
|
@@ -9089,7 +9088,7 @@ const CitizenApplicationOverview = () => {
|
|
|
9089
9088
|
privacy: Digit.Utils.getPrivacyObject()
|
|
9090
9089
|
});
|
|
9091
9090
|
if (isLoading || isDetailsLoading) {
|
|
9092
|
-
return /*#__PURE__*/React.createElement(Loader, null);
|
|
9091
|
+
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
9093
9092
|
}
|
|
9094
9093
|
console.log("applicationDetails", applicationDetails);
|
|
9095
9094
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -9109,7 +9108,7 @@ const CitizenApplicationOverview = () => {
|
|
|
9109
9108
|
label: t("COMMON_EDIT"),
|
|
9110
9109
|
onSubmit: () => {
|
|
9111
9110
|
var _applicationDetails$A9, _applicationDetails$A0;
|
|
9112
|
-
const id = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A9 = applicationDetails.Applications) === null || _applicationDetails$A9 === void 0 ? void 0 : (_applicationDetails$A0 = _applicationDetails$A9[0]) === null || _applicationDetails$A0 === void 0 ? void 0 : _applicationDetails$A0.
|
|
9111
|
+
const id = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A9 = applicationDetails.Applications) === null || _applicationDetails$A9 === void 0 ? void 0 : (_applicationDetails$A0 = _applicationDetails$A9[0]) === null || _applicationDetails$A0 === void 0 ? void 0 : _applicationDetails$A0.applicationNo;
|
|
9113
9112
|
history.push(`/digit-ui/citizen/ndc/new-application/${id}`);
|
|
9114
9113
|
}
|
|
9115
9114
|
}))), /*#__PURE__*/React.createElement(Card, {
|
|
@@ -9322,7 +9321,7 @@ const SearchFormFieldsComponents = ({
|
|
|
9322
9321
|
textAlign: "start"
|
|
9323
9322
|
}
|
|
9324
9323
|
}, /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement("label", null, t("NOC_HOME_SEARCH_RESULTS_APP_NO_LABEL")), /*#__PURE__*/React.createElement(TextInput, {
|
|
9325
|
-
name: "
|
|
9324
|
+
name: "applicationNo",
|
|
9326
9325
|
inputRef: registerRef({})
|
|
9327
9326
|
})), /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement("label", null, t("CORE_COMMON_PHONE_NUMBER")), /*#__PURE__*/React.createElement(TextInput, {
|
|
9328
9327
|
name: "mobileNumber",
|
|
@@ -9335,7 +9334,7 @@ const SearchFormFieldsComponents = ({
|
|
|
9335
9334
|
}, searchFieldComponents)))));
|
|
9336
9335
|
}
|
|
9337
9336
|
return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement("label", null, t("NOC_APPLICATION_NUMBER_LABEL")), /*#__PURE__*/React.createElement(TextInput, {
|
|
9338
|
-
name: "
|
|
9337
|
+
name: "applicationNo",
|
|
9339
9338
|
inputRef: registerRef({})
|
|
9340
9339
|
})), /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement("label", null, t("NOC_BPA_APPLICATION_NUMBER_LABEL")), /*#__PURE__*/React.createElement(TextInput, {
|
|
9341
9340
|
name: "sourceRefId",
|
|
@@ -9434,6 +9433,7 @@ const useInboxTableConfig = ({
|
|
|
9434
9433
|
row
|
|
9435
9434
|
}) => {
|
|
9436
9435
|
var _row$original, _row$original2;
|
|
9436
|
+
console.log("row", row);
|
|
9437
9437
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Link, {
|
|
9438
9438
|
to: `${parentRoute}/inbox/application-overview/${(_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.applicationId}`
|
|
9439
9439
|
}, /*#__PURE__*/React.createElement("span", {
|
|
@@ -9629,7 +9629,7 @@ const Inbox = ({
|
|
|
9629
9629
|
const InboxObjectInSessionStorage = Digit.SessionStorage.get("NDC.INBOX");
|
|
9630
9630
|
const onSearchFormReset = setSearchFormValue => {
|
|
9631
9631
|
setSearchFormValue("sourceRefId", null);
|
|
9632
|
-
setSearchFormValue("
|
|
9632
|
+
setSearchFormValue("applicationNo", null);
|
|
9633
9633
|
setSearchFormValue("mobileNumber", null);
|
|
9634
9634
|
dispatch({
|
|
9635
9635
|
action: "mutateSearchForm",
|
|
@@ -10066,7 +10066,7 @@ const SearchApplicationMobileView = ({
|
|
|
10066
10066
|
...props
|
|
10067
10067
|
}), [currentlyActiveMobileModal]);
|
|
10068
10068
|
if (isLoading) {
|
|
10069
|
-
return /*#__PURE__*/React.createElement(Loader, null);
|
|
10069
|
+
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
10070
10070
|
}
|
|
10071
10071
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
10072
10072
|
className: "searchBox"
|
|
@@ -10156,7 +10156,7 @@ const SearchApplicationDesktopView = ({
|
|
|
10156
10156
|
}, [getValues("offset"), getValues("limit")]);
|
|
10157
10157
|
const TableComponent = () => {
|
|
10158
10158
|
if (isLoading) {
|
|
10159
|
-
return /*#__PURE__*/React.createElement(Loader, null);
|
|
10159
|
+
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
10160
10160
|
} else {
|
|
10161
10161
|
var _data$, _data$2;
|
|
10162
10162
|
return data !== null && data !== void 0 && (_data$ = data[0]) !== null && _data$ !== void 0 && _data$.display ? /*#__PURE__*/React.createElement(Card, {
|
|
@@ -10389,7 +10389,7 @@ const PropertyDetailsForm = ({
|
|
|
10389
10389
|
label: t(showToast.label),
|
|
10390
10390
|
onClose: closeToast,
|
|
10391
10391
|
isDleteBtn: "true"
|
|
10392
|
-
}), isLoading && /*#__PURE__*/React.createElement(Loader, null));
|
|
10392
|
+
}), isLoading && /*#__PURE__*/React.createElement(Loader$1, null));
|
|
10393
10393
|
};
|
|
10394
10394
|
|
|
10395
10395
|
var b = "function" === typeof Symbol && Symbol.for,
|
|
@@ -11609,7 +11609,7 @@ const PropertyDetailsFormUser = ({
|
|
|
11609
11609
|
label: t(showToast.label),
|
|
11610
11610
|
onClose: closeToast,
|
|
11611
11611
|
isDleteBtn: "true"
|
|
11612
|
-
}), isLoading && /*#__PURE__*/React.createElement(Loader, null));
|
|
11612
|
+
}), isLoading && /*#__PURE__*/React.createElement(Loader$1, null));
|
|
11613
11613
|
};
|
|
11614
11614
|
|
|
11615
11615
|
const PropertyDetailsStep2 = ({
|
|
@@ -11727,7 +11727,7 @@ const NewNDCStepForm = () => {
|
|
|
11727
11727
|
isLoading,
|
|
11728
11728
|
data: applicationDetails
|
|
11729
11729
|
} = Digit.Hooks.ndc.useSearchEmployeeApplication({
|
|
11730
|
-
|
|
11730
|
+
applicationNo: id
|
|
11731
11731
|
}, tenantId);
|
|
11732
11732
|
useEffect(() => {
|
|
11733
11733
|
console.log("applicationDetails", applicationDetails);
|
|
@@ -11769,6 +11769,57 @@ const NewNDCStepForm = () => {
|
|
|
11769
11769
|
}));
|
|
11770
11770
|
};
|
|
11771
11771
|
|
|
11772
|
+
const Loader = ({
|
|
11773
|
+
page: _page = false
|
|
11774
|
+
}) => {
|
|
11775
|
+
const baseStyle = {
|
|
11776
|
+
display: "flex",
|
|
11777
|
+
justifyContent: "center",
|
|
11778
|
+
alignItems: "center"
|
|
11779
|
+
};
|
|
11780
|
+
const pageStyle = {
|
|
11781
|
+
...baseStyle,
|
|
11782
|
+
position: "fixed",
|
|
11783
|
+
top: 0,
|
|
11784
|
+
left: 0,
|
|
11785
|
+
width: "100vw",
|
|
11786
|
+
height: "100vh",
|
|
11787
|
+
background: "rgba(255,255,255,0.6)",
|
|
11788
|
+
backdropFilter: "blur(4px)",
|
|
11789
|
+
zIndex: 9999
|
|
11790
|
+
};
|
|
11791
|
+
const moduleStyle = {
|
|
11792
|
+
...baseStyle,
|
|
11793
|
+
minHeight: "100px",
|
|
11794
|
+
width: "100%",
|
|
11795
|
+
position: "relative"
|
|
11796
|
+
};
|
|
11797
|
+
const spinnerStyle = {
|
|
11798
|
+
width: "64px",
|
|
11799
|
+
height: "64px",
|
|
11800
|
+
border: "8px solid #1976d2",
|
|
11801
|
+
borderTop: "8px solid transparent",
|
|
11802
|
+
borderRadius: "50%",
|
|
11803
|
+
animation: "spin 1.2s linear infinite"
|
|
11804
|
+
};
|
|
11805
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
11806
|
+
style: _page ? pageStyle : moduleStyle
|
|
11807
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11808
|
+
style: spinnerStyle
|
|
11809
|
+
}), /*#__PURE__*/React.createElement("style", null, `
|
|
11810
|
+
@keyframes spin {
|
|
11811
|
+
0% { transform: rotate(0deg); }
|
|
11812
|
+
100% { transform: rotate(360deg); }
|
|
11813
|
+
}
|
|
11814
|
+
`));
|
|
11815
|
+
};
|
|
11816
|
+
Loader.propTypes = {
|
|
11817
|
+
page: propTypes.bool
|
|
11818
|
+
};
|
|
11819
|
+
Loader.defaultProps = {
|
|
11820
|
+
page: false
|
|
11821
|
+
};
|
|
11822
|
+
|
|
11772
11823
|
const NewNDCStepFormOne = ({
|
|
11773
11824
|
config,
|
|
11774
11825
|
onGoNext,
|
|
@@ -11781,6 +11832,7 @@ const NewNDCStepFormOne = ({
|
|
|
11781
11832
|
const user = Digit.UserService.getUser();
|
|
11782
11833
|
const id = window.location.pathname.split("/").pop();
|
|
11783
11834
|
const currentStepData = useSelector(state => state.ndc.NDCForm.formData && state.ndc.NDCForm.formData[config.key] ? state.ndc.NDCForm.formData[config.key] : {});
|
|
11835
|
+
const [getLoader, setLoader] = useState(false);
|
|
11784
11836
|
const checkFormData = useSelector(state => state.ndc.NDCForm.formData || {});
|
|
11785
11837
|
const checkFormDatass = useSelector(state => state.ndc.NDCForm || {});
|
|
11786
11838
|
const tenantId = window.localStorage.getItem("CITIZEN.CITY");
|
|
@@ -11798,13 +11850,14 @@ const NewNDCStepFormOne = ({
|
|
|
11798
11850
|
console.log("checkFormData", checkFormData);
|
|
11799
11851
|
const isRealId = id && id.startsWith("NDC-");
|
|
11800
11852
|
console.log("isRealId", isRealId);
|
|
11801
|
-
if (checkFormData !== null && checkFormData !== void 0 && (_checkFormData$apiDat = checkFormData.apiData) !== null && _checkFormData$apiDat !== void 0 && (_checkFormData$apiDat2 = _checkFormData$apiDat.Applications) !== null && _checkFormData$apiDat2 !== void 0 && (_checkFormData$apiDat3 = _checkFormData$apiDat2[0]) !== null && _checkFormData$apiDat3 !== void 0 && _checkFormData$apiDat3.
|
|
11853
|
+
if (checkFormData !== null && checkFormData !== void 0 && (_checkFormData$apiDat = checkFormData.apiData) !== null && _checkFormData$apiDat !== void 0 && (_checkFormData$apiDat2 = _checkFormData$apiDat.Applications) !== null && _checkFormData$apiDat2 !== void 0 && (_checkFormData$apiDat3 = _checkFormData$apiDat2[0]) !== null && _checkFormData$apiDat3 !== void 0 && _checkFormData$apiDat3.applicationNo || checkFormData !== null && checkFormData !== void 0 && (_checkFormData$respon = checkFormData.responseData) !== null && _checkFormData$respon !== void 0 && (_checkFormData$respon2 = _checkFormData$respon[0]) !== null && _checkFormData$respon2 !== void 0 && _checkFormData$respon2.applicationNo || isRealId) {
|
|
11802
11854
|
updateApplication(data);
|
|
11803
11855
|
console.log("here bab");
|
|
11804
11856
|
} else createApplication(data);
|
|
11805
11857
|
}
|
|
11806
11858
|
const createApplication = async data => {
|
|
11807
|
-
var _Digit$UserService$ge, _user$info, _user$info2, _data$PropertyDetails, _user$info3, _user$info4, _data$PropertyDetails2, _data$PropertyDetails4, _data$PropertyDetails6, _data$PropertyDetails7, _data$NDCReason
|
|
11859
|
+
var _Digit$UserService$ge, _user$info, _user$info2, _data$PropertyDetails, _user$info3, _user$info4, _data$PropertyDetails2, _data$PropertyDetails4, _data$PropertyDetails6, _data$PropertyDetails7, _data$NDCReason;
|
|
11860
|
+
setLoader(true);
|
|
11808
11861
|
const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
|
|
11809
11862
|
const applicantId = applicant === null || applicant === void 0 ? void 0 : applicant.uuid;
|
|
11810
11863
|
const owners = [{
|
|
@@ -11874,22 +11927,28 @@ const NewNDCStepFormOne = ({
|
|
|
11874
11927
|
}
|
|
11875
11928
|
}]
|
|
11876
11929
|
};
|
|
11877
|
-
|
|
11878
|
-
|
|
11879
|
-
|
|
11880
|
-
|
|
11881
|
-
|
|
11882
|
-
|
|
11883
|
-
|
|
11884
|
-
|
|
11885
|
-
|
|
11886
|
-
|
|
11887
|
-
|
|
11888
|
-
|
|
11889
|
-
|
|
11890
|
-
|
|
11891
|
-
|
|
11892
|
-
|
|
11930
|
+
try {
|
|
11931
|
+
var _response$ResponseInf;
|
|
11932
|
+
const response = await Digit.NDCService.NDCcreate({
|
|
11933
|
+
tenantId,
|
|
11934
|
+
details: payload
|
|
11935
|
+
});
|
|
11936
|
+
setLoader(false);
|
|
11937
|
+
if ((response === null || response === void 0 ? void 0 : (_response$ResponseInf = response.ResponseInfo) === null || _response$ResponseInf === void 0 ? void 0 : _response$ResponseInf.status) === "successful") {
|
|
11938
|
+
dispatch(updateNDCForm("apiData", response));
|
|
11939
|
+
onGoNext();
|
|
11940
|
+
return {
|
|
11941
|
+
isSuccess: true,
|
|
11942
|
+
response
|
|
11943
|
+
};
|
|
11944
|
+
} else {
|
|
11945
|
+
return {
|
|
11946
|
+
isSuccess: false,
|
|
11947
|
+
response
|
|
11948
|
+
};
|
|
11949
|
+
}
|
|
11950
|
+
} catch (error) {
|
|
11951
|
+
setLoader(false);
|
|
11893
11952
|
}
|
|
11894
11953
|
};
|
|
11895
11954
|
const updateApplication = async data => {
|
|
@@ -12069,6 +12128,8 @@ const NewNDCStepFormOne = ({
|
|
|
12069
12128
|
label: t(`${config.texts.submitBarLabel}`),
|
|
12070
12129
|
currentStep: config.currStepNumber,
|
|
12071
12130
|
onBackClick: onGoBack
|
|
12131
|
+
}), getLoader && /*#__PURE__*/React.createElement(Loader, {
|
|
12132
|
+
page: true
|
|
12072
12133
|
}), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
12073
12134
|
isDleteBtn: true,
|
|
12074
12135
|
error: true,
|
|
@@ -12141,7 +12202,7 @@ function SelectNDCReason({
|
|
|
12141
12202
|
}
|
|
12142
12203
|
}, [apiDataCheck, ndcReasonOptions]);
|
|
12143
12204
|
if (isLoading) {
|
|
12144
|
-
return /*#__PURE__*/React.createElement(Loader, null);
|
|
12205
|
+
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
12145
12206
|
}
|
|
12146
12207
|
const errorStyle = {
|
|
12147
12208
|
width: "70%",
|
|
@@ -12593,7 +12654,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12593
12654
|
}
|
|
12594
12655
|
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12595
12656
|
className: "card-label-smaller ndc_card_labels"
|
|
12596
|
-
}, `${t("NDC_WATER_CONNECTION")}`), waterConnectionLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
|
|
12657
|
+
}, `${t("NDC_WATER_CONNECTION")}`), waterConnectionLoading ? /*#__PURE__*/React.createElement(Loader$1, null) : /*#__PURE__*/React.createElement("div", {
|
|
12597
12658
|
className: "field",
|
|
12598
12659
|
style: {
|
|
12599
12660
|
display: "flex",
|
|
@@ -12637,7 +12698,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12637
12698
|
disabled: !item.isEdit,
|
|
12638
12699
|
onBlur: props.onBlur
|
|
12639
12700
|
})
|
|
12640
|
-
}), item.isLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
|
|
12701
|
+
}), item.isLoading ? /*#__PURE__*/React.createElement(Loader$1, null) : /*#__PURE__*/React.createElement("div", {
|
|
12641
12702
|
style: {
|
|
12642
12703
|
display: "flex",
|
|
12643
12704
|
alignItems: "center",
|
|
@@ -12701,7 +12762,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12701
12762
|
}
|
|
12702
12763
|
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12703
12764
|
className: "card-label-smaller ndc_card_labels"
|
|
12704
|
-
}, `${t("NDC_SEWERAGE_CONNECTION")} `), sewerageConnectionLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
|
|
12765
|
+
}, `${t("NDC_SEWERAGE_CONNECTION")} `), sewerageConnectionLoading ? /*#__PURE__*/React.createElement(Loader$1, null) : /*#__PURE__*/React.createElement("div", {
|
|
12705
12766
|
className: "field",
|
|
12706
12767
|
style: {
|
|
12707
12768
|
display: "flex",
|
|
@@ -12745,7 +12806,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12745
12806
|
disabled: !item.isEdit,
|
|
12746
12807
|
onBlur: field.onBlur
|
|
12747
12808
|
})
|
|
12748
|
-
}), item.isLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
|
|
12809
|
+
}), item.isLoading ? /*#__PURE__*/React.createElement(Loader$1, null) : /*#__PURE__*/React.createElement("div", {
|
|
12749
12810
|
style: {
|
|
12750
12811
|
display: "flex",
|
|
12751
12812
|
alignItems: "center",
|
|
@@ -12968,6 +13029,7 @@ const PropertySearchNSummary = ({
|
|
|
12968
13029
|
const search = useLocation().search;
|
|
12969
13030
|
const urlPropertyId = new URLSearchParams(search).get("propertyId");
|
|
12970
13031
|
const isfirstRender = useRef(true);
|
|
13032
|
+
const [getLoader, setLoader] = useState(false);
|
|
12971
13033
|
const ptFromApi = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$ = apiDataCheck[0]) === null || _apiDataCheck$ === void 0 ? void 0 : (_apiDataCheck$$NdcDet = _apiDataCheck$.NdcDetails) === null || _apiDataCheck$$NdcDet === void 0 ? void 0 : _apiDataCheck$$NdcDet.find(item => item.businessService == "PT");
|
|
12972
13034
|
const [propertyId, setPropertyId] = useState((formData === null || formData === void 0 ? void 0 : (_formData$cpt = formData.cpt) === null || _formData$cpt === void 0 ? void 0 : _formData$cpt.id) || (urlPropertyId !== "null" ? urlPropertyId : "") || (ptFromApi === null || ptFromApi === void 0 ? void 0 : ptFromApi.consumerCode) || "");
|
|
12973
13035
|
const [searchPropertyId, setSearchPropertyId] = useState((formData === null || formData === void 0 ? void 0 : (_formData$cpt2 = formData.cpt) === null || _formData$cpt2 === void 0 ? void 0 : _formData$cpt2.id) || (urlPropertyId !== "null" ? urlPropertyId : "") || (ptFromApi === null || ptFromApi === void 0 ? void 0 : ptFromApi.consumerCode) || "");
|
|
@@ -13155,6 +13217,7 @@ const PropertySearchNSummary = ({
|
|
|
13155
13217
|
});
|
|
13156
13218
|
}
|
|
13157
13219
|
async function fetchBill() {
|
|
13220
|
+
setLoader(true);
|
|
13158
13221
|
try {
|
|
13159
13222
|
var _formData$cpt0, _result$Bill;
|
|
13160
13223
|
const result = await Digit.PaymentService.fetchBill(tenantId, {
|
|
@@ -13205,7 +13268,9 @@ const PropertySearchNSummary = ({
|
|
|
13205
13268
|
setNoDue(true);
|
|
13206
13269
|
setCheckStats(false);
|
|
13207
13270
|
}
|
|
13271
|
+
setLoader(false);
|
|
13208
13272
|
} catch (error) {
|
|
13273
|
+
setLoader(false);
|
|
13209
13274
|
setShowToast({
|
|
13210
13275
|
error: true,
|
|
13211
13276
|
label: t("NDC_MESSAGE_FETCH_FAILED")
|
|
@@ -13227,7 +13292,7 @@ const PropertySearchNSummary = ({
|
|
|
13227
13292
|
return () => clearTimeout(timer);
|
|
13228
13293
|
}
|
|
13229
13294
|
}, [showToast]);
|
|
13230
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
13295
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
13231
13296
|
style: {
|
|
13232
13297
|
marginBottom: "16px"
|
|
13233
13298
|
}
|
|
@@ -13307,7 +13372,9 @@ const PropertySearchNSummary = ({
|
|
|
13307
13372
|
onClose: () => {
|
|
13308
13373
|
setShowToast(null);
|
|
13309
13374
|
}
|
|
13310
|
-
})))
|
|
13375
|
+
})), (isLoading || getLoader) && /*#__PURE__*/React.createElement(Loader, {
|
|
13376
|
+
page: true
|
|
13377
|
+
}));
|
|
13311
13378
|
};
|
|
13312
13379
|
|
|
13313
13380
|
const SelectNDCDocuments = ({
|
|
@@ -13357,7 +13424,7 @@ const SelectNDCDocuments = ({
|
|
|
13357
13424
|
goNext();
|
|
13358
13425
|
}, [documents]);
|
|
13359
13426
|
if (isLoading) {
|
|
13360
|
-
return /*#__PURE__*/React.createElement(Loader, null);
|
|
13427
|
+
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
13361
13428
|
}
|
|
13362
13429
|
return /*#__PURE__*/React.createElement("div", null, ndcDocuments === null || ndcDocuments === void 0 ? void 0 : ndcDocuments.map((document, index) => {
|
|
13363
13430
|
return /*#__PURE__*/React.createElement(SelectDocument, {
|
|
@@ -13498,7 +13565,7 @@ const NewNDCStepFormTwo = ({
|
|
|
13498
13565
|
data: applicationDetails,
|
|
13499
13566
|
refetch
|
|
13500
13567
|
} = Digit.Hooks.ndc.useSearchEmployeeApplication({
|
|
13501
|
-
|
|
13568
|
+
applicationNo: id
|
|
13502
13569
|
}, tenantId);
|
|
13503
13570
|
useEffect(() => {
|
|
13504
13571
|
if (applicationDetails !== null && applicationDetails !== void 0 && applicationDetails.Applications.length) {
|
|
@@ -13623,7 +13690,7 @@ const NDCSummary = ({
|
|
|
13623
13690
|
goNext,
|
|
13624
13691
|
onGoBack
|
|
13625
13692
|
}) => {
|
|
13626
|
-
var _formData$DocummentDe, _formData$DocummentDe2, _formData$apiData, _formData$apiData$App, _formData$apiData$App2, _formData$responseDat, _formData$responseDat2, _user$info, _user$info$roles, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5,
|
|
13693
|
+
var _formData$DocummentDe, _formData$DocummentDe2, _formData$apiData, _formData$apiData$App, _formData$apiData$App2, _formData$responseDat, _formData$responseDat2, _user$info, _user$info$roles, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _formData$NDCDetails, _formData$NDCDetails$, _formData$NDCDetails2, _formData$NDCDetails3, _formData$NDCDetails4, _formData$NDCDetails5, _formData$NDCDetails6, _formData$NDCDetails7, _formData$NDCDetails8, _formData$NDCDetails9, _formData$NDCDetails0, _formData$NDCDetails1, _formData$NDCDetails10, _formData$NDCDetails11, _formData$NDCDetails12, _formData$NDCDetails13, _formData$NDCDetails14, _formData$NDCDetails15, _formData$NDCDetails16, _formData$NDCDetails17, _formData$NDCDetails18, _formData$NDCDetails19, _formData$NDCDetails20, _formData$NDCDetails21, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8;
|
|
13627
13694
|
const {
|
|
13628
13695
|
pathname: url
|
|
13629
13696
|
} = useLocation();
|
|
@@ -13635,9 +13702,8 @@ const NDCSummary = ({
|
|
|
13635
13702
|
const dispatch = useDispatch();
|
|
13636
13703
|
const mutateScreen = url.includes("/property-mutate/");
|
|
13637
13704
|
let user = Digit.UserService.getUser();
|
|
13638
|
-
console.log("formData", formData);
|
|
13639
13705
|
let docs = formData === null || formData === void 0 ? void 0 : (_formData$DocummentDe = formData.DocummentDetails) === null || _formData$DocummentDe === void 0 ? void 0 : (_formData$DocummentDe2 = _formData$DocummentDe.documents) === null || _formData$DocummentDe2 === void 0 ? void 0 : _formData$DocummentDe2.documents;
|
|
13640
|
-
const appId = (formData === null || formData === void 0 ? void 0 : (_formData$apiData = formData.apiData) === null || _formData$apiData === void 0 ? void 0 : (_formData$apiData$App = _formData$apiData.Applications) === null || _formData$apiData$App === void 0 ? void 0 : (_formData$apiData$App2 = _formData$apiData$App[0]) === null || _formData$apiData$App2 === void 0 ? void 0 : _formData$apiData$App2.
|
|
13706
|
+
const appId = (formData === null || formData === void 0 ? void 0 : (_formData$apiData = formData.apiData) === null || _formData$apiData === void 0 ? void 0 : (_formData$apiData$App = _formData$apiData.Applications) === null || _formData$apiData$App === void 0 ? void 0 : (_formData$apiData$App2 = _formData$apiData$App[0]) === null || _formData$apiData$App2 === void 0 ? void 0 : _formData$apiData$App2.applicationNo) || (formData === null || formData === void 0 ? void 0 : (_formData$responseDat = formData.responseData) === null || _formData$responseDat === void 0 ? void 0 : (_formData$responseDat2 = _formData$responseDat[0]) === null || _formData$responseDat2 === void 0 ? void 0 : _formData$responseDat2.applicationNo);
|
|
13641
13707
|
const tenantId = window.location.href.includes("citizen") ? window.localStorage.getItem("CITIZEN.CITY") : window.localStorage.getItem("Employee.tenant-id");
|
|
13642
13708
|
const isCitizen = window.location.href.includes("citizen");
|
|
13643
13709
|
const [getData, setData] = useState();
|
|
@@ -13647,7 +13713,7 @@ const NDCSummary = ({
|
|
|
13647
13713
|
};
|
|
13648
13714
|
Digit.Hooks.useClickOutside(menuRef, closeMenu, displayMenu);
|
|
13649
13715
|
const fetchCalculations = async () => {
|
|
13650
|
-
var _response$Calculation
|
|
13716
|
+
var _response$Calculation;
|
|
13651
13717
|
const payload = {
|
|
13652
13718
|
CalculationCriteria: [{
|
|
13653
13719
|
applicationNumber: appId,
|
|
@@ -13661,8 +13727,7 @@ const NDCSummary = ({
|
|
|
13661
13727
|
},
|
|
13662
13728
|
details: payload
|
|
13663
13729
|
});
|
|
13664
|
-
|
|
13665
|
-
setData(response === null || response === void 0 ? void 0 : (_response$Calculation3 = response.Calculation) === null || _response$Calculation3 === void 0 ? void 0 : _response$Calculation3[0]);
|
|
13730
|
+
setData(response === null || response === void 0 ? void 0 : (_response$Calculation = response.Calculation) === null || _response$Calculation === void 0 ? void 0 : _response$Calculation[0]);
|
|
13666
13731
|
};
|
|
13667
13732
|
useEffect(() => {
|
|
13668
13733
|
fetchCalculations();
|
|
@@ -13687,8 +13752,6 @@ const NDCSummary = ({
|
|
|
13687
13752
|
function onActionSelect(action) {
|
|
13688
13753
|
goNext(action);
|
|
13689
13754
|
}
|
|
13690
|
-
console.log("workflowDetails", workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data6 = workflowDetails.data) === null || _workflowDetails$data6 === void 0 ? void 0 : _workflowDetails$data6.nextActions);
|
|
13691
|
-
console.log("actions", actions);
|
|
13692
13755
|
const pageStyle = {
|
|
13693
13756
|
padding: "2rem",
|
|
13694
13757
|
backgroundColor: "#f9f9f9",
|
|
@@ -13760,15 +13823,23 @@ const NDCSummary = ({
|
|
|
13760
13823
|
style: sectionStyle
|
|
13761
13824
|
}, (docs === null || docs === void 0 ? void 0 : docs.length) > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
13762
13825
|
style: documentsContainerStyle
|
|
13763
|
-
}, docs === null || docs === void 0 ? void 0 : docs.map((doc, index) =>
|
|
13764
|
-
|
|
13765
|
-
|
|
13766
|
-
|
|
13767
|
-
|
|
13768
|
-
|
|
13769
|
-
|
|
13770
|
-
|
|
13771
|
-
|
|
13826
|
+
}, docs === null || docs === void 0 ? void 0 : docs.map((doc, index) => {
|
|
13827
|
+
var _doc$documentType;
|
|
13828
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
13829
|
+
key: index,
|
|
13830
|
+
style: documentCardStyle
|
|
13831
|
+
}, /*#__PURE__*/React.createElement(NDCDocument$1, {
|
|
13832
|
+
value: docs,
|
|
13833
|
+
Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
13834
|
+
index: index,
|
|
13835
|
+
formData: formData
|
|
13836
|
+
}), /*#__PURE__*/React.createElement(CardSectionHeader, {
|
|
13837
|
+
style: {
|
|
13838
|
+
marginTop: "10px",
|
|
13839
|
+
fontSize: "15px"
|
|
13840
|
+
}
|
|
13841
|
+
}, t(`NDC_${doc === null || doc === void 0 ? void 0 : (_doc$documentType = doc.documentType) === null || _doc$documentType === void 0 ? void 0 : _doc$documentType.replace(/\./g, "_")}_LABEL`)));
|
|
13842
|
+
})) : /*#__PURE__*/React.createElement("div", null, t("TL_NO_DOCUMENTS_MSG"))), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar$1, {
|
|
13772
13843
|
style: {
|
|
13773
13844
|
background: " white",
|
|
13774
13845
|
color: "black",
|
|
@@ -13777,7 +13848,7 @@ const NDCSummary = ({
|
|
|
13777
13848
|
},
|
|
13778
13849
|
label: "Back",
|
|
13779
13850
|
onSubmit: onGoBack
|
|
13780
|
-
}), displayMenu && (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$
|
|
13851
|
+
}), displayMenu && (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data6 = workflowDetails.data) !== null && _workflowDetails$data6 !== void 0 && (_workflowDetails$data7 = _workflowDetails$data6.actionState) !== null && _workflowDetails$data7 !== void 0 && _workflowDetails$data7.nextActions || workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data8 = workflowDetails.data) !== null && _workflowDetails$data8 !== void 0 && _workflowDetails$data8.nextActions) ? /*#__PURE__*/React.createElement(Menu, {
|
|
13781
13852
|
localeKeyPrefix: `WF_EMPLOYEE_${"NDC"}`,
|
|
13782
13853
|
options: actions,
|
|
13783
13854
|
optionKey: "action",
|
|
@@ -13807,7 +13878,7 @@ const NDCNewFormSummaryStepThreeCitizen = ({
|
|
|
13807
13878
|
const res = await onSubmit(formData, actionStatus);
|
|
13808
13879
|
if (res !== null && res !== void 0 && res.isSuccess) {
|
|
13809
13880
|
var _res$response, _res$response$Applica, _res$response$Applica2;
|
|
13810
|
-
history.push("/digit-ui/citizen/ndc/response/" + (res === null || res === void 0 ? void 0 : (_res$response = res.response) === null || _res$response === void 0 ? void 0 : (_res$response$Applica = _res$response.Applications) === null || _res$response$Applica === void 0 ? void 0 : (_res$response$Applica2 = _res$response$Applica[0]) === null || _res$response$Applica2 === void 0 ? void 0 : _res$response$Applica2.
|
|
13881
|
+
history.push("/digit-ui/citizen/ndc/response/" + (res === null || res === void 0 ? void 0 : (_res$response = res.response) === null || _res$response === void 0 ? void 0 : (_res$response$Applica = _res$response.Applications) === null || _res$response$Applica === void 0 ? void 0 : (_res$response$Applica2 = _res$response$Applica[0]) === null || _res$response$Applica2 === void 0 ? void 0 : _res$response$Applica2.applicationNo));
|
|
13811
13882
|
} else {
|
|
13812
13883
|
console.error("Submission failed, not moving to next step.", res === null || res === void 0 ? void 0 : res.response);
|
|
13813
13884
|
}
|
|
@@ -13841,7 +13912,7 @@ const NDCNewFormSummaryStepThreeCitizen = ({
|
|
|
13841
13912
|
updatedApplication.Documents.push({
|
|
13842
13913
|
uuid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
|
|
13843
13914
|
documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
13844
|
-
documentAttachment: doc === null || doc === void 0 ? void 0 : doc.
|
|
13915
|
+
documentAttachment: doc === null || doc === void 0 ? void 0 : doc.filestoreId
|
|
13845
13916
|
});
|
|
13846
13917
|
});
|
|
13847
13918
|
const payload = {
|
|
@@ -13854,7 +13925,7 @@ const NDCNewFormSummaryStepThreeCitizen = ({
|
|
|
13854
13925
|
const finalPayload = mapToNDCPayload(data, actionStatus);
|
|
13855
13926
|
const response = await Digit.NDCService.NDCUpdate({
|
|
13856
13927
|
tenantId,
|
|
13857
|
-
|
|
13928
|
+
finalPayload
|
|
13858
13929
|
});
|
|
13859
13930
|
dispatch(resetNDCForm());
|
|
13860
13931
|
if ((response === null || response === void 0 ? void 0 : (_response$ResponseInf = response.ResponseInfo) === null || _response$ResponseInf === void 0 ? void 0 : _response$ResponseInf.status) === "successful") {
|
|
@@ -14024,7 +14095,7 @@ const PayWSBillModal = ({
|
|
|
14024
14095
|
width: "90%",
|
|
14025
14096
|
marginTop: "5px"
|
|
14026
14097
|
}
|
|
14027
|
-
}, isLoading ? /*#__PURE__*/React.createElement(Loader, null) : isError ? /*#__PURE__*/React.createElement("p", {
|
|
14098
|
+
}, isLoading ? /*#__PURE__*/React.createElement(Loader$1, null) : isError ? /*#__PURE__*/React.createElement("p", {
|
|
14028
14099
|
style: {
|
|
14029
14100
|
color: "red",
|
|
14030
14101
|
padding: "1rem"
|
|
@@ -14170,7 +14241,7 @@ const NewNDCStepForm$1 = () => {
|
|
|
14170
14241
|
isLoading,
|
|
14171
14242
|
data: applicationDetails
|
|
14172
14243
|
} = Digit.Hooks.ndc.useSearchEmployeeApplication({
|
|
14173
|
-
|
|
14244
|
+
applicationNo: id
|
|
14174
14245
|
}, tenantId);
|
|
14175
14246
|
useEffect(() => {
|
|
14176
14247
|
if (applicationDetails !== null && applicationDetails !== void 0 && applicationDetails.Applications.length) {
|
|
@@ -14235,7 +14306,7 @@ const NewNDCStepFormOne$1 = ({
|
|
|
14235
14306
|
}, 3000);
|
|
14236
14307
|
return;
|
|
14237
14308
|
}
|
|
14238
|
-
if (checkFormData !== null && checkFormData !== void 0 && (_checkFormData$apiDat = checkFormData.apiData) !== null && _checkFormData$apiDat !== void 0 && (_checkFormData$apiDat2 = _checkFormData$apiDat.Applications) !== null && _checkFormData$apiDat2 !== void 0 && (_checkFormData$apiDat3 = _checkFormData$apiDat2[0]) !== null && _checkFormData$apiDat3 !== void 0 && _checkFormData$apiDat3.
|
|
14309
|
+
if (checkFormData !== null && checkFormData !== void 0 && (_checkFormData$apiDat = checkFormData.apiData) !== null && _checkFormData$apiDat !== void 0 && (_checkFormData$apiDat2 = _checkFormData$apiDat.Applications) !== null && _checkFormData$apiDat2 !== void 0 && (_checkFormData$apiDat3 = _checkFormData$apiDat2[0]) !== null && _checkFormData$apiDat3 !== void 0 && _checkFormData$apiDat3.applicationNo || checkFormData !== null && checkFormData !== void 0 && (_checkFormData$respon = checkFormData.responseData) !== null && _checkFormData$respon !== void 0 && (_checkFormData$respon2 = _checkFormData$respon[0]) !== null && _checkFormData$respon2 !== void 0 && _checkFormData$respon2.applicationNo) {
|
|
14239
14310
|
onGoNext();
|
|
14240
14311
|
} else createApplication(data);
|
|
14241
14312
|
onGoNext();
|
|
@@ -14510,7 +14581,7 @@ const NDCNewFormSummaryStepThreeEmployee = ({
|
|
|
14510
14581
|
const res = await onSubmit(formData, actionStatus);
|
|
14511
14582
|
if (res !== null && res !== void 0 && res.isSuccess) {
|
|
14512
14583
|
var _res$response, _res$response$Applica, _res$response$Applica2;
|
|
14513
|
-
history.push("/digit-ui/employee/ndc/response/" + (res === null || res === void 0 ? void 0 : (_res$response = res.response) === null || _res$response === void 0 ? void 0 : (_res$response$Applica = _res$response.Applications) === null || _res$response$Applica === void 0 ? void 0 : (_res$response$Applica2 = _res$response$Applica[0]) === null || _res$response$Applica2 === void 0 ? void 0 : _res$response$Applica2.
|
|
14584
|
+
history.push("/digit-ui/employee/ndc/response/" + (res === null || res === void 0 ? void 0 : (_res$response = res.response) === null || _res$response === void 0 ? void 0 : (_res$response$Applica = _res$response.Applications) === null || _res$response$Applica === void 0 ? void 0 : (_res$response$Applica2 = _res$response$Applica[0]) === null || _res$response$Applica2 === void 0 ? void 0 : _res$response$Applica2.applicationNo));
|
|
14514
14585
|
} else {
|
|
14515
14586
|
console.error("Submission failed, not moving to next step.", res === null || res === void 0 ? void 0 : res.response);
|
|
14516
14587
|
}
|
|
@@ -14587,43 +14658,42 @@ const NDCNewFormSummaryStepThreeEmployee = ({
|
|
|
14587
14658
|
const MyApplications = ({
|
|
14588
14659
|
view
|
|
14589
14660
|
}) => {
|
|
14590
|
-
var _Digit$UserService$ge
|
|
14661
|
+
var _Digit$UserService$ge;
|
|
14591
14662
|
const {
|
|
14592
14663
|
t
|
|
14593
14664
|
} = useTranslation();
|
|
14594
|
-
const history = useHistory();
|
|
14595
14665
|
const userInfo = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
|
|
14596
14666
|
const tenantId = window.localStorage.getItem("CITIZEN.CITY");
|
|
14597
|
-
|
|
14667
|
+
const itemsPerPage = 5;
|
|
14598
14668
|
const {
|
|
14599
14669
|
isLoading,
|
|
14600
|
-
data
|
|
14601
|
-
isError,
|
|
14602
|
-
error
|
|
14670
|
+
data
|
|
14603
14671
|
} = Digit.Hooks.ndc.useSearchApplication({
|
|
14604
14672
|
mobileNumber: userInfo.mobileNumber
|
|
14605
14673
|
}, tenantId);
|
|
14606
|
-
|
|
14674
|
+
const [currentPage, setCurrentPage] = useState(1);
|
|
14607
14675
|
if (isLoading) {
|
|
14608
|
-
return /*#__PURE__*/React.createElement(Loader, null);
|
|
14609
|
-
}
|
|
14610
|
-
|
|
14676
|
+
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
14677
|
+
}
|
|
14678
|
+
const applicationsList = (data === null || data === void 0 ? void 0 : data.data) || [];
|
|
14679
|
+
const totalPages = Math.ceil(applicationsList.length / itemsPerPage);
|
|
14680
|
+
const indexOfLastItem = currentPage * itemsPerPage;
|
|
14681
|
+
const indexOfFirstItem = indexOfLastItem - itemsPerPage;
|
|
14682
|
+
const currentApplications = applicationsList.slice(indexOfFirstItem, indexOfLastItem);
|
|
14683
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Header, null, t("TL_MY_APPLICATIONS_HEADER")), currentApplications.map((application, index) => {
|
|
14611
14684
|
var _application$Applicat, _application$Applicat2, _application$Applicat3, _application$Applicat4;
|
|
14612
14685
|
const filteredApplication = Object.fromEntries(Object.entries(application).filter(([key]) => key !== "Applications"));
|
|
14613
|
-
console.log("application?.Applications?.applicationStatus", filteredApplication);
|
|
14614
14686
|
return /*#__PURE__*/React.createElement("div", {
|
|
14615
14687
|
key: `card-${index}`
|
|
14616
14688
|
}, /*#__PURE__*/React.createElement(Card, null, Object.keys(filteredApplication).filter(key => filteredApplication[key] !== null).map(item => /*#__PURE__*/React.createElement(KeyNote, {
|
|
14617
14689
|
keyValue: t(item),
|
|
14618
14690
|
note: t(filteredApplication[item])
|
|
14619
|
-
})), (application === null || application === void 0 ? void 0 : (_application$Applicat = application.Applications) === null || _application$Applicat === void 0 ? void 0 : _application$Applicat.applicationStatus)
|
|
14620
|
-
to: `/digit-ui/citizen/ndc/search/application-overview/${application === null || application === void 0 ? void 0 : (_application$Applicat2 = application.Applications) === null || _application$Applicat2 === void 0 ? void 0 : _application$Applicat2.
|
|
14691
|
+
})), (application === null || application === void 0 ? void 0 : (_application$Applicat = application.Applications) === null || _application$Applicat === void 0 ? void 0 : _application$Applicat.applicationStatus) !== "PENDINGPAYMENT" && /*#__PURE__*/React.createElement(Link, {
|
|
14692
|
+
to: `/digit-ui/citizen/ndc/search/application-overview/${application === null || application === void 0 ? void 0 : (_application$Applicat2 = application.Applications) === null || _application$Applicat2 === void 0 ? void 0 : _application$Applicat2.applicationNo}`
|
|
14621
14693
|
}, /*#__PURE__*/React.createElement(SubmitBar$1, {
|
|
14622
14694
|
label: t("CS_VIEW_DETAILS")
|
|
14623
14695
|
})), (application === null || application === void 0 ? void 0 : (_application$Applicat3 = application.Applications) === null || _application$Applicat3 === void 0 ? void 0 : _application$Applicat3.applicationStatus) === "PENDINGPAYMENT" && /*#__PURE__*/React.createElement(Link, {
|
|
14624
|
-
to: {
|
|
14625
|
-
pathname: `/digit-ui/citizen/payment/collect/NDC/${application === null || application === void 0 ? void 0 : (_application$Applicat4 = application.Applications) === null || _application$Applicat4 === void 0 ? void 0 : _application$Applicat4.uuid}/${tenantId}?tenantId=${tenantId}`
|
|
14626
|
-
}
|
|
14696
|
+
to: `/digit-ui/citizen/payment/collect/NDC/${application === null || application === void 0 ? void 0 : (_application$Applicat4 = application.Applications) === null || _application$Applicat4 === void 0 ? void 0 : _application$Applicat4.applicationNo}/${tenantId}?tenantId=${tenantId}`
|
|
14627
14697
|
}, /*#__PURE__*/React.createElement("div", {
|
|
14628
14698
|
style: {
|
|
14629
14699
|
marginTop: "10px"
|
|
@@ -14631,7 +14701,44 @@ const MyApplications = ({
|
|
|
14631
14701
|
}, /*#__PURE__*/React.createElement(SubmitBar$1, {
|
|
14632
14702
|
label: t("CS_APPLICATION_DETAILS_MAKE_PAYMENT")
|
|
14633
14703
|
})))));
|
|
14634
|
-
})
|
|
14704
|
+
}), !applicationsList.length && /*#__PURE__*/React.createElement("p", {
|
|
14705
|
+
style: {
|
|
14706
|
+
marginLeft: "16px",
|
|
14707
|
+
marginTop: "16px"
|
|
14708
|
+
}
|
|
14709
|
+
}, t("PTR_NO_APPLICATION_FOUND_MSG")), applicationsList.length > itemsPerPage && /*#__PURE__*/React.createElement("div", {
|
|
14710
|
+
style: {
|
|
14711
|
+
display: "flex",
|
|
14712
|
+
alignItems: "center",
|
|
14713
|
+
justifyContent: "center",
|
|
14714
|
+
gap: "16px",
|
|
14715
|
+
marginTop: "20px"
|
|
14716
|
+
}
|
|
14717
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
14718
|
+
disabled: currentPage === 1,
|
|
14719
|
+
onClick: () => setCurrentPage(prev => prev - 1),
|
|
14720
|
+
style: {
|
|
14721
|
+
cursor: currentPage === 1 ? "not-allowed" : "pointer"
|
|
14722
|
+
}
|
|
14723
|
+
}, "\u2190 Prev"), /*#__PURE__*/React.createElement("span", null, "Page ", currentPage, " of ", totalPages), /*#__PURE__*/React.createElement("button", {
|
|
14724
|
+
disabled: currentPage === totalPages,
|
|
14725
|
+
onClick: () => setCurrentPage(prev => prev + 1),
|
|
14726
|
+
style: {
|
|
14727
|
+
cursor: currentPage === totalPages ? "not-allowed" : "pointer"
|
|
14728
|
+
}
|
|
14729
|
+
}, "Next \u2192")), /*#__PURE__*/React.createElement("p", {
|
|
14730
|
+
style: {
|
|
14731
|
+
marginLeft: "16px",
|
|
14732
|
+
marginTop: "16px"
|
|
14733
|
+
}
|
|
14734
|
+
}, t("PTR_TEXT_NOT_ABLE_TO_FIND_THE_APPLICATION"), " ", /*#__PURE__*/React.createElement("span", {
|
|
14735
|
+
className: "link",
|
|
14736
|
+
style: {
|
|
14737
|
+
display: "block"
|
|
14738
|
+
}
|
|
14739
|
+
}, /*#__PURE__*/React.createElement(Link, {
|
|
14740
|
+
to: "/digit-ui/citizen/ndc/new-application"
|
|
14741
|
+
}, t("NDC_COMMON_CLICK_HERE_TO_REGISTER_NEW_APPLICATION")))));
|
|
14635
14742
|
};
|
|
14636
14743
|
|
|
14637
14744
|
const NDCResponseCitizen = props => {
|
|
@@ -14739,7 +14846,7 @@ const NDCModule = ({
|
|
|
14739
14846
|
});
|
|
14740
14847
|
Digit.SessionStorage.set("NOC_TENANTS", tenants);
|
|
14741
14848
|
if (isLoading) {
|
|
14742
|
-
return /*#__PURE__*/React.createElement(Loader, null);
|
|
14849
|
+
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
14743
14850
|
}
|
|
14744
14851
|
if (userType === "citizen") {
|
|
14745
14852
|
return /*#__PURE__*/React.createElement(App, null);
|