瀏覽代碼

Residential & Commercial Prop List

master
30117125 4 年之前
父節點
當前提交
b778ceed86

+ 5
- 0
package-lock.json 查看文件

12315
       "integrity": "sha512-TigfiZUs7SN3Z6uxKilqJUtYxte8vp0F4QxabCli6hkKPqU97JzAZc3P7AL6omkRAd2DMI26fOrIGjuALTvXww==",
12315
       "integrity": "sha512-TigfiZUs7SN3Z6uxKilqJUtYxte8vp0F4QxabCli6hkKPqU97JzAZc3P7AL6omkRAd2DMI26fOrIGjuALTvXww==",
12316
       "dev": true
12316
       "dev": true
12317
     },
12317
     },
12318
+    "vue-currency-input": {
12319
+      "version": "1.22.3",
12320
+      "resolved": "https://registry.npmjs.org/vue-currency-input/-/vue-currency-input-1.22.3.tgz",
12321
+      "integrity": "sha512-vrOaaiCSG8Hh7Fw7CYROIymFvVprWKaze3h67sihqJ4QAI9F+YElTQYv0fJwFK1NkKUS8H/MvAL0mwg9qrUfgg=="
12322
+    },
12318
     "vue-disable-autocomplete": {
12323
     "vue-disable-autocomplete": {
12319
       "version": "0.0.4",
12324
       "version": "0.0.4",
12320
       "resolved": "https://registry.npmjs.org/vue-disable-autocomplete/-/vue-disable-autocomplete-0.0.4.tgz",
12325
       "resolved": "https://registry.npmjs.org/vue-disable-autocomplete/-/vue-disable-autocomplete-0.0.4.tgz",

+ 1
- 0
package.json 查看文件

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

+ 6
- 32
src/components/misc/bondCaclculator.vue 查看文件

6
       type="text"
6
       type="text"
7
       class="form-control mb-2"
7
       class="form-control mb-2"
8
       name="income"
8
       name="income"
9
+      v-currency="{ currency: ['ZAR', null, { prefix: 'R' }][2] }"
9
       id="gross-income"
10
       id="gross-income"
10
       placeholder="Gross Monthly Household Income"
11
       placeholder="Gross Monthly Household Income"
11
       v-model="amount"
12
       v-model="amount"
12
-      @input="displayValue()"
13
     />
13
     />
14
     <input
14
     <input
15
       type="text"
15
       type="text"
16
       class="form-control mb-2"
16
       class="form-control mb-2"
17
       name="deposit"
17
       name="deposit"
18
+      v-currency="{ currency: ['ZAR', null, { prefix: 'R' }][2] }"
18
       id="deposit"
19
       id="deposit"
19
       placeholder="Deposit Amount – May be Required"
20
       placeholder="Deposit Amount – May be Required"
20
       v-model="deposit"
21
       v-model="deposit"
21
-      @input="displayDeposit()"
22
     />
22
     />
23
     <div class="slidecontainer mt-4">
23
     <div class="slidecontainer mt-4">
24
       <input type="range" min="5" max="30" value="10" class="slider" id="myRange" v-model="term" />
24
       <input type="range" min="5" max="30" value="10" class="slider" id="myRange" v-model="term" />
60
 export default {
60
 export default {
61
   data() {
61
   data() {
62
     return {
62
     return {
63
-      amount: "R1000000",
64
-      deposit: "R0",
63
+      amount: 1000000,
64
+      deposit: 0,
65
       term: 10,
65
       term: 10,
66
       rate: 7,
66
       rate: 7,
67
       isInputActive: false
67
       isInputActive: false
70
   props: ["value"],
70
   props: ["value"],
71
   methods: {
71
   methods: {
72
     calculate() {
72
     calculate() {
73
-      var rate = this.calcRate();
73
+      var rate = this.rate / 100 / 12;
74
       var years = this.term * 12;
74
       var years = this.term * 12;
75
       var topPart = rate * Math.pow(1 + rate, years);
75
       var topPart = rate * Math.pow(1 + rate, years);
76
       var bottomPart = Math.pow(1 + rate, years) - 1;
76
       var bottomPart = Math.pow(1 + rate, years) - 1;
77
       var netAmnt = this.amount - this.deposit;
77
       var netAmnt = this.amount - this.deposit;
78
       var bond = (netAmnt * topPart) / bottomPart;
78
       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
     }
79
     }
102
   },
80
   },
103
   computed: {
81
   computed: {
107
       var topPart = rate * Math.pow(1 + rate, years);
85
       var topPart = rate * Math.pow(1 + rate, years);
108
       var bottomPart = Math.pow(1 + rate, years) - 1;
86
       var bottomPart = Math.pow(1 + rate, years) - 1;
109
 
87
 
110
-      var netAmnt = parseFloat(this.amount.substring(1)) - parseFloat(this.deposit.substring(1));
88
+      var netAmnt = parseFloat(this.amount) - parseFloat(this.deposit);
111
       var bond = (netAmnt * topPart) / bottomPart;
89
       var bond = (netAmnt * topPart) / bottomPart;
112
       if (isNaN(bond)) {
90
       if (isNaN(bond)) {
113
         return 0;
91
         return 0;
115
         return bond;
93
         return bond;
116
       }
94
       }
117
     },
95
     },
118
-    calcRate() {
119
-      var answer = this.rate / 100 / 12;
120
-      return answer;
121
-    },
122
     grossIncome() {
96
     grossIncome() {
123
       return this.totalMonthlyPayment * 3.335120643;
97
       return this.totalMonthlyPayment * 3.335120643;
124
     }
98
     }

+ 1
- 1
src/components/property/ListProperty/contentSection.vue 查看文件

9
         <ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
9
         <ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
10
           <li class="nav-item">
10
           <li class="nav-item">
11
             <a
11
             <a
12
-              class="nav-link btn-solid-blue"
12
+              class="nav-link btn-solid-blue active"
13
               id="pills-residential-tab"
13
               id="pills-residential-tab"
14
               data-toggle="pill"
14
               data-toggle="pill"
15
               href="#pills-residential"
15
               href="#pills-residential"

+ 4
- 1
src/components/property/commercial/commercialSearchResults.vue 查看文件

17
               <div class="portfolio-item">
17
               <div class="portfolio-item">
18
                 <img style="width:255px; height:255px" :src="currentProperty.displayImage" alt />
18
                 <img style="width:255px; height:255px" :src="currentProperty.displayImage" alt />
19
                 <h4>{{ currentProperty.displayPrice }}</h4>
19
                 <h4>{{ currentProperty.displayPrice }}</h4>
20
-                <p>Address | 00m</p>
20
+                <p>
21
+                  {{ currentProperty.suburb }}, {{ currentProperty.city }} |
22
+                  {{ currentProperty.area }}M<sup>2</sup>
23
+                </p>
21
                 <p>{{ currentProperty.shortDescription }}</p>
24
                 <p>{{ currentProperty.shortDescription }}</p>
22
                 <br />
25
                 <br />
23
 
26
 

+ 160
- 26
src/components/property/commercial/createProperty/commercialCreateNew.vue 查看文件

84
                     >{{ salesType }} Price</label
84
                     >{{ salesType }} Price</label
85
                   >
85
                   >
86
                 </div>
86
                 </div>
87
-                <input
88
-                  class="form-control uniInput"
89
-                  type="number"
87
+                <currency-input
88
+                  onClick="this.setSelectionRange(0, this.value.length)"
90
                   name="price"
89
                   name="price"
91
-                  id="price"
90
+                  :value="value"
91
+                  @input="value = $event"
92
                   v-model="property.price"
92
                   v-model="property.price"
93
+                  id="price"
94
+                  class="form-control uniInput"
93
                 />
95
                 />
94
               </div>
96
               </div>
95
               <div v-if="salesType === 'Rental'" class="col-md-6">
97
               <div v-if="salesType === 'Rental'" class="col-md-6">
115
                 />
117
                 />
116
               </div>
118
               </div>
117
             </div>
119
             </div>
118
-            <div class="row">
120
+            <div class="row my-3">
121
+              <br />
122
+            </div>
123
+            <div class="row my-3">
124
+              <div class="col-md-12">
125
+                <div v-if="!property.streetNumber">
126
+                  <label for="streetNumber" class="uniSelectLabel">STREET NUMBER</label>
127
+                </div>
128
+                <input
129
+                  class="form-control uniInput"
130
+                  type="text"
131
+                  name="streetNumber"
132
+                  id="unit"
133
+                  v-model="property.streetNumber"
134
+                  disabled
135
+                />
136
+              </div>
137
+            </div>
138
+            <div class="row my-3">
139
+              <div class="col-md-12">
140
+                <div v-if="!property.streetName">
141
+                  <label for="streetName" class="uniSelectLabel">STREET NAME</label>
142
+                </div>
143
+                <input
144
+                  class="form-control uniInput"
145
+                  type="text"
146
+                  name="streetName"
147
+                  id="unit"
148
+                  v-model="property.streetName"
149
+                  disabled
150
+                />
151
+              </div>
152
+            </div>
153
+            <div class="row my-3">
154
+              <div class="col-md-12">
155
+                <div v-if="!property.suburb">
156
+                  <label for="suburb" class="uniSelectLabel">SUBURB</label>
157
+                </div>
158
+                <input
159
+                  class="form-control uniInput"
160
+                  type="text"
161
+                  name="suburb"
162
+                  id="unit"
163
+                  v-model="property.suburb"
164
+                  disabled
165
+                />
166
+              </div>
167
+            </div>
168
+            <div class="row my-3">
169
+              <div class="col-md-12">
170
+                <div v-if="!property.city">
171
+                  <label for="city" class="uniSelectLabel">CITY</label>
172
+                </div>
173
+                <input
174
+                  class="form-control uniInput"
175
+                  type="text"
176
+                  name="city"
177
+                  id="unit"
178
+                  v-model="property.city"
179
+                  disabled
180
+                />
181
+              </div>
182
+            </div>
183
+            <div class="row my-3">
184
+              <div class="col-md-12">
185
+                <div v-if="!property.province">
186
+                  <label for="province" class="uniSelectLabel">PROVINCE</label>
187
+                </div>
188
+                <input
189
+                  class="form-control uniInput"
190
+                  type="text"
191
+                  name="province"
192
+                  id="unit"
193
+                  v-model="property.province"
194
+                  disabled
195
+                />
196
+              </div>
197
+            </div>
198
+            <div class="row my-3">
119
               <div class="col-md-12">
199
               <div class="col-md-12">
120
-                <label for="Property Description" style="font-family:'muli'">Description:</label>
121
-                <vue-editor v-model="property.description" :editor-toolbar="customToolbar" />
122
-                <br />
123
-                <p>
124
-                  * A listing fee of R380 including VAT is payable to list your Property on the
125
-                  Uni-Vate website
126
-                </p>
200
+                <div v-if="!property.postalCode">
201
+                  <label for="postalCode" class="uniSelectLabel">POSTAL CODE</label>
202
+                </div>
203
+                <input
204
+                  class="form-control uniInput"
205
+                  type="text"
206
+                  name="postalCode"
207
+                  id="unit"
208
+                  v-model="property.postalCode"
209
+                  disabled
210
+                />
211
+              </div>
212
+            </div>
213
+            <div class="row my-3">
214
+              <div class="col-md-12">
215
+                <div v-if="!property.country">
216
+                  <label for="country" class="uniSelectLabel">COUNTRY</label>
217
+                </div>
218
+                <input
219
+                  class="form-control uniInput"
220
+                  type="text"
221
+                  name="country"
222
+                  id="unit"
223
+                  v-model="property.country"
224
+                  disabled
225
+                />
226
+              </div>
227
+            </div>
228
+            <div class="row my-3">
229
+              <div class="col-md-12">
230
+                <button type="button" @click="clearAddress()" class="btn-solid-blue">
231
+                  Clear Address
232
+                </button>
127
               </div>
233
               </div>
128
             </div>
234
             </div>
129
           </div>
235
           </div>
130
         </div>
236
         </div>
131
-        <div class="row" />
132
-
237
+        <div class="row">
238
+          <div class="col-md-12">
239
+            <label for="Property Description" style="font-family:'muli'">Description:</label>
240
+            <vue-editor v-model="property.description" :editor-toolbar="customToolbar" />
241
+            <br />
242
+            <p>
243
+              * A listing fee of R380 including VAT is payable to list your Property on the Uni-Vate
244
+              website
245
+            </p>
246
+          </div>
247
+        </div>
133
         <div class="section-header">
248
         <div class="section-header">
134
           <h2>Property Information</h2>
249
           <h2>Property Information</h2>
135
         </div>
250
         </div>
136
-        <div class="row mb-3" v-for="item in propertyFields" :key="item.id">
137
-          <div class="col-md-6" v-for="field in item.fields" :key="field.id">
138
-            <div v-if="field.type === 'number'">
139
-              {{ field.name }}
140
-              <input type="number" class="form-control uniInput" v-model="field.value" />
141
-            </div>
142
-            <div v-else class="display:none"></div>
143
-            <div v-if="field.type === 'yesno'">
144
-              {{ field.name }}
145
-              <input type="checkbox" v-model="field.value" />
146
-            </div>
251
+        <div v-for="item in propertyFields" :key="item.id">
252
+          <div v-if="item.name === 'Commercial Fields'">
253
+            <UserField
254
+              :fields="item.fields"
255
+              :id="item.name"
256
+              @UpdateUserDefinedFields="UpdateUserDefinedFields"
257
+              :fieldValues="item.fields"
258
+            />
147
           </div>
259
           </div>
148
         </div>
260
         </div>
149
         <div class="row">
261
         <div class="row">
319
         this.property.userId = this.user.id;
431
         this.property.userId = this.user.id;
320
       }
432
       }
321
 
433
 
434
+      this.property.propertyUserFields.forEach(item => {
435
+        if (item.value === true) {
436
+          item.value = "yes";
437
+        } else if (item.value === false) {
438
+          item.value = "no";
439
+        }
440
+      });
441
+
442
+      console.log(this.property);
443
+
322
       this.saveProperty(this.property)
444
       this.saveProperty(this.property)
323
         .then(fulfilled => {
445
         .then(fulfilled => {
324
-          this.$router.push(`/property/residential/property/${fulfilled.data.id}`);
446
+          this.$router.push(`/property/commercial/property/${fulfilled.data.id}`);
325
         })
447
         })
326
         .catch(error => {
448
         .catch(error => {
327
           console.log(error.message);
449
           console.log(error.message);
357
     },
479
     },
358
     UpdateDefaultImage(item) {
480
     UpdateDefaultImage(item) {
359
       this.defaultImage = item;
481
       this.defaultImage = item;
482
+    },
483
+    clearAddress() {
484
+      this.addressSet = false;
485
+      this.property.streetNumber = undefined;
486
+      this.property.streetName = undefined;
487
+      this.property.suburb = undefined;
488
+      this.property.city = undefined;
489
+      this.property.province = undefined;
490
+      this.property.country = undefined;
491
+      this.property.postalCode = undefined;
492
+      this.property.addressUrl = undefined;
493
+      this.property.propertCoords = undefined;
360
     }
494
     }
361
   },
495
   },
362
   mounted() {
496
   mounted() {

+ 8
- 2
src/components/property/commercial/singleView/contentSection.vue 查看文件

36
           <div class="panel-left p-5" style="margin-top:140px;">
36
           <div class="panel-left p-5" style="margin-top:140px;">
37
             <h2>Property Detial</h2>
37
             <h2>Property Detial</h2>
38
             <p v-if="property.showAddress">{{ property.streetNumber }} {{ property.streetName }}</p>
38
             <p v-if="property.showAddress">{{ property.streetNumber }} {{ property.streetName }}</p>
39
-            <p>{{ property.suburb }}, {{ property.city }}</p>
39
+            <p>{{ property.city }}, {{ property.suburb }}</p>
40
+            <div v-for="field in property.displayData[0].values" :key="field.id">
41
+              <p v-if="field.name === 'Floor Size'">{{ field.value }}M<sup>2</sup></p>
42
+              <p v-if="field.name === 'Rates & Taxes'">
43
+                Rates & Taxes: R{{ field.value | toCurrency }}
44
+              </p>
45
+            </div>
40
             <p>{{ property.shortDescription }}</p>
46
             <p>{{ property.shortDescription }}</p>
41
             <p>{{ property.price | toCurrency }}</p>
47
             <p>{{ property.price | toCurrency }}</p>
42
             <div class="btn-white-border"><i class="fa fa-search"></i>BOOK A VIEWING</div>
48
             <div class="btn-white-border"><i class="fa fa-search"></i>BOOK A VIEWING</div>
68
             </div>
74
             </div>
69
             {{ property.streetNumber }} {{ property.streetName }}
75
             {{ property.streetNumber }} {{ property.streetName }}
70
           </h2>
76
           </h2>
71
-          <h2>{{ property.propertyName }}</h2>
77
+          <h2 v-else>{{ property.propertyName }}</h2>
72
           <p>{{ property.shortDescription }}</p>
78
           <p>{{ property.shortDescription }}</p>
73
           <h4>Property Features</h4>
79
           <h4>Property Features</h4>
74
           <div v-for="(data, i) in property.displayData" :key="i" class="row my-3">
80
           <div v-for="(data, i) in property.displayData" :key="i" class="row my-3">

+ 9
- 14
src/components/property/mapSection.vue 查看文件

1
 <template>
1
 <template>
2
   <div>
2
   <div>
3
-    <gmap-autocomplete class="form-control mb-3 uniInput" @place_changed="setPlace">*</gmap-autocomplete>
3
+    <gmap-autocomplete class="form-control mb-3 uniInput" @place_changed="setPlace"
4
+      >*</gmap-autocomplete
5
+    >
4
     <GmapMap
6
     <GmapMap
5
       :center="mapCenter"
7
       :center="mapCenter"
6
       :zoom="mapZoom"
8
       :zoom="mapZoom"
18
 import { gmapApi } from "vue2-google-maps";
20
 import { gmapApi } from "vue2-google-maps";
19
 export default {
21
 export default {
20
   computed: {
22
   computed: {
21
-    google: gmapApi,
23
+    google: gmapApi
22
   },
24
   },
23
   data() {
25
   data() {
24
     return {
26
     return {
33
       country: "",
35
       country: "",
34
       postalCode: "",
36
       postalCode: "",
35
       url: "",
37
       url: "",
36
-      coords: {},
38
+      coords: {}
37
     };
39
     };
38
   },
40
   },
39
 
41
 
65
         if (place.address_components[i].types[0] === "locality") {
67
         if (place.address_components[i].types[0] === "locality") {
66
           this.city = place.address_components[i].long_name;
68
           this.city = place.address_components[i].long_name;
67
         }
69
         }
68
-        if (
69
-          place.address_components[i].types[0] === "administrative_area_level_1"
70
-        ) {
70
+        if (place.address_components[i].types[0] === "administrative_area_level_1") {
71
           this.province = place.address_components[i].long_name;
71
           this.province = place.address_components[i].long_name;
72
         }
72
         }
73
         if (place.address_components[i].types[0] === "country") {
73
         if (place.address_components[i].types[0] === "country") {
79
         this.url = place.url;
79
         this.url = place.url;
80
       }
80
       }
81
 
81
 
82
-      var coords =
83
-        place.geometry.viewport.Za.j + "," + place.geometry.viewport.Va.j;
84
-      this.coords = coords;
85
-
86
       this.$emit("map-location", {
82
       this.$emit("map-location", {
87
         streetNumber: this.streetNumber,
83
         streetNumber: this.streetNumber,
88
         streetName: this.streetName,
84
         streetName: this.streetName,
91
         province: this.province,
87
         province: this.province,
92
         country: this.country,
88
         country: this.country,
93
         postalCode: this.postalCode,
89
         postalCode: this.postalCode,
94
-        url: this.url,
95
-        coords: this.coords,
90
+        url: this.url
96
       });
91
       });
97
-    },
98
-  },
92
+    }
93
+  }
99
 };
94
 };
100
 </script>
95
 </script>
101
 
96
 

+ 11
- 3
src/components/property/propertyCard.vue 查看文件

3
     <div class="container-fluid">
3
     <div class="container-fluid">
4
       <div class="row">
4
       <div class="row">
5
         <div
5
         <div
6
-          class="col-lg-3 col-md-6 col-sm-6"
6
+          class="col-lg-3 col-md-6 col-sm-6 my-3"
7
           v-for="currentProperty in properties"
7
           v-for="currentProperty in properties"
8
           :key="currentProperty.id"
8
           :key="currentProperty.id"
9
         >
9
         >
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
                   <h3>{{ currentProperty.displayPrice }}</h3>
15
-                  <img :src="currentProperty.displayImage" alt="" />
15
+                  <img
16
+                    style="max-height:165px; object-fit: cover;"
17
+                    :src="currentProperty.displayImage"
18
+                    alt=""
19
+                  />
16
                 </div>
20
                 </div>
17
                 <h1>{{ currentProperty.suburb }}</h1>
21
                 <h1>{{ currentProperty.suburb }}</h1>
18
                 <p><strong>Property Reference</strong> #{{ currentProperty.id }}</p>
22
                 <p><strong>Property Reference</strong> #{{ currentProperty.id }}</p>
24
               <div class="portfolio-item p-4 wow fadeInUp justify-content-md-center">
28
               <div class="portfolio-item p-4 wow fadeInUp justify-content-md-center">
25
                 <div class="feature-top pt-3 mb-2">
29
                 <div class="feature-top pt-3 mb-2">
26
                   <h3>{{ currentProperty.displayPrice }}</h3>
30
                   <h3>{{ currentProperty.displayPrice }}</h3>
27
-                  <img :src="currentProperty.displayImage" alt="" />
31
+                  <img
32
+                    style="max-height:165px; object-fit: cover;"
33
+                    :src="currentProperty.displayImage"
34
+                    alt=""
35
+                  />
28
                 </div>
36
                 </div>
29
                 <h1>{{ currentProperty.suburb }}</h1>
37
                 <h1>{{ currentProperty.suburb }}</h1>
30
                 <p><strong>Property Reference</strong> #{{ currentProperty.id }}</p>
38
                 <p><strong>Property Reference</strong> #{{ currentProperty.id }}</p>

+ 20
- 10
src/components/property/propertyUserField.vue 查看文件

1
 <template>
1
 <template>
2
   <div class="row">
2
   <div class="row">
3
     <div class="col-md-4 mb-2" v-for="(currentField, i) in fields" :key="i">
3
     <div class="col-md-4 mb-2" v-for="(currentField, i) in fields" :key="i">
4
-      <div v-if="!setFields[i]">
5
-        <label class="uniSelectLabel">{{ currentField.name }}</label>
6
-      </div>
7
-
8
       <div class="input-group-prepend">
4
       <div class="input-group-prepend">
9
         <!-- <span class="input-group-text" style="color: #60CBEB">
5
         <!-- <span class="input-group-text" style="color: #60CBEB">
10
           <b>{{ GetFirstLetter(currentField.name) }}</b>
6
           <b>{{ GetFirstLetter(currentField.name) }}</b>
11
         </span> -->
7
         </span> -->
8
+        <div v-if="!setFields[i] && currentField.type !== 'yesno'">
9
+          <label class="uniSelectLabel">{{ currentField.name }}</label>
10
+        </div>
12
         <input
11
         <input
13
           v-if="currentField.type === 'number'"
12
           v-if="currentField.type === 'number'"
14
           class="form-control uniInput"
13
           class="form-control uniInput"
18
           v-model="setFields[i]"
17
           v-model="setFields[i]"
19
           @change="UpdateSetFields(currentField, i)"
18
           @change="UpdateSetFields(currentField, i)"
20
         />
19
         />
20
+
21
         <input
21
         <input
22
           v-if="currentField.type === 'text'"
22
           v-if="currentField.type === 'text'"
23
           class="form-control uniInput"
23
           class="form-control uniInput"
27
           v-model="setFields[i]"
27
           v-model="setFields[i]"
28
           @change="UpdateSetFields(currentField, i)"
28
           @change="UpdateSetFields(currentField, i)"
29
         />
29
         />
30
-        <select
30
+      </div>
31
+    </div>
32
+
33
+    <div class="col-md-4 mb-2" v-for="(currentField, i) in fields" :key="'checkField' + i">
34
+      <div class="input-group-prepend">
35
+        <!-- <span class="input-group-text" style="color: #60CBEB">
36
+          <b>{{ GetFirstLetter(currentField.name) }}</b>
37
+        </span> -->
38
+        <div v-if="currentField.type === 'yesno'">
39
+          <label class="uniSelectLabel">{{ currentField.name }}</label>
40
+        </div>
41
+
42
+        <input
31
           v-if="currentField.type === 'yesno'"
43
           v-if="currentField.type === 'yesno'"
32
-          class="form-control uniSelect"
44
+          type="checkbox"
33
           id="currentField.id"
45
           id="currentField.id"
46
+          style="margin-left:-5px; margin-top:10px"
34
           v-model="setFields[i]"
47
           v-model="setFields[i]"
35
           @change="UpdateSetFields(currentField, i)"
48
           @change="UpdateSetFields(currentField, i)"
36
-        >
37
-          <option value="yes">Yes</option>
38
-          <option value="no">No</option>
39
-        </select>
49
+        />
40
       </div>
50
       </div>
41
     </div>
51
     </div>
42
   </div>
52
   </div>

+ 39
- 41
src/components/property/residential/createProperty/residentialCreate.vue 查看文件

38
               @change="PropertyTypeSelected"
38
               @change="PropertyTypeSelected"
39
             >
39
             >
40
               <option value="0">Please select type *</option>
40
               <option value="0">Please select type *</option>
41
-              <option
42
-                v-for="item in propertyTypes"
43
-                :value="item.id"
44
-                :key="item.id"
45
-              >{{ item.description }}</option>
41
+              <option v-for="item in propertyTypes" :value="item.id" :key="item.id">{{
42
+                item.description
43
+              }}</option>
46
             </select>
44
             </select>
47
           </div>
45
           </div>
48
           <div v-if="propertyType === 'Commercial'" class="col-md-2">
46
           <div v-if="propertyType === 'Commercial'" class="col-md-2">
76
                     for="price"
74
                     for="price"
77
                     class="uniSelectLabel"
75
                     class="uniSelectLabel"
78
                     style="text-transform:uppercase; margin-left:17px; background-color:white"
76
                     style="text-transform:uppercase; margin-left:17px; background-color:white"
79
-                  >{{ salesType }} Price</label>
77
+                    >{{ salesType }} Price</label
78
+                  >
80
                 </div>
79
                 </div>
81
                 <input
80
                 <input
82
                   class="form-control uniInput"
81
                   class="form-control uniInput"
219
             </div>
218
             </div>
220
             <div class="row my-3">
219
             <div class="row my-3">
221
               <div class="col-md-12">
220
               <div class="col-md-12">
222
-                <button type="button" @click="clearAddress()" class="btn-solid-blue">Clear Address</button>
221
+                <button type="button" @click="clearAddress()" class="btn-solid-blue">
222
+                  Clear Address
223
+                </button>
223
               </div>
224
               </div>
224
             </div>
225
             </div>
225
           </div>
226
           </div>
230
             <vue-editor v-model="property.description" :editor-toolbar="customToolbar" />
231
             <vue-editor v-model="property.description" :editor-toolbar="customToolbar" />
231
             <br />
232
             <br />
232
             <p>
233
             <p>
233
-              * A listing fee of R380 including VAT is payable to list your Property on the
234
-              Uni-Vate website
234
+              * A listing fee of R380 including VAT is payable to list your Property on the Uni-Vate
235
+              website
235
             </p>
236
             </p>
236
           </div>
237
           </div>
237
         </div>
238
         </div>
315
           :savedImages="propertyImages"
316
           :savedImages="propertyImages"
316
           @DefaultImage="UpdateDefaultImage"
317
           @DefaultImage="UpdateDefaultImage"
317
         />
318
         />
318
-        <button v-if="!wait" type="button" @click="SubmitData()" class="btn-solid-blue">Save</button>
319
+        <button v-if="!wait" type="button" @click="SubmitData()" class="btn-solid-blue">
320
+          Save
321
+        </button>
319
         <div v-if="showPropertyTypeError">
322
         <div v-if="showPropertyTypeError">
320
-          <p class="alert myError">Missing fields. Please fill in all required fields. Marked with *</p>
323
+          <p class="alert myError">
324
+            Missing fields. Please fill in all required fields. Marked with *
325
+          </p>
321
         </div>
326
         </div>
322
         <div v-if="wait" id="preloader"></div>
327
         <div v-if="wait" id="preloader"></div>
323
       </div>
328
       </div>
342
     ImageLoad,
347
     ImageLoad,
343
     VueEditor,
348
     VueEditor,
344
     carouselSection,
349
     carouselSection,
345
-    mapSection,
350
+    mapSection
346
   },
351
   },
347
   data() {
352
   data() {
348
     return {
353
     return {
355
       customToolbar: [
360
       customToolbar: [
356
         [{ header: [false, 1, 2, 3, 4, 5, 6] }],
361
         [{ header: [false, 1, 2, 3, 4, 5, 6] }],
357
         ["bold", "italic", "underline", "strike"],
362
         ["bold", "italic", "underline", "strike"],
358
-        [
359
-          { align: "" },
360
-          { align: "center" },
361
-          { align: "right" },
362
-          { align: "justify" },
363
-        ],
363
+        [{ align: "" }, { align: "center" }, { align: "right" }, { align: "justify" }],
364
         [{ list: "ordered" }, { list: "bullet" }, { list: "check" }],
364
         [{ list: "ordered" }, { list: "bullet" }, { list: "check" }],
365
         [{ script: "sub" }, { script: "super" }],
365
         [{ script: "sub" }, { script: "super" }],
366
-        [{ indent: "-1" }, { indent: "+1" }],
366
+        [{ indent: "-1" }, { indent: "+1" }]
367
       ],
367
       ],
368
       error: "",
368
       error: "",
369
       addressSet: false,
369
       addressSet: false,
370
       showPropertyTypeError: false,
370
       showPropertyTypeError: false,
371
       showDateError: false,
371
       showDateError: false,
372
       user: Log.getUser(),
372
       user: Log.getUser(),
373
-      mayEdit: Log.isLoggedIn(),
373
+      mayEdit: Log.isLoggedIn()
374
     };
374
     };
375
   },
375
   },
376
   methods: {
376
   methods: {
385
       "getPropertyEditDisplay",
385
       "getPropertyEditDisplay",
386
       "getPropertySavedOverviewFields",
386
       "getPropertySavedOverviewFields",
387
       "getPropertySavedFields",
387
       "getPropertySavedFields",
388
-      "getSavedPropertyData",
388
+      "getSavedPropertyData"
389
     ]),
389
     ]),
