Lene 4 years ago
parent
commit
10402f4f47

+ 4
- 1
public/css/newStyle.css View File

132
 p {
132
 p {
133
   padding: 0;
133
   padding: 0;
134
   margin: 0 0 20px 0;
134
   margin: 0 0 20px 0;
135
+}
136
+
137
+ql-align-center {
135
   text-align: center;
138
   text-align: center;
136
 }
139
 }
137
 
140
 
273
 .modal-dialog {
276
 .modal-dialog {
274
   position: fixed;
277
   position: fixed;
275
   margin: auto;
278
   margin: auto;
276
-  width: 320px;
279
+  width: 520px;
277
   right: 0px;
280
   right: 0px;
278
   height: 100%;
281
   height: 100%;
279
 }
282
 }

+ 8
- 1
src/components/about/aboutTimeshareContentSection.vue View File

52
       <div class="row" data-aos="fade-down">
52
       <div class="row" data-aos="fade-down">
53
         <div class="col-lg-12">
53
         <div class="col-lg-12">
54
           <h3>
54
           <h3>
55
-            Uni-Vate Properties facilitates the timeshare resale for a listing fee of only R380
55
+            Uni-Vate Properties facilitates the timeshare resale for a listing fee of only R{{
56
+              getListingFee.amount
57
+            }}
56
             including VAT payable when listing your week/module.
58
             including VAT payable when listing your week/module.
57
           </h3>
59
           </h3>
58
           <br />
60
           <br />
65
 <script>
67
 <script>
66
 import AOS from "aos";
68
 import AOS from "aos";
67
 import "aos/dist/aos.css";
69
 import "aos/dist/aos.css";
70
+import { mapGetters } from "vuex";
71
+
68
 export default {
72
 export default {
69
   created() {
73
   created() {
70
     AOS.init();
74
     AOS.init();
75
+  },
76
+  computed: {
77
+    ...mapGetters("fees", ["getListingFee"])
71
   }
78
   }
72
 };
79
 };
73
 </script>
80
 </script>

+ 1
- 1
src/components/about/aboutUsCarouselSection.vue View File

7
             <h2>About Us</h2>
7
             <h2>About Us</h2>
8
             <p>
8
             <p>
9
               Uni-Vate Properties began in 2013 in Pretoria East with various properties in their
9
               Uni-Vate Properties began in 2013 in Pretoria East with various properties in their
10
-              portfolio. Led by our Director, Delia 0' Conner, who has over 25 years of experience
10
+              portfolio. Led by our Director, Delia O' Conner, who has over 25 years of experience
11
               in the timeshare industry, the move to conventional property sales and rentals was an
11
               in the timeshare industry, the move to conventional property sales and rentals was an
12
               easy transition for the Uni-Vate team.
12
               easy transition for the Uni-Vate team.
13
             </p>
13
             </p>

+ 10
- 3
src/components/about/aboutUsContentSection.vue View File

23
           </p>
23
           </p>
24
           <p>
24
           <p>
25
             <strong
25
             <strong
26
-              >Sellers across SA are able to list properties for a listing fee of R380 per property
27
-              listing which gives them exposure not only on the website, but on social media sites
28
-              also.</strong
26
+              >Sellers across SA are able to list properties for a listing fee of R{{
27
+                getListingFee.amount
28
+              }}
29
+              per property listing which gives them exposure not only on the website, but on social
30
+              media sites also.</strong
29
             >
31
             >
30
           </p>
32
           </p>
31
           <p>
33
           <p>
58
 <script>
60
 <script>
59
 import AOS from "aos";
61
 import AOS from "aos";
60
 import "aos/dist/aos.css";
62
 import "aos/dist/aos.css";
63
+import { mapGetters } from "vuex";
64
+
61
 export default {
65
 export default {
62
   created() {
66
   created() {
63
     AOS.init();
67
     AOS.init();
68
+  },
69
+  computed: {
70
+    ...mapGetters("fees", ["getListingFee"])
64
   }
71
   }
65
 };
72
 };
66
 </script>
73
 </script>

+ 1
- 1
src/components/admin/misc/termsConditions.vue View File

