30117125 4 lat temu
rodzic
commit
57ae36b083

+ 1
- 0
src/components/timeshare/buy/searchResults.vue Wyświetl plik

@@ -44,6 +44,7 @@
44 44
     </div>
45 45
     <div v-else class="row">
46 46
       <div align="center" class="col-md-12">
47
+        <br />
47 48
         <img src="img/no-homes.png" />
48 49
         <br />
49 50
         <br />

+ 1
- 55
src/components/timeshare/buy/searchSection.vue Wyświetl plik

@@ -42,60 +42,6 @@
42 42
               <option disabled>Please Select a Region First</option>
43 43
             </select>
44 44
           </div>
45
-          <!-- <div class="input-group my-1">
46
-            <label v-if="selectedSeason === null" class="uniSelectLabel" for="season">Season</label>
47
-            <select
48
-              class="form-control uniSelect"
49
-              name="season"
50
-              id="season"
51
-              v-model="selectedSeason"
52
-            >
53
-              <option v-for="season in seasons" :key="season.id" :value="season">{{ season.name }}</option>
54
-            </select>
55
-          </div>
56
-
57
-          <input
58
-            type="number"
59
-            name="bedrooms"
60
-            class="form-control my-1"
61
-            id="bedrooms"
62
-            placeholder="Bedrooms"
63
-            v-model="bedrooms"
64
-            @input="checkValueBedrooms()"
65
-          />
66
-
67
-          <input
68
-            type="number"
69
-            name="max-price"
70
-            class="form-control my-1"
71
-            id="max-price"
72
-            placeholder="Maximum Price"
73
-            v-model="maxPrice"
74
-            @input="checkValuePrice()"
75
-          />
76
-
77
-          <p>
78
-            Filter Arrival Date from
79
-            <input
80
-              type="date"
81
-              name="arrival-from"
82
-              class="form-control my-1"
83
-              id="arrival-from"
84
-              placeholder="mm/dd/yy"
85
-              v-model="dateFrom"
86
-            />
87
-          </p>
88
-          <p>
89
-            Filter Arrival Date to
90
-            <input
91
-              type="date"
92
-              name="arrival-to"
93
-              class="form-control my-1"
94
-              id="arrival-to"
95
-              placeholder="mm/dd/yy"
96
-              v-model="dateTo"
97
-            />
98
-          </p>-->
99 45
           <button class="btn-white-border" @click="ShowResort()">
100 46
             <i class="fa fa-search"></i> SEARCH
101 47
           </button>
@@ -112,7 +58,7 @@
112 58
               <iframe
113 59
                 :src="mapUrl"
114 60
                 width="100%"
115
-                height="600"
61
+                height="400"
116 62
                 frameborder="0"
117 63
                 style="border-radius:10px"
118 64
                 allowfullscreen

+ 17
- 6
src/components/timeshare/buy/weekListComponent.vue Wyświetl plik

@@ -4,12 +4,16 @@
4 4
       <table class="table table-striped table-responsive">
5 5
         <thead>
6 6
           <tr>
7
-            <th scope="col">Reference</th>
7
+            <th scope="col">Ref</th>
8 8
             <th scope="col">Unit</th>
9 9
             <th scope="col">Module</th>
10
+            <th scope="col">Arrival</th>
11
+            <th scope="col">Departure</th>
10 12
             <th scope="col">Bedrooms</th>
11 13
             <th scope="col">Season</th>
14
+            <th scope="col">Type</th>
12 15
             <th scope="col">Price Incl VAT</th>
16
+            <th scope="col">Status</th>
13 17
             <th scope="col">Interested?</th>
14 18
           </tr>
15 19
         </thead>
@@ -18,9 +22,16 @@
18 22
             <td>#{{ item.id }}</td>
19 23
             <td>{{ item.unitNumber }}</td>
20 24
             <td>{{ item.weekNumber }}</td>
