浏览代码

Mynie's feedback fixes

master
GJWilliams87 4 年前
父节点
当前提交
821b226a98

+ 98
- 40
src/components/property/commercial/createProperty/commercialCreateNew.vue 查看文件

@@ -1,12 +1,18 @@
1 1
 <template>
2 2
   <div>
3
-    <main id="main" style="margin-top:-20px">
3
+    <main id="main" style="margin-top: -20px">
4 4
       <div class="container pb-5">
5 5
         <div class="row">
6 6
           <div class="col">
7
-            <label v-if="!salesType" class="uniSelectLabel" for="saleType">Sale Type</label>
7
+            <label v-if="!salesType" class="uniSelectLabel" for="saleType"
8
+              >Sale Type</label
9
+            >
8 10
             <float-label label="Sale Type">
9
-              <select class="form-control uniSelect mb-3" name="saleType" v-model="salesType">
11
+              <select
12
+                class="form-control uniSelect mb-3"
13
+                name="saleType"
14
+                v-model="salesType"
15
+              >
10 16
                 <option value="Sale">To Sell</option>
11 17
                 <option value="Rental">To Rent</option>
12 18
               </select>
@@ -16,7 +22,9 @@
16 22
         <div class="row mt-2">
17 23
           <div class="col-md-6">
18 24
             <div v-if="!property.propertyName">
19
-              <label for="propertyName" class="uniSelectLabel">PROPERTY NAME</label>
25
+              <label for="propertyName" class="uniSelectLabel"
26
+                >PROPERTY NAME</label
27
+              >
20 28
             </div>
21 29
             <float-label label="PROPERTY NAME">
22 30
               <input
@@ -29,7 +37,9 @@
29 37
           </div>
30 38
           <div class="col-md-6">
31 39
             <div v-if="!property.propertyRef">
32
-              <label for="propertyName" class="uniSelectLabel">PROPERTY REFERENCE</label>
40
+              <label for="propertyName" class="uniSelectLabel"
41
+                >PROPERTY REFERENCE</label
42
+              >
33 43
             </div>
34 44
             <float-label label="PROPERTY REFERENCE">
35 45
               <input
@@ -51,7 +61,11 @@
51 61
               @change="PropertyTypeSelected"
52 62
             >
53 63
               <option value="0">Please select type *</option>
54
-              <option v-for="item in propertyTypes" :value="item.id" :key="item.id">
64
+              <option
65
+                v-for="item in propertyTypes"
66
+                :value="item.id"
67
+                :key="item.id"
68
+              >
55 69
                 {{ item.description }}
56 70
               </option>
57 71
             </select>
@@ -77,7 +91,7 @@
77 91
             <input
78 92
               type="checkbox"
79 93
               v-model="property.showAddress"
80
-              style="margin-right: 10px; margin-top: 10px;"
94
+              style="margin-right: 10px; margin-top: 10px"
81 95
             />
82 96
             <label>Show address on listing</label>
83 97
           </div>
@@ -88,7 +102,11 @@
88 102
                   <label
89 103
                     for="price"
90 104
                     class="uniSelectLabel"
91
-                    style="text-transform:uppercase; margin-left:17px; background-color:white"
105
+                    style="
106
+                      text-transform: uppercase;
107
+                      margin-left: 17px;
108
+                      background-color: white;
109
+                    "
92 110
                     >{{ salesType }} Price</label
93 111
                   >
94 112
                 </div>
@@ -114,6 +132,7 @@
114 132
                   <option value>Please select</option>
115 133
                   <option value="Month">Month</option>
116 134
                   <option value="Day">Day</option>
135
+                  <option value="m2">m2</option>
117 136
                 </select>
118 137
               </div>
119 138
             </div>
@@ -133,7 +152,9 @@
133 152
             <div class="row my-3">
134 153
               <div class="col-md-12">
135 154
                 <div v-if="!property.streetNumber">
136
-                  <label for="streetNumber" class="uniSelectLabel">STREET NUMBER</label>
155
+                  <label for="streetNumber" class="uniSelectLabel"
156
+                    >STREET NUMBER</label
157
+                  >
137 158
                 </div>
