George Williams 4 years ago
parent
commit
6f21f49cb0

+ 49
- 44
src/components/property/commercial/createProperty/commercialCreateNew.vue View File

52
             >
52
             >
53
               <option value="0">Please select type *</option>
53
               <option value="0">Please select type *</option>
54
               <option v-for="item in propertyTypes" :value="item.id" :key="item.id">
54
               <option v-for="item in propertyTypes" :value="item.id" :key="item.id">
55
-                {{
56
-                item.description
57
-                }}
55
+                {{ item.description }}
58
               </option>
56
               </option>
59
             </select>
57
             </select>
60
           </div>
58
           </div>
91
                     for="price"
89
                     for="price"
92
                     class="uniSelectLabel"
90
                     class="uniSelectLabel"
93
                     style="text-transform:uppercase; margin-left:17px; background-color:white"
91
                     style="text-transform:uppercase; margin-left:17px; background-color:white"
94
-                  >{{ salesType }} Price</label>
92
+                    >{{ salesType }} Price</label
93
+                  >
95
                 </div>
94
                 </div>
96
                 <float-label label="price">
95
                 <float-label label="price">
97
                   <currency-input
96
                   <currency-input
98
                     onclick="this.setSelectionRange(0, this.value.length)"
97
                     onclick="this.setSelectionRange(0, this.value.length)"
99
                     name="price"
98
                     name="price"
100
-                    :value="value"
101
-                    @input="value = $event"
99
+                    :value="property.price"
100
+                    @input="property.price = $event"
102
                     v-model="property.price"
101
                     v-model="property.price"
103
                     id="price"
102
                     id="price"
104
                     class="form-control uniInput"
103
                     class="form-control uniInput"
140
                   class="form-control uniInput"
139
                   class="form-control uniInput"
141
                   type="text"
140
                   type="text"
142
                   name="streetNumber"
141
                   name="streetNumber"
143
-                  id="unit"
142
+                  id="streetNumber"
144
                   v-model="property.streetNumber"
143
                   v-model="property.streetNumber"
145
                 />
144
                 />
146
               </div>
145
               </div>
154
                   class="form-control uniInput"
153
                   class="form-control uniInput"
155
                   type="text"
154
                   type="text"
156
                   name="streetName"
155
                   name="streetName"
157
-                  id="unit"
156
+                  id="streetName"
158
                   v-model="property.streetName"
157
                   v-model="property.streetName"
159
                 />
158
                 />
160
               </div>
159
               </div>
168
                   class="form-control uniInput"
167
                   class="form-control uniInput"
169
                   type="text"
168
                   type="text"
170
                   name="suburb"
169
                   name="suburb"
171
-                  id="unit"
170
+                  id="suburb"
172
                   v-model="property.suburb"
171
                   v-model="property.suburb"
173
                 />
172
                 />
174
               </div>
173
               </div>
182
                   class="form-control uniInput"
181
                   class="form-control uniInput"
183
                   type="text"
182
                   type="text"
184
                   name="city"
183
                   name="city"
185
-                  id="unit"
184
+                  id="city"
186
                   v-model="property.city"
185
                   v-model="property.city"
187
                 />
186
                 />
188
               </div>
187
               </div>
196
                   class="form-control uniInput"
195
                   class="form-control uniInput"
197
                   type="text"
196
                   type="text"
198
                   name="province"
197
                   name="province"
199
-                  id="unit"
198
+                  id="province"
200
                   v-model="property.province"
199
                   v-model="property.province"
201
                 />
200
                 />
202
               </div>
201
               </div>
210
                   class="form-control uniInput"
209
                   class="form-control uniInput"
211
                   type="text"
210
                   type="text"
212
                   name="postalCode"
211
                   name="postalCode"
213
-                  id="unit"
212
+                  id="postalCode"
214
                   v-model="property.postalCode"
213
                   v-model="property.postalCode"
215
                 />
214
                 />
216
               </div>
215
               </div>
