Skouter mortgage estimates. Web application with view written in PHP and Vue, but controller and models in Go.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

67 lines
1.0 KiB

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