123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355 |
- <template>
- <!-- eslint-disable max-len -->
- <div v-if="property">
- <div class="container">
- <br />
- <div class="row">
- <div class="col-md-12 col-lg-8">
- <div class="title-box-d">
- <h1
- class="title-d"
- style="text-align:left; font-size: 250%"
- >{{ property.shortDescription }}</h1>
- </div>
- </div>
- </div>
- </div>
- <!--/ Intro Single End /-->
-
- <!--/ property Single Star /-->
- <section class="property-single nav-arrow-b">
- <div class="container">
- <div class="row">
- <div id="app" class="scrolling-wrapper">
- <div class="card">
- <img
- class="image"
- v-for="(image, i) in propertyImages"
- :src="image"
- @click="index = i"
- :key="i"
- />
- </div>
- <gallery :images="propertyImages" :index="index" @close="index = null"></gallery>
- </div>
- </div>
- <br />
- <div class="row">
- <div class="col-sm-12">
- <div class="row justify-content-between">
- <div class="col-md-7 col-lg-7 section-md-t3">
- <div class="row">
- <div class="col-sm-12">
- <div class="title-box-d">
- <h3 class="title-d" style="text-align:left">Property Description</h3>
- </div>
- </div>
- </div>
- <div
- class="property-description"
- style="text-align:left"
- v-html="property.description"
- />
- <div v-for="display in property.displayData" :key="display.id">
- <div class="row section-t3" style="text-align:left">
- <div class="col-sm-12">
- <div class="title-box-d">
- <h3 class="title-d">{{ display.groupName }}</h3>
- </div>
- </div>
- </div>
- <div class="summary-list">
- <ul class="list" v-for="item in display.values" :key="item.id">
- <li class="d-flex justify-content-between">
- <strong>{{ item.name }}:</strong>
- <span v-html="item.value"></span>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <div class="col-md-5 col-lg-4">
- <div class="property-price d-flex justify-content-center foo">
- <!-- <div class="card-header-c d-flex"> -->
- <div style="width: 300px; height: 80px; border-style: solid; color: #60CBEB;">
- <!-- <span class="ion-money">R</span> -->
-
- <div class="card-title-c align-self-center">
- <h5 class="title-c">R{{ formatPrice(property.price) }}</h5>
- <h6 v-if="property.pricePer">Per {{ property.pricePer }}</h6>
- </div>
- </div>
- <!-- </div> -->
- </div>
- <div class="property-summary">
- <div class="row">
- <div class="col-sm-12">
- <div class="title-box-d section-t4">
- <h3 class="title-d" style="text-align:left">Summary</h3>
- </div>
- </div>
- </div>
- <div class="summary-list">
- <ul class="list">
- <li v-if="!property.isSale" class="d-flex justify-content-between">
- <strong>Available:</strong>
- <span
- v-if="property.dateAvailable < date"
- >{{ property.dateAvailable | toDate }}</span>
- <span v-else>Now</span>
- </li>
- <li class="d-flex justify-content-between">
- <strong>Property ID:</strong>
- <span>{{ property.id }}</span>
- </li>
- <li class="d-flex justify-content-between">
- <strong>Status:</strong>
- <span
- v-if="property.status"
- >{{ property.status.code }} - {{ property.status.description }}</span>
- </li>
- <li class="d-flex justify-content-between">
- <strong>Address:</strong>
- <span
- style="text-align:right"
- v-if="property"
- v-html="
- formatAddress(property.addressLine1) +
- formatAddress(property.addressLine2) +
- formatAddress(property.addressLine3) +
- formatAddress(property.suburb ? property.suburb.description : '') +
- formatAddress(property.city ? property.city.description : '') +
- formatAddress(property.province ? property.province.description : '')
- "
- ></span>
- </li>
- </ul>
- </div>
- </div>
- <div class="col-md-12" v-if="mayEdit">
- <button
- type="button"
- class="btn btn-b-n"
- data-toggle="modal"
- data-target="#myModal"
- >Make an Offer</button>
- <div id="myModal" class="modal fade" role="dialog">
- <div class="modal-dialog modal-lg">
- <!-- Modal content-->
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">×</button>
- </div>
- <div padding-left="20px">
- <makeOffer
- name="MakeOffer"
- :isMakeOffer="true"
- :isProperty="true"
- :item="{
- id: property.id,
- shortDescription: property.shortDescription,
- description: property.description,
- sellPrice: property.price
- }"
- />
- </div>
- </div>
- </div>
- </div>
- </div>
- <div
- class="col-md-12"
- v-if="!mayEdit"
- style="background-color: #ff8344; color: white;"
- >
- <p>
- <b>Offer Pending</b>
- </p>
- </div>
- <div class="col-md-12">
- <div class="row section-t3">
- <div class="col-sm-12">
- <div class="title-box-d">
- <h3 class="title-d" style="text-align:left">Contact Agent</h3>
- </div>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-12">
- <div class="property-contact">
- <form class="form-a">
- <div class="row">
- <div class="col-md-12 mb-1">
- <div class="form-group">
- <input
- type="text"
- class="form-control form-control-lg form-control-a"
- id="inputName"
- placeholder="Name *"
- required
- />
- </div>
- </div>
- <div class="col-md-12 mb-1">
- <div class="form-group">
- <input
- type="email"
- class="form-control form-control-lg form-control-a"
- id="inputEmail1"
- placeholder="Email *"
- required
- />
- </div>
- </div>
- <div class="col-md-12 mb-1">
- <div class="form-group">
- <textarea
- id="textMessage"
- class="form-control"
- placeholder="Comment *"
- name="message"
- cols="45"
- rows="8"
- required
- ></textarea>
- </div>
- </div>
- <div class="col-md-12">
- <button type="submit" class="btn btn-b-n">Send Message</button>
- </div>
- </div>
- </form>
- <br />
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- Tab Control -->
- <div class="row">
- <div class="col-md-12">
- <div v-if="property.virtualTour" class="row justify-content-between">
- <div class="col-md-12 col-lg-12 section-md-t3">
- <div class="row">
- <div class="col-md-12">
- <div class="title-box-d">
- <h3 class="title-d" style="text-align:left">Virtual Tour</h3>
- </div>
- </div>
- </div>
- <iframe
- :src="property.virtualTour"
- width="100%"
- height="700"
- frameborder="0"
- webkitallowfullscreen
- mozallowfullscreen
- allowfullscreen
- ></iframe>
- </div>
- </div>
- <div class="row">
- <br />
- </div>
- <div v-if="property.video" class="row justify-content-between">
- <div class="col-md-12 col-lg-12 section-md-t3">
- <div class="row">
- <div class="col-md-12">
- <div class="title-box-d">
- <h3 class="title-d" style="text-align:left">Video</h3>
- </div>
- </div>
- </div>
- <iframe
- :src="`https://www.youtube.com/embed/${property.video}`"
- width="100%"
- height="700"
- frameborder="0"
- style="border:0"
- allowfullscreen
- ></iframe>
- </div>
- </div>
- </div>
- <!-- End Tab Control -->
- </div>
- </div>
- </section>
- </div>
- </template>
-
- <script>
- import { mapState, mapActions } from 'vuex';
- import makeOffer from '../processFlow/makeOffer.vue';
- import gallery from '../shared/gallerySlideShow.vue';
-
- export default {
- name: 'property',
- components: {
- makeOffer,
- gallery,
- },
- data() {
- return {
- index: null,
- date: new Date(),
- };
- },
- mounted() {
- this.getProperty(this.$route.params.id);
- this.getPropertyImages(this.$route.params.id);
- this.mayEditProperty(this.$route.params.id);
- },
- computed: {
- ...mapState('property', ['property', 'propertyImages']),
- ...mapState('propertyEdit', ['mayEdit']),
- },
- methods: {
- ...mapActions('property', [
- 'getProperty',
- 'getPropertyImages',
- 'clearPropertyImages',
- ]),
- ...mapActions('propertyEdit', ['mayEditProperty']),
- formatPrice(value) {
- const val = (value / 1).toFixed(2);
- return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
- },
- formatAddress(value) {
- if (value !== '') {
- return `${value}<br/>`;
- }
- return '';
- },
- },
- beforeDestroy() {
- this.clearPropertyImages();
- },
- };
- </script>
-
- <style lang="scss">
- .image {
- width: 150px;
- height: 150px;
- background-size: cover;
- cursor: pointer;
- margin: 5px;
- border-radius: 3px;
- border: 1px solid lightgray;
- object-fit: contain;
- }
- .scrolling-wrapper {
- overflow-x: scroll;
- overflow-y: hidden;
- white-space: nowrap;
-
- .card {
- display: inline-block;
- }
- }
- </style>
|