224
                   class="form-control uniInput"
223
                   class="form-control uniInput"
225
                   type="text"
224
                   type="text"
226
                   name="country"
225
                   name="country"
227
-                  id="unit"
226
+                  id="country"
228
                   v-model="property.country"
227
                   v-model="property.country"
229
                 />
228
                 />
230
               </div>
229
               </div>
231
             </div>
230
             </div>
232
             <div class="row my-3">
231
             <div class="row my-3">
233
               <div class="col-md-12">
232
               <div class="col-md-12">
234
-                <button type="button" @click="clearAddress()" class="btn-solid-blue">Clear Address</button>
233
+                <button type="button" @click="clearAddress()" class="btn-solid-blue">
234
+                  Clear Address
235
+                </button>
235
               </div>
236
               </div>
236
             </div>
237
             </div>
237
           </div>
238
           </div>
253
         <div v-for="item in propertyFields" :key="item.id">
254
         <div v-for="item in propertyFields" :key="item.id">
254
           <div v-if="item.name === 'Commercial Fields'">
255
           <div v-if="item.name === 'Commercial Fields'">
255
             <UserField
256
             <UserField
256
-              :fields="item.fields"
257
+              :fields="sortFields"
257
               :id="item.name"
258
               :id="item.name"
258
               @UpdateUserDefinedFields="UpdateUserDefinedFields"
259
               @UpdateUserDefinedFields="UpdateUserDefinedFields"
259
               :fieldValues="item.fields"
260
               :fieldValues="item.fields"
260
             />
261
             />
261
           </div>
262
           </div>
262
         </div>
263
         </div>
264
+
263
         <div class="row">
265
         <div class="row">
264
           <div class="col-sm-12">
266
           <div class="col-sm-12">
265
             <div class="section-header">
267
             <div class="section-header">
313
           :savedImages="propertyImages"
315
           :savedImages="propertyImages"
314
           @DefaultImage="UpdateDefaultImage"
316
           @DefaultImage="UpdateDefaultImage"
315
         />
317
         />
316
-        <button v-if="!wait" type="button" @click="SubmitData()" class="btn-solid-blue">Save</button>
318
+        <button v-if="!wait" type="button" @click="SubmitData()" class="btn-solid-blue">
319
+          Save
320
+        </button>
317
         <div v-if="showPropertyTypeError">
321
         <div v-if="showPropertyTypeError">
318
-          <p class="alert myError">Missing fields. Please fill in all required fields. Marked with *</p>
322
+          <p class="alert myError">
323
+            Missing fields. Please fill in all required fields. Marked with *
324
+          </p>
319
         </div>
325
         </div>
320
         <div v-if="wait" id="preloader"></div>
326
         <div v-if="wait" id="preloader"></div>
321
       </div>
327
       </div>
340
     ImageLoad,
346
     ImageLoad,
341
     VueEditor,
347
     VueEditor,
342
     carouselSection,
348
     carouselSection,
343
-    mapSection,
349
+    mapSection
344
   },
350
   },
345
   data() {
351
   data() {
346
     return {
352
     return {
353
       customToolbar: [
359
       customToolbar: [
354
         [{ header: [false, 1, 2, 3, 4, 5, 6] }],
360
         [{ header: [false, 1, 2, 3, 4, 5, 6] }],
355
         ["bold", "italic", "underline", "strike"],
361
         ["bold", "italic", "underline", "strike"],
356
-        [
357
-          { align: "" },
358
-          { align: "center" },
359
-          { align: "right" },
360
-          { align: "justify" },
361
-        ],
362
+        [{ align: "" }, { align: "center" }, { align: "right" }, { align: "justify" }],
362
         [{ list: "ordered" }, { list: "bullet" }, { list: "check" }],
363
         [{ list: "ordered" }, { list: "bullet" }, { list: "check" }],
363
         [{ script: "sub" }, { script: "super" }],
364
         [{ script: "sub" }, { script: "super" }],
364
-        [{ indent: "-1" }, { indent: "+1" }],
365
+        [{ indent: "-1" }, { indent: "+1" }]
365
       ],
366
       ],
366
       error: "",
367
       error: "",
367
       addressSet: false,
368
       addressSet: false,
368
       showPropertyTypeError: false,
369
       showPropertyTypeError: false,
369
       showDateError: false,
370
       showDateError: false,
370
       user: Log.getUser(),
371
       user: Log.getUser(),
371
-      mayEdit: Log.isLoggedIn(),
372
+      mayEdit: Log.isLoggedIn()
372
     };
373
     };
373
   },
374
   },