25
+            <td v-if="item.arrivalDate === '0001-01-01T00:00:00'"></td>
26
+            <td v-else>{{ item.arrivalDate | toDate }}</td>
27
+            <td v-if="item.departureDate === '0001-01-01T00:00:00'"></td>
28
+            <td v-else>{{ item.departureDate | toDate }}</td>
21 29
             <td>{{ item.bedrooms }}</td>
22 30
             <td>{{ item.season }}</td>
31
+            <td>{{ item.weekType }}</td>
23 32
             <td>{{ item.sellPrice | toCurrency }}</td>
33
+            <td v-if="item.status">{{ item.status.display }}</td>
34
+            <td v-else></td>
24 35
             <!-- <td>{{ item.region ? item.region.regionName : "" }}</td>
25 36
             <td>{{ item.resort ? item.resort.resortName : "" }}</td>
26 37
 
@@ -68,15 +79,15 @@ import { mapState, mapActions, mapGetters } from "vuex";
68 79
 export default {
69 80
   props: {
70 81
     resortCode: undefined,
71
-    userId: undefined
82
+    userId: undefined,
72 83
   },
73 84
   components: {},
74 85
   computed: {
75 86
     ...mapState("weekList", ["weeks", "status"]),
76 87
     ...mapGetters({
77 88
       filteredWeeks: "weekList/filteredWeeks",
78
-      getRegions: "weekList/getRegions"
79
-    })
89
+      getRegions: "weekList/getRegions",
90
+    }),
80 91
   },
81 92
   mounted() {
82 93
     if (this.resortCode) {
@@ -88,8 +99,8 @@ export default {
88 99
     View(item) {
89 100
       this.$router.push(`/resort/${item.resort.resortCode}/${item.unitNumber}`);
90 101
     },
91
-    ...mapActions("weekList", ["getWeeks", "applyResortFilter"])
92
-  }
102
+    ...mapActions("weekList", ["getWeeks", "applyResortFilter"]),
103
+  },
93 104
 };
94 105
 </script>
95 106
 

+ 2
- 2
src/components/timeshare/resort/contentSection.vue Wyświetl plik

@@ -2,7 +2,7 @@
2 2
   <section>
3 3
     <div class="container">
4 4
       <div class="row" id="resort-profile">
5
-        <div class="col-md-4">
5
+        <div class="col-md-3">
6 6
           <img src="img/listings/property1/property1-gallery.jpg" class="img-fluid" alt />
7 7
           <div class="row no-gutters">
8 8
             <div class="col-6">
@@ -15,7 +15,7 @@
15 15
           <gallerySection :images="images" />
16 16
           <FilterComponent :hideTop="true" />
17 17
         </div>
18
-        <div class="col-md-8 p-5 resort-profile">
18
+        <div class="col-md-9 p-5 resort-profile">
19 19
           <h2>{{ resort.prName }}</h2>
20 20
           <WeekList :resortCode="resortCode" />
21 21
           <p>{{ resort.prNotes }}</p>

+ 104
- 74
src/components/timeshare/sell/contentSection.vue Wyświetl plik

@@ -18,9 +18,10 @@
18 18
                   :checked="refAgent"
19 19
                   @change="changeRef"
20 20
                 />
21
-                <label class="custom-control-label" for="customSwitch1">
22
-                  {{ refAgent ? "Yes" : "No" }}
23
-                </label>
21
+                <label
22
+                  class="custom-control-label"
23
+                  for="customSwitch1"
24
+                >{{ refAgent ? "Yes" : "No" }}</label>
24 25
                 <div class="refbyAgent" :class="{ 'refbyAgent--clicked': refAgent }">
25 26
                   <div class="col-md-6" v-if="refAgent">
26 27
                     <label for="Name of Agency">Agency</label>
@@ -30,9 +31,11 @@
30 31
                       name="agency"
31 32
                       v-model="sellItem.agencyId"
32 33
                     >
33
-                      <option v-for="(item, i) in agencies" :key="i" :value="item.id">{{
34
+                      <option v-for="(item, i) in agencies" :key="i" :value="item.id">
35
+                        {{
34 36
                         item.agencyName
35
-                      }}</option>
37
+                        }}
38
+                      </option>
36 39
                     </select>
37 40
                   </div>
38 41
                   <div class="col-md-6" v-if="refAgent">
@@ -64,9 +67,11 @@
64 67
             <div class="form-row">
65 68
               <div class="form-group col-md-6">
66 69
                 <div class="input-group">
67
-                  <label v-if="!sellItem.region" class="uniSelectLabel" for="weekInfoRegionSelect"
68
-                    >REGION</label
69
-                  >
70
+                  <label
71
+                    v-if="!sellItem.region"
72
+                    class="uniSelectLabel"
73
+                    for="weekInfoRegionSelect"
74
+                  >REGION</label>
70 75
 
71 76
                   <select
72 77
                     id="weekInfoRegionSelect"
@@ -75,9 +80,11 @@
75 80
                     @change="regionChange()"
76 81
                     style="font-size: 15px"
77 82
                   >
78
-                    <option v-for="(region, r) in regions" :key="r" :value="region">
79
-                      {{ region.regionName }}
80
-                    </option>
83
+                    <option
84
+                      v-for="(region, r) in regions"
85
+                      :key="r"
86
+                      :value="region"
87
+                    >{{ region.regionName }}</option>
81 88
                   </select>
82 89
                 </div>
83 90
 
@@ -94,9 +101,11 @@
94 101
               </div>
95 102
               <div class="form-group col-md-6">
96 103
                 <div class="input-group">
97
-                  <label v-if="!sellItem.resort" class="uniSelectLabel" for="weekInfoResortSelect"
98
-                    >RESORT NAME</label
99
-                  >
104
+                  <label
105
+                    v-if="!sellItem.resort"
106
+                    class="uniSelectLabel"
107
+                    for="weekInfoResortSelect"
108
+                  >RESORT NAME</label>
100 109
 
101 110
                   <select
102 111
                     id="weekInfoResortSelect"
@@ -105,9 +114,11 @@
105 114
                     @change="resortChange()"
106 115
                   >
107 116
                     <option value="Other">Other</option>
108
-                    <option v-for="(resort, r) in filteredResort" :key="r" :value="resort">
109
-                      {{ resort.resortName }}
110
-                    </option>
117
+                    <option
118
+                      v-for="(resort, r) in filteredResort"
119
+                      :key="r"
120
+                      :value="resort"
121
+                    >{{ resort.resortName }}</option>
111 122
                   </select>
112 123
                 </div>
113 124
                 <!-- <input
@@ -184,9 +195,7 @@
184 195
                 <div class="validation"></div>
185 196
               </div>
186 197
               <div class="form-group col-md-6">
187
-                <label v-if="!sellItem.bedrooms" class="uniSelectLabel" for="region"
188
-                  >BEDROOM/S</label
189
-                >
198
+                <label v-if="!sellItem.bedrooms" class="uniSelectLabel" for="region">BEDROOM/S</label>
190 199
 
191 200
                 <select
192 201
                   class="form-control uniSelect"
@@ -199,9 +208,7 @@
199 208
                 <div class="validation"></div>
200 209
               </div>
201 210
               <div class="form-group col-md-6">
202
-                <label v-if="!sellItem.maxSleep" class="uniSelectLabel" for="region"
203
-                  >SLEEP MAX</label
204
-                >
211
+                <label v-if="!sellItem.maxSleep" class="uniSelectLabel" for="region">SLEEP MAX</label>
205 212
 
206 213
                 <select
207 214
                   class="form-control uniSelect"
@@ -225,6 +232,20 @@
225 232
                 />
226 233
                 <div class="validation"></div>
227 234
               </div>
