|
@@ -51,9 +51,11 @@
|
51
|
51
|
@change="PropertyTypeSelected"
|
52
|
52
|
>
|
53
|
53
|
<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>
|
|
54
|
+ <option
|
|
55
|
+ v-for="item in propertyTypes"
|
|
56
|
+ :value="item.id"
|
|
57
|
+ :key="item.id"
|
|
58
|
+ >{{ item.description }}</option>
|
57
|
59
|
</select>
|
58
|
60
|
</div>
|
59
|
61
|
</div>
|
|
@@ -75,14 +77,18 @@
|
75
|
77
|
for="price"
|
76
|
78
|
class="uniSelectLabel"
|
77
|
79
|
style="text-transform:uppercase; margin-left:17px; background-color:white"
|
78
|
|
- >{{ salesType }} Price</label
|
79
|
|
- >
|
|
80
|
+ >{{ salesType }} Price</label>
|
80
|
81
|
</div>
|
81
|
82
|
<float-label label="Price">
|
82
|
|
- <currency-input <<<<<<< HEAD ======= onclick="this.setSelectionRange(0,
|
83
|
|
- this.value.length)" >>>>>>> 6bbfd86e089da859d019dcbda5cc0fe053af8db2 name="price"
|
84
|
|
- :value="property.price" @input="property.price = $event" v-model="property.price"
|
85
|
|
- id="price" class="form-control uniInput" />
|
|
83
|
+ <currency-input
|
|
84
|
+ onclick="this.setSelectionRange(0, this.value.length)"
|
|
85
|
+ name="price"
|
|
86
|
+ :value="property.price"
|
|
87
|
+ @input="property.price = $event"
|
|
88
|
+ v-model="property.price"
|
|
89
|
+ id="price"
|
|
90
|
+ class="form-control uniInput"
|
|
91
|
+ />
|
86
|
92
|
</float-label>
|
87
|
93
|
</div>
|
88
|
94
|
<div v-if="salesType === 'Rental'" class="col-md-6">
|
|
@@ -211,9 +217,7 @@
|
211
|
217
|
</div>
|
212
|
218
|
<div class="row my-3">
|
213
|
219
|
<div class="col-md-12">
|
214
|
|
- <button type="button" @click="clearAddress()" class="btn-solid-blue">
|
215
|
|
- Clear Address
|
216
|
|
- </button>
|
|
220
|
+ <button type="button" @click="clearAddress()" class="btn-solid-blue">Clear Address</button>
|
217
|
221
|
</div>
|
218
|
222
|
</div>
|
219
|
223
|
</div>
|
|
@@ -249,7 +253,7 @@
|
249
|
253
|
:fields="propertyOverviewFields[0].fields"
|
250
|
254
|
@UpdateUserDefinedFields="UpdateUserDefinedFields"
|
251
|
255
|
:id="1"
|
252
|
|
- ></UserField> -->
|
|
256
|
+ ></UserField>-->
|
253
|
257
|
<!-- <div class="row">
|
254
|
258
|
<div class="col-md-12">
|
255
|
259
|
<div v-for="item in propertyFields" :key="item.id">
|
|
@@ -322,13 +326,9 @@
|
322
|
326
|
:savedImages="propertyImages"
|
323
|
327
|
@DefaultImage="UpdateDefaultImage"
|
324
|
328
|
/>
|
325
|
|
- <button v-if="!wait" type="button" @click="SubmitData()" class="btn-solid-blue">
|
326
|
|
- Save
|
327
|
|
- </button>
|
|
329
|
+ <button v-if="!wait" type="button" @click="SubmitData()" class="btn-solid-blue">Save</button>
|
328
|
330
|
<div v-if="showPropertyTypeError">
|
329
|
|
- <p class="alert myError">
|
330
|
|
- Missing fields. Please fill in all required fields. Marked with *
|
331
|
|
- </p>
|
|
331
|
+ <p class="alert myError">Missing fields. Please fill in all required fields. Marked with *</p>
|
332
|
332
|
</div>
|
333
|
333
|
<div v-if="wait" id="preloader"></div>
|
334
|
334
|
</div>
|
|
@@ -353,7 +353,7 @@ export default {
|
353
|
353
|
ImageLoad,
|
354
|
354
|
VueEditor,
|
355
|
355
|
carouselSection,
|
356
|
|
- mapSection
|
|
356
|
+ mapSection,
|
357
|
357
|
},
|
358
|
358
|
data() {
|
359
|
359
|
return {
|
|
@@ -366,17 +366,22 @@ export default {
|
366
|
366
|
customToolbar: [
|
367
|
367
|
[{ header: [false, 1, 2, 3, 4, 5, 6] }],
|
368
|
368
|
["bold", "italic", "underline", "strike"],
|
369
|
|
- [{ align: "" }, { align: "center" }, { align: "right" }, { align: "justify" }],
|
|
369
|
+ [
|
|
370
|
+ { align: "" },
|
|
371
|
+ { align: "center" },
|
|
372
|
+ { align: "right" },
|
|
373
|
+ { align: "justify" },
|
|
374
|
+ ],
|
370
|
375
|
[{ list: "ordered" }, { list: "bullet" }, { list: "check" }],
|
371
|
376
|
[{ script: "sub" }, { script: "super" }],
|
372
|
|
- [{ indent: "-1" }, { indent: "+1" }]
|
|
377
|
+ [{ indent: "-1" }, { indent: "+1" }],
|
373
|
378
|
],
|
374
|
379
|
error: "",
|
375
|
380
|
addressSet: false,
|
376
|
381
|
showPropertyTypeError: false,
|
377
|
382
|
showDateError: false,
|
378
|
383
|
user: Log.getUser(),
|
379
|
|
- mayEdit: Log.isLoggedIn()
|
|
384
|
+ mayEdit: Log.isLoggedIn(),
|
380
|
385
|
};
|
381
|
386
|
},
|
382
|
387
|
methods: {
|
|
@@ -391,7 +396,7 @@ export default {
|
391
|
396
|
"getPropertyEditDisplay",
|
392
|
397
|
"getPropertySavedOverviewFields",
|
393
|
398
|
"getPropertySavedFields",
|
394
|
|
- "getSavedPropertyData"
|
|
399
|
+ "getSavedPropertyData",
|
395
|
400
|
]),
|
396
|
401
|
updateLocation(place) {
|
397
|
402
|
this.addressSet = true;
|
|
@@ -413,7 +418,10 @@ export default {
|
413
|
418
|
this.showPropertyTypeError = true;
|
414
|
419
|
}
|
415
|
420
|
|
416
|
|
- if (this.salesType === "Rental" && this.property.dateAvailable === "undef") {
|
|
421
|
+ if (
|
|
422
|
+ this.salesType === "Rental" &&
|
|
423
|
+ this.property.dateAvailable === "undef"
|
|
424
|
+ ) {
|
417
|
425
|
this.showDateError = true;
|
418
|
426
|
}
|
419
|
427
|
|
|
@@ -437,7 +445,7 @@ export default {
|
437
|
445
|
}
|
438
|
446
|
this.property.propertyImages.push({
|
439
|
447
|
image: this.images[i],
|
440
|
|
- isDefault: setAsDefault
|
|
448
|
+ isDefault: setAsDefault,
|
441
|
449
|
});
|
442
|
450
|
}
|
443
|
451
|
this.property.propertyUserFields = this.propertyFieldValues;
|
|
@@ -445,7 +453,7 @@ export default {
|
445
|
453
|
if (this.user) {
|
446
|
454
|
this.property.userId = this.user.id;
|
447
|
455
|
}
|
448
|
|
- this.property.propertyUserFields.forEach(item => {
|
|
456
|
+ this.property.propertyUserFields.forEach((item) => {
|
449
|
457
|
if (item.value === true) {
|
450
|
458
|
item.value = "yes";
|
451
|
459
|
} else if (item.value === false) {
|
|
@@ -454,10 +462,12 @@ export default {
|
454
|
462
|
});
|
455
|
463
|
|
456
|
464
|
this.saveProperty(this.property)
|
457
|
|
- .then(fulfilled => {
|
458
|
|
- this.$router.push(`/property/residential/property/${fulfilled.data.id}`);
|
|
465
|
+ .then((fulfilled) => {
|
|
466
|
+ this.$router.push(
|
|
467
|
+ `/property/residential/property/${fulfilled.data.id}`
|
|
468
|
+ );
|
459
|
469
|
})
|
460
|
|
- .catch(error => {
|
|
470
|
+ .catch((error) => {
|
461
|
471
|
console.log(error.message);
|
462
|
472
|
});
|
463
|
473
|
},
|
|
@@ -479,7 +489,7 @@ export default {
|
479
|
489
|
},
|
480
|
490
|
UpdateUserDefinedFields(item) {
|
481
|
491
|
let update = false;
|
482
|
|
- this.propertyFieldValues.forEach(element => {
|
|
492
|
+ this.propertyFieldValues.forEach((element) => {
|
483
|
493
|
console.log(element);
|
484
|
494
|
|
485
|
495
|
if (element.userDefinedFieldId === item.userDefinedFieldId) {
|
|
@@ -515,7 +525,7 @@ export default {
|
515
|
525
|
fields.push(arr.slice(i, (i += len)));
|
516
|
526
|
}
|
517
|
527
|
return fields;
|
518
|
|
- }
|
|
528
|
+ },
|
519
|
529
|
},
|
520
|
530
|
mounted() {
|
521
|
531
|
console.log(this.propertyFields);
|
|
@@ -552,12 +562,14 @@ export default {
|
552
|
562
|
"propertyOverviewFields",
|
553
|
563
|
"propertyFields",
|
554
|
564
|
"property",
|
555
|
|
- "propertyImages"
|
|
565
|
+ "propertyImages",
|
556
|
566
|
]),
|
557
|
567
|
...mapState("authentication", ["user"]),
|
558
|
568
|
...mapGetters("fees", ["getListingFee"]),
|
559
|
569
|
sortFields() {
|
560
|
|
- return this.propertyFields[0].fields.sort((a, b) => (a.rank > b.rank ? 1 : -1));
|
|
570
|
+ return this.propertyFields[0].fields.sort((a, b) =>
|
|
571
|
+ a.rank > b.rank ? 1 : -1
|
|
572
|
+ );
|
561
|
573
|
},
|
562
|
574
|
SalesTypeChanged() {
|
563
|
575
|
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
|
|
@@ -577,13 +589,13 @@ export default {
|
577
|
589
|
},
|
578
|
590
|
userFieldsArr() {
|
579
|
591
|
return this.userFieldsArrFunc(this.propertyFields, 4);
|
580
|
|
- }
|
|
592
|
+ },
|
581
|
593
|
},
|
582
|
594
|
watch: {
|
583
|
595
|
SalesTypeChanged() {
|
584
|
596
|
return null;
|
585
|
|
- }
|
586
|
|
- }
|
|
597
|
+ },
|
|
598
|
+ },
|
587
|
599
|
};
|
588
|
600
|
</script>
|
589
|
601
|
|