Browse Source

Loading Update for Dotnet 5

master
30117125 3 years ago
parent
commit
3251aa51c3

+ 27
- 4
src/components/home/propertySection.vue View File

8
           </div>
8
           </div>
9
         </div>
9
         </div>
10
       </div>
10
       </div>
11
-      <div class="contianer">
11
+      <div v-if="boolLoaded" class="contianer">
12
         <div class="row">
12
         <div class="row">
13
           <div class="col">
13
           <div class="col">
14
             <propertyCard
14
             <propertyCard
20
           </div>
20
           </div>
21
         </div>
21
         </div>
22
       </div>
22
       </div>
23
+      <div v-else class="contianer">
24
+        <div class="row">
25
+          <div class="col">
26
+            <vue-loaders
27
+              class="my-auto"
28
+              style="margin-top:50px !important; margin-bottom:50px !important"
29
+              name="line-spin-fade-loader"
30
+              color="black"
31
+              scale="1"
32
+            ></vue-loaders>
33
+          </div>
34
+        </div>
35
+      </div>
23
     </div>
36
     </div>
24
   </section>
37
   </section>
38
+
25
   <!-- #listings -->
39
   <!-- #listings -->
26
 </template>
40
 </template>
27
 
41
 
30
 import { mapState, mapActions } from "vuex";
44
 import { mapState, mapActions } from "vuex";
31
 import propertyCard from "../property/propertyCard.vue";
45
 import propertyCard from "../property/propertyCard.vue";
32
 export default {
46
 export default {
47
+  data() {
48
+    return {
49
+      boolLoaded: false
50
+    };
51
+  },
33
   components: {
52
   components: {
34
     propertyCard
53
     propertyCard
35
   },
54
   },
38
   },
57
   },
39
   methods: {
58
   methods: {
40
     ...mapActions("propertySearch", ["searchLatestProperties"]),
59
     ...mapActions("propertySearch", ["searchLatestProperties"]),
41
-    LoadData() {
42
-      this.searchLatestProperties();
60
+    async LoadData() {
61
+      await this.searchLatestProperties();
43
       this.$forceUpdate();
62
       this.$forceUpdate();
44
     }
63
     }
45
   },
64
   },
46
   mounted() {
65
   mounted() {
47
-    this.LoadData();
66
+    this.LoadData().then(() => {
67
+      setTimeout(() => {
68
+        this.boolLoaded = true;
69
+      }, 100);
70
+    });
48
   }
71
   }
49
 };
72
 };
50
 </script>
73
 </script>

+ 26
- 4
src/components/property/commercial/latestListings.vue View File

8
           </div>
8
           </div>
9
         </div>
9
         </div>
10
       </div>
10
       </div>
11
-      <div class="contianer">
11
+      <div v-if="boolLoaded" class="contianer">
12
         <div class="row">
12
         <div class="row">
13
           <div class="col">
13
           <div class="col">
14
             <propertyCard
14
             <propertyCard
20
           </div>
20
           </div>
21
         </div>
21
         </div>
22
       </div>
22
       </div>
23
+      <div v-else class="contianer">
24
+        <div class="row">
25
+          <div class="col">
26
+            <vue-loaders
27
+              class="my-auto"
28
+              style="margin-top:50px !important; margin-bottom:50px !important"
29
+              name="line-spin-fade-loader"
30
+              color="black"
31
+              scale="1"
32
+            ></vue-loaders>
33
+          </div>
34
+        </div>
35
+      </div>
23
     </div>
36
     </div>
24
   </section>
37
   </section>
25
 </template>
38
 </template>
29
 import { mapState, mapActions } from "vuex";
42
 import { mapState, mapActions } from "vuex";
30
 import propertyCard from "../propertyCard";
43
 import propertyCard from "../propertyCard";
