@bookmypuja-tech/bmp-pdf 0.3.23 → 0.3.25
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.d.ts +2 -0
- package/dist/index.js +105 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1456,6 +1456,9 @@ var A4PujaList = ({
|
|
|
1456
1456
|
}) => {
|
|
1457
1457
|
let serialOfNormalPujas = 0;
|
|
1458
1458
|
let serialOfEarlyReminders = 0;
|
|
1459
|
+
let pujasRequiresCoupon = pujas.some(
|
|
1460
|
+
(puja) => puja.bookings.some((booking) => booking.requires_coupon)
|
|
1461
|
+
);
|
|
1459
1462
|
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(Document8, null, /* @__PURE__ */ React12.createElement(Page8, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React12.createElement(
|
|
1460
1463
|
Image9,
|
|
1461
1464
|
{
|
|
@@ -1531,9 +1534,9 @@ var A4PujaList = ({
|
|
|
1531
1534
|
/* @__PURE__ */ React12.createElement(Text_default, null, "Date")
|
|
1532
1535
|
)
|
|
1533
1536
|
))), pujas.some(
|
|
1534
|
-
(puja) => puja.bookings.some((booking) => booking.is_early_reminder)
|
|
1537
|
+
(puja) => puja.bookings.some((booking) => booking.is_early_reminder && !booking.requires_coupon)
|
|
1535
1538
|
) ? pujas.flatMap(
|
|
1536
|
-
(puja, pujaIndex) => puja.bookings.filter((booking) => booking.is_early_reminder).map((booking, bookingIndex) => {
|
|
1539
|
+
(puja, pujaIndex) => puja.bookings.filter((booking) => booking.is_early_reminder && !booking.requires_coupon).map((booking, bookingIndex) => {
|
|
1537
1540
|
serialOfEarlyReminders++;
|
|
1538
1541
|
return /* @__PURE__ */ React12.createElement(
|
|
1539
1542
|
View7,
|
|
@@ -1606,7 +1609,7 @@ var A4PujaList = ({
|
|
|
1606
1609
|
}
|
|
1607
1610
|
},
|
|
1608
1611
|
pujas.map((puja, pujaIndex) => {
|
|
1609
|
-
if (puja.bookings.every((booking) => booking.is_early_reminder))
|
|
1612
|
+
if (puja.bookings.every((booking) => booking.is_early_reminder || booking.requires_coupon))
|
|
1610
1613
|
return null;
|
|
1611
1614
|
serialOfNormalPujas = 0;
|
|
1612
1615
|
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(View7, { wrap: false, style: { marginBottom: 25 } }, /* @__PURE__ */ React12.createElement(View7, null, /* @__PURE__ */ React12.createElement(
|
|
@@ -1697,7 +1700,7 @@ var A4PujaList = ({
|
|
|
1697
1700
|
/* @__PURE__ */ React12.createElement(Text_default, null, "Qty")
|
|
1698
1701
|
)
|
|
1699
1702
|
), puja.bookings.map((booking, bookingIndex) => {
|
|
1700
|
-
if (booking.is_early_reminder) return null;
|
|
1703
|
+
if (booking.is_early_reminder || booking.requires_coupon) return null;
|
|
1701
1704
|
serialOfNormalPujas++;
|
|
1702
1705
|
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(
|
|
1703
1706
|
View7,
|
|
@@ -1804,7 +1807,103 @@ var A4PujaList = ({
|
|
|
1804
1807
|
));
|
|
1805
1808
|
})));
|
|
1806
1809
|
})
|
|
1807
|
-
))
|
|
1810
|
+
)), pujasRequiresCoupon ? /* @__PURE__ */ React12.createElement(Page8, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React12.createElement(
|
|
1811
|
+
Image9,
|
|
1812
|
+
{
|
|
1813
|
+
fixed: true,
|
|
1814
|
+
style: {
|
|
1815
|
+
height: 15,
|
|
1816
|
+
width: 75,
|
|
1817
|
+
marginBottom: 10
|
|
1818
|
+
},
|
|
1819
|
+
src: bmpLogo
|
|
1820
|
+
}
|
|
1821
|
+
), /* @__PURE__ */ React12.createElement(
|
|
1822
|
+
View7,
|
|
1823
|
+
{
|
|
1824
|
+
style: {
|
|
1825
|
+
display: "flex",
|
|
1826
|
+
flexDirection: "column",
|
|
1827
|
+
marginTop: 10,
|
|
1828
|
+
gap: 15
|
|
1829
|
+
}
|
|
1830
|
+
},
|
|
1831
|
+
pujas.map((puja, pujaIndex) => {
|
|
1832
|
+
if (!puja.bookings.some((booking) => booking.requires_coupon))
|
|
1833
|
+
return null;
|
|
1834
|
+
return puja.bookings.map((booking, bookingIndex) => {
|
|
1835
|
+
if (!booking.requires_coupon) return null;
|
|
1836
|
+
return /* @__PURE__ */ React12.createElement(
|
|
1837
|
+
View7,
|
|
1838
|
+
{
|
|
1839
|
+
key: bookingIndex,
|
|
1840
|
+
style: {
|
|
1841
|
+
marginBottom: 10,
|
|
1842
|
+
fontSize: 18,
|
|
1843
|
+
padding: 10,
|
|
1844
|
+
border: "1px dotted black"
|
|
1845
|
+
},
|
|
1846
|
+
wrap: false
|
|
1847
|
+
},
|
|
1848
|
+
/* @__PURE__ */ React12.createElement(
|
|
1849
|
+
View7,
|
|
1850
|
+
{
|
|
1851
|
+
style: {
|
|
1852
|
+
display: "flex",
|
|
1853
|
+
flexDirection: "row",
|
|
1854
|
+
justifyContent: "space-between",
|
|
1855
|
+
gap: 10
|
|
1856
|
+
}
|
|
1857
|
+
},
|
|
1858
|
+
/* @__PURE__ */ React12.createElement(
|
|
1859
|
+
View7,
|
|
1860
|
+
{
|
|
1861
|
+
style: {
|
|
1862
|
+
display: "flex",
|
|
1863
|
+
flexDirection: "row",
|
|
1864
|
+
gap: 10
|
|
1865
|
+
}
|
|
1866
|
+
},
|
|
1867
|
+
/* @__PURE__ */ React12.createElement(
|
|
1868
|
+
Text_default,
|
|
1869
|
+
{
|
|
1870
|
+
style: {
|
|
1871
|
+
fontWeight: "semibold"
|
|
1872
|
+
}
|
|
1873
|
+
},
|
|
1874
|
+
booking.invoiceNumber
|
|
1875
|
+
),
|
|
1876
|
+
/* @__PURE__ */ React12.createElement(Text_default, null, booking.date ? new Date(booking.date).toDateString() : date.toDateString())
|
|
1877
|
+
),
|
|
1878
|
+
/* @__PURE__ */ React12.createElement(Text_default, null, booking.phone_number)
|
|
1879
|
+
),
|
|
1880
|
+
/* @__PURE__ */ React12.createElement(Text_default, { style: { fontSize: 16 } }, puja.name),
|
|
1881
|
+
/* @__PURE__ */ React12.createElement(
|
|
1882
|
+
View7,
|
|
1883
|
+
{
|
|
1884
|
+
style: {
|
|
1885
|
+
height: 8,
|
|
1886
|
+
width: "100%"
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1889
|
+
),
|
|
1890
|
+
/* @__PURE__ */ React12.createElement(
|
|
1891
|
+
View7,
|
|
1892
|
+
{
|
|
1893
|
+
style: {
|
|
1894
|
+
display: "flex",
|
|
1895
|
+
flexDirection: "row",
|
|
1896
|
+
flexWrap: "wrap"
|
|
1897
|
+
}
|
|
1898
|
+
},
|
|
1899
|
+
/* @__PURE__ */ React12.createElement(Text_default, { style: { fontSize: 16 } }, "Name: "),
|
|
1900
|
+
/* @__PURE__ */ React12.createElement(Text_default, { style: { fontSize: 16, flexWrap: "wrap" } }, booking.devoteeName)
|
|
1901
|
+
),
|
|
1902
|
+
/* @__PURE__ */ React12.createElement(Text_default, { style: { fontSize: 16 } }, "Nakshatra: ", booking.nakshatra)
|
|
1903
|
+
);
|
|
1904
|
+
});
|
|
1905
|
+
})
|
|
1906
|
+
)) : null));
|
|
1808
1907
|
};
|
|
1809
1908
|
var A4PujaList_default = A4PujaList;
|
|
1810
1909
|
|
|
@@ -3020,7 +3119,7 @@ var A4SettlementsReport = ({
|
|
|
3020
3119
|
fontSize: 9
|
|
3021
3120
|
}
|
|
3022
3121
|
},
|
|
3023
|
-
/* @__PURE__ */ React16.createElement(Text_default, null, item.utr)
|
|
3122
|
+
/* @__PURE__ */ React16.createElement(Text_default, null, item.utr.split("").map((line, index2) => /* @__PURE__ */ React16.createElement(Text_default, { key: index2 }, line)))
|
|
3024
3123
|
),
|
|
3025
3124
|
/* @__PURE__ */ React16.createElement(
|
|
3026
3125
|
View11,
|
package/package.json
CHANGED