@@ -365,6 +365,16 @@ section.special { | |||||
padding: 25px 10px; | padding: 25px 10px; | ||||
} | } | ||||
section.mi .row { | |||||
width: 100%; | |||||
display: flex; | |||||
gap: 10px; | |||||
} | |||||
section.mi .row input[type=checkbox] { | |||||
margin-right: 0; | |||||
} | |||||
.loading span.error { | .loading span.error { | ||||
top: 40px; | top: 40px; | ||||
position: absolute; | position: absolute; | ||||
@@ -161,9 +161,17 @@ | |||||
@save="addFee" | @save="addFee" | ||||
/> | /> | ||||
<section class="form radios"> | |||||
<section class="form inputs mi"> | |||||
<h3>Mortgage Insurance</h3> | <h3>Mortgage Insurance</h3> | ||||
<p>N/A</p> | |||||
<div class="row"> | |||||
<input checked type="radio" name="mi"/><label>Manual %</label> | |||||
<input type="checkbox" :value="loans[sel].mi.rate" | |||||
@change="e => $emit('toggle:manualMIMonthly')" /> | |||||
<label>monthly</label> | |||||
</div> | |||||
<div class="row"> | |||||
<input @input="e => $emit('update:manualMI', stripPerc(e))" /> | |||||
</div> | |||||
</section> | </section> | ||||
<section class="form inputs"> | <section class="form inputs"> | ||||
@@ -290,6 +298,8 @@ export default { | |||||
'update:hazard', | 'update:hazard', | ||||
'update:taxEscrow', | 'update:taxEscrow', | ||||
'update:tax', | 'update:tax', | ||||
'update:manualMI', | |||||
'toggle:manualMIMonthly', | |||||
'continue' | 'continue' | ||||
], | ], | ||||
@@ -48,6 +48,9 @@ class="bi bi-plus" viewBox="0 0 16 16"> <path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 | |||||
@update:hazard="(h) => loans[sel].hazard = h" | @update:hazard="(h) => loans[sel].hazard = h" | ||||
@update:taxEscrow="(t) => loans[sel].taxEscrow = t" | @update:taxEscrow="(t) => loans[sel].taxEscrow = t" | ||||
@update:tax="(t) => loans[sel].tax = t" | @update:tax="(t) => loans[sel].tax = t" | ||||
@update:manualMI="perc => loans[sel].mi.rate = perc" | |||||
@toggle:manualMIMonthly= | |||||
"() => loans[sel].mi.monthly = !loans[sel].mi.monthly" | |||||
@continue="generate" | @continue="generate" | ||||
/> | /> | ||||
<loan-summary v-if="hash == '#new/summary'" | <loan-summary v-if="hash == '#new/summary'" | ||||
@@ -83,7 +86,7 @@ const example = { | |||||
pud: true, // Property under development | pud: true, // Property under development | ||||
zip: '', | zip: '', | ||||
fees: [], | fees: [], | ||||
mi: {} | |||||
mi: {monthly: false, rate: 0} | |||||
} | } | ||||
// The default loans on a new estimate | // The default loans on a new estimate | ||||
@@ -17,7 +17,7 @@ | |||||
<section class="form inputs"> | <section class="form inputs"> | ||||
<button>Save Estimate</button> | <button>Save Estimate</button> | ||||
<button>Generage PDF</button> | |||||
<button>Generate PDF</button> | |||||
</section> | </section> | ||||
</div> | </div> | ||||
@@ -101,16 +101,17 @@ type Loan struct { | |||||
} | } | ||||
type MI struct { | type MI struct { | ||||
Type string | |||||
Label string | |||||
Lender string | |||||
Rate float32 | |||||
Premium float32 | |||||
Upfront float32 | |||||
FiveYearTotal float32 | |||||
InitialAllInPremium float32 | |||||
InitialAllInRate float32 | |||||
InitialAmount float32 | |||||
Type string `json:"user"` | |||||
Label string `json:"label"` | |||||
Lender string `json:"lender"` | |||||
Rate float32 `json:"rate"` | |||||
Premium float32 `json:"premium"` | |||||
Upfront float32 `json:"upfront"` | |||||
Monthly bool `json:"monthly"` | |||||
FiveYearTotal float32 `json:"fiveYearTotal"` | |||||
InitialAllInPremium float32 `json:"initialAllInPremium"` | |||||
InitialAllInRate float32 `json:"initialAllInRate"` | |||||
InitialAmount float32 `json:"initialAmount"` | |||||
} | } | ||||
type Result struct { | type Result struct { | ||||