30117125 4 年前
父节点
当前提交
6d565ad460

+ 104
- 156
src/components/admin/status/editTimeShareAdminPage.vue 查看文件

@@ -9,52 +9,7 @@
9 9
             </div>
10 10
             <div align="left" class="custom-control custom-switch mb-2">
11 11
               <div class="row">
12
-                <div align="center" class="col">
13
-                  <!-- <label class="mr-5">Were you referred by an agent?</label> -->
14
-                  <!-- <input
15
-                  type="checkbox"
16
-                  class="custom-control-input"
17
-                  id="customSwitch1"
18
-                  :checked="refAgent"
19
-                  @change="changeRef"
20
-                /> -->
21
-                  <!-- <label class="custom-control-label" for="customSwitch1">{{
22
-                  refAgent ? "Yes" : "No"
23
-                }}</label> -->
24
-                  <!-- <div class="refbyAgent" :class="{ 'refbyAgent--clicked': refAgent }">
25
-                  <div class="col-md-6" v-if="refAgent">
26
-                    <label for="Name of Agency">Agency</label>
27
-                    <select
28
-                      class="form-control uniSelect"
29
-                      id="Agency"
30
-                      name="agency"
31
-                      v-model="sellItem.agencyId"
32
-                    >
33
-                      <option v-for="(item, i) in agencies" :key="i" :value="item.id">
34
-                        {{ item.agencyName }}
35
-                      </option>
36
-                    </select>
37
-                  </div>
38
-                  <div class="col-md-6" v-if="refAgent">
39
-                    <label for="Name of Agent">Agent</label>
40
-                    <select
41
-                      class="form-control uniSelect"
42
-                      id="agent"
43
-                      name="agent"
44
-                      v-model="sellItem.agentId"
45
-                      :disabled="!sellItem.agencyId"
46
-                    >
47
-                      <option
48
-                        v-for="(item, i) in displayNotDeletedAgents"
49
-                        :key="i"
50
-                        :value="item.id"
51
-                      >
52
-                        <div>{{ item.name + " " + item.surname }}</div>
53
-                      </option>
54
-                    </select>
55
-                  </div>
56
-                </div> -->
57
-                </div>
12
+                <div align="center" class="col"></div>
58 13
               </div>
59 14
             </div>
60 15
 
@@ -64,26 +19,19 @@
64 19
               <div class="form-row">
65 20
                 <div class="form-group col-md-6">
66 21
                   <div class="input-group">
67
-                    <label v-if="!selectedRegion" class="uniSelectLabel" for="weekInfoRegionSelect"
68
-                      >REGION</label
69
-                    >
70
-                    <float-label label="REGION" style="width:100%" fixed>
71
-                      <select
72
-                        class="form-control uniSelect"
73
-                        v-model="selectedRegion"
74
-                        style="font-size: 15px"
75
-                      >
76
-                        <option
77
-                          v-for="(region, r) in regions"
78
-                          :key="r"
79
-                          :value="region.regionCode"
80
-                          >{{ region.regionName }}</option
81
-                        >
82
-                      </select>
83
-                    </float-label>
84
-
85
-                    <div class="validation"></div>
22
+                    <label class="uniSelectLabel" for="weekInfoRegionSelect">REGION</label>
86 23
                   </div>
24
+                  <select
25
+                    class="form-control uniSelect"
26
+                    v-model="selectedRegion"
27
+                    style="font-size: 15px"
28
+                  >
29
+                    <option v-for="(region, r) in regions" :key="r" :value="region.regionCode">{{
30
+                      region.regionName
31
+                    }}</option>
32
+                  </select>
33
+                  <div class="validation"></div>
34
+
87 35
                   <div class="validation"></div>
88 36
                 </div>
89 37
                 <div class="form-group col-md-6">
@@ -100,6 +48,15 @@
100 48
                       </select>
101 49
                     </float-label>
102 50
 
51
+                    <select class="form-control uniSelect" v-model="selectedResort">
52
+                      <option value="Other">Other</option>
53
+                      <option
54
+                        v-for="(resort, r) in filteredResort"
55
+                        :key="r"
56
+                        :value="resort.resortCode"
57
+                        >{{ resort.resortName }}</option
58
+                      >
59
+                    </select>
103 60
                     <div class="validation"></div>
104 61
                   </div>
105 62
                   <div class="validation"></div>
