@djb25/digit-ui-module-common 1.0.9 → 1.0.11
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 +29 -18
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +29 -18
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -88,7 +88,7 @@ const SelectPaymentType = props => {
|
|
|
88
88
|
} : Digit.Hooks.useFetchPayment({
|
|
89
89
|
tenantId,
|
|
90
90
|
businessService,
|
|
91
|
-
consumerCode
|
|
91
|
+
consumerCode: wrkflow === "WNS" ? stringReplaceAll(consumerCode, "+", "/") : consumerCode
|
|
92
92
|
});
|
|
93
93
|
let Useruuid = (data === null || data === void 0 ? void 0 : (_data$Bill = data.Bill) === null || _data$Bill === void 0 ? void 0 : (_data$Bill$ = _data$Bill[0]) === null || _data$Bill$ === void 0 ? void 0 : _data$Bill$.userId) || "";
|
|
94
94
|
let requestCriteria = ["/user/_search", {}, {
|
|
@@ -169,7 +169,7 @@ const SelectPaymentType = props => {
|
|
|
169
169
|
React.useEffect(() => {
|
|
170
170
|
if (!bill && data) {
|
|
171
171
|
var _data$Bill2;
|
|
172
|
-
let requiredBill = data === null || data === void 0 ? void 0 : (_data$Bill2 = data.Bill) === null || _data$Bill2 === void 0 ? void 0 : _data$Bill2.filter(e => e.consumerCode == consumerCode)[0];
|
|
172
|
+
let requiredBill = data === null || data === void 0 ? void 0 : (_data$Bill2 = data.Bill) === null || _data$Bill2 === void 0 ? void 0 : _data$Bill2.filter(e => e.consumerCode == (wrkflow === "WNS" ? stringReplaceAll(consumerCode, "+", "/") : consumerCode))[0];
|
|
173
173
|
setBill(requiredBill);
|
|
174
174
|
}
|
|
175
175
|
}, [isLoading]);
|
|
@@ -985,7 +985,7 @@ const TimerServices = _ref => {
|
|
|
985
985
|
};
|
|
986
986
|
|
|
987
987
|
const BillDetails = _ref => {
|
|
988
|
-
var _Digit$UserService$ge, _data$Bill, _data$Bill$, _bill$billDetails, _bill$billDetails$sor, _bill$billDetails2, _bill$billDetails2$so, _application$pdfData6, _application$pdfData7, _application$pdfData8, _application$pdfData9, _application$pdfData0, _application$pdfData1, _application$pdfData10, _application$pdfData11, _application$pdfData12;
|
|
988
|
+
var _Digit$UserService$ge, _data$Bill, _data$Bill$, _bill$billDetails, _bill$billDetails$sor, _bill$billDetails2, _bill$billDetails2$so, _bill$businessService, _window, _window$location, _window$location$href, _bill$billDetails3, _bill$billDetails3$, _bill$billDetails3$$b, _application$pdfData6, _application$pdfData7, _application$pdfData8, _application$pdfData9, _application$pdfData0, _application$pdfData1, _application$pdfData10, _application$pdfData11, _application$pdfData12;
|
|
989
989
|
let {
|
|
990
990
|
paymentRules,
|
|
991
991
|
businessService
|
|
@@ -1065,6 +1065,10 @@ const BillDetails = _ref => {
|
|
|
1065
1065
|
}, {
|
|
1066
1066
|
enabled: false
|
|
1067
1067
|
});
|
|
1068
|
+
const isNewConnection = (businessService === null || businessService === void 0 ? void 0 : businessService.includes("ONE_TIME_FEE")) || (bill === null || bill === void 0 ? void 0 : (_bill$businessService = bill.businessService) === null || _bill$businessService === void 0 ? void 0 : _bill$businessService.includes("ONE_TIME_FEE")) || (pathname === null || pathname === void 0 ? void 0 : pathname.includes("ONE_TIME_FEE")) || ((_window = window) === null || _window === void 0 ? void 0 : (_window$location = _window.location) === null || _window$location === void 0 ? void 0 : (_window$location$href = _window$location.href) === null || _window$location$href === void 0 ? void 0 : _window$location$href.includes("ONE_TIME_FEE")) || (bill === null || bill === void 0 ? void 0 : (_bill$billDetails3 = bill.billDetails) === null || _bill$billDetails3 === void 0 ? void 0 : (_bill$billDetails3$ = _bill$billDetails3[0]) === null || _bill$billDetails3$ === void 0 ? void 0 : (_bill$billDetails3$$b = _bill$billDetails3$.billAccountDetails) === null || _bill$billDetails3$$b === void 0 ? void 0 : _bill$billDetails3$$b.some(head => {
|
|
1069
|
+
var _head$taxHeadCode;
|
|
1070
|
+
return head === null || head === void 0 ? void 0 : (_head$taxHeadCode = head.taxHeadCode) === null || _head$taxHeadCode === void 0 ? void 0 : _head$taxHeadCode.includes("ONE_TIME_FEE");
|
|
1071
|
+
}));
|
|
1068
1072
|
const getBillingPeriod = () => {
|
|
1069
1073
|
const {
|
|
1070
1074
|
fromPeriod,
|
|
@@ -1204,7 +1208,7 @@ const BillDetails = _ref => {
|
|
|
1204
1208
|
}), (billDetails === null || billDetails === void 0 ? void 0 : billDetails.currentBillNo) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.KeyNote, {
|
|
1205
1209
|
keyValue: t("CS_BILL_NO"),
|
|
1206
1210
|
note: billDetails === null || billDetails === void 0 ? void 0 : billDetails.currentBillNo
|
|
1207
|
-
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.KeyNote, {
|
|
1211
|
+
}), !isNewConnection && /*#__PURE__*/React__default.createElement(digitUiReactComponents.KeyNote, {
|
|
1208
1212
|
keyValue: t("CS_PAYMENT_BILLING_PERIOD"),
|
|
1209
1213
|
note: getBillingPeriod()
|
|
1210
1214
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.KeyNote, {
|
|
@@ -1229,7 +1233,7 @@ const BillDetails = _ref => {
|
|
|
1229
1233
|
timerValues: state === null || state === void 0 ? void 0 : state.timerValue,
|
|
1230
1234
|
t: t,
|
|
1231
1235
|
SlotSearchData: state === null || state === void 0 ? void 0 : state.SlotSearchData
|
|
1232
|
-
}))), businessService !== "PT.MUTATION" && businessService !== "FSM.TRIP_CHARGES" && /*#__PURE__*/React__default.createElement(digitUiReactComponents.KeyNote, {
|
|
1236
|
+
}))), businessService !== "PT.MUTATION" && businessService !== "FSM.TRIP_CHARGES" && !isNewConnection && /*#__PURE__*/React__default.createElement(digitUiReactComponents.KeyNote, {
|
|
1233
1237
|
keyValue: t("CS_PAYMENT_BILLING_PERIOD"),
|
|
1234
1238
|
note: getBillingPeriod()
|
|
1235
1239
|
})), businessService === "FSM.TRIP_CHARGES" ? /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.KeyNote, {
|
|
@@ -1656,7 +1660,7 @@ const convertEpochToDate = dateEpoch => {
|
|
|
1656
1660
|
}
|
|
1657
1661
|
};
|
|
1658
1662
|
const WrapPaymentComponent = props => {
|
|
1659
|
-
var _data$payments, _data$payments$Paymen, _data$payments$Paymen2, _data$payments2, _paymentData$
|
|
1663
|
+
var _paymentData$paymentD, _paymentData$paymentD2, _paymentData$paymentD3, _paymentData$paymentD4, _window, _window$location, _window$location$href, _data$payments, _data$payments$Paymen, _data$payments$Paymen2, _data$payments2, _paymentData$paymentD12, _paymentData$paymentD13, _reciept_data$payment3, _reciept_data$payment4, _reciept_data$payment5, _reciept_data$payment6, _reciept_data$payment7, _reciept_data$payment8, _reciept_data$payment9, _reciept_data$payment0, _reciept_data$payment1, _reciept_data$payment10, _reciept_data$payment11, _reciept_data$payment12, _bpaData$5, _bpaData$6, _bpaData$7, _bpaData$8, _bpaData$9, _bpaData$0, _bpaData$1, _bpaData$10, _bpaData$11, _business_service$spl;
|
|
1660
1664
|
const {
|
|
1661
1665
|
t
|
|
1662
1666
|
} = reactI18next.useTranslation();
|
|
@@ -1704,8 +1708,8 @@ const WrapPaymentComponent = props => {
|
|
|
1704
1708
|
enabled: false
|
|
1705
1709
|
});
|
|
1706
1710
|
const mutation = Digit.Hooks.chb.useChbCreateAPI(tenantId, false);
|
|
1707
|
-
const
|
|
1708
|
-
const newTenantId = business_service.includes("WS.ONE_TIME_FEE" ) ? Digit.ULBService.getStateId() : tenantId;
|
|
1711
|
+
const isNewConnection = (business_service === null || business_service === void 0 ? void 0 : business_service.includes("ONE_TIME_FEE")) || (paymentData === null || paymentData === void 0 ? void 0 : (_paymentData$paymentD = paymentData.paymentDetails) === null || _paymentData$paymentD === void 0 ? void 0 : (_paymentData$paymentD2 = _paymentData$paymentD[0]) === null || _paymentData$paymentD2 === void 0 ? void 0 : (_paymentData$paymentD3 = _paymentData$paymentD2.bill) === null || _paymentData$paymentD3 === void 0 ? void 0 : (_paymentData$paymentD4 = _paymentData$paymentD3.businessService) === null || _paymentData$paymentD4 === void 0 ? void 0 : _paymentData$paymentD4.includes("ONE_TIME_FEE")) || ((_window = window) === null || _window === void 0 ? void 0 : (_window$location = _window.location) === null || _window$location === void 0 ? void 0 : (_window$location$href = _window$location.href) === null || _window$location$href === void 0 ? void 0 : _window$location$href.includes("ONE_TIME_FEE"));
|
|
1712
|
+
const newTenantId = business_service !== null && business_service !== void 0 && business_service.includes("WS.ONE_TIME_FEE") || business_service !== null && business_service !== void 0 && business_service.includes("SW.ONE_TIME_FEE") || isNewConnection ? Digit.ULBService.getStateId() : tenantId;
|
|
1709
1713
|
const {
|
|
1710
1714
|
data: reciept_data,
|
|
1711
1715
|
isLoading: recieptDataLoading
|
|
@@ -1914,12 +1918,12 @@ const WrapPaymentComponent = props => {
|
|
|
1914
1918
|
applicationNo: (_payments$Payments$0$ = payments.Payments[0].paymentDetails[0]) === null || _payments$Payments$0$ === void 0 ? void 0 : (_payments$Payments$0$2 = _payments$Payments$0$.bill) === null || _payments$Payments$0$2 === void 0 ? void 0 : _payments$Payments$0$2.consumerCode
|
|
1915
1919
|
};
|
|
1916
1920
|
return Promise.resolve(Digit.OBPSService.BPASearch(payments.Payments[0].tenantId, queryObj)).then(function (bpaResponse) {
|
|
1917
|
-
var _bpaResponse$BPA$, _bpaResponse$BPA$$add, _paymentData$
|
|
1921
|
+
var _bpaResponse$BPA$, _bpaResponse$BPA$$add, _paymentData$paymentD5, _bpaResponse$BPA$2, _bpaResponse$BPA$2$ad;
|
|
1918
1922
|
const formattedStakeholderType = bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA$ = bpaResponse.BPA[0]) === null || _bpaResponse$BPA$ === void 0 ? void 0 : (_bpaResponse$BPA$$add = _bpaResponse$BPA$.additionalDetails) === null || _bpaResponse$BPA$$add === void 0 ? void 0 : _bpaResponse$BPA$$add.typeOfArchitect;
|
|
1919
1923
|
const updatedpayments = {
|
|
1920
1924
|
...paymentData,
|
|
1921
1925
|
paymentDetails: [{
|
|
1922
|
-
...((_paymentData$
|
|
1926
|
+
...((_paymentData$paymentD5 = paymentData.paymentDetails) === null || _paymentData$paymentD5 === void 0 ? void 0 : _paymentData$paymentD5[0]),
|
|
1923
1927
|
additionalDetails: {
|
|
1924
1928
|
...paymentData.paymentDetails[0].additionalDetails,
|
|
1925
1929
|
"propertyID": bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA$2 = bpaResponse.BPA[0]) === null || _bpaResponse$BPA$2 === void 0 ? void 0 : (_bpaResponse$BPA$2$ad = _bpaResponse$BPA$2.additionalDetails) === null || _bpaResponse$BPA$2$ad === void 0 ? void 0 : _bpaResponse$BPA$2$ad.propertyID,
|
|
@@ -2091,17 +2095,17 @@ const WrapPaymentComponent = props => {
|
|
|
2091
2095
|
if (workflw) {
|
|
2092
2096
|
bannerText = `CITIZEN_SUCCESS_UC_PAYMENT_MESSAGE`;
|
|
2093
2097
|
} else {
|
|
2094
|
-
var _paymentData$
|
|
2095
|
-
if (paymentData !== null && paymentData !== void 0 && (_paymentData$
|
|
2096
|
-
var _paymentData$
|
|
2098
|
+
var _paymentData$paymentD6, _paymentData$paymentD7, _paymentData$paymentD8, _paymentData$paymentD9, _paymentData$paymentD0;
|
|
2099
|
+
if (paymentData !== null && paymentData !== void 0 && (_paymentData$paymentD6 = paymentData.paymentDetails) !== null && _paymentData$paymentD6 !== void 0 && (_paymentData$paymentD7 = _paymentData$paymentD6[0]) !== null && _paymentData$paymentD7 !== void 0 && _paymentData$paymentD7.businessService && paymentData !== null && paymentData !== void 0 && (_paymentData$paymentD8 = paymentData.paymentDetails) !== null && _paymentData$paymentD8 !== void 0 && (_paymentData$paymentD9 = _paymentData$paymentD8[0]) !== null && _paymentData$paymentD9 !== void 0 && (_paymentData$paymentD0 = _paymentData$paymentD9.businessService) !== null && _paymentData$paymentD0 !== void 0 && _paymentData$paymentD0.includes("BPA")) {
|
|
2100
|
+
var _paymentData$paymentD1;
|
|
2097
2101
|
let nameOfAchitect = sessionStorage.getItem("BPA_ARCHITECT_NAME");
|
|
2098
2102
|
let parsedArchitectName = nameOfAchitect ? JSON.parse(nameOfAchitect) : "ARCHITECT";
|
|
2099
|
-
bannerText = `CITIZEN_SUCCESS_${paymentData === null || paymentData === void 0 ? void 0 : (_paymentData$
|
|
2103
|
+
bannerText = `CITIZEN_SUCCESS_${paymentData === null || paymentData === void 0 ? void 0 : (_paymentData$paymentD1 = paymentData.paymentDetails[0]) === null || _paymentData$paymentD1 === void 0 ? void 0 : _paymentData$paymentD1.businessService.replace(/\./g, "_")}_${parsedArchitectName}_PAYMENT_MESSAGE`;
|
|
2100
2104
|
} else if (business_service !== null && business_service !== void 0 && business_service.includes("WS") || business_service !== null && business_service !== void 0 && business_service.includes("SW")) {
|
|
2101
2105
|
bannerText = t(`CITIZEN_SUCCESS_${paymentData === null || paymentData === void 0 ? void 0 : paymentData.paymentDetails[0].businessService.replace(/\./g, "_")}_WS_PAYMENT_MESSAGE`);
|
|
2102
2106
|
} else {
|
|
2103
|
-
var _paymentData$
|
|
2104
|
-
bannerText = paymentData !== null && paymentData !== void 0 && (_paymentData$
|
|
2107
|
+
var _paymentData$paymentD10, _paymentData$paymentD11;
|
|
2108
|
+
bannerText = paymentData !== null && paymentData !== void 0 && (_paymentData$paymentD10 = paymentData.paymentDetails[0]) !== null && _paymentData$paymentD10 !== void 0 && _paymentData$paymentD10.businessService ? `CITIZEN_SUCCESS_${paymentData === null || paymentData === void 0 ? void 0 : (_paymentData$paymentD11 = paymentData.paymentDetails[0]) === null || _paymentData$paymentD11 === void 0 ? void 0 : _paymentData$paymentD11.businessService.replace(/\./g, "_")}_PAYMENT_MESSAGE` : t("CITIZEN_SUCCESS_UC_PAYMENT_MESSAGE");
|
|
2105
2109
|
}
|
|
2106
2110
|
}
|
|
2107
2111
|
const rowContainerStyle = {
|
|
@@ -2656,11 +2660,11 @@ const WrapPaymentComponent = props => {
|
|
|
2656
2660
|
last: true,
|
|
2657
2661
|
label: t(label),
|
|
2658
2662
|
text: applicationNo
|
|
2659
|
-
}), (business_service === "PT" || workflw) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
2663
|
+
}), (business_service === "PT" || workflw) && !isNewConnection && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
2660
2664
|
rowContainerStyle: rowContainerStyle,
|
|
2661
2665
|
last: true,
|
|
2662
2666
|
label: t("CS_PAYMENT_BILLING_PERIOD"),
|
|
2663
|
-
text: getBillingPeriod(paymentData === null || paymentData === void 0 ? void 0 : (_paymentData$
|
|
2667
|
+
text: getBillingPeriod(paymentData === null || paymentData === void 0 ? void 0 : (_paymentData$paymentD12 = paymentData.paymentDetails[0]) === null || _paymentData$paymentD12 === void 0 ? void 0 : (_paymentData$paymentD13 = _paymentData$paymentD12.bill) === null || _paymentData$paymentD13 === void 0 ? void 0 : _paymentData$paymentD13.billDetails[0])
|
|
2664
2668
|
}), (business_service === "PT" || workflw) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
2665
2669
|
rowContainerStyle: rowContainerStyle,
|
|
2666
2670
|
last: true,
|
|
@@ -3010,6 +3014,13 @@ const WrapPaymentComponent = props => {
|
|
|
3010
3014
|
style: {
|
|
3011
3015
|
marginTop: "15px"
|
|
3012
3016
|
}
|
|
3017
|
+
})), ((business_service === null || business_service === void 0 ? void 0 : business_service.includes("WS")) || (business_service === null || business_service === void 0 ? void 0 : business_service.includes("SW"))) && /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
3018
|
+
to: `/digit-ui/citizen/ws/my-applications`
|
|
3019
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
3020
|
+
label: t("CORE_COMMON_GO_TO_HOME"),
|
|
3021
|
+
style: {
|
|
3022
|
+
marginTop: "15px"
|
|
3023
|
+
}
|
|
3013
3024
|
})));
|
|
3014
3025
|
};
|
|
3015
3026
|
const FailedPayment = props => {
|