@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.modern.js
CHANGED
|
@@ -85,7 +85,7 @@ const SelectPaymentType = props => {
|
|
|
85
85
|
} : Digit.Hooks.useFetchPayment({
|
|
86
86
|
tenantId,
|
|
87
87
|
businessService,
|
|
88
|
-
consumerCode
|
|
88
|
+
consumerCode: wrkflow === "WNS" ? stringReplaceAll(consumerCode, "+", "/") : consumerCode
|
|
89
89
|
});
|
|
90
90
|
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) || "";
|
|
91
91
|
let requestCriteria = ["/user/_search", {}, {
|
|
@@ -166,7 +166,7 @@ const SelectPaymentType = props => {
|
|
|
166
166
|
useEffect(() => {
|
|
167
167
|
if (!bill && data) {
|
|
168
168
|
var _data$Bill2;
|
|
169
|
-
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];
|
|
169
|
+
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];
|
|
170
170
|
setBill(requiredBill);
|
|
171
171
|
}
|
|
172
172
|
}, [isLoading]);
|
|
@@ -982,7 +982,7 @@ const TimerServices = _ref => {
|
|
|
982
982
|
};
|
|
983
983
|
|
|
984
984
|
const BillDetails = _ref => {
|
|
985
|
-
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;
|
|
985
|
+
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;
|
|
986
986
|
let {
|
|
987
987
|
paymentRules,
|
|
988
988
|
businessService
|
|
@@ -1062,6 +1062,10 @@ const BillDetails = _ref => {
|
|
|
1062
1062
|
}, {
|
|
1063
1063
|
enabled: false
|
|
1064
1064
|
});
|
|
1065
|
+
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 => {
|
|
1066
|
+
var _head$taxHeadCode;
|
|
1067
|
+
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");
|
|
1068
|
+
}));
|
|
1065
1069
|
const getBillingPeriod = () => {
|
|
1066
1070
|
const {
|
|
1067
1071
|
fromPeriod,
|
|
@@ -1201,7 +1205,7 @@ const BillDetails = _ref => {
|
|
|
1201
1205
|
}), (billDetails === null || billDetails === void 0 ? void 0 : billDetails.currentBillNo) && /*#__PURE__*/React.createElement(KeyNote, {
|
|
1202
1206
|
keyValue: t("CS_BILL_NO"),
|
|
1203
1207
|
note: billDetails === null || billDetails === void 0 ? void 0 : billDetails.currentBillNo
|
|
1204
|
-
}), /*#__PURE__*/React.createElement(KeyNote, {
|
|
1208
|
+
}), !isNewConnection && /*#__PURE__*/React.createElement(KeyNote, {
|
|
1205
1209
|
keyValue: t("CS_PAYMENT_BILLING_PERIOD"),
|
|
1206
1210
|
note: getBillingPeriod()
|
|
1207
1211
|
}), /*#__PURE__*/React.createElement(KeyNote, {
|
|
@@ -1226,7 +1230,7 @@ const BillDetails = _ref => {
|
|
|
1226
1230
|
timerValues: state === null || state === void 0 ? void 0 : state.timerValue,
|
|
1227
1231
|
t: t,
|
|
1228
1232
|
SlotSearchData: state === null || state === void 0 ? void 0 : state.SlotSearchData
|
|
1229
|
-
}))), businessService !== "PT.MUTATION" && businessService !== "FSM.TRIP_CHARGES" && /*#__PURE__*/React.createElement(KeyNote, {
|
|
1233
|
+
}))), businessService !== "PT.MUTATION" && businessService !== "FSM.TRIP_CHARGES" && !isNewConnection && /*#__PURE__*/React.createElement(KeyNote, {
|
|
1230
1234
|
keyValue: t("CS_PAYMENT_BILLING_PERIOD"),
|
|
1231
1235
|
note: getBillingPeriod()
|
|
1232
1236
|
})), businessService === "FSM.TRIP_CHARGES" ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(KeyNote, {
|
|
@@ -1653,7 +1657,7 @@ const convertEpochToDate = dateEpoch => {
|
|
|
1653
1657
|
}
|
|
1654
1658
|
};
|
|
1655
1659
|
const WrapPaymentComponent = props => {
|
|
1656
|
-
var _data$payments, _data$payments$Paymen, _data$payments$Paymen2, _data$payments2, _paymentData$
|
|
1660
|
+
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;
|
|
1657
1661
|
const {
|
|
1658
1662
|
t
|
|
1659
1663
|
} = useTranslation();
|
|
@@ -1701,8 +1705,8 @@ const WrapPaymentComponent = props => {
|
|
|
1701
1705
|
enabled: false
|
|
1702
1706
|
});
|
|
1703
1707
|
const mutation = Digit.Hooks.chb.useChbCreateAPI(tenantId, false);
|
|
1704
|
-
const
|
|
1705
|
-
const newTenantId = business_service.includes("WS.ONE_TIME_FEE" ) ? Digit.ULBService.getStateId() : tenantId;
|
|
1708
|
+
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"));
|
|
1709
|
+
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;
|
|
1706
1710
|
const {
|
|
1707
1711
|
data: reciept_data,
|
|
1708
1712
|
isLoading: recieptDataLoading
|
|
@@ -1911,12 +1915,12 @@ const WrapPaymentComponent = props => {
|
|
|
1911
1915
|
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
|
|
1912
1916
|
};
|
|
1913
1917
|
return Promise.resolve(Digit.OBPSService.BPASearch(payments.Payments[0].tenantId, queryObj)).then(function (bpaResponse) {
|
|
1914
|
-
var _bpaResponse$BPA$, _bpaResponse$BPA$$add, _paymentData$
|
|
1918
|
+
var _bpaResponse$BPA$, _bpaResponse$BPA$$add, _paymentData$paymentD5, _bpaResponse$BPA$2, _bpaResponse$BPA$2$ad;
|
|
1915
1919
|
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;
|
|
1916
1920
|
const updatedpayments = {
|
|
1917
1921
|
...paymentData,
|
|
1918
1922
|
paymentDetails: [{
|
|
1919
|
-
...((_paymentData$
|
|
1923
|
+
...((_paymentData$paymentD5 = paymentData.paymentDetails) === null || _paymentData$paymentD5 === void 0 ? void 0 : _paymentData$paymentD5[0]),
|
|
1920
1924
|
additionalDetails: {
|
|
1921
1925
|
...paymentData.paymentDetails[0].additionalDetails,
|
|
1922
1926
|
"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,
|
|
@@ -2088,17 +2092,17 @@ const WrapPaymentComponent = props => {
|
|
|
2088
2092
|
if (workflw) {
|
|
2089
2093
|
bannerText = `CITIZEN_SUCCESS_UC_PAYMENT_MESSAGE`;
|
|
2090
2094
|
} else {
|
|
2091
|
-
var _paymentData$
|
|
2092
|
-
if (paymentData !== null && paymentData !== void 0 && (_paymentData$
|
|
2093
|
-
var _paymentData$
|
|
2095
|
+
var _paymentData$paymentD6, _paymentData$paymentD7, _paymentData$paymentD8, _paymentData$paymentD9, _paymentData$paymentD0;
|
|
2096
|
+
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")) {
|
|
2097
|
+
var _paymentData$paymentD1;
|
|
2094
2098
|
let nameOfAchitect = sessionStorage.getItem("BPA_ARCHITECT_NAME");
|
|
2095
2099
|
let parsedArchitectName = nameOfAchitect ? JSON.parse(nameOfAchitect) : "ARCHITECT";
|
|
2096
|
-
bannerText = `CITIZEN_SUCCESS_${paymentData === null || paymentData === void 0 ? void 0 : (_paymentData$
|
|
2100
|
+
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`;
|
|
2097
2101
|
} else if (business_service !== null && business_service !== void 0 && business_service.includes("WS") || business_service !== null && business_service !== void 0 && business_service.includes("SW")) {
|
|
2098
2102
|
bannerText = t(`CITIZEN_SUCCESS_${paymentData === null || paymentData === void 0 ? void 0 : paymentData.paymentDetails[0].businessService.replace(/\./g, "_")}_WS_PAYMENT_MESSAGE`);
|
|
2099
2103
|
} else {
|
|
2100
|
-
var _paymentData$
|
|
2101
|
-
bannerText = paymentData !== null && paymentData !== void 0 && (_paymentData$
|
|
2104
|
+
var _paymentData$paymentD10, _paymentData$paymentD11;
|
|
2105
|
+
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");
|
|
2102
2106
|
}
|
|
2103
2107
|
}
|
|
2104
2108
|
const rowContainerStyle = {
|
|
@@ -2653,11 +2657,11 @@ const WrapPaymentComponent = props => {
|
|
|
2653
2657
|
last: true,
|
|
2654
2658
|
label: t(label),
|
|
2655
2659
|
text: applicationNo
|
|
2656
|
-
}), (business_service === "PT" || workflw) && /*#__PURE__*/React.createElement(Row, {
|
|
2660
|
+
}), (business_service === "PT" || workflw) && !isNewConnection && /*#__PURE__*/React.createElement(Row, {
|
|
2657
2661
|
rowContainerStyle: rowContainerStyle,
|
|
2658
2662
|
last: true,
|
|
2659
2663
|
label: t("CS_PAYMENT_BILLING_PERIOD"),
|
|
2660
|
-
text: getBillingPeriod(paymentData === null || paymentData === void 0 ? void 0 : (_paymentData$
|
|
2664
|
+
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])
|
|
2661
2665
|
}), (business_service === "PT" || workflw) && /*#__PURE__*/React.createElement(Row, {
|
|
2662
2666
|
rowContainerStyle: rowContainerStyle,
|
|
2663
2667
|
last: true,
|
|
@@ -3007,6 +3011,13 @@ const WrapPaymentComponent = props => {
|
|
|
3007
3011
|
style: {
|
|
3008
3012
|
marginTop: "15px"
|
|
3009
3013
|
}
|
|
3014
|
+
})), ((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.createElement(Link, {
|
|
3015
|
+
to: `/digit-ui/citizen/ws/my-applications`
|
|
3016
|
+
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
3017
|
+
label: t("CORE_COMMON_GO_TO_HOME"),
|
|
3018
|
+
style: {
|
|
3019
|
+
marginTop: "15px"
|
|
3020
|
+
}
|
|
3010
3021
|
})));
|
|
3011
3022
|
};
|
|
3012
3023
|
const FailedPayment = props => {
|