@djb25/digit-ui-module-wt 1.0.76 → 1.0.78
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 +206 -162
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +207 -163
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2867,6 +2867,7 @@ const BannerPicker = props => {
|
|
|
2867
2867
|
});
|
|
2868
2868
|
};
|
|
2869
2869
|
const WTAcknowledgement = _ref => {
|
|
2870
|
+
var _mutation$data2, _mutation$data3, _mutation$data4, _mutation$data4$data, _mutation$data4$data$, _mutation$data4$data$2, _mutation$error, _mutation$error$respo, _mutation$error$respo2, _mutation$error$respo3, _mutation$error$respo4;
|
|
2870
2871
|
let data = _ref.data,
|
|
2871
2872
|
onSuccess = _ref.onSuccess;
|
|
2872
2873
|
const _useTranslation2 = reactI18next.useTranslation(),
|
|
@@ -2883,9 +2884,15 @@ const WTAcknowledgement = _ref => {
|
|
|
2883
2884
|
data.tenantId = tenantId;
|
|
2884
2885
|
let formdata = waterTankerPayload(data);
|
|
2885
2886
|
mutation.mutate(formdata, {
|
|
2886
|
-
onSuccess
|
|
2887
|
+
onSuccess: res => {
|
|
2888
|
+
if (!(res !== null && res !== void 0 && res.error)) {
|
|
2889
|
+
onSuccess();
|
|
2890
|
+
}
|
|
2891
|
+
}
|
|
2887
2892
|
});
|
|
2888
|
-
} catch (err) {
|
|
2893
|
+
} catch (err) {
|
|
2894
|
+
console.error("WT payload construction error:", err);
|
|
2895
|
+
}
|
|
2889
2896
|
}, []);
|
|
2890
2897
|
Digit.Hooks.useCustomBackNavigation({
|
|
2891
2898
|
redirectPath: "${APPLICATION_PATH}/citizen"
|
|
@@ -2903,21 +2910,29 @@ const WTAcknowledgement = _ref => {
|
|
|
2903
2910
|
return Promise.reject(e);
|
|
2904
2911
|
}
|
|
2905
2912
|
};
|
|
2913
|
+
const isMutationSuccess = mutation.isSuccess && !((_mutation$data2 = mutation.data) !== null && _mutation$data2 !== void 0 && _mutation$data2.error);
|
|
2914
|
+
const isMutationError = mutation.isError || mutation.isSuccess && ((_mutation$data3 = mutation.data) === null || _mutation$data3 === void 0 ? void 0 : _mutation$data3.error);
|
|
2906
2915
|
return mutation.isLoading || mutation.isIdle ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
2907
2916
|
className: "vehicle-details-card"
|
|
2908
2917
|
}, /*#__PURE__*/React__default.createElement(BannerPicker, {
|
|
2909
2918
|
t: t,
|
|
2910
2919
|
data: mutation.data,
|
|
2911
|
-
isSuccess:
|
|
2920
|
+
isSuccess: isMutationSuccess,
|
|
2912
2921
|
isLoading: mutation.isIdle || mutation.isLoading
|
|
2913
|
-
}),
|
|
2922
|
+
}), isMutationError && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, {
|
|
2923
|
+
style: {
|
|
2924
|
+
color: "#d4351c",
|
|
2925
|
+
textAlign: "center",
|
|
2926
|
+
marginTop: "8px"
|
|
2927
|
+
}
|
|
2928
|
+
}, ((_mutation$data4 = mutation.data) === null || _mutation$data4 === void 0 ? void 0 : (_mutation$data4$data = _mutation$data4.data) === null || _mutation$data4$data === void 0 ? void 0 : (_mutation$data4$data$ = _mutation$data4$data.Errors) === null || _mutation$data4$data$ === void 0 ? void 0 : (_mutation$data4$data$2 = _mutation$data4$data$[0]) === null || _mutation$data4$data$2 === void 0 ? void 0 : _mutation$data4$data$2.message) || ((_mutation$error = mutation.error) === null || _mutation$error === void 0 ? void 0 : (_mutation$error$respo = _mutation$error.response) === null || _mutation$error$respo === void 0 ? void 0 : (_mutation$error$respo2 = _mutation$error$respo.data) === null || _mutation$error$respo2 === void 0 ? void 0 : (_mutation$error$respo3 = _mutation$error$respo2.Errors) === null || _mutation$error$respo3 === void 0 ? void 0 : (_mutation$error$respo4 = _mutation$error$respo3[0]) === null || _mutation$error$respo4 === void 0 ? void 0 : _mutation$error$respo4.message) || t("WT_SUBMISSION_FAILED_MESSAGE")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, isMutationSuccess && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
2914
2929
|
rowContainerStyle: rowContainerStyle,
|
|
2915
2930
|
last: true,
|
|
2916
2931
|
textStyle: {
|
|
2917
2932
|
whiteSpace: "pre",
|
|
2918
2933
|
width: "60%"
|
|
2919
2934
|
}
|
|
2920
|
-
})),
|
|
2935
|
+
})), isMutationSuccess && /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
2921
2936
|
label: t("WT_DOWNLOAD_ACKNOWLEDGEMENT"),
|
|
2922
2937
|
onSubmit: handleDownloadPdf
|
|
2923
2938
|
}), (user === null || user === void 0 ? void 0 : user.type) === "CITIZEN" ? /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
@@ -18407,6 +18422,9 @@ const WTEditApplicationModal = _ref => {
|
|
|
18407
18422
|
}),
|
|
18408
18423
|
formData = _useState[0],
|
|
18409
18424
|
setFormData = _useState[1];
|
|
18425
|
+
const _useState2 = React.useState(null),
|
|
18426
|
+
showToast = _useState2[0],
|
|
18427
|
+
setShowToast = _useState2[1];
|
|
18410
18428
|
const _Digit$Hooks$fsm$useV = Digit.Hooks.fsm.useVendorSearch({
|
|
18411
18429
|
tenantId,
|
|
18412
18430
|
filters: _extends({}, getFirstAvailable(formData === null || formData === void 0 ? void 0 : (_formData$dispatchDet = formData.dispatchDetails) === null || _formData$dispatchDet === void 0 ? void 0 : (_formData$dispatchDet2 = _formData$dispatchDet.fillingPoint) === null || _formData$dispatchDet2 === void 0 ? void 0 : _formData$dispatchDet2.id, formData === null || formData === void 0 ? void 0 : (_formData$dispatchDet3 = formData.dispatchDetails) === null || _formData$dispatchDet3 === void 0 ? void 0 : (_formData$dispatchDet4 = _formData$dispatchDet3.fillingPoint) === null || _formData$dispatchDet4 === void 0 ? void 0 : _formData$dispatchDet4.fillingPointId, formData === null || formData === void 0 ? void 0 : (_formData$dispatchDet5 = formData.dispatchDetails) === null || _formData$dispatchDet5 === void 0 ? void 0 : (_formData$dispatchDet6 = _formData$dispatchDet5.fillingPoint) === null || _formData$dispatchDet6 === void 0 ? void 0 : _formData$dispatchDet6.bookingId) ? {
|
|
@@ -18696,12 +18714,18 @@ const WTEditApplicationModal = _ref => {
|
|
|
18696
18714
|
window.location.reload();
|
|
18697
18715
|
},
|
|
18698
18716
|
onError: error => {
|
|
18717
|
+
var _error$response, _error$response$data, _error$response$data$, _error$response$data$2;
|
|
18699
18718
|
console.error("Update Error:", error);
|
|
18719
|
+
setShowToast({
|
|
18720
|
+
isError: true,
|
|
18721
|
+
label: (error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : (_error$response$data = _error$response.data) === null || _error$response$data === void 0 ? void 0 : (_error$response$data$ = _error$response$data.Errors) === null || _error$response$data$ === void 0 ? void 0 : (_error$response$data$2 = _error$response$data$[0]) === null || _error$response$data$2 === void 0 ? void 0 : _error$response$data$2.message) || t("WT_APPLICATION_UPDATE_FAILED")
|
|
18722
|
+
});
|
|
18723
|
+
setTimeout(() => setShowToast(null), 5000);
|
|
18700
18724
|
}
|
|
18701
18725
|
});
|
|
18702
18726
|
};
|
|
18703
18727
|
if (mutation.isLoading) return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
18704
|
-
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
|
|
18728
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
|
|
18705
18729
|
headerBarMain: /*#__PURE__*/React__default.createElement("h1", {
|
|
18706
18730
|
className: "heading-m"
|
|
18707
18731
|
}, t("WT_EDIT_APPLICATION_DETAILS")),
|
|
@@ -19108,7 +19132,11 @@ const WTEditApplicationModal = _ref => {
|
|
|
19108
19132
|
})),
|
|
19109
19133
|
optionKey: "name",
|
|
19110
19134
|
t: t
|
|
19111
|
-
}))))))
|
|
19135
|
+
})))))), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
19136
|
+
error: showToast.isError,
|
|
19137
|
+
label: showToast.label,
|
|
19138
|
+
onClose: () => setShowToast(null)
|
|
19139
|
+
}));
|
|
19112
19140
|
};
|
|
19113
19141
|
|
|
19114
19142
|
const TripImages = _ref => {
|
|
@@ -22115,14 +22143,6 @@ const ActionModal$5 = _ref => {
|
|
|
22115
22143
|
if (parsedAdhocRebateData !== null && parsedAdhocRebateData !== void 0 && (_parsedAdhocRebateDat7 = parsedAdhocRebateData.value) !== null && _parsedAdhocRebateDat7 !== void 0 && _parsedAdhocRebateDat7.adhocRebate) applicationData.additionalDetails.adhocRebate = parseInt(parsedAdhocRebateData === null || parsedAdhocRebateData === void 0 ? void 0 : (_parsedAdhocRebateDat8 = parsedAdhocRebateData.value) === null || _parsedAdhocRebateDat8 === void 0 ? void 0 : _parsedAdhocRebateDat8.adhocRebate) || "";
|
|
22116
22144
|
if (parsedAdhocRebateData !== null && parsedAdhocRebateData !== void 0 && (_parsedAdhocRebateDat9 = parsedAdhocRebateData.value) !== null && _parsedAdhocRebateDat9 !== void 0 && _parsedAdhocRebateDat9.adhocRebateComment) applicationData.additionalDetails.adhocRebateComment = (parsedAdhocRebateData === null || parsedAdhocRebateData === void 0 ? void 0 : (_parsedAdhocRebateDat0 = parsedAdhocRebateData.value) === null || _parsedAdhocRebateDat0 === void 0 ? void 0 : _parsedAdhocRebateDat0.adhocRebateComment) || "";
|
|
22117
22145
|
if (parsedAdhocRebateData !== null && parsedAdhocRebateData !== void 0 && (_parsedAdhocRebateDat1 = parsedAdhocRebateData.value) !== null && _parsedAdhocRebateDat1 !== void 0 && _parsedAdhocRebateDat1.adhocRebateReason) applicationData.additionalDetails.adhocRebateReason = (parsedAdhocRebateData === null || parsedAdhocRebateData === void 0 ? void 0 : (_parsedAdhocRebateDat10 = parsedAdhocRebateData.value) === null || _parsedAdhocRebateDat10 === void 0 ? void 0 : _parsedAdhocRebateDat10.adhocRebateReason) || "";
|
|
22118
|
-
const inspectionInformationData = sessionStorage.getItem("Digit.INSPECTION_INFORMATION_DATA");
|
|
22119
|
-
if (inspectionInformationData) {
|
|
22120
|
-
try {
|
|
22121
|
-
applicationData.inspectionInformation = JSON.parse(inspectionInformationData);
|
|
22122
|
-
} catch (e) {
|
|
22123
|
-
console.error("Error parsing inspection information data", e);
|
|
22124
|
-
}
|
|
22125
|
-
}
|
|
22126
22146
|
((_applicationData12 = applicationData) === null || _applicationData12 === void 0 ? void 0 : _applicationData12.serviceType) == "WATER" ? submitAction({
|
|
22127
22147
|
WaterConnection: applicationData,
|
|
22128
22148
|
disconnectRequest: false,
|
|
@@ -25834,29 +25854,7 @@ const ViewBreakup = _ref => {
|
|
|
25834
25854
|
textStyle: {
|
|
25835
25855
|
textAlign: "right"
|
|
25836
25856
|
}
|
|
25837
|
-
})), /*#__PURE__*/React__default.createElement(
|
|
25838
|
-
style: {
|
|
25839
|
-
color: "#cccccc",
|
|
25840
|
-
backgroundColor: "#cccccc",
|
|
25841
|
-
marginBottom: "10px"
|
|
25842
|
-
}
|
|
25843
|
-
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
25844
|
-
className: "border-none",
|
|
25845
|
-
rowContainerStyle: {
|
|
25846
|
-
margin: "0px"
|
|
25847
|
-
},
|
|
25848
|
-
labelStyle: {
|
|
25849
|
-
width: "50%"
|
|
25850
|
-
},
|
|
25851
|
-
key: "PDF_STATIC_LABEL_CONSOLIDATED_TLAPP_TOTAL_AMOUNT1",
|
|
25852
|
-
label: "" + t("PDF_STATIC_LABEL_CONSOLIDATED_TLAPP_TOTAL_AMOUNT"),
|
|
25853
|
-
text: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", Number(breakUpData === null || breakUpData === void 0 ? void 0 : breakUpData.fee) || 0),
|
|
25854
|
-
textStyle: {
|
|
25855
|
-
textAlign: "right",
|
|
25856
|
-
fontWeight: "700",
|
|
25857
|
-
fontSize: "24px"
|
|
25858
|
-
}
|
|
25859
|
-
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
|
|
25857
|
+
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
|
|
25860
25858
|
style: {
|
|
25861
25859
|
margin: "10px 0px"
|
|
25862
25860
|
}
|
|
@@ -25874,29 +25872,7 @@ const ViewBreakup = _ref => {
|
|
|
25874
25872
|
textStyle: {
|
|
25875
25873
|
textAlign: "right"
|
|
25876
25874
|
}
|
|
25877
|
-
})), /*#__PURE__*/React__default.createElement(
|
|
25878
|
-
style: {
|
|
25879
|
-
color: "#cccccc",
|
|
25880
|
-
backgroundColor: "#cccccc",
|
|
25881
|
-
marginBottom: "10px"
|
|
25882
|
-
}
|
|
25883
|
-
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
25884
|
-
className: "border-none",
|
|
25885
|
-
rowContainerStyle: {
|
|
25886
|
-
margin: "0px"
|
|
25887
|
-
},
|
|
25888
|
-
labelStyle: {
|
|
25889
|
-
width: "50%"
|
|
25890
|
-
},
|
|
25891
|
-
key: "PDF_STATIC_LABEL_CONSOLIDATED_TLAPP_TOTAL_AMOUNT2",
|
|
25892
|
-
label: "" + t("PDF_STATIC_LABEL_CONSOLIDATED_TLAPP_TOTAL_AMOUNT"),
|
|
25893
|
-
text: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", Number(breakUpData === null || breakUpData === void 0 ? void 0 : breakUpData.charge) || 0),
|
|
25894
|
-
textStyle: {
|
|
25895
|
-
textAlign: "right",
|
|
25896
|
-
fontWeight: "700",
|
|
25897
|
-
fontSize: "24px"
|
|
25898
|
-
}
|
|
25899
|
-
}), breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab5 = breakUpData.billSlabData) === null || _breakUpData$billSlab5 === void 0 ? void 0 : (_breakUpData$billSlab6 = _breakUpData$billSlab5.TAX) === null || _breakUpData$billSlab6 === void 0 ? void 0 : _breakUpData$billSlab6.map(data => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
25875
|
+
})), breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab5 = breakUpData.billSlabData) === null || _breakUpData$billSlab5 === void 0 ? void 0 : (_breakUpData$billSlab6 = _breakUpData$billSlab5.TAX) === null || _breakUpData$billSlab6 === void 0 ? void 0 : _breakUpData$billSlab6.map(data => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
25900
25876
|
className: "border-none",
|
|
25901
25877
|
rowContainerStyle: {
|
|
25902
25878
|
margin: "0px"
|
|
@@ -26228,7 +26204,8 @@ const DueVerification = _ref => {
|
|
|
26228
26204
|
return newData;
|
|
26229
26205
|
});
|
|
26230
26206
|
}, [applicationData]);
|
|
26231
|
-
const isPendingApproval = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_APPROVAL_FOR_CONNECTION";
|
|
26207
|
+
const isPendingApproval = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_APPROVAL_FOR_CONNECTION" || (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_CONNECTION_ACTIVATION";
|
|
26208
|
+
const isActivation = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_CONNECTION_ACTIVATION";
|
|
26232
26209
|
const columns = React.useMemo(() => {
|
|
26233
26210
|
const baseColumns = [{
|
|
26234
26211
|
Header: t("K No."),
|
|
@@ -26253,7 +26230,7 @@ const DueVerification = _ref => {
|
|
|
26253
26230
|
Cell: _ref2 => {
|
|
26254
26231
|
let row = _ref2.row,
|
|
26255
26232
|
value = _ref2.value;
|
|
26256
|
-
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
26233
|
+
return isActivation ? value || "-" : /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
26257
26234
|
style: {
|
|
26258
26235
|
marginBottom: "0px",
|
|
26259
26236
|
minWidth: "150px"
|
|
@@ -26300,7 +26277,7 @@ const DueVerification = _ref => {
|
|
|
26300
26277
|
fontWeight: "bold",
|
|
26301
26278
|
marginBottom: "16px"
|
|
26302
26279
|
}
|
|
26303
|
-
}, t("Due Verification")), /*#__PURE__*/React__default.createElement("div", {
|
|
26280
|
+
}, t("Due Verification")), !isActivation && /*#__PURE__*/React__default.createElement("div", {
|
|
26304
26281
|
style: {
|
|
26305
26282
|
display: "flex",
|
|
26306
26283
|
alignItems: "flex-end",
|
|
@@ -26347,25 +26324,19 @@ const DueVerification = _ref => {
|
|
|
26347
26324
|
}
|
|
26348
26325
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.AddIcon, null)))), tableData.length > 0 && /*#__PURE__*/React__default.createElement("div", {
|
|
26349
26326
|
style: {
|
|
26350
|
-
marginTop: "
|
|
26327
|
+
marginTop: "15px",
|
|
26351
26328
|
overflowX: "auto"
|
|
26352
26329
|
}
|
|
26353
26330
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Table, {
|
|
26354
26331
|
className: "customTable table-fixed-first-column table-border-style",
|
|
26355
26332
|
t: t,
|
|
26333
|
+
totalRecords: tableData.length,
|
|
26356
26334
|
disableSort: false,
|
|
26357
26335
|
autoSort: true,
|
|
26358
|
-
manualPagination:
|
|
26359
|
-
isPaginationRequired:
|
|
26336
|
+
manualPagination: true,
|
|
26337
|
+
isPaginationRequired: true,
|
|
26360
26338
|
data: tableData,
|
|
26361
|
-
columns: columns
|
|
26362
|
-
getCellProps: cellInfo => {
|
|
26363
|
-
return {
|
|
26364
|
-
style: {
|
|
26365
|
-
padding: "12px"
|
|
26366
|
-
}
|
|
26367
|
-
};
|
|
26368
|
-
}
|
|
26339
|
+
columns: columns
|
|
26369
26340
|
})));
|
|
26370
26341
|
};
|
|
26371
26342
|
|
|
@@ -26383,30 +26354,35 @@ const InspectionInformation = _ref => {
|
|
|
26383
26354
|
inspectorName = _useState3[0],
|
|
26384
26355
|
setInspectorName = _useState3[1];
|
|
26385
26356
|
React.useEffect(() => {
|
|
26386
|
-
|
|
26387
|
-
|
|
26388
|
-
|
|
26389
|
-
|
|
26390
|
-
|
|
26391
|
-
|
|
26392
|
-
|
|
26393
|
-
|
|
26394
|
-
|
|
26395
|
-
|
|
26396
|
-
|
|
26397
|
-
|
|
26398
|
-
|
|
26357
|
+
if (applicationData !== null && applicationData !== void 0 && applicationData.inspectionInformation) {
|
|
26358
|
+
const apiInspectionType = applicationData.inspectionInformation.inspectionType;
|
|
26359
|
+
let matchedType = null;
|
|
26360
|
+
const inspectionCode = typeof apiInspectionType === "object" && apiInspectionType !== null ? apiInspectionType.code : apiInspectionType;
|
|
26361
|
+
if (inspectionCode) {
|
|
26362
|
+
matchedType = [{
|
|
26363
|
+
i18nKey: "ES_COMMON_SELECT",
|
|
26364
|
+
code: ""
|
|
26365
|
+
}, {
|
|
26366
|
+
i18nKey: "New Connection Visit",
|
|
26367
|
+
code: "new_connection_visit"
|
|
26368
|
+
}].find(opt => opt.code === inspectionCode || opt.i18nKey === inspectionCode);
|
|
26369
|
+
}
|
|
26370
|
+
setInspectionType(matchedType || null);
|
|
26371
|
+
let dateValue = applicationData.inspectionInformation.inspectionDate || "";
|
|
26372
|
+
if (dateValue && typeof dateValue === 'number') {
|
|
26373
|
+
const d = new Date(dateValue);
|
|
26374
|
+
dateValue = d.getFullYear() + "-" + String(d.getMonth() + 1).padStart(2, '0') + "-" + String(d.getDate()).padStart(2, '0');
|
|
26375
|
+
} else if (dateValue && typeof dateValue === 'string' && dateValue.includes('-')) ; else if (dateValue) {
|
|
26376
|
+
const num = Number(dateValue);
|
|
26377
|
+
if (!isNaN(num)) {
|
|
26378
|
+
const d = new Date(num);
|
|
26379
|
+
dateValue = d.getFullYear() + "-" + String(d.getMonth() + 1).padStart(2, '0') + "-" + String(d.getDate()).padStart(2, '0');
|
|
26380
|
+
}
|
|
26381
|
+
}
|
|
26382
|
+
setInspectionDate(dateValue);
|
|
26399
26383
|
setInspectorName(applicationData.inspectionInformation.inspectorName || "");
|
|
26400
|
-
sessionStorage.setItem("Digit.INSPECTION_INFORMATION_DATA", JSON.stringify(applicationData.inspectionInformation));
|
|
26401
26384
|
}
|
|
26402
26385
|
}, [applicationData]);
|
|
26403
|
-
React.useEffect(() => {
|
|
26404
|
-
sessionStorage.setItem("Digit.INSPECTION_INFORMATION_DATA", JSON.stringify({
|
|
26405
|
-
inspectionType,
|
|
26406
|
-
inspectionDate,
|
|
26407
|
-
inspectorName
|
|
26408
|
-
}));
|
|
26409
|
-
}, [inspectionType, inspectionDate, inspectorName]);
|
|
26410
26386
|
const inspectionTypeOptions = [{
|
|
26411
26387
|
i18nKey: "ES_COMMON_SELECT",
|
|
26412
26388
|
code: ""
|
|
@@ -26414,6 +26390,23 @@ const InspectionInformation = _ref => {
|
|
|
26414
26390
|
i18nKey: "New Connection Visit",
|
|
26415
26391
|
code: "new_connection_visit"
|
|
26416
26392
|
}];
|
|
26393
|
+
const handleInspectionTypeChange = selected => {
|
|
26394
|
+
setInspectionType(selected);
|
|
26395
|
+
if (!applicationData.inspectionInformation) applicationData.inspectionInformation = {};
|
|
26396
|
+
applicationData.inspectionInformation.inspectionType = selected;
|
|
26397
|
+
};
|
|
26398
|
+
const handleInspectionDateChange = date => {
|
|
26399
|
+
setInspectionDate(date);
|
|
26400
|
+
if (!applicationData.inspectionInformation) applicationData.inspectionInformation = {};
|
|
26401
|
+
applicationData.inspectionInformation.inspectionDate = date ? new Date(date).getTime() : null;
|
|
26402
|
+
};
|
|
26403
|
+
const handleInspectorNameChange = e => {
|
|
26404
|
+
const val = e.target.value;
|
|
26405
|
+
setInspectorName(val);
|
|
26406
|
+
if (!applicationData.inspectionInformation) applicationData.inspectionInformation = {};
|
|
26407
|
+
applicationData.inspectionInformation.inspectorName = val;
|
|
26408
|
+
};
|
|
26409
|
+
const readOnly = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_CONNECTION_ACTIVATION";
|
|
26417
26410
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
26418
26411
|
style: {
|
|
26419
26412
|
marginBottom: "20px"
|
|
@@ -26433,79 +26426,53 @@ const InspectionInformation = _ref => {
|
|
|
26433
26426
|
}
|
|
26434
26427
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
26435
26428
|
style: {
|
|
26436
|
-
flex:
|
|
26429
|
+
flex: 1
|
|
26437
26430
|
}
|
|
26438
26431
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
26439
26432
|
style: {
|
|
26440
26433
|
fontSize: "16px",
|
|
26441
|
-
color: "#0B0C0C",
|
|
26442
26434
|
marginBottom: "8px",
|
|
26443
26435
|
display: "inline-block"
|
|
26444
26436
|
}
|
|
26445
|
-
}, t("Inspection Type"),
|
|
26446
|
-
style: {
|
|
26447
|
-
color: "red"
|
|
26448
|
-
}
|
|
26449
|
-
}, "*")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
26437
|
+
}, t("Inspection Type")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
26450
26438
|
option: inspectionTypeOptions,
|
|
26451
26439
|
optionKey: "i18nKey",
|
|
26452
|
-
id: "inspectionType",
|
|
26453
26440
|
selected: inspectionType,
|
|
26454
|
-
select:
|
|
26441
|
+
select: handleInspectionTypeChange,
|
|
26455
26442
|
t: t,
|
|
26456
|
-
|
|
26457
|
-
width: "100%"
|
|
26458
|
-
}
|
|
26443
|
+
disable: readOnly
|
|
26459
26444
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
26460
26445
|
style: {
|
|
26461
|
-
flex:
|
|
26446
|
+
flex: 1
|
|
26462
26447
|
}
|
|
26463
26448
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
26464
26449
|
style: {
|
|
26465
26450
|
fontSize: "16px",
|
|
26466
|
-
color: "#0B0C0C",
|
|
26467
26451
|
marginBottom: "8px",
|
|
26468
26452
|
display: "inline-block"
|
|
26469
26453
|
}
|
|
26470
|
-
}, t("Inspection Date"),
|
|
26471
|
-
style: {
|
|
26472
|
-
color: "red"
|
|
26473
|
-
}
|
|
26474
|
-
}, "*")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.DatePicker, {
|
|
26454
|
+
}, t("Inspection Date")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.DatePicker, {
|
|
26475
26455
|
date: inspectionDate,
|
|
26476
|
-
onChange:
|
|
26477
|
-
|
|
26478
|
-
width: "100%"
|
|
26479
|
-
}
|
|
26456
|
+
onChange: handleInspectionDateChange,
|
|
26457
|
+
disabled: readOnly
|
|
26480
26458
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
26481
26459
|
style: {
|
|
26482
|
-
display: "flex"
|
|
26483
|
-
gap: "20px",
|
|
26484
|
-
marginBottom: "20px",
|
|
26485
|
-
flexWrap: "wrap"
|
|
26460
|
+
display: "flex"
|
|
26486
26461
|
}
|
|
26487
26462
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
26488
26463
|
style: {
|
|
26489
|
-
flex:
|
|
26464
|
+
flex: 1
|
|
26490
26465
|
}
|
|
26491
26466
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
26492
26467
|
style: {
|
|
26493
26468
|
fontSize: "16px",
|
|
26494
|
-
color: "#0B0C0C",
|
|
26495
26469
|
marginBottom: "8px",
|
|
26496
26470
|
display: "inline-block"
|
|
26497
26471
|
}
|
|
26498
|
-
}, t("Inspector Name"),
|
|
26499
|
-
style: {
|
|
26500
|
-
color: "red"
|
|
26501
|
-
}
|
|
26502
|
-
}, "*")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
26472
|
+
}, t("Inspector Name")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
26503
26473
|
value: inspectorName,
|
|
26504
|
-
onChange:
|
|
26505
|
-
|
|
26506
|
-
width: "50%",
|
|
26507
|
-
marginBottom: "0"
|
|
26508
|
-
}
|
|
26474
|
+
onChange: handleInspectorNameChange,
|
|
26475
|
+
disabled: readOnly
|
|
26509
26476
|
}))));
|
|
26510
26477
|
};
|
|
26511
26478
|
|
|
@@ -27021,9 +26988,11 @@ function ApplicationDetailsContent(_ref) {
|
|
|
27021
26988
|
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet17 = detail.additionalDetails) === null || _detail$additionalDet17 === void 0 ? void 0 : _detail$additionalDet17.documents) && /*#__PURE__*/React__default.createElement(PropertyDocuments, {
|
|
27022
26989
|
documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet18 = detail.additionalDetails) === null || _detail$additionalDet18 === void 0 ? void 0 : _detail$additionalDet18.documents,
|
|
27023
26990
|
applicationStatus: applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus
|
|
27024
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet19 = detail.additionalDetails) === null || _detail$additionalDet19 === void 0 ? void 0 : _detail$additionalDet19.documents) && ((applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_FIELD_INSPECTION" || (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_APPROVAL_FOR_CONNECTION") && /*#__PURE__*/React__default.createElement(DueVerification, {
|
|
26991
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet19 = detail.additionalDetails) === null || _detail$additionalDet19 === void 0 ? void 0 : _detail$additionalDet19.documents) && ((applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_FIELD_INSPECTION" || (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_APPROVAL_FOR_CONNECTION" || (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_CONNECTION_ACTIVATION" || (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_RECONNECTION") && /*#__PURE__*/React__default.createElement(DueVerification, {
|
|
26992
|
+
applicationData: applicationData
|
|
26993
|
+
}), " ", (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet20 = detail.additionalDetails) === null || _detail$additionalDet20 === void 0 ? void 0 : _detail$additionalDet20.documents) && ((applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_APPROVAL_FOR_CONNECTION" || (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_CONNECTION_ACTIVATION") && /*#__PURE__*/React__default.createElement(InspectionInformation, {
|
|
27025
26994
|
applicationData: applicationData
|
|
27026
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
26995
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet21 = detail.additionalDetails) === null || _detail$additionalDet21 === void 0 ? void 0 : _detail$additionalDet21.taxHeadEstimatesCalculation) && /*#__PURE__*/React__default.createElement(PropertyEstimates, {
|
|
27027
26996
|
taxHeadEstimatesCalculation: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet22 = detail.additionalDetails) === null || _detail$additionalDet22 === void 0 ? void 0 : _detail$additionalDet22.taxHeadEstimatesCalculation
|
|
27028
26997
|
}), (detail === null || detail === void 0 ? void 0 : detail.isWaterConnectionDetails) && /*#__PURE__*/React__default.createElement(WSAdditonalDetails, {
|
|
27029
26998
|
wsAdditionalDetails: detail,
|
|
@@ -28671,6 +28640,7 @@ const BannerPicker$1 = props => {
|
|
|
28671
28640
|
});
|
|
28672
28641
|
};
|
|
28673
28642
|
const MTAcknowledgement = _ref => {
|
|
28643
|
+
var _mutation$data2, _mutation$data3, _mutation$data4, _mutation$data4$data, _mutation$data4$data$, _mutation$data4$data$2, _mutation$error, _mutation$error$respo, _mutation$error$respo2, _mutation$error$respo3, _mutation$error$respo4;
|
|
28674
28644
|
let data = _ref.data,
|
|
28675
28645
|
onSuccess = _ref.onSuccess;
|
|
28676
28646
|
const _useTranslation2 = reactI18next.useTranslation(),
|
|
@@ -28687,9 +28657,15 @@ const MTAcknowledgement = _ref => {
|
|
|
28687
28657
|
data.tenantId = tenantId;
|
|
28688
28658
|
let formdata = mobileToiletPayload(data);
|
|
28689
28659
|
mutation.mutate(formdata, {
|
|
28690
|
-
onSuccess
|
|
28660
|
+
onSuccess: res => {
|
|
28661
|
+
if (!(res !== null && res !== void 0 && res.error)) {
|
|
28662
|
+
onSuccess();
|
|
28663
|
+
}
|
|
28664
|
+
}
|
|
28691
28665
|
});
|
|
28692
|
-
} catch (err) {
|
|
28666
|
+
} catch (err) {
|
|
28667
|
+
console.error("MT payload construction error:", err);
|
|
28668
|
+
}
|
|
28693
28669
|
}, []);
|
|
28694
28670
|
Digit.Hooks.useCustomBackNavigation({
|
|
28695
28671
|
redirectPath: '${APPLICATION_PATH}/citizen'
|
|
@@ -28707,19 +28683,27 @@ const MTAcknowledgement = _ref => {
|
|
|
28707
28683
|
return Promise.reject(e);
|
|
28708
28684
|
}
|
|
28709
28685
|
};
|
|
28686
|
+
const isMutationSuccess = mutation.isSuccess && !((_mutation$data2 = mutation.data) !== null && _mutation$data2 !== void 0 && _mutation$data2.error);
|
|
28687
|
+
const isMutationError = mutation.isError || mutation.isSuccess && ((_mutation$data3 = mutation.data) === null || _mutation$data3 === void 0 ? void 0 : _mutation$data3.error);
|
|
28710
28688
|
return mutation.isLoading || mutation.isIdle ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(BannerPicker$1, {
|
|
28711
28689
|
t: t,
|
|
28712
28690
|
data: mutation.data,
|
|
28713
|
-
isSuccess:
|
|
28691
|
+
isSuccess: isMutationSuccess,
|
|
28714
28692
|
isLoading: mutation.isIdle || mutation.isLoading
|
|
28715
|
-
}),
|
|
28693
|
+
}), isMutationError && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, {
|
|
28694
|
+
style: {
|
|
28695
|
+
color: "#d4351c",
|
|
28696
|
+
textAlign: "center",
|
|
28697
|
+
marginTop: "8px"
|
|
28698
|
+
}
|
|
28699
|
+
}, ((_mutation$data4 = mutation.data) === null || _mutation$data4 === void 0 ? void 0 : (_mutation$data4$data = _mutation$data4.data) === null || _mutation$data4$data === void 0 ? void 0 : (_mutation$data4$data$ = _mutation$data4$data.Errors) === null || _mutation$data4$data$ === void 0 ? void 0 : (_mutation$data4$data$2 = _mutation$data4$data$[0]) === null || _mutation$data4$data$2 === void 0 ? void 0 : _mutation$data4$data$2.message) || ((_mutation$error = mutation.error) === null || _mutation$error === void 0 ? void 0 : (_mutation$error$respo = _mutation$error.response) === null || _mutation$error$respo === void 0 ? void 0 : (_mutation$error$respo2 = _mutation$error$respo.data) === null || _mutation$error$respo2 === void 0 ? void 0 : (_mutation$error$respo3 = _mutation$error$respo2.Errors) === null || _mutation$error$respo3 === void 0 ? void 0 : (_mutation$error$respo4 = _mutation$error$respo3[0]) === null || _mutation$error$respo4 === void 0 ? void 0 : _mutation$error$respo4.message) || t("MT_SUBMISSION_FAILED_MESSAGE")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, isMutationSuccess && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
28716
28700
|
rowContainerStyle: rowContainerStyle$1,
|
|
28717
28701
|
last: true,
|
|
28718
28702
|
textStyle: {
|
|
28719
28703
|
whiteSpace: "pre",
|
|
28720
28704
|
width: "60%"
|
|
28721
28705
|
}
|
|
28722
|
-
})),
|
|
28706
|
+
})), isMutationSuccess && /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
28723
28707
|
label: t("MT_DOWNLOAD_ACKNOWLEDGEMENT"),
|
|
28724
28708
|
onSubmit: handleDownloadPdf
|
|
28725
28709
|
}), (user === null || user === void 0 ? void 0 : user.type) === "CITIZEN" ? /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
@@ -28841,6 +28825,7 @@ const BannerPicker$2 = props => {
|
|
|
28841
28825
|
});
|
|
28842
28826
|
};
|
|
28843
28827
|
const TPAcknowledgement = _ref => {
|
|
28828
|
+
var _mutation$data2, _mutation$data3, _mutation$data4, _mutation$data4$data, _mutation$data4$data$, _mutation$data4$data$2, _mutation$error, _mutation$error$respo, _mutation$error$respo2, _mutation$error$respo3, _mutation$error$respo4;
|
|
28844
28829
|
let data = _ref.data,
|
|
28845
28830
|
onSuccess = _ref.onSuccess;
|
|
28846
28831
|
const _useTranslation2 = reactI18next.useTranslation(),
|
|
@@ -28857,9 +28842,15 @@ const TPAcknowledgement = _ref => {
|
|
|
28857
28842
|
data.tenantId = tenantId;
|
|
28858
28843
|
let formdata = treePruningPayload(data);
|
|
28859
28844
|
mutation.mutate(formdata, {
|
|
28860
|
-
onSuccess
|
|
28845
|
+
onSuccess: res => {
|
|
28846
|
+
if (!(res !== null && res !== void 0 && res.error)) {
|
|
28847
|
+
onSuccess();
|
|
28848
|
+
}
|
|
28849
|
+
}
|
|
28861
28850
|
});
|
|
28862
|
-
} catch (err) {
|
|
28851
|
+
} catch (err) {
|
|
28852
|
+
console.error("TP payload construction error:", err);
|
|
28853
|
+
}
|
|
28863
28854
|
}, []);
|
|
28864
28855
|
Digit.Hooks.useCustomBackNavigation({
|
|
28865
28856
|
redirectPath: '${APPLICATION_PATH}/citizen'
|
|
@@ -28877,19 +28868,27 @@ const TPAcknowledgement = _ref => {
|
|
|
28877
28868
|
return Promise.reject(e);
|
|
28878
28869
|
}
|
|
28879
28870
|
};
|
|
28871
|
+
const isMutationSuccess = mutation.isSuccess && !((_mutation$data2 = mutation.data) !== null && _mutation$data2 !== void 0 && _mutation$data2.error);
|
|
28872
|
+
const isMutationError = mutation.isError || mutation.isSuccess && ((_mutation$data3 = mutation.data) === null || _mutation$data3 === void 0 ? void 0 : _mutation$data3.error);
|
|
28880
28873
|
return mutation.isLoading || mutation.isIdle ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(BannerPicker$2, {
|
|
28881
28874
|
t: t,
|
|
28882
28875
|
data: mutation.data,
|
|
28883
|
-
isSuccess:
|
|
28876
|
+
isSuccess: isMutationSuccess,
|
|
28884
28877
|
isLoading: mutation.isIdle || mutation.isLoading
|
|
28885
|
-
}),
|
|
28878
|
+
}), isMutationError && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, {
|
|
28879
|
+
style: {
|
|
28880
|
+
color: "#d4351c",
|
|
28881
|
+
textAlign: "center",
|
|
28882
|
+
marginTop: "8px"
|
|
28883
|
+
}
|
|
28884
|
+
}, ((_mutation$data4 = mutation.data) === null || _mutation$data4 === void 0 ? void 0 : (_mutation$data4$data = _mutation$data4.data) === null || _mutation$data4$data === void 0 ? void 0 : (_mutation$data4$data$ = _mutation$data4$data.Errors) === null || _mutation$data4$data$ === void 0 ? void 0 : (_mutation$data4$data$2 = _mutation$data4$data$[0]) === null || _mutation$data4$data$2 === void 0 ? void 0 : _mutation$data4$data$2.message) || ((_mutation$error = mutation.error) === null || _mutation$error === void 0 ? void 0 : (_mutation$error$respo = _mutation$error.response) === null || _mutation$error$respo === void 0 ? void 0 : (_mutation$error$respo2 = _mutation$error$respo.data) === null || _mutation$error$respo2 === void 0 ? void 0 : (_mutation$error$respo3 = _mutation$error$respo2.Errors) === null || _mutation$error$respo3 === void 0 ? void 0 : (_mutation$error$respo4 = _mutation$error$respo3[0]) === null || _mutation$error$respo4 === void 0 ? void 0 : _mutation$error$respo4.message) || t("TP_SUBMISSION_FAILED_MESSAGE")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, isMutationSuccess && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
28886
28885
|
rowContainerStyle: rowContainerStyle$2,
|
|
28887
28886
|
last: true,
|
|
28888
28887
|
textStyle: {
|
|
28889
28888
|
whiteSpace: "pre",
|
|
28890
28889
|
width: "60%"
|
|
28891
28890
|
}
|
|
28892
|
-
})),
|
|
28891
|
+
})), isMutationSuccess && /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
28893
28892
|
label: t("TP_DOWNLOAD_ACKNOWLEDGEMENT"),
|
|
28894
28893
|
onSubmit: handleDownloadPdf
|
|
28895
28894
|
}), (user === null || user === void 0 ? void 0 : user.type) === "CITIZEN" ? /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
@@ -30091,6 +30090,7 @@ const BannerPicker$3 = props => {
|
|
|
30091
30090
|
});
|
|
30092
30091
|
};
|
|
30093
30092
|
const WTEmergencyFixedPointAcknowledgement = _ref => {
|
|
30093
|
+
var _mutation$data2, _mutation$data3, _mutation$data4, _mutation$data4$data, _mutation$data4$data$, _mutation$data4$data$2, _mutation$error, _mutation$error$respo, _mutation$error$respo2, _mutation$error$respo3, _mutation$error$respo4;
|
|
30094
30094
|
let data = _ref.data,
|
|
30095
30095
|
onSuccess = _ref.onSuccess;
|
|
30096
30096
|
const _useTranslation2 = reactI18next.useTranslation(),
|
|
@@ -30107,9 +30107,15 @@ const WTEmergencyFixedPointAcknowledgement = _ref => {
|
|
|
30107
30107
|
data.tenantId = tenantId;
|
|
30108
30108
|
let formdata = emergencyWaterTankerPayload(data);
|
|
30109
30109
|
mutation.mutate(formdata, {
|
|
30110
|
-
onSuccess
|
|
30110
|
+
onSuccess: res => {
|
|
30111
|
+
if (!(res !== null && res !== void 0 && res.error)) {
|
|
30112
|
+
onSuccess();
|
|
30113
|
+
}
|
|
30114
|
+
}
|
|
30111
30115
|
});
|
|
30112
|
-
} catch (err) {
|
|
30116
|
+
} catch (err) {
|
|
30117
|
+
console.error("Emergency WT payload construction error:", err);
|
|
30118
|
+
}
|
|
30113
30119
|
}, []);
|
|
30114
30120
|
Digit.Hooks.useCustomBackNavigation({
|
|
30115
30121
|
redirectPath: "${APPLICATION_PATH}/citizen"
|
|
@@ -30127,21 +30133,29 @@ const WTEmergencyFixedPointAcknowledgement = _ref => {
|
|
|
30127
30133
|
return Promise.reject(e);
|
|
30128
30134
|
}
|
|
30129
30135
|
};
|
|
30136
|
+
const isMutationSuccess = mutation.isSuccess && !((_mutation$data2 = mutation.data) !== null && _mutation$data2 !== void 0 && _mutation$data2.error);
|
|
30137
|
+
const isMutationError = mutation.isError || mutation.isSuccess && ((_mutation$data3 = mutation.data) === null || _mutation$data3 === void 0 ? void 0 : _mutation$data3.error);
|
|
30130
30138
|
return mutation.isLoading || mutation.isIdle ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
30131
30139
|
className: "vehicle-details-card"
|
|
30132
30140
|
}, /*#__PURE__*/React__default.createElement(BannerPicker$3, {
|
|
30133
30141
|
t: t,
|
|
30134
30142
|
data: mutation.data,
|
|
30135
|
-
isSuccess:
|
|
30143
|
+
isSuccess: isMutationSuccess,
|
|
30136
30144
|
isLoading: mutation.isIdle || mutation.isLoading
|
|
30137
|
-
}),
|
|
30145
|
+
}), isMutationError && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, {
|
|
30146
|
+
style: {
|
|
30147
|
+
color: "#d4351c",
|
|
30148
|
+
textAlign: "center",
|
|
30149
|
+
marginTop: "8px"
|
|
30150
|
+
}
|
|
30151
|
+
}, ((_mutation$data4 = mutation.data) === null || _mutation$data4 === void 0 ? void 0 : (_mutation$data4$data = _mutation$data4.data) === null || _mutation$data4$data === void 0 ? void 0 : (_mutation$data4$data$ = _mutation$data4$data.Errors) === null || _mutation$data4$data$ === void 0 ? void 0 : (_mutation$data4$data$2 = _mutation$data4$data$[0]) === null || _mutation$data4$data$2 === void 0 ? void 0 : _mutation$data4$data$2.message) || ((_mutation$error = mutation.error) === null || _mutation$error === void 0 ? void 0 : (_mutation$error$respo = _mutation$error.response) === null || _mutation$error$respo === void 0 ? void 0 : (_mutation$error$respo2 = _mutation$error$respo.data) === null || _mutation$error$respo2 === void 0 ? void 0 : (_mutation$error$respo3 = _mutation$error$respo2.Errors) === null || _mutation$error$respo3 === void 0 ? void 0 : (_mutation$error$respo4 = _mutation$error$respo3[0]) === null || _mutation$error$respo4 === void 0 ? void 0 : _mutation$error$respo4.message) || t("WT_SUBMISSION_FAILED_MESSAGE")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, isMutationSuccess && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
30138
30152
|
rowContainerStyle: rowContainerStyle$3,
|
|
30139
30153
|
last: true,
|
|
30140
30154
|
textStyle: {
|
|
30141
30155
|
whiteSpace: "pre",
|
|
30142
30156
|
width: "60%"
|
|
30143
30157
|
}
|
|
30144
|
-
})),
|
|
30158
|
+
})), isMutationSuccess && /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
30145
30159
|
label: t("WT_DOWNLOAD_ACKNOWLEDGEMENT"),
|
|
30146
30160
|
onSubmit: handleDownloadPdf
|
|
30147
30161
|
}), (user === null || user === void 0 ? void 0 : user.type) === "CITIZEN" ? /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
@@ -30183,6 +30197,7 @@ const BannerPicker$4 = props => {
|
|
|
30183
30197
|
});
|
|
30184
30198
|
};
|
|
30185
30199
|
const MTEmergencyFixedPointAcknowledgement = _ref => {
|
|
30200
|
+
var _mutation$data2, _mutation$data3, _mutation$data4, _mutation$data4$data, _mutation$data4$data$, _mutation$data4$data$2, _mutation$error, _mutation$error$respo, _mutation$error$respo2, _mutation$error$respo3, _mutation$error$respo4;
|
|
30186
30201
|
let data = _ref.data,
|
|
30187
30202
|
onSuccess = _ref.onSuccess;
|
|
30188
30203
|
const _useTranslation2 = reactI18next.useTranslation(),
|
|
@@ -30199,9 +30214,15 @@ const MTEmergencyFixedPointAcknowledgement = _ref => {
|
|
|
30199
30214
|
data.tenantId = tenantId;
|
|
30200
30215
|
let formdata = mobileToiletPayload(data);
|
|
30201
30216
|
mutation.mutate(formdata, {
|
|
30202
|
-
onSuccess
|
|
30217
|
+
onSuccess: res => {
|
|
30218
|
+
if (!(res !== null && res !== void 0 && res.error)) {
|
|
30219
|
+
onSuccess();
|
|
30220
|
+
}
|
|
30221
|
+
}
|
|
30203
30222
|
});
|
|
30204
|
-
} catch (err) {
|
|
30223
|
+
} catch (err) {
|
|
30224
|
+
console.error("Emergency MT payload construction error:", err);
|
|
30225
|
+
}
|
|
30205
30226
|
}, []);
|
|
30206
30227
|
Digit.Hooks.useCustomBackNavigation({
|
|
30207
30228
|
redirectPath: '${APPLICATION_PATH}/citizen'
|
|
@@ -30219,19 +30240,27 @@ const MTEmergencyFixedPointAcknowledgement = _ref => {
|
|
|
30219
30240
|
return Promise.reject(e);
|
|
30220
30241
|
}
|
|
30221
30242
|
};
|
|
30243
|
+
const isMutationSuccess = mutation.isSuccess && !((_mutation$data2 = mutation.data) !== null && _mutation$data2 !== void 0 && _mutation$data2.error);
|
|
30244
|
+
const isMutationError = mutation.isError || mutation.isSuccess && ((_mutation$data3 = mutation.data) === null || _mutation$data3 === void 0 ? void 0 : _mutation$data3.error);
|
|
30222
30245
|
return mutation.isLoading || mutation.isIdle ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(BannerPicker$4, {
|
|
30223
30246
|
t: t,
|
|
30224
30247
|
data: mutation.data,
|
|
30225
|
-
isSuccess:
|
|
30248
|
+
isSuccess: isMutationSuccess,
|
|
30226
30249
|
isLoading: mutation.isIdle || mutation.isLoading
|
|
30227
|
-
}),
|
|
30250
|
+
}), isMutationError && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, {
|
|
30251
|
+
style: {
|
|
30252
|
+
color: "#d4351c",
|
|
30253
|
+
textAlign: "center",
|
|
30254
|
+
marginTop: "8px"
|
|
30255
|
+
}
|
|
30256
|
+
}, ((_mutation$data4 = mutation.data) === null || _mutation$data4 === void 0 ? void 0 : (_mutation$data4$data = _mutation$data4.data) === null || _mutation$data4$data === void 0 ? void 0 : (_mutation$data4$data$ = _mutation$data4$data.Errors) === null || _mutation$data4$data$ === void 0 ? void 0 : (_mutation$data4$data$2 = _mutation$data4$data$[0]) === null || _mutation$data4$data$2 === void 0 ? void 0 : _mutation$data4$data$2.message) || ((_mutation$error = mutation.error) === null || _mutation$error === void 0 ? void 0 : (_mutation$error$respo = _mutation$error.response) === null || _mutation$error$respo === void 0 ? void 0 : (_mutation$error$respo2 = _mutation$error$respo.data) === null || _mutation$error$respo2 === void 0 ? void 0 : (_mutation$error$respo3 = _mutation$error$respo2.Errors) === null || _mutation$error$respo3 === void 0 ? void 0 : (_mutation$error$respo4 = _mutation$error$respo3[0]) === null || _mutation$error$respo4 === void 0 ? void 0 : _mutation$error$respo4.message) || t("MT_SUBMISSION_FAILED_MESSAGE")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, isMutationSuccess && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
30228
30257
|
rowContainerStyle: rowContainerStyle$4,
|
|
30229
30258
|
last: true,
|
|
30230
30259
|
textStyle: {
|
|
30231
30260
|
whiteSpace: "pre",
|
|
30232
30261
|
width: "60%"
|
|
30233
30262
|
}
|
|
30234
|
-
})),
|
|
30263
|
+
})), isMutationSuccess && /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
30235
30264
|
label: t("MT_DOWNLOAD_ACKNOWLEDGEMENT"),
|
|
30236
30265
|
onSubmit: handleDownloadPdf
|
|
30237
30266
|
}), (user === null || user === void 0 ? void 0 : user.type) === "CITIZEN" ? /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
@@ -30272,6 +30301,7 @@ const BannerPicker$5 = props => {
|
|
|
30272
30301
|
});
|
|
30273
30302
|
};
|
|
30274
30303
|
const EmergencyFixedPointTPAcknowledgement = _ref => {
|
|
30304
|
+
var _mutation$data2, _mutation$data3, _mutation$data4, _mutation$data4$data, _mutation$data4$data$, _mutation$data4$data$2, _mutation$error, _mutation$error$respo, _mutation$error$respo2, _mutation$error$respo3, _mutation$error$respo4;
|
|
30275
30305
|
let data = _ref.data,
|
|
30276
30306
|
onSuccess = _ref.onSuccess;
|
|
30277
30307
|
const _useTranslation2 = reactI18next.useTranslation(),
|
|
@@ -30288,9 +30318,15 @@ const EmergencyFixedPointTPAcknowledgement = _ref => {
|
|
|
30288
30318
|
data.tenantId = tenantId;
|
|
30289
30319
|
let formdata = treePruningPayload(data);
|
|
30290
30320
|
mutation.mutate(formdata, {
|
|
30291
|
-
onSuccess
|
|
30321
|
+
onSuccess: res => {
|
|
30322
|
+
if (!(res !== null && res !== void 0 && res.error)) {
|
|
30323
|
+
onSuccess();
|
|
30324
|
+
}
|
|
30325
|
+
}
|
|
30292
30326
|
});
|
|
30293
|
-
} catch (err) {
|
|
30327
|
+
} catch (err) {
|
|
30328
|
+
console.error("Emergency TP payload construction error:", err);
|
|
30329
|
+
}
|
|
30294
30330
|
}, []);
|
|
30295
30331
|
Digit.Hooks.useCustomBackNavigation({
|
|
30296
30332
|
redirectPath: '${APPLICATION_PATH}/citizen'
|
|
@@ -30308,19 +30344,27 @@ const EmergencyFixedPointTPAcknowledgement = _ref => {
|
|
|
30308
30344
|
return Promise.reject(e);
|
|
30309
30345
|
}
|
|
30310
30346
|
};
|
|
30347
|
+
const isMutationSuccess = mutation.isSuccess && !((_mutation$data2 = mutation.data) !== null && _mutation$data2 !== void 0 && _mutation$data2.error);
|
|
30348
|
+
const isMutationError = mutation.isError || mutation.isSuccess && ((_mutation$data3 = mutation.data) === null || _mutation$data3 === void 0 ? void 0 : _mutation$data3.error);
|
|
30311
30349
|
return mutation.isLoading || mutation.isIdle ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(BannerPicker$5, {
|
|
30312
30350
|
t: t,
|
|
30313
30351
|
data: mutation.data,
|
|
30314
|
-
isSuccess:
|
|
30352
|
+
isSuccess: isMutationSuccess,
|
|
30315
30353
|
isLoading: mutation.isIdle || mutation.isLoading
|
|
30316
|
-
}),
|
|
30354
|
+
}), isMutationError && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, {
|
|
30355
|
+
style: {
|
|
30356
|
+
color: "#d4351c",
|
|
30357
|
+
textAlign: "center",
|
|
30358
|
+
marginTop: "8px"
|
|
30359
|
+
}
|
|
30360
|
+
}, ((_mutation$data4 = mutation.data) === null || _mutation$data4 === void 0 ? void 0 : (_mutation$data4$data = _mutation$data4.data) === null || _mutation$data4$data === void 0 ? void 0 : (_mutation$data4$data$ = _mutation$data4$data.Errors) === null || _mutation$data4$data$ === void 0 ? void 0 : (_mutation$data4$data$2 = _mutation$data4$data$[0]) === null || _mutation$data4$data$2 === void 0 ? void 0 : _mutation$data4$data$2.message) || ((_mutation$error = mutation.error) === null || _mutation$error === void 0 ? void 0 : (_mutation$error$respo = _mutation$error.response) === null || _mutation$error$respo === void 0 ? void 0 : (_mutation$error$respo2 = _mutation$error$respo.data) === null || _mutation$error$respo2 === void 0 ? void 0 : (_mutation$error$respo3 = _mutation$error$respo2.Errors) === null || _mutation$error$respo3 === void 0 ? void 0 : (_mutation$error$respo4 = _mutation$error$respo3[0]) === null || _mutation$error$respo4 === void 0 ? void 0 : _mutation$error$respo4.message) || t("TP_SUBMISSION_FAILED_MESSAGE")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, isMutationSuccess && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
30317
30361
|
rowContainerStyle: rowContainerStyle$5,
|
|
30318
30362
|
last: true,
|
|
30319
30363
|
textStyle: {
|
|
30320
30364
|
whiteSpace: "pre",
|
|
30321
30365
|
width: "60%"
|
|
30322
30366
|
}
|
|
30323
|
-
})),
|
|
30367
|
+
})), isMutationSuccess && /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
30324
30368
|
label: t("TP_DOWNLOAD_ACKNOWLEDGEMENT"),
|
|
30325
30369
|
onSubmit: handleDownloadPdf
|
|
30326
30370
|
}), (user === null || user === void 0 ? void 0 : user.type) === "CITIZEN" ? /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|