|
|
@@ -159,14 +159,13 @@ v-model="estimate.transaction"> |
|
|
|
|
|
|
|
<section class="form radios"> |
|
|
|
<h3>Mortgage Insurance</h3> |
|
|
|
<input type="radio" name="transaction_type" value="transaction" |
|
|
|
@input="e => estimate.transaction = 0" |
|
|
|
selected="estimate.transaction == 0"> |
|
|
|
<label>1.43% - National MI</label> |
|
|
|
<input type="radio" name="transaction_type" value="refinance" |
|
|
|
@input="e => estimate.transaction = 1" |
|
|
|
selected="estimate.transaction == 1"> |
|
|
|
<label>0.73% - MGIC</label> |
|
|
|
<input type="radio"> |
|
|
|
<span> |
|
|
|
<label>Custom %</label> |
|
|
|
<input type="text" :value="estimate.loans[sel].mi" |
|
|
|
@input="e => estimate.loans[sel].mi = strip(e)" |
|
|
|
selected="estimate.transaction == 0"> |
|
|
|
</span> |
|
|
|
</section> |
|
|
|
|
|
|
|
<section class="form inputs"> |
|
|
@@ -207,6 +206,7 @@ const example = { |
|
|
|
pud: true, // Property under development |
|
|
|
zip: '', |
|
|
|
fees: [], |
|
|
|
mi: 0 |
|
|
|
} |
|
|
|
|
|
|
|
// The default loans on a new estimate |
|
|
@@ -331,6 +331,18 @@ function setHousingDti(e) { |
|
|
|
|
|
|
|
function generate() { |
|
|
|
this.errors = this.validate() |
|
|
|
if (this.errors.length) return |
|
|
|
|
|
|
|
fetch(`/api/estimate`, |
|
|
|
{ |
|
|
|
method: 'POST', |
|
|
|
body: JSON.stringify( this.estimate ), |
|
|
|
headers: { |
|
|
|
"Accept": "application/json", |
|
|
|
"Authorization": `Bearer ${token}`, |
|
|
|
}, |
|
|
|
} |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
function validate() { |
|
|
|