2 Коміти

Автор SHA1 Повідомлення Дата
  GJWilliams87 59f2836927 Merge branch 'master' of http://provision-sa.co.za:3000/Provision/UnivateProperties into master 4 роки тому
  GJWilliams87 821b226a98 Mynie's feedback fixes 4 роки тому

+ 98
- 40
src/components/property/commercial/createProperty/commercialCreateNew.vue Переглянути файл

1
 <template>
1
 <template>
2
   <div>
2
   <div>
3
-    <main id="main" style="margin-top:-20px">
3
+    <main id="main" style="margin-top: -20px">
4
       <div class="container pb-5">
4
       <div class="container pb-5">
5
         <div class="row">
5
         <div class="row">
6
           <div class="col">
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
             <float-label label="Sale Type">
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
                 <option value="Sale">To Sell</option>
16
                 <option value="Sale">To Sell</option>
11
                 <option value="Rental">To Rent</option>
17
                 <option value="Rental">To Rent</option>
12
               </select>
18
               </select>
16
         <div class="row mt-2">
22
         <div class="row mt-2">
17
           <div class="col-md-6">
23
           <div class="col-md-6">
18
             <div v-if="!property.propertyName">
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
             </div>
28
             </div>
21
             <float-label label="PROPERTY NAME">
29
             <float-label label="PROPERTY NAME">
22
               <input
30
               <input
29
           </div>
37
           </div>
30
           <div class="col-md-6">
38
           <div class="col-md-6">
31
             <div v-if="!property.propertyRef">
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
             </div>
43
             </div>
34
             <float-label label="PROPERTY REFERENCE">
44
             <float-label label="PROPERTY REFERENCE">
35
               <input
45
               <input
51
               @change="PropertyTypeSelected"
61
               @change="PropertyTypeSelected"
52
             >
62
             >
53
               <option value="0">Please select type *</option>
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
                 {{ item.description }}
69
                 {{ item.description }}
56
               </option>
70
               </option>
57
             </select>
71
             </select>
77
             <input
91
             <input
78
               type="checkbox"
92
               type="checkbox"
79
               v-model="property.showAddress"
93
               v-model="property.showAddress"
80
-              style="margin-right: 10px; margin-top: 10px;"
94
+              style="margin-right: 10px; margin-top: 10px"
81
             />
95
             />
82
             <label>Show address on listing</label>
96
             <label>Show address on listing</label>
83
           </div>
97
           </div>
88
                   <label
102
                   <label
89
                     for="price"
103
                     for="price"
90
                     class="uniSelectLabel"
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
                     >{{ salesType }} Price</label
110
                     >{{ salesType }} Price</label
93
                   >
111
                   >
94
                 </div>
112
                 </div>
114
                   <option value>Please select</option>
132
                   <option value>Please select</option>
115
                   <option value="Month">Month</option>
133
                   <option value="Month">Month</option>
116
                   <option value="Day">Day</option>
134
                   <option value="Day">Day</option>
135
+                  <option value="m2">m2</option>
117
                 </select>
136
                 </select>
118
               </div>
137
               </div>
119
             </div>
138
             </div>
133
             <div class="row my-3">
152
             <div class="row my-3">
134
               <div class="col-md-12">
153
               <div class="col-md-12">
135
                 <div v-if="!property.streetNumber">
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
                 </div>
158
                 </div>
138
                 <input
159
                 <input
139
                   class="form-control uniInput"
160
                   class="form-control uniInput"
147
             <div class="row my-3">
168
             <div class="row my-3">
148
               <div class="col-md-12">
169
               <div class="col-md-12">
149
                 <div v-if="!property.streetName">
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
                 </div>
174
                 </div>
152
                 <input
175
                 <input
153
                   class="form-control uniInput"
176
                   class="form-control uniInput"
203
             <div class="row my-3">
226
             <div class="row my-3">
204
               <div class="col-md-12">
227
               <div class="col-md-12">
