選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

toBuySearchResults.vue 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <main id="main" style="margin-top:-20px; padding-bottom:50px">
  3. <section>
  4. <div class="container">
  5. <div class="row pt-5 justify-content-md-center">
  6. <h3>TIMESHARE TO BUY</h3>
  7. </div>
  8. <ul class="nav nav-tabs nav-justified" id="myTab" role="tablist">
  9. <li class="nav-item">
  10. <a
  11. class="nav-link active"
  12. id="home-tab"
  13. data-toggle="tab"
  14. href="#facilities"
  15. role="tab"
  16. aria-controls="home"
  17. aria-selected="true"
  18. >
  19. <h2>With Availability</h2>
  20. </a>
  21. </li>
  22. <li class="nav-item">
  23. <a
  24. class="nav-link"
  25. id="profile-tab"
  26. data-toggle="tab"
  27. href="#directions"
  28. role="tab"
  29. aria-controls="profile"
  30. aria-selected="false"
  31. >
  32. <h2>All</h2>
  33. </a>
  34. </li>
  35. </ul>
  36. <div class="tab-content" id="myTabContent">
  37. <div
  38. class="tab-pane fade show active"
  39. id="facilities"
  40. role="tabpanel"
  41. aria-labelledby="home-tab"
  42. >
  43. <searchPanal :resorts="Available" />
  44. </div>
  45. <div class="tab-pane fade" id="directions" role="tabpanel" aria-labelledby="profile-tab">
  46. <searchPanal :resorts="resorts" />
  47. </div>
  48. </div>
  49. <div v-if="wait" id="preloader"></div>
  50. </div>
  51. </section>
  52. </main>
  53. </template>
  54. <script>
  55. import { mapState, mapActions } from "vuex";
  56. import searchPanal from "./searchResults";
  57. import _ from "lodash";
  58. export default {
  59. name: "ToBuySearchResults",
  60. components: {
  61. searchPanal,
  62. },
  63. data() {
  64. return {
  65. wait: false,
  66. };
  67. },
  68. methods: {
  69. ...mapActions("resort", ["getResorts", "getImage1"]),
  70. //methods
  71. },
  72. computed: {
  73. ...mapState("weekList", ["searchParams"]),
  74. ...mapState("resort", ["resorts"]),
  75. Available() {
  76. let resortList = this.resorts;
  77. resortList = _.filter(resortList, (x) => x.weeksAvailable > 0);
  78. return resortList;
  79. },
  80. },
  81. mounted() {
  82. this.wait = true;
  83. this.getResorts(this.searchParams.regionObj.regionCode)
  84. .then((fulfilled) => {
  85. this.wait = false;
  86. })
  87. .catch((error) => {
  88. this.wait = false;
  89. });
  90. },
  91. };
  92. </script>