138 159
                 <input
139 160
                   class="form-control uniInput"
@@ -147,7 +168,9 @@
147 168
             <div class="row my-3">
148 169
               <div class="col-md-12">
149 170
                 <div v-if="!property.streetName">
150
-                  <label for="streetName" class="uniSelectLabel">STREET NAME</label>
171
+                  <label for="streetName" class="uniSelectLabel"
172
+                    >STREET NAME</label
173
+                  >
151 174
                 </div>
152 175
                 <input
153 176
                   class="form-control uniInput"
@@ -203,7 +226,9 @@
203 226
             <div class="row my-3">
204 227
               <div class="col-md-12">
205 228
                 <div v-if="!property.postalCode">
206
-                  <label for="postalCode" class="uniSelectLabel">POSTAL CODE</label>
229
+                  <label for="postalCode" class="uniSelectLabel"
230
+                    >POSTAL CODE</label
231
+                  >
207 232
                 </div>
208 233
                 <input
209 234
                   class="form-control uniInput"
@@ -230,7 +255,11 @@
230 255
             </div>
231 256
             <div class="row my-3">
232 257
               <div class="col-md-12">
233
-                <button type="button" @click="clearAddress()" class="btn-solid-blue">
258
+                <button
259
+                  type="button"
260
+                  @click="clearAddress()"
261
+                  class="btn-solid-blue"
262
+                >
234 263
                   Clear Address
235 264
                 </button>
236 265
               </div>
@@ -239,12 +268,17 @@
239 268
         </div>
240 269
         <div class="row">
241 270
           <div class="col-md-12">
242
-            <label for="Property Description" style="font-family:'muli'">Description:</label>
243
-            <vue-editor v-model="property.description" :editor-toolbar="customToolbar" />
271
+            <label for="Property Description" style="font-family: 'muli'"
272
+              >Description:</label
273
+            >
274
+            <vue-editor
275
+              v-model="property.description"
276
+              :editor-toolbar="customToolbar"
277
+            />
244 278
             <br />
245 279
             <p>
246
-              * A listing fee of R{{ getListingFee.amount }} including VAT is payable to list your
247
-              Property on the Uni-Vate website
280
+              * A listing fee of R{{ getListingFee.amount }} including VAT is
281
+              payable to list your Property on the Uni-Vate website
248 282
             </p>
249 283
           </div>
250 284
         </div>
@@ -256,7 +290,10 @@
256 290
             
257 291
           </div>
258 292
         </div> -->
259
-        <UserField :fields="propFields" @UpdateUserDefinedFields="UpdateUserDefinedFields" />
293
+        <UserField
294
+          :fields="propFields"
295
+          @UpdateUserDefinedFields="UpdateUserDefinedFields"
296
+        />
260 297
         <div class="row">
261 298
           <div class="col-sm-12">
262 299
             <div class="section-header">
@@ -266,9 +303,11 @@
266 303
         </div>
267 304
         <div class="form-group row">
268 305
           <div class="col-md-12">
269
-            <label v-if="!property.virtualTour" class="uniSelectLabel">Virtual Tour (URL)</label>
306
+            <label v-if="!property.virtualTour" class="uniSelectLabel"
307
+              >Virtual Tour (URL)</label
308
+            >
270 309
             <div class="input-group-prepend">
271
-              <float-label label="Virtual Tour (URL)" style="width:100%">
310
+              <float-label label="Virtual Tour (URL)" style="width: 100%">
272 311
                 <input
273 312
                   class="form-control uniInput"
274 313
                   type="link"
@@ -282,9 +321,11 @@
282 321
         </div>
283 322
         <div class="row">
284 323
           <div class="col-md-12 mt-2">
285
-            <label v-if="!property.video" class="uniSelectLabel">Video (URL)</label>
324
+            <label v-if="!property.video" class="uniSelectLabel"
325
+              >Video (URL)</label
326
+            >
286 327
             <div class="input-group-prepend">
287
-              <float-label label="video " style="width:100%">
328
+              <float-label label="video " style="width: 100%">
288 329
                 <input