374
   methods: {
375
   methods: {
383
       "getPropertyEditDisplay",
384
       "getPropertyEditDisplay",
384
       "getPropertySavedOverviewFields",
385
       "getPropertySavedOverviewFields",
385
       "getPropertySavedFields",
386
       "getPropertySavedFields",
386
-      "getSavedPropertyData",
387
+      "getSavedPropertyData"
387
     ]),
388
     ]),
388
     updateLocation(place) {
389
     updateLocation(place) {
389
       this.addressSet = true;
390
       this.addressSet = true;
400
     TypeChanged() {
401
     TypeChanged() {
401
       this.property.propertyUsageType = this.propertyType;
402
       this.property.propertyUsageType = this.propertyType;
402
     },
403
     },
404
+
403
     SubmitData() {
405
     SubmitData() {
404
       if (this.property.propertyTypeId === 0) {
406
       if (this.property.propertyTypeId === 0) {
405
         this.showPropertyTypeError = true;
407
         this.showPropertyTypeError = true;
406
       }
408
       }
407
 
409
 
408
-      if (
409
-        this.salesType === "Rental" &&
410
-        this.property.dateAvailable === "undef"
411
-      ) {
410
+      if (this.salesType === "Rental" && this.property.dateAvailable === "undef") {
412
         this.showDateError = true;
411
         this.showDateError = true;
413
       }
412
       }
414
 
413
 
432
         }
431
         }
433
         this.property.propertyImages.push({
432
         this.property.propertyImages.push({
434
           image: this.images[i],
433
           image: this.images[i],
435
-          isDefault: setAsDefault,
434
+          isDefault: setAsDefault
436
         });
435
         });
437
       }
436
       }
438
       this.property.propertyUserFields = this.propertyFieldValues;
437
       this.property.propertyUserFields = this.propertyFieldValues;
441
         this.property.userId = this.user.id;
440
         this.property.userId = this.user.id;
442
       }
441
       }
443
 
442
 
