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.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. <template>
  2. <section :class="propertyImages.length > 0 ? 'noImages' : 'images'">
  3. <div class="container">
  4. <div class="row" id="resort-profile">
  5. <div class="col-md-4">
  6. <div class="resPortfolioSection" style="margin-top:-5px">
  7. <iframe
  8. v-if="property.video !== null"
  9. width="100%"
  10. :src="'https://www.youtube.com/embed/' + property.video"
  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-if="propertyImages.length > 0">
  17. <div v-for="(image, i) in propertyImages" @click="index = i" :key="i">
  18. <div v-if="i < 3">
  19. <img
  20. v-if="i === 0"
  21. style="width:100%; height:201px;object-fit: cover"
  22. :src="image.image"
  23. />
  24. <div v-else-if="i !== 0">
  25. <img
  26. v-if="i % 2 === 0"
  27. style="width:50%; height:140px; float:right;"
  28. :src="image.image"
  29. />
  30. <img v-else style="width:50%; height:140px; float:left" :src="image.image" />
  31. </div>
  32. </div>
  33. </div>
  34. <gallery :images="Images" :index="index" @close="index = null"></gallery>
  35. </div>
  36. </div>
  37. <div
  38. class="panel-left p-5"
  39. :class="propertyImages.length > 0 ? 'galleryImages' : 'noGalleryImages'"
  40. >
  41. <h2>Property Detail</h2>
  42. <p v-if="property.showAddress">{{ property.streetNumber }} {{ property.streetName }}</p>
  43. <p>{{ property.city }}, {{ property.suburb }}</p>
  44. <div v-if="property.displayData.length > 0">
  45. <div v-for="(data, i) in property.displayData" :key="i">
  46. <div v-for="field in data.values" :key="field.id">
  47. <p v-if="field.name === 'Floor Size'">{{ field.value }}</p>
  48. </div>
  49. </div>
  50. </div>
  51. <!-- <div v-for="field in property.displayData[0].values" :key="field.id">
  52. <p v-if="field.name === 'Floor Size'">{{ field.value }}M<sup>2</sup></p>
  53. <p v-if="field.name === 'Rates & Taxes'">
  54. Rates & Taxes: R{{ field.value | toCurrency }}
  55. </p>
  56. </div>-->
  57. <p>{{ property.shortDescription }}</p>
  58. <p v-if="property.statusString === 'For Sale'">{{ property.price | toCurrency }}</p>
  59. <p v-else>{{ property.price | toCurrency }} Per Month</p>
  60. </div>
  61. <div class="panel-left px-5 pb-5 text-center">
  62. <h4 class="text-white">Share this Property</h4>
  63. <a
  64. href="http://www.facebook.com/sharer.php?u=https://www.univateproperties.co.za/"
  65. target="_blank"
  66. >
  67. <img src="img/icon-facebook.svg" alt="Share on Facebook" class="col-3 p-1 mx-1" />
  68. </a>
  69. <a
  70. href="mailto:?Subject=Simple Share Buttons&amp;Body=I%20saw%20this%20and%20thought%20of%20you!%20 https://www.univateproperties.co.za/"
  71. >
  72. <img src="/img/icon-email.svg" alt="Share on email" class="col-3 p-1 mx-1" />
  73. </a>
  74. <a
  75. href="whatsapp://send?text=Have a look at this property: https://www.univateproperties.co.za"
  76. data-action="share/whatsapp/share"
  77. target="_blank"
  78. >
  79. <img src="img/icon-whatsapp.svg" alt="Share on whatsapp" class="col-3 p-1 mx-1" />
  80. </a>
  81. </div>
  82. </div>
  83. <div class="col-md-8 p-5 resort-profile">
  84. <h2 v-if="property.showAddress">
  85. <div style="display:inline" v-if="property.propertyName !== null">
  86. {{ property.propertyName }} /
  87. </div>
  88. {{ property.streetNumber }} {{ property.streetName }}
  89. </h2>
  90. <h2 v-else>{{ property.propertyName }}</h2>
  91. <p>{{ property.shortDescription }}</p>
  92. <h4>Property Features</h4>
  93. <div v-if="property.displayData.length > 0">
  94. <div v-for="(data, i) in property.displayData" :key="i" class="row my-3">
  95. <div v-for="(field, j) in data.values" :key="j" class="col-md-6">
  96. <div
  97. :style="field.value.toUpperCase() === 'FALSE' ? 'display:none' : 'display:show'"
  98. v-if="field.value.toUpperCase() != 'TRUE'"
  99. >
  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="mt-5" v-html="property.description"></div>
  111. <button
  112. style="float:right; white-space: nowrap;"
  113. :class="checkStatus() ? 'btn-disabled mt-3' : 'btn-solid-blue mt-3'"
  114. :disabled="checkStatus()"
  115. @click="goToSingle()"
  116. >
  117. ENQUIRE NOW
  118. </button>
  119. <h4 v-if="property.virtualTour !== null" style="margin-top:150px">Virtual Tour</h4>
  120. <iframe
  121. v-if="property.virtualTour !== null"
  122. width="100%"
  123. height="500px"
  124. :src="property.virtualTour"
  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. <h4 v-if="property.video !== null" class="mt-5">Video</h4>
  132. <iframe
  133. v-if="property.video !== null"
  134. width="100%"
  135. height="500px"
  136. :src="'https://www.youtube.com/embed/' + property.video"
  137. frameborder="0"
  138. allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
  139. allowfullscreen
  140. style="margin-bottom:-6px"
  141. class="mt-3"
  142. ></iframe>
  143. </div>
  144. </div>
  145. </div>
  146. </section>
  147. </template>
  148. <script>
  149. /* eslint-disable */
  150. import gallery from "../../../shared/gallerySlideShow";
  151. import { mapState, mapActions } from "vuex";
  152. export default {
  153. components: {
  154. gallery
  155. },
  156. props: {
  157. property: {},
  158. propertyImages: {}
  159. },
  160. data() {
  161. return {
  162. index: null,
  163. date: new Date()
  164. };
  165. },
  166. computed: {
  167. ...mapState("status", ["singleStatus"]),
  168. Images() {
  169. const list = [];
  170. if (this.propertyImages) {
  171. for (let i = 0; i < this.propertyImages.length; i++) {
  172. list.push(this.propertyImages[i].image);
  173. }
  174. }
  175. return list;
  176. }
  177. },
  178. methods: {
  179. ...mapActions("status", ["getSingleStatus"]),
  180. goToSingle() {
  181. this.$router.push({ name: "EnquireNow", params: { id: this.$route.params.id } });
  182. },
  183. checkStatus() {
  184. this.getSingleStatus(this.property.statusId);
  185. if (
  186. this.singleStatus.code === "CIP" ||
  187. this.singleStatus.code === "S" ||
  188. this.singleStatus.code === "P"
  189. ) {
  190. return true;
  191. } else {
  192. return false;
  193. }
  194. }
  195. },
  196. mounted() {
  197. if (this.property.video === "") {
  198. this.property.video = null;
  199. }
  200. if (this.property.virtualTour === "") {
  201. this.property.virtualTour = null;
  202. }
  203. this.$emit("Loaded", true);
  204. }
  205. };
  206. </script>
  207. <style lang="scss" scoped>
  208. .btn-disabled {
  209. font-family: "Muli";
  210. font-size: 15px;
  211. letter-spacing: 1px;
  212. display: inline-block;
  213. padding: 10px 32px;
  214. border-radius: 2px;
  215. transition: 0.5s;
  216. margin: 10px;
  217. color: #fff;
  218. background: grey;
  219. border-color: black;
  220. color: black;
  221. cursor: not-allowed;
  222. }
  223. .btn-disabled :hover {
  224. background: grey;
  225. border-color: black;
  226. color: black;
  227. cursor: not-allowed;
  228. }
  229. .images {
  230. padding-top: 100px;
  231. }
  232. .noImages {
  233. padding-top: 0px;
  234. }
  235. .galleryImages {
  236. margin-top: 140px;
  237. }
  238. .noGalleryImages {
  239. margin-top: 0px;
  240. }
  241. /* Extra small devices (phones, 600px and down) */
  242. @media only screen and (max-width: 575px) {
  243. .resPortfolioSection {
  244. margin-bottom: 100px;
  245. }
  246. }
  247. /* Small devices (portrait tablets and large phones, 600px and up) */
  248. @media only screen and (min-width: 576px) {
  249. .resPortfolioSection {
  250. margin-bottom: 140px;
  251. }
  252. }
  253. /* Medium devices (landscape tablets, 768px and up) */
  254. @media only screen and (min-width: 768px) {
  255. .resPortfolioSection {
  256. margin-bottom: 50px;
  257. }
  258. }
  259. /* Large devices (laptops/desktops, 992px and up) */
  260. @media only screen and (min-width: 992px) {
  261. .resPortfolioSection {
  262. margin-bottom: 60px;
  263. }
  264. }
  265. /* Extra large devices (large laptops and desktops, 1200px and up) */
  266. @media only screen and (min-width: 1200px) {
  267. .resPortfolioSection {
  268. margin-bottom: 80px;
  269. }
  270. }
  271. </style>