390
     updateLocation(place) {
390
     updateLocation(place) {
391
       this.addressSet = true;
391
       this.addressSet = true;
407
         this.showPropertyTypeError = true;
407
         this.showPropertyTypeError = true;
408
       }
408
       }
409
 
409
 
410
-      if (
411
-        this.salesType === "Rental" &&
412
-        this.property.dateAvailable === "undef"
413
-      ) {
410
+      if (this.salesType === "Rental" && this.property.dateAvailable === "undef") {
414
         this.showDateError = true;
411
         this.showDateError = true;
415
       }
412
       }
416
 
413
 
434
         }
431
         }
435
         this.property.propertyImages.push({
432
         this.property.propertyImages.push({
436
           image: this.images[i],
433
           image: this.images[i],
437
-          isDefault: setAsDefault,
434
+          isDefault: setAsDefault
438
         });
435
         });
439
       }
436
       }
440
       this.property.propertyUserFields = this.propertyFieldValues;
437
       this.property.propertyUserFields = this.propertyFieldValues;
442
       if (this.user) {
439
       if (this.user) {
443
         this.property.userId = this.user.id;
440
         this.property.userId = this.user.id;
444
       }
441
       }
442
+      console.log(this.propertyFieldValues);
445
 
443
 
446
-      this.saveProperty(this.property)
447
-        .then((fulfilled) => {
448
-          this.$router.push(
449
-            `/property/residential/property/${fulfilled.data.id}`
450
-          );
451
-        })
452
-        .catch((error) => {
453
-          console.log(error.message);
454
-        });
444
+      // this.saveProperty(this.property)
445
+      //   .then((fulfilled) => {
446
+      //     this.$router.push(
447
+      //       `/property/residential/property/${fulfilled.data.id}`
448
+      //     );
449
+      //   })
450
+      //   .catch((error) => {
451
+      //     console.log(error.message);
452
+      //   });
455
     },
453
     },
456
     Close() {
454
     Close() {
457
       this.$router.push("/property/admin/list/my");
455
       this.$router.push("/property/admin/list/my");
471
     },
469
     },
472
     UpdateUserDefinedFields(item) {
470
     UpdateUserDefinedFields(item) {
473
       let update = false;
471
       let update = false;
474
-      this.propertyFieldValues.forEach((element) => {
472
+      this.propertyFieldValues.forEach(element => {
475
         if (element.userDefinedFieldId === item.userDefinedFieldId) {
473
         if (element.userDefinedFieldId === item.userDefinedFieldId) {
476
           element.value = item.value;
474
           element.value = item.value;
477
           update = true;
475
           update = true;
495
       this.property.postalCode = undefined;
493
       this.property.postalCode = undefined;
496
       this.property.addressUrl = undefined;
494
       this.property.addressUrl = undefined;
497
       this.property.propertCoords = undefined;
495
       this.property.propertCoords = undefined;
498
-    },
496
+    }
499
   },
497
   },
500
   mounted() {
498
   mounted() {
501
     this.wait = false;
499
     this.wait = false;
530
       "propertyOverviewFields",
528
       "propertyOverviewFields",
531
       "propertyFields",
529
       "propertyFields",
532
       "property",
530
       "property",
533
-      "propertyImages",
531
+      "propertyImages"
534
     ]),
532
     ]),
535
     ...mapState("authentication", ["user"]),
533
     ...mapState("authentication", ["user"]),
536
     SalesTypeChanged() {
534
     SalesTypeChanged() {
550
       this.getPropertyTypes(this.propertyType);
548
       this.getPropertyTypes(this.propertyType);
551
 
549
 
552
       return this.propertyType;
550
       return this.propertyType;
553
-    },
551
+    }
554
   },
552
   },
