diff --git a/assets/main.css b/assets/main.css index 26ff67d..a9fccff 100644 --- a/assets/main.css +++ b/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; diff --git a/components/new/details.vue b/components/new/details.vue index 8de2afe..d5ef5ac 100644 --- a/components/new/details.vue +++ b/components/new/details.vue @@ -161,9 +161,17 @@ @save="addFee" /> -
+

Mortgage Insurance

-

N/A

+
+ + + +
+
+ +
@@ -290,6 +298,8 @@ export default { 'update:hazard', 'update:taxEscrow', 'update:tax', + 'update:manualMI', + 'toggle:manualMIMonthly', 'continue' ], diff --git a/components/new/new.vue b/components/new/new.vue index fa89345..e79813e 100644 --- a/components/new/new.vue +++ b/components/new/new.vue @@ -48,6 +48,9 @@ class="bi bi-plus" viewBox="0 0 16 16"> 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" /> - +
diff --git a/skouter.go b/skouter.go index 8e2ad7a..d1811da 100644 --- a/skouter.go +++ b/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 {