205
                 <div v-if="!property.postalCode">
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
                 </div>
232
                 </div>
208
                 <input
233
                 <input
209
                   class="form-control uniInput"
234
                   class="form-control uniInput"
230
             </div>
255
             </div>
231
             <div class="row my-3">
256
             <div class="row my-3">
232
               <div class="col-md-12">
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
                   Clear Address
263
                   Clear Address
235
                 </button>
264
                 </button>
236
               </div>
265
               </div>
239
         </div>
268
         </div>
240
         <div class="row">
269
         <div class="row">
241
           <div class="col-md-12">
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
             <br />
278
             <br />
245
             <p>
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
             </p>
282
             </p>
249
           </div>
283
           </div>
250
         </div>
284
         </div>
256
             
290
             
257
           </div>
291
           </div>
258
         </div> -->
292
         </div> -->
259
-        <UserField :fields="propFields" @UpdateUserDefinedFields="UpdateUserDefinedFields" />
293
+        <UserField
294
+          :fields="propFields"
295
+          @UpdateUserDefinedFields="UpdateUserDefinedFields"
296
+        />
260
         <div class="row">
297
         <div class="row">
261
           <div class="col-sm-12">
298
           <div class="col-sm-12">
262
             <div class="section-header">
299
             <div class="section-header">
266
         </div>
303
         </div>
267
         <div class="form-group row">
304
         <div class="form-group row">
268
           <div class="col-md-12">
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
             <div class="input-group-prepend">
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
                 <input
311
                 <input
273
                   class="form-control uniInput"
312
                   class="form-control uniInput"
274
                   type="link"
313
                   type="link"
282
         </div>
321
         </div>
283
         <div class="row">
322
         <div class="row">
284
           <div class="col-md-12 mt-2">
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
             <div class="input-group-prepend">
327
             <div class="input-group-prepend">
287
-              <float-label label="video " style="width:100%">
328
+              <float-label label="video " style="width: 100%">
288
                 <input
329
                 <input
289
                   class="form-control uniInput"
330
                   class="form-control uniInput"
290
                   type="link"
331
                   type="link"
310
           :savedImages="propertyImages"
351
           :savedImages="propertyImages"
311
           @DefaultImage="UpdateDefaultImage"
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
           Save
360
           Save
315
         </button>
361
         </button>
316
         <div v-if="showPropertyTypeError">
362
         <div v-if="showPropertyTypeError">
341
     ImageLoad,
387
     ImageLoad,
342
     VueEditor,
388
     VueEditor,
343
     carouselSection,
389
     carouselSection,
344
-    mapSection
390
+    mapSection,
345
   },
391
   },
346
   props: {
392
   props: {
347
-    propFields: {}
393
+    propFields: {},
348
   },
394
   },
349
   data() {
395
   data() {
350
     return {
396
     return {
357
       customToolbar: [
403
       customToolbar: [
358
         [{ header: [false, 1, 2, 3, 4, 5, 6] }],
404
         [{ header: [false, 1, 2, 3, 4, 5, 6] }],
359
         ["bold", "italic", "underline", "strike"],
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
         [{ list: "ordered" }, { list: "bullet" }, { list: "check" }],
412
         [{ list: "ordered" }, { list: "bullet" }, { list: "check" }],
362
         [{ script: "sub" }, { script: "super" }],
413
         [{ script: "sub" }, { script: "super" }],
363
-        [{ indent: "-1" }, { indent: "+1" }]
414
+        [{ indent: "-1" }, { indent: "+1" }],
364
       ],
415
       ],
365
       error: "",
416
       error: "",
366
       addressSet: false,
417
       addressSet: false,
367
       showPropertyTypeError: false,
418
       showPropertyTypeError: false,
368
       showDateError: false,
419
       showDateError: false,
369
       user: Log.getUser(),
420
       user: Log.getUser(),
370
-      mayEdit: Log.isLoggedIn()
421
+      mayEdit: Log.isLoggedIn(),
371
     };
422
     };
372
   },
423
   },