555
   watch: {
553
   watch: {
556
     SalesTypeChanged() {
554
     SalesTypeChanged() {
557
       return null;
555
       return null;
558
-    },
559
-  },
556
+    }
557
+  }
560
 };
558
 };
561
 </script>
559
 </script>
562
 
560
 

+ 163
- 41
src/components/property/residential/createProperty/residentialCreateNew.vue 查看文件

84
                     >{{ salesType }} Price</label
84
                     >{{ salesType }} Price</label
85
                   >
85
                   >
86
                 </div>
86
                 </div>
87
-                <input
88
-                  class="form-control uniInput"
89
-                  type="number"
87
+                <currency-input
88
+                  onClick="this.setSelectionRange(0, this.value.length)"
90
                   name="price"
89
                   name="price"
91
-                  id="price"
90
+                  :value="value"
91
+                  @input="value = $event"
92
                   v-model="property.price"
92
                   v-model="property.price"
93
+                  id="price"
94
+                  class="form-control uniInput"
93
                 />
95
                 />
94
               </div>
96
               </div>
95
               <div v-if="salesType === 'Rental'" class="col-md-6">
97
               <div v-if="salesType === 'Rental'" class="col-md-6">
115
                 />
117
                 />
116
               </div>
118
               </div>
117
             </div>
