shareneus 1.7.312 → 1.7.313

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.
@@ -119,7 +119,7 @@ class ConsultationFeeReceiptPrintService {
119
119
  };
120
120
  }
121
121
  else {
122
- return { columns: [shared_pdf_service_1.SharedPDFService.GetImage(Image, Entity.PrLogo), { stack: [{ text: (_f = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Doc) === null || _f === void 0 ? void 0 : _f.Name, fontSize: 12, bold: true, alignment: 'right' },
122
+ return { columns: [shared_pdf_service_1.SharedPDFService.GetImage(Image, Entity.Header.ShowLogo), { stack: [{ text: (_f = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Doc) === null || _f === void 0 ? void 0 : _f.Name, fontSize: 12, bold: true, alignment: 'right' },
123
123
  { text: (_g = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Doc) === null || _g === void 0 ? void 0 : _g.Intro1, fontSize: 9, alignment: 'right' },
124
124
  { text: (_h = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Doc) === null || _h === void 0 ? void 0 : _h.Intro2, fontSize: 9, alignment: 'right' },
125
125
  { text: (_j = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Doc) === null || _j === void 0 ? void 0 : _j.Intro3, fontSize: 9, alignment: 'right' },
@@ -109,7 +109,7 @@ class ConsultationFullPrintService {
109
109
  };
110
110
  }
111
111
  else {
112
- return { columns: [shared_pdf_service_1.SharedPDFService.GetImage(Image, Entity.PrLogo), { stack: [{ text: ((_g = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Doc) === null || _g === void 0 ? void 0 : _g.Sltn) + ' ' + ((_h = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Doc) === null || _h === void 0 ? void 0 : _h.Name), fontSize: 15, bold: true, alignment: 'right' },
112
+ return { columns: [shared_pdf_service_1.SharedPDFService.GetImage(Image, Entity.Header.ShowLogo), { stack: [{ text: ((_g = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Doc) === null || _g === void 0 ? void 0 : _g.Sltn) + ' ' + ((_h = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Doc) === null || _h === void 0 ? void 0 : _h.Name), fontSize: 15, bold: true, alignment: 'right' },
113
113
  { text: (_j = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Doc) === null || _j === void 0 ? void 0 : _j.Intro1, fontSize: 9, alignment: 'right' },
114
114
  { text: (_k = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Doc) === null || _k === void 0 ? void 0 : _k.Intro2, fontSize: 9, alignment: 'right' },
115
115
  { text: (_l = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Doc) === null || _l === void 0 ? void 0 : _l.Intro3, fontSize: 9, alignment: 'right' },
@@ -262,7 +262,7 @@ class ConsultationLetterHeadPDFService {
262
262
  }
263
263
  else {
264
264
  return {
265
- columns: [shared_pdf_service_1.SharedPDFService.GetImage(Image, Entity.PrLogo), {
265
+ columns: [shared_pdf_service_1.SharedPDFService.GetImage(Image, Entity.Header.ShowLogo), {
266
266
  stack: [{ text: ((_g = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Doc) === null || _g === void 0 ? void 0 : _g.Sltn) + ' ' + ((_h = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Doc) === null || _h === void 0 ? void 0 : _h.Name), fontSize: 15, alignment: 'right', bold: true },
267
267
  { text: (_j = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Doc) === null || _j === void 0 ? void 0 : _j.Intro1, fontSize: 9, alignment: 'right' },
268
268
  { text: (_k = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Doc) === null || _k === void 0 ? void 0 : _k.Intro2, fontSize: 9, alignment: 'right' },
@@ -246,7 +246,7 @@ class ConsultationPDFService {
246
246
  }
247
247
  else {
248
248
  return {
249
- columns: [shared_pdf_service_1.SharedPDFService.GetImage(Image, Entity.PrLogo), {
249
+ columns: [shared_pdf_service_1.SharedPDFService.GetImage(Image, Entity.Header.ShowLogo), {
250
250
  stack: [{ text: ((_g = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Doc) === null || _g === void 0 ? void 0 : _g.Sltn) + ' ' + ((_h = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Doc) === null || _h === void 0 ? void 0 : _h.Name), fontSize: 15, alignment: 'right', bold: true },
251
251
  { text: (_j = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Doc) === null || _j === void 0 ? void 0 : _j.Intro1, fontSize: 9, alignment: 'right' },
252
252
  { text: (_k = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Doc) === null || _k === void 0 ? void 0 : _k.Intro2, fontSize: 9, alignment: 'right' },
@@ -13,7 +13,7 @@ class SharedPDFService {
13
13
  static MainHeading(CName, Entity, Image, HColor, CopyName) {
14
14
  let headerstyle;
15
15
  let MainHeaderStyle = this.GetMainHeaderStyleForLeftAlignHeader(CName);
16
- if (Entity.Header === 1) {
16
+ if (Entity.Header.Position === 'Center') {
17
17
  headerstyle = 'header';
18
18
  }
19
19
  else {
@@ -24,8 +24,8 @@ class SharedPDFService {
24
24
  static HeaderAlignmentBasedOnCondition(CName, Image, HColor, headerstyle, MainHeaderStyle, Entity, CopyName) {
25
25
  let HeaderDetails = [];
26
26
  // HeaderDetails.push({ text: 'Original', color: 'grey', alignment: 'right' });
27
- if (!tr_utils_1.TrUtils.IsNull(Image) && Entity.PrLogo) {
28
- if (Entity.Header === 1) {
27
+ if (!tr_utils_1.TrUtils.IsNull(Image) && Entity.Header.ShowLogo) {
28
+ if (Entity.Header.Position === 'Center') {
29
29
  HeaderDetails.push({ text: '' + CName + '', style: [headerstyle, MainHeaderStyle], color: HColor, alignment: this.GetLeftMArgin(CName) });
30
30
  }
31
31
  else {
@@ -49,8 +49,7 @@ class SharedPDFService {
49
49
  }
50
50
  }
51
51
  static GetMainHeader(Entity, Image, AColor, HColor, text) {
52
- console.log('Entity.Header', Entity, Entity.Header);
53
- if (Entity.Header === 1) {
52
+ if (Entity.Header.Position === 'Center') {
54
53
  return {
55
54
  columns: this.GetAddresDetailsAndLogo(Entity, Image, AColor, HColor, text)
56
55
  };
@@ -82,8 +81,8 @@ class SharedPDFService {
82
81
  static ConsultHeaderAlignmentBasedOnCondition(CName, Image, HColor, headerstyle, MainHeaderStyle, Entity, CopyName) {
83
82
  let HeaderDetails = [];
84
83
  // HeaderDetails.push({ text: 'Original', color: 'grey', alignment: 'right' });
85
- if (!tr_utils_1.TrUtils.IsNull(Image) && Entity.PrLogo) {
86
- // if (Entity.Header === 1) {
84
+ if (!tr_utils_1.TrUtils.IsNull(Image) && Entity.Header.ShowLogo) {
85
+ // if (Entity.Header.Position === 'Center') {
87
86
  // HeaderDetails.push({ text: '' + CName + '', style: [headerstyle, MainHeaderStyle], color: HColor, alignment: this.GetLeftMArgin(CName) })
88
87
  // } else {
89
88
  HeaderDetails.push({ text: '' + CName + '', style: [headerstyle, MainHeaderStyle], color: HColor, alignment: 'left', margin: [10, 0, 0, 0] });
@@ -109,7 +108,7 @@ class SharedPDFService {
109
108
  ]
110
109
  }
111
110
  ];
112
- if (!tr_utils_1.TrUtils.IsNull(Image) && Entity.PrLogo) {
111
+ if (!tr_utils_1.TrUtils.IsNull(Image) && Entity.Header.ShowLogo) {
113
112
  Details[0].stack[1].columns.unshift({
114
113
  width: 290,
115
114
  margin: [10, 0, 0, 5],
@@ -163,7 +162,7 @@ class SharedPDFService {
163
162
  ]
164
163
  }
165
164
  ];
166
- if (!tr_utils_1.TrUtils.IsNull(Image) && Entity.PrLogo) {
165
+ if (!tr_utils_1.TrUtils.IsNull(Image) && Entity.Header.ShowLogo) {
167
166
  Details[0].stack[1].columns.unshift({
168
167
  width: 290,
169
168
  margin: [10, 0, 0, 5],
@@ -208,7 +207,7 @@ class SharedPDFService {
208
207
  ]
209
208
  }
210
209
  ];
211
- if (!tr_utils_1.TrUtils.IsNull(Image) && Entity.PrLogo) {
210
+ if (!tr_utils_1.TrUtils.IsNull(Image) && Entity.Header.ShowLogo) {
212
211
  // Details.unshift({ text: '', width: 120 });
213
212
  if (Entity.CName.length < 28) {
214
213
  Details[0].stack[0].columns.push({ text: '', width: 150 });
@@ -228,7 +227,7 @@ class SharedPDFService {
228
227
  }
229
228
  static GetHeader(Entity, HColor) {
230
229
  let headerstyle;
231
- if (Entity.Header === 1) {
230
+ if (Entity.Header.Position === 'Center') {
232
231
  headerstyle = 'ws_adrs_center';
233
232
  }
234
233
  else {
@@ -443,7 +442,7 @@ class SharedPDFService {
443
442
  }
444
443
  }
445
444
  static GetNewMainHeader(Entity, Image, AColor, HColor, text, orientation = 'portrait') {
446
- if (Entity.Header === 1) {
445
+ if (Entity.Header.Position === 'Center') {
447
446
  return {
448
447
  columns: this.GetNewAddresDetailsAndLogo(Entity, Image, AColor, HColor, text, orientation)
449
448
  };
@@ -468,7 +467,7 @@ class SharedPDFService {
468
467
  ]
469
468
  }
470
469
  ];
471
- if (!tr_utils_1.TrUtils.IsNull(Image) && Entity.PrLogo) {
470
+ if (!tr_utils_1.TrUtils.IsNull(Image) && Entity.Header.ShowLogo) {
472
471
  Details[0].stack[1].columns.unshift({
473
472
  width: headerWidth,
474
473
  margin: [10, 0, 0, 5],
@@ -524,7 +523,7 @@ class SharedPDFService {
524
523
  }
525
524
  extras.forEach((row) => centerStack.push(row));
526
525
  let Details = [
527
- !tr_utils_1.TrUtils.IsNull(Image) && Entity.PrLogo ? { image: Image, width: logoWidth, height: logoHeight } : { text: '', width: logoWidth },
526
+ !tr_utils_1.TrUtils.IsNull(Image) && Entity.Header.ShowLogo ? { image: Image, width: logoWidth, height: logoHeight } : { text: '', width: logoWidth },
528
527
  { width: '*', stack: centerStack },
529
528
  { text: '', width: logoWidth }
530
529
  ];
@@ -2420,7 +2419,7 @@ class SharedPDFService {
2420
2419
  }
2421
2420
  static FooterContent(CnstData) {
2422
2421
  var _a, _b;
2423
- if (CnstData.Entity.Header === 2) {
2422
+ if (CnstData.Entity.Header.Position === 'Left') {
2424
2423
  if (!tr_utils_1.TrUtils.IsEmpty(CnstData.Entity.FootText)) {
2425
2424
  return {
2426
2425
  table: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.7.312",
3
+ "version": "1.7.313",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -126,7 +126,7 @@ export class ConsultationFeeReceiptPrintService {
126
126
  { text: 'Registration ID- '+CnstData?.Doc?.CounReg, fontSize: 9, alignment: 'right',marginBottom:5 }], width: '40%'}]
127
127
  };
128
128
  } else {
129
- return { columns: [SharedPDFService.GetImage(Image,Entity.PrLogo), {stack:[{ text: CnstData?.Doc?.Name, fontSize: 12, bold:true, alignment: 'right' },
129
+ return { columns: [SharedPDFService.GetImage(Image,Entity.Header.ShowLogo), {stack:[{ text: CnstData?.Doc?.Name, fontSize: 12, bold:true, alignment: 'right' },
130
130
  { text: CnstData?.Doc?.Intro1, fontSize: 9, alignment: 'right' },
131
131
  { text: CnstData?.Doc?.Intro2, fontSize: 9, alignment: 'right' },
132
132
  { text: CnstData?.Doc?.Intro3, fontSize: 9, alignment: 'right' },
@@ -113,7 +113,7 @@ export class ConsultationFullPrintService {
113
113
  ]
114
114
  };
115
115
  } else {
116
- return { columns: [SharedPDFService.GetImage(Image,Entity.PrLogo), {stack:[{ text: CnstData?.Doc?.Sltn+' '+CnstData?.Doc?.Name, fontSize: 15, bold:true, alignment: 'right' },
116
+ return { columns: [SharedPDFService.GetImage(Image,Entity.Header.ShowLogo), {stack:[{ text: CnstData?.Doc?.Sltn+' '+CnstData?.Doc?.Name, fontSize: 15, bold:true, alignment: 'right' },
117
117
  { text: CnstData?.Doc?.Intro1, fontSize: 9, alignment: 'right' },
118
118
  { text: CnstData?.Doc?.Intro2, fontSize: 9, alignment: 'right' },
119
119
  { text: CnstData?.Doc?.Intro3, fontSize: 9, alignment: 'right' },
@@ -265,7 +265,7 @@ export class ConsultationLetterHeadPDFService {
265
265
  };
266
266
  } else {
267
267
  return {
268
- columns: [SharedPDFService.GetImage(Image, Entity.PrLogo), {
268
+ columns: [SharedPDFService.GetImage(Image, Entity.Header.ShowLogo), {
269
269
  stack: [{ text: CnstData?.Doc?.Sltn + ' ' + CnstData?.Doc?.Name, fontSize: 15, alignment: 'right', bold: true },
270
270
  { text: CnstData?.Doc?.Intro1, fontSize: 9, alignment: 'right' },
271
271
  { text: CnstData?.Doc?.Intro2, fontSize: 9, alignment: 'right' },
@@ -244,7 +244,7 @@ export class ConsultationPDFService {
244
244
  };
245
245
  } else {
246
246
  return {
247
- columns: [SharedPDFService.GetImage(Image, Entity.PrLogo), {
247
+ columns: [SharedPDFService.GetImage(Image, Entity.Header.ShowLogo), {
248
248
  stack: [{ text: CnstData?.Doc?.Sltn + ' ' + CnstData?.Doc?.Name, fontSize: 15, alignment: 'right', bold: true },
249
249
  { text: CnstData?.Doc?.Intro1, fontSize: 9, alignment: 'right' },
250
250
  { text: CnstData?.Doc?.Intro2, fontSize: 9, alignment: 'right' },
@@ -18,7 +18,7 @@ export class SharedPDFService {
18
18
  static MainHeading(CName: any, Entity: any, Image: any, HColor: any, CopyName: any) {
19
19
  let headerstyle: string;
20
20
  let MainHeaderStyle: any = this.GetMainHeaderStyleForLeftAlignHeader(CName);
21
- if (Entity.Header === 1) {
21
+ if (Entity.Header.Position === 'Center') {
22
22
  headerstyle = 'header';
23
23
  } else {
24
24
  headerstyle = 'temp2header';
@@ -29,8 +29,8 @@ export class SharedPDFService {
29
29
  static HeaderAlignmentBasedOnCondition(CName: any, Image: any, HColor: any, headerstyle: any, MainHeaderStyle: any, Entity: any, CopyName: any) {
30
30
  let HeaderDetails: any = [];
31
31
  // HeaderDetails.push({ text: 'Original', color: 'grey', alignment: 'right' });
32
- if (!TrUtils.IsNull(Image) && Entity.PrLogo) {
33
- if (Entity.Header === 1) {
32
+ if (!TrUtils.IsNull(Image) && Entity.Header.ShowLogo) {
33
+ if (Entity.Header.Position === 'Center') {
34
34
  HeaderDetails.push({ text: '' + CName + '', style: [headerstyle, MainHeaderStyle], color: HColor, alignment: this.GetLeftMArgin(CName) })
35
35
  } else {
36
36
  HeaderDetails.push({ text: '' + CName + '', style: [headerstyle, MainHeaderStyle], color: HColor, alignment: 'left', margin: [10, 0, 0, 0] })
@@ -55,8 +55,7 @@ export class SharedPDFService {
55
55
  }
56
56
 
57
57
  static GetMainHeader(Entity: any, Image: any, AColor: any, HColor: any, text: any) {
58
- console.log('Entity.Header',Entity, Entity.Header);
59
- if (Entity.Header === 1) {
58
+ if (Entity.Header.Position === 'Center') {
60
59
  return {
61
60
  columns: this.GetAddresDetailsAndLogo(Entity, Image, AColor, HColor, text)
62
61
  };
@@ -91,8 +90,8 @@ export class SharedPDFService {
91
90
  static ConsultHeaderAlignmentBasedOnCondition(CName: any, Image: any, HColor: any, headerstyle: any, MainHeaderStyle: any, Entity: any, CopyName: any) {
92
91
  let HeaderDetails: any = [];
93
92
  // HeaderDetails.push({ text: 'Original', color: 'grey', alignment: 'right' });
94
- if (!TrUtils.IsNull(Image) && Entity.PrLogo) {
95
- // if (Entity.Header === 1) {
93
+ if (!TrUtils.IsNull(Image) && Entity.Header.ShowLogo) {
94
+ // if (Entity.Header.Position === 'Center') {
96
95
  // HeaderDetails.push({ text: '' + CName + '', style: [headerstyle, MainHeaderStyle], color: HColor, alignment: this.GetLeftMArgin(CName) })
97
96
  // } else {
98
97
  HeaderDetails.push({ text: '' + CName + '', style: [headerstyle, MainHeaderStyle], color: HColor, alignment: 'left', margin: [10, 0, 0, 0] })
@@ -116,7 +115,7 @@ export class SharedPDFService {
116
115
  }
117
116
  ]
118
117
  }];
119
- if (!TrUtils.IsNull(Image) && Entity.PrLogo) {
118
+ if (!TrUtils.IsNull(Image) && Entity.Header.ShowLogo) {
120
119
  Details[0].stack[1].columns.unshift({
121
120
  width: 290,
122
121
  margin: [10, 0, 0, 5],
@@ -170,7 +169,7 @@ export class SharedPDFService {
170
169
  }
171
170
  ]
172
171
  }];
173
- if (!TrUtils.IsNull(Image) && Entity.PrLogo) {
172
+ if (!TrUtils.IsNull(Image) && Entity.Header.ShowLogo) {
174
173
  Details[0].stack[1].columns.unshift({
175
174
  width: 290,
176
175
  margin: [10, 0, 0, 5],
@@ -216,7 +215,7 @@ export class SharedPDFService {
216
215
  ]
217
216
  }
218
217
  ]
219
- if (!TrUtils.IsNull(Image) && Entity.PrLogo) {
218
+ if (!TrUtils.IsNull(Image) && Entity.Header.ShowLogo) {
220
219
  // Details.unshift({ text: '', width: 120 });
221
220
  if (Entity.CName.length < 28) {
222
221
  Details[0].stack[0].columns.push({ text: '', width: 150 });
@@ -237,7 +236,7 @@ export class SharedPDFService {
237
236
 
238
237
  static GetHeader(Entity: any, HColor: string) {
239
238
  let headerstyle: string;
240
- if (Entity.Header === 1) {
239
+ if (Entity.Header.Position === 'Center') {
241
240
  headerstyle = 'ws_adrs_center';
242
241
  } else {
243
242
  headerstyle = 'ws_adrs_left';
@@ -469,7 +468,7 @@ export class SharedPDFService {
469
468
 
470
469
  }
471
470
  static GetNewMainHeader(Entity: any, Image: any, AColor: any, HColor: any, text: any, orientation: 'portrait' | 'landscape' = 'portrait') {
472
- if (Entity.Header === 1) {
471
+ if (Entity.Header.Position === 'Center') {
473
472
  return {
474
473
  columns: this.GetNewAddresDetailsAndLogo(Entity, Image, AColor, HColor, text, orientation)
475
474
  };
@@ -493,7 +492,7 @@ export class SharedPDFService {
493
492
  }
494
493
  ]
495
494
  }];
496
- if (!TrUtils.IsNull(Image) && Entity.PrLogo) {
495
+ if (!TrUtils.IsNull(Image) && Entity.Header.ShowLogo) {
497
496
  Details[0].stack[1].columns.unshift({
498
497
  width: headerWidth,
499
498
  margin: [10, 0, 0, 5],
@@ -555,7 +554,7 @@ export class SharedPDFService {
555
554
  extras.forEach((row: any) => centerStack.push(row));
556
555
 
557
556
  let Details: any = [
558
- !TrUtils.IsNull(Image) && Entity.PrLogo ? { image: Image, width: logoWidth, height: logoHeight } : { text: '', width: logoWidth },
557
+ !TrUtils.IsNull(Image) && Entity.Header.ShowLogo ? { image: Image, width: logoWidth, height: logoHeight } : { text: '', width: logoWidth },
559
558
  { width: '*', stack: centerStack },
560
559
  { text: '', width: logoWidth }
561
560
  ];
@@ -2563,7 +2562,7 @@ export class SharedPDFService {
2563
2562
  }
2564
2563
 
2565
2564
  static FooterContent(CnstData: any) {
2566
- if (CnstData.Entity.Header === 2) {
2565
+ if (CnstData.Entity.Header.Position === 'Left') {
2567
2566
  if (!TrUtils.IsEmpty(CnstData.Entity.FootText)) {
2568
2567
  return {
2569
2568