56
       customToolbar: [
56
       customToolbar: [
57
         [{ header: [false, 1, 2, 3, 4, 5, 6] }],
57
         [{ header: [false, 1, 2, 3, 4, 5, 6] }],
58
         ["bold", "italic", "underline", "strike"],
58
         ["bold", "italic", "underline", "strike"],
59
-        [{ align: "" }, { align: "center" }, { align: "right" }, { align: "justify" }],
59
+
60
         [{ list: "ordered" }, { list: "bullet" }, { list: "check" }],
60
         [{ list: "ordered" }, { list: "bullet" }, { list: "check" }],
61
         [{ script: "sub" }, { script: "super" }],
61
         [{ script: "sub" }, { script: "super" }],
62
         [{ indent: "-1" }, { indent: "+1" }]
62
         [{ indent: "-1" }, { indent: "+1" }]

+ 23
- 15
src/components/admin/status/editTimeShareAdminPage.vue View File

13
                 <div align="center" class="col"></div>
13
                 <div align="center" class="col"></div>
14
               </div>
14
               </div>
15
             </div>
15
             </div>
16
-
17
             <div class="form">
16
             <div class="form">
18
               <div id="sendmessage">Your details has been sent. Thank you!</div>
17
               <div id="sendmessage">Your details has been sent. Thank you!</div>
19
               <div id="errormessage"></div>
18
               <div id="errormessage"></div>
113
                       name="week"
112
                       name="week"
114
                       id="week"
113
                       id="week"
115
                       placeholder="UNIT / WEEK NUMBER"
114
                       placeholder="UNIT / WEEK NUMBER"
116
-                      v-model="weekParam.weekNumber"
115
+                      v-model="week.module"
117
                       data-msg="Please enter week number"
116
                       data-msg="Please enter week number"
118
                     />
117
                     />
119
                   </float-label>
118
                   </float-label>
218
                   <div class="validation"></div>
217
                   <div class="validation"></div>
219
                 </div>
218
                 </div>
220
                 <div class="form-group col-md-6 mt-2">
219
                 <div class="form-group col-md-6 mt-2">
221
-                  <label v-if="!weekParam.askingPrice" for="tsaPrice" class="uniSelectLabel"
220
+                  <label v-if="!week.askingPrice" for="tsaPrice" class="uniSelectLabel"
222
                     >ASKING PRICE</label
221
                     >ASKING PRICE</label
223
                   >
222
                   >
224
                   <float-label label="ASKING PRICE">
223
                   <float-label label="ASKING PRICE">
225
                     <currency-input
224
                     <currency-input
226
                       onclick="this.setSelectionRange(0, this.value.length)"
225
                       onclick="this.setSelectionRange(0, this.value.length)"
227
                       name="tsaPrice"
226
                       name="tsaPrice"
228
-                      :value="weekParam.askingPrice"
229
-                      @input="weekParam.askingPrice = $event"
230
-                      v-model="weekParam.askingPrice"
227
+                      :value="week.askingPrice"
228
+                      @input="week.askingPrice = $event"
229
+                      v-model="week.askingPrice"
231
                       id="resPrice"
230
                       id="resPrice"
232
                       class="form-control uniInput"
231
                       class="form-control uniInput"
233
                     />
232
                     />
404
                       id="landline"
403
                       id="landline"
405
                       placeholder="Landline Number"
404
                       placeholder="Landline Number"
406
                       data-msg="Please enter your landline number"
405
                       data-msg="Please enter your landline number"
407
-                      v-model="week.owner.landlineNumber"
406
+                      v-model="week.owner.telephone"
408
                     />
407
                     />
409
                   </float-label>
408
                   </float-label>
410
 
409
 
530
     this.getIndividual(Log.getUser().id);
529
     this.getIndividual(Log.getUser().id);
531
     this.getBanks();
530
     this.getBanks();
532
     //this.getWeek(this.weekParam.id);
531
     //this.getWeek(this.weekParam.id);
532
+    console.log(this.regions);
533
+    console.log(this.weekParam.region.regionCode);
533
     this.selectedRegion = this.weekParam.region.regionCode;
534
     this.selectedRegion = this.weekParam.region.regionCode;
534
     this.selectedResort = this.weekParam.resort.resortCode;
535
     this.selectedResort = this.weekParam.resort.resortCode;
535
     this.selectedBedrooms = this.weekParam.bedrooms;
536
     this.selectedBedrooms = this.weekParam.bedrooms;
575
     },
576
     },