119
             </div>
118
-            <div class="row">
120
+            <div class="row my-3">
121
+              <br />
122
+            </div>
123
+            <div class="row my-3">
124
+              <div class="col-md-12">
125
+                <div v-if="!property.streetNumber">
126
+                  <label for="streetNumber" class="uniSelectLabel">STREET NUMBER</label>
127
+                </div>
128
+                <input
129
+                  class="form-control uniInput"
130
+                  type="text"
131
+                  name="streetNumber"
132
+                  id="unit"
133
+                  v-model="property.streetNumber"
134
+                  disabled
135
+                />
136
+              </div>
137
+            </div>
138
+            <div class="row my-3">
139
+              <div class="col-md-12">
140
+                <div v-if="!property.streetName">
141
+                  <label for="streetName" class="uniSelectLabel">STREET NAME</label>
142
+                </div>
143
+                <input
144
+                  class="form-control uniInput"
145
+                  type="text"
146
+                  name="streetName"
147
+                  id="unit"
148
+                  v-model="property.streetName"
149
+                  disabled
150
+                />
151
+              </div>
152
+            </div>
153
+            <div class="row my-3">
154
+              <div class="col-md-12">
155
+                <div v-if="!property.suburb">
156
+                  <label for="suburb" class="uniSelectLabel">SUBURB</label>
157
+                </div>
158
+                <input
159
+                  class="form-control uniInput"
160
+                  type="text"
161
+                  name="suburb"
162
+                  id="unit"
163
+                  v-model="property.suburb"
164
+                  disabled
165
+                />
166
+              </div>
167
+            </div>
168
+            <div class="row my-3">
169
+              <div class="col-md-12">
170
+                <div v-if="!property.city">
171
+                  <label for="city" class="uniSelectLabel">CITY</label>
172
+                </div>
173
+                <input
174
+                  class="form-control uniInput"
175
+                  type="text"
176
+                  name="city"
177
+                  id="unit"
178
+                  v-model="property.city"
179
+                  disabled
180
+                />
181
+              </div>
182
+            </div>
183
+            <div class="row my-3">
184
+              <div class="col-md-12">
185
+                <div v-if="!property.province">
186
+                  <label for="province" class="uniSelectLabel">PROVINCE</label>
187
+                </div>
188
+                <input
189
+                  class="form-control uniInput"
190
+                  type="text"
191
+                  name="province"
192
+                  id="unit"
193
+                  v-model="property.province"
194
+                  disabled
195
+                />
196
+              </div>
197
+            </div>
198
+            <div class="row my-3">
199
+              <div class="col-md-12">
200
+                <div v-if="!property.postalCode">
201
+                  <label for="postalCode" class="uniSelectLabel">POSTAL CODE</label>
202
+                </div>
203
+                <input
204
+                  class="form-control uniInput"
205
+                  type="text"
206
+                  name="postalCode"
207
+                  id="unit"
208
+                  v-model="property.postalCode"
209
+                  disabled
210
+                />
211
+              </div>
212
+            </div>
213
+            <div class="row my-3">
119
               <div class="col-md-12">
