@bookmypuja-tech/bmp-pdf 0.3.25 → 0.3.27
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 +151 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1534,9 +1534,13 @@ var A4PujaList = ({
|
|
|
1534
1534
|
/* @__PURE__ */ React12.createElement(Text_default, null, "Date")
|
|
1535
1535
|
)
|
|
1536
1536
|
))), pujas.some(
|
|
1537
|
-
(puja) => puja.bookings.some(
|
|
1537
|
+
(puja) => puja.bookings.some(
|
|
1538
|
+
(booking) => booking.is_early_reminder && !booking.requires_coupon
|
|
1539
|
+
)
|
|
1538
1540
|
) ? pujas.flatMap(
|
|
1539
|
-
(puja, pujaIndex) => puja.bookings.filter(
|
|
1541
|
+
(puja, pujaIndex) => puja.bookings.filter(
|
|
1542
|
+
(booking) => booking.is_early_reminder && !booking.requires_coupon
|
|
1543
|
+
).map((booking, bookingIndex) => {
|
|
1540
1544
|
serialOfEarlyReminders++;
|
|
1541
1545
|
return /* @__PURE__ */ React12.createElement(
|
|
1542
1546
|
View7,
|
|
@@ -1609,7 +1613,9 @@ var A4PujaList = ({
|
|
|
1609
1613
|
}
|
|
1610
1614
|
},
|
|
1611
1615
|
pujas.map((puja, pujaIndex) => {
|
|
1612
|
-
if (puja.bookings.every(
|
|
1616
|
+
if (puja.bookings.every(
|
|
1617
|
+
(booking) => booking.is_early_reminder || booking.requires_coupon
|
|
1618
|
+
))
|
|
1613
1619
|
return null;
|
|
1614
1620
|
serialOfNormalPujas = 0;
|
|
1615
1621
|
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(View7, { wrap: false, style: { marginBottom: 25 } }, /* @__PURE__ */ React12.createElement(View7, null, /* @__PURE__ */ React12.createElement(
|
|
@@ -1700,7 +1706,8 @@ var A4PujaList = ({
|
|
|
1700
1706
|
/* @__PURE__ */ React12.createElement(Text_default, null, "Qty")
|
|
1701
1707
|
)
|
|
1702
1708
|
), puja.bookings.map((booking, bookingIndex) => {
|
|
1703
|
-
if (booking.is_early_reminder || booking.requires_coupon)
|
|
1709
|
+
if (booking.is_early_reminder || booking.requires_coupon)
|
|
1710
|
+
return null;
|
|
1704
1711
|
serialOfNormalPujas++;
|
|
1705
1712
|
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(
|
|
1706
1713
|
View7,
|
|
@@ -1877,12 +1884,11 @@ var A4PujaList = ({
|
|
|
1877
1884
|
),
|
|
1878
1885
|
/* @__PURE__ */ React12.createElement(Text_default, null, booking.phone_number)
|
|
1879
1886
|
),
|
|
1880
|
-
/* @__PURE__ */ React12.createElement(Text_default, { style: { fontSize: 16 } }, puja.name),
|
|
1881
1887
|
/* @__PURE__ */ React12.createElement(
|
|
1882
1888
|
View7,
|
|
1883
1889
|
{
|
|
1884
1890
|
style: {
|
|
1885
|
-
height:
|
|
1891
|
+
height: 15,
|
|
1886
1892
|
width: "100%"
|
|
1887
1893
|
}
|
|
1888
1894
|
}
|
|
@@ -1892,14 +1898,37 @@ var A4PujaList = ({
|
|
|
1892
1898
|
{
|
|
1893
1899
|
style: {
|
|
1894
1900
|
display: "flex",
|
|
1895
|
-
flexDirection: "row"
|
|
1896
|
-
flexWrap: "wrap"
|
|
1901
|
+
flexDirection: "row"
|
|
1897
1902
|
}
|
|
1898
1903
|
},
|
|
1899
|
-
/* @__PURE__ */ React12.createElement(
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1904
|
+
/* @__PURE__ */ React12.createElement(
|
|
1905
|
+
View7,
|
|
1906
|
+
{
|
|
1907
|
+
style: {
|
|
1908
|
+
width: "40%"
|
|
1909
|
+
}
|
|
1910
|
+
},
|
|
1911
|
+
/* @__PURE__ */ React12.createElement(Text_default, null, booking.devoteeName)
|
|
1912
|
+
),
|
|
1913
|
+
/* @__PURE__ */ React12.createElement(
|
|
1914
|
+
View7,
|
|
1915
|
+
{
|
|
1916
|
+
style: {
|
|
1917
|
+
width: "30%"
|
|
1918
|
+
}
|
|
1919
|
+
},
|
|
1920
|
+
/* @__PURE__ */ React12.createElement(Text_default, null, booking.nakshatra)
|
|
1921
|
+
),
|
|
1922
|
+
/* @__PURE__ */ React12.createElement(
|
|
1923
|
+
View7,
|
|
1924
|
+
{
|
|
1925
|
+
style: {
|
|
1926
|
+
width: "30%"
|
|
1927
|
+
}
|
|
1928
|
+
},
|
|
1929
|
+
/* @__PURE__ */ React12.createElement(Text_default, null, puja.name)
|
|
1930
|
+
)
|
|
1931
|
+
)
|
|
1903
1932
|
);
|
|
1904
1933
|
});
|
|
1905
1934
|
})
|
|
@@ -2102,6 +2131,9 @@ var A4CombinedReport = ({
|
|
|
2102
2131
|
});
|
|
2103
2132
|
let serialOfNormalPujas = 0;
|
|
2104
2133
|
let serialOfEarlyReminders = 0;
|
|
2134
|
+
const pujasRequiresCoupon = pujaData.some(
|
|
2135
|
+
(puja) => puja.bookings.some((booking) => booking.requires_coupon)
|
|
2136
|
+
);
|
|
2105
2137
|
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(
|
|
2106
2138
|
Image11,
|
|
2107
2139
|
{
|
|
@@ -2183,9 +2215,13 @@ var A4CombinedReport = ({
|
|
|
2183
2215
|
/* @__PURE__ */ React14.createElement(Text_default, null, "Date")
|
|
2184
2216
|
)
|
|
2185
2217
|
))), pujaData.some(
|
|
2186
|
-
(puja) => puja.bookings.some(
|
|
2218
|
+
(puja) => puja.bookings.some(
|
|
2219
|
+
(booking) => booking.is_early_reminder && !booking.requires_coupon
|
|
2220
|
+
)
|
|
2187
2221
|
) ? pujaData.flatMap(
|
|
2188
|
-
(puja, pujaIndex) => puja.bookings.filter(
|
|
2222
|
+
(puja, pujaIndex) => puja.bookings.filter(
|
|
2223
|
+
(booking) => booking.is_early_reminder && !booking.requires_coupon
|
|
2224
|
+
).map((booking, bookingIndex) => {
|
|
2189
2225
|
serialOfEarlyReminders++;
|
|
2190
2226
|
return /* @__PURE__ */ React14.createElement(
|
|
2191
2227
|
View9,
|
|
@@ -2258,7 +2294,9 @@ var A4CombinedReport = ({
|
|
|
2258
2294
|
}
|
|
2259
2295
|
},
|
|
2260
2296
|
pujaData.map((puja, pujaIndex) => {
|
|
2261
|
-
if (puja.bookings.
|
|
2297
|
+
if (puja.bookings.every(
|
|
2298
|
+
(booking) => booking.is_early_reminder || booking.requires_coupon
|
|
2299
|
+
))
|
|
2262
2300
|
return null;
|
|
2263
2301
|
serialOfNormalPujas = 0;
|
|
2264
2302
|
return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(View9, { wrap: false, style: { marginBottom: 25 } }, /* @__PURE__ */ React14.createElement(View9, null, /* @__PURE__ */ React14.createElement(
|
|
@@ -2349,6 +2387,8 @@ var A4CombinedReport = ({
|
|
|
2349
2387
|
/* @__PURE__ */ React14.createElement(Text_default, null, "Qty")
|
|
2350
2388
|
)
|
|
2351
2389
|
), puja.bookings.map((booking, bookingIndex) => {
|
|
2390
|
+
if (booking.is_early_reminder || booking.requires_coupon)
|
|
2391
|
+
return null;
|
|
2352
2392
|
serialOfNormalPujas++;
|
|
2353
2393
|
return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(
|
|
2354
2394
|
View9,
|
|
@@ -2455,6 +2495,102 @@ var A4CombinedReport = ({
|
|
|
2455
2495
|
));
|
|
2456
2496
|
})));
|
|
2457
2497
|
})
|
|
2498
|
+
)), pujaData.length > 0 && pujasRequiresCoupon && /* @__PURE__ */ React14.createElement(Page10, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React14.createElement(
|
|
2499
|
+
Image11,
|
|
2500
|
+
{
|
|
2501
|
+
fixed: true,
|
|
2502
|
+
style: {
|
|
2503
|
+
height: 15,
|
|
2504
|
+
width: 75,
|
|
2505
|
+
marginBottom: 10
|
|
2506
|
+
},
|
|
2507
|
+
src: bmpLogo
|
|
2508
|
+
}
|
|
2509
|
+
), /* @__PURE__ */ React14.createElement(
|
|
2510
|
+
View9,
|
|
2511
|
+
{
|
|
2512
|
+
style: {
|
|
2513
|
+
display: "flex",
|
|
2514
|
+
flexDirection: "column",
|
|
2515
|
+
marginTop: 10,
|
|
2516
|
+
gap: 15
|
|
2517
|
+
}
|
|
2518
|
+
},
|
|
2519
|
+
pujaData.map((puja, pujaIndex) => {
|
|
2520
|
+
if (!puja.bookings.some((booking) => booking.requires_coupon))
|
|
2521
|
+
return null;
|
|
2522
|
+
return puja.bookings.map((booking, bookingIndex) => {
|
|
2523
|
+
if (!booking.requires_coupon) return null;
|
|
2524
|
+
return /* @__PURE__ */ React14.createElement(
|
|
2525
|
+
View9,
|
|
2526
|
+
{
|
|
2527
|
+
key: bookingIndex,
|
|
2528
|
+
style: {
|
|
2529
|
+
marginBottom: 10,
|
|
2530
|
+
fontSize: 18,
|
|
2531
|
+
padding: 10,
|
|
2532
|
+
border: "1px dotted black"
|
|
2533
|
+
},
|
|
2534
|
+
wrap: false
|
|
2535
|
+
},
|
|
2536
|
+
/* @__PURE__ */ React14.createElement(
|
|
2537
|
+
View9,
|
|
2538
|
+
{
|
|
2539
|
+
style: {
|
|
2540
|
+
display: "flex",
|
|
2541
|
+
flexDirection: "row",
|
|
2542
|
+
justifyContent: "space-between",
|
|
2543
|
+
gap: 10
|
|
2544
|
+
}
|
|
2545
|
+
},
|
|
2546
|
+
/* @__PURE__ */ React14.createElement(
|
|
2547
|
+
View9,
|
|
2548
|
+
{
|
|
2549
|
+
style: {
|
|
2550
|
+
display: "flex",
|
|
2551
|
+
flexDirection: "row",
|
|
2552
|
+
gap: 10
|
|
2553
|
+
}
|
|
2554
|
+
},
|
|
2555
|
+
/* @__PURE__ */ React14.createElement(
|
|
2556
|
+
Text_default,
|
|
2557
|
+
{
|
|
2558
|
+
style: {
|
|
2559
|
+
fontWeight: "semibold"
|
|
2560
|
+
}
|
|
2561
|
+
},
|
|
2562
|
+
booking.invoiceNumber
|
|
2563
|
+
),
|
|
2564
|
+
/* @__PURE__ */ React14.createElement(Text_default, null, booking.date ? new Date(booking.date).toDateString() : date.toDateString())
|
|
2565
|
+
),
|
|
2566
|
+
/* @__PURE__ */ React14.createElement(Text_default, null, booking.phone_number)
|
|
2567
|
+
),
|
|
2568
|
+
/* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 16 } }, puja.name),
|
|
2569
|
+
/* @__PURE__ */ React14.createElement(
|
|
2570
|
+
View9,
|
|
2571
|
+
{
|
|
2572
|
+
style: {
|
|
2573
|
+
height: 8,
|
|
2574
|
+
width: "100%"
|
|
2575
|
+
}
|
|
2576
|
+
}
|
|
2577
|
+
),
|
|
2578
|
+
/* @__PURE__ */ React14.createElement(
|
|
2579
|
+
View9,
|
|
2580
|
+
{
|
|
2581
|
+
style: {
|
|
2582
|
+
display: "flex",
|
|
2583
|
+
flexDirection: "row",
|
|
2584
|
+
flexWrap: "wrap"
|
|
2585
|
+
}
|
|
2586
|
+
},
|
|
2587
|
+
/* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 16 } }, "Name: "),
|
|
2588
|
+
/* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 16, flexWrap: "wrap" } }, booking.devoteeName)
|
|
2589
|
+
),
|
|
2590
|
+
/* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 16 } }, "Nakshatra: ", booking.nakshatra)
|
|
2591
|
+
);
|
|
2592
|
+
});
|
|
2593
|
+
})
|
|
2458
2594
|
)), prasadData.length > 0 && /* @__PURE__ */ React14.createElement(Page10, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React14.createElement(
|
|
2459
2595
|
Image11,
|
|
2460
2596
|
{
|
package/package.json
CHANGED