|
@@ -164,11 +164,11 @@ type="" |
|
|
@input="(e) => newFee.amount = strip(e)"> |
|
|
@input="(e) => newFee.amount = strip(e)"> |
|
|
|
|
|
|
|
|
<select id="" name="" v-model="newFee.type"> |
|
|
<select id="" name="" v-model="newFee.type"> |
|
|
<option value="title">Title Company</option> |
|
|
|
|
|
<option value="gov">Government</option> |
|
|
|
|
|
<option value="lender">Lender</option> |
|
|
|
|
|
<option value="lender_required">Required by Lender</option> |
|
|
|
|
|
<option value="other">Other</option> |
|
|
|
|
|
|
|
|
<option value="Title Company">Title Company</option> |
|
|
|
|
|
<option value="Government">Government</option> |
|
|
|
|
|
<option value="Lender">Lender</option> |
|
|
|
|
|
<option value="Services Required by Lender">Required by Lender</option> |
|
|
|
|
|
<option value="Other">Other</option> |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<button :disabled="!validFee" @click="addFee(true)">Debit</button> |
|
|
<button :disabled="!validFee" @click="addFee(true)">Debit</button> |
|
@@ -203,20 +203,6 @@ selected="estimate.transaction == 1"> |
|
|
<script> |
|
|
<script> |
|
|
import Dialog from "./dialog.vue" |
|
|
import Dialog from "./dialog.vue" |
|
|
|
|
|
|
|
|
// The default fees of a new loan |
|
|
|
|
|
const fees = [ |
|
|
|
|
|
{ name: 'Processing fee', type: 'Lender Fees', amount: 500 }, |
|
|
|
|
|
{ name: 'Underwriting fee', type: 'Lender Fees', amount: 500 }, |
|
|
|
|
|
{ name: 'Credit Report', type: 'Services Required by Lender', |
|
|
|
|
|
amount: 52.50 }, |
|
|
|
|
|
{ name: 'Appraisal', type: 'Services Required by Lender', amount: 52.50 }, |
|
|
|
|
|
{ name: 'Title Services', type: 'Title Company', amount: 1000 }, |
|
|
|
|
|
{ name: 'Lender\'s Title Insurance', type: 'Title Company', amount: 1599 }, |
|
|
|
|
|
{ name: 'Owner\'s Title Insurance', type: 'Title Company', amount: 451.00 }, |
|
|
|
|
|
{ name: 'Recording Charges', type: 'Government', amount: 99.00 }, |
|
|
|
|
|
{ name: 'State Tax', type: 'Government', amount: 2411.00 }, |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
// The default values of a new estimate |
|
|
// The default values of a new estimate |
|
|
const example = { |
|
|
const example = { |
|
|
title: "Example", |
|
|
title: "Example", |
|
@@ -236,15 +222,15 @@ const example = { |
|
|
program: "", |
|
|
program: "", |
|
|
pud: true, // Property under development |
|
|
pud: true, // Property under development |
|
|
zip: '', |
|
|
zip: '', |
|
|
fees: fees, |
|
|
|
|
|
|
|
|
fees: [], |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// The default loans on a new estimate |
|
|
// The default loans on a new estimate |
|
|
const loans = [ |
|
|
const loans = [ |
|
|
Object.assign({}, example, {fees: createFees()}), |
|
|
|
|
|
|
|
|
Object.assign({}, example,), |
|
|
Object.assign( |
|
|
Object.assign( |
|
|
Object.assign({}, example), |
|
|
Object.assign({}, example), |
|
|
{title: "Another One", fees: createFees()} |
|
|
|
|
|
|
|
|
{title: "Another One",} |
|
|
), |
|
|
), |
|
|
] |
|
|
] |
|
|
|
|
|
|
|
@@ -271,7 +257,7 @@ function create() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function createFees() { |
|
|
function createFees() { |
|
|
return fees.map(f => Object.assign({}, f)) |
|
|
|
|
|
|
|
|
return this.fees.map(f => Object.assign({}, f)) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Setup this.newFee for the creation dialog |
|
|
// Setup this.newFee for the creation dialog |
|
@@ -280,7 +266,7 @@ function createFee() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function resetFees() { |
|
|
function resetFees() { |
|
|
this.estimate.loans[this.sel].fees = createFees() |
|
|
|
|
|
|
|
|
this.estimate.loans[this.sel].fees = this.createFees() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// If valid, add the current this.newFee to the array of fees and reset |
|
|
// If valid, add the current this.newFee to the array of fees and reset |
|
@@ -446,7 +432,7 @@ export default { |
|
|
computed: { |
|
|
computed: { |
|
|
validFee, |
|
|
validFee, |
|
|
}, |
|
|
}, |
|
|
props: ['user'], |
|
|
|
|
|
|
|
|
props: ['user', 'fees'], |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
estimate: estimate, |
|
|
estimate: estimate, |
|
@@ -456,5 +442,8 @@ export default { |
|
|
errors: [], |
|
|
errors: [], |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
created() { |
|
|
|
|
|
this.estimate.loans.forEach(l => l.fees = this.createFees()) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |