Browse Source

Fix to Merge

master
George Williams 4 years ago
parent
commit
dd54dabe0a

+ 49
- 37
src/components/property/residential/createProperty/residentialCreateNew.vue View File

@@ -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
 

+ 22
- 22
src/components/timeshare/sell/contentSection.vue View File

@@ -843,18 +843,18 @@ export default {
843 843
   name: "TimeshareToSell",
844 844
   props: {
845 845
     weekId: {
846
-      default: 0
847
-    }
846
+      default: 0,
847
+    },
848 848
   },
849 849
   data() {
850 850
     return {
851 851
       wait: false,
852
-      userLoggedIn: Log.isLoggedIn()
852
+      userLoggedIn: Log.isLoggedIn(),
853 853
     };
854 854
   },
855 855
   components: {
856 856
     addressAutoComplete,
857
-    Alert
857
+    Alert,
858 858
   },
859 859
   mounted() {
860 860
     if (this.sellItem.id) {
@@ -880,13 +880,13 @@ export default {
880 880
       "sellItem",
881 881
       "agencies",
882 882
       "agents",
883
-      "getTemplate"
883
+      "getTemplate",
884 884
     ]),
885 885
     ...mapState("individual", ["indiv"]),
886 886
     ...mapState("authentication", ["isLoggedIn"]),
887 887
     ...mapGetters({
888 888
       user: "authentication/getUser",
889
-      person: "authentication/getPerson"
889
+      person: "authentication/getPerson",
890 890
     }),
891 891
     ...mapState("bank", ["banks"]),
892 892
     refAgent() {
@@ -901,7 +901,8 @@ export default {
901 901
         this.sellItem.region.regionCode
902 902
       ) {
903 903
         const item = this.detailedRegion.find(
904
-          region => region.region.regionCode === this.sellItem.region.regionCode
904
+          (region) =>
905
+            region.region.regionCode === this.sellItem.region.regionCode
905 906
         );
906 907
         if (item) {
907 908
           list = item.children;
@@ -909,14 +910,14 @@ export default {
909 910
       } else {
910 911
         list = this.resorts;
911 912
       }
912
-      return _.sortBy(list, x => x.resortName);
913
+      return _.sortBy(list, (x) => x.resortName);
913 914
     },
914 915
     isLoggedIn() {
915 916
       return this.user && this.person;
916 917
     },
917 918
     displayNotDeletedAgents() {
918 919
       var notDeletedArr = [];
919
-      this.agents.forEach(agent => {
920
+      this.agents.forEach((agent) => {
920 921
         if (!agent.isDeleted) {
921 922
           if (agent.agencyId === this.sellItem.agencyId) {
922 923
             notDeletedArr.push(agent);
@@ -937,7 +938,7 @@ export default {
937 938
         return false;
938 939
       }
939 940
       return true;
940
-    }
941
+    },
941 942
   },
942 943
   methods: {
943 944
     ...mapActions("individual", ["getIndividual"]),
@@ -945,7 +946,7 @@ export default {
945 946
       "initTimeshare",
946 947
       "onResortChange",
947 948
       "saveWeek",
948
-      "getBlankWeek"
949
+      "getBlankWeek",
949 950
     ]),
950 951
     ...mapActions("payment", ["addPayment"]),
951 952
     ...mapActions("bank", ["getBanks"]),
@@ -957,10 +958,9 @@ export default {
957 958
       if (this.userLoggedIn) {
958 959
         this.sellItem.ownerObject = this.indiv;
959 960
         this.sellItem.status = undefined;
960
-        console.log(this.sellItem);
961
-        //   this.saveWeek(this.sellItem).then(fulfilled => {
962
-        //     this.paygateRedirect();
963
-        //   });
961
+        this.saveWeek(this.sellItem).then((fulfilled) => {
962
+          this.paygateRedirect();
963
+        });
964 964
       }
965 965
     },
966 966
     paygateRedirect() {
@@ -971,16 +971,16 @@ export default {
971 971
         creatydById: Log.getUser().id, //Log.getUser().id,
972 972
         amount: amount,
973 973
         paymentStatus: "",
974
-        paymentToken: ""
974
+        paymentToken: "",
975 975
       };
976 976
 
977
-      this.addPayment(paymentObj).then(res => {
977
+      this.addPayment(paymentObj).then((res) => {
978 978
         this.$router.push({
979 979
           name: "PaymentGateway",
980 980
           params: {
981 981
             paymentReqId: res.PAY_REQUEST_ID,
982
-            checksum: res.CHECKSUM
983
-          }
982
+            checksum: res.CHECKSUM,
983
+          },
984 984
         });
985 985
       });
986 986
     },
@@ -1005,7 +1005,7 @@ export default {
1005 1005
     resortChange() {
1006 1006
       this.onResortChange({
1007 1007
         resortName: this.sellItem.resort.resortName,
1008
-        resortCode: this.sellItem.resort.resortCode
1008
+        resortCode: this.sellItem.resort.resortCode,
1009 1009
       });
1010 1010
 
1011 1011
       if (this.sellItem && this.sellItem.resort === "Other") {
@@ -1035,8 +1035,8 @@ export default {
1035 1035
       } else {
1036 1036
         this.sellItem.mandateDate = undefined;
1037 1037
       }
1038
-    }
1039
-  }
1038
+    },
1039
+  },
1040 1040
 };
1041 1041
 </script>
1042 1042
 

Loading…
Cancel
Save