@bookmypuja-tech/bmp-pdf 0.3.33 → 0.3.35

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 CHANGED
@@ -68,6 +68,8 @@ declare const T2Inch: ({ data, dates, }: {
68
68
  dates: [string | Date, string | Date];
69
69
  }) => React.JSX.Element;
70
70
 
71
+ type IReportTimings = "morning" | "evening" | undefined | null;
72
+
71
73
  interface KitchenReportData {
72
74
  name: string;
73
75
  quantity: number;
@@ -76,6 +78,7 @@ interface KitchenReportProps {
76
78
  date: Date;
77
79
  templeName: string;
78
80
  data: KitchenReportData[];
81
+ reportTiming?: IReportTimings;
79
82
  }
80
83
 
81
84
  interface ITransactionItem {
@@ -118,6 +121,7 @@ interface IPrasadReport {
118
121
  date: Date;
119
122
  templeName: string;
120
123
  data: IPrasadItem[];
124
+ reportTiming?: IReportTimings;
121
125
  }
122
126
 
123
127
  interface IPuja {
@@ -139,6 +143,7 @@ interface IPujaList {
139
143
  date: Date;
140
144
  templeName: string;
141
145
  pujas: IPuja[];
146
+ reportTiming?: IReportTimings;
142
147
  }
143
148
 
144
149
  interface ISummaryPuja {
@@ -153,6 +158,7 @@ interface ISummaryPujaList {
153
158
  date: Date;
154
159
  templeName: string;
155
160
  pujas: ISummaryPuja[];
161
+ reportTiming?: IReportTimings;
156
162
  }
157
163
 
158
164
  interface IPostalItem {
@@ -174,6 +180,7 @@ interface CombinedReportData {
174
180
  pujaData: IPuja[];
175
181
  prasadData: IPrasadItem[];
176
182
  deliveryData: IPostalItem[];
183
+ reportTiming?: IReportTimings;
177
184
  }
178
185
 
179
186
  interface ITempleData {
@@ -232,6 +239,7 @@ interface IInvoiceData {
232
239
  repeatStartDate?: string;
233
240
  repeatEndDate?: string;
234
241
  pujaDate?: string;
242
+ timing: string;
235
243
  }[];
236
244
  platformCharges?: string;
237
245
  gst?: string;
package/dist/index.js CHANGED
@@ -35,6 +35,10 @@ var notoSansBold = "https://res.cloudinary.com/dpaigt2bx/raw/upload/v1743431605/
35
35
  var notoSansSemiBold = "https://res.cloudinary.com/dpaigt2bx/raw/upload/v1743431765/NotoSans-SemiBold_o96oas.ttf";
36
36
  var bmpLogo2 = "https://res.cloudinary.com/dpaigt2bx/image/upload/v1752653165/BookMyPuja_1_1_bd1xa0.png";
37
37
  var paidIcon = "https://res.cloudinary.com/dpaigt2bx/image/upload/v1752669810/paid-5025785_1280_afg4ob_gcacmg.png";
38
+ var reportTimingsObj = {
39
+ morning: "Morning",
40
+ evening: "Evening"
41
+ };
38
42
 
39
43
  // src/sizes/A4Print.tsx
40
44
  Font.register({
@@ -694,7 +698,8 @@ import React8 from "react";
694
698
  var A4KitchenReport = ({
695
699
  date,
696
700
  templeName,
697
- data
701
+ data,
702
+ reportTiming
698
703
  }) => {
699
704
  return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(Document4, null, /* @__PURE__ */ React8.createElement(Page4, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React8.createElement(
700
705
  Image5,
@@ -707,7 +712,7 @@ var A4KitchenReport = ({
707
712
  },
708
713
  src: bmpLogo
709
714
  }
710
- ), /* @__PURE__ */ React8.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), /* @__PURE__ */ React8.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Temple Prasad (Kitchen) Report"), /* @__PURE__ */ React8.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React8.createElement(
715
+ ), /* @__PURE__ */ React8.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), reportTiming && Object.keys(reportTimingsObj).includes(reportTiming) ? /* @__PURE__ */ React8.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, reportTimingsObj[reportTiming], " Report") : null, /* @__PURE__ */ React8.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Temple Prasad (Kitchen) Report"), /* @__PURE__ */ React8.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React8.createElement(
711
716
  View3,
712
717
  {
713
718
  style: {
@@ -1259,7 +1264,8 @@ import React11 from "react";
1259
1264
  var A4PrasadReport = ({
1260
1265
  date,
1261
1266
  templeName,
1262
- data
1267
+ data,
1268
+ reportTiming
1263
1269
  }) => {
1264
1270
  const sortedPrasadItems = data.sort((a, b) => {
1265
1271
  return a.invoiceNumber.localeCompare(b.invoiceNumber);
@@ -1275,7 +1281,7 @@ var A4PrasadReport = ({
1275
1281
  },
1276
1282
  src: bmpLogo
1277
1283
  }
1278
- ), /* @__PURE__ */ React11.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), /* @__PURE__ */ React11.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Prasad Report"), /* @__PURE__ */ React11.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React11.createElement(
1284
+ ), /* @__PURE__ */ React11.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), reportTiming && Object.keys(reportTimingsObj).includes(reportTiming) ? /* @__PURE__ */ React11.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, reportTimingsObj[reportTiming], " Report") : null, /* @__PURE__ */ React11.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Prasad Report"), /* @__PURE__ */ React11.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React11.createElement(
1279
1285
  View6,
1280
1286
  {
1281
1287
  style: {
@@ -1452,7 +1458,8 @@ import React12 from "react";
1452
1458
  var A4PujaList = ({
1453
1459
  date,
1454
1460
  templeName,
1455
- pujas
1461
+ pujas,
1462
+ reportTiming
1456
1463
  }) => {
1457
1464
  let serialOfNormalPujas = 0;
1458
1465
  let serialOfEarlyReminders = 0;
@@ -1470,7 +1477,7 @@ var A4PujaList = ({
1470
1477
  },
1471
1478
  src: bmpLogo
1472
1479
  }
1473
- ), /* @__PURE__ */ React12.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), pujas.some(
1480
+ ), /* @__PURE__ */ React12.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), reportTiming && Object.keys(reportTimingsObj).includes(reportTiming) ? /* @__PURE__ */ React12.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, reportTimingsObj[reportTiming], " Report") : null, pujas.some(
1474
1481
  (puja) => puja.bookings.some((booking) => booking.is_early_reminder)
1475
1482
  ) && /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold", marginTop: 10 } }, "Early Reminders for Upcoming Pujas"), /* @__PURE__ */ React12.createElement(View7, { wrap: false, style: { marginTop: 10 } }, /* @__PURE__ */ React12.createElement(
1476
1483
  View7,
@@ -1910,16 +1917,12 @@ var A4PujaList_default = A4PujaList;
1910
1917
 
1911
1918
  // src/sizes/a4/A4Summary.tsx
1912
1919
  import React13 from "react";
1913
- import {
1914
- Page as Page9,
1915
- Document as Document9,
1916
- Image as Image10,
1917
- View as View8
1918
- } from "@react-pdf/renderer";
1920
+ import { Page as Page9, Document as Document9, Image as Image10, View as View8 } from "@react-pdf/renderer";
1919
1921
  var A4Summary = ({
1920
1922
  templeName,
1921
1923
  date,
1922
- pujas
1924
+ pujas,
1925
+ reportTiming
1923
1926
  }) => {
1924
1927
  const sortedPujaList = pujas.sort((a, b) => {
1925
1928
  const aTotalCount = a.nakshatras.length;
@@ -1948,6 +1951,7 @@ var A4Summary = ({
1948
1951
  }
1949
1952
  ),
1950
1953
  /* @__PURE__ */ React13.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()),
1954
+ reportTiming && Object.keys(reportTimingsObj).includes(reportTiming) ? /* @__PURE__ */ React13.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, reportTimingsObj[reportTiming], " Report") : null,
1951
1955
  /* @__PURE__ */ React13.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Puja Summary"),
1952
1956
  /* @__PURE__ */ React13.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`),
1953
1957
  /* @__PURE__ */ React13.createElement(
@@ -2085,7 +2089,8 @@ var A4CombinedReport = ({
2085
2089
  templeName,
2086
2090
  pujaData,
2087
2091
  prasadData,
2088
- deliveryData
2092
+ deliveryData,
2093
+ reportTiming
2089
2094
  }) => {
2090
2095
  deliveryData = deliveryData.map((item) => {
2091
2096
  let address = "";
@@ -2117,7 +2122,7 @@ var A4CombinedReport = ({
2117
2122
  },
2118
2123
  src: bmpLogo
2119
2124
  }
2120
- ), /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), pujaData.some(
2125
+ ), /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), reportTiming && Object.keys(reportTimingsObj).includes(reportTiming) ? /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, reportTimingsObj[reportTiming], " Report") : null, pujaData.some(
2121
2126
  (puja) => puja.bookings.some((booking) => booking.is_early_reminder)
2122
2127
  ) && /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(
2123
2128
  Text_default,
@@ -2568,7 +2573,7 @@ var A4CombinedReport = ({
2568
2573
  },
2569
2574
  src: bmpLogo
2570
2575
  }
2571
- ), /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Prasad Report"), /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React14.createElement(
2576
+ ), /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), reportTiming && Object.keys(reportTimingsObj).includes(reportTiming) ? /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, reportTimingsObj[reportTiming], " Report") : null, /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Prasad Report"), /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React14.createElement(
2572
2577
  View9,
2573
2578
  {
2574
2579
  style: {
@@ -2722,7 +2727,7 @@ var A4CombinedReport = ({
2722
2727
  },
2723
2728
  src: bmpLogo
2724
2729
  }
2725
- ), /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Prasad Delivery Postal Report"), /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React14.createElement(
2730
+ ), /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), reportTiming && Object.keys(reportTimingsObj).includes(reportTiming) ? /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, reportTimingsObj[reportTiming], " Report") : null, /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Prasad Delivery Postal Report"), /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React14.createElement(
2726
2731
  View9,
2727
2732
  {
2728
2733
  style: {
@@ -3343,7 +3348,9 @@ var A4Invoice = ({ data }) => {
3343
3348
  color: "#333333"
3344
3349
  }
3345
3350
  },
3346
- item.pujaDate
3351
+ item.pujaDate,
3352
+ " ",
3353
+ item.timing ? `- ${item.timing}` : null
3347
3354
  ) : null,
3348
3355
  item.repeatEndDate && item.repeatStartDate ? /* @__PURE__ */ React17.createElement(
3349
3356
  Text_default,
@@ -3355,7 +3362,9 @@ var A4Invoice = ({ data }) => {
3355
3362
  },
3356
3363
  item.repeatStartDate,
3357
3364
  " to ",
3358
- item.repeatEndDate
3365
+ item.repeatEndDate,
3366
+ " ",
3367
+ item.timing ? `- ${item.timing}` : null
3359
3368
  ) : null
3360
3369
  ),
3361
3370
  /* @__PURE__ */ React17.createElement(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bookmypuja-tech/bmp-pdf",
3
3
  "description": "PDF Report Generation for Temple360 and T-360 by BookMyPuja",
4
- "version": "0.3.33",
4
+ "version": "0.3.35",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",