|
|
@@ -50,7 +50,10 @@ class="bi bi-plus" viewBox="0 0 16 16"> <path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 |
|
|
|
@update:tax="(t) => loans[sel].tax = t" |
|
|
|
@continue="generate" |
|
|
|
/> |
|
|
|
<summary v-if="hash == '#new/summary'"/> |
|
|
|
<loan-summary v-if="hash == '#new/summary'" |
|
|
|
:estimate="estimate" |
|
|
|
:loans="estimate.loans" |
|
|
|
:sel="sel" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
@@ -58,7 +61,7 @@ class="bi bi-plus" viewBox="0 0 16 16"> <path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 |
|
|
|
<script> |
|
|
|
import { stripLetters, strip, stripInt, stripPerc } from "../../helpers.js" |
|
|
|
import LoanDetails from "./details.vue" |
|
|
|
import Summary from "./summary.vue" |
|
|
|
import LoanSummary from "./summary.vue" |
|
|
|
|
|
|
|
// The default values of a new estimate |
|
|
|
const example = { |
|
|
@@ -130,6 +133,7 @@ function setPrice(value) { |
|
|
|
this.estimate.loans[this.sel].fees.forEach(fee => { |
|
|
|
if (fee.perc) fee.amount = (fee.perc / 100 * value).toFixed(2) |
|
|
|
}) |
|
|
|
this.estimate.loans.forEach(l => {l.ltv = 0; l.amount = 0}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@@ -190,7 +194,7 @@ function generate() { |
|
|
|
// Percentage values of fees always takek precedent over amounts. The conversion |
|
|
|
// happens in setPrice() |
|
|
|
export default { |
|
|
|
components: { Summary, LoanDetails }, |
|
|
|
components: { LoanSummary, LoanDetails }, |
|
|
|
methods: { |
|
|
|
generate, createFees, del, create, setPrice, setLtv, setAmount, |
|
|
|
setDti, setHousingDti |
|
|
|