444
-      this.property.propertyUserFields.forEach((item) => {
443
+      this.property.propertyUserFields.forEach(item => {
445
         if (item.value === true) {
444
         if (item.value === true) {
446
           item.value = "yes";
445
           item.value = "yes";
447
         } else if (item.value === false) {
446
         } else if (item.value === false) {
452
       console.log(this.property);
451
       console.log(this.property);
453
 
452
 
454
       this.saveProperty(this.property)
453
       this.saveProperty(this.property)
455
-        .then((fulfilled) => {
456
-          this.$router.push(
457
-            `/property/commercial/property/${fulfilled.data.id}`
458
-          );
454
+        .then(fulfilled => {
455
+          this.$router.push(`/property/commercial/property/${fulfilled.data.id}`);
459
         })
456
         })
460
-        .catch((error) => {
457
+        .catch(error => {
461
           console.log(error.message);
458
           console.log(error.message);
462
         });
459
         });
463
     },
460
     },
479
     },
476
     },
480
     UpdateUserDefinedFields(item) {
477
     UpdateUserDefinedFields(item) {
481
       let update = false;
478
       let update = false;
482
-      this.propertyFieldValues.forEach((element) => {
479
+      this.propertyFieldValues.forEach(element => {
483
         if (element.userDefinedFieldId === item.userDefinedFieldId) {
480
         if (element.userDefinedFieldId === item.userDefinedFieldId) {
484
           element.value = item.value;
481
           element.value = item.value;
485
           update = true;
482
           update = true;
503
       this.property.postalCode = undefined;
500
       this.property.postalCode = undefined;
504
       this.property.addressUrl = undefined;
501
       this.property.addressUrl = undefined;
505
       this.property.propertCoords = undefined;
502
       this.property.propertCoords = undefined;
506
-    },
503
+    }
507
   },
504
   },
508
   mounted() {
505
   mounted() {
509
     this.wait = false;
506
     this.wait = false;
536
       "propertyOverviewFields",
533
       "propertyOverviewFields",
537
       "propertyFields",
534
       "propertyFields",
538
       "property",
535
       "property",
539
-      "propertyImages",
536
+      "propertyImages"
540
     ]),
537
     ]),
541
     ...mapState("authentication", ["user"]),
538
     ...mapState("authentication", ["user"]),
542
     ...mapGetters("fees", ["getListingFee"]),
539
     ...mapGetters("fees", ["getListingFee"]),
540
+    sortFields() {
541
+      var display = [];
542
+
543
+      display = this.propertyFields[0].fields.sort((a, b) => (a.rank > b.rank ? 1 : -1));
544
+      console.log(display);
545
+
546
+      return display;
547
+    },
543
     SalesTypeChanged() {
548
     SalesTypeChanged() {
544
       // eslint-disable-next-line vue/no-side-effects-in-computed-properties
549
       // eslint-disable-next-line vue/no-side-effects-in-computed-properties
545
       // this.propertyType = this.$route.params.propType;
550
       // this.propertyType = this.$route.params.propType;
557
       this.getPropertyTypes(this.propertyType);
562
       this.getPropertyTypes(this.propertyType);
558
 
563
 
559
       return this.propertyType;
564
       return this.propertyType;
560
-    },
565
+    }
561
   },
566
   },
562
   watch: {
567
   watch: {
563
     SalesTypeChanged() {
568
     SalesTypeChanged() {
564
       return null;
569
       return null;
565
-    },
566
-  },
570
+    }
571
+  }
567
 };
572
 };
568
 </script>
573
 </script>
569
 
574
 

+ 45
- 52
src/components/property/residential/createProperty/residentialCreateNew.vue View File

52
             >
52
             >
53
               <option value="0">Please select type *</option>
53
               <option value="0">Please select type *</option>
54
               <option v-for="item in propertyTypes" :value="item.id" :key="item.id">
54
               <option v-for="item in propertyTypes" :value="item.id" :key="item.id">
55
-                {{
56
-                item.description
57
-                }}
55
+                {{ item.description }}
58
               </option>
56
               </option>
59
             </select>
57
             </select>
60
           </div>
58
           </div>
77
                     for="price"
75
                     for="price"
78
                     class="uniSelectLabel"
76
                     class="uniSelectLabel"
79
                     style="text-transform:uppercase; margin-left:17px; background-color:white"
77
                     style="text-transform:uppercase; margin-left:17px; background-color:white"
80
-                  >{{ salesType }} Price</label>
78
+                    >{{ salesType }} Price</label
79
+                  >
81
                 </div>
80
                 </div>
82
                 <float-label label="Price">
81
                 <float-label label="Price">
83
-                  <currency-input
84
-                    onclick="this.setSelectionRange(0, this.value.length)"
85
-                    name="price"
86
-                    :value="value"
87
-                    @input="value = $event"
88
-                    v-model="property.price"
89
-                    id="price"
90
-                    class="form-control uniInput"
91
-                  />
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" />
92
                 </float-label>
86
                 </float-label>
93
               </div>
87
               </div>
94
               <div v-if="salesType === 'Rental'" class="col-md-6">
88
               <div v-if="salesType === 'Rental'" class="col-md-6">
126
                   class="form-control uniInput"
120
                   class="form-control uniInput"
127
                   type="text"
121
                   type="text"
128
                   name="streetNumber"
122
                   name="streetNumber"
