@djb25/digit-ui-module-wt 1.0.75 → 1.0.77
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 +245 -199
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +366 -320
- 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, {
|
|
@@ -4416,7 +4431,7 @@ const Inbox = _ref => {
|
|
|
4416
4431
|
parentRoute: parentRoute,
|
|
4417
4432
|
searchParams: searchParams,
|
|
4418
4433
|
sortParams: sortParams,
|
|
4419
|
-
linkPrefix: parentRoute + "/
|
|
4434
|
+
linkPrefix: detailRoute ? detailRoute + "/" : parentRoute + "/booking-details/",
|
|
4420
4435
|
tableConfig: rest !== null && rest !== void 0 && rest.tableConfig ? rest.tableConfig : TableConfig(t)[moduleCode],
|
|
4421
4436
|
filterComponent: filterComponent,
|
|
4422
4437
|
EmptyResultInboxComp: EmptyResultInboxComp,
|
|
@@ -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 => {
|
|
@@ -22118,7 +22146,12 @@ const ActionModal$5 = _ref => {
|
|
|
22118
22146
|
const inspectionInformationData = sessionStorage.getItem("Digit.INSPECTION_INFORMATION_DATA");
|
|
22119
22147
|
if (inspectionInformationData) {
|
|
22120
22148
|
try {
|
|
22121
|
-
|
|
22149
|
+
const parsedInspectionData = JSON.parse(inspectionInformationData);
|
|
22150
|
+
if (parsedInspectionData !== null && parsedInspectionData !== void 0 && parsedInspectionData.inspectionDate) {
|
|
22151
|
+
const dateVal = parsedInspectionData.inspectionDate;
|
|
22152
|
+
parsedInspectionData.inspectionDate = typeof dateVal === 'string' ? new Date(dateVal).getTime() : dateVal;
|
|
22153
|
+
}
|
|
22154
|
+
applicationData.inspectionInformation = parsedInspectionData;
|
|
22122
22155
|
} catch (e) {
|
|
22123
22156
|
console.error("Error parsing inspection information data", e);
|
|
22124
22157
|
}
|
|
@@ -25520,7 +25553,7 @@ const WSFeeEstimation = _ref => {
|
|
|
25520
25553
|
className: "border-none",
|
|
25521
25554
|
key: "WS_COMMON_TOTAL_AMT",
|
|
25522
25555
|
label: "" + t("WS_COMMON_TOTAL_AMT"),
|
|
25523
|
-
text: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", (billDetails === null || billDetails === void 0 ? void 0 : billDetails.totalAmount)
|
|
25556
|
+
text: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", billDetails !== null && billDetails !== void 0 && billDetails.totalAmount ? Number(billDetails === null || billDetails === void 0 ? void 0 : billDetails.totalAmount).toFixed(2) : "0.00"),
|
|
25524
25557
|
textStyle: {
|
|
25525
25558
|
fontSize: "24px",
|
|
25526
25559
|
fontWeight: "700"
|
|
@@ -25834,29 +25867,7 @@ const ViewBreakup = _ref => {
|
|
|
25834
25867
|
textStyle: {
|
|
25835
25868
|
textAlign: "right"
|
|
25836
25869
|
}
|
|
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, {
|
|
25870
|
+
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
|
|
25860
25871
|
style: {
|
|
25861
25872
|
margin: "10px 0px"
|
|
25862
25873
|
}
|
|
@@ -25874,29 +25885,7 @@ const ViewBreakup = _ref => {
|
|
|
25874
25885
|
textStyle: {
|
|
25875
25886
|
textAlign: "right"
|
|
25876
25887
|
}
|
|
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, {
|
|
25888
|
+
})), 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
25889
|
className: "border-none",
|
|
25901
25890
|
rowContainerStyle: {
|
|
25902
25891
|
margin: "0px"
|
|
@@ -26228,7 +26217,8 @@ const DueVerification = _ref => {
|
|
|
26228
26217
|
return newData;
|
|
26229
26218
|
});
|
|
26230
26219
|
}, [applicationData]);
|
|
26231
|
-
const isPendingApproval = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_APPROVAL_FOR_CONNECTION";
|
|
26220
|
+
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";
|
|
26221
|
+
const isActivation = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_CONNECTION_ACTIVATION";
|
|
26232
26222
|
const columns = React.useMemo(() => {
|
|
26233
26223
|
const baseColumns = [{
|
|
26234
26224
|
Header: t("K No."),
|
|
@@ -26253,7 +26243,7 @@ const DueVerification = _ref => {
|
|
|
26253
26243
|
Cell: _ref2 => {
|
|
26254
26244
|
let row = _ref2.row,
|
|
26255
26245
|
value = _ref2.value;
|
|
26256
|
-
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
26246
|
+
return isActivation ? value || "-" : /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
26257
26247
|
style: {
|
|
26258
26248
|
marginBottom: "0px",
|
|
26259
26249
|
minWidth: "150px"
|
|
@@ -26335,7 +26325,7 @@ const DueVerification = _ref => {
|
|
|
26335
26325
|
flex: 1,
|
|
26336
26326
|
paddingBottom: "2px"
|
|
26337
26327
|
}
|
|
26338
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
26328
|
+
}, !isActivation && /*#__PURE__*/React__default.createElement("button", {
|
|
26339
26329
|
type: "button",
|
|
26340
26330
|
onClick: handleAdd,
|
|
26341
26331
|
style: {
|
|
@@ -26383,30 +26373,12 @@ const InspectionInformation = _ref => {
|
|
|
26383
26373
|
inspectorName = _useState3[0],
|
|
26384
26374
|
setInspectorName = _useState3[1];
|
|
26385
26375
|
React.useEffect(() => {
|
|
26386
|
-
|
|
26387
|
-
|
|
26388
|
-
|
|
26389
|
-
|
|
26390
|
-
setInspectionType(parsed.inspectionType || null);
|
|
26391
|
-
setInspectionDate(parsed.inspectionDate || "");
|
|
26392
|
-
setInspectorName(parsed.inspectorName || "");
|
|
26393
|
-
} catch (e) {
|
|
26394
|
-
console.error("Error parsing inspection information data", e);
|
|
26395
|
-
}
|
|
26396
|
-
} else if (applicationData !== null && applicationData !== void 0 && applicationData.inspectionInformation) {
|
|
26397
|
-
setInspectionType(applicationData.inspectionInformation.inspectionType || null);
|
|
26398
|
-
setInspectionDate(applicationData.inspectionInformation.inspectionDate || "");
|
|
26399
|
-
setInspectorName(applicationData.inspectionInformation.inspectorName || "");
|
|
26400
|
-
sessionStorage.setItem("Digit.INSPECTION_INFORMATION_DATA", JSON.stringify(applicationData.inspectionInformation));
|
|
26376
|
+
if (applicationData !== null && applicationData !== void 0 && applicationData.inspectionInformation) {
|
|
26377
|
+
setInspectionType(applicationData.inspectionInformation.inspectionType);
|
|
26378
|
+
setInspectionDate(applicationData.inspectionInformation.inspectionDate);
|
|
26379
|
+
setInspectorName(applicationData.inspectionInformation.inspectorName);
|
|
26401
26380
|
}
|
|
26402
26381
|
}, [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
26382
|
const inspectionTypeOptions = [{
|
|
26411
26383
|
i18nKey: "ES_COMMON_SELECT",
|
|
26412
26384
|
code: ""
|
|
@@ -26414,6 +26386,7 @@ const InspectionInformation = _ref => {
|
|
|
26414
26386
|
i18nKey: "New Connection Visit",
|
|
26415
26387
|
code: "new_connection_visit"
|
|
26416
26388
|
}];
|
|
26389
|
+
const readOnly = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_CONNECTION_ACTIVATION";
|
|
26417
26390
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
26418
26391
|
style: {
|
|
26419
26392
|
marginBottom: "20px"
|
|
@@ -26433,84 +26406,58 @@ const InspectionInformation = _ref => {
|
|
|
26433
26406
|
}
|
|
26434
26407
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
26435
26408
|
style: {
|
|
26436
|
-
flex:
|
|
26409
|
+
flex: 1
|
|
26437
26410
|
}
|
|
26438
26411
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
26439
26412
|
style: {
|
|
26440
26413
|
fontSize: "16px",
|
|
26441
|
-
color: "#0B0C0C",
|
|
26442
26414
|
marginBottom: "8px",
|
|
26443
26415
|
display: "inline-block"
|
|
26444
26416
|
}
|
|
26445
|
-
}, t("Inspection Type"),
|
|
26446
|
-
style: {
|
|
26447
|
-
color: "red"
|
|
26448
|
-
}
|
|
26449
|
-
}, "*")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
26417
|
+
}, t("Inspection Type")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
26450
26418
|
option: inspectionTypeOptions,
|
|
26451
26419
|
optionKey: "i18nKey",
|
|
26452
|
-
id: "inspectionType",
|
|
26453
26420
|
selected: inspectionType,
|
|
26454
26421
|
select: setInspectionType,
|
|
26455
26422
|
t: t,
|
|
26456
|
-
|
|
26457
|
-
width: "100%"
|
|
26458
|
-
}
|
|
26423
|
+
disabled: readOnly
|
|
26459
26424
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
26460
26425
|
style: {
|
|
26461
|
-
flex:
|
|
26426
|
+
flex: 1
|
|
26462
26427
|
}
|
|
26463
26428
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
26464
26429
|
style: {
|
|
26465
26430
|
fontSize: "16px",
|
|
26466
|
-
color: "#0B0C0C",
|
|
26467
26431
|
marginBottom: "8px",
|
|
26468
26432
|
display: "inline-block"
|
|
26469
26433
|
}
|
|
26470
|
-
}, t("Inspection Date"),
|
|
26471
|
-
style: {
|
|
26472
|
-
color: "red"
|
|
26473
|
-
}
|
|
26474
|
-
}, "*")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.DatePicker, {
|
|
26434
|
+
}, t("Inspection Date")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.DatePicker, {
|
|
26475
26435
|
date: inspectionDate,
|
|
26476
26436
|
onChange: setInspectionDate,
|
|
26477
|
-
|
|
26478
|
-
width: "100%"
|
|
26479
|
-
}
|
|
26437
|
+
disabled: readOnly
|
|
26480
26438
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
26481
26439
|
style: {
|
|
26482
|
-
display: "flex"
|
|
26483
|
-
gap: "20px",
|
|
26484
|
-
marginBottom: "20px",
|
|
26485
|
-
flexWrap: "wrap"
|
|
26440
|
+
display: "flex"
|
|
26486
26441
|
}
|
|
26487
26442
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
26488
26443
|
style: {
|
|
26489
|
-
flex:
|
|
26444
|
+
flex: 1
|
|
26490
26445
|
}
|
|
26491
26446
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
26492
26447
|
style: {
|
|
26493
26448
|
fontSize: "16px",
|
|
26494
|
-
color: "#0B0C0C",
|
|
26495
26449
|
marginBottom: "8px",
|
|
26496
26450
|
display: "inline-block"
|
|
26497
26451
|
}
|
|
26498
|
-
}, t("Inspector Name"),
|
|
26499
|
-
style: {
|
|
26500
|
-
color: "red"
|
|
26501
|
-
}
|
|
26502
|
-
}, "*")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
26452
|
+
}, t("Inspector Name")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
26503
26453
|
value: inspectorName,
|
|
26504
26454
|
onChange: e => setInspectorName(e.target.value),
|
|
26505
|
-
|
|
26506
|
-
width: "50%",
|
|
26507
|
-
marginBottom: "0"
|
|
26508
|
-
}
|
|
26455
|
+
disabled: readOnly
|
|
26509
26456
|
}))));
|
|
26510
26457
|
};
|
|
26511
26458
|
|
|
26512
26459
|
function ApplicationDetailsContent(_ref) {
|
|
26513
|
-
var _applicationDetails$a, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data0, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _workflowDetails$data19, _workflowDetails$data20;
|
|
26460
|
+
var _detail, _detail$additionalDet, _applicationDetails$a, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data0, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _workflowDetails$data19, _workflowDetails$data20;
|
|
26514
26461
|
let applicationDetails = _ref.applicationDetails,
|
|
26515
26462
|
workflowDetails = _ref.workflowDetails,
|
|
26516
26463
|
isDataLoading = _ref.isDataLoading,
|
|
@@ -26524,6 +26471,7 @@ function ApplicationDetailsContent(_ref) {
|
|
|
26524
26471
|
oldValue = _ref.oldValue,
|
|
26525
26472
|
_ref$isInfoLabel = _ref.isInfoLabel,
|
|
26526
26473
|
isInfoLabel = _ref$isInfoLabel === void 0 ? false : _ref$isInfoLabel;
|
|
26474
|
+
alert("ApplicationDetailsContent Loaded");
|
|
26527
26475
|
const _useTranslation = reactI18next.useTranslation(),
|
|
26528
26476
|
t = _useTranslation.t;
|
|
26529
26477
|
const _useState = React.useState(false),
|
|
@@ -26538,6 +26486,19 @@ function ApplicationDetailsContent(_ref) {
|
|
|
26538
26486
|
const _useState2 = React.useState({}),
|
|
26539
26487
|
fetchBillData = _useState2[0],
|
|
26540
26488
|
updatefetchBillData = _useState2[1];
|
|
26489
|
+
const isMounted = React__default.useRef(true);
|
|
26490
|
+
useEffect(() => {
|
|
26491
|
+
return () => {
|
|
26492
|
+
isMounted.current = false;
|
|
26493
|
+
};
|
|
26494
|
+
}, []);
|
|
26495
|
+
const _useState3 = React.useState({
|
|
26496
|
+
loading: false,
|
|
26497
|
+
loaded: false,
|
|
26498
|
+
canLoad: false
|
|
26499
|
+
}),
|
|
26500
|
+
billData = _useState3[0],
|
|
26501
|
+
updateCanFetchBillData = _useState3[1];
|
|
26541
26502
|
const setBillData = function (tenantId, propertyIds, updatefetchBillData, updateCanFetchBillData) {
|
|
26542
26503
|
try {
|
|
26543
26504
|
return Promise.resolve(Digit.PTService.assessmentSearch({
|
|
@@ -26547,12 +26508,14 @@ function ApplicationDetailsContent(_ref) {
|
|
|
26547
26508
|
}
|
|
26548
26509
|
})).then(function (assessmentData) {
|
|
26549
26510
|
function _temp2() {
|
|
26550
|
-
|
|
26551
|
-
|
|
26552
|
-
|
|
26553
|
-
|
|
26554
|
-
|
|
26555
|
-
|
|
26511
|
+
if (isMounted.current) {
|
|
26512
|
+
updatefetchBillData(billData);
|
|
26513
|
+
updateCanFetchBillData({
|
|
26514
|
+
loading: false,
|
|
26515
|
+
loaded: true,
|
|
26516
|
+
canLoad: true
|
|
26517
|
+
});
|
|
26518
|
+
}
|
|
26556
26519
|
}
|
|
26557
26520
|
let billData = {};
|
|
26558
26521
|
const _temp = function (_assessmentData$Asses) {
|
|
@@ -26571,28 +26534,23 @@ function ApplicationDetailsContent(_ref) {
|
|
|
26571
26534
|
return Promise.reject(e);
|
|
26572
26535
|
}
|
|
26573
26536
|
};
|
|
26574
|
-
|
|
26575
|
-
|
|
26576
|
-
|
|
26577
|
-
|
|
26578
|
-
|
|
26579
|
-
|
|
26580
|
-
|
|
26581
|
-
|
|
26582
|
-
|
|
26583
|
-
|
|
26584
|
-
|
|
26585
|
-
|
|
26586
|
-
|
|
26587
|
-
|
|
26588
|
-
|
|
26589
|
-
|
|
26590
|
-
|
|
26591
|
-
loaded: false,
|
|
26592
|
-
canLoad: true
|
|
26593
|
-
});
|
|
26594
|
-
setBillData((applicationData === null || applicationData === void 0 ? void 0 : applicationData.tenantId) || tenantId, applicationData === null || applicationData === void 0 ? void 0 : applicationData.propertyId, updatefetchBillData, updateCanFetchBillData);
|
|
26595
|
-
}
|
|
26537
|
+
useEffect(() => {
|
|
26538
|
+
if ((applicationData === null || applicationData === void 0 ? void 0 : applicationData.status) === "ACTIVE" && !billData.loading && !billData.loaded && !billData.canLoad) {
|
|
26539
|
+
updateCanFetchBillData({
|
|
26540
|
+
loading: false,
|
|
26541
|
+
loaded: false,
|
|
26542
|
+
canLoad: true
|
|
26543
|
+
});
|
|
26544
|
+
}
|
|
26545
|
+
if (billData !== null && billData !== void 0 && billData.canLoad && !billData.loading && !billData.loaded) {
|
|
26546
|
+
updateCanFetchBillData({
|
|
26547
|
+
loading: true,
|
|
26548
|
+
loaded: false,
|
|
26549
|
+
canLoad: true
|
|
26550
|
+
});
|
|
26551
|
+
setBillData((applicationData === null || applicationData === void 0 ? void 0 : applicationData.tenantId) || tenantId, applicationData === null || applicationData === void 0 ? void 0 : applicationData.propertyId, updatefetchBillData, updateCanFetchBillData);
|
|
26552
|
+
}
|
|
26553
|
+
}, [applicationData, billData, tenantId]);
|
|
26596
26554
|
const convertEpochToDateDMY = dateEpoch => {
|
|
26597
26555
|
if (dateEpoch == null || dateEpoch === undefined || dateEpoch === "") {
|
|
26598
26556
|
return "NA";
|
|
@@ -26777,6 +26735,11 @@ function ApplicationDetailsContent(_ref) {
|
|
|
26777
26735
|
const handleViewClick = data => {
|
|
26778
26736
|
setShowPopup(true);
|
|
26779
26737
|
};
|
|
26738
|
+
console.log("applicationStatus", applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus);
|
|
26739
|
+
console.log("documents", (_detail = detail) === null || _detail === void 0 ? void 0 : (_detail$additionalDet = _detail.additionalDetails) === null || _detail$additionalDet === void 0 ? void 0 : _detail$additionalDet.documents);
|
|
26740
|
+
console.log("dueVerification", applicationData === null || applicationData === void 0 ? void 0 : applicationData.dueVerification);
|
|
26741
|
+
console.log("inspectionInformation", applicationData === null || applicationData === void 0 ? void 0 : applicationData.inspectionInformation);
|
|
26742
|
+
console.log(detail);
|
|
26780
26743
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
26781
26744
|
style: {
|
|
26782
26745
|
position: "relative"
|
|
@@ -26790,7 +26753,7 @@ function ApplicationDetailsContent(_ref) {
|
|
|
26790
26753
|
infoClickInfoLabel: getClickInfoDetails(),
|
|
26791
26754
|
infoClickInfoLabel1: getClickInfoDetails1()
|
|
26792
26755
|
}) : null, applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a = applicationDetails.applicationDetails) === null || _applicationDetails$a === void 0 ? void 0 : _applicationDetails$a.map((detail, index) => {
|
|
26793
|
-
var _detail$title, _detail$values, _detail$
|
|
26756
|
+
var _detail$title, _detail$values, _detail$additionalDet2, _applicationDetails$a2, _applicationDetails$a3, _applicationDetails$a4, _detail$additionalDet3, _applicationDetails$a5, _applicationDetails$a6, _detail$additionalDet4, _detail$additionalDet5, _detail$additionalDet6, _detail$additionalDet7, _detail$additionalDet8, _detail$additionalDet9, _detail$additionalDet0, _workflowDetails$data, _workflowDetails$data2, _detail$additionalDet1, _detail$additionalDet10, _detail$additionalDet11, _detail$additionalDet12, _detail$additionalDet13, _detail$additionalDet14, _detail$additionalDet15, _detail$additionalDet16, _detail$additionalDet17, _detail$additionalDet18, _detail$additionalDet19, _detail$additionalDet20, _detail$additionalDet21, _detail$additionalDet22, _detail$additionalDet23, _detail$additionalDet24, _detail$additionalDet25, _detail$additionalDet26, _detail$additionalDet27, _detail$additionalDet28, _detail$additionalDet29, _detail$additionalDet30;
|
|
26794
26757
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
26795
26758
|
key: index
|
|
26796
26759
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -26981,61 +26944,69 @@ function ApplicationDetailsContent(_ref) {
|
|
|
26981
26944
|
}), value.title === "PT_TOTAL_DUES" ? /*#__PURE__*/React__default.createElement(ArrearSummary, {
|
|
26982
26945
|
bill: (_fetchBillData$Bill = fetchBillData.Bill) === null || _fetchBillData$Bill === void 0 ? void 0 : _fetchBillData$Bill[0]
|
|
26983
26946
|
}) : "");
|
|
26984
|
-
})))), (detail === null || detail === void 0 ? void 0 : detail.belowComponent) && /*#__PURE__*/React__default.createElement(detail.belowComponent, null), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
26947
|
+
})))), (detail === null || detail === void 0 ? void 0 : detail.belowComponent) && /*#__PURE__*/React__default.createElement(detail.belowComponent, null), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet2 = detail.additionalDetails) === null || _detail$additionalDet2 === void 0 ? void 0 : _detail$additionalDet2.inspectionReport) && /*#__PURE__*/React__default.createElement(ScruntinyDetails, {
|
|
26985
26948
|
scrutinyDetails: detail === null || detail === void 0 ? void 0 : detail.additionalDetails,
|
|
26986
26949
|
paymentsList: paymentsList
|
|
26987
|
-
}), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a2 = applicationDetails.applicationData) === null || _applicationDetails$a2 === void 0 ? void 0 : (_applicationDetails$a3 = _applicationDetails$a2.additionalDetails) === null || _applicationDetails$a3 === void 0 ? void 0 : (_applicationDetails$a4 = _applicationDetails$a3.fieldinspection_pending) === null || _applicationDetails$a4 === void 0 ? void 0 : _applicationDetails$a4.length) > 0 && (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
26950
|
+
}), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a2 = applicationDetails.applicationData) === null || _applicationDetails$a2 === void 0 ? void 0 : (_applicationDetails$a3 = _applicationDetails$a2.additionalDetails) === null || _applicationDetails$a3 === void 0 ? void 0 : (_applicationDetails$a4 = _applicationDetails$a3.fieldinspection_pending) === null || _applicationDetails$a4 === void 0 ? void 0 : _applicationDetails$a4.length) > 0 && (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet3 = detail.additionalDetails) === null || _detail$additionalDet3 === void 0 ? void 0 : _detail$additionalDet3.fiReport) && /*#__PURE__*/React__default.createElement(InspectionReport, {
|
|
26988
26951
|
fiReport: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a5 = applicationDetails.applicationData) === null || _applicationDetails$a5 === void 0 ? void 0 : (_applicationDetails$a6 = _applicationDetails$a5.additionalDetails) === null || _applicationDetails$a6 === void 0 ? void 0 : _applicationDetails$a6.fieldinspection_pending
|
|
26989
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
26990
|
-
floors: detail === null || detail === void 0 ? void 0 : (_detail$
|
|
26991
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
26992
|
-
units: detail === null || detail === void 0 ? void 0 : (_detail$
|
|
26993
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
26994
|
-
units: detail === null || detail === void 0 ? void 0 : (_detail$
|
|
26995
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
26952
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet4 = detail.additionalDetails) === null || _detail$additionalDet4 === void 0 ? void 0 : _detail$additionalDet4.floors) && /*#__PURE__*/React__default.createElement(PropertyFloors, {
|
|
26953
|
+
floors: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet5 = detail.additionalDetails) === null || _detail$additionalDet5 === void 0 ? void 0 : _detail$additionalDet5.floors
|
|
26954
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet6 = detail.additionalDetails) === null || _detail$additionalDet6 === void 0 ? void 0 : _detail$additionalDet6.units) && /*#__PURE__*/React__default.createElement(TLTradeUnits, {
|
|
26955
|
+
units: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet7 = detail.additionalDetails) === null || _detail$additionalDet7 === void 0 ? void 0 : _detail$additionalDet7.units
|
|
26956
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet8 = detail.additionalDetails) === null || _detail$additionalDet8 === void 0 ? void 0 : _detail$additionalDet8.accessories) && /*#__PURE__*/React__default.createElement(TLTradeAccessories, {
|
|
26957
|
+
units: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet9 = detail.additionalDetails) === null || _detail$additionalDet9 === void 0 ? void 0 : _detail$additionalDet9.accessories
|
|
26958
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet0 = detail.additionalDetails) === null || _detail$additionalDet0 === void 0 ? void 0 : _detail$additionalDet0.permissions) && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : (_workflowDetails$data2 = _workflowDetails$data.nextActions) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.length) > 0 && /*#__PURE__*/React__default.createElement(PermissionCheck, {
|
|
26996
26959
|
applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
|
|
26997
26960
|
t: t,
|
|
26998
|
-
permissions: detail === null || detail === void 0 ? void 0 : (_detail$
|
|
26999
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
26961
|
+
permissions: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet1 = detail.additionalDetails) === null || _detail$additionalDet1 === void 0 ? void 0 : _detail$additionalDet1.permissions
|
|
26962
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet10 = detail.additionalDetails) === null || _detail$additionalDet10 === void 0 ? void 0 : _detail$additionalDet10.obpsDocuments) && /*#__PURE__*/React__default.createElement(BPADocuments, {
|
|
27000
26963
|
t: t,
|
|
27001
26964
|
applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
|
|
27002
26965
|
docs: detail.additionalDetails.obpsDocuments,
|
|
27003
26966
|
bpaActionsDetails: workflowDetails
|
|
27004
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
26967
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet11 = detail.additionalDetails) === null || _detail$additionalDet11 === void 0 ? void 0 : _detail$additionalDet11.noc) && /*#__PURE__*/React__default.createElement(NOCDocuments, {
|
|
27005
26968
|
t: t,
|
|
27006
26969
|
isNoc: true,
|
|
27007
26970
|
NOCdata: detail.values,
|
|
27008
26971
|
applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
|
|
27009
26972
|
docs: detail.additionalDetails.noc,
|
|
27010
|
-
noc: (_detail$
|
|
26973
|
+
noc: (_detail$additionalDet12 = detail.additionalDetails) === null || _detail$additionalDet12 === void 0 ? void 0 : _detail$additionalDet12.data,
|
|
27011
26974
|
bpaActionsDetails: workflowDetails
|
|
27012
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
26975
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet13 = detail.additionalDetails) === null || _detail$additionalDet13 === void 0 ? void 0 : _detail$additionalDet13.scruntinyDetails) && /*#__PURE__*/React__default.createElement(ScruntinyDetails, {
|
|
27013
26976
|
scrutinyDetails: detail === null || detail === void 0 ? void 0 : detail.additionalDetails
|
|
27014
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
26977
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet14 = detail.additionalDetails) === null || _detail$additionalDet14 === void 0 ? void 0 : _detail$additionalDet14.buildingExtractionDetails) && /*#__PURE__*/React__default.createElement(ScruntinyDetails, {
|
|
27015
26978
|
scrutinyDetails: detail === null || detail === void 0 ? void 0 : detail.additionalDetails
|
|
27016
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
26979
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet15 = detail.additionalDetails) === null || _detail$additionalDet15 === void 0 ? void 0 : _detail$additionalDet15.subOccupancyTableDetails) && /*#__PURE__*/React__default.createElement(SubOccupancyTable, {
|
|
27017
26980
|
edcrDetails: detail === null || detail === void 0 ? void 0 : detail.additionalDetails,
|
|
27018
26981
|
applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData
|
|
27019
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
27020
|
-
documents: detail === null || detail === void 0 ? void 0 : (_detail$
|
|
27021
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
27022
|
-
documents: detail === null || detail === void 0 ? void 0 : (_detail$
|
|
26982
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet16 = detail.additionalDetails) === null || _detail$additionalDet16 === void 0 ? void 0 : _detail$additionalDet16.documentsWithUrl) && /*#__PURE__*/React__default.createElement(DocumentsPreview, {
|
|
26983
|
+
documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet17 = detail.additionalDetails) === null || _detail$additionalDet17 === void 0 ? void 0 : _detail$additionalDet17.documentsWithUrl
|
|
26984
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet18 = detail.additionalDetails) === null || _detail$additionalDet18 === void 0 ? void 0 : _detail$additionalDet18.documents) && /*#__PURE__*/React__default.createElement(PropertyDocuments, {
|
|
26985
|
+
documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet19 = detail.additionalDetails) === null || _detail$additionalDet19 === void 0 ? void 0 : _detail$additionalDet19.documents,
|
|
27023
26986
|
applicationStatus: applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus
|
|
27024
|
-
}),
|
|
26987
|
+
}), /*#__PURE__*/React__default.createElement("h1", {
|
|
26988
|
+
style: {
|
|
26989
|
+
background: "red",
|
|
26990
|
+
color: "#fff",
|
|
26991
|
+
padding: 20
|
|
26992
|
+
}
|
|
26993
|
+
}, "HELLO"), (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_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, {
|
|
27025
26994
|
applicationData: applicationData
|
|
27026
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
27027
|
-
|
|
26995
|
+
}), " ", (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet21 = detail.additionalDetails) === null || _detail$additionalDet21 === void 0 ? void 0 : _detail$additionalDet21.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, {
|
|
26996
|
+
applicationData: applicationData
|
|
26997
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet22 = detail.additionalDetails) === null || _detail$additionalDet22 === void 0 ? void 0 : _detail$additionalDet22.taxHeadEstimatesCalculation) && /*#__PURE__*/React__default.createElement(PropertyEstimates, {
|
|
26998
|
+
taxHeadEstimatesCalculation: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet23 = detail.additionalDetails) === null || _detail$additionalDet23 === void 0 ? void 0 : _detail$additionalDet23.taxHeadEstimatesCalculation
|
|
27028
26999
|
}), (detail === null || detail === void 0 ? void 0 : detail.isWaterConnectionDetails) && /*#__PURE__*/React__default.createElement(WSAdditonalDetails, {
|
|
27029
27000
|
wsAdditionalDetails: detail,
|
|
27030
27001
|
oldValue: oldValue
|
|
27031
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
27032
|
-
to: detail === null || detail === void 0 ? void 0 : (_detail$
|
|
27002
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet24 = detail.additionalDetails) === null || _detail$additionalDet24 === void 0 ? void 0 : _detail$additionalDet24.redirectUrl) && /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
27003
|
+
to: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet25 = detail.additionalDetails) === null || _detail$additionalDet25 === void 0 ? void 0 : (_detail$additionalDet26 = _detail$additionalDet25.redirectUrl) === null || _detail$additionalDet26 === void 0 ? void 0 : _detail$additionalDet26.url
|
|
27033
27004
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
27034
27005
|
className: "add-details-link hover-button"
|
|
27035
|
-
}, detail === null || detail === void 0 ? void 0 : (_detail$
|
|
27006
|
+
}, detail === null || detail === void 0 ? void 0 : (_detail$additionalDet27 = detail.additionalDetails) === null || _detail$additionalDet27 === void 0 ? void 0 : (_detail$additionalDet28 = _detail$additionalDet27.redirectUrl) === null || _detail$additionalDet28 === void 0 ? void 0 : _detail$additionalDet28.title)), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet29 = detail.additionalDetails) === null || _detail$additionalDet29 === void 0 ? void 0 : _detail$additionalDet29.estimationDetails) && /*#__PURE__*/React__default.createElement(WSFeeEstimation, {
|
|
27036
27007
|
wsAdditionalDetails: detail,
|
|
27037
27008
|
workflowDetails: workflowDetails
|
|
27038
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
27009
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet30 = detail.additionalDetails) === null || _detail$additionalDet30 === void 0 ? void 0 : _detail$additionalDet30.estimationDetails) && /*#__PURE__*/React__default.createElement(ViewBreakup, {
|
|
27039
27010
|
wsAdditionalDetails: detail,
|
|
27040
27011
|
workflowDetails: workflowDetails
|
|
27041
27012
|
}));
|
|
@@ -28671,6 +28642,7 @@ const BannerPicker$1 = props => {
|
|
|
28671
28642
|
});
|
|
28672
28643
|
};
|
|
28673
28644
|
const MTAcknowledgement = _ref => {
|
|
28645
|
+
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
28646
|
let data = _ref.data,
|
|
28675
28647
|
onSuccess = _ref.onSuccess;
|
|
28676
28648
|
const _useTranslation2 = reactI18next.useTranslation(),
|
|
@@ -28687,9 +28659,15 @@ const MTAcknowledgement = _ref => {
|
|
|
28687
28659
|
data.tenantId = tenantId;
|
|
28688
28660
|
let formdata = mobileToiletPayload(data);
|
|
28689
28661
|
mutation.mutate(formdata, {
|
|
28690
|
-
onSuccess
|
|
28662
|
+
onSuccess: res => {
|
|
28663
|
+
if (!(res !== null && res !== void 0 && res.error)) {
|
|
28664
|
+
onSuccess();
|
|
28665
|
+
}
|
|
28666
|
+
}
|
|
28691
28667
|
});
|
|
28692
|
-
} catch (err) {
|
|
28668
|
+
} catch (err) {
|
|
28669
|
+
console.error("MT payload construction error:", err);
|
|
28670
|
+
}
|
|
28693
28671
|
}, []);
|
|
28694
28672
|
Digit.Hooks.useCustomBackNavigation({
|
|
28695
28673
|
redirectPath: '${APPLICATION_PATH}/citizen'
|
|
@@ -28707,19 +28685,27 @@ const MTAcknowledgement = _ref => {
|
|
|
28707
28685
|
return Promise.reject(e);
|
|
28708
28686
|
}
|
|
28709
28687
|
};
|
|
28688
|
+
const isMutationSuccess = mutation.isSuccess && !((_mutation$data2 = mutation.data) !== null && _mutation$data2 !== void 0 && _mutation$data2.error);
|
|
28689
|
+
const isMutationError = mutation.isError || mutation.isSuccess && ((_mutation$data3 = mutation.data) === null || _mutation$data3 === void 0 ? void 0 : _mutation$data3.error);
|
|
28710
28690
|
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
28691
|
t: t,
|
|
28712
28692
|
data: mutation.data,
|
|
28713
|
-
isSuccess:
|
|
28693
|
+
isSuccess: isMutationSuccess,
|
|
28714
28694
|
isLoading: mutation.isIdle || mutation.isLoading
|
|
28715
|
-
}),
|
|
28695
|
+
}), isMutationError && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, {
|
|
28696
|
+
style: {
|
|
28697
|
+
color: "#d4351c",
|
|
28698
|
+
textAlign: "center",
|
|
28699
|
+
marginTop: "8px"
|
|
28700
|
+
}
|
|
28701
|
+
}, ((_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
28702
|
rowContainerStyle: rowContainerStyle$1,
|
|
28717
28703
|
last: true,
|
|
28718
28704
|
textStyle: {
|
|
28719
28705
|
whiteSpace: "pre",
|
|
28720
28706
|
width: "60%"
|
|
28721
28707
|
}
|
|
28722
|
-
})),
|
|
28708
|
+
})), isMutationSuccess && /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
28723
28709
|
label: t("MT_DOWNLOAD_ACKNOWLEDGEMENT"),
|
|
28724
28710
|
onSubmit: handleDownloadPdf
|
|
28725
28711
|
}), (user === null || user === void 0 ? void 0 : user.type) === "CITIZEN" ? /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
@@ -28841,6 +28827,7 @@ const BannerPicker$2 = props => {
|
|
|
28841
28827
|
});
|
|
28842
28828
|
};
|
|
28843
28829
|
const TPAcknowledgement = _ref => {
|
|
28830
|
+
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
28831
|
let data = _ref.data,
|
|
28845
28832
|
onSuccess = _ref.onSuccess;
|
|
28846
28833
|
const _useTranslation2 = reactI18next.useTranslation(),
|
|
@@ -28857,9 +28844,15 @@ const TPAcknowledgement = _ref => {
|
|
|
28857
28844
|
data.tenantId = tenantId;
|
|
28858
28845
|
let formdata = treePruningPayload(data);
|
|
28859
28846
|
mutation.mutate(formdata, {
|
|
28860
|
-
onSuccess
|
|
28847
|
+
onSuccess: res => {
|
|
28848
|
+
if (!(res !== null && res !== void 0 && res.error)) {
|
|
28849
|
+
onSuccess();
|
|
28850
|
+
}
|
|
28851
|
+
}
|
|
28861
28852
|
});
|
|
28862
|
-
} catch (err) {
|
|
28853
|
+
} catch (err) {
|
|
28854
|
+
console.error("TP payload construction error:", err);
|
|
28855
|
+
}
|
|
28863
28856
|
}, []);
|
|
28864
28857
|
Digit.Hooks.useCustomBackNavigation({
|
|
28865
28858
|
redirectPath: '${APPLICATION_PATH}/citizen'
|
|
@@ -28877,19 +28870,27 @@ const TPAcknowledgement = _ref => {
|
|
|
28877
28870
|
return Promise.reject(e);
|
|
28878
28871
|
}
|
|
28879
28872
|
};
|
|
28873
|
+
const isMutationSuccess = mutation.isSuccess && !((_mutation$data2 = mutation.data) !== null && _mutation$data2 !== void 0 && _mutation$data2.error);
|
|
28874
|
+
const isMutationError = mutation.isError || mutation.isSuccess && ((_mutation$data3 = mutation.data) === null || _mutation$data3 === void 0 ? void 0 : _mutation$data3.error);
|
|
28880
28875
|
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
28876
|
t: t,
|
|
28882
28877
|
data: mutation.data,
|
|
28883
|
-
isSuccess:
|
|
28878
|
+
isSuccess: isMutationSuccess,
|
|
28884
28879
|
isLoading: mutation.isIdle || mutation.isLoading
|
|
28885
|
-
}),
|
|
28880
|
+
}), isMutationError && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, {
|
|
28881
|
+
style: {
|
|
28882
|
+
color: "#d4351c",
|
|
28883
|
+
textAlign: "center",
|
|
28884
|
+
marginTop: "8px"
|
|
28885
|
+
}
|
|
28886
|
+
}, ((_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
28887
|
rowContainerStyle: rowContainerStyle$2,
|
|
28887
28888
|
last: true,
|
|
28888
28889
|
textStyle: {
|
|
28889
28890
|
whiteSpace: "pre",
|
|
28890
28891
|
width: "60%"
|
|
28891
28892
|
}
|
|
28892
|
-
})),
|
|
28893
|
+
})), isMutationSuccess && /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
28893
28894
|
label: t("TP_DOWNLOAD_ACKNOWLEDGEMENT"),
|
|
28894
28895
|
onSubmit: handleDownloadPdf
|
|
28895
28896
|
}), (user === null || user === void 0 ? void 0 : user.type) === "CITIZEN" ? /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
@@ -30091,6 +30092,7 @@ const BannerPicker$3 = props => {
|
|
|
30091
30092
|
});
|
|
30092
30093
|
};
|
|
30093
30094
|
const WTEmergencyFixedPointAcknowledgement = _ref => {
|
|
30095
|
+
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
30096
|
let data = _ref.data,
|
|
30095
30097
|
onSuccess = _ref.onSuccess;
|
|
30096
30098
|
const _useTranslation2 = reactI18next.useTranslation(),
|
|
@@ -30107,9 +30109,15 @@ const WTEmergencyFixedPointAcknowledgement = _ref => {
|
|
|
30107
30109
|
data.tenantId = tenantId;
|
|
30108
30110
|
let formdata = emergencyWaterTankerPayload(data);
|
|
30109
30111
|
mutation.mutate(formdata, {
|
|
30110
|
-
onSuccess
|
|
30112
|
+
onSuccess: res => {
|
|
30113
|
+
if (!(res !== null && res !== void 0 && res.error)) {
|
|
30114
|
+
onSuccess();
|
|
30115
|
+
}
|
|
30116
|
+
}
|
|
30111
30117
|
});
|
|
30112
|
-
} catch (err) {
|
|
30118
|
+
} catch (err) {
|
|
30119
|
+
console.error("Emergency WT payload construction error:", err);
|
|
30120
|
+
}
|
|
30113
30121
|
}, []);
|
|
30114
30122
|
Digit.Hooks.useCustomBackNavigation({
|
|
30115
30123
|
redirectPath: "${APPLICATION_PATH}/citizen"
|
|
@@ -30127,21 +30135,29 @@ const WTEmergencyFixedPointAcknowledgement = _ref => {
|
|
|
30127
30135
|
return Promise.reject(e);
|
|
30128
30136
|
}
|
|
30129
30137
|
};
|
|
30138
|
+
const isMutationSuccess = mutation.isSuccess && !((_mutation$data2 = mutation.data) !== null && _mutation$data2 !== void 0 && _mutation$data2.error);
|
|
30139
|
+
const isMutationError = mutation.isError || mutation.isSuccess && ((_mutation$data3 = mutation.data) === null || _mutation$data3 === void 0 ? void 0 : _mutation$data3.error);
|
|
30130
30140
|
return mutation.isLoading || mutation.isIdle ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
30131
30141
|
className: "vehicle-details-card"
|
|
30132
30142
|
}, /*#__PURE__*/React__default.createElement(BannerPicker$3, {
|
|
30133
30143
|
t: t,
|
|
30134
30144
|
data: mutation.data,
|
|
30135
|
-
isSuccess:
|
|
30145
|
+
isSuccess: isMutationSuccess,
|
|
30136
30146
|
isLoading: mutation.isIdle || mutation.isLoading
|
|
30137
|
-
}),
|
|
30147
|
+
}), isMutationError && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, {
|
|
30148
|
+
style: {
|
|
30149
|
+
color: "#d4351c",
|
|
30150
|
+
textAlign: "center",
|
|
30151
|
+
marginTop: "8px"
|
|
30152
|
+
}
|
|
30153
|
+
}, ((_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
30154
|
rowContainerStyle: rowContainerStyle$3,
|
|
30139
30155
|
last: true,
|
|
30140
30156
|
textStyle: {
|
|
30141
30157
|
whiteSpace: "pre",
|
|
30142
30158
|
width: "60%"
|
|
30143
30159
|
}
|
|
30144
|
-
})),
|
|
30160
|
+
})), isMutationSuccess && /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
30145
30161
|
label: t("WT_DOWNLOAD_ACKNOWLEDGEMENT"),
|
|
30146
30162
|
onSubmit: handleDownloadPdf
|
|
30147
30163
|
}), (user === null || user === void 0 ? void 0 : user.type) === "CITIZEN" ? /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
@@ -30183,6 +30199,7 @@ const BannerPicker$4 = props => {
|
|
|
30183
30199
|
});
|
|
30184
30200
|
};
|
|
30185
30201
|
const MTEmergencyFixedPointAcknowledgement = _ref => {
|
|
30202
|
+
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
30203
|
let data = _ref.data,
|
|
30187
30204
|
onSuccess = _ref.onSuccess;
|
|
30188
30205
|
const _useTranslation2 = reactI18next.useTranslation(),
|
|
@@ -30199,9 +30216,15 @@ const MTEmergencyFixedPointAcknowledgement = _ref => {
|
|
|
30199
30216
|
data.tenantId = tenantId;
|
|
30200
30217
|
let formdata = mobileToiletPayload(data);
|
|
30201
30218
|
mutation.mutate(formdata, {
|
|
30202
|
-
onSuccess
|
|
30219
|
+
onSuccess: res => {
|
|
30220
|
+
if (!(res !== null && res !== void 0 && res.error)) {
|
|
30221
|
+
onSuccess();
|
|
30222
|
+
}
|
|
30223
|
+
}
|
|
30203
30224
|
});
|
|
30204
|
-
} catch (err) {
|
|
30225
|
+
} catch (err) {
|
|
30226
|
+
console.error("Emergency MT payload construction error:", err);
|
|
30227
|
+
}
|
|
30205
30228
|
}, []);
|
|
30206
30229
|
Digit.Hooks.useCustomBackNavigation({
|
|
30207
30230
|
redirectPath: '${APPLICATION_PATH}/citizen'
|
|
@@ -30219,19 +30242,27 @@ const MTEmergencyFixedPointAcknowledgement = _ref => {
|
|
|
30219
30242
|
return Promise.reject(e);
|
|
30220
30243
|
}
|
|
30221
30244
|
};
|
|
30245
|
+
const isMutationSuccess = mutation.isSuccess && !((_mutation$data2 = mutation.data) !== null && _mutation$data2 !== void 0 && _mutation$data2.error);
|
|
30246
|
+
const isMutationError = mutation.isError || mutation.isSuccess && ((_mutation$data3 = mutation.data) === null || _mutation$data3 === void 0 ? void 0 : _mutation$data3.error);
|
|
30222
30247
|
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
30248
|
t: t,
|
|
30224
30249
|
data: mutation.data,
|
|
30225
|
-
isSuccess:
|
|
30250
|
+
isSuccess: isMutationSuccess,
|
|
30226
30251
|
isLoading: mutation.isIdle || mutation.isLoading
|
|
30227
|
-
}),
|
|
30252
|
+
}), isMutationError && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, {
|
|
30253
|
+
style: {
|
|
30254
|
+
color: "#d4351c",
|
|
30255
|
+
textAlign: "center",
|
|
30256
|
+
marginTop: "8px"
|
|
30257
|
+
}
|
|
30258
|
+
}, ((_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
30259
|
rowContainerStyle: rowContainerStyle$4,
|
|
30229
30260
|
last: true,
|
|
30230
30261
|
textStyle: {
|
|
30231
30262
|
whiteSpace: "pre",
|
|
30232
30263
|
width: "60%"
|
|
30233
30264
|
}
|
|
30234
|
-
})),
|
|
30265
|
+
})), isMutationSuccess && /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
30235
30266
|
label: t("MT_DOWNLOAD_ACKNOWLEDGEMENT"),
|
|
30236
30267
|
onSubmit: handleDownloadPdf
|
|
30237
30268
|
}), (user === null || user === void 0 ? void 0 : user.type) === "CITIZEN" ? /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
@@ -30272,6 +30303,7 @@ const BannerPicker$5 = props => {
|
|
|
30272
30303
|
});
|
|
30273
30304
|
};
|
|
30274
30305
|
const EmergencyFixedPointTPAcknowledgement = _ref => {
|
|
30306
|
+
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
30307
|
let data = _ref.data,
|
|
30276
30308
|
onSuccess = _ref.onSuccess;
|
|
30277
30309
|
const _useTranslation2 = reactI18next.useTranslation(),
|
|
@@ -30288,9 +30320,15 @@ const EmergencyFixedPointTPAcknowledgement = _ref => {
|
|
|
30288
30320
|
data.tenantId = tenantId;
|
|
30289
30321
|
let formdata = treePruningPayload(data);
|
|
30290
30322
|
mutation.mutate(formdata, {
|
|
30291
|
-
onSuccess
|
|
30323
|
+
onSuccess: res => {
|
|
30324
|
+
if (!(res !== null && res !== void 0 && res.error)) {
|
|
30325
|
+
onSuccess();
|
|
30326
|
+
}
|
|
30327
|
+
}
|
|
30292
30328
|
});
|
|
30293
|
-
} catch (err) {
|
|
30329
|
+
} catch (err) {
|
|
30330
|
+
console.error("Emergency TP payload construction error:", err);
|
|
30331
|
+
}
|
|
30294
30332
|
}, []);
|
|
30295
30333
|
Digit.Hooks.useCustomBackNavigation({
|
|
30296
30334
|
redirectPath: '${APPLICATION_PATH}/citizen'
|
|
@@ -30308,19 +30346,27 @@ const EmergencyFixedPointTPAcknowledgement = _ref => {
|
|
|
30308
30346
|
return Promise.reject(e);
|
|
30309
30347
|
}
|
|
30310
30348
|
};
|
|
30349
|
+
const isMutationSuccess = mutation.isSuccess && !((_mutation$data2 = mutation.data) !== null && _mutation$data2 !== void 0 && _mutation$data2.error);
|
|
30350
|
+
const isMutationError = mutation.isError || mutation.isSuccess && ((_mutation$data3 = mutation.data) === null || _mutation$data3 === void 0 ? void 0 : _mutation$data3.error);
|
|
30311
30351
|
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
30352
|
t: t,
|
|
30313
30353
|
data: mutation.data,
|
|
30314
|
-
isSuccess:
|
|
30354
|
+
isSuccess: isMutationSuccess,
|
|
30315
30355
|
isLoading: mutation.isIdle || mutation.isLoading
|
|
30316
|
-
}),
|
|
30356
|
+
}), isMutationError && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, {
|
|
30357
|
+
style: {
|
|
30358
|
+
color: "#d4351c",
|
|
30359
|
+
textAlign: "center",
|
|
30360
|
+
marginTop: "8px"
|
|
30361
|
+
}
|
|
30362
|
+
}, ((_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
30363
|
rowContainerStyle: rowContainerStyle$5,
|
|
30318
30364
|
last: true,
|
|
30319
30365
|
textStyle: {
|
|
30320
30366
|
whiteSpace: "pre",
|
|
30321
30367
|
width: "60%"
|
|
30322
30368
|
}
|
|
30323
|
-
})),
|
|
30369
|
+
})), isMutationSuccess && /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
30324
30370
|
label: t("TP_DOWNLOAD_ACKNOWLEDGEMENT"),
|
|
30325
30371
|
onSubmit: handleDownloadPdf
|
|
30326
30372
|
}), (user === null || user === void 0 ? void 0 : user.type) === "CITIZEN" ? /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|