@bookmypuja-tech/bmp-pdf 0.3.24 → 0.3.26
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 +214 -8
- 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
|
|
|
@@ -2003,6 +2102,9 @@ var A4CombinedReport = ({
|
|
|
2003
2102
|
});
|
|
2004
2103
|
let serialOfNormalPujas = 0;
|
|
2005
2104
|
let serialOfEarlyReminders = 0;
|
|
2105
|
+
const pujasRequiresCoupon = pujaData.some(
|
|
2106
|
+
(puja) => puja.bookings.some((booking) => booking.requires_coupon)
|
|
2107
|
+
);
|
|
2006
2108
|
return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(Document10, null, pujaData.length > 0 && /* @__PURE__ */ React14.createElement(Page10, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React14.createElement(
|
|
2007
2109
|
Image11,
|
|
2008
2110
|
{
|
|
@@ -2084,9 +2186,13 @@ var A4CombinedReport = ({
|
|
|
2084
2186
|
/* @__PURE__ */ React14.createElement(Text_default, null, "Date")
|
|
2085
2187
|
)
|
|
2086
2188
|
))), pujaData.some(
|
|
2087
|
-
(puja) => puja.bookings.some(
|
|
2189
|
+
(puja) => puja.bookings.some(
|
|
2190
|
+
(booking) => booking.is_early_reminder && !booking.requires_coupon
|
|
2191
|
+
)
|
|
2088
2192
|
) ? pujaData.flatMap(
|
|
2089
|
-
(puja, pujaIndex) => puja.bookings.filter(
|
|
2193
|
+
(puja, pujaIndex) => puja.bookings.filter(
|
|
2194
|
+
(booking) => booking.is_early_reminder && !booking.requires_coupon
|
|
2195
|
+
).map((booking, bookingIndex) => {
|
|
2090
2196
|
serialOfEarlyReminders++;
|
|
2091
2197
|
return /* @__PURE__ */ React14.createElement(
|
|
2092
2198
|
View9,
|
|
@@ -2159,7 +2265,9 @@ var A4CombinedReport = ({
|
|
|
2159
2265
|
}
|
|
2160
2266
|
},
|
|
2161
2267
|
pujaData.map((puja, pujaIndex) => {
|
|
2162
|
-
if (puja.bookings.
|
|
2268
|
+
if (puja.bookings.every(
|
|
2269
|
+
(booking) => booking.is_early_reminder || booking.requires_coupon
|
|
2270
|
+
))
|
|
2163
2271
|
return null;
|
|
2164
2272
|
serialOfNormalPujas = 0;
|
|
2165
2273
|
return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(View9, { wrap: false, style: { marginBottom: 25 } }, /* @__PURE__ */ React14.createElement(View9, null, /* @__PURE__ */ React14.createElement(
|
|
@@ -2250,6 +2358,8 @@ var A4CombinedReport = ({
|
|
|
2250
2358
|
/* @__PURE__ */ React14.createElement(Text_default, null, "Qty")
|
|
2251
2359
|
)
|
|
2252
2360
|
), puja.bookings.map((booking, bookingIndex) => {
|
|
2361
|
+
if (booking.is_early_reminder || booking.requires_coupon)
|
|
2362
|
+
return null;
|
|
2253
2363
|
serialOfNormalPujas++;
|
|
2254
2364
|
return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(
|
|
2255
2365
|
View9,
|
|
@@ -2356,6 +2466,102 @@ var A4CombinedReport = ({
|
|
|
2356
2466
|
));
|
|
2357
2467
|
})));
|
|
2358
2468
|
})
|
|
2469
|
+
)), pujaData.length > 0 && pujasRequiresCoupon && /* @__PURE__ */ React14.createElement(Page10, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React14.createElement(
|
|
2470
|
+
Image11,
|
|
2471
|
+
{
|
|
2472
|
+
fixed: true,
|
|
2473
|
+
style: {
|
|
2474
|
+
height: 15,
|
|
2475
|
+
width: 75,
|
|
2476
|
+
marginBottom: 10
|
|
2477
|
+
},
|
|
2478
|
+
src: bmpLogo
|
|
2479
|
+
}
|
|
2480
|
+
), /* @__PURE__ */ React14.createElement(
|
|
2481
|
+
View9,
|
|
2482
|
+
{
|
|
2483
|
+
style: {
|
|
2484
|
+
display: "flex",
|
|
2485
|
+
flexDirection: "column",
|
|
2486
|
+
marginTop: 10,
|
|
2487
|
+
gap: 15
|
|
2488
|
+
}
|
|
2489
|
+
},
|
|
2490
|
+
pujaData.map((puja, pujaIndex) => {
|
|
2491
|
+
if (!puja.bookings.some((booking) => booking.requires_coupon))
|
|
2492
|
+
return null;
|
|
2493
|
+
return puja.bookings.map((booking, bookingIndex) => {
|
|
2494
|
+
if (!booking.requires_coupon) return null;
|
|
2495
|
+
return /* @__PURE__ */ React14.createElement(
|
|
2496
|
+
View9,
|
|
2497
|
+
{
|
|
2498
|
+
key: bookingIndex,
|
|
2499
|
+
style: {
|
|
2500
|
+
marginBottom: 10,
|
|
2501
|
+
fontSize: 18,
|
|
2502
|
+
padding: 10,
|
|
2503
|
+
border: "1px dotted black"
|
|
2504
|
+
},
|
|
2505
|
+
wrap: false
|
|
2506
|
+
},
|
|
2507
|
+
/* @__PURE__ */ React14.createElement(
|
|
2508
|
+
View9,
|
|
2509
|
+
{
|
|
2510
|
+
style: {
|
|
2511
|
+
display: "flex",
|
|
2512
|
+
flexDirection: "row",
|
|
2513
|
+
justifyContent: "space-between",
|
|
2514
|
+
gap: 10
|
|
2515
|
+
}
|
|
2516
|
+
},
|
|
2517
|
+
/* @__PURE__ */ React14.createElement(
|
|
2518
|
+
View9,
|
|
2519
|
+
{
|
|
2520
|
+
style: {
|
|
2521
|
+
display: "flex",
|
|
2522
|
+
flexDirection: "row",
|
|
2523
|
+
gap: 10
|
|
2524
|
+
}
|
|
2525
|
+
},
|
|
2526
|
+
/* @__PURE__ */ React14.createElement(
|
|
2527
|
+
Text_default,
|
|
2528
|
+
{
|
|
2529
|
+
style: {
|
|
2530
|
+
fontWeight: "semibold"
|
|
2531
|
+
}
|
|
2532
|
+
},
|
|
2533
|
+
booking.invoiceNumber
|
|
2534
|
+
),
|
|
2535
|
+
/* @__PURE__ */ React14.createElement(Text_default, null, booking.date ? new Date(booking.date).toDateString() : date.toDateString())
|
|
2536
|
+
),
|
|
2537
|
+
/* @__PURE__ */ React14.createElement(Text_default, null, booking.phone_number)
|
|
2538
|
+
),
|
|
2539
|
+
/* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 16 } }, puja.name),
|
|
2540
|
+
/* @__PURE__ */ React14.createElement(
|
|
2541
|
+
View9,
|
|
2542
|
+
{
|
|
2543
|
+
style: {
|
|
2544
|
+
height: 8,
|
|
2545
|
+
width: "100%"
|
|
2546
|
+
}
|
|
2547
|
+
}
|
|
2548
|
+
),
|
|
2549
|
+
/* @__PURE__ */ React14.createElement(
|
|
2550
|
+
View9,
|
|
2551
|
+
{
|
|
2552
|
+
style: {
|
|
2553
|
+
display: "flex",
|
|
2554
|
+
flexDirection: "row",
|
|
2555
|
+
flexWrap: "wrap"
|
|
2556
|
+
}
|
|
2557
|
+
},
|
|
2558
|
+
/* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 16 } }, "Name: "),
|
|
2559
|
+
/* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 16, flexWrap: "wrap" } }, booking.devoteeName)
|
|
2560
|
+
),
|
|
2561
|
+
/* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 16 } }, "Nakshatra: ", booking.nakshatra)
|
|
2562
|
+
);
|
|
2563
|
+
});
|
|
2564
|
+
})
|
|
2359
2565
|
)), prasadData.length > 0 && /* @__PURE__ */ React14.createElement(Page10, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React14.createElement(
|
|
2360
2566
|
Image11,
|
|
2361
2567
|
{
|
package/package.json
CHANGED