129
-                  id="unit"
123
+                  id="streetNumber"
130
                   v-model="property.streetNumber"
124
                   v-model="property.streetNumber"
131
                 />
125
                 />
132
               </div>
126
               </div>
140
                   class="form-control uniInput"
134
                   class="form-control uniInput"
141
                   type="text"
135
                   type="text"
142
                   name="streetName"
136
                   name="streetName"
143
-                  id="unit"
137
+                  id="streetName"
144
                   v-model="property.streetName"
138
                   v-model="property.streetName"
145
                 />
139
                 />
146
               </div>
140
               </div>
154
                   class="form-control uniInput"
148
                   class="form-control uniInput"
155
                   type="text"
149
                   type="text"
156
                   name="suburb"
150
                   name="suburb"
157
-                  id="unit"
151
+                  id="suburb"
158
                   v-model="property.suburb"
152
                   v-model="property.suburb"
159
                 />
153
                 />
160
               </div>
154
               </div>
168
                   class="form-control uniInput"
162
                   class="form-control uniInput"
169
                   type="text"
163
                   type="text"
170
                   name="city"
164
                   name="city"
171
-                  id="unit"
165
+                  id="city"
172
                   v-model="property.city"
166
                   v-model="property.city"
173
                 />
167
                 />
174
               </div>
168
               </div>
182
                   class="form-control uniInput"
176
                   class="form-control uniInput"
183
                   type="text"
177
                   type="text"
184
                   name="province"
178
                   name="province"
185
-                  id="unit"
179
+                  id="province"
186
                   v-model="property.province"
180
                   v-model="property.province"
187
                 />
181
                 />
188
               </div>
182
               </div>
196
                   class="form-control uniInput"
190
                   class="form-control uniInput"
197
                   type="text"
191
                   type="text"
198
                   name="postalCode"
192
                   name="postalCode"
199
-                  id="unit"
193
+                  id="postalCode"
200
                   v-model="property.postalCode"
194
                   v-model="property.postalCode"
201
                 />
195
                 />
202
               </div>
196
               </div>
210
                   class="form-control uniInput"
204
                   class="form-control uniInput"
211
                   type="text"
205
                   type="text"
212
                   name="country"
206
                   name="country"
213
-                  id="unit"
207
+                  id="country"
214
                   v-model="property.country"
208
                   v-model="property.country"
215
                 />
209
                 />
216
               </div>
210
               </div>
217
             </div>
211
             </div>
218
             <div class="row my-3">
212
             <div class="row my-3">
219
               <div class="col-md-12">
213
               <div class="col-md-12">
220
-                <button type="button" @click="clearAddress()" class="btn-solid-blue">Clear Address</button>
214
+                <button type="button" @click="clearAddress()" class="btn-solid-blue">
215
+                  Clear Address
216
+                </button>
221
               </div>
217
               </div>
222
             </div>
218
             </div>
223
           </div>
219
           </div>
253
           :fields="propertyOverviewFields[0].fields"
249
           :fields="propertyOverviewFields[0].fields"
254
           @UpdateUserDefinedFields="UpdateUserDefinedFields"
250
           @UpdateUserDefinedFields="UpdateUserDefinedFields"
255
           :id="1"
251
           :id="1"
256
-        ></UserField>
257
-        <div class="row">
252
+        ></UserField> -->
253
+        <!-- <div class="row">
258
           <div class="col-md-12">
254
           <div class="col-md-12">
259
             <div v-for="item in propertyFields" :key="item.id">
255
             <div v-for="item in propertyFields" :key="item.id">
260
               <div class="row">
256
               <div class="row">
326
           :savedImages="propertyImages"
322
           :savedImages="propertyImages"
327
           @DefaultImage="UpdateDefaultImage"
323
           @DefaultImage="UpdateDefaultImage"
328
         />
324
         />