@@ -239,27 +196,24 @@
239 196
                   </float-label>
240 197
                 </div>
241 198
                 <div class="form-row">
242
-                  <div class="form-group col-md-6 mt-2">
243
-                    <float-label label="ARRIVAL DATE">
244
-                      <input
245
-                        type="datetime-local"
246
-                        class="form-control"
247
-                        name="occupationDate1"
248
-                        v-model="weekParam.arrivalDate"
249
-                      />
250
-                    </float-label>
251
-
199
+                  <div class="form-group col-md-6">
200
+                    Arrival Date :
201
+                    <input
202
+                      type="date"
203
+                      class="form-control"
204
+                      name="occupationDate1"
205
+                      v-model="dateParam"
206
+                    />
252 207
                     <div class="validation"></div>
253 208
                   </div>
254
-                  <div class="form-group col-md-6 mt-2">
255
-                    <float-label label="DEPARTURE DATE">
256
-                      <input
257
-                        type="datetime-local"
258
-                        class="form-control"
259
-                        name="occupationDate2"
260
-                        v-model="weekParam.departureDate"
261
-                      />
262
-                    </float-label>
209
+                  <div class="form-group col-md-6">
210
+                    Departure Date :
211
+                    <input
212
+                      type="date"
213
+                      class="form-control"
214
+                      name="occupationDate2"
215
+                      v-model="depDateParam"
216
+                    />
263 217
                     <div class="validation"></div>
264 218
                   </div>
265 219
                   <div class="form-group col-md-6 mt-2">
@@ -288,9 +242,9 @@
288 242
                     id="customSwitch2"
289 243
                     :checked="sellItem.currentYearBanked"
290 244
                   />
291
-                  <label class="custom-control-label" for="customSwitch2">{{
292
-                    sellItem.currentYearBanked ? "Yes" : "No"
293
-                  }}</label>
245
+                  <label class="custom-control-label" for="customSwitch2">
246
+                    {{ sellItem.currentYearBanked ? "Yes" : "No" }}
247
+                  </label>
294 248
                   <div
295 249
                     class="spacebanked1"
296 250
                     :class="{ 'spacebanked1--clicked': sellItem.currentYearBanked }"
@@ -301,24 +255,6 @@
301 255
                         v-if="sellItem.currentYearBanked"
302 256
                         >Please confirm with whom</label
303 257
                       >
304
-                      <select
305
-                        class="form-control uniSelect"
306
-                        id="howMarried"
307
-                        v-model="indiv.howMarried"
308
-                      >
309
-                        <option value="N/A">N/A</option>
310
-                        <option value="In Community Of Property">In Community Of Property</option>
311
-                        <option value="Out of Community Of Property"
312
-                          >Out of Community Of Property</option
313
-                        >
314
-                        <option value="Other">Other</option>
315
-                        <option value="Traditional Wedding">Traditional Wedding</option>
316
-                        <option value="Single">Single</option>
317
-                        <option value="Divorced">Divorced</option>
318
-                        <option value="Widow">Widow</option>
319
-                        <option value="Committed Relationship">Committed Relationship</option>
320
-                        <option value="Partner">Partner</option>
321
-                      </select>
322 258
                     </div>
323 259
                     <div class="validation"></div>
324 260
                   </div>
@@ -454,45 +390,37 @@
454 390
             <div class="form">
455 391
               <div class="row">
456 392
                 <div class="form-group col-md-6">
457
-                  <label v-if="!selectedWeekType" class="uniSelectLabel" for="region">STATUS</label>
458
-                  <float-label label="STATUS" fixed>
459
-                    <select
460
-                      class="form-control uniSelect"
461
-                      name="region"
462
-                      id="region"
463
-                      v-model="selectedWeekType"
464
-                    >
465
-                      <option :key="0">For Sale</option>
466
-                      <option :key="1">Sold</option>
467
-                    </select>
468
-                  </float-label>
393
+                  <label class="uniSelectLabel" for="status">STATUS</label>
394
+                  <select
395
+                    class="form-control uniSelect"
396
+                    name="status"
397
+                    id="status"
398
+                    v-model="weekParam.weekStatus"
399
+                  >
400
+                    <option :key="0">For Sale</option>
401
+                    <option :key="1">Sold</option>
402
+                  </select>
469 403
                 </div>
470 404
                 <div class="form-group col-md-6">
