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.

contentSection.vue 8.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <template>
  2. <section>
  3. <div class="container pb-5">
  4. <div class="row" id="resort-profile">
  5. <div class="col-md-4">
  6. <div class="resPortfolioSection">
  7. <iframe
  8. v-if="property.video != null"
  9. width="100%"
  10. src="https://www.youtube.com/embed/watch_popup?v=qKgHJYzWtVA"
  11. frameborder="0"
  12. allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
  13. allowfullscreen
  14. style="margin-bottom:-6px"
  15. ></iframe>
  16. <div v-for="(image, i) in propertyImages" @click="index = i" :key="i">
  17. <div v-if="i < 3">
  18. <img v-if="i === 0" style="width:100%" :src="image.image" />
  19. <div v-else-if="i !== 0">
  20. <img
  21. v-if="i % 2 === 0"
  22. style="width:50%; height:140px; float:right;"
  23. :src="image.image"
  24. />
  25. <img v-else style="width:50%; height:140px; float:left" :src="image.image" />
  26. </div>
  27. </div>
  28. </div>
  29. <gallery :images="Images" :index="index" @close="index = null"></gallery>
  30. </div>
  31. <div class="panel-left p-5" style="margin-top:130px">
  32. <h2>Property Detial</h2>
  33. <!-- TODO: Make it dynamic -->
  34. <h4 style="color:white">{{ property.price | toCurrency }}</h4>
  35. <p>#{{ property.propertyRef }}</p>
  36. <p v-if="property.showAddress">{{ property.addressOther }}</p>
  37. <p v-if="property.showAddress">{{ property.streetNumber }} {{ property.streetName }}</p>
  38. <p>{{ property.city }}, {{ property.suburb }}</p>
  39. <div v-for="(data, i) in property.displayData" :key="i">
  40. <div v-for="field in data.values" :key="field.id">
  41. <p v-if="field.name === 'Floor Size'">{{ field.value }}</p>
  42. <p v-if="field.name === 'Bedrooms'">Bedrooms {{ field.value }}</p>
  43. <p v-if="field.name === 'Bathrooms'">Bathrooms {{ field.value }}</p>
  44. </div>
  45. </div>
  46. <div class="btn-white-border"><i class="fa fa-search"></i>BOOK A VIEWING</div>
  47. </div>
  48. <div class="panel-left px-5 pb-5 text-center">
  49. <h4 class="text-white">Share this Property</h4>
  50. <ShareNetwork
  51. v-if="currentUrl !== ''"
  52. network="facebook"
  53. :url="currentUrl"
  54. title="Uni-Vate Property Listing"
  55. description="Check out this property on Uni-Vate Properties!"
  56. quote="The hot reload is so fast it\'s near instant. - Evan You"
  57. hashtags="vuejs,vite"
  58. >
  59. <img src="img/icon-facebook.svg" alt="Share on Facebook" class="col-3 p-1 mx-1" />
  60. </ShareNetwork>
  61. <a
  62. href="mailto:?Subject=Simple Share Buttons&amp;Body=I%20saw%20this%20and%20thought%20of%20you!%20 https://www.univateproperties.co.za/"
  63. >
  64. <img src="/img/icon-email.svg" alt="Share on email" class="col-3 p-1 mx-1" />
  65. </a>
  66. <a
  67. href="whatsapp://send?text=Check out this property!"
  68. data-action="share/whatsapp/share"
  69. target="_blank"
  70. >
  71. <img src="img/icon-whatsapp.svg" alt="Share on whatsapp" class="col-3 p-1 mx-1" />
  72. </a>
  73. </div>
  74. </div>
  75. <div></div>
  76. <div class="col-md-8 p-5 resort-profile">
  77. <h2 v-if="property.showAddress">
  78. <div style="display:inline" v-if="property.propertyName !== null">
  79. {{ property.propertyName }} /
  80. </div>
  81. {{ property.streetNumber }} {{ property.streetName }}
  82. </h2>
  83. <h2 v-else>{{ property.propertyName }}</h2>
  84. <div class="container">
  85. <div class="row">
  86. <div class="col">
  87. <p v-html="property.description"></p>
  88. </div>
  89. </div>
  90. <div class="row">
  91. <div class="col">
  92. <h4>Property Features</h4>
  93. </div>
  94. </div>
  95. <div class="row">
  96. <div class="col-md-8">
  97. <div v-for="(data, i) in property.displayData" :key="i" class="row my-3">
  98. <div v-for="(field, j) in data.values" :key="j" class="col-md-6">
  99. <div v-if="field.value !== 'yes'">
  100. <i class="fa fa-check-circle"></i>
  101. {{ field.value }} {{ field.name }}
  102. </div>
  103. <div v-else>
  104. <i class="fa fa-check-circle"></i>
  105. {{ field.name }}
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. <div class="col-md-4">
  111. <router-link
  112. style="float:right"
  113. class="btn-solid-blue mt-3"
  114. :to="{ name: 'EnquireNow', params: { id: $route.params.id } }"
  115. >MORE INFO...</router-link
  116. >
  117. </div>
  118. </div>
  119. </div>
  120. <h4 v-if="property.video != null" class="mt-5">Video Tour</h4>
  121. <iframe
  122. v-if="property.video != null"
  123. width="100%"
  124. src="https://www.youtube.com/embed/watch_popup?v=qKgHJYzWtVA"
  125. frameborder="0"
  126. allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
  127. allowfullscreen
  128. style="margin-bottom:-6px"
  129. class="mt-3"
  130. ></iframe>
  131. <p></p>
  132. <div class="d-flex mt-3">
  133. <iframe
  134. width="100%"
  135. height="200"
  136. id="gmap_canvas"
  137. :src="propertyMap"
  138. frameborder="0"
  139. scrolling="no"
  140. marginheight="0"
  141. marginwidth="0"
  142. ></iframe>
  143. </div>
  144. </div>
  145. </div>
  146. </div>
  147. </section>
  148. </template>
  149. <script>
  150. /* eslint-disable */
  151. import { mapState, mapActions } from "vuex";
  152. import gallery from "../../../shared/gallerySlideShow";
  153. import { ShareFacebook } from "vue-social-sharing";
  154. export default {
  155. components: {
  156. gallery,
  157. ShareFacebook
  158. },
  159. props: {
  160. property: {},
  161. propertyImages: {}
  162. },
  163. created() {
  164. //this.getListsForPropertyEdit(this.property.id);
  165. },
  166. async mounted() {
  167. this.currentUrl = window.location.origin + this.$route.fullPath;
  168. },
  169. data() {
  170. return {
  171. index: null,
  172. date: new Date(),
  173. currentUrl: ""
  174. };
  175. },
  176. methods: {
  177. //...mapActions("searchTab", ["getListsForPropertyEdit"])
  178. },
  179. computed: {
  180. //...mapState("searchTab", ["provinces", "cities", "suburbs"]),
  181. propertyMap() {
  182. if (this.property.propertCoords) {
  183. var lat = this.property.propertCoords.split(",")[0];
  184. var lng = this.property.propertCoords.split(",")[1];
  185. // var url =
  186. // "https://maps.google.com/maps?q=" +
  187. // lat.replace(".", ",") +
  188. // "," +
  189. // lng.replace(".", ",") +
  190. // "&hl=es&z=14&amp;output=embed";
  191. var url = "";
  192. return url;
  193. }
  194. return "";
  195. },
  196. propertyFeatures() {
  197. this.property.displayData.forEach(data => {
  198. console.log(data);
  199. });
  200. },
  201. Images() {
  202. const list = [];
  203. for (let i = 0; i < this.propertyImages.length; i++) {
  204. list.push(this.propertyImages[i].image);
  205. }
  206. return list;
  207. }
  208. },
  209. created() {
  210. this.$emit("Loaded", true);
  211. }
  212. };
  213. </script>
  214. <style lang="scss" scoped>
  215. /* Extra small devices (phones, 600px and down) */
  216. @media only screen and (max-width: 575px) {
  217. .resPortfolioSection {
  218. margin-bottom: 100px;
  219. }
  220. }
  221. /* Small devices (portrait tablets and large phones, 600px and up) */
  222. @media only screen and (min-width: 576px) {
  223. .resPortfolioSection {
  224. margin-bottom: 140px;
  225. }
  226. }
  227. /* Medium devices (landscape tablets, 768px and up) */
  228. @media only screen and (min-width: 768px) {
  229. .resPortfolioSection {
  230. margin-bottom: 50px;
  231. }
  232. }
  233. /* Large devices (laptops/desktops, 992px and up) */
  234. @media only screen and (min-width: 992px) {
  235. .resPortfolioSection {
  236. margin-bottom: 60px;
  237. }
  238. }
  239. /* Extra large devices (large laptops and desktops, 1200px and up) */
  240. @media only screen and (min-width: 1200px) {
  241. .resPortfolioSection {
  242. margin-bottom: 80px;
  243. }
  244. }
  245. </style>