diff --git a/components/new/details.vue b/components/new/details.vue index e36dbcf..38a87b1 100644 --- a/components/new/details.vue +++ b/components/new/details.vue @@ -61,14 +61,29 @@ <section class="radios form"> <h3>Loan Type</h3> -<input type="radio" name="loan_type" value="conv" v-model="loans[sel].type" +<input type="radio" + name="loan_type" + value="conv" + @change="(e) => $emit('update:loanType', e.target.value)" > <label>Conventional</label> -<input type="radio" name="loan_type" value="fha" v-model="loans[sel].type"> +<input type="radio" + name="loan_type" + value="fha" + :checked="loans[sel].type == 'fha'" + @change="(e) => $emit('update:loanType', e.target.value)"> <label>FHA</label> -<input type="radio" name="loan_type" value="va" v-model="loans[sel].type"> +<input type="radio" + name="loan_type" + value="va" + :checked="loans[sel].type == 'va'" + @change="(e) => $emit('update:loanType', e.target.value)"> <label>VA</label> -<input type="radio" name="loan_type" value="usda" v-model="loans[sel].type"> +<input type="radio" + name="loan_type" + value="usda" + :checked="loans[sel].type == 'usda'" + @change="(e) => $emit('update:loanType', e.target.value)"> <label>USDA</label> </section> @@ -291,7 +306,7 @@ export default { 'update:loanType', 'update:loanTerm', 'update:loanProgram', - 'update:ltv' + 'update:ltv', ], data() { return { diff --git a/components/new/new.vue b/components/new/new.vue index 2836d3d..618f2ba 100644 --- a/components/new/new.vue +++ b/components/new/new.vue @@ -27,6 +27,13 @@ class="bi bi-plus" viewBox="0 0 16 16"> <path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 @update:name="(name) => loans[sel].title = name" @del="del" + @update:borrowers="(b) => estimate.borrowers = b" + @update:creditScore="(c) => estimate.creditScore = c" + @update:mIncome="(m) => estimate.mIncome = m" + @update:transaction="(t) => estimate.transaction = t" + @update:property="(p) => estimate.property = p" + + @update:loanType="(lt) => loans[sel].type = lt" /> <summary v-if="hash == '#new/summary'"/>