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.

propertySearchPage.vue 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <template>
  2. <!-- eslint-disable max-len -->
  3. <div class="container">
  4. <div class="container col-md-12" v-if="propertyType === 'Residential'">
  5. <div class="col-sm-12">
  6. <div class="about-img-box">
  7. <img
  8. src="img/Pretoria-South-Africa.jpg"
  9. alt="Property Listing"
  10. class="img-fluid"
  11. style="width:800px;height:400px;"
  12. />
  13. </div>
  14. <div class="sinse-box" style="opacity:0.7; border: white solid 3px; border-radius: 15px">
  15. <h3 class="sinse-title">Property Listing</h3>
  16. </div>
  17. </div>
  18. <br />
  19. <div class="row">
  20. <div class="col-md-12">
  21. <h1 class="my-4">About Residential Properties</h1>
  22. </div>
  23. <div class="container col-md-6 text-left">
  24. <p>
  25. Uni-Vate Properties understands the necessity in property-seekers
  26. to find that perfect fit;
  27. a home that meets, and exceeds the individual's needs. That is why,
  28. our dedicated team sources
  29. a range of property types, whether that home is a rental option near
  30. a University for a student
  31. just starting out, or a family home fit for entertaining.
  32. </p>
  33. <p>
  34. Looking to sell your residential property, instead? Uni-Vate
  35. Properties prides itself on
  36. professionalism and the right expertise, to help you secure the
  37. best possible deal for your home.
  38. </p>
  39. <p>
  40. Wish to RENT your property?
  41. <router-link to="/property/Residential/Rental">Click Here</router-link>
  42. </p>
  43. <p>
  44. Wish to SELL your property?
  45. <router-link to="/property/Residential/Sale">Click Here</router-link>
  46. </p>
  47. </div>
  48. <div class="col-md-4">
  49. <p>
  50. <img class="img-fluid" src="./../../../public/img/residential.jpg" alt="About Resale" />
  51. </p>
  52. </div>
  53. </div>
  54. <div>
  55. <propertyCard v-if="properties.length > 0" name="propertyholder" :properties="properties" />
  56. <div v-if="properties.length === 0">
  57. <img src="../../../public/img/no-homes.gif" />
  58. <br />
  59. <br />
  60. <p>Sorry no listing where found matching your search</p>
  61. </div>
  62. </div>
  63. <br />
  64. </div>
  65. <div class="container col-md-12" v-if="propertyType === 'Commercial'">
  66. <div class="col-sm-12">
  67. <div class="about-img-box">
  68. <img
  69. src="img/Johannesburg-south-africa-1.jpg"
  70. alt="Property Listing"
  71. class="img-fluid"
  72. style="width:800px;height:400px;"
  73. />
  74. </div>
  75. <div class="sinse-box" style="opacity:0.7; border: white solid 3px; border-radius: 15px">
  76. <h3 class="sinse-title">Property Listing</h3>
  77. </div>
  78. </div>
  79. <br />
  80. <div class="row">
  81. <div class="col-md-12">
  82. <h1 class="my-4">About Commercial Properties</h1>
  83. </div>
  84. <div class="container col-md-6 text-left">
  85. <p>
  86. Commercial properties are characteristically any larger properties that
  87. generate profit through leasing or rental activities. These properties
  88. are typically used to conduct business and provide companies with cut-and-dry
  89. leasing agreements, which keep their involvement in the maintenance of the property
  90. to a minimum, so they may focus on the growth of their company.
  91. </p>
  92. <p>
  93. Uni-Vate Properties seeks out professional, clean spaces for such companies and acts as
  94. mediator between the landlord/-lady and the tenants. Uni-Vate Properties provides
  95. value-adding service to clients and conducts business with a high standard
  96. and integrity.
  97. </p>
  98. <p>
  99. Wish to RENT your property?
  100. <router-link to="/property/Commercial/Rental">Click Here</router-link>
  101. </p>
  102. <p>
  103. Wish to SELL your property?
  104. <router-link to="/property/Commercial/Sale">Click Here</router-link>
  105. </p>
  106. </div>
  107. <div class="col-md-4">
  108. <p>
  109. <img class="img-fluid" src="./../../../public/img/commercial.jpg" alt="About Resale" />
  110. </p>
  111. </div>
  112. </div>
  113. <div>
  114. <propertyCard
  115. v-if="properties.length > 0"
  116. name="propertyholder"
  117. :properties="properties"
  118. :key="propertysearch"
  119. />
  120. <div v-if="properties.length === 0">
  121. <img src="../../../public/img/no-homes.gif" />
  122. <br />
  123. <br />
  124. <p>Sorry no listing where found matching your search</p>
  125. </div>
  126. </div>
  127. <br />
  128. </div>
  129. </div>
  130. </template>
  131. <script>
  132. import { mkdir } from 'fs';
  133. import { mapState, mapActions } from 'vuex';
  134. import propertyCard from './propertyCard.vue';
  135. export default {
  136. name: 'propertysearch',
  137. components: {
  138. propertyCard,
  139. },
  140. data() {
  141. return {
  142. type: '',
  143. propertyType: '',
  144. propertyTypeparam: '',
  145. province: '',
  146. city: '',
  147. suburb: '',
  148. proptype: '',
  149. keyword: '',
  150. };
  151. },
  152. methods: {
  153. ...mapActions('property', [
  154. 'searchPropertiesParams',
  155. 'searchPropertiesKeyword',
  156. ]),
  157. },
  158. computed: {
  159. ...mapState('property', ['properties']),
  160. ParamsChanged() {
  161. this.propertyTypeparam = this.$route.params.propertyType;
  162. this.type = this.$route.query.type;
  163. this.propertyType = this.$route.query.propertyType;
  164. this.province = this.$route.query.province;
  165. this.city = this.$route.query.city;
  166. this.suburb = this.$route.query.suburb;
  167. this.proptype = this.$route.query.propType;
  168. this.keyword = this.$route.query.keyword;
  169. if (typeof this.propertyType === 'undefined') {
  170. this.propertyType = this.propertyTypeparam;
  171. }
  172. if (this.type === '') {
  173. this.type = 'undefined';
  174. }
  175. if (this.propertyType === '') {
  176. this.propertyType = 'undefined';
  177. }
  178. if (this.province === '') {
  179. this.province = 'undefined';
  180. }
  181. if (this.city === '') {
  182. this.city = 'undefined';
  183. }
  184. if (this.suburb === '') {
  185. this.suburb = 'undefined';
  186. }
  187. if (this.proptype === '') {
  188. this.propType = 'undefined';
  189. }
  190. if (typeof this.keyword === 'undefined' || this.keyword === '') {
  191. this.searchPropertiesParams(
  192. Object.assign(
  193. {},
  194. {
  195. type: this.type,
  196. propertyType: this.propertyType,
  197. province: this.province,
  198. city: this.city,
  199. suburb: this.suburb,
  200. propType: this.proptype,
  201. },
  202. ),
  203. );
  204. } else {
  205. this.searchPropertiesKeyword(
  206. Object.assign({}, { keyword: this.keyword }),
  207. );
  208. }
  209. return null;
  210. },
  211. },
  212. watch: {
  213. ParamsChanged() {
  214. console.log(JSON.stringify(this.$route.query));
  215. },
  216. },
  217. };
  218. </script>