235
+              <div class="form-group col-md-6">
236
+                <label v-if="!sellItem.weekType" class="uniSelectLabel" for="region">WEEK TYPE</label>
237
+                <select
238
+                  class="form-control uniSelect"
239
+                  name="region"
240
+                  id="region"
241
+                  v-model="sellItem.weekType"
242
+                >
243
+                  <option :key="0">Flexi</option>
244
+                  <option :key="1">Fixed</option>
245
+                  <option :key="2">Module</option>
246
+                  <option :key="3">Syndicate</option>
247
+                </select>
248
+              </div>
228 249
             </div>
229 250
           </div>
230 251
           <div align="left" class="custom-control custom-switch mb-2">
@@ -238,17 +259,19 @@
238 259
                   :checked="sellItem.currentYearBanked"
239 260
                   @change="changeCurrentBanked"
240 261
                 />
241
-                <label class="custom-control-label" for="customSwitch2">
242
-                  {{ sellItem.currentYearBanked ? "Yes" : "No" }}
243
-                </label>
262
+                <label
263
+                  class="custom-control-label"
264
+                  for="customSwitch2"
265
+                >{{ sellItem.currentYearBanked ? "Yes" : "No" }}</label>
244 266
                 <div
245 267
                   class="spacebanked1"
246 268
                   :class="{ 'spacebanked1--clicked': sellItem.currentYearBanked }"
247 269
                 >
248 270
                   <div class="col-md-6">
249
-                    <label for="If yes, please confirm with whom" v-if="sellItem.currentYearBanked"
250
-                      >Please confirm with whom</label
251
-                    >
271
+                    <label
272
+                      for="If yes, please confirm with whom"
273
+                      v-if="sellItem.currentYearBanked"
274
+                    >Please confirm with whom</label>
252 275
                     <select
253 276
                       class="form-control uniSelect"
254 277
                       name="spacebankOwner"
@@ -482,8 +505,7 @@
482 505
                     v-if="!indiv.bankingDetails.bank"
483 506
                     class="uniSelectLabel"
484 507
                     for="weekInfoRegionSelect"
485
-                    >BANK</label
486
-                  >
508
+                  >BANK</label>
487 509
 
488 510
                   <select
489 511
                     id="weekInfoRegionSelect"
@@ -492,9 +514,7 @@
492 514
                     style="font-size: 15px"
493 515
                     v-model="indiv.bankingDetails.bank"
494 516
                   >
495
-                    <option v-for="bank in banks" :key="bank.id" :value="bank">
496
-                      {{ bank.name }}
497
-                    </option>
517
+                    <option v-for="bank in banks" :key="bank.id" :value="bank">{{ bank.name }}</option>
498 518
                   </select>
499 519
                 </div>
500 520
                 <div class="validation"></div>
@@ -539,9 +559,9 @@
539 559
                 class="form-group col-md-12"
540 560
                 style="border:solid;border-width:2px; border-color:rgb(27, 117, 187); border-radius: 3px"
541 561
               >
542
-                <p style="text-align: left; margin:auto; padding:10px">
543
-                  1. With respect to my timeshare module/week, I confirm that:
544
-                </p>
562
+                <p
563
+                  style="text-align: left; margin:auto; padding:10px"
564
+                >1. With respect to my timeshare module/week, I confirm that:</p>
545 565
                 <div class="validation"></div>
546 566
               </div>
547 567
             </div>
@@ -559,9 +579,10 @@
559 579
                     :checked="sellItem.leviesPaidInFull"
560 580
                     @change="changeLeviesPaidInFull"
561 581
                   />
562
-                  <label class="custom-control-label" for="customSwitch3">
563
-                    {{ sellItem.leviesPaidInFull ? "Yes" : "No" }}
564
-                  </label>
582
+                  <label
583
+                    class="custom-control-label"
584
+                    for="customSwitch3"
585
+                  >{{ sellItem.leviesPaidInFull ? "Yes" : "No" }}</label>
565 586
                 </div>
