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

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