471
-                  <label v-if="!selectedWeekType" class="uniSelectLabel" for="region"
472
-                    >Publish</label
405
+                  <label class="uniSelectLabel" for="publish">Publish</label>
406
+                  <select
407
+                    class="form-control uniSelect"
408
+                    name="publish"
409
+                    id="publish"
410
+                    v-model="weekParam.publish"
473 411
                   >
474
-                  <float-label label="Publish" fixed>
475
-                    <select
476
-                      class="form-control uniSelect"
477
-                      name="region"
478
-                      id="region"
479
-                      v-model="selectedWeekType"
480
-                    >
481
-                      <option :key="0">Yes</option>
482
-                      <option :key="1">No</option>
483
-                    </select>
484
-                  </float-label>
412
+                    <option :key="0" :value="false">No</option>
413
+                    <option :key="1" :value="true">Yes</option>
414
+                  </select>
485 415
                 </div>
486
-                <div class="form-group col-md-6 mt-2">
487
-                  <float-label label="DATE PUBLISHED" fixed>
488
-                    <input
489
-                      type="datetime-local"
490
-                      class="form-control"
491
-                      name="occupationDate2"
492
-                      v-model="datetime"
493
-                    />
494
-                  </float-label>
495
-
416
+                <div class="form-group col-md-6">
417
+                  Date Published :
418
+                  <input
419
+                    type="date"
420
+                    class="form-control"
421
+                    name="publishDate"
422
+                    v-model="pubDateParam"
423
+                  />
496 424
                   <div class="validation"></div>
497 425
                 </div>
498 426
               </div>
@@ -501,9 +429,7 @@
501 429
               <div id="sendmessage">Your details has been sent. Thank you!</div>
502 430
               <div id="errormessage"></div>
503 431
               <div class="text-center col-12">
504
-                <button class="btn-solid-blue" v-on:click="saveEdit()">
505
-                  Save
506
-                </button>
432
+                <button class="btn-solid-blue" v-on:click="saveEdit()">Save</button>
507 433
               </div>
508 434
               <div class="text-center col-12">
509 435
                 <button class="btn-solid-blue" v-on:click="backToListView()">Back</button>
@@ -547,7 +473,12 @@ export default {
547 473
       selectedSeason: {},
548 474
       selectedBedrooms: {},
549 475
       selectedMaxSleep: {},
550
-      selectedWeekType: {}
476
+      selectedWeekType: {},
477
+      selectedStatus: {},
478
+      selectedPublish: {},
479
+      dateParam: {},
480
+      depDateParam: {},
481
+      pubDateParam: {}
551 482
     };
552 483
   },
