Skouter mortgage estimates. Web application with view written in PHP and Vue, but controller and models in Go.
 
 
 
 
 
 

59 lines
948 B

  1. <template>
  2. <div class="page">
  3. <h2>Estimates</h2>
  4. <section class="form inputs">
  5. <h3>Default Fees</h3>
  6. <div v-for="(fee, indx) in fees"
  7. :key="fee.name + indx" class="fee"
  8. >
  9. <label @click="() => edit = fee">
  10. ${{fee.amount}}{{fee.perc && ` (${fee.perc}%)`}} - {{fee.name}}<br>
  11. {{fee.type}}
  12. </label>
  13. <img width="21" height="21" src="/assets/image/icon/x-red.svg"
  14. @click="() => remove(indx, 1)">
  15. </div>
  16. <button @click="() => edit = {}">New Fee</button>
  17. </section>
  18. <Dialog v-if="edit" @close="() => edit = null">
  19. <h3>hi</h3>
  20. </Dialog>
  21. <section class="inputs">
  22. <h3>Saved Estimates</h3>
  23. </section>
  24. </div>
  25. </template>
  26. <script>
  27. import Dialog from "./dialog.vue"
  28. function newFee() {
  29. }
  30. function newType() {
  31. }
  32. function remove() {
  33. }
  34. export default {
  35. props: [ 'user', 'fees' ],
  36. emits: [ 'deleteFee', 'update' ],
  37. components: { Dialog },
  38. methods: { newFee, newType, remove },
  39. data() {
  40. return {
  41. edit: null
  42. }
  43. },
  44. }
  45. </script>