@mseva/digit-ui-module-common 1.1.90 → 1.1.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +675 -260
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
package/dist/index.modern.js
CHANGED
|
@@ -7560,6 +7560,40 @@ const WrapPaymentComponent = props => {
|
|
|
7560
7560
|
});
|
|
7561
7561
|
}
|
|
7562
7562
|
};
|
|
7563
|
+
const printPetReceipt = async () => {
|
|
7564
|
+
if (printing) return;
|
|
7565
|
+
setPrinting(true);
|
|
7566
|
+
const payments = await Digit.PaymentService.getReciept(tenantId, business_service, {
|
|
7567
|
+
receiptNumbers: receiptNumber
|
|
7568
|
+
});
|
|
7569
|
+
try {
|
|
7570
|
+
var _applicationDetails$P, _payments$Payments$2;
|
|
7571
|
+
const applicationDetails = await Digit.PTRService.search({
|
|
7572
|
+
tenantId,
|
|
7573
|
+
filters: {
|
|
7574
|
+
applicationNumber: consumerCode
|
|
7575
|
+
}
|
|
7576
|
+
});
|
|
7577
|
+
const application = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$P = applicationDetails.PetRegistrationApplications) === null || _applicationDetails$P === void 0 ? void 0 : _applicationDetails$P[0];
|
|
7578
|
+
let fileStoreId = (_payments$Payments$2 = payments.Payments[0]) === null || _payments$Payments$2 === void 0 ? void 0 : _payments$Payments$2.fileStoreId;
|
|
7579
|
+
if (!fileStoreId) {
|
|
7580
|
+
var _payments$Payments;
|
|
7581
|
+
let response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
7582
|
+
Payments: [{
|
|
7583
|
+
...((payments === null || payments === void 0 ? void 0 : (_payments$Payments = payments.Payments) === null || _payments$Payments === void 0 ? void 0 : _payments$Payments[0]) || {}),
|
|
7584
|
+
application
|
|
7585
|
+
}]
|
|
7586
|
+
}, "petservice-receipt");
|
|
7587
|
+
fileStoreId = response === null || response === void 0 ? void 0 : response.filestoreIds[0];
|
|
7588
|
+
}
|
|
7589
|
+
const fileStore = await Digit.PaymentService.printReciept(tenantId, {
|
|
7590
|
+
fileStoreIds: fileStoreId
|
|
7591
|
+
});
|
|
7592
|
+
window.open(fileStore[fileStoreId], "_blank");
|
|
7593
|
+
} finally {
|
|
7594
|
+
setPrinting(false);
|
|
7595
|
+
}
|
|
7596
|
+
};
|
|
7563
7597
|
const downloadPdf = (blob, fileName) => {
|
|
7564
7598
|
if (window.mSewaApp && window.mSewaApp.isMsewaApp() && window.mSewaApp.downloadBase64File) {
|
|
7565
7599
|
var reader = new FileReader();
|
|
@@ -7675,13 +7709,13 @@ const WrapPaymentComponent = props => {
|
|
|
7675
7709
|
let application = challan;
|
|
7676
7710
|
let fileStoreId = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : (_applicationDetails$A2 = _applicationDetails$A[0]) === null || _applicationDetails$A2 === void 0 ? void 0 : _applicationDetails$A2.paymentReceiptFilestoreId;
|
|
7677
7711
|
if (!fileStoreId) {
|
|
7678
|
-
var _payments$
|
|
7712
|
+
var _payments$Payments2;
|
|
7679
7713
|
const payments = await Digit.PaymentService.getReciept(tenantId, business_service, {
|
|
7680
7714
|
receiptNumbers: receiptNumber
|
|
7681
7715
|
});
|
|
7682
7716
|
let response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
7683
7717
|
Payments: [{
|
|
7684
|
-
...((payments === null || payments === void 0 ? void 0 : (_payments$
|
|
7718
|
+
...((payments === null || payments === void 0 ? void 0 : (_payments$Payments2 = payments.Payments) === null || _payments$Payments2 === void 0 ? void 0 : _payments$Payments2[0]) || {}),
|
|
7685
7719
|
challan: application
|
|
7686
7720
|
}]
|
|
7687
7721
|
}, "challangeneration-receipt");
|
|
@@ -7699,15 +7733,28 @@ const WrapPaymentComponent = props => {
|
|
|
7699
7733
|
if (chbPermissionLoading) return;
|
|
7700
7734
|
setChbPermissionLoading(true);
|
|
7701
7735
|
try {
|
|
7702
|
-
var _applicationDetails$c,
|
|
7736
|
+
var _applicationDetails$c, _challanDetails$addit, _challanDetails$addit2, _challanDetails$addre, _applicationDetails$A3, _applicationDetails$A4;
|
|
7703
7737
|
const applicationDetails = await Digit.ChallanGenerationService.search({
|
|
7704
7738
|
tenantId,
|
|
7705
7739
|
filters: {
|
|
7706
7740
|
challanNo: consumerCode
|
|
7707
7741
|
}
|
|
7708
7742
|
});
|
|
7709
|
-
const
|
|
7710
|
-
|
|
7743
|
+
const challanDetails = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$c = applicationDetails.challans) === null || _applicationDetails$c === void 0 ? void 0 : _applicationDetails$c[0];
|
|
7744
|
+
const latitude = challanDetails === null || challanDetails === void 0 ? void 0 : (_challanDetails$addit = challanDetails.additionalDetail) === null || _challanDetails$addit === void 0 ? void 0 : _challanDetails$addit.latitude;
|
|
7745
|
+
const longitude = challanDetails === null || challanDetails === void 0 ? void 0 : (_challanDetails$addit2 = challanDetails.additionalDetail) === null || _challanDetails$addit2 === void 0 ? void 0 : _challanDetails$addit2.longitude;
|
|
7746
|
+
const addressFallback = challanDetails === null || challanDetails === void 0 ? void 0 : (_challanDetails$addre = challanDetails.address) === null || _challanDetails$addre === void 0 ? void 0 : _challanDetails$addre.addressLine1;
|
|
7747
|
+
let location = addressFallback;
|
|
7748
|
+
if (latitude && longitude) {
|
|
7749
|
+
try {
|
|
7750
|
+
const geoLocation = await getLocationName(latitude, longitude);
|
|
7751
|
+
if (geoLocation) {
|
|
7752
|
+
location = geoLocation;
|
|
7753
|
+
}
|
|
7754
|
+
} catch (err) {
|
|
7755
|
+
console.warn("Reverse geocoding failed, using address fallback", err);
|
|
7756
|
+
}
|
|
7757
|
+
}
|
|
7711
7758
|
const challan = {
|
|
7712
7759
|
...applicationDetails,
|
|
7713
7760
|
...challanEmpData
|
|
@@ -7716,14 +7763,14 @@ const WrapPaymentComponent = props => {
|
|
|
7716
7763
|
let application = challan;
|
|
7717
7764
|
let fileStoreId = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A3 = applicationDetails.Applications) === null || _applicationDetails$A3 === void 0 ? void 0 : (_applicationDetails$A4 = _applicationDetails$A3[0]) === null || _applicationDetails$A4 === void 0 ? void 0 : _applicationDetails$A4.paymentReceiptFilestoreId;
|
|
7718
7765
|
if (!fileStoreId) {
|
|
7719
|
-
var _payments$
|
|
7766
|
+
var _payments$Payments3;
|
|
7720
7767
|
const payments = await Digit.PaymentService.getReciept(tenantId, business_service, {
|
|
7721
7768
|
receiptNumbers: receiptNumber
|
|
7722
7769
|
});
|
|
7723
7770
|
let response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
7724
7771
|
challan: {
|
|
7725
7772
|
...application,
|
|
7726
|
-
...((payments === null || payments === void 0 ? void 0 : (_payments$
|
|
7773
|
+
...((payments === null || payments === void 0 ? void 0 : (_payments$Payments3 = payments.Payments) === null || _payments$Payments3 === void 0 ? void 0 : _payments$Payments3[0]) || {}),
|
|
7727
7774
|
location
|
|
7728
7775
|
}
|
|
7729
7776
|
}, "challan-notice");
|
|
@@ -7763,13 +7810,13 @@ const WrapPaymentComponent = props => {
|
|
|
7763
7810
|
let fileStoreId = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$h = applicationDetails.hallsBookingApplication) === null || _applicationDetails$h === void 0 ? void 0 : (_applicationDetails$h2 = _applicationDetails$h[0]) === null || _applicationDetails$h2 === void 0 ? void 0 : _applicationDetails$h2.permissionLetterFilestoreId;
|
|
7764
7811
|
const generatePdfKeyForTL = "chb-permissionletter";
|
|
7765
7812
|
if (!fileStoreId) {
|
|
7766
|
-
var _payments$
|
|
7813
|
+
var _payments$Payments4;
|
|
7767
7814
|
const payments = await Digit.PaymentService.getReciept(tenantId, business_service, {
|
|
7768
7815
|
receiptNumbers: receiptNumber
|
|
7769
7816
|
});
|
|
7770
7817
|
const response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
7771
7818
|
Payments: [{
|
|
7772
|
-
...((payments === null || payments === void 0 ? void 0 : (_payments$
|
|
7819
|
+
...((payments === null || payments === void 0 ? void 0 : (_payments$Payments4 = payments.Payments) === null || _payments$Payments4 === void 0 ? void 0 : _payments$Payments4[0]) || {}),
|
|
7773
7820
|
...application
|
|
7774
7821
|
}]
|
|
7775
7822
|
}, generatePdfKeyForTL);
|
|
@@ -7815,13 +7862,13 @@ const WrapPaymentComponent = props => {
|
|
|
7815
7862
|
};
|
|
7816
7863
|
let fileStoreId = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$h3 = applicationDetails.hallsBookingApplication) === null || _applicationDetails$h3 === void 0 ? void 0 : (_applicationDetails$h4 = _applicationDetails$h3[0]) === null || _applicationDetails$h4 === void 0 ? void 0 : _applicationDetails$h4.paymentReceiptFilestoreId;
|
|
7817
7864
|
if (!fileStoreId) {
|
|
7818
|
-
var _payments$
|
|
7865
|
+
var _payments$Payments5, _response, _response2;
|
|
7819
7866
|
let response = {
|
|
7820
7867
|
filestoreIds: [payments === null || payments === void 0 ? void 0 : payments.fileStoreId]
|
|
7821
7868
|
};
|
|
7822
7869
|
response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
7823
7870
|
Payments: [{
|
|
7824
|
-
...((payments === null || payments === void 0 ? void 0 : (_payments$
|
|
7871
|
+
...((payments === null || payments === void 0 ? void 0 : (_payments$Payments5 = payments.Payments) === null || _payments$Payments5 === void 0 ? void 0 : _payments$Payments5[0]) || {}),
|
|
7825
7872
|
...application
|
|
7826
7873
|
}]
|
|
7827
7874
|
}, "chbservice-receipt");
|
|
@@ -7858,13 +7905,13 @@ const WrapPaymentComponent = props => {
|
|
|
7858
7905
|
let application = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A5 = applicationDetails.Applications) === null || _applicationDetails$A5 === void 0 ? void 0 : _applicationDetails$A5[0];
|
|
7859
7906
|
let fileStoreId = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A6 = applicationDetails.Applications) === null || _applicationDetails$A6 === void 0 ? void 0 : (_applicationDetails$A7 = _applicationDetails$A6[0]) === null || _applicationDetails$A7 === void 0 ? void 0 : _applicationDetails$A7.paymentReceiptFilestoreId;
|
|
7860
7907
|
if (!fileStoreId) {
|
|
7861
|
-
var _payments$
|
|
7908
|
+
var _payments$Payments6;
|
|
7862
7909
|
const payments = await Digit.PaymentService.getReciept(tenantId, business_service, {
|
|
7863
7910
|
receiptNumbers: receiptNumber
|
|
7864
7911
|
});
|
|
7865
7912
|
let response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
7866
7913
|
Payments: [{
|
|
7867
|
-
...((payments === null || payments === void 0 ? void 0 : (_payments$
|
|
7914
|
+
...((payments === null || payments === void 0 ? void 0 : (_payments$Payments6 = payments.Payments) === null || _payments$Payments6 === void 0 ? void 0 : _payments$Payments6[0]) || {}),
|
|
7868
7915
|
...application
|
|
7869
7916
|
}]
|
|
7870
7917
|
}, "ndc-receipt");
|
|
@@ -7893,13 +7940,13 @@ const WrapPaymentComponent = props => {
|
|
|
7893
7940
|
let application = new_data;
|
|
7894
7941
|
let fileStoreId = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$B = applicationDetails.BookingApplication) === null || _applicationDetails$B === void 0 ? void 0 : (_applicationDetails$B2 = _applicationDetails$B[0]) === null || _applicationDetails$B2 === void 0 ? void 0 : _applicationDetails$B2.paymentReceiptFilestoreId;
|
|
7895
7942
|
if (!fileStoreId) {
|
|
7896
|
-
var _payments$
|
|
7943
|
+
var _payments$Payments7;
|
|
7897
7944
|
const payments = await Digit.PaymentService.getReciept(tenantId, business_service, {
|
|
7898
7945
|
receiptNumbers: receiptNumber
|
|
7899
7946
|
});
|
|
7900
7947
|
let response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
7901
7948
|
Payments: [{
|
|
7902
|
-
...((payments === null || payments === void 0 ? void 0 : (_payments$
|
|
7949
|
+
...((payments === null || payments === void 0 ? void 0 : (_payments$Payments7 = payments.Payments) === null || _payments$Payments7 === void 0 ? void 0 : _payments$Payments7[0]) || {}),
|
|
7903
7950
|
...application
|
|
7904
7951
|
}]
|
|
7905
7952
|
}, "adv-bill");
|
|
@@ -7927,13 +7974,13 @@ const WrapPaymentComponent = props => {
|
|
|
7927
7974
|
let application = applicationDetails;
|
|
7928
7975
|
let fileStoreId = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$B3 = applicationDetails.BookingApplication) === null || _applicationDetails$B3 === void 0 ? void 0 : (_applicationDetails$B4 = _applicationDetails$B3[0]) === null || _applicationDetails$B4 === void 0 ? void 0 : _applicationDetails$B4.paymentReceiptFilestoreId;
|
|
7929
7976
|
if (!fileStoreId) {
|
|
7930
|
-
var _payments$
|
|
7977
|
+
var _payments$Payments8;
|
|
7931
7978
|
const payments = await Digit.PaymentService.getReciept(tenantId, business_service, {
|
|
7932
7979
|
receiptNumbers: receiptNumber
|
|
7933
7980
|
});
|
|
7934
7981
|
let response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
7935
7982
|
Payments: [{
|
|
7936
|
-
...((payments === null || payments === void 0 ? void 0 : (_payments$
|
|
7983
|
+
...((payments === null || payments === void 0 ? void 0 : (_payments$Payments8 = payments.Payments) === null || _payments$Payments8 === void 0 ? void 0 : _payments$Payments8[0]) || {}),
|
|
7937
7984
|
...application
|
|
7938
7985
|
}]
|
|
7939
7986
|
}, "rentandlease-receipt");
|
|
@@ -7989,7 +8036,7 @@ const WrapPaymentComponent = props => {
|
|
|
7989
8036
|
gap: "4px"
|
|
7990
8037
|
};
|
|
7991
8038
|
const printRecieptNew = async payment => {
|
|
7992
|
-
var _payments$Payments$
|
|
8039
|
+
var _payments$Payments$3;
|
|
7993
8040
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
7994
8041
|
const state = Digit.ULBService.getStateId();
|
|
7995
8042
|
let paymentArray = [];
|
|
@@ -7997,7 +8044,7 @@ const WrapPaymentComponent = props => {
|
|
|
7997
8044
|
receiptNumbers: payment.Payments[0].paymentDetails[0].receiptNumber
|
|
7998
8045
|
});
|
|
7999
8046
|
let response = {
|
|
8000
|
-
filestoreIds: [(_payments$Payments$
|
|
8047
|
+
filestoreIds: [(_payments$Payments$3 = payments.Payments[0]) === null || _payments$Payments$3 === void 0 ? void 0 : _payments$Payments$3.fileStoreId]
|
|
8001
8048
|
};
|
|
8002
8049
|
{
|
|
8003
8050
|
let assessmentYear = "",
|
|
@@ -8495,6 +8542,36 @@ const WrapPaymentComponent = props => {
|
|
|
8495
8542
|
marginTop: "10px",
|
|
8496
8543
|
marginLeft: "100px"
|
|
8497
8544
|
}
|
|
8545
|
+
}))) : null, business_service == "pet-services" ? /*#__PURE__*/React.createElement("div", {
|
|
8546
|
+
style: {
|
|
8547
|
+
display: "flex",
|
|
8548
|
+
alignItems: "center",
|
|
8549
|
+
justifyContent: "space-between",
|
|
8550
|
+
flexWrap: "wrap",
|
|
8551
|
+
gap: "20px"
|
|
8552
|
+
}
|
|
8553
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
8554
|
+
style: IconWrapperStyle,
|
|
8555
|
+
onClick: printing ? undefined : printPetReceipt
|
|
8556
|
+
}, printing ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("svg", {
|
|
8557
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8558
|
+
height: "24px",
|
|
8559
|
+
viewBox: "0 0 24 24",
|
|
8560
|
+
width: "24px",
|
|
8561
|
+
fill: "#a82227"
|
|
8562
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
8563
|
+
d: "M0 0h24v24H0V0z",
|
|
8564
|
+
fill: "none"
|
|
8565
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
8566
|
+
d: "M19 9h-4V3H9v6H5l7 7 7-7zm-8 2V5h2v6h1.17L12 13.17 9.83 11H11zm-6 7h14v2H5z"
|
|
8567
|
+
})), t("CHB_FEE_RECEIPT"))), business_service == "pet-services" && /*#__PURE__*/React.createElement(Link, {
|
|
8568
|
+
to: `/digit-ui/citizen`
|
|
8569
|
+
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
8570
|
+
label: t("CORE_COMMON_GO_TO_HOME"),
|
|
8571
|
+
style: {
|
|
8572
|
+
marginTop: "10px",
|
|
8573
|
+
marginLeft: "100px"
|
|
8574
|
+
}
|
|
8498
8575
|
}))) : null, business_service == "sv-services" && /*#__PURE__*/React.createElement(Link, {
|
|
8499
8576
|
to: `/digit-ui/citizen`
|
|
8500
8577
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
@@ -8531,7 +8608,7 @@ const WrapPaymentComponent = props => {
|
|
|
8531
8608
|
to: `/digit-ui/citizen`
|
|
8532
8609
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
8533
8610
|
label: t("CORE_COMMON_GO_TO_HOME")
|
|
8534
|
-
}))) : !(business_service === "adv-services" || business_service === "chb-services" || business_service === "NDC" || business_service === "Challan_Generation" || business_service === "rl-services") && /*#__PURE__*/React.createElement("div", {
|
|
8611
|
+
}))) : !(business_service === "adv-services" || business_service === "pet-services" || business_service === "chb-services" || business_service === "NDC" || business_service === "Challan_Generation" || business_service === "rl-services") && /*#__PURE__*/React.createElement("div", {
|
|
8535
8612
|
style: {
|
|
8536
8613
|
display: "flex",
|
|
8537
8614
|
justifyContent: "space-between",
|
|
@@ -8539,13 +8616,9 @@ const WrapPaymentComponent = props => {
|
|
|
8539
8616
|
flexWrap: "wrap",
|
|
8540
8617
|
gap: "20px"
|
|
8541
8618
|
}
|
|
8542
|
-
}, printing ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(SubmitBar, {
|
|
8619
|
+
}, business_service !== "TL" && (printing ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(SubmitBar, {
|
|
8543
8620
|
onSubmit: printReciept,
|
|
8544
8621
|
label: t("CS_DOWNLOAD_RECEIPT")
|
|
8545
|
-
}), business_service === "TL" && /*#__PURE__*/React.createElement(Link, {
|
|
8546
|
-
to: `/digit-ui/citizen`
|
|
8547
|
-
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
8548
|
-
label: t("CORE_COMMON_GO_TO_HOME")
|
|
8549
8622
|
})), /*#__PURE__*/React.createElement(Link, {
|
|
8550
8623
|
to: `/digit-ui/citizen`
|
|
8551
8624
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
@@ -11013,7 +11086,7 @@ const BillDetailsFormConfig = (props, t) => ({
|
|
|
11013
11086
|
}
|
|
11014
11087
|
}]
|
|
11015
11088
|
}],
|
|
11016
|
-
|
|
11089
|
+
WSReconnection: [{
|
|
11017
11090
|
head: t("COMMON_PAY_SCREEN_HEADER"),
|
|
11018
11091
|
body: [{
|
|
11019
11092
|
withoutLabel: true,
|
|
@@ -11031,7 +11104,7 @@ const BillDetailsFormConfig = (props, t) => ({
|
|
|
11031
11104
|
}
|
|
11032
11105
|
}]
|
|
11033
11106
|
}],
|
|
11034
|
-
|
|
11107
|
+
SWReconnection: [{
|
|
11035
11108
|
head: t("COMMON_PAY_SCREEN_HEADER"),
|
|
11036
11109
|
body: [{
|
|
11037
11110
|
withoutLabel: true,
|
|
@@ -11295,11 +11368,15 @@ const BillDetails$1 = ({
|
|
|
11295
11368
|
if (typeof key === "function") acc = key(acc);else acc = acc[key];
|
|
11296
11369
|
return acc;
|
|
11297
11370
|
}, bill);
|
|
11298
|
-
return /*#__PURE__*/React.createElement(Row, {
|
|
11371
|
+
return /*#__PURE__*/React.createElement(Row, Object.assign({
|
|
11299
11372
|
key: index + "bill",
|
|
11300
11373
|
label: t(obj.keyValue),
|
|
11301
11374
|
text: value
|
|
11302
|
-
}
|
|
11375
|
+
}, isTL ? {
|
|
11376
|
+
textStyle: {
|
|
11377
|
+
textAlign: "right"
|
|
11378
|
+
}
|
|
11379
|
+
} : {}));
|
|
11303
11380
|
})), checkFSM ? /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
|
|
11304
11381
|
label: t("ES_PAYMENT_DETAILS_AMOUNT_PER_TRIP"),
|
|
11305
11382
|
textStyle: {
|
|
@@ -11340,11 +11417,18 @@ const BillDetails$1 = ({
|
|
|
11340
11417
|
}, /*#__PURE__*/React.createElement(Row, {
|
|
11341
11418
|
label: t("ES_PAYMENT_TAXHEADS"),
|
|
11342
11419
|
textStyle: {
|
|
11343
|
-
fontWeight: "bold"
|
|
11420
|
+
fontWeight: "bold",
|
|
11421
|
+
...(isTL ? {
|
|
11422
|
+
textAlign: "right",
|
|
11423
|
+
maxWidth: "none",
|
|
11424
|
+
width: "40%"
|
|
11425
|
+
} : {})
|
|
11344
11426
|
},
|
|
11345
11427
|
text: t("ES_PAYMENT_AMOUNT")
|
|
11346
11428
|
}), /*#__PURE__*/React.createElement("hr", {
|
|
11347
|
-
style: {
|
|
11429
|
+
style: isTL ? {
|
|
11430
|
+
width: "100%"
|
|
11431
|
+
} : {
|
|
11348
11432
|
width: "40%"
|
|
11349
11433
|
},
|
|
11350
11434
|
className: "underline"
|
|
@@ -11355,7 +11439,11 @@ const BillDetails$1 = ({
|
|
|
11355
11439
|
labelStyle: {
|
|
11356
11440
|
fontWeight: "normal"
|
|
11357
11441
|
},
|
|
11358
|
-
textStyle: {
|
|
11442
|
+
textStyle: isTL ? {
|
|
11443
|
+
textAlign: "right",
|
|
11444
|
+
maxWidth: "none",
|
|
11445
|
+
width: "40%"
|
|
11446
|
+
} : {
|
|
11359
11447
|
textAlign: "right",
|
|
11360
11448
|
maxWidth: "100px"
|
|
11361
11449
|
},
|
|
@@ -11366,20 +11454,31 @@ const BillDetails$1 = ({
|
|
|
11366
11454
|
labelStyle: {
|
|
11367
11455
|
fontWeight: "normal"
|
|
11368
11456
|
},
|
|
11369
|
-
textStyle: {
|
|
11457
|
+
textStyle: isTL ? {
|
|
11458
|
+
textAlign: "right",
|
|
11459
|
+
maxWidth: "none",
|
|
11460
|
+
width: "40%"
|
|
11461
|
+
} : {
|
|
11370
11462
|
textAlign: "right",
|
|
11371
11463
|
maxWidth: "100px"
|
|
11372
11464
|
},
|
|
11373
11465
|
label: t("COMMON_ARREARS"),
|
|
11374
11466
|
text: "₹ " + (arrears === null || arrears === void 0 ? void 0 : (_arrears$toFixed2 = arrears.toFixed) === null || _arrears$toFixed2 === void 0 ? void 0 : _arrears$toFixed2.call(arrears, 2)) || Number(0).toFixed(2)
|
|
11375
11467
|
}) : null, /*#__PURE__*/React.createElement("hr", {
|
|
11376
|
-
style: {
|
|
11468
|
+
style: isTL ? {
|
|
11469
|
+
width: "100%"
|
|
11470
|
+
} : {
|
|
11377
11471
|
width: "40%"
|
|
11378
11472
|
},
|
|
11379
11473
|
className: "underline"
|
|
11380
11474
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
11381
11475
|
label: t("CS_PAYMENT_TOTAL_AMOUNT"),
|
|
11382
|
-
textStyle: {
|
|
11476
|
+
textStyle: isTL ? {
|
|
11477
|
+
fontWeight: "bold",
|
|
11478
|
+
textAlign: "right",
|
|
11479
|
+
maxWidth: "none",
|
|
11480
|
+
width: "40%"
|
|
11481
|
+
} : {
|
|
11383
11482
|
fontWeight: "bold",
|
|
11384
11483
|
textAlign: "right",
|
|
11385
11484
|
maxWidth: "100px"
|
|
@@ -11534,6 +11633,7 @@ const CollectPayment = props => {
|
|
|
11534
11633
|
} = useParams();
|
|
11535
11634
|
console.log("businessService", businessService);
|
|
11536
11635
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
11636
|
+
const location = useLocation();
|
|
11537
11637
|
const search = useLocation().search;
|
|
11538
11638
|
if (window.location.href.includes("ISWSAPP")) consumerCode = new URLSearchParams(search).get("applicationNumber");
|
|
11539
11639
|
if (window.location.href.includes("ISWSCON") || ModuleWorkflow === "WS") consumerCode = decodeURIComponent(consumerCode);
|
|
@@ -11556,6 +11656,7 @@ const CollectPayment = props => {
|
|
|
11556
11656
|
enabled: businessService !== null && businessService !== void 0 && (_businessService$toUp = businessService.toUpperCase()) !== null && _businessService$toUp !== void 0 && _businessService$toUp.includes("FSM") ? true : false
|
|
11557
11657
|
});
|
|
11558
11658
|
const advanceBill = applicationData === null || applicationData === void 0 ? void 0 : applicationData.advanceAmount;
|
|
11659
|
+
const [formState, setFormState] = useState({});
|
|
11559
11660
|
const {
|
|
11560
11661
|
cardConfig
|
|
11561
11662
|
} = useCardPaymentDetails(props, t);
|
|
@@ -11580,8 +11681,10 @@ const CollectPayment = props => {
|
|
|
11580
11681
|
const {
|
|
11581
11682
|
qrConfig
|
|
11582
11683
|
} = useQRDetails(props, t);
|
|
11583
|
-
const [formState, setFormState] = useState({});
|
|
11584
11684
|
const [toast, setToast] = useState(null);
|
|
11685
|
+
const isChallanGeneration = location.pathname.includes("Challan_Generation");
|
|
11686
|
+
const isPetService = location.pathname.includes("pet-services");
|
|
11687
|
+
console.log("isPetService", isPetService);
|
|
11585
11688
|
useEffect(() => {
|
|
11586
11689
|
if (paymentdetails !== null && paymentdetails !== void 0 && paymentdetails.Bill && paymentdetails.Bill.length === 0) {
|
|
11587
11690
|
setToast({
|
|
@@ -11596,25 +11699,28 @@ const CollectPayment = props => {
|
|
|
11596
11699
|
}, {
|
|
11597
11700
|
code: "CHEQUE",
|
|
11598
11701
|
label: t("COMMON_MASTERS_PAYMENTMODE_CHEQUE")
|
|
11599
|
-
}, {
|
|
11702
|
+
}, ...(!(isChallanGeneration || isPetService) ? [{
|
|
11600
11703
|
code: "CARD",
|
|
11601
11704
|
label: t("COMMON_MASTERS_PAYMENTMODE_CREDIT/DEBIT CARD")
|
|
11602
|
-
}, {
|
|
11705
|
+
}] : []), {
|
|
11603
11706
|
code: "DD",
|
|
11604
11707
|
label: "Demand Draft"
|
|
11605
|
-
}, {
|
|
11708
|
+
}, ...(isChallanGeneration || isPetService ? [{
|
|
11709
|
+
code: "ONLINE",
|
|
11710
|
+
label: "Online"
|
|
11711
|
+
}] : []), ...(!(isChallanGeneration || isPetService) ? [{
|
|
11606
11712
|
code: "OFFLINE_NEFT",
|
|
11607
11713
|
label: "NEFT"
|
|
11608
|
-
}, {
|
|
11714
|
+
}] : []), ...(!(isChallanGeneration || isPetService) ? [{
|
|
11609
11715
|
code: "OFFLINE_RTGS",
|
|
11610
11716
|
label: "RTGS"
|
|
11611
|
-
}, {
|
|
11717
|
+
}] : []), ...(!(isChallanGeneration || isPetService) ? [{
|
|
11612
11718
|
code: "POSTAL_ORDER",
|
|
11613
11719
|
label: "Postal Order"
|
|
11614
|
-
}, {
|
|
11720
|
+
}] : []), ...(!(isChallanGeneration || isPetService) ? [{
|
|
11615
11721
|
code: "QR_CODE",
|
|
11616
11722
|
label: "QR Code"
|
|
11617
|
-
}];
|
|
11723
|
+
}] : [])];
|
|
11618
11724
|
const formConfigMap = {
|
|
11619
11725
|
CHEQUE: chequeConfig,
|
|
11620
11726
|
CARD: cardConfig,
|
|
@@ -11641,7 +11747,11 @@ const CollectPayment = props => {
|
|
|
11641
11747
|
name: t("COMMON_OWNER")
|
|
11642
11748
|
});
|
|
11643
11749
|
const onSubmit = async data => {
|
|
11644
|
-
var _data$amount, _data$amount6, _data$amount7, _data$
|
|
11750
|
+
var _data$paymentMode, _data$amount, _data$amount6, _data$amount7, _data$paymentMode2, _data$paymentModeDeta, _recieptRequest$Payme2, _recieptRequest$Payme3, _recieptRequest$Payme4, _recieptRequest$Payme5, _recieptRequest$Payme6;
|
|
11751
|
+
if ((data === null || data === void 0 ? void 0 : (_data$paymentMode = data.paymentMode) === null || _data$paymentMode === void 0 ? void 0 : _data$paymentMode.code) == "ONLINE") {
|
|
11752
|
+
history.push(`/digit-ui/employee/payment/challan/collect/${businessService}/${consumerCode}/${tenantId}?tenantId=${tenantId}`);
|
|
11753
|
+
return;
|
|
11754
|
+
}
|
|
11645
11755
|
bill.totalAmount = Math.round(bill.totalAmount);
|
|
11646
11756
|
data.paidBy = data.paidBy.code;
|
|
11647
11757
|
if (BillDetailsFormConfig({
|
|
@@ -11691,7 +11801,7 @@ const CollectPayment = props => {
|
|
|
11691
11801
|
if (data.ManualRecieptDetails.manualReceiptNumber) {
|
|
11692
11802
|
recieptRequest.Payment.paymentDetails[0].manualReceiptNumber = ManualRecieptDetails.manualReceiptNumber;
|
|
11693
11803
|
}
|
|
11694
|
-
recieptRequest.Payment.paymentMode = data === null || data === void 0 ? void 0 : (_data$
|
|
11804
|
+
recieptRequest.Payment.paymentMode = data === null || data === void 0 ? void 0 : (_data$paymentMode2 = data.paymentMode) === null || _data$paymentMode2 === void 0 ? void 0 : _data$paymentMode2.code;
|
|
11695
11805
|
if (data.paymentModeDetails) {
|
|
11696
11806
|
var _recieptRequest$Payme;
|
|
11697
11807
|
recieptRequest.Payment = {
|
|
@@ -11863,7 +11973,7 @@ const CollectPayment = props => {
|
|
|
11863
11973
|
});
|
|
11864
11974
|
console.log("ModuleWorkflow", ModuleWorkflow);
|
|
11865
11975
|
const getFormConfig = () => {
|
|
11866
|
-
var _formState$paymentMod,
|
|
11976
|
+
var _formState$paymentMod, _formState$paymentMod2;
|
|
11867
11977
|
const isGCService = businessService === null || businessService === void 0 ? void 0 : businessService.startsWith("GC");
|
|
11868
11978
|
if (BillDetailsFormConfig({
|
|
11869
11979
|
consumerCode,
|
|
@@ -11872,7 +11982,9 @@ const CollectPayment = props => {
|
|
|
11872
11982
|
config.splice(0, 1);
|
|
11873
11983
|
}
|
|
11874
11984
|
let conf = config.concat(formConfigMap[formState === null || formState === void 0 ? void 0 : (_formState$paymentMod = formState.paymentMode) === null || _formState$paymentMod === void 0 ? void 0 : _formState$paymentMod.code] || []);
|
|
11875
|
-
|
|
11985
|
+
if ((formState === null || formState === void 0 ? void 0 : (_formState$paymentMod2 = formState.paymentMode) === null || _formState$paymentMod2 === void 0 ? void 0 : _formState$paymentMod2.code) !== "ONLINE") {
|
|
11986
|
+
conf = conf.concat(cashConfig);
|
|
11987
|
+
}
|
|
11876
11988
|
return BillDetailsFormConfig({
|
|
11877
11989
|
consumerCode,
|
|
11878
11990
|
businessService
|
|
@@ -11917,87 +12029,429 @@ const CollectPayment = props => {
|
|
|
11917
12029
|
}));
|
|
11918
12030
|
};
|
|
11919
12031
|
|
|
11920
|
-
|
|
11921
|
-
|
|
11922
|
-
|
|
11923
|
-
|
|
11924
|
-
|
|
11925
|
-
|
|
11926
|
-
|
|
11927
|
-
|
|
11928
|
-
|
|
11929
|
-
|
|
11930
|
-
|
|
11931
|
-
|
|
11932
|
-
|
|
11933
|
-
|
|
11934
|
-
|
|
11935
|
-
|
|
11936
|
-
|
|
11937
|
-
|
|
11938
|
-
|
|
11939
|
-
|
|
11940
|
-
|
|
11941
|
-
|
|
11942
|
-
}
|
|
11943
|
-
|
|
11944
|
-
|
|
11945
|
-
|
|
11946
|
-
|
|
11947
|
-
|
|
12032
|
+
const SelectPaymentType$2 = props => {
|
|
12033
|
+
var _menuList$PAYMENT, _menuList$PAYMENT$Pay, _menuList$PAYMENT2, _menuList$PAYMENT2$Pa, _menuList$PAYMENT2$Pa2;
|
|
12034
|
+
const {
|
|
12035
|
+
state = {}
|
|
12036
|
+
} = useLocation();
|
|
12037
|
+
const userInfo = Digit.UserService.getUser();
|
|
12038
|
+
const [showToast, setShowToast] = useState(null);
|
|
12039
|
+
const [showOwnerToast, setShowOwnerToast] = useState(null);
|
|
12040
|
+
const {
|
|
12041
|
+
tenantId: __tenantId,
|
|
12042
|
+
authorization,
|
|
12043
|
+
workflow: wrkflow,
|
|
12044
|
+
consumerCode: connectionNo
|
|
12045
|
+
} = Digit.Hooks.useQueryParams();
|
|
12046
|
+
const paymentAmount = state === null || state === void 0 ? void 0 : state.paymentAmount;
|
|
12047
|
+
const {
|
|
12048
|
+
t
|
|
12049
|
+
} = useTranslation();
|
|
12050
|
+
const history = useHistory();
|
|
12051
|
+
const {
|
|
12052
|
+
pathname,
|
|
12053
|
+
search
|
|
12054
|
+
} = useLocation();
|
|
12055
|
+
let {
|
|
12056
|
+
consumerCode,
|
|
12057
|
+
businessService
|
|
12058
|
+
} = useParams();
|
|
12059
|
+
const tenantId = (state === null || state === void 0 ? void 0 : state.tenantId) || __tenantId || Digit.ULBService.getCurrentTenantId();
|
|
12060
|
+
const stateTenant = Digit.ULBService.getStateId();
|
|
12061
|
+
const {
|
|
12062
|
+
control,
|
|
12063
|
+
handleSubmit,
|
|
12064
|
+
setValue
|
|
12065
|
+
} = useForm();
|
|
12066
|
+
const {
|
|
12067
|
+
data: menuList,
|
|
12068
|
+
isLoading
|
|
12069
|
+
} = Digit.Hooks.useCustomMDMS(tenantId, "PAYMENT", [{
|
|
12070
|
+
name: "PaymentGateway"
|
|
12071
|
+
}]);
|
|
12072
|
+
console.log("menuList", menuList);
|
|
12073
|
+
const [isPaymentLoading, setPaymentLoading] = useState(false);
|
|
12074
|
+
const {
|
|
12075
|
+
data: paymentdetails,
|
|
12076
|
+
isLoading: paymentLoading
|
|
12077
|
+
} = Digit.Hooks.useFetchPayment({
|
|
12078
|
+
tenantId: tenantId,
|
|
12079
|
+
consumerCode: wrkflow === "WNS" ? connectionNo : consumerCode,
|
|
12080
|
+
businessService
|
|
12081
|
+
}, {});
|
|
12082
|
+
if (window.location.href.includes("ISWSCON") || wrkflow === "WNS") consumerCode = decodeURIComponent(consumerCode);
|
|
12083
|
+
if (wrkflow === "WNS") consumerCode = stringReplaceAll(consumerCode, "+", "/");
|
|
12084
|
+
useEffect(() => {
|
|
12085
|
+
if (paymentdetails !== null && paymentdetails !== void 0 && paymentdetails.Bill && paymentdetails.Bill.length == 0) {
|
|
12086
|
+
setShowToast({
|
|
12087
|
+
key: true,
|
|
12088
|
+
label: "CS_BILL_NOT_FOUND"
|
|
12089
|
+
});
|
|
11948
12090
|
}
|
|
11949
|
-
|
|
11950
|
-
|
|
11951
|
-
|
|
11952
|
-
|
|
11953
|
-
|
|
11954
|
-
|
|
11955
|
-
|
|
11956
|
-
|
|
11957
|
-
|
|
11958
|
-
|
|
11959
|
-
|
|
11960
|
-
|
|
11961
|
-
|
|
11962
|
-
|
|
11963
|
-
|
|
11964
|
-
|
|
11965
|
-
|
|
11966
|
-
|
|
11967
|
-
|
|
11968
|
-
|
|
11969
|
-
|
|
11970
|
-
|
|
11971
|
-
|
|
11972
|
-
|
|
11973
|
-
|
|
11974
|
-
|
|
11975
|
-
|
|
11976
|
-
|
|
11977
|
-
|
|
11978
|
-
|
|
11979
|
-
|
|
11980
|
-
|
|
11981
|
-
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
|
|
11986
|
-
|
|
11987
|
-
|
|
11988
|
-
|
|
11989
|
-
|
|
11990
|
-
|
|
11991
|
-
|
|
11992
|
-
|
|
11993
|
-
|
|
11994
|
-
|
|
11995
|
-
|
|
11996
|
-
|
|
11997
|
-
|
|
11998
|
-
|
|
11999
|
-
|
|
12000
|
-
|
|
12091
|
+
}, [paymentdetails]);
|
|
12092
|
+
useEffect(() => {
|
|
12093
|
+
localStorage.setItem("BillPaymentEnabled", "true");
|
|
12094
|
+
}, []);
|
|
12095
|
+
const {
|
|
12096
|
+
name,
|
|
12097
|
+
mobileNumber
|
|
12098
|
+
} = state;
|
|
12099
|
+
const billDetails = paymentdetails !== null && paymentdetails !== void 0 && paymentdetails.Bill ? paymentdetails === null || paymentdetails === void 0 ? void 0 : paymentdetails.Bill[0] : {};
|
|
12100
|
+
console.log(billDetails, "BILL");
|
|
12101
|
+
const userOptions = ["OWNER", "OTHER"];
|
|
12102
|
+
const onSubmit = async d => {
|
|
12103
|
+
if (!(d !== null && d !== void 0 && d.name) || (d === null || d === void 0 ? void 0 : d.name.trim()) === "") {
|
|
12104
|
+
setShowOwnerToast({
|
|
12105
|
+
key: true,
|
|
12106
|
+
label: t("PAYMENT_NAME_MANDATORY_MESSAGE")
|
|
12107
|
+
});
|
|
12108
|
+
return;
|
|
12109
|
+
}
|
|
12110
|
+
const mobileRegex = /^[6-9]\d{9}$/;
|
|
12111
|
+
if (!(d !== null && d !== void 0 && d.mobileNumber) || (d === null || d === void 0 ? void 0 : d.mobileNumber.trim()) === "") {
|
|
12112
|
+
setShowOwnerToast({
|
|
12113
|
+
key: true,
|
|
12114
|
+
label: t("PAYMENT_MOBILE_NUMBER_MANDATORY_MESSAGE")
|
|
12115
|
+
});
|
|
12116
|
+
return;
|
|
12117
|
+
} else if (!mobileRegex.test(d.mobileNumber)) {
|
|
12118
|
+
setShowOwnerToast({
|
|
12119
|
+
key: true,
|
|
12120
|
+
label: t("ERR_INVALID_MOBILE")
|
|
12121
|
+
});
|
|
12122
|
+
return;
|
|
12123
|
+
}
|
|
12124
|
+
setPaymentLoading(true);
|
|
12125
|
+
const baseURL = document.location.origin;
|
|
12126
|
+
console.log("BASEURLINPAYMENT", baseURL);
|
|
12127
|
+
const filterData = {
|
|
12128
|
+
Transaction: {
|
|
12129
|
+
tenantId: billDetails === null || billDetails === void 0 ? void 0 : billDetails.tenantId,
|
|
12130
|
+
txnAmount: paymentAmount || billDetails.totalAmount,
|
|
12131
|
+
module: businessService,
|
|
12132
|
+
businessService: businessService,
|
|
12133
|
+
billId: billDetails.id,
|
|
12134
|
+
consumerCode: consumerCode,
|
|
12135
|
+
productInfo: "Common Payment",
|
|
12136
|
+
gateway: d === null || d === void 0 ? void 0 : d.paymentType,
|
|
12137
|
+
taxAndPayments: [{
|
|
12138
|
+
taxAmount: paymentAmount || billDetails.totalAmount,
|
|
12139
|
+
billId: billDetails.id,
|
|
12140
|
+
amountPaid: paymentAmount || billDetails.totalAmount,
|
|
12141
|
+
businessService: businessService
|
|
12142
|
+
}],
|
|
12143
|
+
user: {
|
|
12144
|
+
name: d === null || d === void 0 ? void 0 : d.name,
|
|
12145
|
+
mobileNumber: d === null || d === void 0 ? void 0 : d.mobileNumber,
|
|
12146
|
+
tenantId: billDetails === null || billDetails === void 0 ? void 0 : billDetails.tenantId
|
|
12147
|
+
},
|
|
12148
|
+
callbackUrl: `${baseURL}/digit-ui/employee/payment/challan/success/${businessService}/${consumerCode}`,
|
|
12149
|
+
additionalDetails: {
|
|
12150
|
+
isWhatsapp: false,
|
|
12151
|
+
paidBy: d === null || d === void 0 ? void 0 : d.paidBy
|
|
12152
|
+
}
|
|
12153
|
+
}
|
|
12154
|
+
};
|
|
12155
|
+
console.log("coming here", filterData);
|
|
12156
|
+
try {
|
|
12157
|
+
const data = await Digit.PaymentService.createCitizenReciept(billDetails === null || billDetails === void 0 ? void 0 : billDetails.tenantId, filterData);
|
|
12158
|
+
console.log("data=========", data);
|
|
12159
|
+
if (paymentAmount === 0 || billDetails.totalAmount === 0) {
|
|
12160
|
+
var _data$ResponseInfo;
|
|
12161
|
+
setPaymentLoading(false);
|
|
12162
|
+
if ((data === null || data === void 0 ? void 0 : (_data$ResponseInfo = data.ResponseInfo) === null || _data$ResponseInfo === void 0 ? void 0 : _data$ResponseInfo.status) === "SUCCESSFUL") {
|
|
12163
|
+
var _data$Transaction;
|
|
12164
|
+
window.location.href = data === null || data === void 0 ? void 0 : (_data$Transaction = data.Transaction) === null || _data$Transaction === void 0 ? void 0 : _data$Transaction.callbackUrl;
|
|
12165
|
+
} else {
|
|
12166
|
+
window.location.href = "/digit-ui/citizen/payment/failure";
|
|
12167
|
+
}
|
|
12168
|
+
return;
|
|
12169
|
+
}
|
|
12170
|
+
if ((d === null || d === void 0 ? void 0 : d.paymentType) === gatewayType.RAZORPAY) {
|
|
12171
|
+
displayRazorpay(data);
|
|
12172
|
+
} else {
|
|
12173
|
+
setPaymentLoading(false);
|
|
12174
|
+
}
|
|
12175
|
+
} catch (error) {
|
|
12176
|
+
var _error$response, _error$response$data, _error$response$data$;
|
|
12177
|
+
console.log("error", error);
|
|
12178
|
+
let messageToShow = "CS_PAYMENT_UNKNOWN_ERROR_ON_SERVER";
|
|
12179
|
+
if ((_error$response = error.response) !== null && _error$response !== void 0 && (_error$response$data = _error$response.data) !== null && _error$response$data !== void 0 && (_error$response$data$ = _error$response$data.Errors) !== null && _error$response$data$ !== void 0 && _error$response$data$[0]) {
|
|
12180
|
+
var _error$response2, _error$response2$data, _error$response2$data2;
|
|
12181
|
+
const {
|
|
12182
|
+
code,
|
|
12183
|
+
message
|
|
12184
|
+
} = (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : (_error$response2$data = _error$response2.data) === null || _error$response2$data === void 0 ? void 0 : (_error$response2$data2 = _error$response2$data.Errors) === null || _error$response2$data2 === void 0 ? void 0 : _error$response2$data2[0];
|
|
12185
|
+
messageToShow = code;
|
|
12186
|
+
}
|
|
12187
|
+
setPaymentLoading(false);
|
|
12188
|
+
setShowToast({
|
|
12189
|
+
key: true,
|
|
12190
|
+
label: t(messageToShow)
|
|
12191
|
+
});
|
|
12192
|
+
}
|
|
12193
|
+
};
|
|
12194
|
+
async function displayRazorpay(getOrderData) {
|
|
12195
|
+
const res = await loadScript(RAZORPAY_LOADSCRIPT_URL);
|
|
12196
|
+
if (!res) {
|
|
12197
|
+
alert("Razorpay SDK failed to load. Are you online?");
|
|
12198
|
+
return;
|
|
12199
|
+
}
|
|
12200
|
+
function getQueryVariable(variable) {
|
|
12201
|
+
const query = lodash.get(getOrderData, TRANSACTION_REDIRECTURL);
|
|
12202
|
+
var vars = query.split("&");
|
|
12203
|
+
for (var i = 0; i < vars.length; i++) {
|
|
12204
|
+
var pair = vars[i].split("=");
|
|
12205
|
+
if (pair[0] == variable) {
|
|
12206
|
+
return pair[1];
|
|
12207
|
+
}
|
|
12208
|
+
}
|
|
12209
|
+
return false;
|
|
12210
|
+
}
|
|
12211
|
+
const options = {
|
|
12212
|
+
key: getQueryVariable(MERCHENT_KEY),
|
|
12213
|
+
amount: lodash.get(getOrderData, TRANSACTION_AMMOUNT) * 100,
|
|
12214
|
+
name: POPUP_DIPSPLAY_NAME,
|
|
12215
|
+
description: lodash.get(getOrderData, TRANSACTION_BUSINESSSERVICE) + " Charge Collection",
|
|
12216
|
+
image: POPUP_DIPSPLAY_IMAGE,
|
|
12217
|
+
order_id: getQueryVariable(ORDER_ID),
|
|
12218
|
+
handler: async function (response) {
|
|
12219
|
+
const data = {
|
|
12220
|
+
razorpayPaymentId: response.razorpay_payment_id,
|
|
12221
|
+
razorpayOrderId: response.razorpay_order_id,
|
|
12222
|
+
razorpaySignature: response.razorpay_signature
|
|
12223
|
+
};
|
|
12224
|
+
window.location = lodash.get(getOrderData, TRANSACTION_CALLBACKURL) + RAZORPAY_CALLBACK_URL_KEYS.PAYMENT_ID + data.razorpayPaymentId + RAZORPAY_CALLBACK_URL_KEYS.ORDER_ID + data.razorpayOrderId + RAZORPAY_CALLBACK_URL_KEYS.SIGNATURE + data.razorpaySignature;
|
|
12225
|
+
},
|
|
12226
|
+
prefill: {
|
|
12227
|
+
name: lodash.get(getOrderData, TRANSACTION_USERNAME),
|
|
12228
|
+
email: lodash.get(getOrderData, TRANSACTION_USER_EMAIL),
|
|
12229
|
+
contact: lodash.get(getOrderData, TRANSACTION_USER_MOBILE)
|
|
12230
|
+
},
|
|
12231
|
+
theme: {
|
|
12232
|
+
color: "#61dafb"
|
|
12233
|
+
}
|
|
12234
|
+
};
|
|
12235
|
+
const paymentObject = new window.Razorpay(options);
|
|
12236
|
+
setPaymentLoading(false);
|
|
12237
|
+
paymentObject.open();
|
|
12238
|
+
}
|
|
12239
|
+
function loadScript(src) {
|
|
12240
|
+
return new Promise(resolve => {
|
|
12241
|
+
const script = document.createElement("script");
|
|
12242
|
+
script.src = src;
|
|
12243
|
+
script.onload = () => {
|
|
12244
|
+
resolve(true);
|
|
12245
|
+
};
|
|
12246
|
+
script.onerror = () => {
|
|
12247
|
+
resolve(false);
|
|
12248
|
+
};
|
|
12249
|
+
document.body.appendChild(script);
|
|
12250
|
+
});
|
|
12251
|
+
}
|
|
12252
|
+
if (authorization === "true" && !userInfo.access_token) {
|
|
12253
|
+
localStorage.clear();
|
|
12254
|
+
sessionStorage.clear();
|
|
12255
|
+
window.location.href = `/digit-ui/citizen/login?from=${encodeURIComponent(pathname + search)}`;
|
|
12256
|
+
}
|
|
12257
|
+
if (paymentLoading || isPaymentLoading || isLoading) {
|
|
12258
|
+
window.scrollTo({
|
|
12259
|
+
top: 0,
|
|
12260
|
+
behavior: "smooth"
|
|
12261
|
+
});
|
|
12262
|
+
return /*#__PURE__*/React.createElement(Loader, null);
|
|
12263
|
+
}
|
|
12264
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("form", {
|
|
12265
|
+
style: {
|
|
12266
|
+
padding: "20px"
|
|
12267
|
+
},
|
|
12268
|
+
onSubmit: handleSubmit(onSubmit)
|
|
12269
|
+
}, /*#__PURE__*/React.createElement(Header, null, t("PAYMENT_CS_HEADER")), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", {
|
|
12270
|
+
className: "payment-amount-info",
|
|
12271
|
+
style: {
|
|
12272
|
+
marginBottom: "26px"
|
|
12273
|
+
}
|
|
12274
|
+
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12275
|
+
className: "dark"
|
|
12276
|
+
}, t("PAYMENT_CS_TOTAL_AMOUNT_DUE")), /*#__PURE__*/React.createElement(CardSectionHeader, null, " ", "\u20B9 ", paymentAmount !== undefined ? Number(paymentAmount).toFixed(2) : Number(billDetails === null || billDetails === void 0 ? void 0 : billDetails.totalAmount).toFixed(2))), /*#__PURE__*/React.createElement(CardLabel, null, t("PAYMENT_CS_SELECT_METHOD")), (menuList === null || menuList === void 0 ? void 0 : (_menuList$PAYMENT = menuList.PAYMENT) === null || _menuList$PAYMENT === void 0 ? void 0 : (_menuList$PAYMENT$Pay = _menuList$PAYMENT.PaymentGateway) === null || _menuList$PAYMENT$Pay === void 0 ? void 0 : _menuList$PAYMENT$Pay.length) && /*#__PURE__*/React.createElement(Controller, {
|
|
12277
|
+
name: "paymentType",
|
|
12278
|
+
defaultValue: menuList === null || menuList === void 0 ? void 0 : (_menuList$PAYMENT2 = menuList.PAYMENT) === null || _menuList$PAYMENT2 === void 0 ? void 0 : (_menuList$PAYMENT2$Pa = _menuList$PAYMENT2.PaymentGateway) === null || _menuList$PAYMENT2$Pa === void 0 ? void 0 : (_menuList$PAYMENT2$Pa2 = _menuList$PAYMENT2$Pa[0]) === null || _menuList$PAYMENT2$Pa2 === void 0 ? void 0 : _menuList$PAYMENT2$Pa2.gateway,
|
|
12279
|
+
control: control,
|
|
12280
|
+
render: props => {
|
|
12281
|
+
var _menuList$PAYMENT3, _menuList$PAYMENT3$Pa;
|
|
12282
|
+
return /*#__PURE__*/React.createElement(RadioButtons, {
|
|
12283
|
+
selectedOption: props.value,
|
|
12284
|
+
options: menuList === null || menuList === void 0 ? void 0 : (_menuList$PAYMENT3 = menuList.PAYMENT) === null || _menuList$PAYMENT3 === void 0 ? void 0 : (_menuList$PAYMENT3$Pa = _menuList$PAYMENT3.PaymentGateway) === null || _menuList$PAYMENT3$Pa === void 0 ? void 0 : _menuList$PAYMENT3$Pa.map(item => item === null || item === void 0 ? void 0 : item.gateway),
|
|
12285
|
+
onSelect: props.onChange
|
|
12286
|
+
});
|
|
12287
|
+
}
|
|
12288
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
12289
|
+
className: "card"
|
|
12290
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
12291
|
+
className: "payment-amount-info",
|
|
12292
|
+
style: {
|
|
12293
|
+
marginBottom: "26px"
|
|
12294
|
+
}
|
|
12295
|
+
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12296
|
+
className: "dark"
|
|
12297
|
+
}, t("PAYMENT_CS_PAYER_DETAILS"))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12298
|
+
className: "card-label-smaller"
|
|
12299
|
+
}, `${t("PAYMENT_CS_PAID_BY")} * `), /*#__PURE__*/React.createElement(Controller, {
|
|
12300
|
+
name: "paidBy",
|
|
12301
|
+
defaultValue: userOptions[0],
|
|
12302
|
+
control: control,
|
|
12303
|
+
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
12304
|
+
className: "text-input-width",
|
|
12305
|
+
selected: props.value,
|
|
12306
|
+
option: userOptions,
|
|
12307
|
+
select: val => {
|
|
12308
|
+
if (val === "OWNER") {
|
|
12309
|
+
props.onChange(val);
|
|
12310
|
+
setValue("name", name || (billDetails === null || billDetails === void 0 ? void 0 : billDetails.payerName) || "");
|
|
12311
|
+
setValue("mobileNumber", mobileNumber || (billDetails === null || billDetails === void 0 ? void 0 : billDetails.mobileNumber) || "");
|
|
12312
|
+
} else if (val === "OTHER") {
|
|
12313
|
+
props.onChange(val);
|
|
12314
|
+
setValue("name", "");
|
|
12315
|
+
setValue("mobileNumber", "");
|
|
12316
|
+
}
|
|
12317
|
+
}
|
|
12318
|
+
})
|
|
12319
|
+
})), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12320
|
+
className: "card-label-smaller"
|
|
12321
|
+
}, `${t("PAYMENT_CS_PAYER_NAME")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12322
|
+
className: "field"
|
|
12323
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
12324
|
+
control: control,
|
|
12325
|
+
name: "name",
|
|
12326
|
+
defaultValue: name || (billDetails === null || billDetails === void 0 ? void 0 : billDetails.payerName) || "",
|
|
12327
|
+
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
12328
|
+
className: "text-input-width",
|
|
12329
|
+
value: props.value,
|
|
12330
|
+
onChange: e => {
|
|
12331
|
+
props.onChange(e.target.value);
|
|
12332
|
+
}
|
|
12333
|
+
})
|
|
12334
|
+
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12335
|
+
className: "card-label-smaller"
|
|
12336
|
+
}, `${t("PAYMENT_CS_PAYER_NUMBER")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12337
|
+
className: "field"
|
|
12338
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
12339
|
+
control: control,
|
|
12340
|
+
name: "mobileNumber",
|
|
12341
|
+
defaultValue: mobileNumber || (billDetails === null || billDetails === void 0 ? void 0 : billDetails.mobileNumber) || "",
|
|
12342
|
+
render: props => /*#__PURE__*/React.createElement(MobileNumber, {
|
|
12343
|
+
value: props.value,
|
|
12344
|
+
onChange: e => {
|
|
12345
|
+
props.onChange(e);
|
|
12346
|
+
},
|
|
12347
|
+
componentInFront: /*#__PURE__*/React.createElement("div", {
|
|
12348
|
+
className: "employee-card-input employee-card-input--front numberdisplay"
|
|
12349
|
+
}, "+91")
|
|
12350
|
+
})
|
|
12351
|
+
})))), !showToast && /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
12352
|
+
label: t("PAYMENT_CS_BUTTON_LABEL"),
|
|
12353
|
+
submit: true
|
|
12354
|
+
}))), /*#__PURE__*/React.createElement(InfoBanner, {
|
|
12355
|
+
label: t("CS_COMMON_INFO"),
|
|
12356
|
+
text: t("CS_PAYMENT_REDIRECT_NOTICE")
|
|
12357
|
+
}), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
12358
|
+
error: showToast.key,
|
|
12359
|
+
label: t(showToast.label),
|
|
12360
|
+
onClose: () => {
|
|
12361
|
+
setShowToast(null);
|
|
12362
|
+
},
|
|
12363
|
+
isDleteBtn: true
|
|
12364
|
+
}), showOwnerToast && /*#__PURE__*/React.createElement(Toast, {
|
|
12365
|
+
isDleteBtn: true,
|
|
12366
|
+
error: showOwnerToast.key,
|
|
12367
|
+
label: t(showOwnerToast.label),
|
|
12368
|
+
onClose: () => {
|
|
12369
|
+
setShowOwnerToast(null);
|
|
12370
|
+
}
|
|
12371
|
+
}));
|
|
12372
|
+
};
|
|
12373
|
+
|
|
12374
|
+
function toInteger(dirtyNumber) {
|
|
12375
|
+
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
12376
|
+
return NaN;
|
|
12377
|
+
}
|
|
12378
|
+
var number = Number(dirtyNumber);
|
|
12379
|
+
if (isNaN(number)) {
|
|
12380
|
+
return number;
|
|
12381
|
+
}
|
|
12382
|
+
return number < 0 ? Math.ceil(number) : Math.floor(number);
|
|
12383
|
+
}
|
|
12384
|
+
|
|
12385
|
+
function requiredArgs(required, args) {
|
|
12386
|
+
if (args.length < required) {
|
|
12387
|
+
throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
|
|
12388
|
+
}
|
|
12389
|
+
}
|
|
12390
|
+
|
|
12391
|
+
function toDate(argument) {
|
|
12392
|
+
requiredArgs(1, arguments);
|
|
12393
|
+
var argStr = Object.prototype.toString.call(argument);
|
|
12394
|
+
if (argument instanceof Date || typeof argument === 'object' && argStr === '[object Date]') {
|
|
12395
|
+
return new Date(argument.getTime());
|
|
12396
|
+
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
12397
|
+
return new Date(argument);
|
|
12398
|
+
} else {
|
|
12399
|
+
if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
|
|
12400
|
+
console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule");
|
|
12401
|
+
console.warn(new Error().stack);
|
|
12402
|
+
}
|
|
12403
|
+
return new Date(NaN);
|
|
12404
|
+
}
|
|
12405
|
+
}
|
|
12406
|
+
|
|
12407
|
+
function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
12408
|
+
requiredArgs(2, arguments);
|
|
12409
|
+
var timestamp = toDate(dirtyDate).getTime();
|
|
12410
|
+
var amount = toInteger(dirtyAmount);
|
|
12411
|
+
return new Date(timestamp + amount);
|
|
12412
|
+
}
|
|
12413
|
+
|
|
12414
|
+
function getTimezoneOffsetInMilliseconds(date) {
|
|
12415
|
+
var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
|
|
12416
|
+
utcDate.setUTCFullYear(date.getFullYear());
|
|
12417
|
+
return date.getTime() - utcDate.getTime();
|
|
12418
|
+
}
|
|
12419
|
+
|
|
12420
|
+
function isDate(value) {
|
|
12421
|
+
requiredArgs(1, arguments);
|
|
12422
|
+
return value instanceof Date || typeof value === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
12423
|
+
}
|
|
12424
|
+
|
|
12425
|
+
function isValid(dirtyDate) {
|
|
12426
|
+
requiredArgs(1, arguments);
|
|
12427
|
+
if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {
|
|
12428
|
+
return false;
|
|
12429
|
+
}
|
|
12430
|
+
var date = toDate(dirtyDate);
|
|
12431
|
+
return !isNaN(Number(date));
|
|
12432
|
+
}
|
|
12433
|
+
|
|
12434
|
+
var formatDistanceLocale = {
|
|
12435
|
+
lessThanXSeconds: {
|
|
12436
|
+
one: 'less than a second',
|
|
12437
|
+
other: 'less than {{count}} seconds'
|
|
12438
|
+
},
|
|
12439
|
+
xSeconds: {
|
|
12440
|
+
one: '1 second',
|
|
12441
|
+
other: '{{count}} seconds'
|
|
12442
|
+
},
|
|
12443
|
+
halfAMinute: 'half a minute',
|
|
12444
|
+
lessThanXMinutes: {
|
|
12445
|
+
one: 'less than a minute',
|
|
12446
|
+
other: 'less than {{count}} minutes'
|
|
12447
|
+
},
|
|
12448
|
+
xMinutes: {
|
|
12449
|
+
one: '1 minute',
|
|
12450
|
+
other: '{{count}} minutes'
|
|
12451
|
+
},
|
|
12452
|
+
aboutXHours: {
|
|
12453
|
+
one: 'about 1 hour',
|
|
12454
|
+
other: 'about {{count}} hours'
|
|
12001
12455
|
},
|
|
12002
12456
|
xHours: {
|
|
12003
12457
|
one: '1 hour',
|
|
@@ -13412,8 +13866,9 @@ const convertEpochToDate$1 = dateEpoch => {
|
|
|
13412
13866
|
}
|
|
13413
13867
|
};
|
|
13414
13868
|
const SuccessfulPayment$1 = props => {
|
|
13415
|
-
var _location
|
|
13869
|
+
var _location$pathname, _receiptNumber, _JSON$parse, _JSON$parse$value, _JSON$parse$value$inf, _data$, _data$2, _dataCheck$payments, _dataCheck$payments$P, _dataCheck$payments$P2, _dataCheck$payments$P3, _data$8, _data$9, _data$0, _data$1, _data$10, _data$11, _data$12, _data$13, _data$14;
|
|
13416
13870
|
const history = useHistory();
|
|
13871
|
+
const location = useLocation();
|
|
13417
13872
|
const {
|
|
13418
13873
|
t
|
|
13419
13874
|
} = useTranslation();
|
|
@@ -13423,19 +13878,27 @@ const SuccessfulPayment$1 = props => {
|
|
|
13423
13878
|
} = Digit.Hooks.useQueryParams();
|
|
13424
13879
|
const [displayMenu, setDisplayMenu] = useState(false);
|
|
13425
13880
|
const [selectedAction, setSelectedAction] = useState(null);
|
|
13426
|
-
const isFSMResponse =
|
|
13881
|
+
const isFSMResponse = location === null || location === void 0 ? void 0 : (_location$pathname = location.pathname) === null || _location$pathname === void 0 ? void 0 : _location$pathname.includes("payment/success/FSM.TRIP_CHARGES");
|
|
13427
13882
|
const combineResponseFSM = isFSMResponse ? `${t("PAYMENT_COLLECT_LABEL")} / ${t("PAYMENT_COLLECT")}` : t("PAYMENT_LOCALIZATION_RESPONSE");
|
|
13428
13883
|
const [printing, setPrinting] = useState(false);
|
|
13429
13884
|
const [chbPermissionLoading, setChbPermissionLoading] = useState(false);
|
|
13430
13885
|
props.setLink(combineResponseFSM);
|
|
13886
|
+
const checkParam = useParams();
|
|
13887
|
+
const queryParams = new URLSearchParams(location.search);
|
|
13888
|
+
const egPgTxnId = queryParams.get("eg_pg_txnid");
|
|
13889
|
+
const razorpayPaymentId = queryParams.get("razorpayPaymentId");
|
|
13890
|
+
const razorpayOrderId = queryParams.get("razorpayOrderId");
|
|
13891
|
+
const razorpaySignature = queryParams.get("razorpaySignature");
|
|
13431
13892
|
let {
|
|
13432
13893
|
consumerCode,
|
|
13433
13894
|
receiptNumber,
|
|
13434
13895
|
businessService
|
|
13435
13896
|
} = useParams();
|
|
13436
|
-
console.log("
|
|
13897
|
+
console.log("checkParam", checkParam);
|
|
13898
|
+
console.log("egPgTxnId", egPgTxnId);
|
|
13899
|
+
console.log("businessService", businessService);
|
|
13437
13900
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
13438
|
-
receiptNumber = receiptNumber.replace(/%2F/g, "/");
|
|
13901
|
+
receiptNumber = (_receiptNumber = receiptNumber) === null || _receiptNumber === void 0 ? void 0 : _receiptNumber.replace(/%2F/g, "/");
|
|
13439
13902
|
const {
|
|
13440
13903
|
data = {},
|
|
13441
13904
|
isLoading: isBpaSearchLoading,
|
|
@@ -13455,6 +13918,18 @@ const SuccessfulPayment$1 = props => {
|
|
|
13455
13918
|
const selectedTenantData = cities.data.find(item => item.city.districtTenantCode === loginCity);
|
|
13456
13919
|
ulbType = selectedTenantData === null || selectedTenantData === void 0 ? void 0 : (_selectedTenantData$c = selectedTenantData.city) === null || _selectedTenantData$c === void 0 ? void 0 : _selectedTenantData$c.ulbGrade;
|
|
13457
13920
|
}
|
|
13921
|
+
const {
|
|
13922
|
+
isLoading,
|
|
13923
|
+
data: dataCheck,
|
|
13924
|
+
isError
|
|
13925
|
+
} = Digit.Hooks.usePaymentUpdate({
|
|
13926
|
+
egId: egPgTxnId
|
|
13927
|
+
}, businessService, {
|
|
13928
|
+
enabled: !!egPgTxnId,
|
|
13929
|
+
retry: false,
|
|
13930
|
+
staleTime: Infinity,
|
|
13931
|
+
refetchOnWindowFocus: false
|
|
13932
|
+
});
|
|
13458
13933
|
const mutation = Digit.Hooks.chb.useChbCreateAPI(tenantId, false);
|
|
13459
13934
|
const FSM_EDITOR = Digit.UserService.hasAccess("FSM_EDITOR_EMP") || false;
|
|
13460
13935
|
function onActionSelect(action) {
|
|
@@ -13520,24 +13995,6 @@ const SuccessfulPayment$1 = props => {
|
|
|
13520
13995
|
}) => businessService === null || businessService === void 0 ? void 0 : businessService.includes(code))[0]) === null || _data$commonMasters$u2 === void 0 ? void 0 : _data$commonMasters$u2.receiptKey) || "consolidatedreceipt";
|
|
13521
13996
|
}
|
|
13522
13997
|
});
|
|
13523
|
-
const printCertificate = async () => {
|
|
13524
|
-
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
13525
|
-
const state = Digit.ULBService.getStateId();
|
|
13526
|
-
const applicationDetails = await Digit.TLService.search({
|
|
13527
|
-
applicationNumber: consumerCode,
|
|
13528
|
-
tenantId
|
|
13529
|
-
});
|
|
13530
|
-
const generatePdfKeyForTL = "tlcertificate";
|
|
13531
|
-
if (applicationDetails) {
|
|
13532
|
-
let response = await Digit.PaymentService.generatePdf(state, {
|
|
13533
|
-
Licenses: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Licenses
|
|
13534
|
-
}, generatePdfKeyForTL);
|
|
13535
|
-
const fileStore = await Digit.PaymentService.printReciept(state, {
|
|
13536
|
-
fileStoreIds: response.filestoreIds[0]
|
|
13537
|
-
});
|
|
13538
|
-
window.open(fileStore[response.filestoreIds[0]], "_blank");
|
|
13539
|
-
}
|
|
13540
|
-
};
|
|
13541
13998
|
const convertDateToEpoch = (dateString, dayStartOrEnd = "dayend") => {
|
|
13542
13999
|
try {
|
|
13543
14000
|
const parts = dateString.match(/(\d{4})-(\d{1,2})-(\d{1,2})/);
|
|
@@ -13570,45 +14027,11 @@ const SuccessfulPayment$1 = props => {
|
|
|
13570
14027
|
setTimeout(() => URL.revokeObjectURL(link.href), 7000);
|
|
13571
14028
|
}
|
|
13572
14029
|
};
|
|
13573
|
-
const printRLReceipt = async () => {
|
|
13574
|
-
if (printing) return;
|
|
13575
|
-
setPrinting(true);
|
|
13576
|
-
try {
|
|
13577
|
-
var _payments$Payments$3;
|
|
13578
|
-
const applicationDetails = await Digit.RentAndLeaseService.search({
|
|
13579
|
-
tenantId,
|
|
13580
|
-
filters: {
|
|
13581
|
-
applicationNumbers: consumerCode
|
|
13582
|
-
}
|
|
13583
|
-
});
|
|
13584
|
-
let application = applicationDetails;
|
|
13585
|
-
const payments = await Digit.PaymentService.getReciept(tenantId, businessService, {
|
|
13586
|
-
receiptNumbers: receiptNumber
|
|
13587
|
-
});
|
|
13588
|
-
let fileStoreId = payments === null || payments === void 0 ? void 0 : (_payments$Payments$3 = payments.Payments[0]) === null || _payments$Payments$3 === void 0 ? void 0 : _payments$Payments$3.fileStoreId;
|
|
13589
|
-
if (!fileStoreId) {
|
|
13590
|
-
var _payments$Payments;
|
|
13591
|
-
let response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
13592
|
-
Payments: [{
|
|
13593
|
-
...((payments === null || payments === void 0 ? void 0 : (_payments$Payments = payments.Payments) === null || _payments$Payments === void 0 ? void 0 : _payments$Payments[0]) || {}),
|
|
13594
|
-
...application
|
|
13595
|
-
}]
|
|
13596
|
-
}, "rentandlease-receipt");
|
|
13597
|
-
fileStoreId = response === null || response === void 0 ? void 0 : response.filestoreIds[0];
|
|
13598
|
-
}
|
|
13599
|
-
const fileStore = await Digit.PaymentService.printReciept(tenantId, {
|
|
13600
|
-
fileStoreIds: fileStoreId
|
|
13601
|
-
});
|
|
13602
|
-
window.open(fileStore[fileStoreId], "_blank");
|
|
13603
|
-
} finally {
|
|
13604
|
-
setPrinting(false);
|
|
13605
|
-
}
|
|
13606
|
-
};
|
|
13607
14030
|
const printChallanReceipt = async () => {
|
|
13608
14031
|
if (printing) return;
|
|
13609
14032
|
setPrinting(true);
|
|
13610
14033
|
try {
|
|
13611
|
-
var
|
|
14034
|
+
var _applicationDetails$A, _applicationDetails$A2;
|
|
13612
14035
|
const applicationDetails = await Digit.ChallanGenerationService.search({
|
|
13613
14036
|
tenantId,
|
|
13614
14037
|
filters: {
|
|
@@ -13620,15 +14043,15 @@ const SuccessfulPayment$1 = props => {
|
|
|
13620
14043
|
...challanEmpData
|
|
13621
14044
|
};
|
|
13622
14045
|
let application = challan;
|
|
13623
|
-
|
|
13624
|
-
receiptNumbers: receiptNumber
|
|
13625
|
-
});
|
|
13626
|
-
let fileStoreId = payments === null || payments === void 0 ? void 0 : (_payments$Payments$4 = payments.Payments[0]) === null || _payments$Payments$4 === void 0 ? void 0 : _payments$Payments$4.fileStoreId;
|
|
14046
|
+
let fileStoreId = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : (_applicationDetails$A2 = _applicationDetails$A[0]) === null || _applicationDetails$A2 === void 0 ? void 0 : _applicationDetails$A2.paymentReceiptFilestoreId;
|
|
13627
14047
|
if (!fileStoreId) {
|
|
13628
|
-
var _payments$
|
|
14048
|
+
var _payments$Payments;
|
|
14049
|
+
const payments = await Digit.PaymentService.getReciept(tenantId, businessService, {
|
|
14050
|
+
receiptNumbers: receiptNumber
|
|
14051
|
+
});
|
|
13629
14052
|
let response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
13630
14053
|
Payments: [{
|
|
13631
|
-
...((payments === null || payments === void 0 ? void 0 : (_payments$
|
|
14054
|
+
...((payments === null || payments === void 0 ? void 0 : (_payments$Payments = payments.Payments) === null || _payments$Payments === void 0 ? void 0 : _payments$Payments[0]) || {}),
|
|
13632
14055
|
challan: application
|
|
13633
14056
|
}]
|
|
13634
14057
|
}, "challangeneration-receipt");
|
|
@@ -13646,31 +14069,44 @@ const SuccessfulPayment$1 = props => {
|
|
|
13646
14069
|
if (chbPermissionLoading) return;
|
|
13647
14070
|
setChbPermissionLoading(true);
|
|
13648
14071
|
try {
|
|
13649
|
-
var _applicationDetails$c,
|
|
14072
|
+
var _applicationDetails$c, _challanDetails$addit, _challanDetails$addit2, _challanDetails$addre, _applicationDetails$A3, _applicationDetails$A4;
|
|
13650
14073
|
const applicationDetails = await Digit.ChallanGenerationService.search({
|
|
13651
14074
|
tenantId,
|
|
13652
14075
|
filters: {
|
|
13653
14076
|
challanNo: consumerCode
|
|
13654
14077
|
}
|
|
13655
14078
|
});
|
|
13656
|
-
const
|
|
13657
|
-
|
|
14079
|
+
const challanDetails = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$c = applicationDetails.challans) === null || _applicationDetails$c === void 0 ? void 0 : _applicationDetails$c[0];
|
|
14080
|
+
const latitude = challanDetails === null || challanDetails === void 0 ? void 0 : (_challanDetails$addit = challanDetails.additionalDetail) === null || _challanDetails$addit === void 0 ? void 0 : _challanDetails$addit.latitude;
|
|
14081
|
+
const longitude = challanDetails === null || challanDetails === void 0 ? void 0 : (_challanDetails$addit2 = challanDetails.additionalDetail) === null || _challanDetails$addit2 === void 0 ? void 0 : _challanDetails$addit2.longitude;
|
|
14082
|
+
const addressFallback = challanDetails === null || challanDetails === void 0 ? void 0 : (_challanDetails$addre = challanDetails.address) === null || _challanDetails$addre === void 0 ? void 0 : _challanDetails$addre.addressLine1;
|
|
14083
|
+
let location = addressFallback;
|
|
14084
|
+
if (latitude && longitude) {
|
|
14085
|
+
try {
|
|
14086
|
+
const geoLocation = await getLocationName(latitude, longitude);
|
|
14087
|
+
if (geoLocation) {
|
|
14088
|
+
location = geoLocation;
|
|
14089
|
+
}
|
|
14090
|
+
} catch (err) {
|
|
14091
|
+
console.warn("Reverse geocoding failed, using address fallback", err);
|
|
14092
|
+
}
|
|
14093
|
+
}
|
|
13658
14094
|
const challan = {
|
|
13659
14095
|
...applicationDetails,
|
|
13660
14096
|
...challanEmpData
|
|
13661
14097
|
};
|
|
13662
14098
|
console.log("applicationDetails", applicationDetails);
|
|
13663
14099
|
let application = challan;
|
|
13664
|
-
let fileStoreId = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
14100
|
+
let fileStoreId = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A3 = applicationDetails.Applications) === null || _applicationDetails$A3 === void 0 ? void 0 : (_applicationDetails$A4 = _applicationDetails$A3[0]) === null || _applicationDetails$A4 === void 0 ? void 0 : _applicationDetails$A4.paymentReceiptFilestoreId;
|
|
13665
14101
|
if (!fileStoreId) {
|
|
13666
|
-
var _payments$
|
|
14102
|
+
var _payments$Payments2;
|
|
13667
14103
|
const payments = await Digit.PaymentService.getReciept(tenantId, businessService, {
|
|
13668
14104
|
receiptNumbers: receiptNumber
|
|
13669
14105
|
});
|
|
13670
14106
|
let response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
13671
14107
|
challan: {
|
|
13672
14108
|
...application,
|
|
13673
|
-
...((payments === null || payments === void 0 ? void 0 : (_payments$
|
|
14109
|
+
...((payments === null || payments === void 0 ? void 0 : (_payments$Payments2 = payments.Payments) === null || _payments$Payments2 === void 0 ? void 0 : _payments$Payments2[0]) || {}),
|
|
13674
14110
|
location
|
|
13675
14111
|
}
|
|
13676
14112
|
}, "challan-notice");
|
|
@@ -13710,13 +14146,13 @@ const SuccessfulPayment$1 = props => {
|
|
|
13710
14146
|
let fileStoreId = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$h = applicationDetails.hallsBookingApplication) === null || _applicationDetails$h === void 0 ? void 0 : (_applicationDetails$h2 = _applicationDetails$h[0]) === null || _applicationDetails$h2 === void 0 ? void 0 : _applicationDetails$h2.permissionLetterFilestoreId;
|
|
13711
14147
|
const generatePdfKeyForTL = "chb-permissionletter";
|
|
13712
14148
|
if (!fileStoreId) {
|
|
13713
|
-
var _payments$
|
|
14149
|
+
var _payments$Payments3;
|
|
13714
14150
|
const payments = await Digit.PaymentService.getReciept(tenantId, businessService, {
|
|
13715
14151
|
receiptNumbers: receiptNumber
|
|
13716
14152
|
});
|
|
13717
14153
|
const response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
13718
14154
|
Payments: [{
|
|
13719
|
-
...((payments === null || payments === void 0 ? void 0 : (_payments$
|
|
14155
|
+
...((payments === null || payments === void 0 ? void 0 : (_payments$Payments3 = payments.Payments) === null || _payments$Payments3 === void 0 ? void 0 : _payments$Payments3[0]) || {}),
|
|
13720
14156
|
...application
|
|
13721
14157
|
}]
|
|
13722
14158
|
}, generatePdfKeyForTL);
|
|
@@ -13762,16 +14198,16 @@ const SuccessfulPayment$1 = props => {
|
|
|
13762
14198
|
};
|
|
13763
14199
|
let fileStoreId = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$h3 = applicationDetails.hallsBookingApplication) === null || _applicationDetails$h3 === void 0 ? void 0 : (_applicationDetails$h4 = _applicationDetails$h3[0]) === null || _applicationDetails$h4 === void 0 ? void 0 : _applicationDetails$h4.paymentReceiptFilestoreId;
|
|
13764
14200
|
if (!fileStoreId) {
|
|
13765
|
-
var _payments$Payments$
|
|
14201
|
+
var _payments$Payments$3, _payments$Payments4, _response, _response2;
|
|
13766
14202
|
const payments = await Digit.PaymentService.getReciept(tenantId, businessService, {
|
|
13767
14203
|
receiptNumbers: receiptNumber
|
|
13768
14204
|
});
|
|
13769
14205
|
let response = {
|
|
13770
|
-
filestoreIds: [(_payments$Payments$
|
|
14206
|
+
filestoreIds: [(_payments$Payments$3 = payments.Payments[0]) === null || _payments$Payments$3 === void 0 ? void 0 : _payments$Payments$3.fileStoreId]
|
|
13771
14207
|
};
|
|
13772
14208
|
response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
13773
14209
|
Payments: [{
|
|
13774
|
-
...((payments === null || payments === void 0 ? void 0 : (_payments$
|
|
14210
|
+
...((payments === null || payments === void 0 ? void 0 : (_payments$Payments4 = payments.Payments) === null || _payments$Payments4 === void 0 ? void 0 : _payments$Payments4[0]) || {}),
|
|
13775
14211
|
...application
|
|
13776
14212
|
}]
|
|
13777
14213
|
}, "chbservice-receipt");
|
|
@@ -13807,13 +14243,13 @@ const SuccessfulPayment$1 = props => {
|
|
|
13807
14243
|
let application = new_data;
|
|
13808
14244
|
let fileStoreId = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$B = applicationDetails.BookingApplication) === null || _applicationDetails$B === void 0 ? void 0 : (_applicationDetails$B2 = _applicationDetails$B[0]) === null || _applicationDetails$B2 === void 0 ? void 0 : _applicationDetails$B2.paymentReceiptFilestoreId;
|
|
13809
14245
|
if (!fileStoreId) {
|
|
13810
|
-
var _payments$
|
|
14246
|
+
var _payments$Payments5;
|
|
13811
14247
|
const payments = await Digit.PaymentService.getReciept(tenantId, businessService, {
|
|
13812
14248
|
receiptNumbers: receiptNumber
|
|
13813
14249
|
});
|
|
13814
14250
|
let response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
13815
14251
|
Payments: [{
|
|
13816
|
-
...((payments === null || payments === void 0 ? void 0 : (_payments$
|
|
14252
|
+
...((payments === null || payments === void 0 ? void 0 : (_payments$Payments5 = payments.Payments) === null || _payments$Payments5 === void 0 ? void 0 : _payments$Payments5[0]) || {}),
|
|
13817
14253
|
...application
|
|
13818
14254
|
}]
|
|
13819
14255
|
}, "adv-bill");
|
|
@@ -13834,13 +14270,21 @@ const SuccessfulPayment$1 = props => {
|
|
|
13834
14270
|
receiptNumbers: receiptNumber
|
|
13835
14271
|
});
|
|
13836
14272
|
try {
|
|
13837
|
-
var _payments$Payments$
|
|
13838
|
-
|
|
14273
|
+
var _applicationDetails$P, _payments$Payments$4;
|
|
14274
|
+
const applicationDetails = await Digit.PTRService.search({
|
|
14275
|
+
tenantId,
|
|
14276
|
+
filters: {
|
|
14277
|
+
applicationNumber: consumerCode
|
|
14278
|
+
}
|
|
14279
|
+
});
|
|
14280
|
+
const application = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$P = applicationDetails.PetRegistrationApplications) === null || _applicationDetails$P === void 0 ? void 0 : _applicationDetails$P[0];
|
|
14281
|
+
let fileStoreId = (_payments$Payments$4 = payments.Payments[0]) === null || _payments$Payments$4 === void 0 ? void 0 : _payments$Payments$4.fileStoreId;
|
|
13839
14282
|
if (!fileStoreId) {
|
|
13840
|
-
var _payments$
|
|
14283
|
+
var _payments$Payments6;
|
|
13841
14284
|
let response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
13842
14285
|
Payments: [{
|
|
13843
|
-
...((payments === null || payments === void 0 ? void 0 : (_payments$
|
|
14286
|
+
...((payments === null || payments === void 0 ? void 0 : (_payments$Payments6 = payments.Payments) === null || _payments$Payments6 === void 0 ? void 0 : _payments$Payments6[0]) || {}),
|
|
14287
|
+
application
|
|
13844
14288
|
}]
|
|
13845
14289
|
}, "pet-receipt-employee");
|
|
13846
14290
|
fileStoreId = response === null || response === void 0 ? void 0 : response.filestoreIds[0];
|
|
@@ -13857,7 +14301,7 @@ const SuccessfulPayment$1 = props => {
|
|
|
13857
14301
|
if (printing) return;
|
|
13858
14302
|
setPrinting(true);
|
|
13859
14303
|
try {
|
|
13860
|
-
var _applicationDetails$
|
|
14304
|
+
var _applicationDetails$A5, _applicationDetails$A6, _applicationDetails$A7;
|
|
13861
14305
|
console.log("consumerCode for ndc", consumerCode);
|
|
13862
14306
|
console.log("tenantId for ndc", tenantId);
|
|
13863
14307
|
const applicationDetails = await Digit.NDCService.NDCsearch({
|
|
@@ -13866,16 +14310,16 @@ const SuccessfulPayment$1 = props => {
|
|
|
13866
14310
|
applicationNo: consumerCode
|
|
13867
14311
|
}
|
|
13868
14312
|
});
|
|
13869
|
-
let application = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
13870
|
-
let fileStoreId = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
14313
|
+
let application = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A5 = applicationDetails.Applications) === null || _applicationDetails$A5 === void 0 ? void 0 : _applicationDetails$A5[0];
|
|
14314
|
+
let fileStoreId = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A6 = applicationDetails.Applications) === null || _applicationDetails$A6 === void 0 ? void 0 : (_applicationDetails$A7 = _applicationDetails$A6[0]) === null || _applicationDetails$A7 === void 0 ? void 0 : _applicationDetails$A7.paymentReceiptFilestoreId;
|
|
13871
14315
|
if (!fileStoreId) {
|
|
13872
|
-
var _payments$
|
|
14316
|
+
var _payments$Payments7;
|
|
13873
14317
|
const payments = await Digit.PaymentService.getReciept(tenantId, businessService, {
|
|
13874
14318
|
receiptNumbers: receiptNumber
|
|
13875
14319
|
});
|
|
13876
14320
|
let response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
13877
14321
|
Payments: [{
|
|
13878
|
-
...((payments === null || payments === void 0 ? void 0 : (_payments$
|
|
14322
|
+
...((payments === null || payments === void 0 ? void 0 : (_payments$Payments7 = payments.Payments) === null || _payments$Payments7 === void 0 ? void 0 : _payments$Payments7[0]) || {}),
|
|
13879
14323
|
...application
|
|
13880
14324
|
}]
|
|
13881
14325
|
}, "ndc-receipt");
|
|
@@ -14011,7 +14455,7 @@ const SuccessfulPayment$1 = props => {
|
|
|
14011
14455
|
}
|
|
14012
14456
|
};
|
|
14013
14457
|
const printReciept = async () => {
|
|
14014
|
-
var _payments$Payments$
|
|
14458
|
+
var _payments$Payments$5, _payments$Payments$6;
|
|
14015
14459
|
if (printing) return;
|
|
14016
14460
|
setPrinting(true);
|
|
14017
14461
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
@@ -14020,10 +14464,10 @@ const SuccessfulPayment$1 = props => {
|
|
|
14020
14464
|
receiptNumbers: receiptNumber
|
|
14021
14465
|
});
|
|
14022
14466
|
let response = {
|
|
14023
|
-
filestoreIds: [(_payments$Payments$
|
|
14467
|
+
filestoreIds: [(_payments$Payments$5 = payments.Payments[0]) === null || _payments$Payments$5 === void 0 ? void 0 : _payments$Payments$5.fileStoreId]
|
|
14024
14468
|
};
|
|
14025
14469
|
let fileStoreTenant;
|
|
14026
|
-
if (!((_payments$Payments$
|
|
14470
|
+
if (!((_payments$Payments$6 = payments.Payments[0]) !== null && _payments$Payments$6 !== void 0 && _payments$Payments$6.fileStoreId)) {
|
|
14027
14471
|
let assessmentYear = "";
|
|
14028
14472
|
let count = 0;
|
|
14029
14473
|
let toDate, fromDate;
|
|
@@ -14090,7 +14534,7 @@ const SuccessfulPayment$1 = props => {
|
|
|
14090
14534
|
await Digit.Utils.downloadReceipt(consumercode, businessService, "consolidatedreceipt", tenantid);
|
|
14091
14535
|
};
|
|
14092
14536
|
const printRecieptNew = async payment => {
|
|
14093
|
-
var _payments$Payments$
|
|
14537
|
+
var _payments$Payments$7;
|
|
14094
14538
|
console.log("paymentpayment", payment, payment.Payments[0].paymentDetails[0].receiptNumber, payment.Payments[0]);
|
|
14095
14539
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
14096
14540
|
const state = Digit.ULBService.getStateId();
|
|
@@ -14099,7 +14543,7 @@ const SuccessfulPayment$1 = props => {
|
|
|
14099
14543
|
receiptNumbers: payment.Payments[0].paymentDetails[0].receiptNumber
|
|
14100
14544
|
});
|
|
14101
14545
|
let response = {
|
|
14102
|
-
filestoreIds: [(_payments$Payments$
|
|
14546
|
+
filestoreIds: [(_payments$Payments$7 = payments.Payments[0]) === null || _payments$Payments$7 === void 0 ? void 0 : _payments$Payments$7.fileStoreId]
|
|
14103
14547
|
};
|
|
14104
14548
|
{
|
|
14105
14549
|
let assessmentYear = "",
|
|
@@ -14302,18 +14746,19 @@ const SuccessfulPayment$1 = props => {
|
|
|
14302
14746
|
});
|
|
14303
14747
|
window.open(fileStore[response.filestoreIds[0]], "_blank");
|
|
14304
14748
|
};
|
|
14305
|
-
if (
|
|
14749
|
+
if (isLoading) return /*#__PURE__*/React.createElement(Loader, null);
|
|
14750
|
+
const checkRecieptNumber = dataCheck === null || dataCheck === void 0 ? void 0 : (_dataCheck$payments = dataCheck.payments) === null || _dataCheck$payments === void 0 ? void 0 : (_dataCheck$payments$P = _dataCheck$payments.Payments) === null || _dataCheck$payments$P === void 0 ? void 0 : (_dataCheck$payments$P2 = _dataCheck$payments$P[0]) === null || _dataCheck$payments$P2 === void 0 ? void 0 : (_dataCheck$payments$P3 = _dataCheck$payments$P2.paymentDetails[0]) === null || _dataCheck$payments$P3 === void 0 ? void 0 : _dataCheck$payments$P3.receiptNumber;
|
|
14306
14751
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(Banner, {
|
|
14307
14752
|
message: getMessage(),
|
|
14308
14753
|
info: t("PAYMENT_LOCALIZATION_RECIEPT_NO"),
|
|
14309
|
-
applicationNumber: receiptNumber,
|
|
14754
|
+
applicationNumber: receiptNumber || checkRecieptNumber,
|
|
14310
14755
|
successful: true
|
|
14311
14756
|
}), /*#__PURE__*/React.createElement(CardText, null, getCardText()), generatePdfKey ? /*#__PURE__*/React.createElement("div", {
|
|
14312
14757
|
style: {
|
|
14313
14758
|
display: "flex",
|
|
14314
14759
|
justifyContent: "space-evenly"
|
|
14315
14760
|
}
|
|
14316
|
-
}, businessService !== "chb-services" && businessService !== "adv-services" && businessService !== "pet-services" && businessService !== "NDC" && businessService !== "Challan_Generation" &&
|
|
14761
|
+
}, businessService !== "chb-services" && businessService !== "adv-services" && businessService !== "pet-services" && businessService !== "NDC" && businessService !== "Challan_Generation" && /*#__PURE__*/React.createElement("div", {
|
|
14317
14762
|
className: "primary-label-btn d-grid",
|
|
14318
14763
|
style: {
|
|
14319
14764
|
marginLeft: "unset",
|
|
@@ -14330,23 +14775,7 @@ const SuccessfulPayment$1 = props => {
|
|
|
14330
14775
|
fill: "none"
|
|
14331
14776
|
}), /*#__PURE__*/React.createElement("path", {
|
|
14332
14777
|
d: "M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"
|
|
14333
|
-
})), t("CS_COMMON_PRINT_RECEIPT"))), businessService == "
|
|
14334
|
-
className: "primary-label-btn d-grid",
|
|
14335
|
-
style: {
|
|
14336
|
-
marginLeft: "unset"
|
|
14337
|
-
},
|
|
14338
|
-
onClick: printCertificate
|
|
14339
|
-
}, /*#__PURE__*/React.createElement("svg", {
|
|
14340
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
14341
|
-
height: "24",
|
|
14342
|
-
viewBox: "0 0 24 24",
|
|
14343
|
-
width: "24"
|
|
14344
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
14345
|
-
d: "M0 0h24v24H0z",
|
|
14346
|
-
fill: "none"
|
|
14347
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
14348
|
-
d: "M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"
|
|
14349
|
-
})), t("CS_COMMON_PRINT_CERTIFICATE")) : null, businessService == "sv-services" ? /*#__PURE__*/React.createElement("div", {
|
|
14778
|
+
})), t("CS_COMMON_PRINT_RECEIPT"))), businessService == "sv-services" ? /*#__PURE__*/React.createElement("div", {
|
|
14350
14779
|
className: "primary-label-btn d-grid",
|
|
14351
14780
|
style: {
|
|
14352
14781
|
marginLeft: "unset",
|
|
@@ -14542,29 +14971,7 @@ const SuccessfulPayment$1 = props => {
|
|
|
14542
14971
|
fill: "none"
|
|
14543
14972
|
}), /*#__PURE__*/React.createElement("path", {
|
|
14544
14973
|
d: "M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"
|
|
14545
|
-
})), t("Challan_Notice")))) : null, businessService == "
|
|
14546
|
-
style: {
|
|
14547
|
-
display: "flex",
|
|
14548
|
-
justifyContent: "flex-end",
|
|
14549
|
-
gap: "20px",
|
|
14550
|
-
marginRight: "20px",
|
|
14551
|
-
marginTop: "15px",
|
|
14552
|
-
marginBottom: "15px"
|
|
14553
|
-
}
|
|
14554
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
14555
|
-
className: "primary-label-btn d-grid",
|
|
14556
|
-
onClick: printing ? undefined : printRLReceipt
|
|
14557
|
-
}, printing ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("svg", {
|
|
14558
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
14559
|
-
height: "24",
|
|
14560
|
-
viewBox: "0 0 24 24",
|
|
14561
|
-
width: "24"
|
|
14562
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
14563
|
-
d: "M0 0h24v24H0z",
|
|
14564
|
-
fill: "none"
|
|
14565
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
14566
|
-
d: "M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"
|
|
14567
|
-
})), t("CHB_FEE_RECEIPT")))) : null, businessService == "sv-services" && /*#__PURE__*/React.createElement(Link, {
|
|
14974
|
+
})), t("Challan_Notice")))) : null, businessService == "sv-services" && /*#__PURE__*/React.createElement(Link, {
|
|
14568
14975
|
to: `/digit-ui/citizen`
|
|
14569
14976
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
14570
14977
|
label: t("CORE_COMMON_GO_TO_HOME"),
|
|
@@ -14865,6 +15272,7 @@ const EmployeePayment = ({
|
|
|
14865
15272
|
setLink
|
|
14866
15273
|
};
|
|
14867
15274
|
const isFsm = ((_location = location) === null || _location === void 0 ? void 0 : (_location$pathname = _location.pathname) === null || _location$pathname === void 0 ? void 0 : _location$pathname.includes("fsm")) || ((_location2 = location) === null || _location2 === void 0 ? void 0 : (_location2$pathname = _location2.pathname) === null || _location2$pathname === void 0 ? void 0 : _location2$pathname.includes("FSM"));
|
|
15275
|
+
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
14868
15276
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", {
|
|
14869
15277
|
className: "breadcrumb",
|
|
14870
15278
|
style: {
|
|
@@ -14880,8 +15288,15 @@ const EmployeePayment = ({
|
|
|
14880
15288
|
path: `${currentPath}/collect/:businessService/:consumerCode`
|
|
14881
15289
|
}, /*#__PURE__*/React.createElement(CollectPayment, Object.assign({}, commonProps, {
|
|
14882
15290
|
basePath: currentPath
|
|
15291
|
+
}))), /*#__PURE__*/React.createElement(Route, {
|
|
15292
|
+
path: `${currentPath}/challan/collect/:businessService/:consumerCode`
|
|
15293
|
+
}, /*#__PURE__*/React.createElement(SelectPaymentType$2, Object.assign({}, commonProps, {
|
|
15294
|
+
basePath: currentPath,
|
|
15295
|
+
stateCode: stateCode
|
|
14883
15296
|
}))), /*#__PURE__*/React.createElement(Route, {
|
|
14884
15297
|
path: `${currentPath}/success/:businessService/:receiptNumber/:consumerCode`
|
|
15298
|
+
}, /*#__PURE__*/React.createElement(SuccessfulPayment$1, commonProps)), /*#__PURE__*/React.createElement(Route, {
|
|
15299
|
+
path: `${currentPath}/challan/success/:businessService/:consumerCode`
|
|
14885
15300
|
}, /*#__PURE__*/React.createElement(SuccessfulPayment$1, commonProps)), /*#__PURE__*/React.createElement(Route, {
|
|
14886
15301
|
path: `${currentPath}/integration/:moduleName/:pageName`
|
|
14887
15302
|
}, /*#__PURE__*/React.createElement(IFrameInterface, commonProps)), /*#__PURE__*/React.createElement(Route, {
|