@mseva/digit-ui-module-common 1.1.68 → 1.1.70
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 +53 -9
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
package/dist/index.modern.js
CHANGED
|
@@ -7063,6 +7063,9 @@ const SelectPaymentType$1 = props => {
|
|
|
7063
7063
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
7064
7064
|
}
|
|
7065
7065
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BackButton, null, t("CS_COMMON_BACK")), /*#__PURE__*/React.createElement("form", {
|
|
7066
|
+
style: {
|
|
7067
|
+
padding: "20px"
|
|
7068
|
+
},
|
|
7066
7069
|
onSubmit: handleSubmit(onSubmit)
|
|
7067
7070
|
}, /*#__PURE__*/React.createElement(Header, null, t("PAYMENT_CS_HEADER")), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", {
|
|
7068
7071
|
className: "payment-amount-info",
|
|
@@ -7756,9 +7759,11 @@ const WrapPaymentComponent = props => {
|
|
|
7756
7759
|
hallsBookingApplication: ((applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.hallsBookingApplication) || []).map(app => {
|
|
7757
7760
|
return {
|
|
7758
7761
|
...app,
|
|
7759
|
-
bookingSlotDetails: [...(app.bookingSlotDetails || [])].sort((a, b) => {
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
+
bookingSlotDetails: [...(app.bookingSlotDetails || [])].sort((a, b) => new Date(a.bookingDate) - new Date(b.bookingDate)).map(slot => ({
|
|
7763
|
+
...slot,
|
|
7764
|
+
bookingDate: formatDate(slot.bookingDate),
|
|
7765
|
+
bookingEndDate: formatDate(slot.bookingEndDate)
|
|
7766
|
+
}))
|
|
7762
7767
|
};
|
|
7763
7768
|
})
|
|
7764
7769
|
};
|
|
@@ -7775,6 +7780,13 @@ const WrapPaymentComponent = props => {
|
|
|
7775
7780
|
...application
|
|
7776
7781
|
}]
|
|
7777
7782
|
}, generatePdfKeyForTL);
|
|
7783
|
+
const updatedApplication = {
|
|
7784
|
+
...(applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.hallsBookingApplication[0]),
|
|
7785
|
+
permissionLetterFilestoreId: response === null || response === void 0 ? void 0 : response.filestoreIds[0]
|
|
7786
|
+
};
|
|
7787
|
+
await mutation.mutateAsync({
|
|
7788
|
+
hallsBookingApplication: updatedApplication
|
|
7789
|
+
});
|
|
7778
7790
|
fileStoreId = response === null || response === void 0 ? void 0 : response.filestoreIds[0];
|
|
7779
7791
|
}
|
|
7780
7792
|
const fileStore = await Digit.PaymentService.printReciept(tenantId, {
|
|
@@ -7797,7 +7809,16 @@ const WrapPaymentComponent = props => {
|
|
|
7797
7809
|
}
|
|
7798
7810
|
});
|
|
7799
7811
|
let application = {
|
|
7800
|
-
hallsBookingApplication: (applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.hallsBookingApplication) || []
|
|
7812
|
+
hallsBookingApplication: ((applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.hallsBookingApplication) || []).map(app => {
|
|
7813
|
+
return {
|
|
7814
|
+
...app,
|
|
7815
|
+
bookingSlotDetails: [...(app.bookingSlotDetails || [])].sort((a, b) => new Date(a.bookingDate) - new Date(b.bookingDate)).map(slot => ({
|
|
7816
|
+
...slot,
|
|
7817
|
+
bookingDate: formatDate(slot.bookingDate),
|
|
7818
|
+
bookingEndDate: formatDate(slot.bookingEndDate)
|
|
7819
|
+
}))
|
|
7820
|
+
};
|
|
7821
|
+
})
|
|
7801
7822
|
};
|
|
7802
7823
|
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;
|
|
7803
7824
|
if (!fileStoreId) {
|
|
@@ -13571,9 +13592,11 @@ const SuccessfulPayment$1 = props => {
|
|
|
13571
13592
|
hallsBookingApplication: ((applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.hallsBookingApplication) || []).map(app => {
|
|
13572
13593
|
return {
|
|
13573
13594
|
...app,
|
|
13574
|
-
bookingSlotDetails: [...(app.bookingSlotDetails || [])].sort((a, b) => {
|
|
13575
|
-
|
|
13576
|
-
|
|
13595
|
+
bookingSlotDetails: [...(app.bookingSlotDetails || [])].sort((a, b) => new Date(a.bookingDate) - new Date(b.bookingDate)).map(slot => ({
|
|
13596
|
+
...slot,
|
|
13597
|
+
bookingDate: formatDate(slot.bookingDate),
|
|
13598
|
+
bookingEndDate: formatDate(slot.bookingEndDate)
|
|
13599
|
+
}))
|
|
13577
13600
|
};
|
|
13578
13601
|
})
|
|
13579
13602
|
};
|
|
@@ -13590,6 +13613,13 @@ const SuccessfulPayment$1 = props => {
|
|
|
13590
13613
|
...application
|
|
13591
13614
|
}]
|
|
13592
13615
|
}, generatePdfKeyForTL);
|
|
13616
|
+
const updatedApplication = {
|
|
13617
|
+
...(applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.hallsBookingApplication[0]),
|
|
13618
|
+
permissionLetterFilestoreId: response === null || response === void 0 ? void 0 : response.filestoreIds[0]
|
|
13619
|
+
};
|
|
13620
|
+
await mutation.mutateAsync({
|
|
13621
|
+
hallsBookingApplication: updatedApplication
|
|
13622
|
+
});
|
|
13593
13623
|
fileStoreId = response === null || response === void 0 ? void 0 : response.filestoreIds[0];
|
|
13594
13624
|
}
|
|
13595
13625
|
const fileStore = await Digit.PaymentService.printReciept(tenantId, {
|
|
@@ -13612,7 +13642,16 @@ const SuccessfulPayment$1 = props => {
|
|
|
13612
13642
|
}
|
|
13613
13643
|
});
|
|
13614
13644
|
let application = {
|
|
13615
|
-
hallsBookingApplication: (applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.hallsBookingApplication) || []
|
|
13645
|
+
hallsBookingApplication: ((applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.hallsBookingApplication) || []).map(app => {
|
|
13646
|
+
return {
|
|
13647
|
+
...app,
|
|
13648
|
+
bookingSlotDetails: [...(app.bookingSlotDetails || [])].sort((a, b) => new Date(a.bookingDate) - new Date(b.bookingDate)).map(slot => ({
|
|
13649
|
+
...slot,
|
|
13650
|
+
bookingDate: formatDate(slot.bookingDate),
|
|
13651
|
+
bookingEndDate: formatDate(slot.bookingEndDate)
|
|
13652
|
+
}))
|
|
13653
|
+
};
|
|
13654
|
+
})
|
|
13616
13655
|
};
|
|
13617
13656
|
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;
|
|
13618
13657
|
if (!fileStoreId) {
|
|
@@ -14920,6 +14959,11 @@ const getLocationName = async (lat, lng) => {
|
|
|
14920
14959
|
return "Address not provided";
|
|
14921
14960
|
}
|
|
14922
14961
|
};
|
|
14962
|
+
const formatDate = dateStr => {
|
|
14963
|
+
if (!dateStr) return "";
|
|
14964
|
+
const [year, month, day] = dateStr.split("-");
|
|
14965
|
+
return `${day}/${month}/${year}`;
|
|
14966
|
+
};
|
|
14923
14967
|
|
|
14924
|
-
export { ChallanData, PaymentLinks, PaymentModule, amountToWords, getCurrentEpoch, getLocationName, groupKeyForCart, paymentConfigs, transformBookingResponseToBookingData };
|
|
14968
|
+
export { ChallanData, PaymentLinks, PaymentModule, amountToWords, formatDate, getCurrentEpoch, getLocationName, groupKeyForCart, paymentConfigs, transformBookingResponseToBookingData };
|
|
14925
14969
|
//# sourceMappingURL=index.modern.js.map
|