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.

buyPage.vue 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <section>
  3. <section class="intro-single">
  4. <div class="container">
  5. <div class="row">
  6. <div class="col-md-12 col-lg-8">
  7. <div class="title-single-box">
  8. <h1 class="title-single" style="text-align:left;">Timeshare To Buy</h1>
  9. </div>
  10. </div>
  11. </div>
  12. </div>
  13. </section>
  14. <div class="container">
  15. <div class="row">
  16. <div class="col-md-12 text-left">
  17. <p>
  18. The resorts have been listed in their relevant provinces.
  19. Please select the resort for which you would like to view
  20. the available weeks and then select the weeks that interest
  21. you on the resort page.
  22. </p>
  23. <p>
  24. Arrival and departure dates are indicated but please note
  25. that these dates may vary annually.
  26. </p>
  27. <p>
  28. As with any property related sale, upon purchasing the holiday
  29. of your choice, there will be a transfer fee payable for the
  30. change of ownership. This fee will depend on the relevant resort
  31. or managing agent.
  32. </p>
  33. </div>
  34. </div>
  35. <div class="row mb-4">
  36. <div class="col-md-4">
  37. <div class="accordion" id="accordionExample">
  38. <div class="card" v-for="(region, r) in regions" :key="r">
  39. <a
  40. class="btn btn-b-n"
  41. type="button"
  42. data-toggle="collapse"
  43. :data-target="'#collapse' + region.id"
  44. aria-expanded="false"
  45. :aria-controls="'collapse' + region.id"
  46. >
  47. <div :id="'header' + region.id">
  48. <h5
  49. class="mb-0"
  50. @mouseover="updateMapProvince(region.regionName)"
  51. >{{ region.regionName }}</h5>
  52. </div>
  53. </a>
  54. <div
  55. :id="'collapse' + region.id"
  56. class="collapse"
  57. :aria-labelledby="'header' + region.id"
  58. data-parent="#accordionExample"
  59. >
  60. <div class="card-body">
  61. <p class="mb-0" v-for="(resort, i) in region.resorts" :key="i">
  62. <a
  63. class="cursor-pointer"
  64. href="#"
  65. @click="routerGoTo('/resort/' + resort.resortCode)"
  66. @mouseover="updateMap(resort.resortCode)"
  67. >{{resort.resortName}}</a>
  68. <br />
  69. </p>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. <div class="col-md-8">
  76. <div class="tab-content" id="myTabContent">
  77. <div
  78. class="tab-pane fade show active"
  79. id="directions"
  80. role="tabpanel"
  81. aria-labelledby="directions-tab"
  82. >
  83. <iframe
  84. :src="mapUrl"
  85. width="100%"
  86. height="450"
  87. frameborder="0"
  88. style="border:0"
  89. allowfullscreen
  90. ></iframe>
  91. <br />
  92. <small>
  93. <a
  94. :href="mapUrl"
  95. style="color:#60CBEB;text-align:left"
  96. target="_blank"
  97. >See map bigger</a>
  98. </small>
  99. </div>
  100. <div
  101. class="tab-pane fade"
  102. id="resort-layout"
  103. role="tabpanel"
  104. aria-labelledby="resort-layout-tab"
  105. >
  106. <img class="img-fluid" :src="layout" alt="Resort Layout" />
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. </section>
  113. </template>
  114. <script>
  115. import { mapState, mapActions } from 'vuex';
  116. export default {
  117. name: 'TimeshareToBuy',
  118. data() {
  119. return {
  120. myMap: 'SouthAfrica',
  121. myZoom: 5,
  122. };
  123. },
  124. mounted() {
  125. this.getRegions();
  126. },
  127. computed: {
  128. ...mapState('timeshareBuy', ['detailedRegion', 'resort']),
  129. mapUrl() {
  130. // return 'http://maps.google.com/maps/place/Gauteng/';
  131. return `http://maps.google.com/maps?q=${this.myMap}&z=${this.myZoom}&output=embed`;
  132. },
  133. regions() {
  134. return _.sortBy(this.detailedRegion, r => r.regionName);
  135. },
  136. },
  137. methods: {
  138. ...mapActions('timeshareBuy', ['getRegions', 'getResort']),
  139. routerGoTo(goTo) {
  140. this.$router.push(goTo);
  141. },
  142. updateMap(resortCode) {
  143. this.myMap = 'SouthAfrice';
  144. this.getResort(resortCode);
  145. // `http://maps.google.com/maps?q=${this.resort.prLatitude},${this.resort.prLongitude}&z=7&output=embed`;
  146. this.myMap = `${this.resort.prLatitude},${this.resort.prLongitude}`;
  147. this.myZoom = 10;
  148. },
  149. updateMapProvince(province) {
  150. this.myMap = province.replace(/\s/g, '');
  151. this.myZoom = 7;
  152. },
  153. },
  154. };
  155. </script>