Pārlūkot izejas kodu

Loading Update for Dotnet 5

master
30117125 3 gadus atpakaļ
vecāks
revīzija
3251aa51c3

+ 27
- 4
src/components/home/propertySection.vue Parādīt failu

@@ -8,7 +8,7 @@
8 8
           </div>
9 9
         </div>
10 10
       </div>
11
-      <div class="contianer">
11
+      <div v-if="boolLoaded" class="contianer">
12 12
         <div class="row">
13 13
           <div class="col">
14 14
             <propertyCard
@@ -20,8 +20,22 @@
20 20
           </div>
21 21
         </div>
22 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 36
     </div>
24 37
   </section>
38
+
25 39
   <!-- #listings -->
26 40
 </template>
27 41
 
@@ -30,6 +44,11 @@
30 44
 import { mapState, mapActions } from "vuex";
31 45
 import propertyCard from "../property/propertyCard.vue";
32 46
 export default {
47
+  data() {
48
+    return {
49
+      boolLoaded: false
50
+    };
51
+  },
33 52
   components: {
34 53
     propertyCard
35 54
   },
@@ -38,13 +57,17 @@ export default {
38 57
   },
39 58
   methods: {
40 59
     ...mapActions("propertySearch", ["searchLatestProperties"]),
41
-    LoadData() {
42
-      this.searchLatestProperties();
60
+    async LoadData() {
61
+      await this.searchLatestProperties();
43 62
       this.$forceUpdate();
44 63
     }
45 64
   },
46 65
   mounted() {
47
-    this.LoadData();
66
+    this.LoadData().then(() => {
67
+      setTimeout(() => {
68
+        this.boolLoaded = true;
69
+      }, 100);
70
+    });
48 71
   }
49 72
 };
50 73
 </script>

+ 26
- 4
src/components/property/commercial/latestListings.vue Parādīt failu

@@ -8,7 +8,7 @@
8 8
           </div>
9 9
         </div>
10 10
       </div>
11
-      <div class="contianer">
11
+      <div v-if="boolLoaded" class="contianer">
12 12
         <div class="row">
13 13
           <div class="col">
14 14
             <propertyCard
@@ -20,6 +20,19 @@
20 20
           </div>
21 21
         </div>
22 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 36
     </div>
24 37
   </section>
25 38
 </template>
@@ -29,18 +42,27 @@
29 42
 import { mapState, mapActions } from "vuex";
30 43
 import propertyCard from "../propertyCard";
31 44
 export default {
45
+  data() {
46
+    return {
47
+      boolLoaded: false
48
+    };
49
+  },
32 50
   components: {
33 51
     propertyCard
34 52
   },
35 53
   methods: {
36 54
     ...mapActions("propertySearch", ["searchLatestPropertiesType"]),
37
-    LoadData() {
38
-      this.searchLatestPropertiesType("Commercial");
55
+    async LoadData() {
56
+      await this.searchLatestPropertiesType("Commercial");
39 57
       this.$forceUpdate();
40 58
     }
41 59
   },
42 60
   mounted() {
43
-    this.LoadData();
61
+    this.LoadData().then(() => {
62
+      setTimeout(() => {
63
+        this.boolLoaded = true;
64
+      }, 100);
65
+    });
44 66
   },
45 67
   computed: {
46 68
     ...mapState("propertySearch", ["latestProperties"])

+ 23
- 2
src/components/property/residential/latestListings.vue Parādīt failu

@@ -9,7 +9,19 @@
9 9
             </div>
10 10
           </div>
11 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 25
           <div class="row">
14 26
             <div class="col">
15 27
               <propertyCard
@@ -31,6 +43,11 @@
31 43
 import { mapState, mapActions } from "vuex";
32 44
 import propertyCard from "../propertyCard";
33 45
 export default {
46
+  data() {
47
+    return {
48
+      boolLoaded: false
49
+    };
50
+  },
34 51
   components: {
35 52
     propertyCard
36 53
   },
@@ -42,7 +59,11 @@ export default {
42 59
     }
43 60
   },
44 61
   mounted() {
45
-    this.LoadData();
62
+    this.LoadData().then(() => {
63
+      setTimeout(() => {
64
+        this.boolLoaded = true;
65
+      }, 100);
66
+    });
46 67
   },
47 68
   computed: {
48 69
     ...mapState("propertySearch", ["latestProperties"])

+ 7
- 1
src/components/timeshare/buy/latestWeeks.vue Parādīt failu

@@ -22,7 +22,13 @@
22 22
         </div>
23 23
       </div>
24 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 32
       </div>
27 33
     </div>
28 34
   </section>

+ 23
- 6
src/components/timeshare/sell/contentSectionNew.vue Parādīt failu

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <section id="contact2">
2
+  <section v-if="boolLoaded" id="contact2">
3 3
     <div class="container">
4 4
       <div class="row">
5 5
         <div class="col-lg-12">
@@ -861,6 +861,15 @@
861 861
       <div v-if="wait" id="preloader"></div>
862 862
     </div>
863 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 873
 </template>
865 874
 
866 875
 <script>
@@ -887,7 +896,8 @@ export default {
887 896
       boolError: false,
888 897
       userLoggedIn: Log.isLoggedIn(),
889 898
       profileEmailError: false,
890
-      selectedUserType: "myself"
899
+      selectedUserType: "myself",
900
+      boolLoaded: false
891 901
     };
892 902
   },
893 903
   components: {
@@ -898,10 +908,11 @@ export default {
898 908
     if (this.sellItem.id) {
899 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 917
   created() {
907 918
     this.initTimeshare(this.weekId);
@@ -977,6 +988,12 @@ export default {
977 988
     ...mapActions("payment", ["addPayment"]),
978 989
     ...mapActions("bank", ["getBanks"]),
979 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 997
     newSale() {
981 998
       this.weekId = 0;
982 999
       this.getBlankWeek();

Notiek ielāde…
Atcelt
Saglabāt