Browse Source

Removed Carousel loaded flag

master
GJWilliams87 4 years ago
parent
commit
e315d57a3d

+ 10
- 15
src/components/property/commercial/singleView/singleCommercialPage.vue View File

1
 <template>
1
 <template>
2
   <div>
2
   <div>
3
     <!-- <carouselSection :propertyImages="propertyImages" @Loaded="carouselLoaded = true" /> -->
3
     <!-- <carouselSection :propertyImages="propertyImages" @Loaded="carouselLoaded = true" /> -->
4
-    <main id="main" style="margin-top:20px">
4
+    <main id="main" style="margin-top: 20px">
5
       <contentSection
5
       <contentSection
6
         :property="property"
6
         :property="property"
7
         :propertyImages="propertyImages"
7
         :propertyImages="propertyImages"
18
 
18
 
19
 import { mapState, mapActions, mapGetters } from "vuex";
19
 import { mapState, mapActions, mapGetters } from "vuex";
20
 import makeOffer from "../../../processFlow/makeOffer";
20
 import makeOffer from "../../../processFlow/makeOffer";
21
-import carouselSection from "./carouselSection";
21
+// import carouselSection from "./carouselSection";
22
 import contentSection from "./contentSection";
22
 import contentSection from "./contentSection";
23
 
23
 
