@mseva/digit-ui-module-challangeneration 1.0.29 → 1.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +260 -612
- package/dist/index.modern.js.map +1 -1
- package/package.json +39 -39
package/dist/index.modern.js
CHANGED
|
@@ -6040,13 +6040,13 @@ const ChallanData = (tenantId, consumerCode) => {
|
|
|
6040
6040
|
const getLocationName = async (lat, lng) => {
|
|
6041
6041
|
try {
|
|
6042
6042
|
if (lat == null || lng == null || lat === 0 && lng === 0) {
|
|
6043
|
-
return
|
|
6043
|
+
return null;
|
|
6044
6044
|
}
|
|
6045
6045
|
const res = await fetch(`https://nominatim.openstreetmap.org/reverse?format=json&lat=${lat}&lon=${lng}`);
|
|
6046
6046
|
const data = await res.json();
|
|
6047
|
-
return (data === null || data === void 0 ? void 0 : data.display_name) ||
|
|
6047
|
+
return (data === null || data === void 0 ? void 0 : data.display_name) || null;
|
|
6048
6048
|
} catch {
|
|
6049
|
-
return
|
|
6049
|
+
return null;
|
|
6050
6050
|
}
|
|
6051
6051
|
};
|
|
6052
6052
|
const stringReplaceAll = (str = "", searcher = "", replaceWith = "") => {
|
|
@@ -7315,11 +7315,7 @@ const OwnerForm1 = _props => {
|
|
|
7315
7315
|
style: isMobile ? {} : {
|
|
7316
7316
|
marginTop: "-50px"
|
|
7317
7317
|
}
|
|
7318
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
7319
|
-
style: {
|
|
7320
|
-
marginBottom: "16px"
|
|
7321
|
-
}
|
|
7322
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabelError, {
|
|
7318
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabelError, {
|
|
7323
7319
|
style: errorStyle
|
|
7324
7320
|
}, localFormState.touched.mobileNumber ? errors === null || errors === void 0 ? void 0 : (_errors$mobileNumber = errors.mobileNumber) === null || _errors$mobileNumber === void 0 ? void 0 : _errors$mobileNumber.message : ""), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
7325
7321
|
className: "card-label-smaller"
|
|
@@ -7454,12 +7450,7 @@ const OwnerForm1 = _props => {
|
|
|
7454
7450
|
t: t
|
|
7455
7451
|
})
|
|
7456
7452
|
})))), /*#__PURE__*/React.createElement("hr", {
|
|
7457
|
-
|
|
7458
|
-
width: "100%",
|
|
7459
|
-
border: "1px solid #D6D5D4",
|
|
7460
|
-
marginTop: "50px",
|
|
7461
|
-
marginBottom: "40px"
|
|
7462
|
-
}
|
|
7453
|
+
className: "challan-hr-linebreak"
|
|
7463
7454
|
}));
|
|
7464
7455
|
};
|
|
7465
7456
|
|
|
@@ -7930,11 +7921,7 @@ const OwnerForm1$2 = _props => {
|
|
|
7930
7921
|
style: isMobile ? {} : {
|
|
7931
7922
|
marginTop: "-50px"
|
|
7932
7923
|
}
|
|
7933
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
7934
|
-
style: {
|
|
7935
|
-
marginBottom: "16px"
|
|
7936
|
-
}
|
|
7937
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardSectionHeader, null, t("SERVICEDETAILS")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
7924
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardSectionHeader, null, t("SERVICEDETAILS")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
7938
7925
|
className: "card-label-smaller"
|
|
7939
7926
|
}, `${t("UC_CITY_LABEL")} * `), /*#__PURE__*/React.createElement(Controller, {
|
|
7940
7927
|
name: "city",
|
|
@@ -9920,18 +9907,12 @@ const MyChallanResult = ({
|
|
|
9920
9907
|
history.push(`/digit-ui/citizen/payment/collect/Challan_Generation/${id}/${tenantId}?tenantId=${tenantId}`);
|
|
9921
9908
|
};
|
|
9922
9909
|
return /*#__PURE__*/React.createElement("div", {
|
|
9923
|
-
|
|
9924
|
-
|
|
9925
|
-
}
|
|
9926
|
-
}, /*#__PURE__*/React.createElement("div", null, header && /*#__PURE__*/React.createElement(Header, {
|
|
9927
|
-
style: {
|
|
9928
|
-
marginLeft: "8px"
|
|
9929
|
-
}
|
|
9930
|
-
}, t(header), " (", getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$chall = getChallanData.challans) === null || _getChallanData$chall === void 0 ? void 0 : _getChallanData$chall.length, ")"), getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$chall2 = getChallanData.challans) === null || _getChallanData$chall2 === void 0 ? void 0 : _getChallanData$chall2.map((bill, index) => {
|
|
9910
|
+
className: "mychallan-custom"
|
|
9911
|
+
}, /*#__PURE__*/React.createElement("div", null, header && /*#__PURE__*/React.createElement(Header, null, t(header), " (", getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$chall = getChallanData.challans) === null || _getChallanData$chall === void 0 ? void 0 : _getChallanData$chall.length, ")"), getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$chall2 = getChallanData.challans) === null || _getChallanData$chall2 === void 0 ? void 0 : _getChallanData$chall2.map((bill, index) => {
|
|
9931
9912
|
var _bill$amount, _bill$amount$, _bill$citizen;
|
|
9932
9913
|
const checkAmount = Math.max((bill === null || bill === void 0 ? void 0 : (_bill$amount = bill.amount) === null || _bill$amount === void 0 ? void 0 : (_bill$amount$ = _bill$amount[0]) === null || _bill$amount$ === void 0 ? void 0 : _bill$amount$.amount) || 0, (bill === null || bill === void 0 ? void 0 : bill.challanAmount) || 0);
|
|
9933
|
-
const total = checkAmount
|
|
9934
|
-
const waiver = (bill === null || bill === void 0 ? void 0 : bill.feeWaiver)
|
|
9914
|
+
const total = checkAmount || 0;
|
|
9915
|
+
const waiver = (bill === null || bill === void 0 ? void 0 : bill.feeWaiver) || 0;
|
|
9935
9916
|
const finalAmount = total - waiver;
|
|
9936
9917
|
return /*#__PURE__*/React.createElement(Card, {
|
|
9937
9918
|
key: index
|
|
@@ -9958,15 +9939,9 @@ const MyChallanResult = ({
|
|
|
9958
9939
|
onSubmit: () => handleMakePayment(bill === null || bill === void 0 ? void 0 : bill.challanNo)
|
|
9959
9940
|
})));
|
|
9960
9941
|
}), (getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$chall3 = getChallanData.challans) === null || _getChallanData$chall3 === void 0 ? void 0 : _getChallanData$chall3.length) === 0 && !loader && /*#__PURE__*/React.createElement("p", {
|
|
9961
|
-
|
|
9962
|
-
marginLeft: "16px",
|
|
9963
|
-
marginTop: "16px"
|
|
9964
|
-
}
|
|
9942
|
+
className: "challan-load-message"
|
|
9965
9943
|
}, t("CHB_NO_APPLICATION_FOUND_MSG")), (getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$chall4 = getChallanData.challans) === null || _getChallanData$chall4 === void 0 ? void 0 : _getChallanData$chall4.length) !== 0 && (getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.totalCount) > t1 && /*#__PURE__*/React.createElement("div", {
|
|
9966
|
-
|
|
9967
|
-
marginLeft: "16px",
|
|
9968
|
-
marginTop: "16px"
|
|
9969
|
-
}
|
|
9944
|
+
className: "challan-load-message"
|
|
9970
9945
|
}, /*#__PURE__*/React.createElement("span", {
|
|
9971
9946
|
className: "link",
|
|
9972
9947
|
style: {
|
|
@@ -10032,6 +10007,7 @@ const getTimelineAcknowledgementData = (workflowDetails, tenantInfo, pdfFiles =
|
|
|
10032
10007
|
const formats = (downloadLink === null || downloadLink === void 0 ? void 0 : (_downloadLink$split = downloadLink.split(",")) === null || _downloadLink$split === void 0 ? void 0 : _downloadLink$split.filter(Boolean)) || [];
|
|
10033
10008
|
return (formats === null || formats === void 0 ? void 0 : formats.find(link => !(link !== null && link !== void 0 && link.includes("large")) && !(link !== null && link !== void 0 && link.includes("medium")) && !(link !== null && link !== void 0 && link.includes("small")))) || (formats === null || formats === void 0 ? void 0 : formats[0]) || "";
|
|
10034
10009
|
};
|
|
10010
|
+
const pattern = /\[#\?.*?\*\*\]/;
|
|
10035
10011
|
const timelineRows = timeline.map((item, index) => {
|
|
10036
10012
|
var _item$auditDetails, _item$auditDetails2, _item$assigner, _item$assigner2, _item$assigner3, _item$wfComment;
|
|
10037
10013
|
const createdDate = (item === null || item === void 0 ? void 0 : (_item$auditDetails = item.auditDetails) === null || _item$auditDetails === void 0 ? void 0 : _item$auditDetails.created) || "N/A";
|
|
@@ -10041,7 +10017,8 @@ const getTimelineAcknowledgementData = (workflowDetails, tenantInfo, pdfFiles =
|
|
|
10041
10017
|
const mobileNumber = (item === null || item === void 0 ? void 0 : (_item$assigner3 = item.assigner) === null || _item$assigner3 === void 0 ? void 0 : _item$assigner3.mobileNumber) || "N/A";
|
|
10042
10018
|
const action = (item === null || item === void 0 ? void 0 : item.performedAction) || "N/A";
|
|
10043
10019
|
const status = (item === null || item === void 0 ? void 0 : item.status) || (item === null || item === void 0 ? void 0 : item.state) || "N/A";
|
|
10044
|
-
const
|
|
10020
|
+
const rawComment = (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment[0]) || "-";
|
|
10021
|
+
const comment = typeof rawComment === "string" ? rawComment.split(pattern)[0] : rawComment;
|
|
10045
10022
|
const documents = (item === null || item === void 0 ? void 0 : item.wfDocuments) || [];
|
|
10046
10023
|
const sla = (item === null || item === void 0 ? void 0 : item.sla) || "N/A";
|
|
10047
10024
|
const assignedTo = Array.isArray(item === null || item === void 0 ? void 0 : item.assignes) ? item.assignes.map(a => a === null || a === void 0 ? void 0 : a.name).filter(Boolean).join(", ") : "";
|
|
@@ -10153,7 +10130,9 @@ function NewApplicationTimeline({
|
|
|
10153
10130
|
workflowDetails,
|
|
10154
10131
|
t,
|
|
10155
10132
|
tenantId = Digit.ULBService.getCurrentTenantId(),
|
|
10156
|
-
timeObj
|
|
10133
|
+
timeObj,
|
|
10134
|
+
empUserName = null,
|
|
10135
|
+
handleSetEmpDesignation = () => {}
|
|
10157
10136
|
}) {
|
|
10158
10137
|
var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _employeeData$data, _employeeData$data$Em;
|
|
10159
10138
|
const {
|
|
@@ -10228,6 +10207,9 @@ function NewApplicationTimeline({
|
|
|
10228
10207
|
const translationKey = `COMMON_MASTERS_DESIGNATION_${assignment === null || assignment === void 0 ? void 0 : assignment.designation}`;
|
|
10229
10208
|
deptMap[emp === null || emp === void 0 ? void 0 : emp.code] = translationKey;
|
|
10230
10209
|
});
|
|
10210
|
+
if (employeeData && empUserName) {
|
|
10211
|
+
handleSetEmpDesignation(t(deptMap[empUserName]));
|
|
10212
|
+
}
|
|
10231
10213
|
if (isLoading) return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
10232
10214
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
10233
10215
|
className: "custom-timeline-container"
|
|
@@ -10258,7 +10240,7 @@ function NewApplicationTimeline({
|
|
|
10258
10240
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
10259
10241
|
className: "custom-timeline-entries"
|
|
10260
10242
|
}, sortedData === null || sortedData === void 0 ? void 0 : sortedData.map((item, index) => {
|
|
10261
|
-
var _item$auditDetails, _item$auditDetails2, _item$assigner2, _item$assigner3, _item$assigner4, _item$
|
|
10243
|
+
var _item$auditDetails, _item$auditDetails2, _item$assigner2, _item$assigner3, _item$assigner4, _item$wfComment, _item$wfComment2, _item$wfComment3, _item$assignes, _item$assignes$, _item$assignes$2, _item$assignes$3, _item$wfDocuments, _item$wfDocuments2;
|
|
10262
10244
|
return /*#__PURE__*/React.createElement("div", {
|
|
10263
10245
|
key: index,
|
|
10264
10246
|
className: "custom-timeline-entry"
|
|
@@ -10295,13 +10277,9 @@ function NewApplicationTimeline({
|
|
|
10295
10277
|
className: "custom-officer-info"
|
|
10296
10278
|
}, /*#__PURE__*/React.createElement("div", {
|
|
10297
10279
|
className: "custom-officer-name"
|
|
10298
|
-
}, (item === null || item === void 0 ? void 0 : (_item$assigner2 = item.assigner) === null || _item$assigner2 === void 0 ? void 0 : _item$assigner2.name) || t("CS_COMMON_NA")),
|
|
10299
|
-
className: "custom-officer-email"
|
|
10300
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
10301
|
-
className: "custom-email-label"
|
|
10302
|
-
}, t("Email")), " ", item === null || item === void 0 ? void 0 : (_item$assigner4 = item.assigner) === null || _item$assigner4 === void 0 ? void 0 : _item$assigner4.emailId), deptMap[item === null || item === void 0 ? void 0 : (_item$assigner5 = item.assigner) === null || _item$assigner5 === void 0 ? void 0 : _item$assigner5.userName] && /*#__PURE__*/React.createElement("div", {
|
|
10280
|
+
}, (item === null || item === void 0 ? void 0 : (_item$assigner2 = item.assigner) === null || _item$assigner2 === void 0 ? void 0 : _item$assigner2.name) || t("CS_COMMON_NA")), deptMap[item === null || item === void 0 ? void 0 : (_item$assigner3 = item.assigner) === null || _item$assigner3 === void 0 ? void 0 : _item$assigner3.userName] && /*#__PURE__*/React.createElement("div", {
|
|
10303
10281
|
className: "custom-officer-name"
|
|
10304
|
-
}, t(deptMap[item === null || item === void 0 ? void 0 : (_item$
|
|
10282
|
+
}, t(deptMap[item === null || item === void 0 ? void 0 : (_item$assigner4 = item.assigner) === null || _item$assigner4 === void 0 ? void 0 : _item$assigner4.userName])))), /*#__PURE__*/React.createElement("div", {
|
|
10305
10283
|
className: "custom-card-column custom-card-column-mid"
|
|
10306
10284
|
}, (item === null || item === void 0 ? void 0 : item.sla) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("h3", {
|
|
10307
10285
|
className: "custom-action-title"
|
|
@@ -10323,9 +10301,13 @@ function NewApplicationTimeline({
|
|
|
10323
10301
|
className: "custom-comments-title"
|
|
10324
10302
|
}, t("Officer Comments")), /*#__PURE__*/React.createElement("div", {
|
|
10325
10303
|
className: "custom-comment-text"
|
|
10326
|
-
}, item === null || item === void 0 ? void 0 : (_item$wfComment3 = item.wfComment) === null || _item$wfComment3 === void 0 ? void 0 : _item$wfComment3.map((comment, idx) =>
|
|
10327
|
-
|
|
10328
|
-
|
|
10304
|
+
}, item === null || item === void 0 ? void 0 : (_item$wfComment3 = item.wfComment) === null || _item$wfComment3 === void 0 ? void 0 : _item$wfComment3.map((comment, idx) => {
|
|
10305
|
+
const pattern = /\[#\?.*?\*\*\]/;
|
|
10306
|
+
const truncatedComment = typeof comment === "string" ? comment === null || comment === void 0 ? void 0 : comment.split(pattern)[0] : comment;
|
|
10307
|
+
return /*#__PURE__*/React.createElement("p", {
|
|
10308
|
+
key: idx
|
|
10309
|
+
}, truncatedComment);
|
|
10310
|
+
}))), (item === null || item === void 0 ? void 0 : (_item$assignes = item.assignes) === null || _item$assignes === void 0 ? void 0 : _item$assignes.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
10329
10311
|
className: "custom-assigned-to-footer"
|
|
10330
10312
|
}, /*#__PURE__*/React.createElement("h3", {
|
|
10331
10313
|
className: "custom-comments-title"
|
|
@@ -10333,9 +10315,9 @@ function NewApplicationTimeline({
|
|
|
10333
10315
|
className: "custom-officer-info"
|
|
10334
10316
|
}, /*#__PURE__*/React.createElement("div", {
|
|
10335
10317
|
className: "custom-officer-name"
|
|
10336
|
-
}, (_item$assignes$ = item.assignes[0]) === null || _item$assignes$ === void 0 ? void 0 : _item$assignes$.name
|
|
10318
|
+
}, (_item$assignes$ = item.assignes[0]) === null || _item$assignes$ === void 0 ? void 0 : _item$assignes$.name, deptMap[(_item$assignes$2 = item.assignes[0]) === null || _item$assignes$2 === void 0 ? void 0 : _item$assignes$2.userName] && /*#__PURE__*/React.createElement("span", {
|
|
10337
10319
|
className: "custom-officer-email"
|
|
10338
|
-
}, t(deptMap[(_item$assignes$3 = item.assignes[0]) === null || _item$assignes$3 === void 0 ? void 0 : _item$assignes$3.userName]))))), (item === null || item === void 0 ? void 0 : item.wfDocuments) && (item === null || item === void 0 ? void 0 : (_item$wfDocuments = item.wfDocuments) === null || _item$wfDocuments === void 0 ? void 0 : _item$wfDocuments.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
10320
|
+
}, "- ", t(deptMap[(_item$assignes$3 = item.assignes[0]) === null || _item$assignes$3 === void 0 ? void 0 : _item$assignes$3.userName])))))), (item === null || item === void 0 ? void 0 : item.wfDocuments) && (item === null || item === void 0 ? void 0 : (_item$wfDocuments = item.wfDocuments) === null || _item$wfDocuments === void 0 ? void 0 : _item$wfDocuments.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
10339
10321
|
className: "custom-comments-section-no-border"
|
|
10340
10322
|
}, /*#__PURE__*/React.createElement("h4", {
|
|
10341
10323
|
className: "custom-comments-title"
|
|
@@ -10399,10 +10381,7 @@ function ChallanDocument({
|
|
|
10399
10381
|
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
10400
10382
|
className: "document-grid"
|
|
10401
10383
|
}, (data === null || data === void 0 ? void 0 : data.pdfFiles) && /*#__PURE__*/React.createElement("div", {
|
|
10402
|
-
|
|
10403
|
-
display: "flex",
|
|
10404
|
-
flexWrap: "wrap"
|
|
10405
|
-
}
|
|
10384
|
+
className: "challan-doc-modal"
|
|
10406
10385
|
}, documents === null || documents === void 0 ? void 0 : documents.map((document, index) => {
|
|
10407
10386
|
let documentLink = pdfDownloadLink(data.pdfFiles, document === null || document === void 0 ? void 0 : document.fileStoreId);
|
|
10408
10387
|
return /*#__PURE__*/React.createElement("a", {
|
|
@@ -10503,15 +10482,28 @@ const ChallanApplicationDetails = () => {
|
|
|
10503
10482
|
}) {
|
|
10504
10483
|
setLoader(true);
|
|
10505
10484
|
try {
|
|
10506
|
-
var _applicationDetails$c,
|
|
10485
|
+
var _applicationDetails$c, _challanDetails$addit, _challanDetails$addit2, _challanDetails$addre, _applicationDetails$A, _applicationDetails$A2;
|
|
10507
10486
|
const applicationDetails = await Digit.ChallanGenerationService.search({
|
|
10508
10487
|
tenantId,
|
|
10509
10488
|
filters: {
|
|
10510
10489
|
challanNo: acknowledgementIds
|
|
10511
10490
|
}
|
|
10512
10491
|
});
|
|
10513
|
-
const
|
|
10514
|
-
|
|
10492
|
+
const challanDetails = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$c = applicationDetails.challans) === null || _applicationDetails$c === void 0 ? void 0 : _applicationDetails$c[0];
|
|
10493
|
+
const latitude = challanDetails === null || challanDetails === void 0 ? void 0 : (_challanDetails$addit = challanDetails.additionalDetail) === null || _challanDetails$addit === void 0 ? void 0 : _challanDetails$addit.latitude;
|
|
10494
|
+
const longitude = challanDetails === null || challanDetails === void 0 ? void 0 : (_challanDetails$addit2 = challanDetails.additionalDetail) === null || _challanDetails$addit2 === void 0 ? void 0 : _challanDetails$addit2.longitude;
|
|
10495
|
+
const addressFallback = challanDetails === null || challanDetails === void 0 ? void 0 : (_challanDetails$addre = challanDetails.address) === null || _challanDetails$addre === void 0 ? void 0 : _challanDetails$addre.addressLine1;
|
|
10496
|
+
let location = addressFallback;
|
|
10497
|
+
if (latitude && longitude) {
|
|
10498
|
+
try {
|
|
10499
|
+
const geoLocation = await getLocationName(latitude, longitude);
|
|
10500
|
+
if (geoLocation) {
|
|
10501
|
+
location = geoLocation;
|
|
10502
|
+
}
|
|
10503
|
+
} catch (err) {
|
|
10504
|
+
console.warn("Reverse geocoding failed, using address fallback", err);
|
|
10505
|
+
}
|
|
10506
|
+
}
|
|
10515
10507
|
const challan = {
|
|
10516
10508
|
...applicationDetails,
|
|
10517
10509
|
...challanEmpData
|
|
@@ -10596,25 +10588,19 @@ const ChallanApplicationDetails = () => {
|
|
|
10596
10588
|
}
|
|
10597
10589
|
});
|
|
10598
10590
|
}
|
|
10599
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div",
|
|
10600
|
-
className: "
|
|
10601
|
-
|
|
10602
|
-
|
|
10603
|
-
maxWidth: "960px"
|
|
10604
|
-
}
|
|
10591
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
10592
|
+
className: "challan-application-details"
|
|
10593
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
10594
|
+
className: "cardHeaderWithOptions"
|
|
10605
10595
|
}, /*#__PURE__*/React.createElement(Header, {
|
|
10606
|
-
|
|
10607
|
-
fontSize: "32px"
|
|
10608
|
-
}
|
|
10596
|
+
className: "challan-custom-header-font"
|
|
10609
10597
|
}, t("CHALLAN_DETAILS")), dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React.createElement(MultiLink, {
|
|
10610
10598
|
className: "multilinkWrapper",
|
|
10611
10599
|
onHeadClick: () => setShowOptions(!showOptions),
|
|
10612
10600
|
displayOptions: showOptions,
|
|
10613
10601
|
options: dowloadOptions
|
|
10614
10602
|
})), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
10615
|
-
|
|
10616
|
-
fontSize: "24px"
|
|
10617
|
-
}
|
|
10603
|
+
className: "challan-custom-subheader-font"
|
|
10618
10604
|
}, t("CHALLAN_OFFENDER_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
|
|
10619
10605
|
className: "border-none",
|
|
10620
10606
|
label: t("CORE_COMMON_NAME"),
|
|
@@ -10628,9 +10614,7 @@ const ChallanApplicationDetails = () => {
|
|
|
10628
10614
|
label: t("NDC_ADDRESS"),
|
|
10629
10615
|
text: (getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$addre = getChallanData.address) === null || _getChallanData$addre === void 0 ? void 0 : _getChallanData$addre.addressLine1) || t("CS_NA")
|
|
10630
10616
|
})), /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
10631
|
-
|
|
10632
|
-
fontSize: "24px"
|
|
10633
|
-
}
|
|
10617
|
+
className: "challan-custom-subheader-font"
|
|
10634
10618
|
}, t("CHALLAN_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
|
|
10635
10619
|
className: "border-none",
|
|
10636
10620
|
label: t("CHALLAN_NUMBER"),
|
|
@@ -10656,28 +10640,16 @@ const ChallanApplicationDetails = () => {
|
|
|
10656
10640
|
label: t("FEE_WAIVER_AMOUNT"),
|
|
10657
10641
|
text: getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.feeWaiver
|
|
10658
10642
|
})), /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
10659
|
-
|
|
10660
|
-
fontSize: "24px",
|
|
10661
|
-
marginTop: "30px"
|
|
10662
|
-
}
|
|
10643
|
+
className: "challan-custom-subheader-font"
|
|
10663
10644
|
}, t("CS_COMMON_DOCUMENTS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Card, {
|
|
10664
|
-
|
|
10665
|
-
display: "flex",
|
|
10666
|
-
flexDirection: "row",
|
|
10667
|
-
gap: "30px"
|
|
10668
|
-
}
|
|
10645
|
+
className: "challan-custom-card"
|
|
10669
10646
|
}, (getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$docum = getChallanData.documents) === null || _getChallanData$docum === void 0 ? void 0 : _getChallanData$docum.length) > 0 ? getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$docum2 = getChallanData.documents) === null || _getChallanData$docum2 === void 0 ? void 0 : _getChallanData$docum2.map((doc, index) => /*#__PURE__*/React.createElement(React.Fragment, {
|
|
10670
10647
|
key: index
|
|
10671
10648
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ChallanDocument, {
|
|
10672
10649
|
value: getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.documents,
|
|
10673
10650
|
Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
10674
10651
|
index: index
|
|
10675
|
-
}), /*#__PURE__*/React.createElement(CardSectionHeader, {
|
|
10676
|
-
style: {
|
|
10677
|
-
marginTop: "10px",
|
|
10678
|
-
fontSize: "15px"
|
|
10679
|
-
}
|
|
10680
|
-
}, t(doc === null || doc === void 0 ? void 0 : doc.documentType))))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), /*#__PURE__*/React.createElement(NewApplicationTimeline, {
|
|
10652
|
+
}), /*#__PURE__*/React.createElement(CardSectionHeader, null, t(doc === null || doc === void 0 ? void 0 : doc.documentType))))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), /*#__PURE__*/React.createElement(NewApplicationTimeline, {
|
|
10681
10653
|
workflowDetails: workflowDetails,
|
|
10682
10654
|
t: t
|
|
10683
10655
|
})), (loader || (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.isLoading)) && /*#__PURE__*/React.createElement(Loader, {
|
|
@@ -11048,14 +11020,8 @@ const ChallanSearchResults = ({
|
|
|
11048
11020
|
};
|
|
11049
11021
|
});
|
|
11050
11022
|
return /*#__PURE__*/React.createElement("div", {
|
|
11051
|
-
|
|
11052
|
-
|
|
11053
|
-
}
|
|
11054
|
-
}, /*#__PURE__*/React.createElement("div", null, header && /*#__PURE__*/React.createElement(Header, {
|
|
11055
|
-
style: {
|
|
11056
|
-
marginLeft: "8px"
|
|
11057
|
-
}
|
|
11058
|
-
}, t(header), " (", searchResults === null || searchResults === void 0 ? void 0 : searchResults.length, ")"), /*#__PURE__*/React.createElement(ResponseComposer, {
|
|
11023
|
+
className: "mychallan-custom"
|
|
11024
|
+
}, /*#__PURE__*/React.createElement("div", null, header && /*#__PURE__*/React.createElement(Header, null, t(header), " (", searchResults === null || searchResults === void 0 ? void 0 : searchResults.length, ")"), /*#__PURE__*/React.createElement(ResponseComposer, {
|
|
11059
11025
|
data: searchResults,
|
|
11060
11026
|
template: template,
|
|
11061
11027
|
actionButtonLabel: actionButtonLabel,
|
|
@@ -12641,24 +12607,11 @@ const InboxLinks = ({
|
|
|
12641
12607
|
}, /*#__PURE__*/React.createElement("span", {
|
|
12642
12608
|
className: "logo"
|
|
12643
12609
|
}, /*#__PURE__*/React.createElement(PTIcon, null)), " ", /*#__PURE__*/React.createElement("span", {
|
|
12644
|
-
style: {
|
|
12645
|
-
fontSize: "18px",
|
|
12646
|
-
paddingLeft: "0"
|
|
12647
|
-
},
|
|
12648
12610
|
className: "text"
|
|
12649
12611
|
}, t("ACTION_TEST_CHALLANGENERATION")));
|
|
12650
12612
|
return /*#__PURE__*/React.createElement(Card, {
|
|
12651
|
-
style: {
|
|
12652
|
-
paddingRight: 0,
|
|
12653
|
-
marginTop: 0
|
|
12654
|
-
},
|
|
12655
12613
|
className: "employeeCard filter inboxLinks"
|
|
12656
12614
|
}, /*#__PURE__*/React.createElement("div", {
|
|
12657
|
-
style: {
|
|
12658
|
-
display: "flex",
|
|
12659
|
-
alignItems: "center",
|
|
12660
|
-
justifyContent: "center"
|
|
12661
|
-
},
|
|
12662
12615
|
className: "complaint-links-container"
|
|
12663
12616
|
}, GetLogo(), /*#__PURE__*/React.createElement("div", {
|
|
12664
12617
|
className: "body"
|
|
@@ -12906,8 +12859,8 @@ const DesktopInbox = ({
|
|
|
12906
12859
|
row
|
|
12907
12860
|
}) => {
|
|
12908
12861
|
var _row$original5, _row$original6;
|
|
12909
|
-
const total = ((_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : _row$original5.totalAmount)
|
|
12910
|
-
const waiver = ((_row$original6 = row.original) === null || _row$original6 === void 0 ? void 0 : _row$original6.feeWaiver)
|
|
12862
|
+
const total = ((_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : _row$original5.totalAmount) || 0;
|
|
12863
|
+
const waiver = ((_row$original6 = row.original) === null || _row$original6 === void 0 ? void 0 : _row$original6.feeWaiver) || 0;
|
|
12911
12864
|
const finalAmount = total - waiver;
|
|
12912
12865
|
return GetCell(finalAmount);
|
|
12913
12866
|
},
|
|
@@ -12950,15 +12903,11 @@ const DesktopInbox = ({
|
|
|
12950
12903
|
t: t,
|
|
12951
12904
|
data: data,
|
|
12952
12905
|
columns: inboxColumns(),
|
|
12906
|
+
className: "challan-desktop-applicationtable",
|
|
12953
12907
|
getCellProps: cellInfo => {
|
|
12954
12908
|
return {
|
|
12955
12909
|
style: {
|
|
12956
|
-
minWidth: cellInfo.column.Header === t("ES_INBOX_APPLICATION_NO") ? "240px" : ""
|
|
12957
|
-
padding: "20px 18px",
|
|
12958
|
-
fontSize: "16px",
|
|
12959
|
-
wordBreak: "break-word",
|
|
12960
|
-
overflowWrap: "break-word",
|
|
12961
|
-
width: "250px"
|
|
12910
|
+
minWidth: cellInfo.column.Header === t("ES_INBOX_APPLICATION_NO") ? "240px" : ""
|
|
12962
12911
|
}
|
|
12963
12912
|
};
|
|
12964
12913
|
},
|
|
@@ -13240,8 +13189,8 @@ const MobileInbox = ({
|
|
|
13240
13189
|
row
|
|
13241
13190
|
}) => {
|
|
13242
13191
|
var _row$original3, _row$original4;
|
|
13243
|
-
const total = ((_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : _row$original3.totalAmount)
|
|
13244
|
-
const waiver = ((_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.feeWaiver)
|
|
13192
|
+
const total = ((_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : _row$original3.totalAmount) || 0;
|
|
13193
|
+
const waiver = ((_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.feeWaiver) || 0;
|
|
13245
13194
|
const finalAmount = total - waiver;
|
|
13246
13195
|
return GetCell(finalAmount);
|
|
13247
13196
|
},
|
|
@@ -13519,7 +13468,7 @@ const ModalConfig = ({
|
|
|
13519
13468
|
}
|
|
13520
13469
|
}, " ", finalAmount), " "))
|
|
13521
13470
|
}, {
|
|
13522
|
-
label: t("TL_APPROVAL_CHECKLIST_BUTTON_UP_FILE")
|
|
13471
|
+
label: `${t("TL_APPROVAL_CHECKLIST_BUTTON_UP_FILE")} *`,
|
|
13523
13472
|
populators: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(UploadFile, {
|
|
13524
13473
|
id: "workflow-doc",
|
|
13525
13474
|
onUpload: selectFile,
|
|
@@ -13766,14 +13715,28 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
13766
13715
|
if (chbPermissionLoading) return;
|
|
13767
13716
|
setChbPermissionLoading(true);
|
|
13768
13717
|
try {
|
|
13769
|
-
var _applicationDetails$c,
|
|
13718
|
+
var _applicationDetails$c, _challanDetails$addit, _challanDetails$addit2, _challanDetails$addre, _applicationDetails$A, _applicationDetails$A2;
|
|
13770
13719
|
const applicationDetails = await Digit.ChallanGenerationService.search({
|
|
13771
13720
|
tenantId,
|
|
13772
13721
|
filters: {
|
|
13773
13722
|
challanNo: acknowledgementIds
|
|
13774
13723
|
}
|
|
13775
13724
|
});
|
|
13776
|
-
const
|
|
13725
|
+
const challanDetails = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$c = applicationDetails.challans) === null || _applicationDetails$c === void 0 ? void 0 : _applicationDetails$c[0];
|
|
13726
|
+
const latitude = challanDetails === null || challanDetails === void 0 ? void 0 : (_challanDetails$addit = challanDetails.additionalDetail) === null || _challanDetails$addit === void 0 ? void 0 : _challanDetails$addit.latitude;
|
|
13727
|
+
const longitude = challanDetails === null || challanDetails === void 0 ? void 0 : (_challanDetails$addit2 = challanDetails.additionalDetail) === null || _challanDetails$addit2 === void 0 ? void 0 : _challanDetails$addit2.longitude;
|
|
13728
|
+
const addressFallback = challanDetails === null || challanDetails === void 0 ? void 0 : (_challanDetails$addre = challanDetails.address) === null || _challanDetails$addre === void 0 ? void 0 : _challanDetails$addre.addressLine1;
|
|
13729
|
+
let location = addressFallback;
|
|
13730
|
+
if (latitude && longitude) {
|
|
13731
|
+
try {
|
|
13732
|
+
const geoLocation = await getLocationName(latitude, longitude);
|
|
13733
|
+
if (geoLocation) {
|
|
13734
|
+
location = geoLocation;
|
|
13735
|
+
}
|
|
13736
|
+
} catch (err) {
|
|
13737
|
+
console.warn("Reverse geocoding failed, using address fallback", err);
|
|
13738
|
+
}
|
|
13739
|
+
}
|
|
13777
13740
|
console.log("location", location);
|
|
13778
13741
|
const challan = {
|
|
13779
13742
|
...applicationDetails,
|
|
@@ -13894,67 +13857,66 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
13894
13857
|
}
|
|
13895
13858
|
};
|
|
13896
13859
|
const submitAction = async modalData => {
|
|
13860
|
+
var _getChallanData$amoun, _getChallanData$amoun2;
|
|
13897
13861
|
console.log("modalData", modalData);
|
|
13898
13862
|
if (!(modalData !== null && modalData !== void 0 && modalData.amount)) {
|
|
13899
13863
|
setErrorOne(`Please Enter Amount`);
|
|
13900
13864
|
setShowErrorToastt(true);
|
|
13865
|
+
return;
|
|
13866
|
+
}
|
|
13867
|
+
if (!(modalData !== null && modalData !== void 0 && modalData.wfDocuments) || (modalData === null || modalData === void 0 ? void 0 : modalData.wfDocuments.length) === 0) {
|
|
13868
|
+
setErrorOne(`Please upload required document`);
|
|
13869
|
+
setShowErrorToastt(true);
|
|
13870
|
+
return;
|
|
13871
|
+
}
|
|
13872
|
+
const finalAmount = Math.max((getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$amoun = getChallanData.amount) === null || _getChallanData$amoun === void 0 ? void 0 : (_getChallanData$amoun2 = _getChallanData$amoun[0]) === null || _getChallanData$amoun2 === void 0 ? void 0 : _getChallanData$amoun2.amount) || 0, (getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.challanAmount) || 0);
|
|
13873
|
+
if ((modalData === null || modalData === void 0 ? void 0 : modalData.amount) > finalAmount) {
|
|
13874
|
+
setErrorOne(`Amount must be less than or equal to ${finalAmount}`);
|
|
13875
|
+
setShowErrorToastt(true);
|
|
13876
|
+
setError(`Amount must be less than or equal to ${finalAmount}`);
|
|
13901
13877
|
} else {
|
|
13902
|
-
|
|
13903
|
-
|
|
13904
|
-
|
|
13905
|
-
|
|
13906
|
-
|
|
13907
|
-
|
|
13908
|
-
|
|
13909
|
-
|
|
13910
|
-
|
|
13911
|
-
|
|
13912
|
-
Challan: {
|
|
13913
|
-
...getChallanData,
|
|
13914
|
-
workflow: {
|
|
13915
|
-
action: "SETTLED",
|
|
13916
|
-
documents: modalData === null || modalData === void 0 ? void 0 : modalData.wfDocuments
|
|
13917
|
-
},
|
|
13918
|
-
feeWaiver: modalData === null || modalData === void 0 ? void 0 : modalData.amount
|
|
13919
|
-
}
|
|
13920
|
-
};
|
|
13921
|
-
console.log("payload", payload);
|
|
13922
|
-
try {
|
|
13923
|
-
const response = await Digit.ChallanGenerationService.update(payload);
|
|
13924
|
-
setLoader(false);
|
|
13925
|
-
setShowModal(false);
|
|
13926
|
-
setLable("Challan is Settled");
|
|
13927
|
-
setError(false);
|
|
13928
|
-
setShowToast(true);
|
|
13929
|
-
setTimeout(() => {
|
|
13930
|
-
history.push("/digit-ui/employee/challangeneration/inbox");
|
|
13931
|
-
window.location.reload();
|
|
13932
|
-
}, 2000);
|
|
13933
|
-
} catch (error) {
|
|
13934
|
-
setLoader(false);
|
|
13878
|
+
console.log("nothing");
|
|
13879
|
+
setLoader(true);
|
|
13880
|
+
const payload = {
|
|
13881
|
+
Challan: {
|
|
13882
|
+
...getChallanData,
|
|
13883
|
+
workflow: {
|
|
13884
|
+
action: "SETTLED",
|
|
13885
|
+
documents: modalData === null || modalData === void 0 ? void 0 : modalData.wfDocuments
|
|
13886
|
+
},
|
|
13887
|
+
feeWaiver: modalData === null || modalData === void 0 ? void 0 : modalData.amount
|
|
13935
13888
|
}
|
|
13889
|
+
};
|
|
13890
|
+
console.log("payload", payload);
|
|
13891
|
+
try {
|
|
13892
|
+
const response = await Digit.ChallanGenerationService.update(payload);
|
|
13893
|
+
setLoader(false);
|
|
13894
|
+
setShowModal(false);
|
|
13895
|
+
setLable("Challan is Settled");
|
|
13896
|
+
setError(false);
|
|
13897
|
+
setShowToast(true);
|
|
13898
|
+
setTimeout(() => {
|
|
13899
|
+
history.push("/digit-ui/employee/challangeneration/inbox");
|
|
13900
|
+
window.location.reload();
|
|
13901
|
+
}, 2000);
|
|
13902
|
+
} catch (error) {
|
|
13903
|
+
setLoader(false);
|
|
13936
13904
|
}
|
|
13937
13905
|
}
|
|
13938
13906
|
};
|
|
13939
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div",
|
|
13940
|
-
className: "
|
|
13941
|
-
|
|
13942
|
-
|
|
13943
|
-
maxWidth: "960px"
|
|
13944
|
-
}
|
|
13907
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
13908
|
+
className: "challan-application-details"
|
|
13909
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
13910
|
+
className: "cardHeaderWithOptions"
|
|
13945
13911
|
}, /*#__PURE__*/React.createElement(Header, {
|
|
13946
|
-
|
|
13947
|
-
fontSize: "32px"
|
|
13948
|
-
}
|
|
13912
|
+
className: "challan-custom-header-font"
|
|
13949
13913
|
}, t("CHALLAN_DETAILS")), dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React.createElement(MultiLink, {
|
|
13950
13914
|
className: "multilinkWrapper",
|
|
13951
13915
|
onHeadClick: () => setShowOptions(!showOptions),
|
|
13952
13916
|
displayOptions: showOptions,
|
|
13953
13917
|
options: dowloadOptions
|
|
13954
13918
|
})), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
13955
|
-
|
|
13956
|
-
fontSize: "24px"
|
|
13957
|
-
}
|
|
13919
|
+
className: "challan-custom-subheader-font"
|
|
13958
13920
|
}, t("CHALLAN_OFFENDER_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
|
|
13959
13921
|
className: "border-none",
|
|
13960
13922
|
label: t("CORE_COMMON_NAME"),
|
|
@@ -13968,9 +13930,7 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
13968
13930
|
label: t("NDC_ADDRESS"),
|
|
13969
13931
|
text: (getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$addre = getChallanData.address) === null || _getChallanData$addre === void 0 ? void 0 : _getChallanData$addre.addressLine1) || t("CS_NA")
|
|
13970
13932
|
})), /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
13971
|
-
|
|
13972
|
-
fontSize: "24px"
|
|
13973
|
-
}
|
|
13933
|
+
className: "challan-custom-subheader-font"
|
|
13974
13934
|
}, t("CHALLAN_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
|
|
13975
13935
|
className: "border-none",
|
|
13976
13936
|
label: t("CHALLAN_NUMBER"),
|
|
@@ -13996,28 +13956,16 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
13996
13956
|
label: t("FEE_WAIVER_AMOUNT"),
|
|
13997
13957
|
text: getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.feeWaiver
|
|
13998
13958
|
})), /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
13999
|
-
|
|
14000
|
-
fontSize: "24px",
|
|
14001
|
-
marginTop: "30px"
|
|
14002
|
-
}
|
|
13959
|
+
className: "challan-custom-header"
|
|
14003
13960
|
}, t("CS_COMMON_DOCUMENTS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Card, {
|
|
14004
|
-
|
|
14005
|
-
display: "flex",
|
|
14006
|
-
flexDirection: "row",
|
|
14007
|
-
gap: "30px"
|
|
14008
|
-
}
|
|
13961
|
+
className: "challan-custom-card"
|
|
14009
13962
|
}, (getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$docum = getChallanData.documents) === null || _getChallanData$docum === void 0 ? void 0 : _getChallanData$docum.length) > 0 ? getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$docum2 = getChallanData.documents) === null || _getChallanData$docum2 === void 0 ? void 0 : _getChallanData$docum2.map((doc, index) => /*#__PURE__*/React.createElement(React.Fragment, {
|
|
14010
13963
|
key: index
|
|
14011
13964
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ChallanDocument, {
|
|
14012
13965
|
value: getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.documents,
|
|
14013
13966
|
Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
14014
13967
|
index: index
|
|
14015
|
-
}), /*#__PURE__*/React.createElement(CardSectionHeader, {
|
|
14016
|
-
style: {
|
|
14017
|
-
marginTop: "10px",
|
|
14018
|
-
fontSize: "15px"
|
|
14019
|
-
}
|
|
14020
|
-
}, t(doc === null || doc === void 0 ? void 0 : doc.documentType))))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), /*#__PURE__*/React.createElement(NewApplicationTimeline, {
|
|
13968
|
+
}), /*#__PURE__*/React.createElement(CardSectionHeader, null, t(doc === null || doc === void 0 ? void 0 : doc.documentType))))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), /*#__PURE__*/React.createElement(NewApplicationTimeline, {
|
|
14021
13969
|
workflowDetails: workflowDetails,
|
|
14022
13970
|
t: t
|
|
14023
13971
|
}), actions && actions.length > 0 && !actions.some(a => a.action === "SUBMIT") && /*#__PURE__*/React.createElement(ActionBar, null, displayMenu && (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data1 = workflowDetails.data) !== null && _workflowDetails$data1 !== void 0 && (_workflowDetails$data10 = _workflowDetails$data1.actionState) !== null && _workflowDetails$data10 !== void 0 && _workflowDetails$data10.nextActions || workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data11 = workflowDetails.data) !== null && _workflowDetails$data11 !== void 0 && _workflowDetails$data11.nextActions) ? /*#__PURE__*/React.createElement(Menu, {
|
|
@@ -14124,10 +14072,7 @@ const EmployeeApp = ({
|
|
|
14124
14072
|
}
|
|
14125
14073
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
14126
14074
|
to: "/digit-ui/employee",
|
|
14127
|
-
|
|
14128
|
-
cursor: "pointer",
|
|
14129
|
-
color: "#666"
|
|
14130
|
-
}
|
|
14075
|
+
className: "challan-link-href"
|
|
14131
14076
|
}, t("ES_COMMON_HOME")), " ", "/ ", /*#__PURE__*/React.createElement("span", null, t("CHALLAN_MODULE"))), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
14132
14077
|
exact: true,
|
|
14133
14078
|
path: `${path}/`,
|
|
@@ -14262,12 +14207,7 @@ const FormComposer = forwardRef((props, ref) => {
|
|
|
14262
14207
|
}, fieldSelector(field.type, field.populators))) : /*#__PURE__*/React.createElement("div", {
|
|
14263
14208
|
className: "field"
|
|
14264
14209
|
}, fieldSelector(field.type, field.populators)), props.errors[field.populators.name] && ((_field$populators = field.populators) !== null && _field$populators !== void 0 && _field$populators.validate ? errors[field.populators.validate] : true) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
14265
|
-
|
|
14266
|
-
width: "70%",
|
|
14267
|
-
marginLeft: "30%",
|
|
14268
|
-
fontSize: "12px",
|
|
14269
|
-
marginTop: "-21px"
|
|
14270
|
-
}
|
|
14210
|
+
className: "card-label-error-challan"
|
|
14271
14211
|
}, field.populators.error));
|
|
14272
14212
|
}), array.length - 1 === index ? null : /*#__PURE__*/React.createElement(BreakLine, null));
|
|
14273
14213
|
});
|
|
@@ -14633,11 +14573,7 @@ const MCollectAcknowledgement = () => {
|
|
|
14633
14573
|
}), /*#__PURE__*/React.createElement("path", {
|
|
14634
14574
|
d: "M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"
|
|
14635
14575
|
})), t("UC_PRINT_CHALLAN_LABEL")) , /*#__PURE__*/React.createElement(ActionBar, {
|
|
14636
|
-
|
|
14637
|
-
display: "flex",
|
|
14638
|
-
justifyContent: "flex-end",
|
|
14639
|
-
alignItems: "baseline"
|
|
14640
|
-
}
|
|
14576
|
+
className: "challan-emp-acknowledgement"
|
|
14641
14577
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
14642
14578
|
to: `/digit-ui/employee`,
|
|
14643
14579
|
style: {
|
|
@@ -14667,11 +14603,7 @@ const MCollectAcknowledgement = () => {
|
|
|
14667
14603
|
}), /*#__PURE__*/React.createElement("path", {
|
|
14668
14604
|
d: "M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"
|
|
14669
14605
|
})), t("UC_PRINT_CHALLAN_LABEL")) , /*#__PURE__*/React.createElement(ActionBar, {
|
|
14670
|
-
|
|
14671
|
-
display: "flex",
|
|
14672
|
-
justifyContent: "flex-end",
|
|
14673
|
-
alignItems: "baseline"
|
|
14674
|
-
}
|
|
14606
|
+
className: "challan-emp-acknowledgement"
|
|
14675
14607
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
14676
14608
|
to: `/digit-ui/employee`,
|
|
14677
14609
|
style: {
|
|
@@ -14842,52 +14774,8 @@ const SearchReceipt = () => {
|
|
|
14842
14774
|
return GetCell(row === null || row === void 0 ? void 0 : (_row$paymentDetails5 = row.paymentDetails) === null || _row$paymentDetails5 === void 0 ? void 0 : (_row$paymentDetails5$ = _row$paymentDetails5[0]) === null || _row$paymentDetails5$ === void 0 ? void 0 : (_row$paymentDetails5$2 = _row$paymentDetails5$.bill) === null || _row$paymentDetails5$2 === void 0 ? void 0 : _row$paymentDetails5$2.totalAmount);
|
|
14843
14775
|
}
|
|
14844
14776
|
}], []);
|
|
14845
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("
|
|
14846
|
-
|
|
14847
|
-
// padding: 20px;
|
|
14848
|
-
// background: #fff;
|
|
14849
|
-
// border-radius: 10px;
|
|
14850
|
-
max-width: 1200px;
|
|
14851
|
-
// margin: auto;
|
|
14852
|
-
// box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
|
14853
|
-
}
|
|
14854
|
-
|
|
14855
|
-
.ndcFormCard {
|
|
14856
|
-
display: grid;
|
|
14857
|
-
grid-template-columns: repeat(3, 1fr);
|
|
14858
|
-
gap: 20px;
|
|
14859
|
-
}
|
|
14860
|
-
|
|
14861
|
-
.surveydetailsform-wrapper {
|
|
14862
|
-
display: flex;
|
|
14863
|
-
flex-direction: column;
|
|
14864
|
-
width: 100%;
|
|
14865
|
-
}
|
|
14866
|
-
.surveydetailsform-wrapper p {
|
|
14867
|
-
color: red;
|
|
14868
|
-
font-size: 14px;
|
|
14869
|
-
}
|
|
14870
|
-
|
|
14871
|
-
.citizen-card-input{
|
|
14872
|
-
margin-bottom: 0 !important;
|
|
14873
|
-
}
|
|
14874
|
-
|
|
14875
|
-
@media (max-width: 1024px) {
|
|
14876
|
-
.ndcFormCard {
|
|
14877
|
-
grid-template-columns: repeat(2, 1fr);
|
|
14878
|
-
}
|
|
14879
|
-
}
|
|
14880
|
-
|
|
14881
|
-
@media (max-width: 768px) {
|
|
14882
|
-
.ndcFormCard {
|
|
14883
|
-
grid-template-columns: 1fr;
|
|
14884
|
-
}
|
|
14885
|
-
}
|
|
14886
|
-
`), /*#__PURE__*/React.createElement("div", {
|
|
14887
|
-
className: "employee-application-details",
|
|
14888
|
-
style: {
|
|
14889
|
-
marginBottom: "15px"
|
|
14890
|
-
}
|
|
14777
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
14778
|
+
className: "employee-application-details"
|
|
14891
14779
|
}, /*#__PURE__*/React.createElement(Header, null, "Search Receipts")), /*#__PURE__*/React.createElement("div", {
|
|
14892
14780
|
className: "card"
|
|
14893
14781
|
}, /*#__PURE__*/React.createElement(FormProvider, methods, /*#__PURE__*/React.createElement("form", {
|
|
@@ -14905,15 +14793,11 @@ const SearchReceipt = () => {
|
|
|
14905
14793
|
}
|
|
14906
14794
|
})
|
|
14907
14795
|
}), errors.receiptNumbers && /*#__PURE__*/React.createElement("p", {
|
|
14908
|
-
|
|
14909
|
-
color: "red"
|
|
14910
|
-
}
|
|
14796
|
+
className: "requiredField"
|
|
14911
14797
|
}, errors.receiptNumbers.message)), /*#__PURE__*/React.createElement("div", {
|
|
14912
14798
|
className: "surveydetailsform-wrapper"
|
|
14913
14799
|
}, /*#__PURE__*/React.createElement("label", null, "Service Type ", /*#__PURE__*/React.createElement("span", {
|
|
14914
|
-
|
|
14915
|
-
color: "red"
|
|
14916
|
-
}
|
|
14800
|
+
className: "requiredField"
|
|
14917
14801
|
}, "*")), /*#__PURE__*/React.createElement(Controller, {
|
|
14918
14802
|
control: control,
|
|
14919
14803
|
rules: {
|
|
@@ -14931,9 +14815,7 @@ const SearchReceipt = () => {
|
|
|
14931
14815
|
selected: props.value
|
|
14932
14816
|
})
|
|
14933
14817
|
}), errors.businessServices && /*#__PURE__*/React.createElement("p", {
|
|
14934
|
-
|
|
14935
|
-
color: "red"
|
|
14936
|
-
}
|
|
14818
|
+
className: "requiredField"
|
|
14937
14819
|
}, errors.businessServices.message)), /*#__PURE__*/React.createElement("div", {
|
|
14938
14820
|
className: "surveydetailsform-wrapper"
|
|
14939
14821
|
}, /*#__PURE__*/React.createElement("label", null, "Consumer code"), /*#__PURE__*/React.createElement(TextInput, {
|
|
@@ -14945,9 +14827,7 @@ const SearchReceipt = () => {
|
|
|
14945
14827
|
}
|
|
14946
14828
|
})
|
|
14947
14829
|
}), errors.consumerCodes && /*#__PURE__*/React.createElement("p", {
|
|
14948
|
-
|
|
14949
|
-
color: "red"
|
|
14950
|
-
}
|
|
14830
|
+
className: "requiredField"
|
|
14951
14831
|
}, errors.consumerCodes.message)), /*#__PURE__*/React.createElement("div", {
|
|
14952
14832
|
className: "surveydetailsform-wrapper"
|
|
14953
14833
|
}, /*#__PURE__*/React.createElement("label", null, "Mobile No"), /*#__PURE__*/React.createElement("div", {
|
|
@@ -14975,9 +14855,7 @@ const SearchReceipt = () => {
|
|
|
14975
14855
|
}
|
|
14976
14856
|
})
|
|
14977
14857
|
}), errors.mobileNumber && /*#__PURE__*/React.createElement("p", {
|
|
14978
|
-
|
|
14979
|
-
color: "red"
|
|
14980
|
-
}
|
|
14858
|
+
className: "requiredField"
|
|
14981
14859
|
}, errors.mobileNumber.message)))), /*#__PURE__*/React.createElement(SubmitBar, {
|
|
14982
14860
|
label: "Search",
|
|
14983
14861
|
submit: "submit"
|
|
@@ -15138,52 +15016,8 @@ const SearchChallan$2 = props => {
|
|
|
15138
15016
|
}, formattedStatus);
|
|
15139
15017
|
}
|
|
15140
15018
|
}], []);
|
|
15141
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("
|
|
15142
|
-
|
|
15143
|
-
// padding: 20px;
|
|
15144
|
-
// background: #fff;
|
|
15145
|
-
// border-radius: 10px;
|
|
15146
|
-
max-width: 1200px;
|
|
15147
|
-
// margin: auto;
|
|
15148
|
-
// box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
|
15149
|
-
}
|
|
15150
|
-
|
|
15151
|
-
.ndcFormCard {
|
|
15152
|
-
display: grid;
|
|
15153
|
-
grid-template-columns: repeat(3, 1fr);
|
|
15154
|
-
gap: 20px;
|
|
15155
|
-
}
|
|
15156
|
-
|
|
15157
|
-
.surveydetailsform-wrapper {
|
|
15158
|
-
display: flex;
|
|
15159
|
-
flex-direction: column;
|
|
15160
|
-
width: 100%;
|
|
15161
|
-
}
|
|
15162
|
-
.surveydetailsform-wrapper p {
|
|
15163
|
-
color: red;
|
|
15164
|
-
font-size: 14px;
|
|
15165
|
-
}
|
|
15166
|
-
|
|
15167
|
-
.citizen-card-input{
|
|
15168
|
-
margin-bottom: 0 !important;
|
|
15169
|
-
}
|
|
15170
|
-
|
|
15171
|
-
@media (max-width: 1024px) {
|
|
15172
|
-
.ndcFormCard {
|
|
15173
|
-
grid-template-columns: repeat(2, 1fr);
|
|
15174
|
-
}
|
|
15175
|
-
}
|
|
15176
|
-
|
|
15177
|
-
@media (max-width: 768px) {
|
|
15178
|
-
.ndcFormCard {
|
|
15179
|
-
grid-template-columns: 1fr;
|
|
15180
|
-
}
|
|
15181
|
-
}
|
|
15182
|
-
`), /*#__PURE__*/React.createElement("div", {
|
|
15183
|
-
className: "employee-application-details",
|
|
15184
|
-
style: {
|
|
15185
|
-
marginBottom: "15px"
|
|
15186
|
-
}
|
|
15019
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
15020
|
+
className: "employee-application-details"
|
|
15187
15021
|
}, /*#__PURE__*/React.createElement(Header, null, "Search Challan")), /*#__PURE__*/React.createElement("div", {
|
|
15188
15022
|
className: "card"
|
|
15189
15023
|
}, /*#__PURE__*/React.createElement(FormProvider, methods, /*#__PURE__*/React.createElement("form", {
|
|
@@ -15201,9 +15035,7 @@ const SearchChallan$2 = props => {
|
|
|
15201
15035
|
}
|
|
15202
15036
|
})
|
|
15203
15037
|
}), errors.challanNo && /*#__PURE__*/React.createElement("p", {
|
|
15204
|
-
|
|
15205
|
-
color: "red"
|
|
15206
|
-
}
|
|
15038
|
+
className: "requiredField"
|
|
15207
15039
|
}, errors.challanNo.message)), /*#__PURE__*/React.createElement("div", {
|
|
15208
15040
|
className: "surveydetailsform-wrapper"
|
|
15209
15041
|
}, /*#__PURE__*/React.createElement("label", null, "Service Type"), /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -15220,9 +15052,7 @@ const SearchChallan$2 = props => {
|
|
|
15220
15052
|
selected: props.value
|
|
15221
15053
|
})
|
|
15222
15054
|
}), errors.businessService && /*#__PURE__*/React.createElement("p", {
|
|
15223
|
-
|
|
15224
|
-
color: "red"
|
|
15225
|
-
}
|
|
15055
|
+
className: "requiredField"
|
|
15226
15056
|
}, errors.businessService.message)), /*#__PURE__*/React.createElement("div", {
|
|
15227
15057
|
className: "surveydetailsform-wrapper"
|
|
15228
15058
|
}, /*#__PURE__*/React.createElement("label", null, "Mobile No"), /*#__PURE__*/React.createElement("div", {
|
|
@@ -15250,19 +15080,12 @@ const SearchChallan$2 = props => {
|
|
|
15250
15080
|
}
|
|
15251
15081
|
})
|
|
15252
15082
|
}), errors.mobileNumber && /*#__PURE__*/React.createElement("p", {
|
|
15253
|
-
|
|
15254
|
-
color: "red"
|
|
15255
|
-
}
|
|
15083
|
+
className: "requiredField"
|
|
15256
15084
|
}, errors.mobileNumber.message)))), /*#__PURE__*/React.createElement(SubmitBar, {
|
|
15257
15085
|
label: "Search",
|
|
15258
15086
|
submit: "submit"
|
|
15259
15087
|
}))), (tableData === null || tableData === void 0 ? void 0 : tableData.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
15260
|
-
|
|
15261
|
-
backgroundColor: "white",
|
|
15262
|
-
marginRight: "200px",
|
|
15263
|
-
marginLeft: "2.5%",
|
|
15264
|
-
width: "100%"
|
|
15265
|
-
}
|
|
15088
|
+
className: "challan-search-table"
|
|
15266
15089
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
15267
15090
|
t: t,
|
|
15268
15091
|
data: tableData,
|
|
@@ -15563,22 +15386,13 @@ function PTRSelectDocument({
|
|
|
15563
15386
|
}, [isHidden]);
|
|
15564
15387
|
console.log("doc===", doc);
|
|
15565
15388
|
return /*#__PURE__*/React.createElement("div", {
|
|
15566
|
-
|
|
15567
|
-
marginBottom: "24px"
|
|
15568
|
-
}
|
|
15389
|
+
className: "challan-documents"
|
|
15569
15390
|
}, /*#__PURE__*/React.createElement(LabelFieldPair, {
|
|
15570
|
-
|
|
15571
|
-
display: "inline"
|
|
15572
|
-
}
|
|
15391
|
+
className: "challan-label-field"
|
|
15573
15392
|
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
15574
|
-
|
|
15575
|
-
marginBottom: "8px",
|
|
15576
|
-
width: "auto"
|
|
15577
|
-
}
|
|
15393
|
+
className: "challan-card-label"
|
|
15578
15394
|
}, t(doc === null || doc === void 0 ? void 0 : doc.code), " ", /*#__PURE__*/React.createElement("span", {
|
|
15579
|
-
|
|
15580
|
-
color: "red"
|
|
15581
|
-
}
|
|
15395
|
+
className: "requiredField"
|
|
15582
15396
|
}, " ", (doc === null || doc === void 0 ? void 0 : doc.required) && " *")), /*#__PURE__*/React.createElement("div", {
|
|
15583
15397
|
className: "field",
|
|
15584
15398
|
style: {
|
|
@@ -15601,26 +15415,13 @@ function PTRSelectDocument({
|
|
|
15601
15415
|
buttonType: "button",
|
|
15602
15416
|
error: !uploadedFile
|
|
15603
15417
|
}), console.log("documents", documents), (doc === null || doc === void 0 ? void 0 : doc.code) == "CHALLAN.EVIDENCE_IMAGE" && /*#__PURE__*/React.createElement("span", {
|
|
15604
|
-
|
|
15605
|
-
color: "green",
|
|
15606
|
-
fontSize: "14px"
|
|
15607
|
-
}
|
|
15418
|
+
className: "challan-note-green"
|
|
15608
15419
|
}, /*#__PURE__*/React.createElement("span", {
|
|
15609
|
-
|
|
15610
|
-
color: "red",
|
|
15611
|
-
paddingRight: "3px"
|
|
15612
|
-
}
|
|
15420
|
+
className: "challan-note-red"
|
|
15613
15421
|
}, "Note:"), "Please upload a picture **clicked with location enabled**."), (doc === null || doc === void 0 ? void 0 : doc.code) == "CHALLAN.EVIDENCE_IMAGE" && (documents === null || documents === void 0 ? void 0 : (_documents$filter = documents.filter(item => item.documentType == "CHALLAN.EVIDENCE_IMAGE")) === null || _documents$filter === void 0 ? void 0 : _documents$filter.map((item, index) => /*#__PURE__*/React.createElement("div", {
|
|
15614
|
-
key: index
|
|
15615
|
-
style: {
|
|
15616
|
-
marginTop: "10px"
|
|
15617
|
-
}
|
|
15422
|
+
key: index
|
|
15618
15423
|
}, /*#__PURE__*/React.createElement("div", {
|
|
15619
|
-
|
|
15620
|
-
marginTop: "5px",
|
|
15621
|
-
fontSize: "14px",
|
|
15622
|
-
color: "#333"
|
|
15623
|
-
}
|
|
15424
|
+
className: "challan-lat-long"
|
|
15624
15425
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("b", null, "Latitude:"), " ", item.latitude), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("b", null, "Longitude:"), " ", item.longitude))))))), getLoading && /*#__PURE__*/React.createElement(Loader, {
|
|
15625
15426
|
page: true
|
|
15626
15427
|
}));
|
|
@@ -15637,6 +15438,7 @@ const ChallanStepperForm = () => {
|
|
|
15637
15438
|
const [error, setError] = useState(null);
|
|
15638
15439
|
const [documentsData, setDocumentsData] = useState({});
|
|
15639
15440
|
const isCitizen = window.location.href.includes("citizen");
|
|
15441
|
+
const [getViolationData, setViolationData] = useState([]);
|
|
15640
15442
|
const handleDocumentsSelect = (key, data) => {
|
|
15641
15443
|
setDocumentsData(data);
|
|
15642
15444
|
};
|
|
@@ -15671,6 +15473,14 @@ const ChallanStepperForm = () => {
|
|
|
15671
15473
|
} = Digit.Hooks.useCustomMDMS(tenantId, "Challan", [{
|
|
15672
15474
|
name: "Documents"
|
|
15673
15475
|
}]);
|
|
15476
|
+
const {
|
|
15477
|
+
data: OffenceActData,
|
|
15478
|
+
isLoading: OffenceActLoading
|
|
15479
|
+
} = Digit.Hooks.useCustomMDMS(tenantId, "Challan", [{
|
|
15480
|
+
name: "Acts"
|
|
15481
|
+
}]);
|
|
15482
|
+
console.log("subCategoryData", subCategoryData);
|
|
15483
|
+
console.log("OffenceTypeData", OffenceTypeData);
|
|
15674
15484
|
const {
|
|
15675
15485
|
control,
|
|
15676
15486
|
handleSubmit,
|
|
@@ -15686,9 +15496,18 @@ const ChallanStepperForm = () => {
|
|
|
15686
15496
|
shouldUnregister: false
|
|
15687
15497
|
}
|
|
15688
15498
|
});
|
|
15499
|
+
const getActs = (offenceType, offenceActData) => {
|
|
15500
|
+
var _offenceType$acts, _offenceType$acts$map, _offenceType$acts$map2;
|
|
15501
|
+
return (offenceType === null || offenceType === void 0 ? void 0 : (_offenceType$acts = offenceType.acts) === null || _offenceType$acts === void 0 ? void 0 : (_offenceType$acts$map = _offenceType$acts.map(code => {
|
|
15502
|
+
var _offenceActData$Chall, _offenceActData$Chall2, _offenceActData$Chall3;
|
|
15503
|
+
return offenceActData === null || offenceActData === void 0 ? void 0 : (_offenceActData$Chall = offenceActData.Challan) === null || _offenceActData$Chall === void 0 ? void 0 : (_offenceActData$Chall2 = _offenceActData$Chall.Acts) === null || _offenceActData$Chall2 === void 0 ? void 0 : (_offenceActData$Chall3 = _offenceActData$Chall2.find(a => (a === null || a === void 0 ? void 0 : a.code) === code)) === null || _offenceActData$Chall3 === void 0 ? void 0 : _offenceActData$Chall3.name;
|
|
15504
|
+
})) === null || _offenceType$acts$map === void 0 ? void 0 : (_offenceType$acts$map2 = _offenceType$acts$map.filter(Boolean)) === null || _offenceType$acts$map2 === void 0 ? void 0 : _offenceType$acts$map2.join(", ")) || "";
|
|
15505
|
+
};
|
|
15689
15506
|
const onSubmit = async data => {
|
|
15690
15507
|
var _docData$Challan, _docData$Challan$Docu, _data$offenceType, _data$offenceCategory, _data$offenceSubCateg, _documentsData$docume2, _documentsData$docume3, _documentsData$docume4, _documentsData$docume5;
|
|
15691
15508
|
let missingDocs = [];
|
|
15509
|
+
const actString = getActs(data === null || data === void 0 ? void 0 : data.offenceType, OffenceActData);
|
|
15510
|
+
console.log("Resolved Act(s):", actString);
|
|
15692
15511
|
docData === null || docData === void 0 ? void 0 : (_docData$Challan = docData.Challan) === null || _docData$Challan === void 0 ? void 0 : (_docData$Challan$Docu = _docData$Challan.Documents) === null || _docData$Challan$Docu === void 0 ? void 0 : _docData$Challan$Docu.forEach(doc => {
|
|
15693
15512
|
if (doc.required) {
|
|
15694
15513
|
var _documentsData$docume;
|
|
@@ -15722,7 +15541,8 @@ const ChallanStepperForm = () => {
|
|
|
15722
15541
|
}],
|
|
15723
15542
|
additionalDetail: {
|
|
15724
15543
|
latitude: documentsData === null || documentsData === void 0 ? void 0 : (_documentsData$docume2 = documentsData.documents) === null || _documentsData$docume2 === void 0 ? void 0 : (_documentsData$docume3 = _documentsData$docume2[1]) === null || _documentsData$docume3 === void 0 ? void 0 : _documentsData$docume3.latitude,
|
|
15725
|
-
longitude: documentsData === null || documentsData === void 0 ? void 0 : (_documentsData$docume4 = documentsData.documents) === null || _documentsData$docume4 === void 0 ? void 0 : (_documentsData$docume5 = _documentsData$docume4[1]) === null || _documentsData$docume5 === void 0 ? void 0 : _documentsData$docume5.longitude
|
|
15544
|
+
longitude: documentsData === null || documentsData === void 0 ? void 0 : (_documentsData$docume4 = documentsData.documents) === null || _documentsData$docume4 === void 0 ? void 0 : (_documentsData$docume5 = _documentsData$docume4[1]) === null || _documentsData$docume5 === void 0 ? void 0 : _documentsData$docume5.longitude,
|
|
15545
|
+
offenceActs: actString
|
|
15726
15546
|
},
|
|
15727
15547
|
documents: documentsData === null || documentsData === void 0 ? void 0 : documentsData.documents,
|
|
15728
15548
|
workflow: {
|
|
@@ -15765,48 +15585,25 @@ const ChallanStepperForm = () => {
|
|
|
15765
15585
|
const filterRates = OffenceRates === null || OffenceRates === void 0 ? void 0 : (_OffenceRates$Challan = OffenceRates.Challan) === null || _OffenceRates$Challan === void 0 ? void 0 : (_OffenceRates$Challan2 = _OffenceRates$Challan.Rates) === null || _OffenceRates$Challan2 === void 0 ? void 0 : _OffenceRates$Challan2.filter(item => (item === null || item === void 0 ? void 0 : item.offenceTypeId) == (val === null || val === void 0 ? void 0 : val.id));
|
|
15766
15586
|
setValue("amount", filterRates === null || filterRates === void 0 ? void 0 : (_filterRates$ = filterRates[0]) === null || _filterRates$ === void 0 ? void 0 : _filterRates$.amount);
|
|
15767
15587
|
};
|
|
15588
|
+
const handleViolation = e => {
|
|
15589
|
+
var _OffenceTypeData$Chal, _OffenceTypeData$Chal2;
|
|
15590
|
+
const filterData = OffenceTypeData === null || OffenceTypeData === void 0 ? void 0 : (_OffenceTypeData$Chal = OffenceTypeData.Challan) === null || _OffenceTypeData$Chal === void 0 ? void 0 : (_OffenceTypeData$Chal2 = _OffenceTypeData$Chal.OffenceType) === null || _OffenceTypeData$Chal2 === void 0 ? void 0 : _OffenceTypeData$Chal2.filter(item => item.subCategoryId == (e === null || e === void 0 ? void 0 : e.id));
|
|
15591
|
+
setViolationData(filterData);
|
|
15592
|
+
};
|
|
15768
15593
|
return /*#__PURE__*/React.createElement("div", {
|
|
15769
|
-
className: "card"
|
|
15770
|
-
style: {
|
|
15771
|
-
display: "flex",
|
|
15772
|
-
flexDirection: "column",
|
|
15773
|
-
justifyContent: "center",
|
|
15774
|
-
alignItems: "center",
|
|
15775
|
-
minHeight: "100vh",
|
|
15776
|
-
background: "#f9f9f9"
|
|
15777
|
-
}
|
|
15594
|
+
className: "card custom-challan-card"
|
|
15778
15595
|
}, /*#__PURE__*/React.createElement("div", {
|
|
15779
|
-
|
|
15780
|
-
width: "100%",
|
|
15781
|
-
maxWidth: "600px",
|
|
15782
|
-
background: "#fff",
|
|
15783
|
-
padding: "30px",
|
|
15784
|
-
borderRadius: "12px",
|
|
15785
|
-
boxShadow: "0 4px 15px rgba(0, 0, 0, 0.1)"
|
|
15786
|
-
}
|
|
15596
|
+
className: "challan-stepper-parent-component"
|
|
15787
15597
|
}, /*#__PURE__*/React.createElement(CardHeader, {
|
|
15788
|
-
styles: {
|
|
15789
|
-
fontSize: "28px",
|
|
15790
|
-
fontWeight: "400",
|
|
15791
|
-
color: "#1C1D1F"
|
|
15792
|
-
},
|
|
15793
15598
|
divider: true
|
|
15794
15599
|
}, t("CREATE_CHALLAN")), /*#__PURE__*/React.createElement("form", {
|
|
15795
15600
|
onSubmit: handleSubmit(onSubmit)
|
|
15796
|
-
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
15797
|
-
style: {
|
|
15798
|
-
fontWeight: "bold",
|
|
15799
|
-
paddingBottom: "30px",
|
|
15800
|
-
fontSize: "25px"
|
|
15801
|
-
}
|
|
15802
|
-
}, t("CHALLAN_OFFENDER_DETAILS")), /*#__PURE__*/React.createElement("div", {
|
|
15601
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, t("CHALLAN_OFFENDER_DETAILS")), /*#__PURE__*/React.createElement("div", {
|
|
15803
15602
|
style: {
|
|
15804
15603
|
width: "100%"
|
|
15805
15604
|
}
|
|
15806
15605
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("NOC_APPLICANT_MOBILE_NO_LABEL")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
15807
|
-
|
|
15808
|
-
color: "red"
|
|
15809
|
-
}
|
|
15606
|
+
className: "requiredField"
|
|
15810
15607
|
}, "*")), /*#__PURE__*/React.createElement(Controller, {
|
|
15811
15608
|
control: control,
|
|
15812
15609
|
name: "mobileNumber",
|
|
@@ -15832,17 +15629,9 @@ const ChallanStepperForm = () => {
|
|
|
15832
15629
|
t: t
|
|
15833
15630
|
})
|
|
15834
15631
|
}), (errors === null || errors === void 0 ? void 0 : errors.mobileNumber) && /*#__PURE__*/React.createElement("p", {
|
|
15835
|
-
|
|
15836
|
-
|
|
15837
|
-
|
|
15838
|
-
}, errors.mobileNumber.message)), /*#__PURE__*/React.createElement("div", {
|
|
15839
|
-
style: {
|
|
15840
|
-
marginBottom: "20px"
|
|
15841
|
-
}
|
|
15842
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("BPA_BASIC_DETAILS_APPLICATION_NAME_LABEL")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
15843
|
-
style: {
|
|
15844
|
-
color: "red"
|
|
15845
|
-
}
|
|
15632
|
+
className: "requiredField"
|
|
15633
|
+
}, errors.mobileNumber.message)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("BPA_BASIC_DETAILS_APPLICATION_NAME_LABEL")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
15634
|
+
className: "requiredField"
|
|
15846
15635
|
}, "*")), /*#__PURE__*/React.createElement(Controller, {
|
|
15847
15636
|
control: control,
|
|
15848
15637
|
name: "name",
|
|
@@ -15856,9 +15645,6 @@ const ChallanStepperForm = () => {
|
|
|
15856
15645
|
render: props => {
|
|
15857
15646
|
var _errors$name;
|
|
15858
15647
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
15859
|
-
style: {
|
|
15860
|
-
marginBottom: 0
|
|
15861
|
-
},
|
|
15862
15648
|
value: props.value,
|
|
15863
15649
|
error: errors === null || errors === void 0 ? void 0 : (_errors$name = errors.name) === null || _errors$name === void 0 ? void 0 : _errors$name.message,
|
|
15864
15650
|
onChange: e => {
|
|
@@ -15871,17 +15657,9 @@ const ChallanStepperForm = () => {
|
|
|
15871
15657
|
});
|
|
15872
15658
|
}
|
|
15873
15659
|
}), (errors === null || errors === void 0 ? void 0 : errors.name) && /*#__PURE__*/React.createElement("p", {
|
|
15874
|
-
|
|
15875
|
-
|
|
15876
|
-
|
|
15877
|
-
}, errors.name.message)), /*#__PURE__*/React.createElement("div", {
|
|
15878
|
-
style: {
|
|
15879
|
-
marginBottom: "20px"
|
|
15880
|
-
}
|
|
15881
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("PT_COMMON_COL_ADDRESS")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
15882
|
-
style: {
|
|
15883
|
-
color: "red"
|
|
15884
|
-
}
|
|
15660
|
+
className: "requiredField"
|
|
15661
|
+
}, errors.name.message)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("PT_COMMON_COL_ADDRESS")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
15662
|
+
className: "requiredField"
|
|
15885
15663
|
}, "*")), /*#__PURE__*/React.createElement(Controller, {
|
|
15886
15664
|
control: control,
|
|
15887
15665
|
name: "address",
|
|
@@ -15893,9 +15671,6 @@ const ChallanStepperForm = () => {
|
|
|
15893
15671
|
}
|
|
15894
15672
|
},
|
|
15895
15673
|
render: props => /*#__PURE__*/React.createElement(TextArea, {
|
|
15896
|
-
style: {
|
|
15897
|
-
marginBottom: 0
|
|
15898
|
-
},
|
|
15899
15674
|
name: "address",
|
|
15900
15675
|
value: props.value,
|
|
15901
15676
|
onChange: e => {
|
|
@@ -15907,17 +15682,9 @@ const ChallanStepperForm = () => {
|
|
|
15907
15682
|
t: t
|
|
15908
15683
|
})
|
|
15909
15684
|
}), (errors === null || errors === void 0 ? void 0 : errors.address) && /*#__PURE__*/React.createElement("p", {
|
|
15910
|
-
|
|
15911
|
-
|
|
15912
|
-
|
|
15913
|
-
}, errors.address.message)), /*#__PURE__*/React.createElement(LabelFieldPair, {
|
|
15914
|
-
style: {
|
|
15915
|
-
marginTop: "20px"
|
|
15916
|
-
}
|
|
15917
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, t("CHALLAN_OFFENCE_CATEGORY"), " ", /*#__PURE__*/React.createElement("span", {
|
|
15918
|
-
style: {
|
|
15919
|
-
color: "red"
|
|
15920
|
-
}
|
|
15685
|
+
className: "requiredField"
|
|
15686
|
+
}, errors.address.message)), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("CHALLAN_OFFENCE_CATEGORY"), " ", /*#__PURE__*/React.createElement("span", {
|
|
15687
|
+
className: "requiredField"
|
|
15921
15688
|
}, "*")), /*#__PURE__*/React.createElement(Controller, {
|
|
15922
15689
|
control: control,
|
|
15923
15690
|
name: "offenceCategory",
|
|
@@ -15928,10 +15695,6 @@ const ChallanStepperForm = () => {
|
|
|
15928
15695
|
render: props => {
|
|
15929
15696
|
var _categoryData$Challan;
|
|
15930
15697
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
15931
|
-
style: {
|
|
15932
|
-
marginBottom: 0,
|
|
15933
|
-
width: "100%"
|
|
15934
|
-
},
|
|
15935
15698
|
className: "form-field",
|
|
15936
15699
|
select: props.onChange,
|
|
15937
15700
|
selected: props.value,
|
|
@@ -15941,17 +15704,9 @@ const ChallanStepperForm = () => {
|
|
|
15941
15704
|
});
|
|
15942
15705
|
}
|
|
15943
15706
|
}), errors.offenceCategory && /*#__PURE__*/React.createElement("p", {
|
|
15944
|
-
|
|
15945
|
-
|
|
15946
|
-
|
|
15947
|
-
}, errors.offenceCategory.message)), /*#__PURE__*/React.createElement(LabelFieldPair, {
|
|
15948
|
-
style: {
|
|
15949
|
-
marginTop: "20px"
|
|
15950
|
-
}
|
|
15951
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, t("CHALLAN_OFFENCE_SUB_CATEGORY"), " ", /*#__PURE__*/React.createElement("span", {
|
|
15952
|
-
style: {
|
|
15953
|
-
color: "red"
|
|
15954
|
-
}
|
|
15707
|
+
className: "requiredField"
|
|
15708
|
+
}, errors.offenceCategory.message)), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("CHALLAN_OFFENCE_SUB_CATEGORY"), " ", /*#__PURE__*/React.createElement("span", {
|
|
15709
|
+
className: "requiredField"
|
|
15955
15710
|
}, "*")), /*#__PURE__*/React.createElement(Controller, {
|
|
15956
15711
|
control: control,
|
|
15957
15712
|
name: "offenceSubCategory",
|
|
@@ -15962,12 +15717,9 @@ const ChallanStepperForm = () => {
|
|
|
15962
15717
|
render: props => {
|
|
15963
15718
|
var _subCategoryData$Chal;
|
|
15964
15719
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
15965
|
-
style: {
|
|
15966
|
-
marginBottom: 0,
|
|
15967
|
-
width: "100%"
|
|
15968
|
-
},
|
|
15969
15720
|
className: "form-field",
|
|
15970
15721
|
select: e => {
|
|
15722
|
+
handleViolation(e);
|
|
15971
15723
|
props.onChange(e);
|
|
15972
15724
|
},
|
|
15973
15725
|
selected: props.value,
|
|
@@ -15977,17 +15729,9 @@ const ChallanStepperForm = () => {
|
|
|
15977
15729
|
});
|
|
15978
15730
|
}
|
|
15979
15731
|
}), errors.offenceSubCategory && /*#__PURE__*/React.createElement("p", {
|
|
15980
|
-
|
|
15981
|
-
|
|
15982
|
-
|
|
15983
|
-
}, errors.offenceSubCategory.message)), /*#__PURE__*/React.createElement(LabelFieldPair, {
|
|
15984
|
-
style: {
|
|
15985
|
-
marginTop: "20px"
|
|
15986
|
-
}
|
|
15987
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, t("CHALLAN_TYPE_OFFENCE"), " ", /*#__PURE__*/React.createElement("span", {
|
|
15988
|
-
style: {
|
|
15989
|
-
color: "red"
|
|
15990
|
-
}
|
|
15732
|
+
className: "requiredField"
|
|
15733
|
+
}, errors.offenceSubCategory.message)), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("CHALLAN_TYPE_OFFENCE"), " ", /*#__PURE__*/React.createElement("span", {
|
|
15734
|
+
className: "requiredField"
|
|
15991
15735
|
}, "*")), /*#__PURE__*/React.createElement(Controller, {
|
|
15992
15736
|
control: control,
|
|
15993
15737
|
name: "offenceType",
|
|
@@ -15995,43 +15739,26 @@ const ChallanStepperForm = () => {
|
|
|
15995
15739
|
rules: {
|
|
15996
15740
|
required: t("CHALLAN_TYPE_OFFENCE_REQUIRED")
|
|
15997
15741
|
},
|
|
15998
|
-
render: props => {
|
|
15999
|
-
|
|
16000
|
-
|
|
16001
|
-
|
|
16002
|
-
|
|
16003
|
-
|
|
16004
|
-
|
|
16005
|
-
|
|
16006
|
-
|
|
16007
|
-
|
|
16008
|
-
|
|
16009
|
-
},
|
|
16010
|
-
selected: props.value,
|
|
16011
|
-
option: OffenceTypeData === null || OffenceTypeData === void 0 ? void 0 : (_OffenceTypeData$Chal = OffenceTypeData.Challan) === null || _OffenceTypeData$Chal === void 0 ? void 0 : _OffenceTypeData$Chal.OffenceType,
|
|
16012
|
-
optionKey: "name",
|
|
16013
|
-
t: t
|
|
16014
|
-
});
|
|
16015
|
-
}
|
|
15742
|
+
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
15743
|
+
className: "form-field",
|
|
15744
|
+
select: e => {
|
|
15745
|
+
props.onChange(e);
|
|
15746
|
+
handleRates(e);
|
|
15747
|
+
},
|
|
15748
|
+
selected: props.value,
|
|
15749
|
+
option: getViolationData,
|
|
15750
|
+
optionKey: "name",
|
|
15751
|
+
t: t
|
|
15752
|
+
})
|
|
16016
15753
|
}), errors.offenceType && /*#__PURE__*/React.createElement("p", {
|
|
16017
|
-
|
|
16018
|
-
|
|
16019
|
-
}
|
|
16020
|
-
}, errors.offenceType.message)), /*#__PURE__*/React.createElement(LabelFieldPair, {
|
|
16021
|
-
style: {
|
|
16022
|
-
marginTop: "20px"
|
|
16023
|
-
}
|
|
16024
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("DEFAULT_CHALLAN_AMOUNT")}`), /*#__PURE__*/React.createElement(Controller, {
|
|
15754
|
+
className: "requiredField"
|
|
15755
|
+
}, errors.offenceType.message)), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("DEFAULT_CHALLAN_AMOUNT")}`), /*#__PURE__*/React.createElement(Controller, {
|
|
16025
15756
|
control: control,
|
|
16026
15757
|
name: "amount",
|
|
16027
15758
|
render: props => {
|
|
16028
15759
|
var _errors$name2;
|
|
16029
15760
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
16030
15761
|
type: "number",
|
|
16031
|
-
style: {
|
|
16032
|
-
marginBottom: 0,
|
|
16033
|
-
width: "100%"
|
|
16034
|
-
},
|
|
16035
15762
|
value: props.value,
|
|
16036
15763
|
error: errors === null || errors === void 0 ? void 0 : (_errors$name2 = errors.name) === null || _errors$name2 === void 0 ? void 0 : _errors$name2.message,
|
|
16037
15764
|
disable: true,
|
|
@@ -16044,21 +15771,9 @@ const ChallanStepperForm = () => {
|
|
|
16044
15771
|
t: t
|
|
16045
15772
|
});
|
|
16046
15773
|
}
|
|
16047
|
-
}))), /*#__PURE__*/React.createElement(CardLabel, {
|
|
16048
|
-
|
|
16049
|
-
|
|
16050
|
-
paddingTop: "30px",
|
|
16051
|
-
fontSize: "25px"
|
|
16052
|
-
}
|
|
16053
|
-
}, t("CHALLAN_DOCUMENTS"), " ", /*#__PURE__*/React.createElement("span", {
|
|
16054
|
-
style: {
|
|
16055
|
-
color: "red"
|
|
16056
|
-
}
|
|
16057
|
-
}, "*")), /*#__PURE__*/React.createElement("div", {
|
|
16058
|
-
style: {
|
|
16059
|
-
marginTop: "20px"
|
|
16060
|
-
}
|
|
16061
|
-
}, /*#__PURE__*/React.createElement(ChallanDocuments, {
|
|
15774
|
+
}))), /*#__PURE__*/React.createElement(CardLabel, null, t("CHALLAN_DOCUMENTS"), " ", /*#__PURE__*/React.createElement("span", {
|
|
15775
|
+
className: "requiredField"
|
|
15776
|
+
}, "*")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ChallanDocuments, {
|
|
16062
15777
|
t: t,
|
|
16063
15778
|
config: {
|
|
16064
15779
|
key: "documents"
|
|
@@ -16084,7 +15799,7 @@ const ChallanStepperForm = () => {
|
|
|
16084
15799
|
setShowToast(null);
|
|
16085
15800
|
},
|
|
16086
15801
|
isDleteBtn: "true"
|
|
16087
|
-
}), (OffenceRatesLoading || loader || categoryLoading || subCategoryLoading || OffenceTypeLoading) && /*#__PURE__*/React.createElement(Loader, {
|
|
15802
|
+
}), (OffenceRatesLoading || loader || categoryLoading || subCategoryLoading || OffenceTypeLoading || OffenceActLoading) && /*#__PURE__*/React.createElement(Loader, {
|
|
16088
15803
|
page: true
|
|
16089
15804
|
}));
|
|
16090
15805
|
};
|
|
@@ -16128,13 +15843,9 @@ const OffenderDetails = ({
|
|
|
16128
15843
|
width: "50%"
|
|
16129
15844
|
}
|
|
16130
15845
|
}, /*#__PURE__*/React.createElement("div", {
|
|
16131
|
-
|
|
16132
|
-
marginBottom: "20px"
|
|
16133
|
-
}
|
|
15846
|
+
className: "challan-bottom-style"
|
|
16134
15847
|
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("NOC_APPLICANT_MOBILE_NO_LABEL")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
16135
|
-
|
|
16136
|
-
color: "red"
|
|
16137
|
-
}
|
|
15848
|
+
className: "requiredField"
|
|
16138
15849
|
}, "*")), /*#__PURE__*/React.createElement(Controller, {
|
|
16139
15850
|
control: control,
|
|
16140
15851
|
name: "mobileNumber",
|
|
@@ -16146,26 +15857,17 @@ const OffenderDetails = ({
|
|
|
16146
15857
|
}
|
|
16147
15858
|
},
|
|
16148
15859
|
render: props => /*#__PURE__*/React.createElement(MobileNumber, {
|
|
16149
|
-
style: {
|
|
16150
|
-
marginBottom: 0
|
|
16151
|
-
},
|
|
16152
15860
|
value: props.value,
|
|
16153
15861
|
onChange: props.onChange,
|
|
16154
15862
|
onBlur: props.onBlur,
|
|
16155
15863
|
t: t
|
|
16156
15864
|
})
|
|
16157
15865
|
}), (errors === null || errors === void 0 ? void 0 : errors.mobileNumber) && /*#__PURE__*/React.createElement("p", {
|
|
16158
|
-
|
|
16159
|
-
color: "red"
|
|
16160
|
-
}
|
|
15866
|
+
className: "requiredField"
|
|
16161
15867
|
}, errors.mobileNumber.message)), /*#__PURE__*/React.createElement("div", {
|
|
16162
|
-
|
|
16163
|
-
marginBottom: "20px"
|
|
16164
|
-
}
|
|
15868
|
+
className: "challan-bottom-style"
|
|
16165
15869
|
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("BPA_BASIC_DETAILS_APPLICATION_NAME_LABEL")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
16166
|
-
|
|
16167
|
-
color: "red"
|
|
16168
|
-
}
|
|
15870
|
+
className: "requiredField"
|
|
16169
15871
|
}, "*")), /*#__PURE__*/React.createElement(Controller, {
|
|
16170
15872
|
control: control,
|
|
16171
15873
|
name: "name",
|
|
@@ -16179,9 +15881,6 @@ const OffenderDetails = ({
|
|
|
16179
15881
|
render: props => {
|
|
16180
15882
|
var _errors$name;
|
|
16181
15883
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
16182
|
-
style: {
|
|
16183
|
-
marginBottom: 0
|
|
16184
|
-
},
|
|
16185
15884
|
value: props.value,
|
|
16186
15885
|
error: errors === null || errors === void 0 ? void 0 : (_errors$name = errors.name) === null || _errors$name === void 0 ? void 0 : _errors$name.message,
|
|
16187
15886
|
onChange: e => {
|
|
@@ -16194,17 +15893,11 @@ const OffenderDetails = ({
|
|
|
16194
15893
|
});
|
|
16195
15894
|
}
|
|
16196
15895
|
}), (errors === null || errors === void 0 ? void 0 : errors.name) && /*#__PURE__*/React.createElement("p", {
|
|
16197
|
-
|
|
16198
|
-
color: "red"
|
|
16199
|
-
}
|
|
15896
|
+
className: "requiredField"
|
|
16200
15897
|
}, errors.name.message)), /*#__PURE__*/React.createElement("div", {
|
|
16201
|
-
|
|
16202
|
-
marginBottom: "20px"
|
|
16203
|
-
}
|
|
15898
|
+
className: "challan-bottom-style"
|
|
16204
15899
|
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("PT_COMMON_COL_ADDRESS")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
16205
|
-
|
|
16206
|
-
color: "red"
|
|
16207
|
-
}
|
|
15900
|
+
className: "requiredField"
|
|
16208
15901
|
}, "*")), /*#__PURE__*/React.createElement(Controller, {
|
|
16209
15902
|
control: control,
|
|
16210
15903
|
name: "address",
|
|
@@ -16216,9 +15909,6 @@ const OffenderDetails = ({
|
|
|
16216
15909
|
}
|
|
16217
15910
|
},
|
|
16218
15911
|
render: props => /*#__PURE__*/React.createElement(TextArea, {
|
|
16219
|
-
style: {
|
|
16220
|
-
marginBottom: 0
|
|
16221
|
-
},
|
|
16222
15912
|
name: "address",
|
|
16223
15913
|
value: props.value,
|
|
16224
15914
|
onChange: e => {
|
|
@@ -16230,9 +15920,7 @@ const OffenderDetails = ({
|
|
|
16230
15920
|
t: t
|
|
16231
15921
|
})
|
|
16232
15922
|
}), (errors === null || errors === void 0 ? void 0 : errors.address) && /*#__PURE__*/React.createElement("p", {
|
|
16233
|
-
|
|
16234
|
-
color: "red"
|
|
16235
|
-
}
|
|
15923
|
+
className: "requiredField"
|
|
16236
15924
|
}, errors.address.message))), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
16237
15925
|
className: "submit-bar-back",
|
|
16238
15926
|
label: "Back",
|
|
@@ -16333,9 +16021,7 @@ const OffenceDetails = ({
|
|
|
16333
16021
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
16334
16022
|
className: "card-label-smaller"
|
|
16335
16023
|
}, t("CHB_PURPOSE_DESCRIPTION"), " ", /*#__PURE__*/React.createElement("span", {
|
|
16336
|
-
|
|
16337
|
-
color: "red"
|
|
16338
|
-
}
|
|
16024
|
+
className: "requiredField"
|
|
16339
16025
|
}, "*")), /*#__PURE__*/React.createElement(Controller, {
|
|
16340
16026
|
control: control,
|
|
16341
16027
|
name: "offenceType",
|
|
@@ -16343,9 +16029,6 @@ const OffenceDetails = ({
|
|
|
16343
16029
|
render: props => {
|
|
16344
16030
|
var _OffenceTypeData$Chal;
|
|
16345
16031
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
16346
|
-
style: {
|
|
16347
|
-
marginBottom: 0
|
|
16348
|
-
},
|
|
16349
16032
|
className: "form-field",
|
|
16350
16033
|
select: props.onChange,
|
|
16351
16034
|
selected: props.value,
|
|
@@ -16355,17 +16038,9 @@ const OffenceDetails = ({
|
|
|
16355
16038
|
});
|
|
16356
16039
|
}
|
|
16357
16040
|
}), errors.offenceType && /*#__PURE__*/React.createElement("p", {
|
|
16358
|
-
|
|
16359
|
-
|
|
16360
|
-
|
|
16361
|
-
}, errors.offenceType.message)), /*#__PURE__*/React.createElement(LabelFieldPair, {
|
|
16362
|
-
style: {
|
|
16363
|
-
marginTop: "20px"
|
|
16364
|
-
}
|
|
16365
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, t("CHALLAN_OFFENCE_CATEGORY"), " ", /*#__PURE__*/React.createElement("span", {
|
|
16366
|
-
style: {
|
|
16367
|
-
color: "red"
|
|
16368
|
-
}
|
|
16041
|
+
className: "requiredField"
|
|
16042
|
+
}, errors.offenceType.message)), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("CHALLAN_OFFENCE_CATEGORY"), " ", /*#__PURE__*/React.createElement("span", {
|
|
16043
|
+
className: "requiredField"
|
|
16369
16044
|
}, "*")), /*#__PURE__*/React.createElement(Controller, {
|
|
16370
16045
|
control: control,
|
|
16371
16046
|
name: "offenceCategory",
|
|
@@ -16373,9 +16048,6 @@ const OffenceDetails = ({
|
|
|
16373
16048
|
render: props => {
|
|
16374
16049
|
var _categoryData$Challan;
|
|
16375
16050
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
16376
|
-
style: {
|
|
16377
|
-
marginBottom: 0
|
|
16378
|
-
},
|
|
16379
16051
|
className: "form-field",
|
|
16380
16052
|
select: props.onChange,
|
|
16381
16053
|
selected: props.value,
|
|
@@ -16385,17 +16057,9 @@ const OffenceDetails = ({
|
|
|
16385
16057
|
});
|
|
16386
16058
|
}
|
|
16387
16059
|
}), errors.offenceCategory && /*#__PURE__*/React.createElement("p", {
|
|
16388
|
-
|
|
16389
|
-
|
|
16390
|
-
|
|
16391
|
-
}, errors.offenceCategory.message)), /*#__PURE__*/React.createElement(LabelFieldPair, {
|
|
16392
|
-
style: {
|
|
16393
|
-
marginTop: "20px"
|
|
16394
|
-
}
|
|
16395
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, t("CHALLAN_OFFENCE_SUB_CATEGORY"), " ", /*#__PURE__*/React.createElement("span", {
|
|
16396
|
-
style: {
|
|
16397
|
-
color: "red"
|
|
16398
|
-
}
|
|
16060
|
+
className: "requiredField"
|
|
16061
|
+
}, errors.offenceCategory.message)), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("CHALLAN_OFFENCE_SUB_CATEGORY"), " ", /*#__PURE__*/React.createElement("span", {
|
|
16062
|
+
className: "requiredField"
|
|
16399
16063
|
}, "*")), /*#__PURE__*/React.createElement(Controller, {
|
|
16400
16064
|
control: control,
|
|
16401
16065
|
name: "offenceSubCategory",
|
|
@@ -16403,9 +16067,6 @@ const OffenceDetails = ({
|
|
|
16403
16067
|
render: props => {
|
|
16404
16068
|
var _subCategoryData$Chal;
|
|
16405
16069
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
16406
|
-
style: {
|
|
16407
|
-
marginBottom: 0
|
|
16408
|
-
},
|
|
16409
16070
|
className: "form-field",
|
|
16410
16071
|
select: props.onChange,
|
|
16411
16072
|
selected: props.value,
|
|
@@ -16415,27 +16076,17 @@ const OffenceDetails = ({
|
|
|
16415
16076
|
});
|
|
16416
16077
|
}
|
|
16417
16078
|
}), errors.offenceSubCategory && /*#__PURE__*/React.createElement("p", {
|
|
16418
|
-
|
|
16419
|
-
color: "red"
|
|
16420
|
-
}
|
|
16079
|
+
className: "requiredField"
|
|
16421
16080
|
}, errors.offenceSubCategory.message)), /*#__PURE__*/React.createElement(LabelFieldPair, {
|
|
16422
|
-
|
|
16423
|
-
width: "50%",
|
|
16424
|
-
marginTop: "20px"
|
|
16425
|
-
}
|
|
16081
|
+
className: "challan-amount-field"
|
|
16426
16082
|
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("CHALLAN_AMOUNT")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
16427
|
-
|
|
16428
|
-
color: "red"
|
|
16429
|
-
}
|
|
16083
|
+
className: "requiredField"
|
|
16430
16084
|
}, "*")), /*#__PURE__*/React.createElement(Controller, {
|
|
16431
16085
|
control: control,
|
|
16432
16086
|
name: "challanAmount",
|
|
16433
16087
|
render: props => {
|
|
16434
16088
|
var _errors$name;
|
|
16435
16089
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
16436
|
-
style: {
|
|
16437
|
-
marginBottom: 0
|
|
16438
|
-
},
|
|
16439
16090
|
value: props.value,
|
|
16440
16091
|
error: errors === null || errors === void 0 ? void 0 : (_errors$name = errors.name) === null || _errors$name === void 0 ? void 0 : _errors$name.message,
|
|
16441
16092
|
onChange: e => {
|
|
@@ -16448,9 +16099,7 @@ const OffenceDetails = ({
|
|
|
16448
16099
|
});
|
|
16449
16100
|
}
|
|
16450
16101
|
}), (errors === null || errors === void 0 ? void 0 : errors.challanAmount) && /*#__PURE__*/React.createElement("p", {
|
|
16451
|
-
|
|
16452
|
-
color: "red"
|
|
16453
|
-
}
|
|
16102
|
+
className: "requiredField"
|
|
16454
16103
|
}, errors.challanAmount.message))), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
16455
16104
|
className: "submit-bar-back",
|
|
16456
16105
|
label: "Back",
|
|
@@ -16526,7 +16175,7 @@ const ChallanStepFormThree = ({
|
|
|
16526
16175
|
function goNext(finalData) {
|
|
16527
16176
|
var _docData$CHB;
|
|
16528
16177
|
console.log("Current Data", finalData);
|
|
16529
|
-
console.log("data
|
|
16178
|
+
console.log("data||||?....=====", docData === null || docData === void 0 ? void 0 : (_docData$CHB = docData.CHB) === null || _docData$CHB === void 0 ? void 0 : _docData$CHB.Documents);
|
|
16530
16179
|
const missingFields = validation(finalData);
|
|
16531
16180
|
if (missingFields.length > 0) {
|
|
16532
16181
|
setError(`${t("CHB_MESSAGE_" + missingFields[0].replace(".", "_").toUpperCase())}`);
|
|
@@ -16672,21 +16321,11 @@ function ChallanSummary({
|
|
|
16672
16321
|
t: t,
|
|
16673
16322
|
data: slotlistRows,
|
|
16674
16323
|
columns: columns,
|
|
16675
|
-
|
|
16676
|
-
style: {
|
|
16677
|
-
minWidth: "150px",
|
|
16678
|
-
padding: "10px",
|
|
16679
|
-
fontSize: "16px",
|
|
16680
|
-
paddingLeft: "20px"
|
|
16681
|
-
}
|
|
16682
|
-
}),
|
|
16324
|
+
className: "challan-application-table",
|
|
16683
16325
|
isPaginationRequired: false,
|
|
16684
16326
|
totalRecords: slotlistRows.length
|
|
16685
16327
|
}), /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
16686
|
-
|
|
16687
|
-
fontSize: "24px",
|
|
16688
|
-
marginTop: "30px"
|
|
16689
|
-
}
|
|
16328
|
+
className: "challan-custom-header"
|
|
16690
16329
|
}, t("CS_COMMON_DOCUMENTS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Card, null, docs === null || docs === void 0 ? void 0 : docs.map((doc, index) => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ChallanDocument, {
|
|
16691
16330
|
value: docs,
|
|
16692
16331
|
Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
@@ -16926,14 +16565,28 @@ const ChallanResponseCitizen = props => {
|
|
|
16926
16565
|
if (chbPermissionLoading) return;
|
|
16927
16566
|
setChbPermissionLoading(true);
|
|
16928
16567
|
try {
|
|
16929
|
-
var _applicationDetails$c,
|
|
16568
|
+
var _applicationDetails$c, _challanDetails$addit, _challanDetails$addit2, _challanDetails$addre, _applicationDetails$A, _applicationDetails$A2;
|
|
16930
16569
|
const applicationDetails = await Digit.ChallanGenerationService.search({
|
|
16931
16570
|
tenantId,
|
|
16932
16571
|
filters: {
|
|
16933
16572
|
challanNo: ndcCode
|
|
16934
16573
|
}
|
|
16935
16574
|
});
|
|
16936
|
-
const
|
|
16575
|
+
const challanDetails = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$c = applicationDetails.challans) === null || _applicationDetails$c === void 0 ? void 0 : _applicationDetails$c[0];
|
|
16576
|
+
const latitude = challanDetails === null || challanDetails === void 0 ? void 0 : (_challanDetails$addit = challanDetails.additionalDetail) === null || _challanDetails$addit === void 0 ? void 0 : _challanDetails$addit.latitude;
|
|
16577
|
+
const longitude = challanDetails === null || challanDetails === void 0 ? void 0 : (_challanDetails$addit2 = challanDetails.additionalDetail) === null || _challanDetails$addit2 === void 0 ? void 0 : _challanDetails$addit2.longitude;
|
|
16578
|
+
const addressFallback = challanDetails === null || challanDetails === void 0 ? void 0 : (_challanDetails$addre = challanDetails.address) === null || _challanDetails$addre === void 0 ? void 0 : _challanDetails$addre.addressLine1;
|
|
16579
|
+
let location = addressFallback;
|
|
16580
|
+
if (latitude && longitude) {
|
|
16581
|
+
try {
|
|
16582
|
+
const geoLocation = await getLocationName(latitude, longitude);
|
|
16583
|
+
if (geoLocation) {
|
|
16584
|
+
location = geoLocation;
|
|
16585
|
+
}
|
|
16586
|
+
} catch (err) {
|
|
16587
|
+
console.warn("Reverse geocoding failed, using address fallback", err);
|
|
16588
|
+
}
|
|
16589
|
+
}
|
|
16937
16590
|
console.log('location', location);
|
|
16938
16591
|
const challan = {
|
|
16939
16592
|
...applicationDetails,
|
|
@@ -16988,12 +16641,7 @@ const ChallanResponseCitizen = props => {
|
|
|
16988
16641
|
}), /*#__PURE__*/React.createElement("path", {
|
|
16989
16642
|
d: "M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"
|
|
16990
16643
|
})), t("Challan_Notice"))), /*#__PURE__*/React.createElement(ActionBar, {
|
|
16991
|
-
|
|
16992
|
-
display: "flex",
|
|
16993
|
-
justifyContent: "flex-end",
|
|
16994
|
-
alignItems: "baseline",
|
|
16995
|
-
gap: " 20px"
|
|
16996
|
-
}
|
|
16644
|
+
className: "challan-response-action-bar"
|
|
16997
16645
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
16998
16646
|
label: t("CORE_COMMON_GO_TO_HOME"),
|
|
16999
16647
|
onSubmit: onSubmit
|