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.

singleResidentialPage.vue 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <div>
  3. <main id="main" style="margin-top: 20px">
  4. <contentSection :property="property" :propertyImages="propertyImages" :status="checkStatus" />
  5. </main>
  6. <div v-if="wait" id="preloader"></div>
  7. </div>
  8. </template>
  9. <script>
  10. /* eslint-disable */
  11. import { mapState, mapActions } from "vuex";
  12. import makeOffer from "../../../processFlow/makeOffer";
  13. //import carouselSection from "./carouselSection";
  14. import contentSection from "./contentSection";
  15. export default {
  16. name: "property",
  17. components: {
  18. makeOffer,
  19. contentSection
  20. },
  21. data() {
  22. return {
  23. index: null,
  24. date: new Date(),
  25. boolLoaded: false,
  26. wait: true
  27. };
  28. },
  29. mounted() {
  30. this.clearPropertyImages();
  31. this.getDisplayProperty(this.$route.params.id).then(data => {
  32. this.wait = false;
  33. });
  34. },
  35. computed: {
  36. ...mapState("property", ["property", "propertyImages"]),
  37. checkStatus() {
  38. if (
  39. this.property.statusCode === "CIP" ||
  40. this.property.statusCode === "S" ||
  41. this.property.statusCode === "P"
  42. ) {
  43. return true;
  44. } else {
  45. return false;
  46. }
  47. }
  48. },
  49. methods: {
  50. ...mapActions("property", ["getDisplayProperty", "clearPropertyImages"]),
  51. ...mapActions("propertyEdit", ["mayEditProperty"]),
  52. formatPrice(value) {
  53. const val = (value / 1).toFixed(2);
  54. return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");
  55. },
  56. formatAddress(value) {
  57. if (value !== "") {
  58. return `${value}<br/>`;
  59. }
  60. return "";
  61. }
  62. },
  63. beforeDestroy() {
  64. this.clearPropertyImages();
  65. }
  66. };
  67. </script>
  68. <style lang="scss" scoped></style>