shareneus 1.4.47 → 1.4.48

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.
Files changed (55) hide show
  1. package/dist/accounting/counter-sales/auto-sales-receipt-pdf.service.js +1 -1
  2. package/dist/accounting/counter-sales/sales-receipt-print.service.js +1 -1
  3. package/dist/accounting/invoice/inv-pdf.service.js +1 -1
  4. package/dist/accounting/invoice/invoice-letterhead-pdf.service.js +1 -1
  5. package/dist/accounting/invoice/reports/excel/analysis-excel.service.d.ts +3 -3
  6. package/dist/accounting/invoice/reports/excel/analysis-excel.service.js +6 -6
  7. package/dist/accounting/invoice/reports/pdf/analysis-pdf.service.d.ts +4 -4
  8. package/dist/accounting/invoice/reports/pdf/analysis-pdf.service.js +10 -9
  9. package/dist/accounting/invoice/reports/pdf/category-wise-item-pdf.service.js +0 -2
  10. package/dist/accounting/invoice/reports/pdf/cust-wise-sales-details-pdf.service.js +0 -2
  11. package/dist/accounting/invoice/reports/pdf/cust-wise-sales-summary-pdf.service.js +0 -2
  12. package/dist/accounting/invoice/reports/pdf/item-wise-doctor-sale-pdf.service.js +0 -2
  13. package/dist/accounting/invoice/reports/pdf/item-wise-sales-pdf.service.js +0 -2
  14. package/dist/accounting/invoice/reports/pdf/manf-wise-sales-pdf.service.js +0 -2
  15. package/dist/accounting/invoice/reports/pdf/operator-wise-details-pdf.service.js +0 -2
  16. package/dist/accounting/invoice/reports/pdf/operator-wise-summary-pdf.js +0 -2
  17. package/dist/accounting/invoice/reports/pdf/sales-by-service-pdf.service.js +0 -2
  18. package/dist/accounting/invoice/reports/pdf/scheduled-drug-pdf.service.js +0 -2
  19. package/dist/accounting/invoice/reports/pdf/scheduled-drug-summary-pdf.service.js +0 -2
  20. package/dist/accounting/invoice/shared-inv-pdf.service.js +1 -1
  21. package/dist/accounting/payment-receive/reports/pdf/customer-balances-pdf.service.d.ts +1 -1
  22. package/dist/accounting/payment-receive/reports/pdf/customer-balances-pdf.service.js +3 -3
  23. package/dist/accounting/payment-receive/reports/pdf/payment-report-pdf.service.d.ts +4 -4
  24. package/dist/accounting/payment-receive/reports/pdf/payment-report-pdf.service.js +9 -11
  25. package/dist/appointments/consultations/consultation-fee-receipt.service.d.ts +1 -1
  26. package/dist/appointments/consultations/consultation-fee-receipt.service.js +3 -3
  27. package/dist/appointments/consultations/consultation-full-pdf.service.d.ts +2 -2
  28. package/dist/appointments/consultations/consultation-full-pdf.service.js +7 -7
  29. package/dist/appointments/consultations/consultation-letterhead-pdf.service.d.ts +2 -3
  30. package/dist/appointments/consultations/consultation-letterhead-pdf.service.js +7 -15
  31. package/dist/appointments/consultations/consultation-pdf.service.d.ts +2 -3
  32. package/dist/appointments/consultations/consultation-pdf.service.js +14 -15
  33. package/dist/inventory/items/issue-parts-pdf.service.js +1 -1
  34. package/dist/inventory/items/reports/pdf/expiring-drugs-pdf.service.d.ts +1 -1
  35. package/dist/inventory/items/reports/pdf/expiring-drugs-pdf.service.js +4 -4
  36. package/dist/inventory/items/reports/pdf/item-wise-mout-details-pdf.js +0 -2
  37. package/dist/inventory/items/reports/pdf/item-wise-mout-summary-pdf.js +0 -2
  38. package/dist/inventory/items/reports/pdf/reorder-point-pdf.service.js +1 -1
  39. package/dist/inventory/transfer-order/transfer-order-pdf.service.js +1 -2
  40. package/dist/purchases/payment-made/reports/pdf/vendor-balances-pdf.service.d.ts +1 -1
  41. package/dist/purchases/payment-made/reports/pdf/vendor-balances-pdf.service.js +3 -3
  42. package/dist/services/reports/pdf/next-service-date-pdf.service.js +0 -2
  43. package/dist/services/reports/pdf/repair-orders-pdf.service.js +0 -1
  44. package/dist/services/separate-wo-print.service.d.ts +1 -1
  45. package/dist/services/separate-wo-print.service.js +4 -4
  46. package/dist/shared/shared-print.service.js +2 -1
  47. package/dist/tasks/meetings/meeting-pdf.d.ts +4 -4
  48. package/dist/tasks/meetings/meeting-pdf.js +9 -9
  49. package/dist/tasks/tasks/task-pdf.service.d.ts +4 -4
  50. package/dist/tasks/tasks/task-pdf.service.js +8 -8
  51. package/dist/tasks/tasks/task-reports-pdf.service.d.ts +6 -6
  52. package/dist/tasks/tasks/task-reports-pdf.service.js +14 -14
  53. package/dist/utils/my-date.d.ts +6 -7
  54. package/dist/utils/my-date.js +16 -16
  55. package/package.json +1 -1
@@ -185,7 +185,7 @@ export declare class ConsultationPDFService {
185
185
  width: number;
186
186
  })[];
187
187
  })[];
