You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

listingFee.vue 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <section id="content">
  3. <label for="fee" class="uniLabel">LISTING FEE</label>
  4. <currency-input
  5. onClick="this.setSelectionRange(0, this.value.length)"
  6. name="fee"
  7. :value="value"
  8. @input="value = $event"
  9. v-model="fee"
  10. id="price"
  11. class="form-control uniInput"
  12. />
  13. <button @click="saveListingFee" class="btn-solid-blue mt-4">Save</button>
  14. </section>
  15. </template>
  16. <script>
  17. /* eslint-disable */
  18. import { mapActions, mapGetters, mapState } from "vuex";
  19. export default {
  20. data() {
  21. return {
  22. fee: 0.0
  23. };
  24. },
  25. mounted() {
  26. this.pullListingFee();
  27. },
  28. methods: {
  29. ...mapActions("fees", ["retrieveListingFee", "setListingFee"]),
  30. saveListingFee() {
  31. var feeObj = {
  32. amount: parseFloat(this.fee),
  33. name: "Listing Fee"
  34. };
  35. this.setListingFee(feeObj);
  36. },
  37. async pullListingFee() {
  38. await this.retrieveListingFee();
  39. console.log(this.getListingFee);
  40. this.fee = this.getListingFee.amount;
  41. }
  42. },
  43. computed: {
  44. ...mapGetters("fees", ["getListingFee"]),
  45. ...mapState("fees", ["listingFee"])
  46. }
  47. };
  48. </script>
  49. <style lang="scss" scoped></style>