214
               <div class="col-md-12">
120
-                <label for="Property Description" style="font-family:'muli'">Description:</label>
121
-                <vue-editor v-model="property.description" :editor-toolbar="customToolbar" />
122
-                <br />
123
-                <p>
124
-                  * A listing fee of R380 including VAT is payable to list your Property on the
125
-                  Uni-Vate website
126
-                </p>
215
+                <div v-if="!property.country">
216
+                  <label for="country" class="uniSelectLabel">COUNTRY</label>
217
+                </div>
218
+                <input
219
+                  class="form-control uniInput"
220
+                  type="text"
221
+                  name="country"
222
+                  id="unit"
223
+                  v-model="property.country"
224
+                  disabled
225
+                />
226
+              </div>
227
+            </div>
228
+            <div class="row my-3">
229
+              <div class="col-md-12">
230
+                <button type="button" @click="clearAddress()" class="btn-solid-blue">
231
+                  Clear Address
232
+                </button>
127
               </div>
233
               </div>
128
             </div>
234
             </div>
129
           </div>
235
           </div>
130
         </div>
236
         </div>
131
-        <div class="row" />
237
+        <div class="row">
238
+          <div class="col-md-12">
239
+            <label for="Property Description" style="font-family:'muli'">Description:</label>
240
+            <vue-editor v-model="property.description" :editor-toolbar="customToolbar" />
241
+            <br />
242
+            <p>
243
+              * A listing fee of R380 including VAT is payable to list your Property on the Uni-Vate
244
+              website
245
+            </p>
246
+          </div>
247
+        </div>
132
 