373
   methods: {
424
   methods: {
382
       "getPropertyEditDisplay",
433
       "getPropertyEditDisplay",
383
       "getPropertySavedOverviewFields",
434
       "getPropertySavedOverviewFields",
384
       "getPropertySavedFields",
435
       "getPropertySavedFields",
385
-      "getSavedPropertyData"
436
+      "getSavedPropertyData",
386
     ]),
437
     ]),
387
     updateLocation(place) {
438
     updateLocation(place) {
388
       this.addressSet = true;
439
       this.addressSet = true;
405
         this.showPropertyTypeError = true;
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
         this.showDateError = true;
463
         this.showDateError = true;
410
       }
464
       }
411
 
465
 
429
         }
483
         }
430
         this.property.propertyImages.push({
484
         this.property.propertyImages.push({
431
           image: this.images[i],
485
           image: this.images[i],
432
-          isDefault: setAsDefault
486
+          isDefault: setAsDefault,
433
         });
487
         });
434
       }
488
       }
435
       this.property.propertyUserFields = this.propertyFieldValues;
489
       this.property.propertyUserFields = this.propertyFieldValues;
454
       console.log(this.property);
508
       console.log(this.property);
455
 
509
 
456
       this.saveProperty(this.property)
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
           console.log(error.message);
517
           console.log(error.message);
462
         });
518
         });
463
     },
519
     },
479
     },
535
     },
480
     UpdateUserDefinedFields(item) {
536
     UpdateUserDefinedFields(item) {
481
       let update = false;
537
       let update = false;
482
-      this.propertyFieldValues.forEach(element => {
538
+      this.propertyFieldValues.forEach((element) => {
483
         if (element.userDefinedFieldId === item.userDefinedFieldId) {
539
         if (element.userDefinedFieldId === item.userDefinedFieldId) {
484
           element.value = item.value;
540
           element.value = item.value;
485
           update = true;
541
           update = true;
503
       this.property.postalCode = undefined;
559
       this.property.postalCode = undefined;
504
       this.property.addressUrl = undefined;
560
       this.property.addressUrl = undefined;
505
       this.property.propertCoords = undefined;
561
       this.property.propertCoords = undefined;
506
-    }
562
+    },
507
   },
563
   },
508
   mounted() {
564
   mounted() {
509
     this.wait = false;
565
     this.wait = false;
536
       "propertyOverviewFields",
592
       "propertyOverviewFields",
537
       "propertyFields",
593
       "propertyFields",
538
       "property",
594
       "property",
539
-      "propertyImages"
595
+      "propertyImages",
540
     ]),
596
     ]),
541
     ...mapState("authentication", ["user"]),
597
     ...mapState("authentication", ["user"]),
542
     ...mapGetters("fees", ["getListingFee"]),
598
     ...mapGetters("fees", ["getListingFee"]),
543
     sortFields() {
599
     sortFields() {
544
       var display = [];
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
       return display;
604
       return display;
547
     },
605
     },
548
     SalesTypeChanged() {
606
     SalesTypeChanged() {
562
       this.getPropertyTypes(this.propertyType);
620
       this.getPropertyTypes(this.propertyType);
563
 
621
 
564
       return this.propertyType;
622
       return this.propertyType;
565
-    }
623
+    },
566
   },
624
   },
567
   watch: {
625
   watch: {
568
     SalesTypeChanged() {
626
     SalesTypeChanged() {
569
       return null;
627
       return null;
570
-    }
571
-  }
628
+    },
629
+  },
572
 };
630
 };
573
 </script>
631
 </script>
574
 
632
 

+ 102
- 46
src/components/property/residential/createProperty/residentialCreateNew.vue Переглянути файл

1
 <template>
1
 <template>
2
   <div>
2
   <div>
3
-    <main id="main" style="margin-top:-20px">
3
+    <main id="main" style="margin-top: -20px">
4
       <div class="container pb-5">