576
     filteredResort() {
577
     filteredResort() {
577
       let list = [];
578
       let list = [];
578
-      if (this.sellItem && this.sellItem.region && this.sellItem.region.regionCode) {
579
+      if (this.week && this.week.region && this.selectedRegion) {
579
         const item = this.detailedRegion.find(
580
         const item = this.detailedRegion.find(
580
-          region => region.region.regionCode === this.sellItem.region.regionCode
581
+          region => region.region.regionCode === this.selectedRegion
581
         );
582
         );
582
         if (item) {
583
         if (item) {
583
           list = item.children;
584
           list = item.children;
604
     saveEdit() {
605
     saveEdit() {
605
       this.regions.forEach(region => {
606
       this.regions.forEach(region => {
606
         if (region.regionCode === this.selectedRegion) {
607
         if (region.regionCode === this.selectedRegion) {
607
-          this.weekParam.region = region;
608
+          //console.log(region);
609
+          this.weekParam.regionId = region.id;
608
         }
610
         }
609
       });
611
       });
610
       this.resorts.forEach(resort => {
612
       this.resorts.forEach(resort => {
611
         if (resort.resortCode === this.selectedResort) {
613
         if (resort.resortCode === this.selectedResort) {
614
+          this.weekParam.resortCode = resort.resortCode;
612
           this.weekParam.resortName = resort.resortName;
615
           this.weekParam.resortName = resort.resortName;
613
         }
616
         }
614
       });
617
       });
630
       if (this.week.owner.cellNumber === "") {
633
       if (this.week.owner.cellNumber === "") {
631
         this.week.owner.cellNumber = "0000000000";
634
         this.week.owner.cellNumber = "0000000000";
632
       }
635
       }
636
+      if (this.week.owner.telephone === "") {
637
+        this.week.owner.telephone = "0000000000";
638
+      }
633
       this.weekParam.arrivalDate = new Date(this.dateParam).toISOString().substring(0, 10);
639
       this.weekParam.arrivalDate = new Date(this.dateParam).toISOString().substring(0, 10);
634
       this.weekParam.departureDate = new Date(this.depDateParam).toISOString().substring(0, 10);
640
       this.weekParam.departureDate = new Date(this.depDateParam).toISOString().substring(0, 10);
635
       this.weekParam.pulbishedDate = new Date(this.pubDateParam).toISOString().substring(0, 19);
641
       this.weekParam.pulbishedDate = new Date(this.pubDateParam).toISOString().substring(0, 19);
636
-      this.weekParam.regionId = this.weekParam.region.id;
642
+      //this.weekParam.regionId = this.weekParam.region.id;
637
       this.weekParam.agentId = this.week.agentId;
643
       this.weekParam.agentId = this.week.agentId;
638
       //this.weekParam.bankedWith = this.week.bankedWith;
644
       //this.weekParam.bankedWith = this.week.bankedWith;
639
       this.weekParam.owner = this.week.owner;
645
       this.weekParam.owner = this.week.owner;
646
+      this.weekParam.askingPrice = this.week.askingPrice;
647
+      this.weekParam.module = this.week.module;
640
       parseFloat(this.weekParam.sellPrice);
648
       parseFloat(this.weekParam.sellPrice);
641
       parseFloat(this.weekParam.levyAmount);
649
       parseFloat(this.weekParam.levyAmount);
642
       delete this.weekParam.weekType;
650
       delete this.weekParam.weekType;
646
       delete this.status;
654
       delete this.status;
647
       delete this.weekParam.owner.howMarried;
655
       delete this.weekParam.owner.howMarried;
648
       delete this.weekParam.cellNumber;
656
       delete this.weekParam.cellNumber;
649
-      console.log(JSON.stringify(this.weekParam));
650
-      // this.editSave(this.weekParam).then(() => {
651
-      //   this.backToListView();
652
-      // });
657
+      //console.log(JSON.stringify(this.weekParam));
658
+      this.editSave(this.weekParam).then(() => {
659
+        this.backToListView();
660
+      });
653
     },
661
     },
654
     resortChange() {
662
     resortChange() {
655
       this.onResortChange({
663
       this.onResortChange({

+ 12
- 9
src/components/misc/TermsConditions/contentSection.vue View File

1
 <template>
1
 <template>
2
-  <div class="container">
3
-    <div class="row">
4
-      <div class="col">
5
-        <div class="section-header">
6
-          <h2>Terms & Conditions</h2>
2
+  <div>
3
+    <div class="container" style="text-align:left">
4
+      <div class="row">
5
+        <div class="col">
6
+          <div class="section-header">
7
+            <h2>Terms & Conditions</h2>
8
+          </div>
7
         </div>
9
         </div>
8
       </div>
10
       </div>
9
-    </div>
10
-    <div class="row">
11
-      <div class="col">
12
-        <div v-html="terms.termsConditions"></div>
11
+
12
+      <div class="row" style="text-align:left">
13
+        <div class="col" style="text-align:left">
14
+          <div v-html="terms.termsConditions" id="htmlContainer"></div>
15
+        </div>
13
       </div>
16
       </div>
14
     </div>
17
     </div>
15
   </div>
18
   </div>

+ 13
- 4
src/components/misc/bondCaclculator.vue View File

1
 <template>
1
 <template>
2
   <div>
2
   <div>
3
-    <h2 id="modal-bondcal">Bond Calculator</h2>
3
+    <iframe
4
+      id="better-bond-frame embed-responsive-item"
5
+      src="https://betterbond.co.za/calculators-in-frame6/home-loan-repayment"
6
+      title="Better Bond"
7
+      height="1340"
8
+      width="100%"
9
+      sandbox="allow-forms allow-scripts allow-same-origin"
10
+      scrolling="yes"
11
+    ></iframe>
12
+    <!-- <h2 id="modal-bondcal">Bond Calculator</h2>
4
     <p>Calculate the value of the property you could buy</p>
13
     <p>Calculate the value of the property you could buy</p>
5
     <currency-input
14
     <currency-input
6
       onClick="this.setSelectionRange(0, this.value.length)"
15
       onClick="this.setSelectionRange(0, this.value.length)"
31
       id="interest"
40
       id="interest"
32
       placeholder="Interest Rate (Percent)"
41
       placeholder="Interest Rate (Percent)"
33
       v-model="rate"
42
       v-model="rate"
34
-    />
43
+    /> -->
35
     <!-- <button @click="calculate()" class="btn-solid-blue scrollto">CALCULATE</button> -->
44
     <!-- <button @click="calculate()" class="btn-solid-blue scrollto">CALCULATE</button> -->
36
-    <div class="container p-0 mt-5">
45
+    <!-- <div class="container p-0 mt-5">
37
       <div class="row">
46
       <div class="row">
38
         <div class="col-md-7">
47
         <div class="col-md-7">
39
           Monthly Repayment
48
           Monthly Repayment
51
           <strong>{{ grossIncome | toCurrency }}</strong>
60
           <strong>{{ grossIncome | toCurrency }}</strong>
52
         </div>
61
         </div>
53
       </div>
62
       </div>
54
-    </div>
63
+    </div> -->
55
   </div>
64
   </div>
56
 </template>
65
 </template>
57
 
66
 

+ 1
- 1
src/components/misc/privacyPolicy/carouselSection.vue View File

8
             <p>
8
             <p>
9
               We respect your privacy. This Privacy Policy governs the manner in which we will treat
9
               We respect your privacy. This Privacy Policy governs the manner in which we will treat
10
               your personal information collected when using our website and when we otherwise
10
               your personal information collected when using our website and when we otherwise
11
-              engage with each after you visiting our website.
11
+              engage with each after you visit our website.
12
             </p>
12
             </p>
13
           </div>
13
           </div>
14
         </div>
14
         </div>

+ 42
- 7
src/components/property/propertyCard.vue View File

11
             <router-link :to="`/property/residential/property/${currentProperty.id}`">
11
             <router-link :to="`/property/residential/property/${currentProperty.id}`">
12
               <div class="portfolio-item p-4 wow fadeInUp justify-content-md-center">
12
               <div class="portfolio-item p-4 wow fadeInUp justify-content-md-center">
13
                 <div class="feature-top pt-3 mb-2">
13
                 <div class="feature-top pt-3 mb-2">
14
-                  <h3>{{ currentProperty.displayPrice }}</h3>
14
+                  <div class="pb-2">
15
+                    <h3 style="display:inline">{{ currentProperty.displayPrice }}</h3>
16
+                    <p
17
+                      v-if="!currentProperty.isSale"
18
+                      class="ml-1"
19
+                      style="display:inline; color:white"
20
+                    >
21
+                      Per Month
22
+                    </p>
23
+                  </div>
24
+
15
                   <div>
25
                   <div>
16
                     <img
26
                     <img
17
                       style="height:165px; object-fit: cover;"
27
                       style="height:165px; object-fit: cover;"
27
                 </p>
37
                 </p>
28
                 <p
38
                 <p
29
                   v-if="currentProperty.displayText != ''"
39
                   v-if="currentProperty.displayText != ''"
30
-                  :class="[currentProperty.displayColor === 'green' ? 'greenText' : currentProperty.displayColor === 'orange' ? 'pendingOffer' : currentProperty.displayColor === 'red' ? 'redText' : 'normalText']"
40
+                  :class="[
41
+                    currentProperty.displayColor === 'green'
42
+                      ? 'greenText'
43
+                      : currentProperty.displayColor === 'orange'
44
+                      ? 'pendingOffer'
45
+                      : currentProperty.displayColor === 'red'
46
+                      ? 'redText'
47
+                      : 'normalText'
48
+                  ]"
31
                 >
49
                 >
32
                   <strong>{{ currentProperty.displayText }}</strong>
50
                   <strong>{{ currentProperty.displayText }}</strong>
33
                 </p>
51
                 </p>
38
             <router-link :to="`/property/commercial/property/${currentProperty.id}`">
56
             <router-link :to="`/property/commercial/property/${currentProperty.id}`">
39
               <div class="portfolio-item p-4 wow fadeInUp justify-content-md-center">
57
               <div class="portfolio-item p-4 wow fadeInUp justify-content-md-center">
40
                 <div class="feature-top pt-3 mb-2">
58
                 <div class="feature-top pt-3 mb-2">
41
-                  <h3>{{ currentProperty.displayPrice }}</h3>
59
+                  <div class="pb-2">
60
+                    <h3 style="display:inline">{{ currentProperty.displayPrice }}</h3>
61
+                    <p
62
+                      v-if="!currentProperty.isSale"
63
+                      class="ml-1"
64
+                      style="display:inline; color:white"
65
+                    >
66
+                      Per Month
67
+                    </p>
68
+                  </div>
42
                   <img
69
                   <img
43
                     style="height:165px; object-fit: cover;"
70
                     style="height:165px; object-fit: cover;"
44
                     :src="currentProperty.displayImage"
71
                     :src="currentProperty.displayImage"
52
                 </p>
79
                 </p>
53
                 <p
80
                 <p
54
                   v-if="currentProperty.displayText != ''"
81
                   v-if="currentProperty.displayText != ''"
55
-                  :class="[currentProperty.displayColor === 'green' ? 'greenText' : currentProperty.displayColor === 'orange' ? 'pendingOffer' : currentProperty.displayColor === 'red' ? 'redText' : 'normalText']"
82
+                  :class="[
83
+                    currentProperty.displayColor === 'green'
84
+                      ? 'greenText'
85
+                      : currentProperty.displayColor === 'orange'
86
+                      ? 'pendingOffer'
87
+                      : currentProperty.displayColor === 'red'
88
+                      ? 'redText'
89
+                      : 'normalText'
90
+                  ]"
56
                 >
91
                 >
57
                   <strong>{{ currentProperty.displayText }}</strong>
92
                   <strong>{{ currentProperty.displayText }}</strong>
58
                 </p>
93
                 </p>
73
   props: {
108
   props: {
74
     properties: { type: Array, default: () => [] },
109
     properties: { type: Array, default: () => [] },
75
     showSort: { type: Boolean, default: true },
110
     showSort: { type: Boolean, default: true },
76
-    salesType: { type: String, default: "Rent" },
111
+    salesType: { type: String, default: "Rent" }
77
   },
112
   },
78
   methods: {
113
   methods: {
79
     sortHighPrice() {
114
     sortHighPrice() {
111
       }
146
       }
112
 
147
 
113
       return this.properties.sort(compare);
148
       return this.properties.sort(compare);
114
-    },
115
-  },
149
+    }
150
+  }
116
 };
151
 };
117
 </script>
152
 </script>
118
 
153
 

+ 17
- 17
src/components/shared/basePagination.vue View File

3
     <nav>
3
     <nav>
4
       <ul class="pagination">
4
       <ul class="pagination">
5
         <li class="page-item" v-if="isPreviousButtonDisabled" @click="previousPage">
5
         <li class="page-item" v-if="isPreviousButtonDisabled" @click="previousPage">
6
-          <a class="page-link" href="#" aria-label="Previous">
6
+          <a class="page-link" aria-label="Previous">
7
             <span aria-hidden="true">&laquo;</span>
7
             <span aria-hidden="true">&laquo;</span>
8
             <span class="sr-only">Previous</span>
8
             <span class="sr-only">Previous</span>
9
           </a>
9
           </a>
16
           />
16
           />
17
         </li>
17
         </li>
18
         <li class="page-item" v-if="isNextButtonDisabled" @click="nextPage">
18
         <li class="page-item" v-if="isNextButtonDisabled" @click="nextPage">
19
-          <a class="page-link" href="#" aria-label="Next">
19
+          <a class="page-link" aria-label="Next">
20
             <span aria-hidden="true">&raquo;</span>
20
             <span aria-hidden="true">&raquo;</span>
21
             <span class="sr-only">Next</span>
21
             <span class="sr-only">Next</span>
22
           </a>
22
           </a>
26
   </div>
26
   </div>
27
 </template>
27
 </template>
28
 <script>
28
 <script>
29
-import BasePaginationItem from './basePaginationItem.vue';
29
+import BasePaginationItem from "./basePaginationItem.vue";
30
 
30
 
31
 export default {
31
 export default {
32
   components: {
32
   components: {
33
-    BasePaginationItem,
33
+    BasePaginationItem
34
   },
34
   },
35
   props: {
35
   props: {
36
     visiblePagesCount: {
36
     visiblePagesCount: {
37
       type: Number,
37
       type: Number,
38
-      default: 5,
38
+      default: 5
39
     },
39
     },
40
     currentPage: {
40
     currentPage: {
41
       type: Number,
41
       type: Number,
42
-      required: true,
42
+      required: true
43
     },
43
     },
44
     pageCount: {
44
     pageCount: {
45
       type: Number,
45
       type: Number,
46
-      required: true,
47
-    },
46
+      required: true
47
+    }
48
   },
48
   },
49
   computed: {
49
   computed: {
50
     isPreviousButtonDisabled() {
50
     isPreviousButtonDisabled() {
71
       if (currentPage <= visiblePagesThreshold + 1) {
71
       if (currentPage <= visiblePagesThreshold + 1) {
72
         pagintationItemsArray[0] = 1;
72
         pagintationItemsArray[0] = 1;
73
         const pagintationItems = pagintationItemsArray.map(
73
         const pagintationItems = pagintationItemsArray.map(
74
-          (paginationTrigger, index) => pagintationItemsArray[0] + index,
74
+          (paginationTrigger, index) => pagintationItemsArray[0] + index
75
         );
75
         );
76
         pagintationItems.push(pageCount);
76
         pagintationItems.push(pageCount);
77
         return pagintationItems;
77
         return pagintationItems;
78
       }
78
       }
79
       if (currentPage >= pageCount - visiblePagesThreshold + 1) {
79
       if (currentPage >= pageCount - visiblePagesThreshold + 1) {
80
         const pagintationItems = pagintationItemsArray.map(
80
         const pagintationItems = pagintationItemsArray.map(
81
-          (paginationTrigger, index) => pageCount - index,
81
+          (paginationTrigger, index) => pageCount - index
82
         );
82
         );
83
         pagintationItems.reverse().unshift(1);
83
         pagintationItems.reverse().unshift(1);
84
         return pagintationItems;
84
         return pagintationItems;
85
       }
85
       }
86
       pagintationItemsArray[0] = currentPage - visiblePagesThreshold + 1;
86
       pagintationItemsArray[0] = currentPage - visiblePagesThreshold + 1;
87
       const pagintationItems = pagintationItemsArray.map(
87
       const pagintationItems = pagintationItemsArray.map(
88
-        (paginationTrigger, index) => pagintationItemsArray[0] + index,
88
+        (paginationTrigger, index) => pagintationItemsArray[0] + index
89
       );
89
       );
90
       pagintationItems.unshift(1);
90
       pagintationItems.unshift(1);
91
       pagintationItems[pagintationItems.length - 1] = pageCount;
91
       pagintationItems[pagintationItems.length - 1] = pageCount;
92
       return pagintationItems;
92
       return pagintationItems;
93
-    },
93
+    }
94
   },
94
   },
95
   methods: {
95
   methods: {
96
     onLoadPage(value) {
96
     onLoadPage(value) {
97
-      this.$emit('loadPage', value);
97
+      this.$emit("loadPage", value);
98
     },
98
     },
99
     nextPage() {
99
     nextPage() {
100
-      this.$emit('nextPage');
100
+      this.$emit("nextPage");
101
     },
101
     },
102
     previousPage() {
102
     previousPage() {
103
-      this.$emit('previousPage');
104
-    },
105
-  },
103
+      this.$emit("previousPage");
104
+    }
105
+  }
106
 };
106
 };
107
 </script>
107
 </script>

+ 6
- 6
src/components/shared/footerSection.vue View File

32
               ><br />
32
               ><br />
33
             </p>
33
             </p>
34
           </div>
34
           </div>
35
-          <div class="col-lg-9 section-header" id="contactFoot">
35
+          <div class="col-lg-4 section-header" id="contactFoot">
36
             <h2 align="left">Contact Us</h2>
36
             <h2 align="left">Contact Us</h2>
37
             <div class="row">
37
             <div class="row">
38
-              <div class="col-md-4">
38
+              <div class="col-md-12">
39
                 <p class="footerText">
39
                 <p class="footerText">
40
                   105 Lombardy Business Park<br />
40
                   105 Lombardy Business Park<br />
41
                   Cnr. Graham and Cole Rd.<br />
41
                   Cnr. Graham and Cole Rd.<br />
44
                   ><br />
44
                   ><br />
45
                   <a href="tel:0124921238">+27 (0) 12 492 1238</a>
45
                   <a href="tel:0124921238">+27 (0) 12 492 1238</a>
46
                 </p>
46
                 </p>
47
-                <br /><br />
47
+                <br />
48
                 <p>
48
                 <p>
49
                   <a href="#body"
49
                   <a href="#body"
50
                     ><img src="../../../public/img/logos/UVProp.png" width="200px" alt="" title=""
50
                     ><img src="../../../public/img/logos/UVProp.png" width="200px" alt="" title=""
51
                   /></a>
51
                   /></a>
52
                 </p>
52
                 </p>
53
               </div>
53
               </div>
54
-              <div class="col-md-8">
55
-                <contactUsSection />
56
-              </div>
57
             </div>
54
             </div>
58
           </div>
55
           </div>
56
+          <div class="col-lg-5 section-header" id="contactFoot">
57
+            <contactUsSection />
58
+          </div>
59
         </div>
59
         </div>
60
       </div>
60
       </div>
61
     </section>
61
     </section>

+ 73
- 7
src/components/timeshare/buy/weekListComponent.vue View File

18
           </tr>
18
           </tr>
19
         </thead>
19
         </thead>
20
         <tbody>
20
         <tbody>
21
-          <tr v-for="(item, i) in filteredWeeks" :key="i">
21
+          <tr v-for="(item, i) in DisplayItems" :key="i">
22
             <td>#{{ item.id }}</td>
22
             <td>#{{ item.id }}</td>
23
             <td>{{ item.unitNumber }}</td>
23
             <td>{{ item.unitNumber }}</td>
24
             <td>{{ item.weekNumber }}</td>
24
             <td>{{ item.weekNumber }}</td>
49
           </tr>
49
           </tr>
50
         </tbody>
50
         </tbody>
51
       </table>
51
       </table>
52
+      <div class="row">
53
+        <div class="col-md-2">
54
+          Items Per Page:
55
+          <select
56
+            class="form-control"
57
+            v-model="visibleItemsPerPageCount"
58
+            @change="onChangeItemsPerPage()"
59
+          >
60
+            <option v-for="(item, i) in visibleItemSelector" :key="i">{{ item }}</option>
61
+          </select>
62
+        </div>
63
+        <div class="col-md-10 mt-4">
64
+          <div style="float:right">
65
+            <BasePagination
66
+              :currentPage="currentPage"
67
+              :pageCount="PageCount"
68
+              @nextPage="pageChangeHandle('next')"
69
+              @previousPage="pageChangeHandle('previous')"
70
+              @loadPage="pageChangeHandle"
71
+            />
72
+          </div>
73
+        </div>
74
+      </div>
52
     </div>
75
     </div>
53
     <div v-else>
76
     <div v-else>
54
       <div class="row">
77
       <div class="row">
73
 
96
 
74
 <script>
97
 <script>
75
 /* eslint-disable */
98
 /* eslint-disable */
76
-
99
+import BasePagination from "../../shared/basePagination";
77
 import { mapState, mapActions, mapGetters } from "vuex";
100
 import { mapState, mapActions, mapGetters } from "vuex";
78
 
101
 
79
 export default {
102
 export default {
80
   props: {
103
   props: {
81
     resortCode: undefined,
104
     resortCode: undefined,
82
     userId: undefined,
105
     userId: undefined,
106
+    currentPage: {
107
+      default: 1
108
+    }
109
+  },
110
+  data() {
111
+    return {
112
+      visibleItemsPerPageCount: 8,
113
+      visibleItemSelector: [5, 8, 10, 20, 50, 100]
114
+    };
115
+  },
116
+  components: {
117
+    BasePagination
83
   },
118
   },
84
-  components: {},
85
   computed: {
119
   computed: {
86
     ...mapState("weekList", ["weeks", "status"]),
120
     ...mapState("weekList", ["weeks", "status"]),
87
     ...mapGetters({
121
     ...mapGetters({
88
       filteredWeeks: "weekList/filteredWeeks",
122
       filteredWeeks: "weekList/filteredWeeks",
89
-      getRegions: "weekList/getRegions",
123
+      getRegions: "weekList/getRegions"
90
     }),
124
     }),
125
+    DisplayItems() {
126
+      const list = this.filteredWeeks;
127
+      const startSlice = (this.currentPage - 1) * this.visibleItemsPerPageCount;
128
+      let endSlice = this.currentPage * this.visibleItemsPerPageCount;
129
+      if (endSlice > list.length) {
130
+        endSlice = list.length;
131
+      }
132
+      return list.slice(startSlice, endSlice);
133
+    },
134
+    PageCount() {
135
+      return this.visibleItemsPerPageCount !== 0
136
+        ? Math.ceil(this.filteredWeeks.length / this.visibleItemsPerPageCount)
137
+        : 1;
138
+    }
91
   },
139
   },
92
   mounted() {
140
   mounted() {
93
     if (this.resortCode) {
141
     if (this.resortCode) {
94
       this.applyResortFilter(this.resortCode);
142
       this.applyResortFilter(this.resortCode);
95
     }
143
     }
96
-    this.getWeeks();
144
+    this.getByResortCode(this.$route.params.resortCode);
145
+    //this.getWeeks();
97
   },
146
   },
98
   methods: {
147
   methods: {
148
+    ...mapActions("weekList", ["getWeeks", "applyResortFilter", "getByResortCode"]),
99
     View(item) {
149
     View(item) {
100
       this.$router.push(`/resort/${item.resort.resortCode}/${item.unitNumber}`);
150
       this.$router.push(`/resort/${item.resort.resortCode}/${item.unitNumber}`);
101
     },
151
     },
102
-    ...mapActions("weekList", ["getWeeks", "applyResortFilter"]),
103
-  },
152
+    onChangeItemsPerPage() {
153
+      if (this.currentPage !== 1) {
154
+        this.currentPage = 1;
155
+      }
156
+    },
157
+    async pageChangeHandle(value) {
158
+      switch (value) {
159
+        case "next":
160
+          this.currentPage += 1;
161
+          break;
162
+        case "previous":
163
+          this.currentPage -= 1;
164
+          break;
165
+        default:
166
+          this.currentPage = value;
167
+      }
168
+    }
169
+  }
104
 };
170
 };
105
 </script>
171
 </script>
106
 
172
 

+ 7
- 6
src/components/timeshare/resort/contentSection.vue View File

17
         </div>
17
         </div>
18
         <div class="col-md-9 p-5 resort-profile">
18
         <div class="col-md-9 p-5 resort-profile">
19
           <h2>{{ resort.prName }}</h2>
19
           <h2>{{ resort.prName }}</h2>
20
+          {{ resort }}
20
           <WeekList :resortCode="resortCode" />
21
           <WeekList :resortCode="resortCode" />
21
           <p>{{ resort.prNotes }}</p>
22
           <p>{{ resort.prNotes }}</p>
22
           <div class="d-flex mt-3">
23
           <div class="d-flex mt-3">
54
 
55
 
55
 export default {
56
 export default {
56
   props: {
57
   props: {
57
-    resortCode: {},
58
+    resortCode: {}
58
   },
59
   },
59
   components: {
60
   components: {
60
     WeekList,
61
     WeekList,
61
     FilterComponent,
62
     FilterComponent,
62
     ResortImages,
63
     ResortImages,
63
-    gallerySection,
64
+    gallerySection
64
   },
65
   },
65
   // async mounted() {
66
   // async mounted() {
66
   //   await this.initResort(this.resortCode);
67
   //   await this.initResort(this.resortCode);
69
   data() {
70
   data() {
70
     return {
71
     return {
71
       index: null,
72
       index: null,
72
-      boolLoaded: false,
73
+      boolLoaded: false
73
     };
74
     };
74
   },
75
   },
75
   computed: {
76
   computed: {
80
       return this.resort
81
       return this.resort
81
         ? `http://maps.google.com/maps?q=${this.resort.prLatitude},${this.resort.prLongitude}&z=15&output=embed`
82
         ? `http://maps.google.com/maps?q=${this.resort.prLatitude},${this.resort.prLongitude}&z=15&output=embed`
82
         : "";
83
         : "";
83
-    },
84
+    }
84
   },
85
   },
85
   methods: {
86
   methods: {
86
     ...mapActions("resort", ["GetResortData"]),
87
     ...mapActions("resort", ["GetResortData"]),
87
     routerGoTo(goto) {
88
     routerGoTo(goto) {
88
       this.$router.push(goto);
89
       this.$router.push(goto);
89
-    },
90
-  },
90
+    }
91
+  }
91
 };
92
 };
92
 </script>
93
 </script>
93
 
94
 

+ 25
- 34
src/components/timeshare/resort/resortPageNew.vue View File

3
     <carouselSection v-if="!wait" :resortImages="resort.images" />
3
     <carouselSection v-if="!wait" :resortImages="resort.images" />
4
     <main id="main" style="margin-top:-20px;">
4
     <main id="main" style="margin-top:-20px;">
5
       <section>
5
       <section>
6
-        <div class="container wider">
6
+        <div class="container">
7
           <div class="row" id="resort-profile">
7
           <div class="row" id="resort-profile">
8
             <div class="col-md-3">
8
             <div class="col-md-3">
9
-              <img src="img/listings/property1/property1-gallery.jpg" class="img-fluid" alt />
10
-              <div class="row no-gutters">
11
-                <div class="col-6">
12
-                  <img src="img/listings/property1/property1-gallery.jpg" class="img-fluid" alt />
13
-                </div>
14
-                <div class="col-6">
15
-                  <img src="img/listings/property1/property1-gallery.jpg" class="img-fluid" alt />
16
-                </div>
17
-              </div>
18
               <gallerySection :images="resort.images" />
9
               <gallerySection :images="resort.images" />
19
               <FilterComponent :hideTop="true" />
10
               <FilterComponent :hideTop="true" />
20
             </div>
11
             </div>
21
-            <div class="col-md-9 resort-profile" style="margin-top:15px; margin-bottom:15px;">
12
+            <div class="col resort-profile" style="margin-top:15px; margin-bottom:15px;">
22
               <h2>{{ resort.prName }}</h2>
13
               <h2>{{ resort.prName }}</h2>
23
               <WeekList :resortCode="resortCode" />
14
               <WeekList :resortCode="resortCode" />
24
               <p v-if="resort.description && resort.description !== ''">{{ resort.description }}</p>
15
               <p v-if="resort.description && resort.description !== ''">{{ resort.description }}</p>
25
               <br v-if="resort.description && resort.description !== ''" />
16
               <br v-if="resort.description && resort.description !== ''" />
26
-              <p>{{ resort.prNotes }}</p>
27
               <div class="d-flex mt-3">
17
               <div class="d-flex mt-3">
28
                 <iframe
18
                 <iframe
29
                   width="100%"
19
                   width="100%"
30
                   height="200"
20
                   height="200"
31
                   id="gmap_canvas"
21
                   id="gmap_canvas"
32
                   :src="
22
                   :src="
33
-                'https://maps.google.com/maps?q=' +
34
-                  resort.prLatitude +
35
-                  ',' +
36
-                  resort.prLongitude +
37
-                  '&hl=en&z=14&amp;output=embed'
38
-              "
23
+                    'https://maps.google.com/maps?q=' +
24
+                      resort.prLatitude +
25
+                      ',' +
26
+                      resort.prLongitude +
27
+                      '&hl=en&z=14&amp;output=embed'
28
+                  "
39
                   frameborder="0"
29
                   frameborder="0"
40
                   scrolling="no"
30
                   scrolling="no"
41
                   marginheight="0"
31
                   marginheight="0"
44
               </div>
34
               </div>
45
             </div>
35
             </div>
46
           </div>
36
           </div>
37
+          <div class="row">
38
+            <div class="col">
39
+              <router-link style="float:right" class="btn-solid-blue mb-4" to="/timeshare/buy"
40
+                >BACK</router-link
41
+              >
42
+            </div>
43
+          </div>
47
         </div>
44
         </div>
48
       </section>
45
       </section>
49
     </main>
46
     </main>
66
     WeekList,
63
     WeekList,
67
     FilterComponent,
64
     FilterComponent,
68
     ResortImages,
65
     ResortImages,
69
-    gallerySection,
66
+    gallerySection
70
   },
67
   },
71
   data() {
68
   data() {
72
     return {
69
     return {
73
-      wait: false,
70
+      wait: true
74
     };
71
     };
75
   },
72
   },
76
   props: {
73
   props: {
77
-    resortCode: {},
74
+    resortCode: {}
78
   },
75
   },
79
   methods: {
76
   methods: {
80
     ...mapActions("resort", ["getResortData"]),
77
     ...mapActions("resort", ["getResortData"]),
81
     routerGoTo(goto) {
78
     routerGoTo(goto) {
82
       this.$router.push(goto);
79
       this.$router.push(goto);
83
-    },
80
+    }
84
   },
81
   },
85
   computed: {
82
   computed: {
86
-    ...mapState("resort", ["resort"]),
87
-  },
88
-  mounted() {
89
-    this.wait = true;
90
-    this.getResortData(this.resortCode).then((fulfilled) => {
91
-      this.wait = false;
92
-    });
93
-    // .then(() => {
94
-    //   setTimeout(() => (this.boolLoaded = true), 2000);
95
-    // });
83
+    ...mapState("resort", ["resort"])
96
   },
84
   },
85
+  created() {
86
+    this.getResortData(this.resortCode).then(() => (this.wait = false));
87
+  }
97
 };
88
 };
