瀏覽代碼

Add fields and events for manual MI

master
Immanuel Onyeka 1 年之前
父節點
當前提交
1d7e34c0f1
共有 5 個文件被更改,包括 38 次插入14 次删除
  1. +10
    -0
      assets/main.css
  2. +12
    -2
      components/new/details.vue
  3. +4
    -1
      components/new/new.vue
  4. +1
    -1
      components/new/summary.vue
  5. +11
    -10
      skouter.go

+ 10
- 0
assets/main.css 查看文件

@@ -365,6 +365,16 @@ section.special {
padding: 25px 10px;
}

section.mi .row {
width: 100%;
display: flex;
gap: 10px;
}

section.mi .row input[type=checkbox] {
margin-right: 0;
}

.loading span.error {
top: 40px;
position: absolute;


+ 12
- 2
components/new/details.vue 查看文件

@@ -161,9 +161,17 @@
@save="addFee"
/>

<section class="form radios">
<section class="form inputs mi">
<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 class="form inputs">
@@ -290,6 +298,8 @@ export default {
'update:hazard',
'update:taxEscrow',
'update:tax',
'update:manualMI',
'toggle:manualMIMonthly',
'continue'
],


+ 4
- 1
components/new/new.vue 查看文件

@@ -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:taxEscrow="(t) => loans[sel].taxEscrow = 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"
/>
<loan-summary v-if="hash == '#new/summary'"
@@ -83,7 +86,7 @@ const example = {
pud: true, // Property under development
zip: '',
fees: [],
mi: {}
mi: {monthly: false, rate: 0}
}

// The default loans on a new estimate


+ 1
- 1
components/new/summary.vue 查看文件

@@ -17,7 +17,7 @@

<section class="form inputs">
<button>Save Estimate</button>
<button>Generage PDF</button>
<button>Generate PDF</button>
</section>

</div>


+ 11
- 10
skouter.go 查看文件

@@ -101,16 +101,17 @@ type Loan 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 {


Loading…
取消
儲存