|
|
@@ -4,8 +4,9 @@ |
|
|
|
|
|
|
|
<section class="form inputs"> |
|
|
|
<h3>Default Fees</h3> |
|
|
|
<div v-for="(fee, indx) in fees" |
|
|
|
:key="fee.name + indx" class="fee" |
|
|
|
<div |
|
|
|
v-for="(fee, indx) in fees" |
|
|
|
:key="fee.name + indx" class="fee" |
|
|
|
> |
|
|
|
<label @click="() => edit = fee"> |
|
|
|
${{fee.amount}}{{fee.perc && ` (${fee.perc}%)`}} - {{fee.name}}<br> |
|
|
@@ -17,9 +18,15 @@ |
|
|
|
<button @click="() => edit = {}">New Fee</button> |
|
|
|
</section> |
|
|
|
|
|
|
|
<Dialog v-if="edit" @close="() => edit = null"> |
|
|
|
<h3>hi</h3> |
|
|
|
</Dialog> |
|
|
|
<fee-dialog v-if="edit" |
|
|
|
:heading="'Fee'" |
|
|
|
:initial="edit" |
|
|
|
:price="0" |
|
|
|
@close="() => edit = null" |
|
|
|
@save="newFee" |
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<section class="inputs"> |
|
|
|
<h3>Saved Estimates</h3> |
|
|
@@ -30,10 +37,10 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import Dialog from "./dialog.vue" |
|
|
|
|
|
|
|
function newFee() { |
|
|
|
import FeeDialog from "./fee-dialog.vue" |
|
|
|
|
|
|
|
function newFee(fee, isDebit) { |
|
|
|
this.edit = null |
|
|
|
} |
|
|
|
|
|
|
|
function newType() { |
|
|
@@ -47,7 +54,7 @@ function remove() { |
|
|
|
export default { |
|
|
|
props: [ 'user', 'fees' ], |
|
|
|
emits: [ 'deleteFee', 'update' ], |
|
|
|
components: { Dialog }, |
|
|
|
components: { FeeDialog }, |
|
|
|
methods: { newFee, newType, remove }, |
|
|
|
data() { |
|
|
|
return { |
|
|
|