@dynamatix/gb-schemas 2.3.284 → 2.3.286

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.
@@ -1 +1 @@
1
- {"version":3,"file":"applicant-welcome-call.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-welcome-call.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AA2rBhC,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA4D,CAAC;AAEnF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"applicant-welcome-call.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-welcome-call.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AA+rBhC,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA4D,CAAC;AAEnF,eAAe,gBAAgB,CAAC"}
@@ -384,7 +384,7 @@ welcomeCallSchema.virtual('otherApplicantsNameAndDOB').get(function () {
384
384
  // Format as an HTML line (with bold labels and inline values)
385
385
  return `
386
386
  <div class="applicant-line">
387
- <span>${fullFirstName}, ${lastName}, ${formattedDOB}${comma}</span>
387
+ <span class="readonly-data">${fullFirstName}, ${lastName}, ${formattedDOB}${comma}</span>
388
388
  </div>
389
389
  `;
390
390
  }).filter((line) => line && line.trim() !== '');
@@ -586,10 +586,12 @@ welcomeCallSchema.virtual('financeSummaryHtml').get(function () {
586
586
  let occupancy = '';
587
587
  // Get product information (first 3 characters)
588
588
  if (application.selectedProduct && typeof application.selectedProduct === 'string') {
589
- product = application.selectedProduct;
589
+ const extracted = application.selectedProduct.split('(')[0].trim();
590
+ product = `${extracted} product`;
590
591
  }
591
592
  else if (application.productId && typeof application.productId === 'object' && application.productId.selectedProduct) {
592
- product = application.productId.selectedProduct;
593
+ const extracted = application.productId.selectedProduct.split('(')[0].trim();
594
+ product = `${extracted} product`;
593
595
  }
594
596
  else {
595
597
  product = '-';
@@ -611,17 +613,17 @@ welcomeCallSchema.virtual('financeSummaryHtml').get(function () {
611
613
  if (mortgage) {
612
614
  // Get rental income - check if it exists (even if 0)
613
615
  if (mortgage.monthlyRentalIncome !== undefined && mortgage.monthlyRentalIncome !== null) {
614
- // Format the rental income value
615
- const rentalValue = typeof mortgage.monthlyRentalIncome === 'string'
616
- ? mortgage.monthlyRentalIncome.toFixed(2)
617
- : mortgage.monthlyRentalIncome.toString().toFixed(2);
616
+ // Convert to number first, then format
617
+ const numericValue = Number(mortgage.monthlyRentalIncome);
618
+ const rentalValue = isNaN(numericValue) ? '0.00' : numericValue.toFixed(2);
618
619
  rentalIncome = `£${rentalValue}`;
619
620
  }
621
+ console.log(mortgage.loanRequired, 'loan required');
622
+ console.log(mortgage, 'mortgage');
620
623
  // Get finance amount from loanRequired
621
624
  if (mortgage.loanRequired !== undefined && mortgage.loanRequired !== null) {
622
- const financeValue = typeof mortgage.loanRequired === 'string'
623
- ? mortgage.loanRequired.toFixed(2)
624
- : mortgage.loanRequired.toString().toFixed(2);
625
+ const numericValue = Number(mortgage.loanRequired);
626
+ const financeValue = isNaN(numericValue) ? '0.00' : numericValue.toFixed(2);
625
627
  monthlyFinance = `£${financeValue}`;
626
628
  }
627
629
  // Get occupancy information from mortgage
@@ -638,11 +640,11 @@ welcomeCallSchema.virtual('financeSummaryHtml').get(function () {
638
640
  }
639
641
  // Create HTML content
640
642
  const summaryContent = `
641
- <div><p class="text-bold">Product:</p> <span>${product}</span></div>
642
- <div><p class="text-bold">Finance Term:</p> <span>${financeTerm}</span></div>
643
- <div><p class="text-bold">Monthly Finance:</p> <span>${monthlyFinance}</span></div>
644
- <div><p class="text-bold">Rental Income:</p> <span>${rentalIncome}</span></div>
645
- <div><p class="text-bold">Occupancy:</p> <span>${occupancy}</span></div>
643
+ <div class="flex align-items-center mb-2"><p class="text-bold m-0 readonly-data">Product:</p> <span class="readonly-data">${product}</span></div>
644
+ <div class="flex align-items-center mb-2"><p class="text-bold m-0 readonly-data">Finance Term:</p> <span class="readonly-data">${financeTerm}</span></div>
645
+ <div class="flex align-items-center mb-2"><p class="text-bold m-0 readonly-data">Monthly Finance:</p> <span class="readonly-data">${monthlyFinance}</span></div>
646
+ <div class="flex align-items-center mb-2"><p class="text-bold m-0 readonly-data">Rental Income:</p> <span class="readonly-data">${rentalIncome}</span></div>
647
+ <div class="flex align-items-center mb-2"><p class="text-bold m-0 readonly-data">Occupancy:</p> <span class="readonly-data">${occupancy}</span></div>
646
648
  `;
647
649
  return summaryContent;
648
650
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "2.3.284",
3
+ "version": "2.3.286",
4
4
  "description": "All the schemas for gatehouse bank back-end",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",