566 587
                 <div class="validation"></div>
567 588
               </div>
@@ -580,9 +601,10 @@
580 601
                     :checked="sellItem.weekPlacedForRental"
581 602
                     @change="changeWeekPlacedForRental"
582 603
                   />
583
-                  <label class="custom-control-label" for="customSwitch4">
584
-                    {{ sellItem.weekPlacedForRental ? "Yes" : "No" }}
585
-                  </label>
604
+                  <label
605
+                    class="custom-control-label"
606
+                    for="customSwitch4"
607
+                  >{{ sellItem.weekPlacedForRental ? "Yes" : "No" }}</label>
586 608
                 </div>
587 609
                 <div class="validation"></div>
588 610
               </div>
@@ -700,15 +722,11 @@
700 722
               </div>
701 723
             </div>
702 724
             <div class="text-center col-12">
703
-              <button class="btn-solid-blue" v-if="!sellItem.id" @click="submitSale()">
704
-                SUBMIT
705
-              </button>
725
+              <button class="btn-solid-blue" v-if="!sellItem.id" @click="submitSale()">SUBMIT</button>
706 726
               <button class="btn-solid-blue" v-else @click="newSale()">NEW WEEK</button>
707 727
             </div>
708 728
             <div class="text-center col-12">
709
-              <button class="btn-solid-blue" @click="paygateRedirect()">
710
-                PayGate
711
-              </button>
729
+              <button class="btn-solid-blue" @click="paygateRedirect()">PayGate</button>
712 730
             </div>
713 731
             <br />
714 732
             <br />
@@ -734,18 +752,18 @@ export default {
734 752
   name: "TimeshareToSell",
735 753
   props: {
736 754
     weekId: {
737
-      default: 0
738
-    }
755
+      default: 0,
756
+    },
739 757
   },
740 758
   data() {
741 759
     return {
742 760
       wait: false,
743
-      userLoggedIn: Log.isLoggedIn()
761
+      userLoggedIn: Log.isLoggedIn(),
744 762
     };
745 763
   },
746 764
   components: {
747 765
     addressAutoComplete,
748
-    Alert
766
+    Alert,
749 767
   },