98
 </script>
89
 </script>
99
 
90
 
100
 <style lang="scss" scoped>
91
 <style lang="scss" scoped>
101
-.wider {
102
-  width: 1600px;
92
+.container {
93
+  max-width: 1400px;
103
 }
94
 }
104
 </style>
95
 </style>

+ 2
- 0
src/components/timeshare/sell/contentSection.vue View File

937
         this.saveWeek(this.sellItem).then(fulfilled => {
937
         this.saveWeek(this.sellItem).then(fulfilled => {
938
           this.paygateRedirect();
938
           this.paygateRedirect();
939
         });
939
         });
940
+      } else {
941
+        this.$router.push("/user/login");
940
       }
942
       }
941
     },
943
     },
942
     paygateRedirect() {
944
     paygateRedirect() {

+ 1
- 1
src/store/modules/timeshare/myWeeks.js View File

71
       await axios
71
       await axios
72
         .get(`/api/timeshareweek/${id}`)
72
         .get(`/api/timeshareweek/${id}`)
73
         .then(r => {
73
         .then(r => {
74
-          console.log(JSON.stringify(r));
74
+          //console.log(JSON.stringify(r));
75
           commit("setItem", r.data);
75
           commit("setItem", r.data);
76
         })
76
         })
77
         .catch(console.error);
77
         .catch(console.error);

+ 8
- 10
src/store/modules/timeshare/resort.js View File

136
         )
136
         )
