@bookmypuja-tech/bmp-pdf 0.2.3 → 0.2.5
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 +15 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -917,6 +917,20 @@ var A4PrasadDelivery = ({
|
|
|
917
917
|
templeName,
|
|
918
918
|
data
|
|
919
919
|
}) => {
|
|
920
|
+
data = data.map((item) => {
|
|
921
|
+
let address = "";
|
|
922
|
+
try {
|
|
923
|
+
const parsedAddress = JSON.parse(item.address);
|
|
924
|
+
address = `${parsedAddress.address}, ${parsedAddress.locality}, ${parsedAddress.state} - ${parsedAddress.pincode}`;
|
|
925
|
+
} catch (e) {
|
|
926
|
+
console.error("Error parsing address:", e);
|
|
927
|
+
address = item.address;
|
|
928
|
+
}
|
|
929
|
+
return {
|
|
930
|
+
...item,
|
|
931
|
+
address
|
|
932
|
+
};
|
|
933
|
+
});
|
|
920
934
|
return /* @__PURE__ */ React9.createElement(Document5, null, /* @__PURE__ */ React9.createElement(Page5, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React9.createElement(
|
|
921
935
|
Image7,
|
|
922
936
|
{
|
|
@@ -1035,7 +1049,7 @@ var A4PrasadDelivery = ({
|
|
|
1035
1049
|
width: "10%"
|
|
1036
1050
|
}
|
|
1037
1051
|
},
|
|
1038
|
-
/* @__PURE__ */ React9.createElement(Text9, null, item.date.toLocaleDateString("en-GB", {
|
|
1052
|
+
/* @__PURE__ */ React9.createElement(Text9, null, new Date(item.date).toLocaleDateString("en-GB", {
|
|
1039
1053
|
day: "2-digit",
|
|
1040
1054
|
month: "2-digit",
|
|
1041
1055
|
year: "2-digit"
|
package/package.json
CHANGED