248
 
133
         <div class="section-header">
249
         <div class="section-header">
134
           <h2>Property Information</h2>
250
           <h2>Property Information</h2>
135
         </div>
251
         </div>
136
 
252
 
137
-        <div class="row mb-3" v-for="item in propertyFields" :key="item.id">
138
-          <div class="col-md-6" v-for="field in item.fields" :key="field.id">
139
-            <div v-if="field.type === 'number'">
140
-              {{ field.name }}
141
-              <input type="number" class="form-control uniInput" v-model="field.value" />
142
-            </div>
143
-            <div v-else class="display:none"></div>
144
-            <div v-if="field.type === 'yesno'">
145
-              {{ field.name }}
146
-              <input type="checkbox" v-model="field.value" />
147
-            </div>
253
+        <div v-for="item in propertyFields" :key="item.id">
254
+          <div v-if="item.name === 'Residential Fields'">
255
+            <UserField
256
+              :fields="item.fields"
257
+              :id="item.name"
258
+              @UpdateUserDefinedFields="UpdateUserDefinedFields"
259
+              :fieldValues="item.fields"
260
+            />
148
           </div>
261
           </div>
149
         </div>
262
         </div>
150
         <!-- <UserField
263
         <!-- <UserField
339
           isDefault: setAsDefault
452
           isDefault: setAsDefault
340
         });
453
         });
341
       }
454
       }
342
-      this.property.propertyUserFields = this.propertyFields;
455
+      this.property.propertyUserFields = this.propertyFieldValues;
343
 
456
 
344
       if (this.user) {
457
       if (this.user) {
345
         this.property.userId = this.user.id;
458
         this.property.userId = this.user.id;
346
       }
459
       }
347
       this.property.propertyUserFields.forEach(item => {
460
       this.property.propertyUserFields.forEach(item => {
348
-        item.fields.forEach(field => {
349
-          if (field.type === "yesno") {
350
-            if (field.value) {
351
-              field.value = "yes";
352
-            } else {
353
-              field.value = "no";
354
-            }
355
-          }
356
-        });
461
+        if (item.value === true) {
462
+          item.value = "yes";
463
+        } else if (item.value === false) {
464
+          item.value = "no";
465
+        }
357
       });
466
       });
467
+      console.log(this.property);
358
 
468
 
359
-      this.saveProperty(this.property)
360
-        .then(fulfilled => {
361
-          this.$router.push(`/property/residential/property/${fulfilled.data.id}`);
362
-        })
363
-        .catch(error => {
364
-          console.log(error.message);
365
-        });
469
+      // this.saveProperty(this.property)
470
+      //   .then(fulfilled => {
471
+      //     this.$router.push(`/property/residential/property/${fulfilled.data.id}`);
472
+      //   })
473
+      //   .catch(error => {
474
+      //     console.log(error.message);
475
+      //   });
366
     },
476
     },
