@mseva/digit-ui-module-ndc 1.0.36 → 1.0.38
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 +205 -89
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +227 -107
- 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,26 +11927,32 @@ 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 => {
|
|
11896
|
-
var _Digit$UserService$ge2, _user$info5, _user$info6, _data$PropertyDetails1, _user$info7, _user$info8, _checkFormData$respon3, _checkFormData$respon4, _checkFormData$respon5, _data$NDCReason2, _data$cpt1, _data$cpt1$details, _response$ResponseInf2;
|
|
11955
|
+
var _Digit$UserService$ge2, _user$info5, _user$info6, _data$PropertyDetails1, _user$info7, _user$info8, _checkFormData$respon3, _checkFormData$respon4, _checkFormData$respon5, _data$NDCReason2, _data$cpt1, _data$cpt1$details, _checkFormData$respon6, _checkFormData$respon7, _response$ResponseInf2;
|
|
11897
11956
|
const applicant = ((_Digit$UserService$ge2 = Digit.UserService.getUser()) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.info) || {};
|
|
11898
11957
|
const applicantId = applicant === null || applicant === void 0 ? void 0 : applicant.uuid;
|
|
11899
11958
|
console.log("data===?????", data);
|
|
@@ -11966,7 +12025,8 @@ const NewNDCStepFormOne = ({
|
|
|
11966
12025
|
active: true,
|
|
11967
12026
|
reason: data === null || data === void 0 ? void 0 : (_data$NDCReason2 = data.NDCReason) === null || _data$NDCReason2 === void 0 ? void 0 : _data$NDCReason2.code,
|
|
11968
12027
|
auditDetails: data === null || data === void 0 ? void 0 : (_data$cpt1 = data.cpt) === null || _data$cpt1 === void 0 ? void 0 : (_data$cpt1$details = _data$cpt1.details) === null || _data$cpt1$details === void 0 ? void 0 : _data$cpt1$details.auditDetails,
|
|
11969
|
-
|
|
12028
|
+
applicationNo: id,
|
|
12029
|
+
uuid: checkFormData === null || checkFormData === void 0 ? void 0 : (_checkFormData$respon6 = checkFormData.responseData) === null || _checkFormData$respon6 === void 0 ? void 0 : (_checkFormData$respon7 = _checkFormData$respon6[0]) === null || _checkFormData$respon7 === void 0 ? void 0 : _checkFormData$respon7.uuid,
|
|
11970
12030
|
workflow: {
|
|
11971
12031
|
action: "DRAFT"
|
|
11972
12032
|
}
|
|
@@ -12069,6 +12129,8 @@ const NewNDCStepFormOne = ({
|
|
|
12069
12129
|
label: t(`${config.texts.submitBarLabel}`),
|
|
12070
12130
|
currentStep: config.currStepNumber,
|
|
12071
12131
|
onBackClick: onGoBack
|
|
12132
|
+
}), getLoader && /*#__PURE__*/React.createElement(Loader, {
|
|
12133
|
+
page: true
|
|
12072
12134
|
}), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
12073
12135
|
isDleteBtn: true,
|
|
12074
12136
|
error: true,
|
|
@@ -12141,7 +12203,7 @@ function SelectNDCReason({
|
|
|
12141
12203
|
}
|
|
12142
12204
|
}, [apiDataCheck, ndcReasonOptions]);
|
|
12143
12205
|
if (isLoading) {
|
|
12144
|
-
return /*#__PURE__*/React.createElement(Loader, null);
|
|
12206
|
+
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
12145
12207
|
}
|
|
12146
12208
|
const errorStyle = {
|
|
12147
12209
|
width: "70%",
|
|
@@ -12593,7 +12655,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12593
12655
|
}
|
|
12594
12656
|
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12595
12657
|
className: "card-label-smaller ndc_card_labels"
|
|
12596
|
-
}, `${t("NDC_WATER_CONNECTION")}`), waterConnectionLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
|
|
12658
|
+
}, `${t("NDC_WATER_CONNECTION")}`), waterConnectionLoading ? /*#__PURE__*/React.createElement(Loader$1, null) : /*#__PURE__*/React.createElement("div", {
|
|
12597
12659
|
className: "field",
|
|
12598
12660
|
style: {
|
|
12599
12661
|
display: "flex",
|
|
@@ -12637,7 +12699,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12637
12699
|
disabled: !item.isEdit,
|
|
12638
12700
|
onBlur: props.onBlur
|
|
12639
12701
|
})
|
|
12640
|
-
}), item.isLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
|
|
12702
|
+
}), item.isLoading ? /*#__PURE__*/React.createElement(Loader$1, null) : /*#__PURE__*/React.createElement("div", {
|
|
12641
12703
|
style: {
|
|
12642
12704
|
display: "flex",
|
|
12643
12705
|
alignItems: "center",
|
|
@@ -12701,7 +12763,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12701
12763
|
}
|
|
12702
12764
|
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12703
12765
|
className: "card-label-smaller ndc_card_labels"
|
|
12704
|
-
}, `${t("NDC_SEWERAGE_CONNECTION")} `), sewerageConnectionLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
|
|
12766
|
+
}, `${t("NDC_SEWERAGE_CONNECTION")} `), sewerageConnectionLoading ? /*#__PURE__*/React.createElement(Loader$1, null) : /*#__PURE__*/React.createElement("div", {
|
|
12705
12767
|
className: "field",
|
|
12706
12768
|
style: {
|
|
12707
12769
|
display: "flex",
|
|
@@ -12745,7 +12807,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12745
12807
|
disabled: !item.isEdit,
|
|
12746
12808
|
onBlur: field.onBlur
|
|
12747
12809
|
})
|
|
12748
|
-
}), item.isLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
|
|
12810
|
+
}), item.isLoading ? /*#__PURE__*/React.createElement(Loader$1, null) : /*#__PURE__*/React.createElement("div", {
|
|
12749
12811
|
style: {
|
|
12750
12812
|
display: "flex",
|
|
12751
12813
|
alignItems: "center",
|
|
@@ -12968,6 +13030,7 @@ const PropertySearchNSummary = ({
|
|
|
12968
13030
|
const search = useLocation().search;
|
|
12969
13031
|
const urlPropertyId = new URLSearchParams(search).get("propertyId");
|
|
12970
13032
|
const isfirstRender = useRef(true);
|
|
13033
|
+
const [getLoader, setLoader] = useState(false);
|
|
12971
13034
|
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
13035
|
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
13036
|
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 +13218,7 @@ const PropertySearchNSummary = ({
|
|
|
13155
13218
|
});
|
|
13156
13219
|
}
|
|
13157
13220
|
async function fetchBill() {
|
|
13221
|
+
setLoader(true);
|
|
13158
13222
|
try {
|
|
13159
13223
|
var _formData$cpt0, _result$Bill;
|
|
13160
13224
|
const result = await Digit.PaymentService.fetchBill(tenantId, {
|
|
@@ -13205,7 +13269,9 @@ const PropertySearchNSummary = ({
|
|
|
13205
13269
|
setNoDue(true);
|
|
13206
13270
|
setCheckStats(false);
|
|
13207
13271
|
}
|
|
13272
|
+
setLoader(false);
|
|
13208
13273
|
} catch (error) {
|
|
13274
|
+
setLoader(false);
|
|
13209
13275
|
setShowToast({
|
|
13210
13276
|
error: true,
|
|
13211
13277
|
label: t("NDC_MESSAGE_FETCH_FAILED")
|
|
@@ -13227,7 +13293,7 @@ const PropertySearchNSummary = ({
|
|
|
13227
13293
|
return () => clearTimeout(timer);
|
|
13228
13294
|
}
|
|
13229
13295
|
}, [showToast]);
|
|
13230
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
13296
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
13231
13297
|
style: {
|
|
13232
13298
|
marginBottom: "16px"
|
|
13233
13299
|
}
|
|
@@ -13307,7 +13373,9 @@ const PropertySearchNSummary = ({
|
|
|
13307
13373
|
onClose: () => {
|
|
13308
13374
|
setShowToast(null);
|
|
13309
13375
|
}
|
|
13310
|
-
})))
|
|
13376
|
+
})), (isLoading || getLoader) && /*#__PURE__*/React.createElement(Loader, {
|
|
13377
|
+
page: true
|
|
13378
|
+
}));
|
|
13311
13379
|
};
|
|
13312
13380
|
|
|
13313
13381
|
const SelectNDCDocuments = ({
|
|
@@ -13397,6 +13465,7 @@ function SelectDocument({
|
|
|
13397
13465
|
return item === null || item === void 0 ? void 0 : (_item$documentType = item.documentType) === null || _item$documentType === void 0 ? void 0 : _item$documentType.includes(doc === null || doc === void 0 ? void 0 : doc.code);
|
|
13398
13466
|
})[0];
|
|
13399
13467
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
13468
|
+
const [getLoader, setLoader] = useState(false);
|
|
13400
13469
|
const [file, setFile] = useState(null);
|
|
13401
13470
|
const [uploadedFile, setUploadedFile] = useState(() => (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId) || null);
|
|
13402
13471
|
function selectfile(e) {
|
|
@@ -13429,8 +13498,10 @@ function SelectDocument({
|
|
|
13429
13498
|
(async () => {
|
|
13430
13499
|
setError(null);
|
|
13431
13500
|
if (file) {
|
|
13501
|
+
setLoader(true);
|
|
13432
13502
|
if (file.size >= 5242880) {
|
|
13433
13503
|
setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
|
|
13504
|
+
setLoader(false);
|
|
13434
13505
|
if (!formState.errors[config.key]) setFormError(config.key, {
|
|
13435
13506
|
type: doc === null || doc === void 0 ? void 0 : doc.code
|
|
13436
13507
|
});
|
|
@@ -13439,6 +13510,7 @@ function SelectDocument({
|
|
|
13439
13510
|
var _response$data, _response$data$files;
|
|
13440
13511
|
setUploadedFile(null);
|
|
13441
13512
|
const response = await Digit.UploadServices.Filestorage("PT", file, Digit.ULBService.getStateId());
|
|
13513
|
+
setLoader(false);
|
|
13442
13514
|
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
13443
13515
|
var _response$data2, _response$data2$files;
|
|
13444
13516
|
setUploadedFile(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files[0]) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.fileStoreId);
|
|
@@ -13446,6 +13518,7 @@ function SelectDocument({
|
|
|
13446
13518
|
setError(t("CS_FILE_UPLOAD_ERROR"));
|
|
13447
13519
|
}
|
|
13448
13520
|
} catch (err) {
|
|
13521
|
+
setLoader(false);
|
|
13449
13522
|
setError(t("CS_FILE_UPLOAD_ERROR"));
|
|
13450
13523
|
}
|
|
13451
13524
|
}
|
|
@@ -13471,7 +13544,9 @@ function SelectDocument({
|
|
|
13471
13544
|
width: "100%"
|
|
13472
13545
|
},
|
|
13473
13546
|
accept: "image/*,.pdf"
|
|
13474
|
-
})))
|
|
13547
|
+
}))), getLoader && /*#__PURE__*/React.createElement(Loader, {
|
|
13548
|
+
page: true
|
|
13549
|
+
}));
|
|
13475
13550
|
}
|
|
13476
13551
|
|
|
13477
13552
|
const NewNDCStepFormTwo = ({
|
|
@@ -13498,7 +13573,7 @@ const NewNDCStepFormTwo = ({
|
|
|
13498
13573
|
data: applicationDetails,
|
|
13499
13574
|
refetch
|
|
13500
13575
|
} = Digit.Hooks.ndc.useSearchEmployeeApplication({
|
|
13501
|
-
|
|
13576
|
+
applicationNo: id
|
|
13502
13577
|
}, tenantId);
|
|
13503
13578
|
useEffect(() => {
|
|
13504
13579
|
if (applicationDetails !== null && applicationDetails !== void 0 && applicationDetails.Applications.length) {
|
|
@@ -13623,7 +13698,7 @@ const NDCSummary = ({
|
|
|
13623
13698
|
goNext,
|
|
13624
13699
|
onGoBack
|
|
13625
13700
|
}) => {
|
|
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,
|
|
13701
|
+
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
13702
|
const {
|
|
13628
13703
|
pathname: url
|
|
13629
13704
|
} = useLocation();
|
|
@@ -13635,9 +13710,8 @@ const NDCSummary = ({
|
|
|
13635
13710
|
const dispatch = useDispatch();
|
|
13636
13711
|
const mutateScreen = url.includes("/property-mutate/");
|
|
13637
13712
|
let user = Digit.UserService.getUser();
|
|
13638
|
-
console.log("formData", formData);
|
|
13639
13713
|
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.
|
|
13714
|
+
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
13715
|
const tenantId = window.location.href.includes("citizen") ? window.localStorage.getItem("CITIZEN.CITY") : window.localStorage.getItem("Employee.tenant-id");
|
|
13642
13716
|
const isCitizen = window.location.href.includes("citizen");
|
|
13643
13717
|
const [getData, setData] = useState();
|
|
@@ -13647,7 +13721,7 @@ const NDCSummary = ({
|
|
|
13647
13721
|
};
|
|
13648
13722
|
Digit.Hooks.useClickOutside(menuRef, closeMenu, displayMenu);
|
|
13649
13723
|
const fetchCalculations = async () => {
|
|
13650
|
-
var _response$Calculation
|
|
13724
|
+
var _response$Calculation;
|
|
13651
13725
|
const payload = {
|
|
13652
13726
|
CalculationCriteria: [{
|
|
13653
13727
|
applicationNumber: appId,
|
|
@@ -13661,8 +13735,7 @@ const NDCSummary = ({
|
|
|
13661
13735
|
},
|
|
13662
13736
|
details: payload
|
|
13663
13737
|
});
|
|
13664
|
-
|
|
13665
|
-
setData(response === null || response === void 0 ? void 0 : (_response$Calculation3 = response.Calculation) === null || _response$Calculation3 === void 0 ? void 0 : _response$Calculation3[0]);
|
|
13738
|
+
setData(response === null || response === void 0 ? void 0 : (_response$Calculation = response.Calculation) === null || _response$Calculation === void 0 ? void 0 : _response$Calculation[0]);
|
|
13666
13739
|
};
|
|
13667
13740
|
useEffect(() => {
|
|
13668
13741
|
fetchCalculations();
|
|
@@ -13687,8 +13760,6 @@ const NDCSummary = ({
|
|
|
13687
13760
|
function onActionSelect(action) {
|
|
13688
13761
|
goNext(action);
|
|
13689
13762
|
}
|
|
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
13763
|
const pageStyle = {
|
|
13693
13764
|
padding: "2rem",
|
|
13694
13765
|
backgroundColor: "#f9f9f9",
|
|
@@ -13760,15 +13831,23 @@ const NDCSummary = ({
|
|
|
13760
13831
|
style: sectionStyle
|
|
13761
13832
|
}, (docs === null || docs === void 0 ? void 0 : docs.length) > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
13762
13833
|
style: documentsContainerStyle
|
|
13763
|
-
}, docs === null || docs === void 0 ? void 0 : docs.map((doc, index) =>
|
|
13764
|
-
|
|
13765
|
-
|
|
13766
|
-
|
|
13767
|
-
|
|
13768
|
-
|
|
13769
|
-
|
|
13770
|
-
|
|
13771
|
-
|
|
13834
|
+
}, docs === null || docs === void 0 ? void 0 : docs.map((doc, index) => {
|
|
13835
|
+
var _doc$documentType;
|
|
13836
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
13837
|
+
key: index,
|
|
13838
|
+
style: documentCardStyle
|
|
13839
|
+
}, /*#__PURE__*/React.createElement(NDCDocument$1, {
|
|
13840
|
+
value: docs,
|
|
13841
|
+
Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
13842
|
+
index: index,
|
|
13843
|
+
formData: formData
|
|
13844
|
+
}), /*#__PURE__*/React.createElement(CardSectionHeader, {
|
|
13845
|
+
style: {
|
|
13846
|
+
marginTop: "10px",
|
|
13847
|
+
fontSize: "15px"
|
|
13848
|
+
}
|
|
13849
|
+
}, 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`)));
|
|
13850
|
+
})) : /*#__PURE__*/React.createElement("div", null, t("TL_NO_DOCUMENTS_MSG"))), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar$1, {
|
|
13772
13851
|
style: {
|
|
13773
13852
|
background: " white",
|
|
13774
13853
|
color: "black",
|
|
@@ -13777,7 +13856,7 @@ const NDCSummary = ({
|
|
|
13777
13856
|
},
|
|
13778
13857
|
label: "Back",
|
|
13779
13858
|
onSubmit: onGoBack
|
|
13780
|
-
}), displayMenu && (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$
|
|
13859
|
+
}), 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
13860
|
localeKeyPrefix: `WF_EMPLOYEE_${"NDC"}`,
|
|
13782
13861
|
options: actions,
|
|
13783
13862
|
optionKey: "action",
|
|
@@ -13801,13 +13880,15 @@ const NDCNewFormSummaryStepThreeCitizen = ({
|
|
|
13801
13880
|
const tenantId = window.localStorage.getItem("CITIZEN.CITY");
|
|
13802
13881
|
const user = Digit.UserService.getUser();
|
|
13803
13882
|
const formData = useSelector(state => state.ndc.NDCForm.formData || {});
|
|
13883
|
+
console.log("formData 4th step", formData);
|
|
13804
13884
|
const goNext = async action => {
|
|
13805
13885
|
const actionStatus = action === null || action === void 0 ? void 0 : action.action;
|
|
13886
|
+
console.log("actionStatus", actionStatus);
|
|
13806
13887
|
try {
|
|
13807
13888
|
const res = await onSubmit(formData, actionStatus);
|
|
13808
13889
|
if (res !== null && res !== void 0 && res.isSuccess) {
|
|
13809
13890
|
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.
|
|
13891
|
+
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
13892
|
} else {
|
|
13812
13893
|
console.error("Submission failed, not moving to next step.", res === null || res === void 0 ? void 0 : res.response);
|
|
13813
13894
|
}
|
|
@@ -13818,7 +13899,7 @@ const NDCNewFormSummaryStepThreeCitizen = ({
|
|
|
13818
13899
|
function mapToNDCPayload(inputData, actionStatus) {
|
|
13819
13900
|
var _Digit$UserService$ge, _user$info, _user$info2, _formData$NDCDetails, _formData$NDCDetails$, _user$info3, _user$info4, _formData$responseDat, _formData$apiData, _formData$apiData$App, _inputData$DocummentD, _inputData$DocummentD2;
|
|
13820
13901
|
const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
|
|
13821
|
-
console.log("
|
|
13902
|
+
console.log("inputData", inputData);
|
|
13822
13903
|
const owners = [{
|
|
13823
13904
|
name: user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.name,
|
|
13824
13905
|
mobileNumber: user === null || user === void 0 ? void 0 : (_user$info2 = user.info) === null || _user$info2 === void 0 ? void 0 : _user$info2.mobileNumber,
|
|
@@ -13827,6 +13908,7 @@ const NDCNewFormSummaryStepThreeCitizen = ({
|
|
|
13827
13908
|
type: user === null || user === void 0 ? void 0 : (_user$info4 = user.info) === null || _user$info4 === void 0 ? void 0 : _user$info4.type
|
|
13828
13909
|
}];
|
|
13829
13910
|
const baseApplication = (formData === null || formData === void 0 ? void 0 : (_formData$responseDat = formData.responseData) === null || _formData$responseDat === void 0 ? void 0 : _formData$responseDat[0]) || (formData === null || formData === void 0 ? void 0 : (_formData$apiData = formData.apiData) === null || _formData$apiData === void 0 ? void 0 : (_formData$apiData$App = _formData$apiData.Applications) === null || _formData$apiData$App === void 0 ? void 0 : _formData$apiData$App[0]) || {};
|
|
13911
|
+
console.log("baseApplication", baseApplication);
|
|
13830
13912
|
const updatedApplication = {
|
|
13831
13913
|
...baseApplication,
|
|
13832
13914
|
workflow: {
|
|
@@ -13841,17 +13923,19 @@ const NDCNewFormSummaryStepThreeCitizen = ({
|
|
|
13841
13923
|
updatedApplication.Documents.push({
|
|
13842
13924
|
uuid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
|
|
13843
13925
|
documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
13844
|
-
documentAttachment: doc === null || doc === void 0 ? void 0 : doc.
|
|
13926
|
+
documentAttachment: doc === null || doc === void 0 ? void 0 : doc.filestoreId
|
|
13845
13927
|
});
|
|
13846
13928
|
});
|
|
13847
13929
|
const payload = {
|
|
13848
13930
|
Applications: [updatedApplication]
|
|
13849
13931
|
};
|
|
13932
|
+
console.log("updatedApplication", updatedApplication);
|
|
13850
13933
|
return payload;
|
|
13851
13934
|
}
|
|
13852
13935
|
const onSubmit = async (data, actionStatus) => {
|
|
13853
13936
|
var _response$ResponseInf;
|
|
13854
13937
|
const finalPayload = mapToNDCPayload(data, actionStatus);
|
|
13938
|
+
console.log("finalPayload", finalPayload);
|
|
13855
13939
|
const response = await Digit.NDCService.NDCUpdate({
|
|
13856
13940
|
tenantId,
|
|
13857
13941
|
details: finalPayload
|
|
@@ -14024,7 +14108,7 @@ const PayWSBillModal = ({
|
|
|
14024
14108
|
width: "90%",
|
|
14025
14109
|
marginTop: "5px"
|
|
14026
14110
|
}
|
|
14027
|
-
}, isLoading ? /*#__PURE__*/React.createElement(Loader, null) : isError ? /*#__PURE__*/React.createElement("p", {
|
|
14111
|
+
}, isLoading ? /*#__PURE__*/React.createElement(Loader$1, null) : isError ? /*#__PURE__*/React.createElement("p", {
|
|
14028
14112
|
style: {
|
|
14029
14113
|
color: "red",
|
|
14030
14114
|
padding: "1rem"
|
|
@@ -14170,7 +14254,7 @@ const NewNDCStepForm$1 = () => {
|
|
|
14170
14254
|
isLoading,
|
|
14171
14255
|
data: applicationDetails
|
|
14172
14256
|
} = Digit.Hooks.ndc.useSearchEmployeeApplication({
|
|
14173
|
-
|
|
14257
|
+
applicationNo: id
|
|
14174
14258
|
}, tenantId);
|
|
14175
14259
|
useEffect(() => {
|
|
14176
14260
|
if (applicationDetails !== null && applicationDetails !== void 0 && applicationDetails.Applications.length) {
|
|
@@ -14235,7 +14319,7 @@ const NewNDCStepFormOne$1 = ({
|
|
|
14235
14319
|
}, 3000);
|
|
14236
14320
|
return;
|
|
14237
14321
|
}
|
|
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.
|
|
14322
|
+
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
14323
|
onGoNext();
|
|
14240
14324
|
} else createApplication(data);
|
|
14241
14325
|
onGoNext();
|
|
@@ -14510,7 +14594,7 @@ const NDCNewFormSummaryStepThreeEmployee = ({
|
|
|
14510
14594
|
const res = await onSubmit(formData, actionStatus);
|
|
14511
14595
|
if (res !== null && res !== void 0 && res.isSuccess) {
|
|
14512
14596
|
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.
|
|
14597
|
+
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
14598
|
} else {
|
|
14515
14599
|
console.error("Submission failed, not moving to next step.", res === null || res === void 0 ? void 0 : res.response);
|
|
14516
14600
|
}
|
|
@@ -14587,43 +14671,42 @@ const NDCNewFormSummaryStepThreeEmployee = ({
|
|
|
14587
14671
|
const MyApplications = ({
|
|
14588
14672
|
view
|
|
14589
14673
|
}) => {
|
|
14590
|
-
var _Digit$UserService$ge
|
|
14674
|
+
var _Digit$UserService$ge;
|
|
14591
14675
|
const {
|
|
14592
14676
|
t
|
|
14593
14677
|
} = useTranslation();
|
|
14594
|
-
const history = useHistory();
|
|
14595
14678
|
const userInfo = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
|
|
14596
14679
|
const tenantId = window.localStorage.getItem("CITIZEN.CITY");
|
|
14597
|
-
|
|
14680
|
+
const itemsPerPage = 5;
|
|
14598
14681
|
const {
|
|
14599
14682
|
isLoading,
|
|
14600
|
-
data
|
|
14601
|
-
isError,
|
|
14602
|
-
error
|
|
14683
|
+
data
|
|
14603
14684
|
} = Digit.Hooks.ndc.useSearchApplication({
|
|
14604
14685
|
mobileNumber: userInfo.mobileNumber
|
|
14605
14686
|
}, tenantId);
|
|
14606
|
-
|
|
14687
|
+
const [currentPage, setCurrentPage] = useState(1);
|
|
14607
14688
|
if (isLoading) {
|
|
14608
|
-
return /*#__PURE__*/React.createElement(Loader, null);
|
|
14609
|
-
}
|
|
14610
|
-
|
|
14689
|
+
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
14690
|
+
}
|
|
14691
|
+
const applicationsList = (data === null || data === void 0 ? void 0 : data.data) || [];
|
|
14692
|
+
const totalPages = Math.ceil(applicationsList.length / itemsPerPage);
|
|
14693
|
+
const indexOfLastItem = currentPage * itemsPerPage;
|
|
14694
|
+
const indexOfFirstItem = indexOfLastItem - itemsPerPage;
|
|
14695
|
+
const currentApplications = applicationsList.slice(indexOfFirstItem, indexOfLastItem);
|
|
14696
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Header, null, t("TL_MY_APPLICATIONS_HEADER")), currentApplications.map((application, index) => {
|
|
14611
14697
|
var _application$Applicat, _application$Applicat2, _application$Applicat3, _application$Applicat4;
|
|
14612
14698
|
const filteredApplication = Object.fromEntries(Object.entries(application).filter(([key]) => key !== "Applications"));
|
|
14613
|
-
console.log("application?.Applications?.applicationStatus", filteredApplication);
|
|
14614
14699
|
return /*#__PURE__*/React.createElement("div", {
|
|
14615
14700
|
key: `card-${index}`
|
|
14616
14701
|
}, /*#__PURE__*/React.createElement(Card, null, Object.keys(filteredApplication).filter(key => filteredApplication[key] !== null).map(item => /*#__PURE__*/React.createElement(KeyNote, {
|
|
14617
14702
|
keyValue: t(item),
|
|
14618
14703
|
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.
|
|
14704
|
+
})), (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, {
|
|
14705
|
+
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
14706
|
}, /*#__PURE__*/React.createElement(SubmitBar$1, {
|
|
14622
14707
|
label: t("CS_VIEW_DETAILS")
|
|
14623
14708
|
})), (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
|
-
}
|
|
14709
|
+
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
14710
|
}, /*#__PURE__*/React.createElement("div", {
|
|
14628
14711
|
style: {
|
|
14629
14712
|
marginTop: "10px"
|
|
@@ -14631,7 +14714,44 @@ const MyApplications = ({
|
|
|
14631
14714
|
}, /*#__PURE__*/React.createElement(SubmitBar$1, {
|
|
14632
14715
|
label: t("CS_APPLICATION_DETAILS_MAKE_PAYMENT")
|
|
14633
14716
|
})))));
|
|
14634
|
-
})
|
|
14717
|
+
}), !applicationsList.length && /*#__PURE__*/React.createElement("p", {
|
|
14718
|
+
style: {
|
|
14719
|
+
marginLeft: "16px",
|
|
14720
|
+
marginTop: "16px"
|
|
14721
|
+
}
|
|
14722
|
+
}, t("PTR_NO_APPLICATION_FOUND_MSG")), applicationsList.length > itemsPerPage && /*#__PURE__*/React.createElement("div", {
|
|
14723
|
+
style: {
|
|
14724
|
+
display: "flex",
|
|
14725
|
+
alignItems: "center",
|
|
14726
|
+
justifyContent: "center",
|
|
14727
|
+
gap: "16px",
|
|
14728
|
+
marginTop: "20px"
|
|
14729
|
+
}
|
|
14730
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
14731
|
+
disabled: currentPage === 1,
|
|
14732
|
+
onClick: () => setCurrentPage(prev => prev - 1),
|
|
14733
|
+
style: {
|
|
14734
|
+
cursor: currentPage === 1 ? "not-allowed" : "pointer"
|
|
14735
|
+
}
|
|
14736
|
+
}, "\u2190 Prev"), /*#__PURE__*/React.createElement("span", null, "Page ", currentPage, " of ", totalPages), /*#__PURE__*/React.createElement("button", {
|
|
14737
|
+
disabled: currentPage === totalPages,
|
|
14738
|
+
onClick: () => setCurrentPage(prev => prev + 1),
|
|
14739
|
+
style: {
|
|
14740
|
+
cursor: currentPage === totalPages ? "not-allowed" : "pointer"
|
|
14741
|
+
}
|
|
14742
|
+
}, "Next \u2192")), /*#__PURE__*/React.createElement("p", {
|
|
14743
|
+
style: {
|
|
14744
|
+
marginLeft: "16px",
|
|
14745
|
+
marginTop: "16px"
|
|
14746
|
+
}
|
|
14747
|
+
}, t("PTR_TEXT_NOT_ABLE_TO_FIND_THE_APPLICATION"), " ", /*#__PURE__*/React.createElement("span", {
|
|
14748
|
+
className: "link",
|
|
14749
|
+
style: {
|
|
14750
|
+
display: "block"
|
|
14751
|
+
}
|
|
14752
|
+
}, /*#__PURE__*/React.createElement(Link, {
|
|
14753
|
+
to: "/digit-ui/citizen/ndc/new-application"
|
|
14754
|
+
}, t("NDC_COMMON_CLICK_HERE_TO_REGISTER_NEW_APPLICATION")))));
|
|
14635
14755
|
};
|
|
14636
14756
|
|
|
14637
14757
|
const NDCResponseCitizen = props => {
|
|
@@ -14739,7 +14859,7 @@ const NDCModule = ({
|
|
|
14739
14859
|
});
|
|
14740
14860
|
Digit.SessionStorage.set("NOC_TENANTS", tenants);
|
|
14741
14861
|
if (isLoading) {
|
|
14742
|
-
return /*#__PURE__*/React.createElement(Loader, null);
|
|
14862
|
+
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
14743
14863
|
}
|
|
14744
14864
|
if (userType === "citizen") {
|
|
14745
14865
|
return /*#__PURE__*/React.createElement(App, null);
|