@dynamatix/gb-schemas 2.3.284 → 2.3.285

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;AAyrBhC,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA4D,CAAC;AAEnF,eAAe,gBAAgB,CAAC"}
@@ -611,17 +611,15 @@ welcomeCallSchema.virtual('financeSummaryHtml').get(function () {
611
611
  if (mortgage) {
612
612
  // Get rental income - check if it exists (even if 0)
613
613
  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);
614
+ // Convert to number first, then format
615
+ const numericValue = Number(mortgage.monthlyRentalIncome);
616
+ const rentalValue = isNaN(numericValue) ? '0.00' : numericValue.toFixed(2);
618
617
  rentalIncome = `£${rentalValue}`;
619
618
  }
620
619
  // Get finance amount from loanRequired
621
620
  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);
621
+ const numericValue = Number(mortgage.loanRequired);
622
+ const financeValue = isNaN(numericValue) ? '0.00' : numericValue.toFixed(2);
625
623
  monthlyFinance = `£${financeValue}`;
626
624
  }
627
625
  // Get occupancy information from mortgage
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.285",
4
4
  "description": "All the schemas for gatehouse bank back-end",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",