367
     Close() {
477
     Close() {
368
       this.$router.push("/property/admin/list/my");
478
       this.$router.push("/property/admin/list/my");
397
     UpdateDefaultImage(item) {
507
     UpdateDefaultImage(item) {
398
       this.defaultImage = item;
508
       this.defaultImage = item;
399
     },
509
     },
510
+    clearAddress() {
511
+      this.addressSet = false;
512
+      this.property.streetNumber = undefined;
513
+      this.property.streetName = undefined;
514
+      this.property.suburb = undefined;
515
+      this.property.city = undefined;
516
+      this.property.province = undefined;
517
+      this.property.country = undefined;
518
+      this.property.postalCode = undefined;
519
+      this.property.addressUrl = undefined;
520
+      this.property.propertCoords = undefined;
521
+    },
400
     userFieldsArrFunc(arr, len) {
522
     userFieldsArrFunc(arr, len) {
401
       const fields = [];
523
       const fields = [];
402
       const i = 0;
524
       const i = 0;

+ 10
- 36
src/components/property/residential/singleView/contentSection.vue 查看文件

36
             <p v-if="property.showAddress">{{ property.addressOther }}</p>
36
             <p v-if="property.showAddress">{{ property.addressOther }}</p>
37
             <p v-if="property.showAddress">{{ property.streetNumber }} {{ property.streetName }}</p>
37
             <p v-if="property.showAddress">{{ property.streetNumber }} {{ property.streetName }}</p>
38
             <p>{{ property.city }}, {{ property.suburb }}</p>
38
             <p>{{ property.city }}, {{ property.suburb }}</p>
39
-            <!-- <div v-for="(data, i) in property.displayData" :key="i">
40
-              {{ data }}
41
-            </div> -->
42
-            <p>
43
-              Bedrooms {{ property.displayData[1].values[0].value }}, Bathrooms
44
-              {{ property.displayData[1].values[1].value }}
45
-            </p>
46
-            <p>
47
-              Yard Size {{ property.displayData[0].values[1].value }}M<sup>2</sup>, Floor Size
48
-              {{ property.displayData[0].values[2].value }}M<sup>2</sup>
49
-            </p>
39
+            <div v-for="(data, i) in property.displayData" :key="i">
40
+              <div v-for="field in data.values" :key="field.id">
41
+                <p v-if="field.name === 'Floor Size'">{{ field.value }}M<sup>2</sup></p>
42
+                <p v-if="field.name === 'Bedrooms'">Bedrooms {{ field.value }}</p>
43
+                <p v-if="field.name === 'Bathrooms'">Bathrooms {{ field.value }}</p>
44
+              </div>
45
+            </div>
50
 
46
 
51
             <div class="btn-white-border"><i class="fa fa-search"></i>BOOK A VIEWING</div>
47
             <div class="btn-white-border"><i class="fa fa-search"></i>BOOK A VIEWING</div>
52
           </div>
48
           </div>
76
             {{ property.streetNumber }} {{ property.streetName }}
72
             {{ property.streetNumber }} {{ property.streetName }}
77
           </h2>
73
           </h2>
78
           <h2 v-else>{{ property.propertyName }}</h2>
74
           <h2 v-else>{{ property.propertyName }}</h2>
75
+
79
           <div class="container">
76
           <div class="container">
80
             <div class="row">
77
             <div class="row">
81
               <div class="col">
78
               <div class="col">
84
             </div>
81
             </div>
85
           </div>
82
           </div>
86
           <div>
83
           <div>
87
-            <!-- <table class="table table-striped">
88
-              <thead>
89
-                <tr>
90
-                  <th scope="col">Reference</th>
91
-                  <th scope="col">Size</th>
92
-                  <th scope="col">Rooms</th>
93
-                  <th scope="col">Bathrooms</th>
94
-                  <th scope="col">Garages</th>
95
-                  <th scope="col"></th>
96
-                </tr>
97
-              </thead>
98
-
99
-              <tbody>
100
-                <tr>
101
-                  <td>#{{ property.id }}</td>
102
-                  <td>{{ property.displayData[0].values[2].value }}M<sup>2</sup></td>
103
-                  <td>{{ property.displayData[1].values[0].value }}</td>
104
-                  <td>{{ property.displayData[1].values[1].value }}</td>
105
-                  <td>{{ property.displayData[2].values[0].value }}</td>
106
-                  <td><a href="#" class="btn-solid-blue">BOOK A VIEWING</a></td>
107
-                </tr>
108
-              </tbody>
109
-            </table>-->
110
             <h4>Property Features</h4>
84
             <h4>Property Features</h4>
111
             <div v-for="(data, i) in property.displayData" :key="i" class="row my-3">
85
             <div v-for="(data, i) in property.displayData" :key="i" class="row my-3">
112
               <div v-for="(field, j) in data.values" :key="j" class="col-md-6">
86
               <div v-for="(field, j) in data.values" :key="j" class="col-md-6">
165
     console.log(this.property.displayData);
139
     console.log(this.property.displayData);
166
   },
140
   },
167
   mounted() {
141
   mounted() {
168
-    var facebookShare = document.getElementById("fb_share");
169
-    facebookShare.href = "http://www.facebook.com/share.php?u=" + encodeURIComponent(location.href);
142
+    // var facebookShare = document.getElementById("fb_share");
143
+    // facebookShare.href = "http://www.facebook.com/share.php?u=" + encodeURIComponent(location.href);
170
   },
144
   },
171
   data() {
145
   data() {
172
     return {
146
     return {

+ 10
- 8
src/components/shared/navBar.vue 查看文件

40
               </div>
40
               </div>
41
               <nav id="nav-menu-container">
41
               <nav id="nav-menu-container">
42
                 <ul class="nav-menu sf-js-enabled sf-arrows">
42
                 <ul class="nav-menu sf-js-enabled sf-arrows">
43
-                  <li class="menu-has-children" style="margin-left:-20px">
44
-                    <div
43
+                  <li style="margin-left:-20px">
44
+                    <router-link to="/property/commercial">Commercial</router-link>
45
+                    <!-- <div
45
                       @mouseover="commercialClass = 'ts-display'"
46
                       @mouseover="commercialClass = 'ts-display'"
46
                       @mouseleave="commercialClass = 'no-display'"
47
                       @mouseleave="commercialClass = 'no-display'"
47
                     ></div>
48
                     ></div>
50
                     </a>
51
                     </a>
51
                     <ul style="margin-top:-10px; text-align:left" :class="commercialClass">
52
                     <ul style="margin-top:-10px; text-align:left" :class="commercialClass">
52
                       <li>
53
                       <li>
53
-                        <router-link to="/property/commercial">To Buy / To Rent</router-link>
54
+                        
54
                       </li>
55
                       </li>
55
                       <hr />
56
                       <hr />
56
                       <li>
57
                       <li>
61
                           >To Rent</a
62
                           >To Rent</a
62
                         >
63
                         >
63
                       </li>
64
                       </li>
64
-                    </ul>
65
+                    </ul> -->
65
                   </li>
66
                   </li>
66
-                  <li class="menu-has-children mx-1">
67
-                    <div
67
+                  <li class="mx-1">
68
+                    <router-link to="/property/residential">Residential</router-link>
69
+                    <!-- <div
68
                       @mouseover="residentialClass = 'ts-display'"
70
                       @mouseover="residentialClass = 'ts-display'"
69
                       @mouseleave="residentialClass = 'no-display'"
71
                       @mouseleave="residentialClass = 'no-display'"
70
                     ></div>
72
                     ></div>
86
                           >To Rent</a
88
                           >To Rent</a
87
                         >
89
                         >
88
                       </li>
90
                       </li>
89
-                    </ul>
91
+                    </ul> -->
90
                   </li>
92
                   </li>
91
                   <li class="menu-has-children mx-1">
93
                   <li class="menu-has-children mx-1">
92
                     <div
94
                     <div
187
                     </a>
189
                     </a>
188
                     <ul style="margin-top:-10px;text-align:left" :class="userClass">
190
                     <ul style="margin-top:-10px;text-align:left" :class="userClass">
189
                       <li>
191
                       <li>
190
-                        <router-link to="/property/list">List Property</router-link>
192
+                        <router-link to="/property/list">List My Property</router-link>
191
                       </li>
193
                       </li>
192
                       <li>
194
                       <li>
193
                         <router-link to="/status/list">Status</router-link>
195
                         <router-link to="/status/list">Status</router-link>

+ 7
- 1
src/main.js 查看文件

9
 import * as VueGoogleMaps from "vue2-google-maps";
9
 import * as VueGoogleMaps from "vue2-google-maps";
10
 import Vuetify from "vuetify";
10
 import Vuetify from "vuetify";
11
 import VueShareSocial from "vue-share-social";
11
 import VueShareSocial from "vue-share-social";
12
+import VueCurrencyInput from "vue-currency-input";
12
 
13
 
13
 Vue.use(VueShareSocial);
14
 Vue.use(VueShareSocial);
14
 Vue.use(EvaIcons);
15
 Vue.use(EvaIcons);
15
 Vue.use(Vuetify);
16
 Vue.use(Vuetify);
17
+
16
 Vue.use(VueGoogleMaps, {
18
 Vue.use(VueGoogleMaps, {
17
   load: {
19
   load: {
18
     key: "AIzaSyD8k_Kwml_C8IDfs-gX8JFV8acli3L9cAE",
20
     key: "AIzaSyD8k_Kwml_C8IDfs-gX8JFV8acli3L9cAE",
31
 axios.defaults.baseURL = "http://localhost:8080/";
33
 axios.defaults.baseURL = "http://localhost:8080/";
32
 
34
 
33
 Vue.prototype.$axios = axios;
35
 Vue.prototype.$axios = axios;
34
-
36
+const pluginOptions = {
37
+  /* see config reference */
38
+  globalOptions: { currency: ["ZAR", null, { prefix: "R" }][2] }
39
+};
40
+Vue.use(VueCurrencyInput, pluginOptions);
35
 Vue.prototype.$http = axios;
41
 Vue.prototype.$http = axios;
36
 const token = localStorage.getItem("token");
42
 const token = localStorage.getItem("token");
37
 if (token) {
43
 if (token) {

+ 1
- 1
src/store/modules/property/propertySearch.js 查看文件

105
             commit("updateSearch", result.data);
105
             commit("updateSearch", result.data);
106
             resolve();
106
             resolve();
107
           })
107
           })
108
-          .catch(errro => reject(new Error(error.message)));
108
+          .catch(error => reject(new Error(error.message)));
109
       });
109
       });
110
     },
110
     },
111
     searchLatestProperties({ commit }) {
111
     searchLatestProperties({ commit }) {

Loading…
取消
儲存