137
         .then(result => commit("setResortMedia", result.data));
137
         .then(result => commit("setResortMedia", result.data));
138
     },
138
     },
139
-    getResortData({ commit }, resortCode) {
140
-      return new Promise((resolve, reject) => {
141
-        axios
142
-          .get(`/api/resort/GetResortData/${resortCode}`)
143
-          .then(result => {
144
-            commit("setResort", result.data);
145
-            resolve();
146
-          })
147
-          .catch(error => reject(new Error(error.message)));
148
-      });
139
+    async getResortData({ commit }, resortCode) {
140
+      await axios
141
+        .get(`/api/resort/GetResortData/${resortCode}`)
142
+        .then(result => {
143
+          console.log(result.data);
144
+          commit("setResort", result.data);
145
+        })
146
+        .catch(error => console.log(new Error(error.message)));
149
     }
147
     }
150
   }
148
   }
151
 };
149
 };

+ 12
- 3
src/store/modules/timeshare/weekList.js View File

2
 /* eslint-disable eqeqeq */
2
 /* eslint-disable eqeqeq */
3
 /* eslint-disable no-restricted-syntax */
3
 /* eslint-disable no-restricted-syntax */
4
 /* eslint-disable guard-for-in */
4
 /* eslint-disable guard-for-in */