4
       <div class="container pb-5">
5
         <div class="row">
5
         <div class="row">
6
           <div class="col">
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
             <float-label label="Sale Type">
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
                 <option value="Sale">To Sell</option>
16
                 <option value="Sale">To Sell</option>
11
                 <option value="Rental">To Rent</option>
17
                 <option value="Rental">To Rent</option>
12
               </select>
18
               </select>
16
         <div class="row mt-2">
22
         <div class="row mt-2">
17
           <div class="col-md-6">
23
           <div class="col-md-6">
18
             <div v-if="!property.propertyName">
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
             </div>
28
             </div>
21
             <float-label label="PROPERTY NAME">
29
             <float-label label="PROPERTY NAME">
22
               <input
30
               <input
29
           </div>
37
           </div>
30
           <div class="col-md-6">
38
           <div class="col-md-6">
31
             <div v-if="!property.propertyRef">
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
             </div>
43
             </div>
34
             <float-label label="PROPERTY REFERENCE">
44
             <float-label label="PROPERTY REFERENCE">
35
               <input
45
               <input
51
               @change="PropertyTypeSelected"
61
               @change="PropertyTypeSelected"
52
             >
62
             >
53
               <option value="0">Please select type *</option>
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
             </select>
71
             </select>
58
           </div>
72
           </div>
59
         </div>
73
         </div>
63
             <input
77
             <input
64
               type="checkbox"
78
               type="checkbox"
65
               v-model="property.showAddress"
79
               v-model="property.showAddress"
66
-              style="margin-right: 10px; margin-top: 10px;"
80
+              style="margin-right: 10px; margin-top: 10px"
67
             />
81
             />
68
             <label>Show address on listing</label>
82
             <label>Show address on listing</label>
69
           </div>
83
           </div>
74
                   <label
88
                   <label
75
                     for="resPrice"
89
                     for="resPrice"
76
                     class="uniSelectLabel"
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
                     >{{ salesType }} Price</label
96
                     >{{ salesType }} Price</label
79
                   >
97
                   >
80
                 </div>
98
                 </div>
81
                 <float-label label="Price">
99
                 <float-label label="Price">
82
                   <currency-input
100
                   <currency-input
83
-                    onclick="this.setSelectionRange(0, this.value.length)"
84
                     name="resPrice"
101
                     name="resPrice"
85
                     :value="property.price"
102
                     :value="property.price"
86
                     @input="property.price = $event"
103
                     @input="property.price = $event"
119
             <div class="row my-3">
136
             <div class="row my-3">
120
               <div class="col-md-12">
137
               <div class="col-md-12">
121
                 <div v-if="!property.streetNumber">
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
                 </div>
142
                 </div>
124
                 <input
143
                 <input
125
                   class="form-control uniInput"
144
                   class="form-control uniInput"
133
             <div class="row my-3">
152
             <div class="row my-3">
134
               <div class="col-md-12">
153
               <div class="col-md-12">
135
                 <div v-if="!property.streetName">
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
                 </div>
158
                 </div>
138
                 <input
159
                 <input
139
                   class="form-control uniInput"
160
                   class="form-control uniInput"
175
             <div class="row my-3">
196
             <div class="row my-3">
176
               <div class="col-md-12">
197
               <div class="col-md-12">
177
                 <div v-if="!property.province">
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
                 </div>
202
                 </div>
180
                 <input
203
                 <input
181
                   class="form-control uniInput"
204
                   class="form-control uniInput"
189
             <div class="row my-3">
212
             <div class="row my-3">
190
               <div class="col-md-12">
213
               <div class="col-md-12">
191
                 <div v-if="!property.postalCode">
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
                 </div>
218
                 </div>
194
                 <input
219
                 <input
195
                   class="form-control uniInput"
220
                   class="form-control uniInput"
216
             </div>
241
             </div>
217
             <div class="row my-3">
242
             <div class="row my-3">
