123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- <template>
- <main id="main" style="margin-top:-20px; padding-bottom:50px">
- <div v-if="wait" id="preloader"></div>
- <div class="row pt-5 justify-content-md-center">
- <h3 v-if="propertySearch.salesType === 'Sale'">COMMERCIAL PROPERTIES FOR SALE</h3>
- <h3 v-else-if="propertySearch.salesType === 'Rent'">COMMERCIAL PROPERTIES FOR RENT</h3>
- </div>
- <propertyCard
- v-if="properties.length > 0"
- name="propertyholder"
- :properties="properties"
- :showSort="false"
- />
- <!-- <section v-if="properties.length > 0">
- <div class="container">
- <div class="row justify-content-md-center">
- <div
- class="col-lg-3 col-md-6 col-sm-6"
- v-for="currentProperty in properties"
- :key="currentProperty.id"
- >
- <div>
- <div class="portfolio-item">
- <img style="width:255px; height:255px" :src="currentProperty.displayImage" alt />
- <h4>{{ currentProperty.displayPrice }}</h4>
- <p>
- {{ currentProperty.suburb }}, {{ currentProperty.city }} |
- {{ currentProperty.area }}
- </p>
- <p>{{ currentProperty.shortDescription }}</p>
- <br />
-
- <a href="commercialproperty-page.php" class="btn-white-border">VIEW</a>
- <router-link
- class="btn-white-border"
- :to="`/property/commercial/property/${currentProperty.id}`"
- >VIEW</router-link
- >
- </div>
- </div>
- </div>
- </div>
- </div>
- </section> -->
- <section v-else id="intro" style="margin-bottom:-50px">
- <div class="container">
- <div class="row d-flex justify-content-center">
- <div class="col-md-8">
- <div class="intro-content box text-center">
- <h2>Sorry no listing where found matching your search</h2>
- <a class="btn-white-border" href="javascript:history.back()">BACK TO SEARCH</a>
- </div>
- </div>
- </div>
- </div>
-
- <carousel
- :nav="false"
- :dots="false"
- :items="1"
- :autoplay="true"
- :loop="true"
- id="intro-carousel"
- style="margin-top:-50px"
- :responsive="{ 0: { items: 1, nav: false }, 600: { items: 1, nav: false } }"
- >
- <img class="item" src="img/intro-carousel/comm-1.jpg" alt />
- <img class="item" src="img/intro-carousel/comm-2.jpg" alt />
- <img class="item" src="img/intro-carousel/comm-3.jpg" alt />
- <img class="item" src="img/intro-carousel/comm-4.jpg" alt />
- <img class="item" src="img/intro-carousel/comm-5.jpg" alt />
- <img class="item" src="img/intro-carousel/comm-6.jpg" alt />
- </carousel>
- </section>
- </main>
- </template>
-
- <script>
- /* eslint-disable */
- import { mapState, mapActions } from "vuex";
- import propertyCard from "../propertyCardSearch";
- import carousel from "vue-owl-carousel";
-
- export default {
- name: "propertysearch",
- components: {
- propertyCard,
- carousel
- },
- data() {
- return {
- wait: true
- };
- },
- mounted() {
- this.wait = true;
- if (typeof this.propertySearch.propertyUsageType === "undefined") {
- this.propertySearch.propertyUsageType = "Commercial";
- }
- if (this.user) {
- this.propertySearch.userName = this.user.username;
- }
-
- this.searchProperties(this.propertySearch).then(fulfilled => {
- this.wait = false;
- });
- },
- methods: {
- ...mapActions("propertySearch", [
- "searchProperties",
- "clearProperties",
- "updateResultsShowing"
- ]),
- SetType(item) {
- this.propertySearch.propertyUsageType = item;
- },
- SearchPage() {
- this.clearProperties();
- this.$router.push("/property/search");
- }
- },
- computed: {
- ...mapState("propertySearch", ["properties", "propertySearch", "resultsShowing"]),
- ...mapState("authentication", ["user"]),
- ParamsChanged() {
- console.log(JSON.stringify(this.propertySearch));
- if (typeof this.propertySearch.propertyUsageType === "undefined") {
- // eslint-disable-next-line vue/no-side-effects-in-computed-properties
- this.propertySearch.propertyUsageType = "Residential";
- }
- this.searchProperties(this.propertySearch).then(fulfilled => {
- this.wait = false;
- });
- return null;
- }
- },
- watch: {
- ParamsChanged() {
- return null;
- }
- }
- };
- </script>
-
- <style lang="scss" scoped></style>
|