|
|
@@ -5,7 +5,7 @@ |
|
|
|
|
|
|
|
<section class="loans-list"> |
|
|
|
|
|
|
|
<h3 v-for="(l, indx) in loans" |
|
|
|
<h3 v-for="(l, indx) in estimate.loans" |
|
|
|
:class="sel == indx ? 'sel' : ''" |
|
|
|
@click="() => sel = indx" |
|
|
|
> |
|
|
@@ -46,14 +46,14 @@ class="bi bi-plus" viewBox="0 0 16 16"> <path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 |
|
|
|
@update:dti="setDti" |
|
|
|
@update:hoi="(hoi) => loan.hoi = Math.round(hoi*100)" |
|
|
|
@update:interest="(i) => loan.interest = i" |
|
|
|
@update:interestDays="(d) => loans[sel].interestDays = d" |
|
|
|
@update:hazardEscrow="(h) => loans[sel].hazardEscrow = h" |
|
|
|
@update:interestDays="(d) => estimate.loans[sel].interestDays = d" |
|
|
|
@update:hazardEscrow="(h) => estimate.loans[sel].hazardEscrow = h" |
|
|
|
@update:hazard="(h) => loan.hazard = Math.round(h * 100)" |
|
|
|
@update:taxEscrow="(t) => loans[sel].taxEscrow = t" |
|
|
|
@update:taxEscrow="(t) => estimate.loans[sel].taxEscrow = t" |
|
|
|
@update:tax="(t) => loan.tax = Math.round(t*100)" |
|
|
|
@update:manualMI="perc => loan.mi.rate = perc" |
|
|
|
@toggle:manualMIMonthly= |
|
|
|
"() => loans[sel].mi.monthly = !loans[sel].mi.monthly" |
|
|
|
"() => estimate.loans[sel].mi.monthly = !estimate.loans[sel].mi.monthly" |
|
|
|
@continue="generate" |
|
|
|
/> |
|
|
|
<loan-summary v-if="hash == '#new/summary'" |
|
|
@@ -130,10 +130,10 @@ function createFees() { |
|
|
|
|
|
|
|
|
|
|
|
function del() { |
|
|
|
if (this.loans.length > 1) { |
|
|
|
if (this.estimate.loans.length > 1) { |
|
|
|
let x = this.sel |
|
|
|
this.sel = 0 |
|
|
|
this.loans.splice(x, 1) |
|
|
|
this.estimate.loans.splice(x, 1) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@@ -176,7 +176,7 @@ function setAmount(e) { |
|
|
|
|
|
|
|
function setDti(e) { |
|
|
|
let dti = strip(e) |
|
|
|
let loan = this.loans[this.sel] |
|
|
|
let loan = this.estimate.loans[this.sel] |
|
|
|
if (!loan.price) return |
|
|
|
|
|
|
|
if (dti > 100) dti = 100 |
|
|
@@ -188,7 +188,7 @@ function setDti(e) { |
|
|
|
|
|
|
|
function setHousingDti(e) { |
|
|
|
let housingDti = strip(e) |
|
|
|
let loan = this.loans[this.sel] |
|
|
|
let loan = this.estimate.loans[this.sel] |
|
|
|
if (!loan.price) return |
|
|
|
|
|
|
|
if (housingDti > 100) housingDti = 100 |
|
|
@@ -238,7 +238,6 @@ export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
estimate: estimate, |
|
|
|
loans: estimate.loans, |
|
|
|
sel: 0, |
|
|
|
errors: [], |
|
|
|
hash: window.location.hash |
|
|
|