750 768
   mounted() {
751 769
     if (this.sellItem.id) {
@@ -771,13 +789,13 @@ export default {
771 789
       "sellItem",
772 790
       "agencies",
773 791
       "agents",
774
-      "getTemplate"
792
+      "getTemplate",
775 793
     ]),
776 794
     ...mapState("individual", ["indiv"]),
777 795
     ...mapState("authentication", ["isLoggedIn"]),
778 796
     ...mapGetters({
779 797
       user: "authentication/getUser",
780
-      person: "authentication/getPerson"
798
+      person: "authentication/getPerson",
781 799
     }),
782 800
     ...mapState("bank", ["banks"]),
783 801
     refAgent() {
@@ -785,9 +803,14 @@ export default {
785 803
     },
786 804
     filteredResort() {
787 805
       let list = [];
788
-      if (this.sellItem && this.sellItem.region && this.sellItem.region.regionCode) {
806
+      if (
807
+        this.sellItem &&
808
+        this.sellItem.region &&
809
+        this.sellItem.region.regionCode
810
+      ) {
789 811
         const item = this.detailedRegion.find(
790
-          region => region.region.regionCode === this.sellItem.region.regionCode
812
+          (region) =>
813
+            region.region.regionCode === this.sellItem.region.regionCode
791 814
         );
792 815
         if (item) {
793 816
           list = item.children;
@@ -795,14 +818,14 @@ export default {
795 818
       } else {
796 819
         list = this.resorts;
797 820
       }
798
-      return _.sortBy(list, x => x.resortName);
821
+      return _.sortBy(list, (x) => x.resortName);
799 822
     },
800 823
     isLoggedIn() {
801 824
       return this.user && this.person;
802 825
     },
803 826
     displayNotDeletedAgents() {
804 827
       var notDeletedArr = [];
805
-      this.agents.forEach(agent => {
828
+      this.agents.forEach((agent) => {
806 829
         if (!agent.isDeleted) {
807 830
           if (agent.agencyId === this.sellItem.agencyId) {
808 831
             notDeletedArr.push(agent);
@@ -810,11 +833,16 @@ export default {
810 833
         }
811 834
       });
812 835
       return notDeletedArr;
813
-    }
836
+    },
814 837
   },
815 838
   methods: {
816 839
     ...mapActions("individual", ["getIndividual"]),
817
-    ...mapActions("timeshare", ["initTimeshare", "onResortChange", "saveWeek", "getBlankWeek"]),
840
+    ...mapActions("timeshare", [
841
+      "initTimeshare",
842
+      "onResortChange",
843
+      "saveWeek",
844
+      "getBlankWeek",
845
+    ]),
818 846
     ...mapActions("payment", ["addPayment"]),
819 847
     ...mapActions("bank", ["getBanks"]),
820 848
     newSale() {
@@ -824,11 +852,11 @@ export default {
824 852
     submitSale() {
825 853
       if (this.userLoggedIn) {
826 854
         this.sellItem.ownerObject = this.indiv;
827
-        console.log(this.sellItem);
828
-
829
-        this.saveWeek(this.sellItem).then(fulfilled => {
830
-          this.paygateRedirect();
831
-        });
855
+        this.sellItem.status = undefined;
856
+        console.log(JSON.stringify(this.sellItem));
857
+        //   this.saveWeek(this.sellItem).then((fulfilled) => {
858
+        //     this.paygateRedirect();
859
+        //   });
832 860
       } else this.$router.push("/user/login");
833 861
     },
834 862
     paygateRedirect() {
@@ -838,16 +866,16 @@ export default {
838 866
         creatydById: Log.getUser().id, //Log.getUser().id,
839 867
         amount: 380.0,
840 868
         paymentStatus: "",
841
-        paymentToken: ""
869
+        paymentToken: "",
842 870
       };
843 871
 
844
-      this.addPayment(paymentObj).then(res => {
872
+      this.addPayment(paymentObj).then((res) => {
845 873
         this.$router.push({
846 874
           name: "PaymentGateway",
847 875
           params: {
848 876
             paymentReqId: res.PAY_REQUEST_ID,
849
-            checksum: res.CHECKSUM
850
-          }
877
+            checksum: res.CHECKSUM,
878
+          },
851 879
         });
852 880
       });
853 881
     },
@@ -872,7 +900,7 @@ export default {
872 900
     resortChange() {
873 901
       this.onResortChange({
874 902
         resortName: this.sellItem.resort.resortName,
875
-        resortCode: this.sellItem.resort.resortCode
903
+        resortCode: this.sellItem.resort.resortCode,
876 904
       });
877 905
 
878 906
       if (this.sellItem && this.sellItem.resort === "Other") {
@@ -884,7 +912,9 @@ export default {
884 912
       }
885 913
     },
886 914
     regionChange() {
887
-      this.sellItem.regionId = this.sellItem.region ? this.sellItem.region.id : 1;
915
+      this.sellItem.regionId = this.sellItem.region
916
+        ? this.sellItem.region.id
917
+        : 1;
888 918
     },
889 919
     UpdateAddress(address) {
890 920
       this.indiv.address.streetNumber = address.streetNumber;
@@ -893,8 +923,8 @@ export default {
893 923
       this.indiv.address.city = address.city;
894 924
       this.indiv.address.suburb = address.suburb;
895 925
       this.indiv.address.postalCode = address.postalCode;
896
-    }
897
-  }
926
+    },
927
+  },
898 928
 };
899 929
 </script>
900 930
 

Ładowanie…
Anuluj
Zapisz