553 484
   components: {
@@ -572,6 +503,14 @@ export default {
572 503
     this.selectedBedrooms = this.weekParam.bedrooms;
573 504
     this.selectedMaxSleep = this.weekParam.maxSleep;
574 505
     this.selectedWeekType = this.weekParam.weekType;
506
+    this.selectedStatus = this.weekParam.status;
507
+    this.selectedPublish = this.weekParam.publish;
508
+    var date = new Date(this.weekParam.arrivalDate).toISOString().substring(0, 10);
509
+    this.dateParam = date;
510
+    var depDate = new Date(this.weekParam.departureDate).toISOString().substring(0, 10);
511
+    this.depDateParam = depDate;
512
+    var datePub = new Date(this.weekParam.publish).toISOString().substring(0, 10);
513
+    this.pubDateParam = datePub;
575 514
   },
576 515
   created() {
577 516
     this.initTimeshare(this.weekId);
@@ -638,29 +577,38 @@ export default {
638 577
       });
639 578
       this.resorts.forEach(resort => {
640 579
         if (resort.resortCode === this.selectedResort) {
641
-          this.weekParam.resort = resort;
580
+          this.weekParam.resortName = resort.resortName;
642 581
         }
643 582
       });
644 583
       this.seasons.forEach(season => {
645
-        if (season.name === this.selectedSeason) {
646
-          this.weekParam.season = season;
584
+        if (season.name === this.selectedSeason.name) {
585
+          this.weekParam.season = season.name;
647 586
         }
648 587
       });
649
-      this.bedrooms.forEach(beedroom => {
588
+      this.resortBedrooms.forEach(bedroom => {
650 589
         if (bedroom === this.selectedBedrooms) {
651
-          this.weekParam.beedroom = beedroom;
590
+          this.weekParam.bedroom = bedroom;
652 591
         }
653 592
       });
654 593
       this.maxSleep.forEach(sleepMax => {
655
-        if (maxSleep === this.selectedMaxSleep) {
656
-          this.weekParam.maxSleep = maxSleep;
657
-        }
658
-      });
659
-      this.weekType.forEach(typeWeek => {
660
-        if (weekType === this.selectedWeekType) {
661
-          this.weekParam.weekType = weekType;
594
+        if (sleepMax === this.selectedMaxSleep) {
595
+          this.weekParam.maxSleep = sleepMax;
662 596
         }
663 597
       });
598
+      this.weekParam.arrivalDate = new Date(this.dateParam).toISOString().substring(0, 10);
599
+      this.weekParam.departureDate = new Date(this.depDateParam).toISOString().substring(0, 10);
600
+      this.weekParam.publishedDate = new Date(this.pubDateParam).toISOString().substring(0, 10);
601
+      this.weekParam.regionId = this.weekParam.region.id;
602
+      this.weekParam.agentId = this.week.agentId;
603
+      this.weekParam.bankedWith = this.week.bankedWith;
604
+      this.weekParam.owner = this.week.owner;
605
+      parseFloat(this.weekParam.sellPrice);
606
+      parseFloat(this.weekParam.levyAmount);
607
+      delete this.weekParam.weekType;
608
+      delete this.weekParam.Owner;
609
+      delete this.weekParam.agency;
610
+      delete this.weekParam.agent;
611
+      delete this.status;
664 612
       console.log(this.weekParam);
665 613
       this.editSave(this.weekParam);
666 614
     },

+ 16
- 6
src/components/admin/status/timeshareAdminPage.vue 查看文件

@@ -57,7 +57,7 @@
57 57
         <div class="col">
58 58
           <button style="float:right" class="btn-solid-blue" type="button">Filter</button>
59 59
         </div>
60
-      </div> -->
60
+      </div>-->
61 61
       <div class="row">
62 62
         <div class="col-md-12">
63 63
           <ListView
@@ -87,7 +87,7 @@
87 87
           {{ ButtonMessage }}
88 88
         </button> 
89 89
         <div>{{ Message }}</div>
90
-      </div> -->
90
+      </div>-->
91 91
     </div>
92 92
   </main>
93 93
 </template>
@@ -104,7 +104,7 @@ export default {
104 104
   data() {
105 105
     return {
106 106
       user: Log.getUser(),
107
-      selectedItems: [],
107
+      // selectedItems: [],
108 108
       showMessage: false,
109 109
       region: ""
110 110
     };
@@ -114,7 +114,12 @@ export default {
114 114
     this.initTimeshare(0);
115 115
   },
116 116
   computed: {
117
-    ...mapState("timeshare", ["resorts", "regions", "seasons", "detailedRegion"]),
117
+    ...mapState("timeshare", [
118
+      "resorts",
119
+      "regions",
120
+      "seasons",
121
+      "detailedRegion"
122
+    ]),
118 123
     ...mapState("individual", ["indiv"]),
119 124
     filteredResort() {
120 125
       let list = [];
@@ -166,7 +171,12 @@ export default {
166 171
   methods: {
167 172
     ...mapActions("myWeeks", ["getItems", "verifyWeek"]),
168 173
     ...mapActions("alert", ["success"]),
169
-    ...mapActions("timeshare", ["initTimeshare", "onResortChange", "saveWeek", "getBlankWeek"]),
174
+    ...mapActions("timeshare", [
175
+      "initTimeshare",
176
+      "onResortChange",
177
+      "saveWeek",
178
+      "getBlankWeek"
179
+    ]),
170 180
     onVerify() {
171 181
       if (this.selectedItems.length > 0) {
172 182
         for (const i in this.selectedItems) {
@@ -184,7 +194,7 @@ export default {
184 194
       this.selectedItems = items;
185 195
     },
186 196
     onEdit(item) {
187
-      this.$router.push({ name: 'EditTimeshare', params: { weekParam: item } });
197
+      this.$router.push({ name: "EditTimeshare", params: { weekParam: item } });
188 198
       // this.$router.push(`/editTimeShare/${item.id}`);
189 199
     },
190 200
     onClearSelected() {

+ 81
- 54
src/components/timeshare/sell/contentSection.vue 查看文件

@@ -18,9 +18,11 @@
18 18
                   :checked="refAgent"
19 19
                   @change="changeRef"
20 20
                 />
21
-                <label class="custom-control-label" for="customSwitch1">{{
21
+                <label class="custom-control-label" for="customSwitch1">
22
+                  {{
22 23
                   refAgent ? "Yes" : "No"
23
-                }}</label>
24
+                  }}
25
+                </label>
24 26
                 <div class="refbyAgent" :class="{ 'refbyAgent--clicked': refAgent }">
25 27
                   <div class="col-md-6" v-if="refAgent">
26 28
                     <label for="Name of Agency">Agency</label>
@@ -30,9 +32,11 @@
30 32
                       name="agency"
31 33
                       v-model="sellItem.agencyId"
32 34
                     >
33
-                      <option v-for="(item, i) in agencies" :key="i" :value="item.id">
34
-                        {{ item.agencyName }}
35
-                      </option>
35
+                      <option
36
+                        v-for="(item, i) in agencies"
37
+                        :key="i"
38
+                        :value="item.id"
39
+                      >{{ item.agencyName }}</option>
36 40
                     </select>
37 41
                   </div>
38 42
                   <div class="col-md-6" v-if="refAgent">
@@ -64,9 +68,11 @@
64 68
             <div class="form-row">
65 69
               <div class="form-group col-md-6 mt-2">
66 70
                 <div class="input-group">
67
-                  <label v-if="!sellItem.region" class="uniSelectLabel" for="weekInfoRegionSelect"
68
-                    >REGION</label
69
-                  >
71
+                  <label
72
+                    v-if="!sellItem.region"
73
+                    class="uniSelectLabel"
74
+                    for="weekInfoRegionSelect"
75
+                  >REGION</label>
70 76
                   <float-label label="REGION" style="width:100%">
71 77
                     <select
72 78
                       id="weekInfoRegionSelect"
@@ -75,9 +81,11 @@
75 81
                       @change="regionChange()"
76 82
                       style="font-size: 15px"
77 83
                     >
78
-                      <option v-for="(region, r) in regions" :key="r" :value="region">{{
84
+                      <option v-for="(region, r) in regions" :key="r" :value="region">
85
+                        {{
79 86
                         region.regionName
80
-                      }}</option>
87
+                        }}
88
+                      </option>
81 89
                     </select>
82 90
                   </float-label>
83 91
                 </div>
@@ -95,9 +103,11 @@
95 103
               </div>
96 104
               <div class="form-group col-md-6 mt-2">
97 105
                 <div class="input-group">
98
-                  <label v-if="!sellItem.resort" class="uniSelectLabel" for="weekInfoResortSelect"
99
-                    >RESORT NAME</label
100
-                  >
106
+                  <label
107
+                    v-if="!sellItem.resort"
108
+                    class="uniSelectLabel"
109
+                    for="weekInfoResortSelect"
110
+                  >RESORT NAME</label>
101 111
                   <float-label label="RESORT NAME" style="width:100%">
102 112
                     <select
103 113
                       id="weekInfoResortSelect"
@@ -106,9 +116,11 @@
106 116
                       @change="resortChange()"
107 117
                     >
108 118
                       <option value="Other">Other</option>
109
-                      <option v-for="(resort, r) in filteredResort" :key="r" :value="resort">{{
119
+                      <option v-for="(resort, r) in filteredResort" :key="r" :value="resort">
120
+                        {{
110 121
                         resort.resortName
111
-                      }}</option>
122
+                        }}
123
+                      </option>
112 124
                     </select>
113 125
                   </float-label>
114 126
                 </div>
@@ -194,9 +206,7 @@
194 206
                 <div class="validation"></div>
195 207
               </div>
196 208
               <div class="form-group col-md-6 mt-2">
197
-                <label v-if="!sellItem.bedrooms" class="uniSelectLabel" for="region"
198
-                  >BEDROOM/S</label
199
-                >
209
+                <label v-if="!sellItem.bedrooms" class="uniSelectLabel" for="region">BEDROOM/S</label>
200 210
                 <float-label label="BEDROOM/S">
201 211
                   <select
202 212
                     class="form-control uniSelect"
@@ -211,9 +221,7 @@
211 221
                 <div class="validation"></div>
212 222
               </div>
213 223
               <div class="form-group col-md-6 mt-2">
214
-                <label v-if="!sellItem.maxSleep" class="uniSelectLabel" for="region"
215
-                  >SLEEP MAX</label
216
-                >
224
+                <label v-if="!sellItem.maxSleep" class="uniSelectLabel" for="region">SLEEP MAX</label>
217 225
                 <float-label label="SLEEP MAX">
218 226
                   <select
219 227
                     class="form-control uniSelect"
@@ -243,9 +251,7 @@
243 251
                 <div class="validation"></div>
244 252
               </div>
245 253
               <div class="form-group col-md-6 mt-2">
246
-                <label v-if="!sellItem.weekType" class="uniSelectLabel" for="region"
247
-                  >WEEK TYPE</label
248
-                >
254
+                <label v-if="!sellItem.weekType" class="uniSelectLabel" for="region">WEEK TYPE</label>
249 255
                 <float-label label="WEEK TYPE">
250 256
                   <select
251 257
                     class="form-control uniSelect"
@@ -273,17 +279,20 @@
273 279
                   :checked="sellItem.currentYearBanked"
274 280
                   @change="changeCurrentBanked"
275 281
                 />
276
-                <label class="custom-control-label" for="customSwitch2">{{
282
+                <label class="custom-control-label" for="customSwitch2">
283
+                  {{
277 284
                   sellItem.currentYearBanked ? "Yes" : "No"
278
-                }}</label>
285
+                  }}
286
+                </label>
279 287
                 <div
280 288
                   class="spacebanked1"
281 289
                   :class="{ 'spacebanked1--clicked': sellItem.currentYearBanked }"
282 290
                 >
283 291
                   <div class="col-md-6">
284
-                    <label for="If yes, please confirm with whom" v-if="sellItem.currentYearBanked"
285
-                      >Please confirm with whom</label
286
-                    >
292
+                    <label
293
+                      for="If yes, please confirm with whom"
294
+                      v-if="sellItem.currentYearBanked"
295
+                    >Please confirm with whom</label>
287 296
                     <select
288 297
                       class="form-control uniSelect"
289 298
                       name="spacebankOwner"
@@ -373,9 +382,11 @@
373 382
               <div class="form-group col-md-6">
374 383
                 <div class="input-group">
375 384
                   <span v-if="!indiv.howMarried">
376
-                    <label v-if="indiv.howMarried === 'N/A'" for="howMarried" class="uniSelectLabel"
377
-                      >Marital Status</label
378
-                    >
385
+                    <label
386
+                      v-if="indiv.howMarried === 'N/A'"
387
+                      for="howMarried"
388
+                      class="uniSelectLabel"
389
+                    >Marital Status</label>
379 390
                   </span>
380 391
 
381 392
                   <float-label label="Marital Status" style="width:100%">
@@ -386,9 +397,7 @@
386 397
                     >
387 398
                       <option value="N/A">N/A</option>
388 399
                       <option value="In Community Of Property">In Community Of Property</option>
389
-                      <option value="Out of Community Of Property"
390
-                        >Out of Community Of Property</option
391
-                      >
400
+                      <option value="Out of Community Of Property">Out of Community Of Property</option>
392 401
                       <option value="Other">Other</option>
393 402
                       <option value="Traditional Wedding">Traditional Wedding</option>
394 403
                       <option value="Single">Single</option>
@@ -635,9 +644,9 @@
635 644
                 class="form-group col-md-12"
636 645
                 style="border:solid;border-width:2px; border-color:rgb(27, 117, 187); border-radius: 3px"
637 646
               >
638
-                <p style="text-align: left; margin:auto; padding:10px">
639
-                  1. With respect to my timeshare module/week, I confirm that:
640
-                </p>
647
+                <p
648
+                  style="text-align: left; margin:auto; padding:10px"
649
+                >1. With respect to my timeshare module/week, I confirm that:</p>
641 650
                 <div class="validation"></div>
642 651
               </div>
643 652
             </div>
@@ -655,9 +664,11 @@
655 664
                     :checked="sellItem.leviesPaidInFull"
656 665
                     @change="changeLeviesPaidInFull"
657 666
                   />
658
-                  <label class="custom-control-label" for="customSwitch3">{{
667
+                  <label class="custom-control-label" for="customSwitch3">
668
+                    {{
659 669
                     sellItem.leviesPaidInFull ? "Yes" : "No"
660
-                  }}</label>
670
+                    }}
671
+                  </label>
661 672
                 </div>
662 673
                 <div class="validation"></div>
663 674
               </div>
@@ -676,9 +687,11 @@
676 687
                     :checked="sellItem.weekPlacedForRental"
677 688
                     @change="changeWeekPlacedForRental"
678 689
                   />
679
-                  <label class="custom-control-label" for="customSwitch4">{{
690
+                  <label class="custom-control-label" for="customSwitch4">
691
+                    {{
680 692
                     sellItem.weekPlacedForRental ? "Yes" : "No"
681
-                  }}</label>
693
+                    }}
694
+                  </label>
682 695
                 </div>
683 696
                 <div class="validation"></div>
684 697
               </div>
@@ -799,14 +812,12 @@
799 812
               </div>
800 813
             </div>
801 814
             <div class="text-center col-12" v-if="CanSave">
802
-              <button class="btn-solid-blue" v-if="!sellItem.id" @click="submitSale()">
803
-                SUBMIT
804
-              </button>
815
+              <button class="btn-solid-blue" v-if="!sellItem.id" @click="submitSale()">SUBMIT</button>
805 816
               <button class="btn-solid-blue" v-else @click="newSale()">NEW WEEK</button>
806 817
             </div>
807 818
             <!-- <div class="text-center col-12">
808 819
               <button class="btn-solid-blue" @click="paygateRedirect()">PayGate</button>
809
-            </div> -->
820
+            </div>-->
810 821
             <br />
811 822
             <br />
812 823
           </div>
@@ -884,7 +895,11 @@ export default {
884 895
     ...mapGetters("fees", ["getListingFee"]),
885 896
     filteredResort() {
886 897
       let list = [];
887
-      if (this.sellItem && this.sellItem.region && this.sellItem.region.regionCode) {
898
+      if (
899
+        this.sellItem &&
900
+        this.sellItem.region &&
901
+        this.sellItem.region.regionCode
902
+      ) {
888 903
         const item = this.detailedRegion.find(
889 904
           region => region.region.regionCode === this.sellItem.region.regionCode
890 905
         );
@@ -912,7 +927,11 @@ export default {
912 927
     },
913 928
     CanSave() {
914 929
       if (this.indiv.howMarried === "In Community Of Property") {
915
-        if (this.indiv.spouseName || this.indiv.spouseSurname || this.spouseEmail) {
930
+        if (
931
+          this.indiv.spouseName ||
932
+          this.indiv.spouseSurname ||
933
+          this.spouseEmail
934
+        ) {
916 935
           return true;
917 936
         }
918 937
         return false;
@@ -922,7 +941,12 @@ export default {
922 941
   },
923 942
   methods: {
924 943
     ...mapActions("individual", ["getIndividual"]),
925
-    ...mapActions("timeshare", ["initTimeshare", "onResortChange", "saveWeek", "getBlankWeek"]),
944
+    ...mapActions("timeshare", [
945
+      "initTimeshare",
946
+      "onResortChange",
947
+      "saveWeek",
948
+      "getBlankWeek"
949
+    ]),
926 950
     ...mapActions("payment", ["addPayment"]),
927 951
     ...mapActions("bank", ["getBanks"]),
928 952
     newSale() {
@@ -933,10 +957,11 @@ export default {
933 957
       if (this.userLoggedIn) {
934 958
         this.sellItem.ownerObject = this.indiv;
935 959
         this.sellItem.status = undefined;
936
-        this.saveWeek(this.sellItem).then(fulfilled => {
937
-          this.paygateRedirect();
938
-        });
939
-      } else this.$router.push("/user/login");
960
+        console.log(this.sellItem);
961
+        //   this.saveWeek(this.sellItem).then(fulfilled => {
962
+        //     this.paygateRedirect();
963
+        //   });
964
+      }
940 965
     },
941 966
     paygateRedirect() {
942 967
       var amount = this.getListingFee.amount;
@@ -992,7 +1017,9 @@ export default {
992 1017
       }
993 1018
     },
994 1019
     regionChange() {
995
-      this.sellItem.regionId = this.sellItem.region ? this.sellItem.region.id : 1;
1020
+      this.sellItem.regionId = this.sellItem.region
1021
+        ? this.sellItem.region.id
1022
+        : 1;
996 1023
     },
997 1024
     UpdateAddress(address) {
998 1025
       this.indiv.address.streetNumber = address.streetNumber;

正在加载...
取消
保存