@dynamatix/gb-schemas 2.3.278 → 2.3.279
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;AAorBhC,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA4D,CAAC;AAEnF,eAAe,gBAAgB,CAAC"}
|
|
@@ -555,9 +555,12 @@ welcomeCallSchema.virtual('initialRatePercentage').get(function () {
|
|
|
555
555
|
});
|
|
556
556
|
// Virtual property for finance summary HTML
|
|
557
557
|
welcomeCallSchema.virtual('financeSummaryHtml').get(function () {
|
|
558
|
+
console.log('financeSummaryHtml virtual field called');
|
|
559
|
+
console.log('Current applicationId:', this.applicationId);
|
|
558
560
|
// Get application data
|
|
559
561
|
if (this.applicationId && typeof this.applicationId === 'object') {
|
|
560
562
|
const application = this.applicationId;
|
|
563
|
+
console.log('Application data:', JSON.stringify(application, null, 2));
|
|
561
564
|
// Initialize summary data
|
|
562
565
|
let product = 'N/A';
|
|
563
566
|
let financeTerm = 'N/A';
|
|
@@ -567,33 +570,46 @@ welcomeCallSchema.virtual('financeSummaryHtml').get(function () {
|
|
|
567
570
|
// Get product information (first 3 characters)
|
|
568
571
|
if (application.selectedProduct && typeof application.selectedProduct === 'string') {
|
|
569
572
|
product = application.selectedProduct.substring(0, 3);
|
|
573
|
+
console.log('Product from selectedProduct:', product);
|
|
570
574
|
}
|
|
571
575
|
else if (application.productId && typeof application.productId === 'object' && application.productId.selectedProduct) {
|
|
572
576
|
product = application.productId.selectedProduct.substring(0, 3);
|
|
577
|
+
console.log('Product from productId:', product);
|
|
573
578
|
}
|
|
574
|
-
// Get finance term from product features
|
|
579
|
+
// Get finance term from product features - check if productFeatures is populated
|
|
575
580
|
if (application.productFeatures && typeof application.productFeatures === 'object') {
|
|
576
581
|
const productFeatures = application.productFeatures;
|
|
582
|
+
console.log('Product features:', JSON.stringify(productFeatures, null, 2));
|
|
577
583
|
// Get fixed term
|
|
578
584
|
if (productFeatures.fixedTerm) {
|
|
579
585
|
financeTerm = `${productFeatures.fixedTerm} year finance term`;
|
|
586
|
+
console.log('Finance term:', financeTerm);
|
|
580
587
|
}
|
|
581
588
|
// Get monthly finance from repayment
|
|
582
589
|
if (productFeatures.repayment) {
|
|
583
590
|
monthlyFinance = `£${productFeatures.repayment}`;
|
|
591
|
+
console.log('Monthly finance:', monthlyFinance);
|
|
584
592
|
}
|
|
585
593
|
}
|
|
594
|
+
else {
|
|
595
|
+
console.log('No productFeatures found or not populated');
|
|
596
|
+
}
|
|
586
597
|
// Get rental income from mortgage
|
|
587
598
|
if (application.mortgageId && typeof application.mortgageId === 'object') {
|
|
588
599
|
const mortgage = application.mortgageId;
|
|
600
|
+
console.log('Mortgage data:', JSON.stringify(mortgage, null, 2));
|
|
589
601
|
if (mortgage.monthlyRentalIncome) {
|
|
590
602
|
// Format the rental income value
|
|
591
603
|
const rentalValue = typeof mortgage.monthlyRentalIncome === 'string'
|
|
592
604
|
? mortgage.monthlyRentalIncome
|
|
593
605
|
: mortgage.monthlyRentalIncome.toString();
|
|
594
606
|
rentalIncome = `£${rentalValue}`;
|
|
607
|
+
console.log('Rental income:', rentalIncome);
|
|
595
608
|
}
|
|
596
609
|
}
|
|
610
|
+
else {
|
|
611
|
+
console.log('No mortgageId found or not populated');
|
|
612
|
+
}
|
|
597
613
|
// Get occupancy information from mortgage
|
|
598
614
|
if (application.mortgageId && typeof application.mortgageId === 'object') {
|
|
599
615
|
const mortgage = application.mortgageId;
|
|
@@ -602,18 +618,23 @@ welcomeCallSchema.virtual('financeSummaryHtml').get(function () {
|
|
|
602
618
|
const firstTenant = mortgage.proposedTenantsLids[0];
|
|
603
619
|
if (firstTenant && typeof firstTenant === 'object' && firstTenant.name) {
|
|
604
620
|
occupancy = firstTenant.name;
|
|
621
|
+
console.log('Occupancy:', occupancy);
|
|
605
622
|
}
|
|
606
623
|
}
|
|
607
624
|
}
|
|
608
|
-
// Create HTML content
|
|
609
|
-
const summaryContent =
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
625
|
+
// Create HTML content
|
|
626
|
+
const summaryContent = `
|
|
627
|
+
<div><p class="text-bold">Product:</p> <span>${product}</span></div>
|
|
628
|
+
<div><p class="text-bold">Finance Term:</p> <span>${financeTerm}</span></div>
|
|
629
|
+
<div><p class="text-bold">Monthly Finance:</p> <span>${monthlyFinance}</span></div>
|
|
630
|
+
<div><p class="text-bold">Rental Income:</p> <span>${rentalIncome}</span></div>
|
|
631
|
+
<div><p class="text-bold">Occupancy:</p> <span>${occupancy}</span></div>
|
|
632
|
+
`;
|
|
633
|
+
console.log('Final summary content:', summaryContent);
|
|
634
|
+
return summaryContent;
|
|
615
635
|
}
|
|
616
|
-
|
|
636
|
+
console.log('No applicationId found or not populated');
|
|
637
|
+
return 'N/A';
|
|
617
638
|
});
|
|
618
639
|
applyAuditMiddleware(welcomeCallSchema, "ApplicantWelcomeCall");
|
|
619
640
|
// 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,QAAQ,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MA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