|
@@ -66,9 +66,11 @@
|
66
|
66
|
:disabled="!canEdit"
|
67
|
67
|
>
|
68
|
68
|
<option value="0">Please select type *</option>
|
69
|
|
- <option v-for="item in propertyTypes" :value="item.id" :key="item.id">{{
|
|
69
|
+ <option v-for="item in propertyTypes" :value="item.id" :key="item.id">
|
|
70
|
+ {{
|
70
|
71
|
item.description
|
71
|
|
- }}</option>
|
|
72
|
+ }}
|
|
73
|
+ </option>
|
72
|
74
|
</select>
|
73
|
75
|
</div>
|
74
|
76
|
<div v-if="property.propertyUsageType === 'Commercial'" class="col-md-2">
|
|
@@ -108,8 +110,7 @@
|
108
|
110
|
for="price"
|
109
|
111
|
class="uniSelectLabel"
|
110
|
112
|
style="text-transform:uppercase; margin-left:17px; background-color:white"
|
111
|
|
- >{{ property.salesTypeString }} Price</label
|
112
|
|
- >
|
|
113
|
+ >{{ property.salesTypeString }} Price</label>
|
113
|
114
|
</div>
|
114
|
115
|
<input
|
115
|
116
|
class="form-control uniInput"
|
|
@@ -255,9 +256,11 @@
|
255
|
256
|
</div>
|
256
|
257
|
<div class="row my-3">
|
257
|
258
|
<div class="col-md-12">
|
258
|
|
- <button type="button" @click="clearAddress()" class="btn-solid-blue">
|
259
|
|
- Clear Address
|
260
|
|
- </button>
|
|
259
|
+ <button
|
|
260
|
+ type="button"
|
|
261
|
+ @click="clearAddress()"
|
|
262
|
+ class="btn-solid-blue"
|
|
263
|
+ >Clear Address</button>
|
261
|
264
|
</div>
|
262
|
265
|
</div>
|
263
|
266
|
</div>
|
|
@@ -265,16 +268,8 @@
|
265
|
268
|
<div class="row">
|
266
|
269
|
<div class="col-md-12">
|
267
|
270
|
<label for="Property Description" style="font-family:'muli'">Description:</label>
|
268
|
|
- <vue-editor
|
269
|
|
- v-model="property.description"
|
270
|
|
- :editor-toolbar="customToolbar"
|
271
|
|
- :disabled="!canEdit"
|
272
|
|
- />
|
|
271
|
+ <vue-editor v-model="property.description" :editor-toolbar="customToolbar" />
|
273
|
272
|
<br />
|
274
|
|
- <p>
|
275
|
|
- * A listing fee of R380 including VAT is payable to list your Property on the
|
276
|
|
- Uni-Vate website
|
277
|
|
- </p>
|
278
|
273
|
</div>
|
279
|
274
|
</div>
|
280
|
275
|
<div class="row">
|
|
@@ -303,7 +298,11 @@
|
303
|
298
|
</div>
|
304
|
299
|
<div v-else-if="field.type === 'yesno'">
|
305
|
300
|
{{ field.name }}
|
306
|
|
- <input type="checkbox" v-model="field.value" :disabled="!canEdit" />
|
|
301
|
+ <input
|
|
302
|
+ type="checkbox"
|
|
303
|
+ v-model="field.value"
|
|
304
|
+ :disabled="!canEdit"
|
|
305
|
+ />
|
307
|
306
|
</div>
|
308
|
307
|
<div v-else class="display:none"></div>
|
309
|
308
|
</div>
|
|
@@ -362,17 +361,8 @@
|
362
|
361
|
@DeleteImage="DeleteImage"
|
363
|
362
|
:mayEdit="canEdit"
|
364
|
363
|
/>
|
365
|
|
- <button v-if="!wait" type="button" @click="SubmitData()" class="btn-solid-blue">
|
366
|
|
- Save
|
367
|
|
- </button>
|
368
|
|
- <button v-if="!wait" type="button" @click="Close()" class="btn-solid-blue">
|
369
|
|
- Close
|
370
|
|
- </button>
|
371
|
|
- <div v-if="showPropertyTypeError">
|
372
|
|
- <p class="alert myError">
|
373
|
|
- Missing fields. Please fill in all required fields. Marked with *
|
374
|
|
- </p>
|
375
|
|
- </div>
|
|
364
|
+ <button v-if="!wait" type="button" @click="SubmitData()" class="btn-solid-blue">Save</button>
|
|
365
|
+ <button v-if="!wait" type="button" @click="Close()" class="btn-solid-blue">Close</button>
|
376
|
366
|
<div v-if="!addressSet">
|
377
|
367
|
<p class="alert myError">Please enter an address.</p>
|
378
|
368
|
</div>
|
|
@@ -387,6 +377,7 @@
|
387
|
377
|
|
388
|
378
|
<script>
|
389
|
379
|
/* eslint-disable */
|
|
380
|
+import { VueEditor } from "vue2-editor";
|
390
|
381
|
import { mapState, mapActions } from "vuex";
|
391
|
382
|
import mapSection from "../mapSection";
|
392
|
383
|
import ImageLoad from "../propertyImage";
|
|
@@ -396,7 +387,8 @@ export default {
|
396
|
387
|
name: "PropertyEditPage",
|
397
|
388
|
components: {
|
398
|
389
|
mapSection,
|
399
|
|
- ImageLoad
|
|
390
|
+ ImageLoad,
|
|
391
|
+ VueEditor,
|
400
|
392
|
},
|
401
|
393
|
data() {
|
402
|
394
|
return {
|
|
@@ -404,7 +396,20 @@ export default {
|
404
|
396
|
defaultImage: 0,
|
405
|
397
|
images: [],
|
406
|
398
|
wait: false,
|
407
|
|
- canEdit: true
|
|
399
|
+ canEdit: true,
|
|
400
|
+ customToolbar: [
|
|
401
|
+ [{ header: [false, 1, 2, 3, 4, 5, 6] }],
|
|
402
|
+ ["bold", "italic", "underline", "strike"],
|
|
403
|
+ [
|
|
404
|
+ { align: "" },
|
|
405
|
+ { align: "center" },
|
|
406
|
+ { align: "right" },
|
|
407
|
+ { align: "justify" },
|
|
408
|
+ ],
|
|
409
|
+ [{ list: "ordered" }, { list: "bullet" }, { list: "check" }],
|
|
410
|
+ [{ script: "sub" }, { script: "super" }],
|
|
411
|
+ [{ indent: "-1" }, { indent: "+1" }],
|
|
412
|
+ ],
|
408
|
413
|
};
|
409
|
414
|
},
|
410
|
415
|
methods: {
|
|
@@ -412,7 +417,7 @@ export default {
|
412
|
417
|
"getProperty",
|
413
|
418
|
"getPropertyTypes",
|
414
|
419
|
"getPropertyFields",
|
415
|
|
- "updateProperty"
|
|
420
|
+ "updateProperty",
|
416
|
421
|
]),
|
417
|
422
|
StatusChanged(item) {
|
418
|
423
|
if (
|
|
@@ -475,7 +480,7 @@ export default {
|
475
|
480
|
}
|
476
|
481
|
this.property.newImages.push({
|
477
|
482
|
image: this.images[i],
|
478
|
|
- isDefault: setAsDefault
|
|
483
|
+ isDefault: setAsDefault,
|
479
|
484
|
});
|
480
|
485
|
}
|
481
|
486
|
|
|
@@ -483,7 +488,7 @@ export default {
|
483
|
488
|
|
484
|
489
|
//console.log(JSON.stringify(this.property));
|
485
|
490
|
|
486
|
|
- this.updateProperty(this.property).then(fulfilled => {
|
|
491
|
+ this.updateProperty(this.property).then((fulfilled) => {
|
487
|
492
|
this.$router.push("/PropertyAdmin");
|
488
|
493
|
});
|
489
|
494
|
},
|
|
@@ -504,10 +509,10 @@ export default {
|
504
|
509
|
},
|
505
|
510
|
DeleteImage(item) {
|
506
|
511
|
this.propertyImages[item].isDeleted = true;
|
507
|
|
- }
|
|
512
|
+ },
|
508
|
513
|
},
|
509
|
514
|
mounted() {
|
510
|
|
- this.getProperty(this.$route.params.id).then(fulfilled => {
|
|
515
|
+ this.getProperty(this.$route.params.id).then((fulfilled) => {
|
511
|
516
|
this.wait = false;
|
512
|
517
|
if (
|
513
|
518
|
this.property.statusString === "Offer Pending" ||
|
|
@@ -526,7 +531,7 @@ export default {
|
526
|
531
|
"propertyTypes",
|
527
|
532
|
"propertyImages",
|
528
|
533
|
"propertyFields",
|
529
|
|
- "statuses"
|
|
534
|
+ "statuses",
|
530
|
535
|
]),
|
531
|
536
|
savedImages() {
|
532
|
537
|
const list = [];
|
|
@@ -534,8 +539,8 @@ export default {
|
534
|
539
|
list.push(this.proeprtyImages[i].image);
|
535
|
540
|
}
|
536
|
541
|
return list;
|
537
|
|
- }
|
538
|
|
- }
|
|
542
|
+ },
|
|
543
|
+ },
|
539
|
544
|
};
|
540
|
545
|
</script>
|
541
|
546
|
|