289 330
                   class="form-control uniInput"
290 331
                   type="link"
@@ -310,7 +351,12 @@
310 351
           :savedImages="propertyImages"
311 352
           @DefaultImage="UpdateDefaultImage"
312 353
         />
313
-        <button v-if="!wait" type="button" @click="SubmitData()" class="btn-solid-blue">
354
+        <button
355
+          v-if="!wait"
356
+          type="button"
357
+          @click="SubmitData()"
358
+          class="btn-solid-blue"
359
+        >
314 360
           Save
315 361
         </button>
316 362
         <div v-if="showPropertyTypeError">
@@ -341,10 +387,10 @@ export default {
341 387
     ImageLoad,
342 388
     VueEditor,
343 389
     carouselSection,
344
-    mapSection
390
+    mapSection,
345 391
   },
346 392
   props: {
347
-    propFields: {}
393
+    propFields: {},
348 394
   },
349 395
   data() {
350 396
     return {
@@ -357,17 +403,22 @@ export default {
357 403
       customToolbar: [
358 404
         [{ header: [false, 1, 2, 3, 4, 5, 6] }],
359 405
         ["bold", "italic", "underline", "strike"],
360
-        [{ align: "" }, { align: "center" }, { align: "right" }, { align: "justify" }],
406
+        [
407
+          { align: "" },
408
+          { align: "center" },
409
+          { align: "right" },
410
+          { align: "justify" },
411
+        ],
361 412
         [{ list: "ordered" }, { list: "bullet" }, { list: "check" }],
362 413
         [{ script: "sub" }, { script: "super" }],
363
-        [{ indent: "-1" }, { indent: "+1" }]
414
+        [{ indent: "-1" }, { indent: "+1" }],
364 415
       ],
365 416
       error: "",
366 417
       addressSet: false,
367 418
       showPropertyTypeError: false,
368 419
       showDateError: false,
369 420
       user: Log.getUser(),
370
-      mayEdit: Log.isLoggedIn()
421
+      mayEdit: Log.isLoggedIn(),
371 422
     };
372 423
   },
373 424
   methods: {
@@ -382,7 +433,7 @@ export default {
382 433
       "getPropertyEditDisplay",
383 434
       "getPropertySavedOverviewFields",
384 435
       "getPropertySavedFields",
385
-      "getSavedPropertyData"
436
+      "getSavedPropertyData",
386 437
     ]),
387 438
     updateLocation(place) {
388 439
       this.addressSet = true;
@@ -405,7 +456,10 @@ export default {
405 456
         this.showPropertyTypeError = true;
406 457
       }
407 458
 
408
-      if (this.salesType === "Rental" && this.property.dateAvailable === "undef") {
459
+      if (
460
+        this.salesType === "Rental" &&
461
+        this.property.dateAvailable === "undef"
462
+      ) {
409 463
         this.showDateError = true;
410 464
       }
411 465
 
@@ -429,7 +483,7 @@ export default {
429 483
         }
430 484
         this.property.propertyImages.push({
431 485
           image: this.images[i],
432
-          isDefault: setAsDefault
486
+          isDefault: setAsDefault,
433 487
         });
434 488
       }
435 489
       this.property.propertyUserFields = this.propertyFieldValues;
@@ -454,10 +508,12 @@ export default {
454 508
       console.log(this.property);
455 509
 
456 510
       this.saveProperty(this.property)
457
-        .then(fulfilled => {
458
-          this.$router.push(`/property/commercial/property/${fulfilled.data.id}`);
511
+        .then((fulfilled) => {
512
+          this.$router.push(
513
+            `/property/commercial/property/${fulfilled.data.id}`
514
+          );
459 515
         })
460
-        .catch(error => {
516
+        .catch((error) => {
461 517
           console.log(error.message);
462 518
         });
463 519
     },
@@ -479,7 +535,7 @@ export default {
479 535
     },
480 536
     UpdateUserDefinedFields(item) {
481 537
       let update = false;
482
-      this.propertyFieldValues.forEach(element => {
538
+      this.propertyFieldValues.forEach((element) => {
483 539
         if (element.userDefinedFieldId === item.userDefinedFieldId) {
484 540
           element.value = item.value;
485 541
           update = true;
@@ -503,7 +559,7 @@ export default {
503 559
       this.property.postalCode = undefined;
504 560
       this.property.addressUrl = undefined;
505 561
       this.property.propertCoords = undefined;
506
-    }
562
+    },
507 563
   },
508 564
   mounted() {
509 565
     this.wait = false;
@@ -536,13 +592,15 @@ export default {
536 592
       "propertyOverviewFields",
537 593
       "propertyFields",
538 594
       "property",
539
-      "propertyImages"
595
+      "propertyImages",
540 596
     ]),
541 597
     ...mapState("authentication", ["user"]),
542 598
     ...mapGetters("fees", ["getListingFee"]),
543 599
     sortFields() {
544 600
       var display = [];
545
-      display = this.propertyFields[0].fields.sort((a, b) => (a.rank > b.rank ? 1 : -1));
601
+      display = this.propertyFields[0].fields.sort((a, b) =>
602
+        a.rank > b.rank ? 1 : -1
603
+      );
546 604
       return display;
547 605
     },
548 606
     SalesTypeChanged() {
@@ -562,13 +620,13 @@ export default {
562 620
       this.getPropertyTypes(this.propertyType);
563 621
 
564 622
       return this.propertyType;
565
-    }
623
+    },
566 624
   },
567 625
   watch: {
568 626
     SalesTypeChanged() {
569 627
       return null;
570
-    }
571
-  }
628
+    },
629
+  },
572 630
 };
573 631
 </script>
574 632
 

+ 102
- 46
src/components/property/residential/createProperty/residentialCreateNew.vue 查看文件

@@ -1,12 +1,18 @@
1 1
 <template>
2 2
   <div>
3
-    <main id="main" style="margin-top:-20px">
3
+    <main id="main" style="margin-top: -20px">
4 4
       <div class="container pb-5">
5 5
         <div class="row">
6 6
           <div class="col">
7
-            <label v-if="!salesType" class="uniSelectLabel" for="resSaleType">Sale Type</label>
7
+            <label v-if="!salesType" class="uniSelectLabel" for="resSaleType"
8
+              >Sale Type</label
9
+            >
8 10
             <float-label label="Sale Type">
9
-              <select class="form-control uniSelect mb-3" name="resSaleType" v-model="salesType">
11
+              <select
12
+                class="form-control uniSelect mb-3"
13
+                name="resSaleType"
14
+                v-model="salesType"
15
+              >
10 16
                 <option value="Sale">To Sell</option>
11 17
                 <option value="Rental">To Rent</option>
12 18
               </select>
@@ -16,7 +22,9 @@
16 22
         <div class="row mt-2">
17 23
           <div class="col-md-6">
18 24
             <div v-if="!property.propertyName">
19
-              <label for="propertyName" class="uniSelectLabel">PROPERTY NAME</label>
25
+              <label for="propertyName" class="uniSelectLabel"
26
+                >PROPERTY NAME</label
27
+              >
20 28
             </div>
21 29
             <float-label label="PROPERTY NAME">
22 30
               <input
@@ -29,7 +37,9 @@
29 37
           </div>
30 38
           <div class="col-md-6">
31 39
             <div v-if="!property.propertyRef">
32
-              <label for="propertyName" class="uniSelectLabel">PROPERTY REFERENCE</label>
40
+              <label for="propertyName" class="uniSelectLabel"
41
+                >PROPERTY REFERENCE</label
42
+              >
33 43
             </div>
34 44
             <float-label label="PROPERTY REFERENCE">
35 45
               <input
@@ -51,9 +61,13 @@
51 61
               @change="PropertyTypeSelected"
52 62
             >
53 63
               <option value="0">Please select type *</option>
54
-              <option v-for="item in propertyTypes" :value="item.id" :key="item.id">{{
55
-                item.description
56
-              }}</option>
64
+              <option
65
+                v-for="item in propertyTypesRes"
66
+                :value="item.id"
67
+                :key="item.id"
68
+              >
69
+                {{ item.description }}
70
+              </option>
57 71
             </select>
58 72
           </div>
59 73
         </div>
@@ -63,7 +77,7 @@
63 77
             <input
64 78
               type="checkbox"
65 79
               v-model="property.showAddress"
66
-              style="margin-right: 10px; margin-top: 10px;"
80
+              style="margin-right: 10px; margin-top: 10px"
67 81
             />
68 82
             <label>Show address on listing</label>
69 83
           </div>
@@ -74,13 +88,16 @@
74 88
                   <label
75 89
                     for="resPrice"
76 90
                     class="uniSelectLabel"
77
-                    style="text-transform:uppercase; margin-left:17px; background-color:white"
91
+                    style="
92
+                      text-transform: uppercase;
93
+                      margin-left: 17px;
94
+                      background-color: white;
95
+                    "
78 96
                     >{{ salesType }} Price</label
79 97
                   >
80 98
                 </div>
81 99
                 <float-label label="Price">
82 100
                   <currency-input
83
-                    onclick="this.setSelectionRange(0, this.value.length)"
84 101
                     name="resPrice"
85 102
                     :value="property.price"
86 103
                     @input="property.price = $event"
@@ -119,7 +136,9 @@
119 136
             <div class="row my-3">
120 137
               <div class="col-md-12">
121 138
                 <div v-if="!property.streetNumber">
122
-                  <label for="resStreetNumber" class="uniSelectLabel">STREET NUMBER</label>
139
+                  <label for="resStreetNumber" class="uniSelectLabel"
140
+                    >STREET NUMBER</label
141
+                  >
123 142
                 </div>
124 143
                 <input
125 144
                   class="form-control uniInput"
@@ -133,7 +152,9 @@
133 152
             <div class="row my-3">
134 153
               <div class="col-md-12">
135 154
                 <div v-if="!property.streetName">
136
-                  <label for="resStreetName" class="uniSelectLabel">STREET NAME</label>
155
+                  <label for="resStreetName" class="uniSelectLabel"
156
+                    >STREET NAME</label
157
+                  >
137 158
                 </div>
138 159
                 <input
139 160
                   class="form-control uniInput"
@@ -175,7 +196,9 @@
175 196
             <div class="row my-3">
176 197
               <div class="col-md-12">
177 198
                 <div v-if="!property.province">
178
-                  <label for="resProvince" class="uniSelectLabel">PROVINCE</label>
199
+                  <label for="resProvince" class="uniSelectLabel"
200
+                    >PROVINCE</label
201
+                  >
179 202
                 </div>
180 203
                 <input
181 204
                   class="form-control uniInput"
@@ -189,7 +212,9 @@
189 212
             <div class="row my-3">
190 213
               <div class="col-md-12">
191 214
                 <div v-if="!property.postalCode">
192
-                  <label for="resPostalCode" class="uniSelectLabel">POSTAL CODE</label>
215
+                  <label for="resPostalCode" class="uniSelectLabel"
216
+                    >POSTAL CODE</label
217
+                  >
193 218
                 </div>
194 219
                 <input
195 220
                   class="form-control uniInput"
@@ -216,7 +241,11 @@
216 241
             </div>
217 242
             <div class="row my-3">
218 243
               <div class="col-md-12">
219
-                <button type="button" @click="clearAddress()" class="btn-solid-blue">
244
+                <button
245
+                  type="button"
246
+                  @click="clearAddress()"
247
+                  class="btn-solid-blue"
248
+                >
220 249
                   Clear Address
221 250
                 </button>
222 251
               </div>
@@ -225,12 +254,17 @@
225 254
         </div>
226 255
         <div class="row">
227 256
           <div class="col-md-12">
228
-            <label for="Property Description" style="font-family:'muli'">Description:</label>
229
-            <vue-editor v-model="property.description" :editor-toolbar="customToolbar" />
257
+            <label for="Property Description" style="font-family: 'muli'"
258
+              >Description:</label
259
+            >
260
+            <vue-editor
261
+              v-model="property.description"
262
+              :editor-toolbar="customToolbar"
263
+            />
230 264
             <br />
231 265
             <p>
232
-              * A listing fee of R{{ getListingFee.amount }} including VAT is payable to list your
233
-              Property on the Uni-Vate website
266
+              * A listing fee of R{{ getListingFee.amount }} including VAT is
267
+              payable to list your Property on the Uni-Vate website
234 268
             </p>
235 269
           </div>
236 270
         </div>
@@ -251,9 +285,11 @@
251 285
         </div>
252 286
         <div class="form-group row">
253 287
           <div class="col-md-12 mt-2">
254
-            <label v-if="!property.virtualTour" class="uniSelectLabel">Virtual Tour (URL)</label>
288
+            <label v-if="!property.virtualTour" class="uniSelectLabel"
289
+              >Virtual Tour (URL)</label
290
+            >
255 291
             <div class="input-group-prepend">
256
-              <float-label label="Virtual Tour (URL)" style="width:100%">
292
+              <float-label label="Virtual Tour (URL)" style="width: 100%">
257 293
                 <input
258 294
                   class="form-control uniInput"
259 295
                   type="link"
@@ -267,9 +303,11 @@
267 303
         </div>
268 304
         <div class="row">
269 305
           <div class="col-md-12 mt-2">
270
-            <label v-if="!property.video" class="uniSelectLabel">Video (URL)</label>
306
+            <label v-if="!property.video" class="uniSelectLabel"
307
+              >Video (URL)</label
308
+            >
271 309
             <div class="input-group-prepend">
272
-              <float-label label="Video (URL)" style="width:100%">
310
+              <float-label label="Video (URL)" style="width: 100%">
273 311
                 <input
274 312
                   class="form-control uniInput"
275 313
                   type="link"
@@ -295,7 +333,12 @@
295 333
           :savedImages="propertyImages"
296 334
           @DefaultImage="UpdateDefaultImage"
297 335
         />
298
-        <button v-if="!wait" type="button" @click="SubmitData()" class="btn-solid-blue">
336
+        <button
337
+          v-if="!wait"
338
+          type="button"
339
+          @click="SubmitData()"
340
+          class="btn-solid-blue"
341
+        >
299 342
           Save
300 343
         </button>
301 344
         <div v-if="showPropertyTypeError">
@@ -326,10 +369,10 @@ export default {
326 369
     ImageLoad,
327 370
     VueEditor,
328 371
     carouselSection,
329
-    mapSection
372
+    mapSection,
330 373
   },
331 374
   props: {
332
-    propFields: {}
375
+    propFields: {},
333 376
   },
334 377
   data() {
335 378
     return {
@@ -342,22 +385,28 @@ export default {
342 385
       customToolbar: [
343 386
         [{ header: [false, 1, 2, 3, 4, 5, 6] }],
344 387
         ["bold", "italic", "underline", "strike"],
345
-        [{ align: "" }, { align: "center" }, { align: "right" }, { align: "justify" }],
388
+        [
389
+          { align: "" },
390
+          { align: "center" },
391
+          { align: "right" },
392
+          { align: "justify" },
393
+        ],
346 394
         [{ list: "ordered" }, { list: "bullet" }, { list: "check" }],
347 395
         [{ script: "sub" }, { script: "super" }],
348
-        [{ indent: "-1" }, { indent: "+1" }]
396
+        [{ indent: "-1" }, { indent: "+1" }],
349 397
       ],
350 398
       error: "",
351 399
       addressSet: false,
352 400
       showPropertyTypeError: false,
353 401
       showDateError: false,
354 402
       user: Log.getUser(),
355
-      mayEdit: Log.isLoggedIn()
403
+      mayEdit: Log.isLoggedIn(),
404
+      myprice: "0",
356 405
     };
357 406
   },
358 407
   methods: {
359 408
     ...mapActions("property", [
360
-      "getPropertyTypes",
409
+      "getPropertyTypesRes",
361 410
       "getPropertyOverviewFields",
362 411
       "getPropertyFields",
363 412
       "saveProperty",
@@ -367,7 +416,7 @@ export default {
367 416
       "getPropertyEditDisplay",
368 417
       "getPropertySavedOverviewFields",
369 418
       "getPropertySavedFields",
370
-      "getSavedPropertyData"
419
+      "getSavedPropertyData",
371 420
     ]),
372 421
     ...mapActions("register", ["getAgentById"]),
373 422
     updateLocation(place) {
@@ -390,7 +439,10 @@ export default {
390 439
         this.showPropertyTypeError = true;
391 440
       }
392 441
 
393
-      if (this.salesType === "Rental" && this.property.dateAvailable === "undef") {
442
+      if (
443
+        this.salesType === "Rental" &&
444
+        this.property.dateAvailable === "undef"
445
+      ) {
394 446
         this.showDateError = true;
395 447
       }
396 448
 
@@ -414,7 +466,7 @@ export default {
414 466
         }
415 467
         this.property.propertyImages.push({
416 468
           image: this.images[i],
417
-          isDefault: setAsDefault
469
+          isDefault: setAsDefault,
418 470
         });
419 471
       }
420 472
       this.property.propertyUserFields = this.propertyFieldValues;
@@ -437,10 +489,12 @@ export default {
437 489
       }
438 490
       //console.log(this.property);
439 491
       this.saveProperty(this.property)
440
-        .then(fulfilled => {
441
-          this.$router.push(`/property/residential/property/${fulfilled.data.id}`);
492
+        .then((fulfilled) => {
493
+          this.$router.push(
494
+            `/property/residential/property/${fulfilled.data.id}`
495
+          );
442 496
         })
443
-        .catch(error => {
497
+        .catch((error) => {
444 498
           console.log(error.message);
445 499
         });
446 500
     },
@@ -465,7 +519,7 @@ export default {
465 519
     },
466 520
     UpdateUserResidentialFields(item) {
467 521
       let update = false;
468
-      this.propertyFieldValues.forEach(element => {
522
+      this.propertyFieldValues.forEach((element) => {
469 523
         if (element.userDefinedFieldId === item.userDefinedFieldId) {
470 524
           element.value = item.value;
471 525
           update = true;
@@ -499,7 +553,7 @@ export default {
499 553
         fields.push(arr.slice(i, (i += len)));
500 554
       }
501 555
       return fields;
502
-    }
556
+    },
503 557
   },
504 558
   mounted() {
505 559
     this.wait = false;
@@ -523,24 +577,26 @@ export default {
523 577
     }
524 578
     this.salesType = this.$route.params.saleType;
525 579
 
526
-    this.getPropertyTypes(this.propertyType);
580
+    this.getPropertyTypesRes();
527 581
 
528 582
     this.getPropertyOverviewFields();
529 583
     //this.getPropertyFields(this.propertyType);
530 584
   },
531 585
   computed: {
532 586
     ...mapState("property", [
533
-      "propertyTypes",
587
+      "propertyTypesRes",
534 588
       "propertyOverviewFields",
535 589
       "propertyFields",
536 590
       "property",
537
-      "propertyImages"
591
+      "propertyImages",
538 592
     ]),
539 593
     ...mapState("authentication", ["user"]),
540 594
     ...mapGetters("fees", ["getListingFee"]),
541 595
     ...mapState("register", ["agent"]),
542 596
     sortFields() {
543
-      return this.propertyFields[0].fields.sort((a, b) => (a.rank > b.rank ? 1 : -1));
597
+      return this.propertyFields[0].fields.sort((a, b) =>
598
+        a.rank > b.rank ? 1 : -1
599
+      );
544 600
     },
545 601
     SalesTypeChanged() {
546 602
       // eslint-disable-next-line vue/no-side-effects-in-computed-properties
@@ -560,13 +616,13 @@ export default {
560 616
     },
561 617
     userFieldsArr() {
562 618
       return this.userFieldsArrFunc(this.propertyFields, 4);
563
-    }
619
+    },
564 620
   },
565 621
   watch: {
566 622
     SalesTypeChanged() {
567 623
       return null;
568
-    }
569
-  }
624
+    },
625
+  },
570 626
 };
571 627
 </script>
572 628
 

正在加载...
取消
保存