From 38cc24229e945e0044bb2940c02daa5fc33501c2 Mon Sep 17 00:00:00 2001 From: Immanuel Onyeka Date: Thu, 10 Nov 2022 18:46:53 -0500 Subject: [PATCH] Move fees form to a new component --- components/app.vue | 6 +-- components/estimates.vue | 4 +- components/fee-dialog.vue | 70 ++++++++++++++++++++++++++ components/new.vue | 103 ++++++++------------------------------ helpers.js | 36 +++++++++++++ 5 files changed, 131 insertions(+), 88 deletions(-) create mode 100644 components/fee-dialog.vue create mode 100644 helpers.js diff --git a/components/app.vue b/components/app.vue index 24dd9ab..3ab3205 100644 --- a/components/app.vue +++ b/components/app.vue @@ -29,10 +29,10 @@ const user = { status: 1, } -// The default fees of a new loan +// The default fees of a new loan. Percentage values take precedent over amounts const fees = [ - { name: 'Processing fee', type: 'Lender Fees', amount: 500 }, - { name: 'Underwriting fee', type: 'Lender Fees', amount: 500 }, + { name: 'Processing fee', type: 'Lender Fees', amount: 500, perc: 0 }, + { name: 'Underwriting fee', type: 'Lender Fees', amount: 500, perc: 0 }, { name: 'Credit Report', type: 'Services Required by Lender', amount: 52.50 }, { name: 'Appraisal', type: 'Services Required by Lender', amount: 52.50 }, diff --git a/components/estimates.vue b/components/estimates.vue index 201e6d7..f2c931e 100644 --- a/components/estimates.vue +++ b/components/estimates.vue @@ -8,13 +8,13 @@ :key="fee.name + indx" class="fee" > - + diff --git a/components/fee-dialog.vue b/components/fee-dialog.vue new file mode 100644 index 0000000..21bb25a --- /dev/null +++ b/components/fee-dialog.vue @@ -0,0 +1,70 @@ + + + diff --git a/components/new.vue b/components/new.vue index 3e3d018..21e50a3 100644 --- a/components/new.vue +++ b/components/new.vue @@ -139,7 +139,7 @@ v-model="estimate.transaction"> :key="fee.name + indx" class="fee" > - -

New Fee

- - - - - - - - - - - -
+

Mortgage Insurance

@@ -202,6 +184,8 @@ selected="estimate.transaction == 1">