@bookmypuja-tech/bmp-pdf 0.2.10 → 0.2.12
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 +282 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1296,6 +1296,8 @@ var A4PujaList = ({
|
|
|
1296
1296
|
templeName,
|
|
1297
1297
|
pujas
|
|
1298
1298
|
}) => {
|
|
1299
|
+
let serialOfNormalPujas = 0;
|
|
1300
|
+
let serialOfEarlyReminders = 0;
|
|
1299
1301
|
return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(Document7, null, /* @__PURE__ */ React11.createElement(Page7, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React11.createElement(
|
|
1300
1302
|
Image9,
|
|
1301
1303
|
{
|
|
@@ -1307,16 +1309,148 @@ var A4PujaList = ({
|
|
|
1307
1309
|
},
|
|
1308
1310
|
src: bmpLogo
|
|
1309
1311
|
}
|
|
1310
|
-
), /* @__PURE__ */ React11.createElement(Text11, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()),
|
|
1312
|
+
), /* @__PURE__ */ React11.createElement(Text11, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), pujas.some(
|
|
1313
|
+
(puja) => puja.bookings.some((booking) => booking.is_early_reminder)
|
|
1314
|
+
) && /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(Text11, { style: { fontSize: 14, fontWeight: "bold", marginTop: 10 } }, "Early Reminders for Upcoming Pujas"), /* @__PURE__ */ React11.createElement(View7, { wrap: false, style: { marginTop: 10 } }, /* @__PURE__ */ React11.createElement(
|
|
1315
|
+
View7,
|
|
1316
|
+
{
|
|
1317
|
+
style: {
|
|
1318
|
+
display: "flex",
|
|
1319
|
+
flexDirection: "row",
|
|
1320
|
+
border: "1px solid black"
|
|
1321
|
+
}
|
|
1322
|
+
},
|
|
1323
|
+
/* @__PURE__ */ React11.createElement(
|
|
1324
|
+
View7,
|
|
1325
|
+
{
|
|
1326
|
+
style: {
|
|
1327
|
+
padding: 6,
|
|
1328
|
+
fontSize: 10,
|
|
1329
|
+
borderRight: "1px solid black",
|
|
1330
|
+
fontWeight: "semibold",
|
|
1331
|
+
width: "10%"
|
|
1332
|
+
}
|
|
1333
|
+
},
|
|
1334
|
+
/* @__PURE__ */ React11.createElement(Text11, null, "Sr No")
|
|
1335
|
+
),
|
|
1336
|
+
/* @__PURE__ */ React11.createElement(
|
|
1337
|
+
View7,
|
|
1338
|
+
{
|
|
1339
|
+
style: {
|
|
1340
|
+
padding: 6,
|
|
1341
|
+
fontSize: 10,
|
|
1342
|
+
borderRight: "1px solid black",
|
|
1343
|
+
fontWeight: "semibold",
|
|
1344
|
+
width: "60%"
|
|
1345
|
+
}
|
|
1346
|
+
},
|
|
1347
|
+
/* @__PURE__ */ React11.createElement(Text11, null, "Puja Name")
|
|
1348
|
+
),
|
|
1349
|
+
/* @__PURE__ */ React11.createElement(
|
|
1350
|
+
View7,
|
|
1351
|
+
{
|
|
1352
|
+
style: {
|
|
1353
|
+
padding: 6,
|
|
1354
|
+
fontSize: 10,
|
|
1355
|
+
borderRight: "1px solid black",
|
|
1356
|
+
fontWeight: "semibold",
|
|
1357
|
+
width: "10%"
|
|
1358
|
+
}
|
|
1359
|
+
},
|
|
1360
|
+
/* @__PURE__ */ React11.createElement(Text11, null, "Qty")
|
|
1361
|
+
),
|
|
1362
|
+
/* @__PURE__ */ React11.createElement(
|
|
1363
|
+
View7,
|
|
1364
|
+
{
|
|
1365
|
+
style: {
|
|
1366
|
+
padding: 6,
|
|
1367
|
+
fontSize: 10,
|
|
1368
|
+
borderRight: "none",
|
|
1369
|
+
fontWeight: "semibold",
|
|
1370
|
+
width: "20%"
|
|
1371
|
+
}
|
|
1372
|
+
},
|
|
1373
|
+
/* @__PURE__ */ React11.createElement(Text11, null, "Date")
|
|
1374
|
+
)
|
|
1375
|
+
))), pujas.some(
|
|
1376
|
+
(puja) => puja.bookings.some((booking) => booking.is_early_reminder)
|
|
1377
|
+
) ? pujas.flatMap(
|
|
1378
|
+
(puja, pujaIndex) => puja.bookings.filter((booking) => booking.is_early_reminder).map((booking, bookingIndex) => {
|
|
1379
|
+
serialOfEarlyReminders++;
|
|
1380
|
+
return /* @__PURE__ */ React11.createElement(
|
|
1381
|
+
View7,
|
|
1382
|
+
{
|
|
1383
|
+
key: `${pujaIndex}-${bookingIndex}`,
|
|
1384
|
+
style: {
|
|
1385
|
+
display: "flex",
|
|
1386
|
+
flexDirection: "row",
|
|
1387
|
+
border: "1px solid black",
|
|
1388
|
+
borderTop: "none"
|
|
1389
|
+
}
|
|
1390
|
+
},
|
|
1391
|
+
/* @__PURE__ */ React11.createElement(
|
|
1392
|
+
View7,
|
|
1393
|
+
{
|
|
1394
|
+
style: {
|
|
1395
|
+
padding: 6,
|
|
1396
|
+
fontSize: 10,
|
|
1397
|
+
borderRight: "1px solid black",
|
|
1398
|
+
width: "10%"
|
|
1399
|
+
}
|
|
1400
|
+
},
|
|
1401
|
+
/* @__PURE__ */ React11.createElement(Text11, null, serialOfEarlyReminders)
|
|
1402
|
+
),
|
|
1403
|
+
/* @__PURE__ */ React11.createElement(
|
|
1404
|
+
View7,
|
|
1405
|
+
{
|
|
1406
|
+
style: {
|
|
1407
|
+
padding: 6,
|
|
1408
|
+
fontSize: 10,
|
|
1409
|
+
borderRight: "1px solid black",
|
|
1410
|
+
width: "60%"
|
|
1411
|
+
}
|
|
1412
|
+
},
|
|
1413
|
+
/* @__PURE__ */ React11.createElement(Text11, null, puja.name)
|
|
1414
|
+
),
|
|
1415
|
+
/* @__PURE__ */ React11.createElement(
|
|
1416
|
+
View7,
|
|
1417
|
+
{
|
|
1418
|
+
style: {
|
|
1419
|
+
padding: 6,
|
|
1420
|
+
fontSize: 10,
|
|
1421
|
+
borderRight: "1px solid black",
|
|
1422
|
+
width: "10%"
|
|
1423
|
+
}
|
|
1424
|
+
},
|
|
1425
|
+
/* @__PURE__ */ React11.createElement(Text11, null, booking.quantity)
|
|
1426
|
+
),
|
|
1427
|
+
/* @__PURE__ */ React11.createElement(
|
|
1428
|
+
View7,
|
|
1429
|
+
{
|
|
1430
|
+
style: {
|
|
1431
|
+
padding: 6,
|
|
1432
|
+
fontSize: 10,
|
|
1433
|
+
borderRight: "none",
|
|
1434
|
+
width: "20%"
|
|
1435
|
+
}
|
|
1436
|
+
},
|
|
1437
|
+
/* @__PURE__ */ React11.createElement(Text11, null, booking.date ? new Date(booking.date).toDateString() : "")
|
|
1438
|
+
)
|
|
1439
|
+
);
|
|
1440
|
+
})
|
|
1441
|
+
) : null, /* @__PURE__ */ React11.createElement(Text11, { style: { fontSize: 14, fontWeight: "bold", marginTop: 20 } }, "Puja List"), /* @__PURE__ */ React11.createElement(Text11, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React11.createElement(
|
|
1311
1442
|
View7,
|
|
1312
1443
|
{
|
|
1313
1444
|
style: {
|
|
1314
1445
|
display: "flex",
|
|
1315
1446
|
flexDirection: "column",
|
|
1316
|
-
marginTop:
|
|
1447
|
+
marginTop: 10
|
|
1317
1448
|
}
|
|
1318
1449
|
},
|
|
1319
1450
|
pujas.map((puja, pujaIndex) => {
|
|
1451
|
+
if (puja.bookings.some((booking) => booking.is_early_reminder))
|
|
1452
|
+
return null;
|
|
1453
|
+
serialOfNormalPujas = 0;
|
|
1320
1454
|
return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(View7, { wrap: false, style: { marginBottom: 25 } }, /* @__PURE__ */ React11.createElement(View7, null, /* @__PURE__ */ React11.createElement(
|
|
1321
1455
|
Text11,
|
|
1322
1456
|
{
|
|
@@ -1407,6 +1541,7 @@ var A4PujaList = ({
|
|
|
1407
1541
|
/* @__PURE__ */ React11.createElement(Text11, null, "Qty")
|
|
1408
1542
|
)
|
|
1409
1543
|
), puja.bookings.map((booking, bookingIndex) => {
|
|
1544
|
+
serialOfNormalPujas++;
|
|
1410
1545
|
return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(
|
|
1411
1546
|
View7,
|
|
1412
1547
|
{
|
|
@@ -1428,7 +1563,7 @@ var A4PujaList = ({
|
|
|
1428
1563
|
width: "10%"
|
|
1429
1564
|
}
|
|
1430
1565
|
},
|
|
1431
|
-
/* @__PURE__ */ React11.createElement(Text11, null,
|
|
1566
|
+
/* @__PURE__ */ React11.createElement(Text11, null, serialOfNormalPujas)
|
|
1432
1567
|
),
|
|
1433
1568
|
/* @__PURE__ */ React11.createElement(
|
|
1434
1569
|
View7,
|
|
@@ -1712,6 +1847,8 @@ var A4CombinedReport = ({
|
|
|
1712
1847
|
address
|
|
1713
1848
|
};
|
|
1714
1849
|
});
|
|
1850
|
+
let serialOfNormalPujas = 0;
|
|
1851
|
+
let serialOfEarlyReminders = 0;
|
|
1715
1852
|
return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(Document9, null, pujaData.length > 0 && /* @__PURE__ */ React13.createElement(Page9, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React13.createElement(
|
|
1716
1853
|
Image11,
|
|
1717
1854
|
{
|
|
@@ -1723,16 +1860,154 @@ var A4CombinedReport = ({
|
|
|
1723
1860
|
},
|
|
1724
1861
|
src: bmpLogo
|
|
1725
1862
|
}
|
|
1726
|
-
), /* @__PURE__ */ React13.createElement(Text13, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()),
|
|
1863
|
+
), /* @__PURE__ */ React13.createElement(Text13, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), pujaData.some(
|
|
1864
|
+
(puja) => puja.bookings.some((booking) => booking.is_early_reminder)
|
|
1865
|
+
) && /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(
|
|
1866
|
+
Text13,
|
|
1867
|
+
{
|
|
1868
|
+
style: { fontSize: 14, fontWeight: "bold", marginTop: 10 }
|
|
1869
|
+
},
|
|
1870
|
+
"Early Reminders for Upcoming Pujas"
|
|
1871
|
+
), /* @__PURE__ */ React13.createElement(View9, { wrap: false, style: { marginTop: 10 } }, /* @__PURE__ */ React13.createElement(
|
|
1872
|
+
View9,
|
|
1873
|
+
{
|
|
1874
|
+
style: {
|
|
1875
|
+
display: "flex",
|
|
1876
|
+
flexDirection: "row",
|
|
1877
|
+
border: "1px solid black"
|
|
1878
|
+
}
|
|
1879
|
+
},
|
|
1880
|
+
/* @__PURE__ */ React13.createElement(
|
|
1881
|
+
View9,
|
|
1882
|
+
{
|
|
1883
|
+
style: {
|
|
1884
|
+
padding: 6,
|
|
1885
|
+
fontSize: 10,
|
|
1886
|
+
borderRight: "1px solid black",
|
|
1887
|
+
fontWeight: "semibold",
|
|
1888
|
+
width: "10%"
|
|
1889
|
+
}
|
|
1890
|
+
},
|
|
1891
|
+
/* @__PURE__ */ React13.createElement(Text13, null, "Sr No")
|
|
1892
|
+
),
|
|
1893
|
+
/* @__PURE__ */ React13.createElement(
|
|
1894
|
+
View9,
|
|
1895
|
+
{
|
|
1896
|
+
style: {
|
|
1897
|
+
padding: 6,
|
|
1898
|
+
fontSize: 10,
|
|
1899
|
+
borderRight: "1px solid black",
|
|
1900
|
+
fontWeight: "semibold",
|
|
1901
|
+
width: "60%"
|
|
1902
|
+
}
|
|
1903
|
+
},
|
|
1904
|
+
/* @__PURE__ */ React13.createElement(Text13, null, "Puja Name")
|
|
1905
|
+
),
|
|
1906
|
+
/* @__PURE__ */ React13.createElement(
|
|
1907
|
+
View9,
|
|
1908
|
+
{
|
|
1909
|
+
style: {
|
|
1910
|
+
padding: 6,
|
|
1911
|
+
fontSize: 10,
|
|
1912
|
+
borderRight: "1px solid black",
|
|
1913
|
+
fontWeight: "semibold",
|
|
1914
|
+
width: "10%"
|
|
1915
|
+
}
|
|
1916
|
+
},
|
|
1917
|
+
/* @__PURE__ */ React13.createElement(Text13, null, "Qty")
|
|
1918
|
+
),
|
|
1919
|
+
/* @__PURE__ */ React13.createElement(
|
|
1920
|
+
View9,
|
|
1921
|
+
{
|
|
1922
|
+
style: {
|
|
1923
|
+
padding: 6,
|
|
1924
|
+
fontSize: 10,
|
|
1925
|
+
borderRight: "none",
|
|
1926
|
+
fontWeight: "semibold",
|
|
1927
|
+
width: "20%"
|
|
1928
|
+
}
|
|
1929
|
+
},
|
|
1930
|
+
/* @__PURE__ */ React13.createElement(Text13, null, "Date")
|
|
1931
|
+
)
|
|
1932
|
+
))), pujaData.some(
|
|
1933
|
+
(puja) => puja.bookings.some((booking) => booking.is_early_reminder)
|
|
1934
|
+
) ? pujaData.flatMap(
|
|
1935
|
+
(puja, pujaIndex) => puja.bookings.filter((booking) => booking.is_early_reminder).map((booking, bookingIndex) => {
|
|
1936
|
+
serialOfEarlyReminders++;
|
|
1937
|
+
return /* @__PURE__ */ React13.createElement(
|
|
1938
|
+
View9,
|
|
1939
|
+
{
|
|
1940
|
+
key: `${pujaIndex}-${bookingIndex}`,
|
|
1941
|
+
style: {
|
|
1942
|
+
display: "flex",
|
|
1943
|
+
flexDirection: "row",
|
|
1944
|
+
border: "1px solid black",
|
|
1945
|
+
borderTop: "none"
|
|
1946
|
+
}
|
|
1947
|
+
},
|
|
1948
|
+
/* @__PURE__ */ React13.createElement(
|
|
1949
|
+
View9,
|
|
1950
|
+
{
|
|
1951
|
+
style: {
|
|
1952
|
+
padding: 6,
|
|
1953
|
+
fontSize: 10,
|
|
1954
|
+
borderRight: "1px solid black",
|
|
1955
|
+
width: "10%"
|
|
1956
|
+
}
|
|
1957
|
+
},
|
|
1958
|
+
/* @__PURE__ */ React13.createElement(Text13, null, serialOfEarlyReminders)
|
|
1959
|
+
),
|
|
1960
|
+
/* @__PURE__ */ React13.createElement(
|
|
1961
|
+
View9,
|
|
1962
|
+
{
|
|
1963
|
+
style: {
|
|
1964
|
+
padding: 6,
|
|
1965
|
+
fontSize: 10,
|
|
1966
|
+
borderRight: "1px solid black",
|
|
1967
|
+
width: "60%"
|
|
1968
|
+
}
|
|
1969
|
+
},
|
|
1970
|
+
/* @__PURE__ */ React13.createElement(Text13, null, puja.name)
|
|
1971
|
+
),
|
|
1972
|
+
/* @__PURE__ */ React13.createElement(
|
|
1973
|
+
View9,
|
|
1974
|
+
{
|
|
1975
|
+
style: {
|
|
1976
|
+
padding: 6,
|
|
1977
|
+
fontSize: 10,
|
|
1978
|
+
borderRight: "1px solid black",
|
|
1979
|
+
width: "10%"
|
|
1980
|
+
}
|
|
1981
|
+
},
|
|
1982
|
+
/* @__PURE__ */ React13.createElement(Text13, null, booking.quantity)
|
|
1983
|
+
),
|
|
1984
|
+
/* @__PURE__ */ React13.createElement(
|
|
1985
|
+
View9,
|
|
1986
|
+
{
|
|
1987
|
+
style: {
|
|
1988
|
+
padding: 6,
|
|
1989
|
+
fontSize: 10,
|
|
1990
|
+
borderRight: "none",
|
|
1991
|
+
width: "20%"
|
|
1992
|
+
}
|
|
1993
|
+
},
|
|
1994
|
+
/* @__PURE__ */ React13.createElement(Text13, null, booking.date ? new Date(booking.date).toDateString() : "")
|
|
1995
|
+
)
|
|
1996
|
+
);
|
|
1997
|
+
})
|
|
1998
|
+
) : null, /* @__PURE__ */ React13.createElement(Text13, { style: { fontSize: 14, fontWeight: "bold", marginTop: 20 } }, "Puja List"), /* @__PURE__ */ React13.createElement(Text13, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React13.createElement(
|
|
1727
1999
|
View9,
|
|
1728
2000
|
{
|
|
1729
2001
|
style: {
|
|
1730
2002
|
display: "flex",
|
|
1731
2003
|
flexDirection: "column",
|
|
1732
|
-
marginTop:
|
|
2004
|
+
marginTop: 10
|
|
1733
2005
|
}
|
|
1734
2006
|
},
|
|
1735
2007
|
pujaData.map((puja, pujaIndex) => {
|
|
2008
|
+
if (puja.bookings.some((booking) => booking.is_early_reminder))
|
|
2009
|
+
return null;
|
|
2010
|
+
serialOfNormalPujas = 0;
|
|
1736
2011
|
return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(View9, { wrap: false, style: { marginBottom: 25 } }, /* @__PURE__ */ React13.createElement(View9, null, /* @__PURE__ */ React13.createElement(
|
|
1737
2012
|
Text13,
|
|
1738
2013
|
{
|
|
@@ -1823,6 +2098,7 @@ var A4CombinedReport = ({
|
|
|
1823
2098
|
/* @__PURE__ */ React13.createElement(Text13, null, "Qty")
|
|
1824
2099
|
)
|
|
1825
2100
|
), puja.bookings.map((booking, bookingIndex) => {
|
|
2101
|
+
serialOfNormalPujas++;
|
|
1826
2102
|
return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(
|
|
1827
2103
|
View9,
|
|
1828
2104
|
{
|
|
@@ -1844,7 +2120,7 @@ var A4CombinedReport = ({
|
|
|
1844
2120
|
width: "10%"
|
|
1845
2121
|
}
|
|
1846
2122
|
},
|
|
1847
|
-
/* @__PURE__ */ React13.createElement(Text13, null,
|
|
2123
|
+
/* @__PURE__ */ React13.createElement(Text13, null, serialOfNormalPujas)
|
|
1848
2124
|
),
|
|
1849
2125
|
/* @__PURE__ */ React13.createElement(
|
|
1850
2126
|
View9,
|
package/package.json
CHANGED