George Williams 4 yıl önce
ebeveyn
işleme
2f51cdcbb0

+ 5
- 0
package-lock.json Dosyayı Görüntüle

@@ -12315,6 +12315,11 @@
12315 12315
       "integrity": "sha512-TigfiZUs7SN3Z6uxKilqJUtYxte8vp0F4QxabCli6hkKPqU97JzAZc3P7AL6omkRAd2DMI26fOrIGjuALTvXww==",
12316 12316
       "dev": true
12317 12317
     },
12318
+    "vue-currency-input": {
12319
+      "version": "1.22.1",
12320
+      "resolved": "https://registry.npmjs.org/vue-currency-input/-/vue-currency-input-1.22.1.tgz",
12321
+      "integrity": "sha512-5cdMt5lHFx+YFeljAAp8r2gI5S6oykywER5xiFsryk4XSSklezdv+v4VnKCgWaYyZmQ69x0Qs5qqrxindoFjTg=="
12322
+    },
12318 12323
     "vue-disable-autocomplete": {
12319 12324
       "version": "0.0.4",
12320 12325
       "resolved": "https://registry.npmjs.org/vue-disable-autocomplete/-/vue-disable-autocomplete-0.0.4.tgz",

+ 1
- 0
package.json Dosyayı Görüntüle

@@ -28,6 +28,7 @@
28 28
     "v-file-upload": "^3.1.7",
29 29
     "vue": "^2.6.11",
30 30
     "vue-carousel": "^0.18.0",
31
+    "vue-currency-input": "^1.22.1",
31 32
     "vue-disable-autocomplete": "0.0.4",
32 33
     "vue-eva-icons": "^1.1.1",
33 34
     "vue-js-modal": "^1.3.33",

+ 1
- 0
public/css/newStyle.css Dosyayı Görüntüle

@@ -952,6 +952,7 @@ h4 {
952 952
 #contact {
953 953
   padding: 10px 0;
954 954
   background-color: #efefef;
955
+  scroll-behavior: smooth;
955 956
 }
956 957
 
957 958
 #contact p {

+ 5
- 2
src/components/home/carouselSection.vue Dosyayı Görüntüle

@@ -274,12 +274,15 @@ export default {
274 274
 /* Small devices (portrait tablets and large phones, 600px and up) */
275 275
 @media only screen and (min-width: 600px) {
276 276
   .introContentAdjust {
277
-    margin-top: -15px !important;
277
+    margin-top: 60px !important;
278 278
   }
279 279
 }
280 280
 
281 281
 /* Medium devices (landscape tablets, 768px and up) */
282 282
 @media only screen and (min-width: 768px) {
283
+  .introContentAdjust {
284
+    margin-top: 90px !important;
285
+  }
283 286
 }
284 287
 
285 288
 /* Large devices (laptops/desktops, 992px and up) */
@@ -292,7 +295,7 @@ export default {
292 295
 /* Extra large devices (large laptops and desktops, 1200px and up) */
293 296
 @media only screen and (min-width: 1200px) {
294 297
   .introContentAdjust {
295
-    margin-top: 0px !important;
298
+    margin-top: 80px !important;
296 299
   }
297 300
 }
298 301
 </style>

+ 14
- 46
src/components/misc/bondCaclculator.vue Dosyayı Görüntüle

@@ -2,31 +2,17 @@
2 2
   <div>
3 3
     <h2 id="modal-bondcal">Bond Calculator</h2>
4 4
     <p>Calculate the value of the property you could buy</p>
5
-    <input
6
-      type="text"
7
-      class="form-control mb-2"
8
-      name="income"
9
-      id="gross-income"
10
-      placeholder="Gross Monthly Household Income"
11
-      v-model="amount"
12
-      @input="displayValue()"
13
-    />
14
-    <input
15
-      type="text"
16
-      class="form-control mb-2"
17
-      name="deposit"
18
-      id="deposit"
19
-      placeholder="Deposit Amount – May be Required"
20
-      v-model="deposit"
21
-      @input="displayDeposit()"
22
-    />
5
+    <currency-input :value="amount" @input="amount = $event" class="form-control mb-2" />
6
+    <currency-input :value="deposit" @input="deposit = $event" class="form-control mb-2" />
23 7
     <div class="slidecontainer mt-4">
24 8
       <input type="range" min="5" max="30" value="10" class="slider" id="myRange" v-model="term" />
25 9
     </div>
26 10
     <p>{{ term }} Years</p>
11
+    <div class="percent uniSelectLabel" style="right:65px;"></div>
27 12
     <input
28
-      type="text"
13
+      type="number"
29 14
       class="form-control mb-2"
15
+      style="width:260px"
30 16
       name="interest"
31 17
       id="interest"
32 18
       placeholder="Interest Rate (Percent)"
@@ -60,8 +46,8 @@
60 46
 export default {
61 47
   data() {
62 48
     return {
63
-      amount: "R1000000",
64
-      deposit: "R0",
49
+      amount: 1000000,
50
+      deposit: 0,
65 51
       term: 10,
66 52
       rate: 7,
67 53
       isInputActive: false
@@ -70,34 +56,12 @@ export default {
70 56
   props: ["value"],
71 57
   methods: {
72 58
     calculate() {
73
-      var rate = this.calcRate();
59
+      var rate = this.rate / 100 / 12;
74 60
       var years = this.term * 12;
75 61
       var topPart = rate * Math.pow(1 + rate, years);
76 62
       var bottomPart = Math.pow(1 + rate, years) - 1;
77 63
       var netAmnt = this.amount - this.deposit;
78 64
       var bond = (netAmnt * topPart) / bottomPart;
79
-    },
80
-    calcRate() {
81
-      var answer = this.rate / 100 / 12;
82
-      return answer;
83
-    },
84
-    displayValue() {
85
-      const formatter = new Intl.NumberFormat("en-US", {
86
-        minimumFractionDigits: 2
87
-      });
88
-      if (this.amount.charAt(0) !== "R") {
89
-        this.amount = "R" + formatter.format(this.amount);
90
-        if (this.amount < 1) {
91
-          this.amount = "R" + 0;
92
-        }
93
-      }
94
-    },
95
-    displayDeposit() {
96
-      if (this.deposit.charAt(0) !== "R") {
97
-        if (this.deposit < 1) {
98
-          this.deposit = "R" + 0;
99
-        }
100
-      }
101 65
     }
102 66
   },
103 67
   computed: {
@@ -107,7 +71,7 @@ export default {
107 71
       var topPart = rate * Math.pow(1 + rate, years);
108 72
       var bottomPart = Math.pow(1 + rate, years) - 1;
109 73
 
110
-      var netAmnt = parseFloat(this.amount.substring(1)) - parseFloat(this.deposit.substring(1));
74
+      var netAmnt = parseFloat(this.amount) - parseFloat(this.deposit);
111 75
       var bond = (netAmnt * topPart) / bottomPart;
112 76
       if (isNaN(bond)) {
113 77
         return 0;
@@ -126,4 +90,8 @@ export default {
126 90
 };
127 91
 </script>
128 92
 
129
-<style lang="scss" scoped></style>
93
+<style lang="scss" scoped>
94
+.percent::after {
95
+  content: "%";
96
+}
97
+</style>

+ 3
- 1
src/components/propertyManagement/rentalManagement/contentSection.vue Dosyayı Görüntüle

@@ -19,7 +19,9 @@
19 19
       <div class="row">
20 20
         <div class="col-md-6"></div>
21 21
         <div class="col-md-6">
22
-          <h4>Contact us for a quote</h4>
22
+          <button @click="$vuetify.goTo('#contact', { duration: 2000, easing: 'easeInOutCubic' })">
23
+            <h4>Contact us for a quote</h4>
24
+          </button>
23 25
         </div>
24 26
       </div>
25 27
 

+ 14
- 2
src/components/propertyManagement/sectionalTitle/ourServicesSection.vue Dosyayı Görüntüle

@@ -18,7 +18,9 @@
18 18
       <div class="row mt-2">
19 19
         <div class="col-md-6"></div>
20 20
         <div class="col-md-6">
21
-          <h4>Contact us for a quote</h4>
21
+          <button @click="$vuetify.goTo('#contact', { duration: 2000, easing: 'easeInOutCubic' })">
22
+            <h4>Contact us for a quote</h4>
23
+          </button>
22 24
         </div>
23 25
       </div>
24 26
       <div class="row">
@@ -213,7 +215,17 @@
213 215
 </template>
214 216
 
215 217
 <script>
216
-export default {};
218
+/* eslint-disable */
219
+
220
+export default {
221
+  methods: {
222
+    scrollToAnchor() {
223
+      var element = document.getElementById("contact");
224
+      var top = element.offsetTop;
225
+      window.scrollTo(0, top, { easing: "ease-in-out" });
226
+    }
227
+  }
228
+};
217 229
 </script>
218 230
 
219 231
 <style lang="scss" scoped>

+ 1
- 0
src/components/shared/footerSection.vue Dosyayı Görüntüle

@@ -2,6 +2,7 @@
2 2
   <div>
3 3
     <section
4 4
       id="contact"
5
+      ref="contactFooter"
5 6
       data-aos="fade-up"
6 7
       data-aos-anchor-placement="top-bottom"
7 8
       data-aos-delay="150"

+ 25
- 5
src/components/shared/navBar.vue Dosyayı Görüntüle

@@ -79,10 +79,12 @@
79 79
                       </li>
80 80
                       <hr />
81 81
                       <li>
82
-                        <a @click="routerGoTo('/property/commercial/new/Sale')">To Sell</a>
82
+                        <a href="#" @click="routerGoTo('/property/commercial/new/Sale')">To Sell</a>
83 83
                       </li>
84 84
                       <li>
85
-                        <a @click="routerGoTo('/property/commercial/new/Rental')">To Rent</a>
85
+                        <a href="#" @click="routerGoTo('/property/commercial/new/Rental')"
86
+                          >To Rent</a
87
+                        >
86 88
                       </li>
87 89
                     </ul>
88 90
                   </li>
@@ -100,10 +102,14 @@
100 102
                       </li>
101 103
                       <hr />
102 104
                       <li>
103
-                        <a @click="routerGoTo('/property/residential/new/Sale')">To Sell</a>
105
+                        <a href="#" @click="routerGoTo('/property/residential/new/Sale')"
106
+                          >To Sell</a
107
+                        >
104 108
                       </li>
105 109
                       <li>
106
-                        <a @click="routerGoTo('/property/residential/new/Rental')">To Rent</a>
110
+                        <a href="#" @click="routerGoTo('/property/residential/new/Rental')"
111
+                          >To Rent</a
112
+                        >
107 113
                       </li>
108 114
                     </ul>
109 115
                   </li>
@@ -383,13 +389,27 @@ export default {
383 389
 
384 390
 /* Small devices (portrait tablets and large phones, 600px and up) */
385 391
 @media only screen and (min-width: 600px) {
392
+  .phoneIconDetail {
393
+    display: none;
394
+  }
395
+
396
+  .bondCalculatorDetail {
397
+    display: none;
398
+  }
386 399
   #header {
387
-    min-height: 145px;
400
+    min-height: 175px;
388 401
   }
389 402
 }
390 403
 
391 404
 /* Medium devices (landscape tablets, 768px and up) */
392 405
 @media only screen and (min-width: 768px) {
406
+  .phoneIconDetail {
407
+    display: initial;
408
+  }
409
+
410
+  .bondCalculatorDetail {
411
+    display: initial;
412
+  }
393 413
   #header {
394 414
     min-height: 120px;
395 415
   }

+ 79
- 74
src/components/timeshare/buy/carouselSection.vue Dosyayı Görüntüle

@@ -3,76 +3,81 @@
3 3
     <div class="container">
4 4
       <div class="row">
5 5
         <div align="left" class="col-sm-12 col-md-8">
6
-          <div class="intro-content box" style="margin-top:-5px">
7
-            <h2>Find your Timeshare</h2>
8
-            <p>
9
-              Please specify one or more details to view the available weeks and then select the
10
-              weeks that interest you on the resort page.
11
-            </p>
12
-            <div class="row">
13
-              <div class="form-group col-md-6">
14
-                <div class="input-group">
15
-                  <label v-if="!searchParams.region" class="uniSelectLabel" for="region">REGION</label>
16
-                  <select
17
-                    class="form-control uniSelect"
18
-                    name="region"
19
-                    id="region"
20
-                    v-model="searchParams.region"
21
-                    @change="regionChange"
22
-                  >
23
-                    <option v-for="(region, r) in regions" :key="r">{{ region.regionName }}</option>
24
-                  </select>
6
+          <div class="intro-content box" style="margin-top:55px">
7
+            <div style="margin-top:-30px">
8
+              <h2>Find your Timeshare</h2>
9
+              <p>
10
+                Please specify one or more details to view the available weeks and then select the
11
+                weeks that interest you on the resort page.
12
+              </p>
13
+              <div class="row">
14
+                <div class="form-group col-md-6">
15
+                  <div class="input-group">
16
+                    <label v-if="!searchParams.region" class="uniSelectLabel" for="region"
17
+                      >REGION</label
18
+                    >
19
+                    <select
20
+                      class="form-control uniSelect"
21
+                      name="region"
22
+                      id="region"
23
+                      v-model="searchParams.region"
24
+                      @change="regionChange"
25
+                    >
26
+                      <option v-for="(region, r) in regions" :key="r">{{
27
+                        region.regionName
28
+                      }}</option>
29
+                    </select>
30
+                  </div>
31
+                  <br />
32
+                  <label>DATE FROM</label>
33
+                  <input
34
+                    type="date"
35
+                    name="arrival-to"
36
+                    class="form-control my-1 uniSelect"
37
+                    id="arrival-to"
38
+                    placeholder="Date From"
39
+                    v-model="filter.date"
40
+                  />
25 41
                 </div>
26
-                <br />
27
-                <label>DATE FROM</label>
28
-                <input
29
-                  type="date"
30
-                  name="arrival-to"
31
-                  class="form-control my-1 uniSelect"
32
-                  id="arrival-to"
33
-                  placeholder="Date From"
34
-                  v-model="filter.date"
35
-                />
36
-              </div>
37
-              <div class="form-group col-md-6">
38
-                <div class="input-group">
39
-                  <label
40
-                    v-if="!searchParams.resort"
41
-                    class="uniSelectLabel"
42
-                    for="weekInfoResortSelect"
43
-                  >RESORT</label>
44
-                  <select
45
-                    id="weekInfoResortSelect"
46
-                    class="form-control uniSelect"
47
-                    v-model="searchParams.resort"
48
-                  >
49
-                    <option
50
-                      v-for="(resort, r) in filteredResort"
51
-                      :key="r"
52
-                      :value="resort"
53
-                      @change="resortChange"
42
+                <div class="form-group col-md-6">
43
+                  <div class="input-group">
44
+                    <label
45
+                      v-if="!searchParams.resort"
46
+                      class="uniSelectLabel"
47
+                      for="weekInfoResortSelect"
48
+                      >RESORT</label
49
+                    >
50
+                    <select
51
+                      id="weekInfoResortSelect"
52
+                      class="form-control uniSelect"
53
+                      v-model="searchParams.resort"
54 54
                     >
55
-                      {{
56
-                      resort.resortName
57
-                      }}
58
-                    </option>
59
-                  </select>
55
+                      <option
56
+                        v-for="(resort, r) in filteredResort"
57
+                        :key="r"
58
+                        :value="resort"
59
+                        @change="resortChange"
60
+                      >
61
+                        {{ resort.resortName }}
62
+                      </option>
63
+                    </select>
64
+                  </div>
65
+                  <br />
66
+                  <label>DATE TO</label>
67
+                  <input
68
+                    type="date"
69
+                    name="arrival-to"
70
+                    class="form-control my-1 uniSelect"
71
+                    id="arrival-to"
72
+                    placeholder="Date To"
73
+                    v-model="filter.ddate"
74
+                  />
60 75
                 </div>
61
-                <br />
62
-                <label>DATE TO</label>
63
-                <input
64
-                  type="date"
65
-                  name="arrival-to"
66
-                  class="form-control my-1 uniSelect"
67
-                  id="arrival-to"
68
-                  placeholder="Date To"
69
-                  v-model="filter.ddate"
70
-                />
71 76
               </div>
77
+              <button class="btn-solid-blue" @click="Search()">
78
+                <i class="fa fa-search"></i> SEARCH
79
+              </button>
72 80
             </div>
73
-            <button class="btn-solid-blue" @click="Search()">
74
-              <i class="fa fa-search"></i> SEARCH
75
-            </button>
76 81
           </div>
77 82
         </div>
78 83
       </div>
@@ -107,7 +112,7 @@ import carousel from "vue-owl-carousel";
107 112
 import { mapState, mapActions, mapGetters } from "vuex";
108 113
 export default {
109 114
   components: {
110
-    carousel,
115
+    carousel
111 116
   },
112 117
   data() {
113 118
     return {
@@ -116,17 +121,17 @@ export default {
116 121
       region: "",
117 122
       resort: "",
118 123
       priceMin: undefined,
119
-      priceMax: undefined,
124
+      priceMax: undefined
120 125
     };
121 126
   },
122 127
   methods: {
123 128
     ...mapActions("timeshare", ["initTimeshare", "onResortChange", "saveWeek"]),
124 129
     regionChange(item) {
125
-      let reg = this.regions.find((r) => r.regionName === item.target.value);
130
+      let reg = this.regions.find(r => r.regionName === item.target.value);
126 131
       this.regionObj = reg;
127 132
     },
128 133
     resortChange(item) {
129
-      let res = this.resorts.find((r) => r.resortName === item.target.value);
134
+      let res = this.resorts.find(r => r.resortName === item.target.value);
130 135
       this.resortObj = res;
131 136
     },
132 137
     Search() {
@@ -143,7 +148,7 @@ export default {
143 148
       }
144 149
 
145 150
       this.$router.push(`/resort/${this.searchParams.resort.resortCode}`);
146
-    },
151
+    }
147 152
   },
148 153
   computed: {
149 154
     ...mapState("timeshare", ["resorts", "regions", "detailedRegion"]),
@@ -152,7 +157,7 @@ export default {
152 157
       let list = [];
153 158
       if (this.searchParams.region && this.searchParams.region !== "") {
154 159
         const item = this.detailedRegion.find(
155
-          (region) => region.region.regionCode === this.regionObj.regionCode
160
+          region => region.region.regionCode === this.regionObj.regionCode
156 161
         );
157 162
         if (item) {
158 163
           list = item.children;
@@ -160,8 +165,8 @@ export default {
160 165
       } else {
161 166
         list = this.resorts;
162 167
       }
163
-      return _.sortBy(list, (x) => x.resortName);
164
-    },
168
+      return _.sortBy(list, x => x.resortName);
169
+    }
165 170
   },
166 171
   created() {
167 172
     this.initTimeshare(this.weekId);
@@ -171,7 +176,7 @@ export default {
171 176
     this.searchParams.resort = null;
172 177
     this.filter.date = null;
173 178
     this.filter.ddate = null;
174
-  },
179
+  }
175 180
 };
176 181
 </script>
177 182
 

+ 10
- 12
src/components/timeshare/buy/searchSection.vue Dosyayı Görüntüle

@@ -2,7 +2,7 @@
2 2
   <section>
3 3
     <div class="container pb-5">
4 4
       <div class="row" id="search">
5
-        <div class="col-md-4 panel-left p-5" style="margin-top:-20px">
5
+        <div class="col-md-4 panel-left p-5" style="margin-top:-25px;">
6 6
           <h2>Find Timeshare</h2>
7 7
 
8 8
           <div class="input-group">
@@ -29,11 +29,9 @@
29 29
               v-model="selectedResort"
30 30
               @change="resortEvent()"
31 31
             >
32
-              <option
33
-                v-for="(resort, i) in selectedRegion.resorts"
34
-                :key="i"
35
-                :value="resort"
36
-              >{{ resort.resortName }}</option>
32
+              <option v-for="(resort, i) in selectedRegion.resorts" :key="i" :value="resort">{{
33
+                resort.resortName
34
+              }}</option>
37 35
             </select>
38 36
           </div>
39 37
           <div v-else class="input-group my-1">
@@ -137,7 +135,7 @@ import Alert from "../../shared/alert.vue";
137 135
 export default {
138 136
   name: "TimeshareToBuy",
139 137
   components: {
140
-    Alert,
138
+    Alert
141 139
   },
142 140
   data() {
143 141
     return {
@@ -149,7 +147,7 @@ export default {
149 147
       bedrooms: null,
150 148
       maxPrice: null,
151 149
       dateFrom: "",
152
-      dateTo: "",
150
+      dateTo: ""
153 151
     };
154 152
   },
155 153
   mounted() {
@@ -163,8 +161,8 @@ export default {
163 161
       return `http://maps.google.com/maps?q=${this.myMap}&z=${this.myZoom}&output=embed`;
164 162
     },
165 163
     regions() {
166
-      return _.sortBy(this.detailedRegion, (r) => r.regionName);
167
-    },
164
+      return _.sortBy(this.detailedRegion, r => r.regionName);
165
+    }
168 166
   },
169 167
   methods: {
170 168
     ...mapActions("region", ["init", "getAvail", "getRegions", "getResort"]),
@@ -201,8 +199,8 @@ export default {
201 199
       if (this.selectedResort) {
202 200
         this.$router.push(`/resort/${this.selectedResort.resortCode}`);
203 201
       }
204
-    },
205
-  },
202
+    }
203
+  }
206 204
 };
207 205
 </script>
208 206
 

+ 9
- 1
src/main.js Dosyayı Görüntüle

@@ -7,8 +7,12 @@ import App from "./App.vue";
7 7
 import router from "./router";
8 8
 import store from "./store";
9 9
 import * as VueGoogleMaps from "vue2-google-maps";
10
+import Vuetify from "vuetify";
11
+import "vuetify/dist/vuetify.min.css";
12
+import VueCurrencyInput from "vue-currency-input";
10 13
 
11 14
 Vue.use(EvaIcons);
15
+Vue.use(Vuetify);
12 16
 Vue.use(VueGoogleMaps, {
13 17
   load: {
14 18
     key: "AIzaSyD8k_Kwml_C8IDfs-gX8JFV8acli3L9cAE",
@@ -21,6 +25,10 @@ Vue.use(VueGoogleMaps, {
21 25
     // v: '3.26',
22 26
   }
23 27
 });
28
+const pluginOptions = {
29
+  /* see config reference */
30
+  globalOptions: { currency: ["ZAR", null, { prefix: "R" }][2], locale: "en-us" }
31
+};
24 32
 Vue.config.productionTip = false;
25 33
 //axios.defaults.baseURL = "http://localhost:57260";
26 34
 axios.defaults.baseURL = "http://training.provision-sa.com:82";
@@ -33,7 +41,7 @@ const token = localStorage.getItem("token");
33 41
 if (token) {
34 42
   Vue.prototype.$http.defaults.headers.common.Authorization = token;
35 43
 }
36
-
44
+Vue.use(VueCurrencyInput, pluginOptions);
37 45
 router.beforeEach((to, from, next) => {
38 46
   if (to.matched.some(record => record.meta.requiresAuth)) {
39 47
     if (store.getters.isLoggedIn) {

+ 9
- 4
src/router/index.js Dosyayı Görüntüle

@@ -1,4 +1,5 @@
1 1
 /* eslint-disable import/prefer-default-export */
2
+/* eslint-disable */
2 3
 import Vue from "vue";
3 4
 import Router from "vue-router";
4 5
 
@@ -84,10 +85,14 @@ Vue.use(Router);
84 85
 export default new Router({
85 86
   // eslint-disable-next-line no-unused-vars
86 87
   scrollBehavior(to, from, savedPosition) {
87
-    return {
88
-      x: 0,
89
-      y: 0
90
-    };
88
+    if (to.hash) {
89
+      return { selector: to.hash };
90
+    } else {
91
+      return {
92
+        x: 0,
93
+        y: 0
94
+      };
95
+    }
91 96
   },
92 97
   routes: [
93 98
     {

Loading…
İptal
Kaydet