218
               <div class="col-md-12">
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
                   Clear Address
249
                   Clear Address
221
                 </button>
250
                 </button>
222
               </div>
251
               </div>
225
         </div>
254
         </div>
226
         <div class="row">
255
         <div class="row">
227
           <div class="col-md-12">
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
             <br />
264
             <br />
231
             <p>
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
             </p>
268
             </p>
235
           </div>
269
           </div>
236
         </div>
270
         </div>
251
         </div>
285
         </div>
252
         <div class="form-group row">
286
         <div class="form-group row">
253
           <div class="col-md-12 mt-2">
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
             <div class="input-group-prepend">
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
                 <input
293
                 <input
258
                   class="form-control uniInput"
294
                   class="form-control uniInput"
259
                   type="link"
295
                   type="link"
267
         </div>
303
         </div>
268
         <div class="row">
304
         <div class="row">
269
           <div class="col-md-12 mt-2">
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
             <div class="input-group-prepend">
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
                 <input
311
                 <input
274
                   class="form-control uniInput"
312
                   class="form-control uniInput"
275
                   type="link"
313
                   type="link"
295
           :savedImages="propertyImages"
333
           :savedImages="propertyImages"
296
           @DefaultImage="UpdateDefaultImage"
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
           Save
342
           Save
300
         </button>
343
         </button>
301
         <div v-if="showPropertyTypeError">
344
         <div v-if="showPropertyTypeError">
326
     ImageLoad,
369
     ImageLoad,
327
     VueEditor,
370
     VueEditor,
328
     carouselSection,
371
     carouselSection,
329
-    mapSection
372
+    mapSection,
330
   },
373
   },
331
   props: {
374
   props: {
332
-    propFields: {}
375
+    propFields: {},
333
   },
376
   },
334
   data() {
377
   data() {
335
     return {
378
     return {
342
       customToolbar: [
385
       customToolbar: [
343
         [{ header: [false, 1, 2, 3, 4, 5, 6] }],
386
         [{ header: [false, 1, 2, 3, 4, 5, 6] }],
344
         ["bold", "italic", "underline", "strike"],
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
         [{ list: "ordered" }, { list: "bullet" }, { list: "check" }],
394
         [{ list: "ordered" }, { list: "bullet" }, { list: "check" }],
347
         [{ script: "sub" }, { script: "super" }],
395
         [{ script: "sub" }, { script: "super" }],
348
-        [{ indent: "-1" }, { indent: "+1" }]
396
+        [{ indent: "-1" }, { indent: "+1" }],
349
       ],
397
       ],
350
       error: "",
398
       error: "",
351
       addressSet: false,
399
       addressSet: false,
352
       showPropertyTypeError: false,
400
       showPropertyTypeError: false,
353
       showDateError: false,
401
       showDateError: false,
354
       user: Log.getUser(),
402
       user: Log.getUser(),
355
-      mayEdit: Log.isLoggedIn()
403
+      mayEdit: Log.isLoggedIn(),
404
+      myprice: "0",
356
     };
405
     };
357
   },
406
   },
358
   methods: {
407
   methods: {
359
     ...mapActions("property", [
408
     ...mapActions("property", [
360
-      "getPropertyTypes",
409
+      "getPropertyTypesRes",
361
       "getPropertyOverviewFields",
410
       "getPropertyOverviewFields",
362
       "getPropertyFields",
411
       "getPropertyFields",
363
       "saveProperty",
412
       "saveProperty",
367
       "getPropertyEditDisplay",
416
       "getPropertyEditDisplay",
368
       "getPropertySavedOverviewFields",
417
       "getPropertySavedOverviewFields",
369
       "getPropertySavedFields",
418
       "getPropertySavedFields",
370
-      "getSavedPropertyData"
419
+      "getSavedPropertyData",
371
     ]),
420
     ]),
372
     ...mapActions("register", ["getAgentById"]),
421
     ...mapActions("register", ["getAgentById"]),
373
     updateLocation(place) {
422
     updateLocation(place) {
390
         this.showPropertyTypeError = true;
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
         this.showDateError = true;
446
         this.showDateError = true;
395
       }
447
       }
396
 
448
 
414
         }
466
         }