188
- static GetCnsltDate(CnstData: any): string | null;
188
+ static GetCnsltDate(CnstData: any, User: any): string | null;
189
189
  static GetHeaderBasedOnCondition(CnstData: any, Entity: any, HeaderName: any, Image: any, HColor: any, AColor: any, text: any): {
190
190
  columns: ({
191
191
  columns: any;
@@ -248,10 +248,9 @@ export declare class ConsultationPDFService {
248
248
  })[];
249
249
  };
250
250
  static GetPhoneNumber(phone: any): string;
251
- static DifferenceInYears(DOB: any): string;
251
+ static DifferenceInYears(DOB: any, TZ: any): string;
252
252
  static GetDiagnosis(Diags: any): any;
253
253
  static GetComplaints(Comps: any): any;
254
- static GetDate(DatesDetails: any): string;
255
254
  static CustomerAndVehicleDetailsAfterLine(): {
256
255
  canvas: {
257
256
  type: string;
@@ -208,11 +208,11 @@ class ConsultationPDFService {
208
208
  {
209
209
  columns: [{
210
210
  stack: [{ text: CnstData.Pat.Name, fontSize: 10, marginTop: 5, bold: true },
211
- { text: CnstData.Pat.Code + ' | ' + this.DifferenceInYears(CnstData.Pat.DOB) + ' | ' + CnstData.Pat.Sex + this.GetPhoneNumber((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Pat) === null || _a === void 0 ? void 0 : _a.Ph), fontSize: 10, marginBottom: 5 }]
211
+ { text: CnstData.Pat.Code + ' | ' + this.DifferenceInYears(CnstData.Pat.DOB, Entity.User.TZ) + ' | ' + CnstData.Pat.Sex + this.GetPhoneNumber((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Pat) === null || _a === void 0 ? void 0 : _a.Ph), fontSize: 10, marginBottom: 5 }]
212
212
  },
213
213
  {
214
214
  stack: [
215
- { text: this.GetCnsltDate(CnstData), style: ['headerstyle'] }
215
+ { text: this.GetCnsltDate(CnstData, Entity.User), style: ['headerstyle'] }
216
216
  ], marginTop: 5, width: 120
217
217
  }]
218
218
  }
@@ -220,12 +220,12 @@ class ConsultationPDFService {
220
220
  // { text: CnstData.Pat.Code + ' | ' + this.DifferenceInYears(CnstData.Pat.DOB) + ' | ' + CnstData.Pat.Sex + this.GetPhoneNumber(CnstData?.Pat?.Ph), fontSize: 10, marginBottom: 5 },
221
221
  ];
222
222
  }
223
- static GetCnsltDate(CnstData) {
223
+ static GetCnsltDate(CnstData, User) {
224
224
  if (!tr_utils_1.TrUtils.IsNull(CnstData.ClDate)) {
225
- return my_date_1.MyDate.GetWeekDateAndTime(CnstData.ClDate);
225
+ return my_date_1.MyDate.GetWeekDateAndTime(CnstData.ClDate, User.TZ);
226
226
  }
227
227
  else {
228
- return my_date_1.MyDate.GetWeekDateAndTime(CnstData.CrDate);
228
+ return my_date_1.MyDate.GetWeekDateAndTime(CnstData.CrDate, User.TZ);
229
229
  }
230
230
  }
231
231
  static GetHeaderBasedOnCondition(CnstData, Entity, HeaderName, Image, HColor, AColor, text) {
@@ -264,11 +264,11 @@ class ConsultationPDFService {
264
264
  return '';
265
265
  }
266
266
  }
267
- static DifferenceInYears(DOB) {
267
+ static DifferenceInYears(DOB, TZ) {
268
268
  if (tr_utils_1.TrUtils.IsNull(DOB)) {
269
269
  return 'DOB Not Specified';
270
270
  }
271
- let Datei = my_date_1.MyDate.GetDateTimeNowInUTC();
271
+ let Datei = my_date_1.MyDate.GetDateTimeNowInUTC(TZ);
272
272
  const result = (0, date_fns_1.differenceInYears)(Datei, new Date(DOB));
273
273
  return result + ' Years';
274
274
  }
@@ -292,14 +292,13 @@ class ConsultationPDFService {
292
292
  });
293
293
  return Complaints;
294
294
  }
295
- static GetDate(DatesDetails) {
296
- if (DatesDetails.Date === 'CustomRange') {
297
- return my_date_1.MyDate.GetWeekAndDate(DatesDetails.StDate) + ' - ' + my_date_1.MyDate.GetWeekAndDate(DatesDetails.EnDate);
298
- }
299
- else {
300
- return 'till ' + my_date_1.MyDate.GetWeekAndDate(DatesDetails.EnDate);
301
- }
302
- }
295
+ // static GetDate(DatesDetails: any) {
296
+ // if (DatesDetails.Date === 'CustomRange') {
297
+ // return MyDate.GetWeekAndDate(DatesDetails.StDate) + ' - ' + MyDate.GetWeekAndDate(DatesDetails.EnDate);
298
+ // } else {
299
+ // return 'till ' + MyDate.GetWeekAndDate(DatesDetails.EnDate);
300
+ // }
301
+ // }
303
302
  static CustomerAndVehicleDetailsAfterLine() {
304
303
  return {
305
304
  canvas: [
@@ -703,7 +703,7 @@ class IssuePartsprintService {
703
703
  stack: [
704
704
  {
705
705
  columns: [{ text: '' }, { text: 'Gate Pass', bold: true, fontSize: 9, alignment: 'center', marginTop: 5 },
706
- { text: 'Date: ' + my_date_1.MyDate.ConvertUTCDateToReadable(my_date_1.MyDate.GetDateTimeNowInUTC()), marginTop: 5, fontSize: 9, alignment: 'right' }]
706
+ { text: 'Date: ' + my_date_1.MyDate.ConvertUTCDateToReadable(my_date_1.MyDate.GetDateTimeNowInUTC(ROPrintData.Entity.User.TZ)), marginTop: 5, fontSize: 9, alignment: 'right' }]
707
707
  },
708
708
  { text: ROPrintData.Entity.CName, alignment: 'center', bold: true, fontSize: 12, marginTop: 5, marginBottom: 5 },
709
709
  {
@@ -1,6 +1,6 @@
1
1
  export declare class ExpiringDrugPDFService {
2
2
  static GetPrint(ReOrderPointData: any, DatesDetails: any): any;
3
- static GetDate(DatesDetails: any): string;
3
+ static GetDate(DatesDetails: any, UserTimeZone: any): string;
4
4
  static CustomerAndVehicleDetailsAfterLine(): {
5
5
  canvas: {
6
6
  type: string;
@@ -20,7 +20,7 @@ class ExpiringDrugPDFService {
20
20
  pageSize: 'A4',
21
21
  content: [
22
22
  { text: ReOrderPointData.Entity.CName, style: ['headerstyle'], alignment: 'center', fontSize: 20 },
23
- { text: 'Expiring Drugs (' + this.GetDate(DatesDetails) + ')', style: ['headerstyle'], alignment: 'center', fontSize: 12 },
23
+ { text: 'Expiring Drugs (' + this.GetDate(DatesDetails, ReOrderPointData.Entity.User.TZ) + ')', style: ['headerstyle'], alignment: 'center', fontSize: 12 },
24
24
  this.GetItemsTable(ReOrderPointData.Items),
25
25
  this.GetSignatures(ReOrderPointData.Entity.CName, ReOrderPointData.Type, ReOrderPointData.For),
26
26
  ],
@@ -59,12 +59,12 @@ class ExpiringDrugPDFService {
59
59
  };
60
60
  return dd;
61
61
  }
62
- static GetDate(DatesDetails) {
62
+ static GetDate(DatesDetails, UserTimeZone) {
63
63
  if (DatesDetails.Date === 'CustomRange') {
64
- return my_date_1.MyDate.GetWeekAndDate(DatesDetails.StDate) + ' - ' + my_date_1.MyDate.GetWeekAndDate(DatesDetails.EnDate);
64
+ return my_date_1.MyDate.GetWeekAndDate(DatesDetails.StDate, UserTimeZone) + ' - ' + my_date_1.MyDate.GetWeekAndDate(DatesDetails.EnDate, UserTimeZone);
65
65
  }
66
66
  else {
67
- return 'till ' + my_date_1.MyDate.GetWeekAndDate(DatesDetails.EnDate);
67
+ return 'till ' + my_date_1.MyDate.GetWeekAndDate(DatesDetails.EnDate, UserTimeZone);
68
68
  }
69
69
  }
70
70
  static CustomerAndVehicleDetailsAfterLine() {
@@ -18,8 +18,6 @@ class ItemWiseMODetailsPDF {
18
18
  content: [
19
19
  { text: '' + CName + '', style: ['header'] },
20
20
  { text: HeaderName, alignment: 'center', fontSize: 15, bold: true },
21
- // { text: 'As of ' + MyDate.ConvertUTCDateToReadable(MyDate.GetDateTimeNowInUTC()), alignment: 'center', fontSize: 10 },
22
- // SharedPDFService.HeaderAfterLine(),
23
21
  shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
24
22
  this.GetInvoiceDataTable(InvoicesData, isPhar, isHC),
25
23
  ],
@@ -16,8 +16,6 @@ class ItemWiseMOSummaryPDF {
16
16
  content: [
17
17
  { text: '' + CName + '', style: ['header'] },
18
18
  { text: HeaderName, alignment: 'center', fontSize: 15, bold: true },
19
- // { text: 'As of ' + MyDate.ConvertUTCDateToReadable(MyDate.GetDateTimeNowInUTC()), alignment: 'center', fontSize: 10 },
20
- // SharedPDFService.HeaderAfterLine(),
21
19
  shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
22
20
  this.GetInvoiceDataTable(InvoicesData, isPhar, isHC),
23
21
  ],
@@ -20,7 +20,7 @@ class ReorderPointPDFService {
20
20
  pageSize: 'A4',
21
21
  content: [
22
22
  { text: ReOrderPointData.Entity.CName, style: ['headerstyle'], alignment: 'center', fontSize: 20 },
23
- { text: 'Reorder Point (' + 'As of ' + my_date_1.MyDate.ConvertUTCDateToReadable(my_date_1.MyDate.GetDateTimeNowInUTC()) + ')', style: ['headerstyle'], alignment: 'center', fontSize: 12 },
23
+ { text: 'Reorder Point (' + 'As of ' + my_date_1.MyDate.ConvertUTCDateToReadable(my_date_1.MyDate.GetDateTimeNowInUTC(ReOrderPointData.Entity.User.TZ)) + ')', style: ['headerstyle'], alignment: 'center', fontSize: 12 },
24
24
  { text: 'Items need to be Ordered', style: ['headerstyle'], alignment: 'left', fontSize: 10, marginTop: 10, decoration: 'underline' },
25
25
  this.GetItemsTable(ReOrderPointData.Items),
26
26
  this.GetSignatures(ReOrderPointData.Entity.CName, ReOrderPointData.Type, ReOrderPointData.For),
@@ -17,8 +17,7 @@ class TransferOrderPrintService {
17
17
  content: [
18
18
  { text: ReOrderPointData.Entity.CName, style: ['headerstyle'], alignment: 'center', fontSize: 20 },
19
19
  shared_pdf_service_1.SharedPDFService.GetPrintType('Transfer Order'),
20
- shared_pdf_service_1.SharedPDFService.HeaderAfterLine(), // { text: 'Reorder Point (' + 'As of ' + MyDate.ConvertUTCDateToReadable(MyDate.GetDateTimeNowInUTC()) + ')', style: ['headerstyle'], alignment: 'center', fontSize: 12 },
21
- // { text: 'Items need to be Ordered', style: ['headerstyle'], alignment: 'left', fontSize: 10, marginTop: 10, decoration: 'underline' },
20
+ shared_pdf_service_1.SharedPDFService.HeaderAfterLine(),
22
21
  { text: 'From : ' + ReOrderPointData.FromName, style: 'hed', marginTop: 5 },
23
22
  { text: 'To : ' + ReOrderPointData.ToName, style: 'hed' },
24
23
  { text: 'Date : ' + ReOrderPointData.Date, style: 'hed', marginBottom: 5 },
@@ -1,5 +1,5 @@
1
1
  export declare class VendorBalancesService {
2
- static GetVendorBalancesPrint(BillData: any, CName: any): {
2
+ static GetVendorBalancesPrint(BillData: any, EntityData: any): {
3
3
  info: {
4
4
  title: string;
5
5
  };
@@ -5,7 +5,7 @@ const shared_pdf_service_1 = require("../../../../shared/shared-pdf.service");
5
5
  const my_date_1 = require("../../../../utils/my-date");
6
6
  const tr_utils_1 = require("../../../../utils/tr-utils");
7
7
  class VendorBalancesService {
8
- static GetVendorBalancesPrint(BillData, CName) {
8
+ static GetVendorBalancesPrint(BillData, EntityData) {
9
9
  var dd = {
10
10
  info: {
11
11
  title: 'VendorBalances'
@@ -15,9 +15,9 @@ class VendorBalancesService {
15
15
  },
16
16
  pageMargins: [10, 15, 10, 15],
17
17
  content: [
18
- { text: '' + CName + '', style: ['header'] },
18
+ { text: '' + EntityData.Entity.DName + '', style: ['header'] },
19
19
  { text: 'Vendor Balances', alignment: 'center', fontSize: 15, bold: true },
20
- { text: 'As of ' + my_date_1.MyDate.ConvertUTCDateToReadable(my_date_1.MyDate.GetDateTimeNowInUTC()),
20
+ { text: 'As of ' + my_date_1.MyDate.ConvertUTCDateToReadable(my_date_1.MyDate.GetDateTimeNowInUTC(EntityData.Entity.User.TZ)),
21
21
  alignment: 'center', fontSize: 10 },
22
22
  // SharedPDFService.HeaderAfterLine(),
23
23
  this.GetBillDataTable(BillData),
@@ -16,8 +16,6 @@ class NextServiceDatePDFService {
16
16
  content: [
17
17
  { text: '' + CName + '', style: ['header'] },
18
18
  { text: 'Next Service Date', alignment: 'center', fontSize: 15, bold: true },
19
- // { text: 'As of ' + MyDate.ConvertUTCDateToReadable(MyDate.GetDateTimeNowInUTC()), alignment: 'center', fontSize: 10 },
20
- // SharedPDFService.HeaderAfterLine(),
21
19
  shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
22
20
  this.GetInvoiceDataTable(InvoicesData),
23
21
  ],
@@ -18,7 +18,6 @@ class RepairOrdersReportsPDFService {
18
18
  content: [
19
19
  { text: '' + CName + '', style: ['header'] },
20
20
  { text: HeaerName, alignment: 'center', fontSize: 15, bold: true },
21
- // { text: 'As of ' + MyDate.ConvertUTCDateToReadable(MyDate.GetDateTimeNowInUTC()), alignment: 'center', fontSize: 10 },
22
21
  shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
23
22
  this.GetInvoiceDataTable(InvoicesData),
24
23
  ],
@@ -457,7 +457,7 @@ export declare class WOPrintService {
457
457
  };
458
458
  layout: string;
459
459
  };
460
- static GetServiceInformation(Other: any, Phone2: any): {
460
+ static GetServiceInformation(Other: any, Entity: any): {
461
461
  style: string;
462
462
  table: {
463
463
  widths: (string | number)[];
@@ -63,7 +63,7 @@ class WOPrintService {
63
63
  columns: [
64
64
  this.GetCustomerInformation(ROPrintData.Customer),
65
65
  this.GetVehicleInformation(ROPrintData.Vehicle, ROPrintData.MIn),
66
- this.GetServiceInformation(ROPrintData, ROPrintData.Entity.Phone2),
66
+ this.GetServiceInformation(ROPrintData, ROPrintData.Entity),
67
67
  ],
68
68
  columnGap: 5
69
69
  };
@@ -295,7 +295,7 @@ class WOPrintService {
295
295
  layout: 'noBorders'
296
296
  };
297
297
  }
298
- static GetServiceInformation(Other, Phone2) {
298
+ static GetServiceInformation(Other, Entity) {
299
299
  return {
300
300
  style: 'tableExample',
301
301
  table: {
@@ -305,10 +305,10 @@ class WOPrintService {
305
305
  ['Work Type', { text: Other.OrdType, opacity: 0.9, }],
306
306
  ['RO Date', { text: Other.CrDate, opacity: 0.9, }],
307
307
  ['RO Number', { text: Other._id, opacity: 0.9, }],
308
- ['Printing Time', { text: my_date_1.MyDate.GetWeekDateAndTime(my_date_1.MyDate.GetDateTimeNowInUTC()), opacity: 0.9, }],
308
+ ['Printing Time', { text: my_date_1.MyDate.GetWeekDateAndTime(my_date_1.MyDate.GetDateTimeNowInUTC(Entity.User.TZ), Entity.User.TZ), opacity: 0.9, }],
309
309
  ['Promise Date', { text: Other.PrDate, opacity: 0.9, }],
310
310
  ['Service Advisor', { text: Other.Advisor.Name, opacity: 0.9, }],
311
- ['Mobile Number', { text: this.GetPhone(Other.Advisor.Ph, Phone2), opacity: 0.9, }],
311
+ ['Mobile Number', { text: this.GetPhone(Other.Advisor.Ph, Entity.Phone2), opacity: 0.9, }],
312
312
  ]
313
313
  },
314
314
  layout: 'noBorders'
@@ -19,8 +19,9 @@ class PrintSharedService {
19
19
  if (tr_utils_1.TrUtils.IsNull(EntityData.User.TZ)) {
20
20
  EntityData.User.TZ = 'Asia/Calcutta';
21
21
  }
22
- my_date_1.MyDate.UserTimeZone = EntityData.User.TZ;
22
+ // MyDate.UserTimeZone = EntityData.User.TZ;
23
23
  let Entity = {};
24
+ Entity.User = EntityData.User;
24
25
  if (tr_utils_1.TrUtils.IsNull(tempEntity.Settings.Common)) {
25
26
  tempEntity.Settings.Common = {};
26
27
  }
@@ -1,6 +1,6 @@
1
1
  export declare class MeetingPdfService {
2
2
  static BodySize: number;
3
- static MeetingPrintData(meetingData: any, isAgendata: boolean): void;
3
+ static MeetingPrintData(meetingData: any, isAgendata: boolean, EntityData: any): void;
4
4
  static HeadingforMeeting(isAgendata: any): {
5
5
  text: string;
6
6
  alignment: string;
@@ -97,10 +97,10 @@ export declare class MeetingPdfService {
97
97
  layout: string;
98
98
  };
99
99
  static GetDetailsTable(data: any): any;
100
- static GetTopicsAndSubTopicsAndItemsList(meetingData: any, items: any, isAgendata: boolean): any;
101
- static TopicsItemView(item: any, meetingData: any, tpcs: any): void;
100
+ static GetTopicsAndSubTopicsAndItemsList(meetingData: any, items: any, isAgendata: boolean, TZ: any): any;
101
+ static TopicsItemView(item: any, meetingData: any, tpcs: any, TZ: any): void;
102
102
  static GetDescrption(Item: any, MeetingData: any): any;
103
- static GetDueDate(Item: any, MeetingData: any): string | null;
103
+ static GetDueDate(Item: any, MeetingData: any, TZ: any): string | null;
104
104
  static getAssignee(Item: any, MeetingData: any): string;
105
105
  static GetTypeOfItem(type: any): "Task" | "Desc" | "Note";
106
106
  static GetColorsBasedOnType(type: any): "#b30000" | "blue" | "green";
@@ -5,7 +5,7 @@ const shared_pdf_service_1 = require("../../shared/shared-pdf.service");
5
5
  const my_date_1 = require("../../utils/my-date");
6
6
  const tr_utils_1 = require("../../utils/tr-utils");
7
7
  class MeetingPdfService {
8
- static MeetingPrintData(meetingData, isAgendata) {
8
+ static MeetingPrintData(meetingData, isAgendata, EntityData) {
9
9
  let Images;
10
10
  shared_pdf_service_1.SharedPDFService.convertImgToBase64URL(meetingData.image, function (base64Img) {
11
11
  Images = base64Img.toString();
@@ -27,7 +27,7 @@ class MeetingPdfService {
27
27
  this.GetMeetingDetails(meetingData, isAgendata),
28
28
  shared_pdf_service_1.SharedPDFService.HeaderAfterLine(),
29
29
  {
30
- stack: [{ text: 'Topics', bold: true, marginBottom: 7 }, this.GetTopicsAndSubTopicsAndItemsList(meetingData, meetingData.Items, isAgendata)], marginTop: 10
30
+ stack: [{ text: 'Topics', bold: true, marginBottom: 7 }, this.GetTopicsAndSubTopicsAndItemsList(meetingData, meetingData.Items, isAgendata, EntityData.User.TZ)], marginTop: 10
31
31
  },
32
32
  ],
33
33
  styles: shared_pdf_service_1.SharedPDFService.GetStyles()
@@ -208,7 +208,7 @@ class MeetingPdfService {
208
208
  });
209
209
  return body;
210
210
  }
211
- static GetTopicsAndSubTopicsAndItemsList(meetingData, items, isAgendata) {
211
+ static GetTopicsAndSubTopicsAndItemsList(meetingData, items, isAgendata, TZ) {
212
212
  let tpcs = [];
213
213
  meetingData.Topics.forEach((tpc, index) => {
214
214
  let a;
@@ -219,7 +219,7 @@ class MeetingPdfService {
219
219
  if (!isAgendata) {
220
220
  items.forEach((item) => {
221
221
  if (item.Tpc === tpc._id) {
222
- this.TopicsItemView(item, meetingData, tpcs);
222
+ this.TopicsItemView(item, meetingData, tpcs, TZ);
223
223
  }
224
224
  });
225
225
  }
@@ -233,7 +233,7 @@ class MeetingPdfService {
233
233
  if (!isAgendata) {
234
234
  items.forEach((item) => {
235
235
  if (item.Tpc === subtpc._id) {
236
- this.TopicsItemView(item, meetingData, tpcs);
236
+ this.TopicsItemView(item, meetingData, tpcs, TZ);
237
237
  }
238
238
  });
239
239
  }
@@ -242,14 +242,14 @@ class MeetingPdfService {
242
242
  });
243
243
  return tpcs;
244
244
  }
245
- static TopicsItemView(item, meetingData, tpcs) {
245
+ static TopicsItemView(item, meetingData, tpcs, TZ) {
246
246
  let ItemType = {
247
247
  text: this.GetTypeOfItem(item.Type), marginLeft: 20, marginBottom: 5, marginTop: 5, width: 50,
248
248
  color: this.GetColorsBasedOnType(item.Type), background: 'white', fontSize: this.BodySize,
249
249
  };
250
250
  let ItemDesc = this.GetDescrption(item, meetingData);
251
251
  let TaskAssignees = this.getAssignee(item, meetingData);
252
- let TaskDueDate = this.GetDueDate(item, meetingData);
252
+ let TaskDueDate = this.GetDueDate(item, meetingData, TZ);
253
253
  let Item;
254
254
  if (item.Type !== 'TAS') {
255
255
  Item = {
@@ -298,13 +298,13 @@ class MeetingPdfService {
298
298
  return Item.Desc;
299
299
  }
300
300
  }
301
- static GetDueDate(Item, MeetingData) {
301
+ static GetDueDate(Item, MeetingData, TZ) {
302
302
  if (Item.Type === 'TAS' && !tr_utils_1.TrUtils.IsNull(MeetingData.MeetingTasks)) {
303
303
  let Index = MeetingData.MeetingTasks.findIndex((task) => {
304
304
  return task._id === Item.T_Id;
305
305
  });
306
306
  if (Index !== -1) {
307
- return tr_utils_1.TrUtils.IsNull(MeetingData.MeetingTasks[Index].EstEnDt) ? '' : my_date_1.MyDate.GetWeekAndDate(MeetingData.MeetingTasks[Index].EstEnDt);
307
+ return tr_utils_1.TrUtils.IsNull(MeetingData.MeetingTasks[Index].EstEnDt) ? '' : my_date_1.MyDate.GetWeekAndDate(MeetingData.MeetingTasks[Index].EstEnDt, TZ);
308
308
  }
309
309
  else {
310
310
  return '';
@@ -1,6 +1,6 @@
1
1
  export declare class TaskPDfService {
2
2
  static BodySize: number;
3
- static GetPdfForUnAssignedTasks(TaskData: any, Image: any): void;
3
+ static GetPdfForUnAssignedTasks(TaskData: any, Image: any, EntityData: any): void;
4
4
  static GetHeader(task: any): {
5
5
  stack: {
6
6
  text: string;
@@ -55,7 +55,7 @@ export declare class TaskPDfService {
55
55
  };
56
56
  static GetDescription(task: any): string;
57
57
  static stripHtml(html: any): string;
58
- static GetTaskDetails(TaskData: any): {
58
+ static GetTaskDetails(TaskData: any, UserTimeZone: any): {
59
59
  stack: {
60
60
  style: string;
61
61
  fontSize: number;
@@ -73,7 +73,7 @@ export declare class TaskPDfService {
73
73
  };
74
74
  }[];
75
75
  };
76
- static GetTableHeadersForApproval(TaskData: any): {
76
+ static GetTableHeadersForApproval(TaskData: any, UserTimeZone: any): {
77
77
  style: string;
78
78
  fontSize: number;
79
79
  lineHeight: number;
@@ -92,7 +92,7 @@ export declare class TaskPDfService {
92
92
  static GetValue(value: any): any;
93
93
  static GetProgress(value: any): string;
94
94
  static GetPriority(value: any): any;
95
- static GetTime(date: any): string | null;
95
+ static GetTime(date: any, UserTimeZone: any): string | null;
96
96
  static GetAssinessList(Members: any): any;
97
97
  static GetOwner(Members: any): any;
98
98
  static GetDetails(data: any): {
@@ -6,7 +6,7 @@ const shared_print_service_1 = require("../../shared/shared-print.service");
6
6
  const my_date_1 = require("../../utils/my-date");
7
7
  const tr_utils_1 = require("../../utils/tr-utils");
8
8
  class TaskPDfService {
9
- static GetPdfForUnAssignedTasks(TaskData, Image) {
9
+ static GetPdfForUnAssignedTasks(TaskData, Image, EntityData) {
10
10
  let Images;
11
11
  // let IsThere: boolean = false;
12
12
  // Images = this.imageExists(meetingData.image);
@@ -34,7 +34,7 @@ class TaskPDfService {
34
34
  this.HeaderAfterLine(),
35
35
  this.GetTaskSubHeadre(TaskData),
36
36
  // this.HeaderAfterLine(),
37
- this.GetTaskDetails(TaskData),
37
+ this.GetTaskDetails(TaskData, EntityData.User.TZ),
38
38
  ],
39
39
  styles: shared_pdf_service_1.SharedPDFService.GetStyles(),
40
40
  };
@@ -89,19 +89,19 @@ class TaskPDfService {
89
89
  // Retrieve the text property of the element (cross-browser support)
90
90
  return temporalDivElement.textContent || temporalDivElement.innerText || "";
91
91
  }
92
- static GetTaskDetails(TaskData) {
92
+ static GetTaskDetails(TaskData, UserTimeZone) {
93
93
  return {
94
94
  stack: [
95
- this.GetTableHeadersForApproval(TaskData),
95
+ this.GetTableHeadersForApproval(TaskData, UserTimeZone),
96
96
  ]
97
97
  };
98
98
  }
99
- static GetTableHeadersForApproval(TaskData) {
99
+ static GetTableHeadersForApproval(TaskData, UserTimeZone) {
100
100
  let headersNames = [
101
101
  { name: 'Status', value: this.GetValue(TaskData.Sts) },
102
102
  { name: 'Start date', value: this.GetValue(my_date_1.MyDate.ConvertUTCDateToReadable(TaskData.EstStDt)) },
103
103
  { name: 'Due date', value: this.GetValue(my_date_1.MyDate.ConvertUTCDateToReadable(TaskData.EstEnDt)) },
104
- { name: 'Estimated Time', value: this.GetTime(TaskData.EstEnDt) },
104
+ { name: 'Estimated Time', value: this.GetTime(TaskData.EstEnDt, UserTimeZone) },
105
105
  { name: 'Priority', value: this.GetPriority(TaskData.Prty) },
106
106
  { name: 'Progress', value: this.GetProgress(TaskData.CoPerc) },
107
107
  { name: 'Assingned To', value: this.GetValue(this.GetAssinessList(TaskData.Members)) },
@@ -133,9 +133,9 @@ class TaskPDfService {
133
133
  return 'None';
134
134
  }
135
135
  }
136
- static GetTime(date) {
136
+ static GetTime(date, UserTimeZone) {
137
137
  if (!tr_utils_1.TrUtils.IsNull(date)) {
138
- let time = my_date_1.MyDate.ConvertUTCDateTimeToReadable(date);
138
+ let time = my_date_1.MyDate.ConvertUTCDateTimeToReadable(date, UserTimeZone);
139
139
  return time;
140
140
  }
141
141
  else {
@@ -8,7 +8,7 @@ declare class Group {
8
8
  export declare class TaskReportsPDfService {
9
9
  static overdueTasks: any[];
10
10
  static groupByColumns: string[];
11
- static GetPdfForUnAssignedTasks(TaskData: any, IsLandScape: any, ReportType: any, Image: any): void;
11
+ static GetPdfForUnAssignedTasks(TaskData: any, IsLandScape: any, ReportType: any, Image: any, EntityData: any): void;
12
12
  static GetHeader(Images: any, ReportType: any): {
13
13
  stack: ({
14
14
  text: string;
@@ -48,7 +48,7 @@ export declare class TaskReportsPDfService {
48
48
  })[];
49
49
  stack?: undefined;
50
50
  };
51
- static GetTableForApproval(TaskData: any, ReportType: any): {
51
+ static GetTableForApproval(TaskData: any, ReportType: any, TZ: any): {
52
52
  style: string;
53
53
  marginTop: number;
54
54
  lineHeight: number;
@@ -64,9 +64,9 @@ export declare class TaskReportsPDfService {
64
64
  vLineColor: (i: any, node: any) => string;
65
65
  };
66
66
  };
67
- static GetApprovalTableHeaderBody(TaskData: any, ReportType: any): any;
67
+ static GetApprovalTableHeaderBody(TaskData: any, ReportType: any, TZ: any): any;
68
68
  static GetTableHeadersForApproval(): any;
69
- static GetOverDuePrint(TaskData: any, IsLandScape: any, ReportType: any, Image: any): void;
69
+ static GetOverDuePrint(TaskData: any, IsLandScape: any, ReportType: any, Image: any, EntityData: any): void;
70
70
  static GetTableForApprovalUnAssignedTasks(TaskData: any, ReportType: any): {
71
71
  style: string;
72
72
  marginTop: number;
@@ -85,8 +85,8 @@ export declare class TaskReportsPDfService {
85
85
  };
86
86
  static GetApprovalTableHeaderUnAssignedTasksBody(TaskData: any, ReportType: any): any;
87
87
  static GetOverDueTableHeadersForApproval(): any;
88
- static GetDueDate(params: any): string;
89
- static PrepareDataForTable(overdueEmpTasks: any[]): any[];
88
+ static GetDueDate(params: any, TZ: any): string;
89
+ static PrepareDataForTable(overdueEmpTasks: any[], EntityData: any): any[];
90
90
  static addGroups(data: any[], groupByColumns: string[]): any[];
91
91
  static getSublevel(data: any[], level: number, groupByColumns: string[], parent: Group): any[];
92
92
  static uniqueBy(a: any, key: any): any;
@@ -16,7 +16,7 @@ class Group {
16
16
  }
17
17
  }
18
18
  class TaskReportsPDfService {
19
- static GetPdfForUnAssignedTasks(TaskData, IsLandScape, ReportType, Image) {
19
+ static GetPdfForUnAssignedTasks(TaskData, IsLandScape, ReportType, Image, EntityData) {
20
20
  let Images;
21
21
  shared_pdf_service_1.SharedPDFService.convertImgToBase64URL(Image, function (base64Img) {
22
22
  Images = base64Img.toString();
@@ -36,7 +36,7 @@ class TaskReportsPDfService {
36
36
  content: [
37
37
  this.GetHeader(Images, ReportType),
38
38
  // { text: ReportType.toString(), alignment: 'center', margin: 10, fontSize: 14 },
39
- this.GetTableForApproval(TaskData, ReportType),
39
+ this.GetTableForApproval(TaskData, ReportType, EntityData.User.TZ),
40
40
  ],
41
41
  styles: shared_pdf_service_1.SharedPDFService.GetStyles(),
42
42
  };
@@ -60,7 +60,7 @@ class TaskReportsPDfService {
60
60
  };
61
61
  }
62
62
  }
63
- static GetTableForApproval(TaskData, ReportType) {
63
+ static GetTableForApproval(TaskData, ReportType, TZ) {
64
64
  return {
65
65
  style: 'tableExample',
66
66
  marginTop: 7,
@@ -69,12 +69,12 @@ class TaskReportsPDfService {
69
69
  table: {
70
70
  // widths: [30, 50, 200, 60, 100, 60],
71
71
  widths: [30, 50, '*', 200, 50, 50],
72
- body: this.GetApprovalTableHeaderBody(TaskData, ReportType)
72
+ body: this.GetApprovalTableHeaderBody(TaskData, ReportType, TZ)
73
73
  },
74
74
  layout: shared_print_service_1.PrintSharedService.LayOutStyle()
75
75
  };
76
76
  }
77
- static GetApprovalTableHeaderBody(TaskData, ReportType) {
77
+ static GetApprovalTableHeaderBody(TaskData, ReportType, TZ) {
78
78
  var body = [];
79
79
  let SNo = 1;
80
80
  let columns = this.GetTableHeadersForApproval();
@@ -88,7 +88,7 @@ class TaskReportsPDfService {
88
88
  }
89
89
  else {
90
90
  if (!tr_utils_1.TrUtils.IsNull(task['EstEnDt']) && column.Field === 'EstEnDt') {
91
- dataRow.push({ text: this.GetDueDate(task), alignment: 'left', nowrap: true });
91
+ dataRow.push({ text: this.GetDueDate(task, TZ), alignment: 'left', nowrap: true });
92
92
  }
93
93
  else {
94
94
  dataRow.push({ text: task[column.Field].toString(), alignment: 'left', nowrap: true });
@@ -121,8 +121,8 @@ class TaskReportsPDfService {
121
121
  ];
122
122
  return headersNames;
123
123
  }
124
- static GetOverDuePrint(TaskData, IsLandScape, ReportType, Image) {
125
- TaskData = this.PrepareDataForTable(TaskData);
124
+ static GetOverDuePrint(TaskData, IsLandScape, ReportType, Image, EntityData) {
125
+ TaskData = this.PrepareDataForTable(TaskData, EntityData);
126
126
  let Images;
127
127
  shared_pdf_service_1.SharedPDFService.convertImgToBase64URL(Image, function (base64Img) {
128
128
  Images = base64Img.toString();
@@ -209,10 +209,10 @@ class TaskReportsPDfService {
209
209
  ];
210
210
  return headersNames;
211
211
  }
212
- static GetDueDate(params) {
212
+ static GetDueDate(params, TZ) {
213
213
  if (!tr_utils_1.TrUtils.IsEmpty(params.EstEnDt)) {
214
214
  let DueDays;
215
- let TodayDate = my_date_1.MyDate.GetDateTimeNowInUTC();
215
+ let TodayDate = my_date_1.MyDate.GetDateTimeNowInUTC(TZ);
216
216
  let Days = my_date_1.MyDate.GetDaysDiffBetween(TodayDate, params.EstEnDt);
217
217
  if (Days > 1) {
218
218
  DueDays = 'Due in' + ' ' + Days + ' ' + 'days';
@@ -232,21 +232,21 @@ class TaskReportsPDfService {
232
232
  DueDays = Math.abs(Days) + ' ' + 'days overdue';
233
233
  }
234
234
  }
235
- return my_date_1.MyDate.GetWeekAndDate(params.EstEnDt) + ' , ' + DueDays;
235
+ return my_date_1.MyDate.GetWeekAndDate(params.EstEnDt, TZ) + ' , ' + DueDays;
236
236
  }
237
237
  return '';
238
238
  }
239
- static PrepareDataForTable(overdueEmpTasks) {
239
+ static PrepareDataForTable(overdueEmpTasks, EntityData) {
240
240
  this.overdueTasks = [];
241
241
  overdueEmpTasks.forEach((overdueEmpTask) => {
242
242
  overdueEmpTask.Tasks.forEach((Task) => {
243
243
  let TaskInfo = {
244
244
  UserId: overdueEmpTask._id,
245
245
  TId: Task.Code,
246
- DueDt: this.GetDueDate(Task),
246
+ DueDt: this.GetDueDate(Task, EntityData.User.TZ),
247
247
  Name: Task.Name,
248
248
  Assignee: Task.Assignee.Name,
249
- AssDate: (Task.Assignee.Ass === true || Task.Assignee.Ass === false) ? '' : my_date_1.MyDate.GetWeekAndDate(Task.Assignee.Ass)
249
+ AssDate: (Task.Assignee.Ass === true || Task.Assignee.Ass === false) ? '' : my_date_1.MyDate.GetWeekAndDate(Task.Assignee.Ass, EntityData.User.TZ)
250
250
  };
251
251
  this.overdueTasks.push(TaskInfo);
252
252
  });
@@ -1,13 +1,12 @@
1
1
  export declare class MyDate {
2
- static UserTimeZone: any;
3
- static GetDateTimeNowInUTC(): Date;
4
- static GetCurrentYear(): number;
2
+ static GetDateTimeNowInUTC(UserTimeZone: any): Date;
3
+ static GetCurrentYear(UserTimeZone: any): number;
5
4
  static ConvertUTCDateToReadable(UTCDateTime: any): string | null;
6
5
  static ConvertUTCDateToReadableExDate(UTCDateTime: any): string | null;
7
6
  static ConvertUTCDateToReadableExDateTxt(UTCDateTime: any): string | null;
8
- static ConvertUTCDateTimeToReadable(UTCDateTime: any): string | null;
9
- static GetMonthName(MonthNumber: number): any;
7
+ static ConvertUTCDateTimeToReadable(UTCDateTime: any, UserTimeZone: any): string | null;
8
+ static GetMonthName(MonthNumber: number, UserTimeZone: any): any;
10
9
  static GetDaysDiffBetween(startutcdate: any, endutcdate: any): number;
11
- static GetWeekDateAndTime(UTCDateTime: any): string | null;
12
- static GetWeekAndDate(UTCDateTime: any): string | null;
10
+ static GetWeekDateAndTime(UTCDateTime: any, UserTimeZone: any): string | null;
11
+ static GetWeekAndDate(UTCDateTime: any, UserTimeZone: any): string | null;
13
12
  }