@bookmypuja-tech/bmp-pdf 0.3.25 → 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.js +110 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2102,6 +2102,9 @@ var A4CombinedReport = ({
|
|
|
2102
2102
|
});
|
|
2103
2103
|
let serialOfNormalPujas = 0;
|
|
2104
2104
|
let serialOfEarlyReminders = 0;
|
|
2105
|
+
const pujasRequiresCoupon = pujaData.some(
|
|
2106
|
+
(puja) => puja.bookings.some((booking) => booking.requires_coupon)
|
|
2107
|
+
);
|
|
2105
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(
|
|
2106
2109
|
Image11,
|
|
2107
2110
|
{
|
|
@@ -2183,9 +2186,13 @@ var A4CombinedReport = ({
|
|
|
2183
2186
|
/* @__PURE__ */ React14.createElement(Text_default, null, "Date")
|
|
2184
2187
|
)
|
|
2185
2188
|
))), pujaData.some(
|
|
2186
|
-
(puja) => puja.bookings.some(
|
|
2189
|
+
(puja) => puja.bookings.some(
|
|
2190
|
+
(booking) => booking.is_early_reminder && !booking.requires_coupon
|
|
2191
|
+
)
|
|
2187
2192
|
) ? pujaData.flatMap(
|
|
2188
|
-
(puja, pujaIndex) => puja.bookings.filter(
|
|
2193
|
+
(puja, pujaIndex) => puja.bookings.filter(
|
|
2194
|
+
(booking) => booking.is_early_reminder && !booking.requires_coupon
|
|
2195
|
+
).map((booking, bookingIndex) => {
|
|
2189
2196
|
serialOfEarlyReminders++;
|
|
2190
2197
|
return /* @__PURE__ */ React14.createElement(
|
|
2191
2198
|
View9,
|
|
@@ -2258,7 +2265,9 @@ var A4CombinedReport = ({
|
|
|
2258
2265
|
}
|
|
2259
2266
|
},
|
|
2260
2267
|
pujaData.map((puja, pujaIndex) => {
|
|
2261
|
-
if (puja.bookings.
|
|
2268
|
+
if (puja.bookings.every(
|
|
2269
|
+
(booking) => booking.is_early_reminder || booking.requires_coupon
|
|
2270
|
+
))
|
|
2262
2271
|
return null;
|
|
2263
2272
|
serialOfNormalPujas = 0;
|
|
2264
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(
|
|
@@ -2349,6 +2358,8 @@ var A4CombinedReport = ({
|
|
|
2349
2358
|
/* @__PURE__ */ React14.createElement(Text_default, null, "Qty")
|
|
2350
2359
|
)
|
|
2351
2360
|
), puja.bookings.map((booking, bookingIndex) => {
|
|
2361
|
+
if (booking.is_early_reminder || booking.requires_coupon)
|
|
2362
|
+
return null;
|
|
2352
2363
|
serialOfNormalPujas++;
|
|
2353
2364
|
return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(
|
|
2354
2365
|
View9,
|
|
@@ -2455,6 +2466,102 @@ var A4CombinedReport = ({
|
|
|
2455
2466
|
));
|
|
2456
2467
|
})));
|
|
2457
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
|
+
})
|
|
2458
2565
|
)), prasadData.length > 0 && /* @__PURE__ */ React14.createElement(Page10, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React14.createElement(
|
|
2459
2566
|
Image11,
|
|
2460
2567
|
{
|
package/package.json
CHANGED