329
-        <button v-if="!wait" type="button" @click="SubmitData()" class="btn-solid-blue">Save</button>
325
+        <button v-if="!wait" type="button" @click="SubmitData()" class="btn-solid-blue">
326
+          Save
327
+        </button>
330
         <div v-if="showPropertyTypeError">
328
         <div v-if="showPropertyTypeError">
331
-          <p class="alert myError">Missing fields. Please fill in all required fields. Marked with *</p>
329
+          <p class="alert myError">
330
+            Missing fields. Please fill in all required fields. Marked with *
331
+          </p>
332
         </div>
332
         </div>
333
         <div v-if="wait" id="preloader"></div>
333
         <div v-if="wait" id="preloader"></div>
334
       </div>
334
       </div>
353
     ImageLoad,
353
     ImageLoad,
354
     VueEditor,
354
     VueEditor,
355
     carouselSection,
355
     carouselSection,
356
-    mapSection,
356
+    mapSection
357
   },
357
   },
358
   data() {
358
   data() {
359
     return {
359
     return {
366
       customToolbar: [
366
       customToolbar: [
367
         [{ header: [false, 1, 2, 3, 4, 5, 6] }],
367
         [{ header: [false, 1, 2, 3, 4, 5, 6] }],
368
         ["bold", "italic", "underline", "strike"],
368
         ["bold", "italic", "underline", "strike"],
369
-        [
370
-          { align: "" },
371
-          { align: "center" },
372
-          { align: "right" },
373
-          { align: "justify" },
374
-        ],
369
+        [{ align: "" }, { align: "center" }, { align: "right" }, { align: "justify" }],
375
         [{ list: "ordered" }, { list: "bullet" }, { list: "check" }],
370
         [{ list: "ordered" }, { list: "bullet" }, { list: "check" }],
376
         [{ script: "sub" }, { script: "super" }],
371
         [{ script: "sub" }, { script: "super" }],
377
-        [{ indent: "-1" }, { indent: "+1" }],
372
+        [{ indent: "-1" }, { indent: "+1" }]
378
       ],
373
       ],
379
       error: "",
374
       error: "",
380
       addressSet: false,
375
       addressSet: false,
381
       showPropertyTypeError: false,
376
       showPropertyTypeError: false,
382
       showDateError: false,
377
       showDateError: false,
383
       user: Log.getUser(),
378
       user: Log.getUser(),
384
-      mayEdit: Log.isLoggedIn(),
379
+      mayEdit: Log.isLoggedIn()
385
     };
380
     };
386
   },
381
   },
387
   methods: {
382
   methods: {
396
       "getPropertyEditDisplay",
391
       "getPropertyEditDisplay",
397
       "getPropertySavedOverviewFields",
392
       "getPropertySavedOverviewFields",
398
       "getPropertySavedFields",
393
       "getPropertySavedFields",
399
-      "getSavedPropertyData",
394
+      "getSavedPropertyData"
400
     ]),
395
     ]),
401
     updateLocation(place) {
396
     updateLocation(place) {
402
       this.addressSet = true;
397
       this.addressSet = true;
418
         this.showPropertyTypeError = true;
413
         this.showPropertyTypeError = true;
419
       }
414
       }
420
 
415
 
421
-      if (
422
-        this.salesType === "Rental" &&
423
-        this.property.dateAvailable === "undef"
424
-      ) {
416
+      if (this.salesType === "Rental" && this.property.dateAvailable === "undef") {
425
         this.showDateError = true;
417
         this.showDateError = true;
426
       }
418
       }
427
 
419
 
445
         }
437
         }
446
         this.property.propertyImages.push({
438
         this.property.propertyImages.push({
447
           image: this.images[i],
439
           image: this.images[i],
448
-          isDefault: setAsDefault,
440
+          isDefault: setAsDefault
449
         });
441
         });
450
       }
442
       }
451
       this.property.propertyUserFields = this.propertyFieldValues;
443
       this.property.propertyUserFields = this.propertyFieldValues;
453
       if (this.user) {
445
       if (this.user) {
454
         this.property.userId = this.user.id;
446
         this.property.userId = this.user.id;
455
       }
447
       }
