Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

propertyCardSearch.vue 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <section id="portfolio">
  3. <div class="container-fluid">
  4. <div class="row">
  5. <div
  6. class="col-lg-3 col-md-6 col-sm-6 my-3"
  7. v-for="currentProperty in properties"
  8. :key="currentProperty.id"
  9. >
  10. <div v-if="currentProperty.propertyUsageType === 'Residential'">
  11. <router-link :to="`/property/residential/property/${currentProperty.id}`">
  12. <div class="portfolio-item p-4 wow fadeInUp justify-content-md-center">
  13. <div class="feature-top pt-3 mb-2">
  14. <div class="pb-2">
  15. <h3 style="color:white !important;display:inline">
  16. {{ currentProperty.displayPrice }}
  17. </h3>
  18. <p
  19. v-if="!currentProperty.isSale"
  20. class="ml-1"
  21. style="display:inline; color:white"
  22. >
  23. Per Month
  24. </p>
  25. </div>
  26. <img
  27. style="height:165px; object-fit: cover;"
  28. :src="currentProperty.displayImage"
  29. alt
  30. />
  31. </div>
  32. <h1>{{ currentProperty.suburb }}</h1>
  33. <p>
  34. <strong>Property Reference</strong>
  35. {{ currentProperty.propertyReference }}
  36. </p>
  37. <p
  38. v-if="currentProperty.displayText != ''"
  39. :class="[
  40. currentProperty.displayColor === 'green'
  41. ? 'greenText'
  42. : currentProperty.displayColor === 'orange'
  43. ? 'pendingOffer'
  44. : currentProperty.displayColor === 'red'
  45. ? 'redText'
  46. : 'normalText'
  47. ]"
  48. >
  49. <strong>{{ currentProperty.displayText }}</strong>
  50. </p>
  51. </div>
  52. </router-link>
  53. </div>
  54. <div v-else-if="currentProperty.propertyUsageType === 'Commercial'">
  55. <router-link :to="`/property/commercial/property/${currentProperty.id}`">
  56. <div class="portfolio-item p-4 wow fadeInUp justify-content-md-center">
  57. <div class="feature-top pt-3 mb-2">
  58. <div class="pb-2">
  59. <h3 style="color:white !important;display:inline">
  60. {{ currentProperty.displayPrice }}
  61. </h3>
  62. <p
  63. v-if="!currentProperty.isSale"
  64. class="ml-1"
  65. style="display:inline; color:white"
  66. >
  67. Per Month
  68. </p>
  69. </div>
  70. <img
  71. style="height:165px; object-fit: cover;"
  72. :src="currentProperty.displayImage"
  73. alt
  74. />
  75. </div>
  76. <h1>{{ currentProperty.suburb }}</h1>
  77. <p>
  78. <strong>Property Reference</strong>
  79. {{ currentProperty.propertyReference }}
  80. </p>
  81. <p
  82. v-if="currentProperty.displayText != ''"
  83. :class="[
  84. currentProperty.displayColor === 'green'
  85. ? 'greenText'
  86. : currentProperty.displayColor === 'orange'
  87. ? 'pendingOffer'
  88. : currentProperty.displayColor === 'red'
  89. ? 'redText'
  90. : 'normalText'
  91. ]"
  92. >
  93. <strong>{{ currentProperty.displayText }}</strong>
  94. </p>
  95. </div>
  96. </router-link>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </section>
  102. <!-- #listings -->
  103. </template>
  104. <script>
  105. /* eslint-disable */
  106. export default {
  107. props: {
  108. properties: { type: Array, default: () => [] },
  109. showSort: { type: Boolean, default: true },
  110. salesType: { type: String, default: "Rent" }
  111. },
  112. methods: {
  113. sortHighPrice() {
  114. function compare(a, b) {
  115. if (a.price < b.price) return 1;
  116. if (a.price > b.price) return -1;
  117. return 0;
  118. }
  119. return this.properties.sort(compare);
  120. },
  121. sortLowPrice() {
  122. function compare(a, b) {
  123. if (a.price < b.price) return -1;
  124. if (a.price > b.price) return 1;
  125. return 0;
  126. }
  127. return this.properties.sort(compare);
  128. },
  129. sortNewest() {
  130. function compare(a, b) {
  131. if (a.dateCreated < b.dateCreated) return 1;
  132. if (a.dateCreated > b.dateCreated) return -1;
  133. return 0;
  134. }
  135. return this.properties.sort(compare);
  136. },
  137. sortDateAvailable() {
  138. function compare(a, b) {
  139. if (a.dateAvailable > b.dateAvailable) return 1;
  140. if (a.dateAvailable < b.dateAvailable) return -1;
  141. return 0;
  142. }
  143. return this.properties.sort(compare);
  144. }
  145. }
  146. };
  147. </script>
  148. <style lang="scss" scoped></style>