5
+/* eslint-disable */
5
 import axios from "axios";
6
 import axios from "axios";
6
 import _, { min } from "lodash";
7
 import _, { min } from "lodash";
7
 
8
 
140
         resortCode
141
         resortCode
141
       });
142
       });
142
     },
143
     },
143
-    async getWeeks({ commit, rootGetters }) {
144
+    async getByResortCode({ commit }, resortCode) {
144
       commit("onLoading");
145
       commit("onLoading");
145
-      return axios
146
+      await axios.get("/api/timeshareweek/getByResortCode/" + resortCode).then(result => {
147
+        commit("setWeeks", result.data);
148
+        console.log(result);
149
+      });
150
+    },
151
+    async getWeeks({ commit, rootGetters }) {
152
+      //commit("onLoading");
153
+      await axios
146
         .get("/api/timeshareweek")
154
         .get("/api/timeshareweek")
147
         .then(result => {
155
         .then(result => {
148
           const arr2 = result.data.filter(x => x.region !== null);
156
           const arr2 = result.data.filter(x => x.region !== null);
157
+          console.log(arr2);
149
           const arr3 = result.data.filter(x => x.region === null);
158
           const arr3 = result.data.filter(x => x.region === null);
150
           for (const item in arr3) {
159
           for (const item in arr3) {
151
             const myItem = arr3[item];
160
             const myItem = arr3[item];
160
               };
169
               };
161
             }
170
             }
162
           }
171
           }
172
+          console.log(arr3);
163
           commit("setWeeks", arr2);
173
           commit("setWeeks", arr2);
164
-          return Promise.resolve(arr2);
165
         })
174
         })
166
         .catch(console.error);
175
         .catch(console.error);
167
     },
176
     },

Loading…
Cancel
Save