Skouter mortgage estimates. Web application with view written in PHP and Vue, but controller and models in Go.
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

estimates.vue 1.0 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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>