31
 export default {
44
 export default {
45
+  data() {
46
+    return {
47
+      boolLoaded: false
48
+    };
49
+  },
32
   components: {
50
   components: {
33
     propertyCard
51
     propertyCard
34
   },
52
   },
35
   methods: {
53
   methods: {
36
     ...mapActions("propertySearch", ["searchLatestPropertiesType"]),
54
     ...mapActions("propertySearch", ["searchLatestPropertiesType"]),
37
-    LoadData() {
38
-      this.searchLatestPropertiesType("Commercial");
55
+    async LoadData() {
56
+      await this.searchLatestPropertiesType("Commercial");
39
       this.$forceUpdate();
57
       this.$forceUpdate();
40
     }
58
     }
41
   },
59
   },
42
   mounted() {
60
   mounted() {
43
-    this.LoadData();
61
+    this.LoadData().then(() => {
62
+      setTimeout(() => {
63
+        this.boolLoaded = true;
64
+      }, 100);
65
+    });
44
   },
66
   },
45
   computed: {
67
   computed: {
46
     ...mapState("propertySearch", ["latestProperties"])
68
     ...mapState("propertySearch", ["latestProperties"])

+ 23
- 2
src/components/property/residential/latestListings.vue View File

9
             </div>
9
             </div>
10
           </div>
10
           </div>
11
         </div>
11
         </div>
12
-        <div class="contianer">
12
+        <div v-if="boolLoaded" class="contianer">
13
+          <div class="row">
14
+            <div class="col">
15
+              <propertyCard
16
+                v-if="latestProperties.length > 0"
17
+                name="propertyholder"
18
+                :properties="latestProperties"
19
+                :showSort="false"
20
+              />
21
+            </div>
22
+          </div>
23
+        </div>
24
+        <div v-else class="contianer">
13
           <div class="row">
25
           <div class="row">
14
             <div class="col">
26
             <div class="col">
15
               <propertyCard
27
               <propertyCard
31
 import { mapState, mapActions } from "vuex";
43
 import { mapState, mapActions } from "vuex";
32
 import propertyCard from "../propertyCard";
44
 import propertyCard from "../propertyCard";
33
 export default {
45
 export default {
46
+  data() {
47
+    return {
48
+      boolLoaded: false
49
+    };
50
+  },
34
   components: {
51
   components: {
35
     propertyCard
52
     propertyCard
36
   },
53
   },
42
     }
59
     }
43
   },
60
   },
44
   mounted() {
61
   mounted() {
45
-    this.LoadData();
62
+    this.LoadData().then(() => {
63
+      setTimeout(() => {
64
+        this.boolLoaded = true;
65
+      }, 100);
66
+    });
46
   },
67
   },
47
   computed: {
68
   computed: {
48
     ...mapState("propertySearch", ["latestProperties"])
69
     ...mapState("propertySearch", ["latestProperties"])

+ 7
- 1
src/components/timeshare/buy/latestWeeks.vue View File

22
         </div>
22
         </div>
23
       </div>
23
       </div>
24
       <div v-else>
24
       <div v-else>
25
-        <vue-loaders-ball-clip-rotate />
25
+        <vue-loaders
26
+          class="my-auto"
27
+          style="margin-top:50px !important; margin-bottom:50px !important; margin-y:50%"
28
+          name="line-spin-fade-loader"
29
+          color="black"
30
+          scale="1"
31
+        ></vue-loaders>
26
       </div>
32
       </div>
27
     </div>
33
     </div>
28
   </section>
34
   </section>

+ 23
- 6
src/components/timeshare/sell/contentSectionNew.vue View File

1
 <template>
1
 <template>
2
-  <section id="contact2">
2
+  <section v-if="boolLoaded" id="contact2">
3
     <div class="container">
3
     <div class="container">
4
       <div class="row">
4
       <div class="row">
5
         <div class="col-lg-12">
5
         <div class="col-lg-12">
861
       <div v-if="wait" id="preloader"></div>
861
       <div v-if="wait" id="preloader"></div>
862
     </div>
862
     </div>
863
   </section>
863
   </section>
864
+  <div v-else>
865
+    <vue-loaders
866
+      class="my-auto"
867
+      style="margin-top:50px !important; margin-bottom:50px !important; margin-left:50%"
868
+      name="line-spin-fade-loader"
869
+      color="black"
870
+      scale="1"
871
+    ></vue-loaders>
872
+  </div>
864
 </template>
873
 </template>
865
 
874
 
866
 <script>
875
 <script>
887
       boolError: false,
896
       boolError: false,
888
       userLoggedIn: Log.isLoggedIn(),
897
       userLoggedIn: Log.isLoggedIn(),
889
       profileEmailError: false,
898
       profileEmailError: false,
890
-      selectedUserType: "myself"
899
+      selectedUserType: "myself",
900
+      boolLoaded: false
891
     };
901
     };
892
   },
902
   },
893
   components: {
903
   components: {
898
     if (this.sellItem.id) {
908
     if (this.sellItem.id) {
899
       this.newSale();
909
       this.newSale();
900
     }
910
     }
901
-    this.initTimeshare(0);
902
-    this.getIndividual(Log.getUser().id);
903
-    this.getBanks();
904
-    this.getStatusList();
911
+    this.loadData().then(() => {
912
+      setTimeout(() => {
913
+        this.boolLoaded = true;
914
+      }, 100);
915
+    });
905
   },
916
   },
906
   created() {
917
   created() {
907
     this.initTimeshare(this.weekId);
918
     this.initTimeshare(this.weekId);
977
     ...mapActions("payment", ["addPayment"]),
988
     ...mapActions("payment", ["addPayment"]),
978
     ...mapActions("bank", ["getBanks"]),
989
     ...mapActions("bank", ["getBanks"]),
979
     ...mapActions("status", ["getStatusList"]),
990
     ...mapActions("status", ["getStatusList"]),
991
+    async loadData() {
992
+      await this.initTimeshare(0);
993
+      await this.getIndividual(Log.getUser().id);
994
+      await this.getBanks();
995
+      await this.getStatusList();
996
+    },
980
     newSale() {
997
     newSale() {
981
       this.weekId = 0;
998
       this.weekId = 0;
982
       this.getBlankWeek();
999
       this.getBlankWeek();

Loading…
Cancel
Save