24
 export default {
24
 export default {
25
   name: "property",
25
   name: "property",
26
   components: {
26
   components: {
27
     makeOffer,
27
     makeOffer,
28
-    carouselSection,
29
-    contentSection
28
+    contentSection,
30
   },
29
   },
31
   data() {
30
   data() {
32
     return {
31
     return {
33
       index: null,
32
       index: null,
34
       date: new Date(),
33
       date: new Date(),
35
       wait: true,
34
       wait: true,
36
-      carouselLoaded: false,
37
       contentloaded: false,
35
       contentloaded: false,
38
       dataProp: {},
36
       dataProp: {},
39
-      dataImages: {}
37
+      dataImages: {},
40
     };
38
     };
41
   },
39
   },
42
   mounted() {
40
   mounted() {
43
     this.clearPropertyImages();
41
     this.clearPropertyImages();
44
-    this.getDisplayProperty(this.$route.params.id).then(data => {
42
+    this.getDisplayProperty(this.$route.params.id).then((data) => {
45
       this.getSavedPropertyImages(data.id).then(() => {
43
       this.getSavedPropertyImages(data.id).then(() => {
46
         this.wait = false;
44
         this.wait = false;
47
       });
45
       });
52
   computed: {
50
   computed: {
53
     ...mapState("property", ["property", "propertyImages"]),
51
     ...mapState("property", ["property", "propertyImages"]),
54
     Wait() {
52
     Wait() {
55
-      if (this.wait && !this.carouselLoaded && !this.contentloaded) {
53
+      if (this.wait && !this.contentloaded) {
56
         return true;
54
         return true;
57
       }
55
       }
58
       return false;
56
       return false;
59
-    }
57
+    },
60
   },
58
   },
61
   methods: {
59
   methods: {
62
     ...mapActions("property", [
60
     ...mapActions("property", [
63
       "getDisplayProperty",
61
       "getDisplayProperty",
64
       "clearPropertyImages",
62
       "clearPropertyImages",
65
-      "getSavedPropertyImages"
63
+      "getSavedPropertyImages",
66
     ]),
64
     ]),
67
     formatPrice(value) {
65
     formatPrice(value) {
68
       const val = (value / 1).toFixed(2);
66
       const val = (value / 1).toFixed(2);
74
       }
72
       }
75
       return "";
73
       return "";
76
     },
74
     },
77
-    CarouselDone() {
78
-      this.carouselLoaded = true;
79
-    },
80
     ContentDone() {
75
     ContentDone() {
81
       this.contentloaded = true;
76
       this.contentloaded = true;
82
-    }
77
+    },
83
   },
78
   },
84
   beforeDestroy() {
79
   beforeDestroy() {
85
     this.clearPropertyImages();
80
     this.clearPropertyImages();
86
-  }
81
+  },
87
 };
82
 };
88
 </script>
83
 </script>
89
 
84
 

+ 17
- 25
src/components/property/residential/singleView/singleResidentialPage.vue View File

1
 <template>
1
 <template>
2
   <div>
2
   <div>
3
     <!-- <carouselSection :propertyImages="propertyImages" @Loaded="CarouselDone" /> -->
3
     <!-- <carouselSection :propertyImages="propertyImages" @Loaded="CarouselDone" /> -->
4
-    <main id="main" style="margin-top:20px">
5
-      <contentSection :property="property" :propertyImages="propertyImages" @Loaded="ContentDone" />
4
+    <main id="main" style="margin-top: 20px">
5
+      <contentSection
6
+        :property="property"
7
+        :propertyImages="propertyImages"
8
+        @Loaded="ContentDone"
9
+      />
6
     </main>
10
     </main>
7
     <div v-if="Wait" id="preloader"></div>
11
     <div v-if="Wait" id="preloader"></div>
8
   </div>
12
   </div>
13
 
17
 
14
 import { mapState, mapActions } from "vuex";
18
 import { mapState, mapActions } from "vuex";
15
 import makeOffer from "../../../processFlow/makeOffer";
19
 import makeOffer from "../../../processFlow/makeOffer";
16
-import carouselSection from "./carouselSection";
20
+//import carouselSection from "./carouselSection";
17
 import contentSection from "./contentSection";
21
 import contentSection from "./contentSection";
18
 
22
 
19
 export default {
23
 export default {
20
   name: "property",
24
   name: "property",
21
   components: {
25
   components: {
22
     makeOffer,
26
     makeOffer,
23
-    carouselSection,
24
-    contentSection
27
+    contentSection,
25
   },
28
   },
26
   data() {
29
   data() {
27
     return {
30
     return {
29
       date: new Date(),
32
       date: new Date(),
30
       boolLoaded: false,
33
       boolLoaded: false,
31
       wait: false,
34
       wait: false,
32
-      carouselLoaded: false,
33
-      contentloaded: false
35
+      contentloaded: false,
34
     };
36
     };
35
   },
37
   },
36
-  async mounted() {
37
-    this.wait = true;
38
-    this.carouselLoaded = false;
39
-    this.contentloaded = false;
38
+  mounted() {
40
     this.clearPropertyImages();
39
     this.clearPropertyImages();
41
-    await this.getDisplayProperty(this.$route.params.id);
42
-
43
-    // await this.getPropertyImages(this.$route.params.id);
44
-    // setTimeout(() => {
45
-    //   if (this.propertyImages.length > 0) {
46
-    //     this.boolLoaded = true;
47
-    //   }
48
-    // }, 100);
49
-
50
-    //this.mayEditProperty(this.$route.params.id);
40
+    this.getDisplayProperty(this.$route.params.id).then((data) => {
41
+      this.wait = false;
42
+    });
51
   },
43
   },
52
   computed: {
44
   computed: {
53
     ...mapState("property", ["property", "propertyImages"]),
45
     ...mapState("property", ["property", "propertyImages"]),
54
     Wait() {
46
     Wait() {
55
-      if (this.wait && !this.carouselLoaded && !this.contentloaded) {
47
+      if (this.wait && !this.contentloaded) {
56
         return true;
48
         return true;
57
       }
49
       }
58
       return false;
50
       return false;
59
-    }
51
+    },
60
   },
52
   },
61
   methods: {
53
   methods: {
62
     ...mapActions("property", ["getDisplayProperty", "clearPropertyImages"]),
54
     ...mapActions("property", ["getDisplayProperty", "clearPropertyImages"]),
77
     },
69
     },
78
     ContentDone() {
70
     ContentDone() {
79
       this.contentloaded = true;
71
       this.contentloaded = true;
80
-    }
72
+    },
81
   },
73
   },
82
   beforeDestroy() {
74
   beforeDestroy() {
83
     this.clearPropertyImages();
75
     this.clearPropertyImages();
84
-  }
76
+  },
85
 };
77
 };
86
 </script>
78
 </script>
87
 
79
 

Loading…
Cancel
Save