@dynamatix/gb-schemas 2.3.280 → 2.3.281
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;
|
|
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;AAsrBhC,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA4D,CAAC;AAEnF,eAAe,gBAAgB,CAAC"}
|
|
@@ -577,34 +577,31 @@ welcomeCallSchema.virtual('financeSummaryHtml').get(function () {
|
|
|
577
577
|
let occupancy = 'N/A';
|
|
578
578
|
// Get product information (first 3 characters)
|
|
579
579
|
if (application.selectedProduct && typeof application.selectedProduct === 'string') {
|
|
580
|
-
product = application.selectedProduct
|
|
580
|
+
product = application.selectedProduct;
|
|
581
581
|
console.log('Product from selectedProduct:', product);
|
|
582
582
|
}
|
|
583
583
|
else if (application.productId && typeof application.productId === 'object' && application.productId.selectedProduct) {
|
|
584
|
-
product = application.productId.selectedProduct
|
|
584
|
+
product = application.productId.selectedProduct;
|
|
585
585
|
console.log('Product from productId:', product);
|
|
586
586
|
}
|
|
587
|
-
// Get finance term from
|
|
588
|
-
if (application.
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
if (productFeatures.fixedTerm) {
|
|
593
|
-
financeTerm = `${productFeatures.fixedTerm} year finance term`;
|
|
594
|
-
console.log('Finance term:', financeTerm);
|
|
595
|
-
}
|
|
596
|
-
// Get monthly finance from repayment
|
|
597
|
-
if (productFeatures.repayment) {
|
|
598
|
-
monthlyFinance = `£${productFeatures.repayment}`;
|
|
599
|
-
console.log('Monthly finance:', monthlyFinance);
|
|
587
|
+
// Get finance term from productId if available
|
|
588
|
+
if (application.productId && typeof application.productId === 'object') {
|
|
589
|
+
if (application.productId.numberOfYearsToRepay) {
|
|
590
|
+
financeTerm = `${application.productId.numberOfYearsToRepay} year finance term`;
|
|
591
|
+
console.log('Finance term from productId:', financeTerm);
|
|
600
592
|
}
|
|
601
593
|
}
|
|
602
594
|
else {
|
|
603
|
-
console.log('No
|
|
595
|
+
console.log('No productId found or not populated');
|
|
604
596
|
}
|
|
605
|
-
//
|
|
597
|
+
// Note: productFeatures is a separate collection that needs to be populated in form configuration
|
|
598
|
+
// If you need productFeatures data, it should be populated separately in the form config
|
|
599
|
+
// Get rental income from mortgage - mortgageId is at application level
|
|
600
|
+
let mortgage = null;
|
|
606
601
|
if (application.mortgageId && typeof application.mortgageId === 'object') {
|
|
607
|
-
|
|
602
|
+
mortgage = application.mortgageId;
|
|
603
|
+
}
|
|
604
|
+
if (mortgage) {
|
|
608
605
|
console.log('Mortgage data:', JSON.stringify(mortgage, null, 2));
|
|
609
606
|
if (mortgage.monthlyRentalIncome) {
|
|
610
607
|
// Format the rental income value
|
|
@@ -614,13 +611,7 @@ welcomeCallSchema.virtual('financeSummaryHtml').get(function () {
|
|
|
614
611
|
rentalIncome = `£${rentalValue}`;
|
|
615
612
|
console.log('Rental income:', rentalIncome);
|
|
616
613
|
}
|
|
617
|
-
|
|
618
|
-
else {
|
|
619
|
-
console.log('No mortgageId found or not populated');
|
|
620
|
-
}
|
|
621
|
-
// Get occupancy information from mortgage
|
|
622
|
-
if (application.mortgageId && typeof application.mortgageId === 'object') {
|
|
623
|
-
const mortgage = application.mortgageId;
|
|
614
|
+
// Get occupancy information from mortgage
|
|
624
615
|
if (mortgage.proposedTenantsLids && Array.isArray(mortgage.proposedTenantsLids)) {
|
|
625
616
|
// Get the first proposed tenant type
|
|
626
617
|
const firstTenant = mortgage.proposedTenantsLids[0];
|
|
@@ -630,6 +621,9 @@ welcomeCallSchema.virtual('financeSummaryHtml').get(function () {
|
|
|
630
621
|
}
|
|
631
622
|
}
|
|
632
623
|
}
|
|
624
|
+
else {
|
|
625
|
+
console.log('No mortgageId found or not populated');
|
|
626
|
+
}
|
|
633
627
|
// Create HTML content
|
|
634
628
|
const summaryContent = `
|
|
635
629
|
<div><p class="text-bold">Product:</p> <span>${product}</span></div>
|