gemcap-be-common 1.5.26 → 1.5.28

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.
@@ -302,6 +302,7 @@ export interface IProspect extends IProspectBase, IProspectExternalNew {
302
302
  };
303
303
  closingPoints: number;
304
304
  expectedLoanYield: number;
305
+ depositRequested: number;
305
306
  state: string;
306
307
  contacts: IProspectContact[];
307
308
  underwriterIds: mongoose.Types.ObjectId[];
@@ -455,6 +455,7 @@ exports.ProspectValidationSchema = joi_1.default.object({
455
455
  industryId: joi_1.default.string().required(),
456
456
  status: joi_1.default.string().valid(...Object.values(EProspectStatus)).required(),
457
457
  probability: joi_1.default.number().required(),
458
+ depositRequested: joi_1.default.number().required(),
458
459
  revolver: joi_1.default.object({
459
460
  commitment: joi_1.default.number(),
460
461
  expected: joi_1.default.number(),
@@ -625,6 +626,9 @@ exports.ProspectSchema = new mongoose_1.default.Schema({
625
626
  expectedLoanYield: {
626
627
  type: Number,
627
628
  },
629
+ depositRequested: {
630
+ type: Number,
631
+ },
628
632
  keyDates: {
629
633
  lastContact: {
630
634
  type: Date,
@@ -559,6 +559,7 @@ export interface IProspect extends IProspectBase, IProspectExternalNew {
559
559
  },
560
560
  closingPoints: number;
561
561
  expectedLoanYield: number;
562
+ depositRequested: number;
562
563
  state: string;
563
564
  contacts: IProspectContact[];
564
565
  underwriterIds: mongoose.Types.ObjectId[];
@@ -639,6 +640,7 @@ export const ProspectValidationSchema = Joi.object({
639
640
  industryId: Joi.string().required(),
640
641
  status: Joi.string().valid(...Object.values(EProspectStatus)).required(),
641
642
  probability: Joi.number().required(),
643
+ depositRequested: Joi.number().required(),
642
644
  revolver: Joi.object({
643
645
  commitment: Joi.number(),
644
646
  expected: Joi.number(),
@@ -815,6 +817,9 @@ export const ProspectSchema = new mongoose.Schema<IProspect, ProspectModel>(
815
817
  expectedLoanYield: {
816
818
  type: Number,
817
819
  },
820
+ depositRequested: {
821
+ type: Number,
822
+ },
818
823
  keyDates: {
819
824
  lastContact: {
820
825
  type: Date,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.5.26",
3
+ "version": "1.5.28",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -440,8 +440,10 @@ class PdfService {
440
440
  emptyString,
441
441
  ...preparedTransactionsHeader,
442
442
  preparedTransactions,
443
- productForPeriod.length === index + 1 ? emptyString : pageBreaker,
444
443
  ];
444
+ const productPageEnd = productForPeriod.length === index + 1
445
+ ? emptyString
446
+ : pageBreaker;
445
447
  if (product.type === loan_types_enum_1.ELoanTypes.TERM) {
446
448
  const { termLoanTableData, monthlyPrincipal, dueDate, } = await this.getTermLoan(product._id.toString(), new Date(start));
447
449
  if (monthlyPrincipal !== null) {
@@ -465,9 +467,13 @@ class PdfService {
465
467
  table: { widths: ['*', '*', '*', '*', '*', '*', '*', '*', '*'], body: termLoanTableData },
466
468
  layout: 'lightHorizontalLines',
467
469
  },
470
+ productPageEnd,
468
471
  ];
469
472
  }
470
- return baseContent;
473
+ return [
474
+ ...baseContent,
475
+ productPageEnd,
476
+ ];
471
477
  }));
472
478
  const preparedTotal = Object.entries(totalGroupedData).map(([chargeType, amount]) => {
473
479
  totalStatementValue = new decimal_js_1.default(totalStatementValue).add(amount).toNumber();
@@ -522,9 +522,12 @@ export class PdfService {
522
522
  emptyString,
523
523
  ...preparedTransactionsHeader,
524
524
  preparedTransactions,
525
- productForPeriod.length === index + 1 ? emptyString : pageBreaker,
526
525
  ];
527
526
 
527
+ const productPageEnd = productForPeriod.length === index + 1
528
+ ? emptyString
529
+ : pageBreaker;
530
+
528
531
  if (product.type === ELoanTypes.TERM) {
529
532
  const {
530
533
  termLoanTableData,
@@ -554,10 +557,14 @@ export class PdfService {
554
557
  table: { widths: ['*', '*', '*', '*', '*', '*', '*', '*', '*'], body: termLoanTableData },
555
558
  layout: 'lightHorizontalLines',
556
559
  },
560
+ productPageEnd,
557
561
  ];
558
562
  }
559
563
 
560
- return baseContent;
564
+ return [
565
+ ...baseContent,
566
+ productPageEnd,
567
+ ];
561
568
  }));
562
569
 
563
570
  const preparedTotal = Object.entries(totalGroupedData).map(([chargeType, amount]) => {