415
         this.property.propertyImages.push({
467
         this.property.propertyImages.push({
416
           image: this.images[i],
468
           image: this.images[i],
417
-          isDefault: setAsDefault
469
+          isDefault: setAsDefault,
418
         });
470
         });
419
       }
471
       }
420
       this.property.propertyUserFields = this.propertyFieldValues;
472
       this.property.propertyUserFields = this.propertyFieldValues;
437
       }
489
       }
438
       //console.log(this.property);
490
       //console.log(this.property);
439
       this.saveProperty(this.property)
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
           console.log(error.message);
498
           console.log(error.message);
445
         });
499
         });
446
     },
500
     },
465
     },
519
     },
466
     UpdateUserResidentialFields(item) {
520
     UpdateUserResidentialFields(item) {
467
       let update = false;
521
       let update = false;
468
-      this.propertyFieldValues.forEach(element => {
522
+      this.propertyFieldValues.forEach((element) => {
469
         if (element.userDefinedFieldId === item.userDefinedFieldId) {
523
         if (element.userDefinedFieldId === item.userDefinedFieldId) {
470
           element.value = item.value;
524
           element.value = item.value;
471
           update = true;
525
           update = true;
499
         fields.push(arr.slice(i, (i += len)));
553
         fields.push(arr.slice(i, (i += len)));
500
       }
554
       }
501
       return fields;
555
       return fields;
502
-    }
556
+    },
503
   },
557
   },
504
   mounted() {
558
   mounted() {
505
     this.wait = false;
559
     this.wait = false;
523
     }
577
     }
524
     this.salesType = this.$route.params.saleType;
578
     this.salesType = this.$route.params.saleType;
525
 
579
 
526
-    this.getPropertyTypes(this.propertyType);
580
+    this.getPropertyTypesRes();
527
 
581
 
528
     this.getPropertyOverviewFields();
582
     this.getPropertyOverviewFields();
529
     //this.getPropertyFields(this.propertyType);
583
     //this.getPropertyFields(this.propertyType);
530
   },
584
   },
531
   computed: {
585
   computed: {
532
     ...mapState("property", [
586
     ...mapState("property", [
533
-      "propertyTypes",
587
+      "propertyTypesRes",
534
       "propertyOverviewFields",
588
       "propertyOverviewFields",
535
       "propertyFields",
589
       "propertyFields",
536
       "property",
590
       "property",
537
-      "propertyImages"
591
+      "propertyImages",
538
     ]),
592
     ]),
539
     ...mapState("authentication", ["user"]),
593
     ...mapState("authentication", ["user"]),
540
     ...mapGetters("fees", ["getListingFee"]),
594
     ...mapGetters("fees", ["getListingFee"]),
541
     ...mapState("register", ["agent"]),
595
     ...mapState("register", ["agent"]),
542
     sortFields() {
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
     SalesTypeChanged() {
601
     SalesTypeChanged() {
546
       // eslint-disable-next-line vue/no-side-effects-in-computed-properties
602
       // eslint-disable-next-line vue/no-side-effects-in-computed-properties
560
     },
616
     },
561
     userFieldsArr() {
617
     userFieldsArr() {
562
       return this.userFieldsArrFunc(this.propertyFields, 4);
618
       return this.userFieldsArrFunc(this.propertyFields, 4);
563
-    }
619
+    },
564
   },
620
   },
565
   watch: {
621
   watch: {
566
     SalesTypeChanged() {
622
     SalesTypeChanged() {
567
       return null;
623
       return null;
568
-    }
569
-  }
624
+    },
625
+  },
570
 };
626
 };
571
 </script>
627
 </script>
572
 
628
 

Завантаження…
Відмінити
Зберегти