456
-      this.property.propertyUserFields.forEach((item) => {
448
+      this.property.propertyUserFields.forEach(item => {
457
         if (item.value === true) {
449
         if (item.value === true) {
458
           item.value = "yes";
450
           item.value = "yes";
459
         } else if (item.value === false) {
451
         } else if (item.value === false) {
462
       });
454
       });
463
 
455
 
464
       this.saveProperty(this.property)
456
       this.saveProperty(this.property)
465
-        .then((fulfilled) => {
466
-          this.$router.push(
467
-            `/property/residential/property/${fulfilled.data.id}`
468
-          );
457
+        .then(fulfilled => {
458
+          this.$router.push(`/property/residential/property/${fulfilled.data.id}`);
469
         })
459
         })
470
-        .catch((error) => {
460
+        .catch(error => {
471
           console.log(error.message);
461
           console.log(error.message);
472
         });
462
         });
473
     },
463
     },
489
     },
479
     },
490
     UpdateUserDefinedFields(item) {
480
     UpdateUserDefinedFields(item) {
491
       let update = false;
481
       let update = false;
492
-      this.propertyFieldValues.forEach((element) => {
482
+      this.propertyFieldValues.forEach(element => {
493
         console.log(element);
483
         console.log(element);
494
 
484
 
495
         if (element.userDefinedFieldId === item.userDefinedFieldId) {
485
         if (element.userDefinedFieldId === item.userDefinedFieldId) {
525
         fields.push(arr.slice(i, (i += len)));
515
         fields.push(arr.slice(i, (i += len)));
526
       }
516
       }
527
       return fields;
517
       return fields;
528
-    },
518
+    }
529
   },
519
   },
530
   mounted() {
520
   mounted() {
531
     console.log(this.propertyFields);
521
     console.log(this.propertyFields);
562
       "propertyOverviewFields",
552
       "propertyOverviewFields",
563
       "propertyFields",
553
       "propertyFields",
564
       "property",
554
       "property",
565
-      "propertyImages",
555
+      "propertyImages"
566
     ]),
556
     ]),
567
     ...mapState("authentication", ["user"]),
557
     ...mapState("authentication", ["user"]),
568
     ...mapGetters("fees", ["getListingFee"]),
558
     ...mapGetters("fees", ["getListingFee"]),
559
+    sortFields() {
560
+      return this.propertyFields[0].fields.sort((a, b) => (a.rank > b.rank ? 1 : -1));
561
+    },
569
     SalesTypeChanged() {
562
     SalesTypeChanged() {
570
       // eslint-disable-next-line vue/no-side-effects-in-computed-properties
563
       // eslint-disable-next-line vue/no-side-effects-in-computed-properties
571
       // this.propertyType = this.$route.params.propType;
564
       // this.propertyType = this.$route.params.propType;
584
     },
577
     },
585
     userFieldsArr() {
578
     userFieldsArr() {
586
       return this.userFieldsArrFunc(this.propertyFields, 4);
579
       return this.userFieldsArrFunc(this.propertyFields, 4);
587
-    },
580
+    }
588
   },
581
   },
589
   watch: {
582
   watch: {
590
     SalesTypeChanged() {
583
     SalesTypeChanged() {
591
       return null;
584
       return null;
592
-    },
593
-  },
585
+    }
586
+  }
594
 };
587
 };
595
 </script>
588
 </script>
596
 
589
 

+ 1
- 1
vue.config.js View File

2
   devServer: {
2
   devServer: {
3
     proxy: {
3
     proxy: {
4
       "/api": {
4
       "/api": {
5
-        // target: "http://localhost:57260/",
5
+        //target: "http://localhost:57260/",
6
         target: "http://training.provision-sa.com:82",
6
         target: "http://training.provision-sa.com:82",
7
         changeOrigin: true
7
         changeOrigin: true
8
       },
8
       },

Loading…
Cancel
Save