@dynamatix/gb-schemas 2.3.278 → 2.3.280
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;AA4rBhC,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA4D,CAAC;AAEnF,eAAe,gBAAgB,CAAC"}
|
|
@@ -555,9 +555,20 @@ welcomeCallSchema.virtual('initialRatePercentage').get(function () {
|
|
|
555
555
|
});
|
|
556
556
|
// Virtual property for finance summary HTML
|
|
557
557
|
welcomeCallSchema.virtual('financeSummaryHtml').get(function () {
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
558
|
+
console.log('financeSummaryHtml virtual field called');
|
|
559
|
+
let application = null;
|
|
560
|
+
if (this.applicantId && typeof this.applicantId === 'object' && !(typeof this.applicantId.toHexString === 'function') && this.applicantId.applicationId) {
|
|
561
|
+
application = this.applicantId.applicationId;
|
|
562
|
+
}
|
|
563
|
+
else if (this.applicationId && typeof this.applicationId === 'object') {
|
|
564
|
+
application = this.applicationId;
|
|
565
|
+
}
|
|
566
|
+
else {
|
|
567
|
+
console.log('No application found');
|
|
568
|
+
return 'N/A';
|
|
569
|
+
}
|
|
570
|
+
if (application) {
|
|
571
|
+
console.log('Application data:', JSON.stringify(application, null, 2));
|
|
561
572
|
// Initialize summary data
|
|
562
573
|
let product = 'N/A';
|
|
563
574
|
let financeTerm = 'N/A';
|
|
@@ -567,33 +578,46 @@ welcomeCallSchema.virtual('financeSummaryHtml').get(function () {
|
|
|
567
578
|
// Get product information (first 3 characters)
|
|
568
579
|
if (application.selectedProduct && typeof application.selectedProduct === 'string') {
|
|
569
580
|
product = application.selectedProduct.substring(0, 3);
|
|
581
|
+
console.log('Product from selectedProduct:', product);
|
|
570
582
|
}
|
|
571
583
|
else if (application.productId && typeof application.productId === 'object' && application.productId.selectedProduct) {
|
|
572
584
|
product = application.productId.selectedProduct.substring(0, 3);
|
|
585
|
+
console.log('Product from productId:', product);
|
|
573
586
|
}
|
|
574
|
-
// Get finance term from product features
|
|
587
|
+
// Get finance term from product features - check if productFeatures is populated
|
|
575
588
|
if (application.productFeatures && typeof application.productFeatures === 'object') {
|
|
576
589
|
const productFeatures = application.productFeatures;
|
|
590
|
+
console.log('Product features:', JSON.stringify(productFeatures, null, 2));
|
|
577
591
|
// Get fixed term
|
|
578
592
|
if (productFeatures.fixedTerm) {
|
|
579
593
|
financeTerm = `${productFeatures.fixedTerm} year finance term`;
|
|
594
|
+
console.log('Finance term:', financeTerm);
|
|
580
595
|
}
|
|
581
596
|
// Get monthly finance from repayment
|
|
582
597
|
if (productFeatures.repayment) {
|
|
583
598
|
monthlyFinance = `£${productFeatures.repayment}`;
|
|
599
|
+
console.log('Monthly finance:', monthlyFinance);
|
|
584
600
|
}
|
|
585
601
|
}
|
|
602
|
+
else {
|
|
603
|
+
console.log('No productFeatures found or not populated');
|
|
604
|
+
}
|
|
586
605
|
// Get rental income from mortgage
|
|
587
606
|
if (application.mortgageId && typeof application.mortgageId === 'object') {
|
|
588
607
|
const mortgage = application.mortgageId;
|
|
608
|
+
console.log('Mortgage data:', JSON.stringify(mortgage, null, 2));
|
|
589
609
|
if (mortgage.monthlyRentalIncome) {
|
|
590
610
|
// Format the rental income value
|
|
591
611
|
const rentalValue = typeof mortgage.monthlyRentalIncome === 'string'
|
|
592
612
|
? mortgage.monthlyRentalIncome
|
|
593
613
|
: mortgage.monthlyRentalIncome.toString();
|
|
594
614
|
rentalIncome = `£${rentalValue}`;
|
|
615
|
+
console.log('Rental income:', rentalIncome);
|
|
595
616
|
}
|
|
596
617
|
}
|
|
618
|
+
else {
|
|
619
|
+
console.log('No mortgageId found or not populated');
|
|
620
|
+
}
|
|
597
621
|
// Get occupancy information from mortgage
|
|
598
622
|
if (application.mortgageId && typeof application.mortgageId === 'object') {
|
|
599
623
|
const mortgage = application.mortgageId;
|
|
@@ -602,18 +626,23 @@ welcomeCallSchema.virtual('financeSummaryHtml').get(function () {
|
|
|
602
626
|
const firstTenant = mortgage.proposedTenantsLids[0];
|
|
603
627
|
if (firstTenant && typeof firstTenant === 'object' && firstTenant.name) {
|
|
604
628
|
occupancy = firstTenant.name;
|
|
629
|
+
console.log('Occupancy:', occupancy);
|
|
605
630
|
}
|
|
606
631
|
}
|
|
607
632
|
}
|
|
608
|
-
// Create HTML content
|
|
609
|
-
const summaryContent =
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
633
|
+
// Create HTML content
|
|
634
|
+
const summaryContent = `
|
|
635
|
+
<div><p class="text-bold">Product:</p> <span>${product}</span></div>
|
|
636
|
+
<div><p class="text-bold">Finance Term:</p> <span>${financeTerm}</span></div>
|
|
637
|
+
<div><p class="text-bold">Monthly Finance:</p> <span>${monthlyFinance}</span></div>
|
|
638
|
+
<div><p class="text-bold">Rental Income:</p> <span>${rentalIncome}</span></div>
|
|
639
|
+
<div><p class="text-bold">Occupancy:</p> <span>${occupancy}</span></div>
|
|
640
|
+
`;
|
|
641
|
+
console.log('Final summary content:', summaryContent);
|
|
642
|
+
return summaryContent;
|
|
615
643
|
}
|
|
616
|
-
|
|
644
|
+
console.log('No application found');
|
|
645
|
+
return 'N/A';
|
|
617
646
|
});
|
|
618
647
|
applyAuditMiddleware(welcomeCallSchema, "ApplicantWelcomeCall");
|
|
619
648
|
// Apply workflow plugin to the schema
|
|
@@ -62,5 +62,17 @@ export default interface IApplicantWelcomeCall extends IBaseType {
|
|
|
62
62
|
customerQuestions?: string;
|
|
63
63
|
underwriterName?: string;
|
|
64
64
|
finalCallCompletedDate?: string;
|
|
65
|
+
fullName?: string;
|
|
66
|
+
customerCurrentResidentialAddress?: string;
|
|
67
|
+
applicantEmployerBusinessName?: string;
|
|
68
|
+
customerContactNumbers?: string;
|
|
69
|
+
otherApplicantsNameAndDOB?: string;
|
|
70
|
+
brokerNameAndFirm?: string;
|
|
71
|
+
accountHolderAndBank?: string;
|
|
72
|
+
customerPropertyAddress?: string;
|
|
73
|
+
applicantEmployer?: string;
|
|
74
|
+
productName?: string;
|
|
75
|
+
initialRatePercentage?: string;
|
|
76
|
+
financeSummaryHtml?: string;
|
|
65
77
|
}
|
|
66
78
|
//# sourceMappingURL=applicant-welcome-call.type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applicant-welcome-call.type.d.ts","sourceRoot":"","sources":["../../applicants/applicant-welcome-call.type.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGhD,MAAM,CAAC,OAAO,WAAW,qBAAsB,SAAQ,SAAS;IAC5D,WAAW,EAAE,KAAK,CAAC,Q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