|
@@ -19,9 +19,11 @@
|
19
|
19
|
<div class="form-row">
|
20
|
20
|
<div class="form-group col-md-6">
|
21
|
21
|
<div class="input-group">
|
22
|
|
- <label v-if="!selectedRegion" class="uniSelectLabel" for="weekInfoRegionSelect"
|
23
|
|
- >REGION</label
|
24
|
|
- >
|
|
22
|
+ <label
|
|
23
|
+ v-if="!selectedRegion"
|
|
24
|
+ class="uniSelectLabel"
|
|
25
|
+ for="weekInfoRegionSelect"
|
|
26
|
+ >REGION</label>
|
25
|
27
|
</div>
|
26
|
28
|
<float-label label="REGION" fixed>
|
27
|
29
|
<select
|
|
@@ -29,9 +31,11 @@
|
29
|
31
|
v-model="selectedRegion"
|
30
|
32
|
style="font-size: 15px"
|
31
|
33
|
>
|
32
|
|
- <option v-for="(region, r) in regions" :key="r" :value="region.regionCode">{{
|
|
34
|
+ <option v-for="(region, r) in regions" :key="r" :value="region.regionCode">
|
|
35
|
+ {{
|
33
|
36
|
region.regionName
|
34
|
|
- }}</option>
|
|
37
|
+ }}
|
|
38
|
+ </option>
|
35
|
39
|
</select>
|
36
|
40
|
</float-label>
|
37
|
41
|
|
|
@@ -48,8 +52,7 @@
|
48
|
52
|
v-for="(resort, r) in filteredResort"
|
49
|
53
|
:key="r"
|
50
|
54
|
:value="resort.resortCode"
|
51
|
|
- >{{ resort.resortName }}</option
|
52
|
|
- >
|
|
55
|
+ >{{ resort.resortName }}</option>
|
53
|
56
|
</select>
|
54
|
57
|
</float-label>
|
55
|
58
|
|
|
@@ -71,9 +74,7 @@
|
71
|
74
|
</div>
|
72
|
75
|
<div class="form-group col-md-6">
|
73
|
76
|
<div v-if="weekParam.otherResort">
|
74
|
|
- <label v-if="!weekParam.region" class="uniSelectLabel" for="region"
|
75
|
|
- >REGION</label
|
76
|
|
- >
|
|
77
|
+ <label v-if="!weekParam.region" class="uniSelectLabel" for="region">REGION</label>
|
77
|
78
|
</div>
|
78
|
79
|
<float-label>
|
79
|
80
|
<select
|
|
@@ -83,9 +84,11 @@
|
83
|
84
|
id="region"
|
84
|
85
|
v-model="weekParam.region"
|
85
|
86
|
>
|
86
|
|
- <option v-for="(region, r) in regions" :key="r">{{
|
|
87
|
+ <option v-for="(region, r) in regions" :key="r">
|
|
88
|
+ {{
|
87
|
89
|
region.regionName
|
88
|
|
- }}</option>
|
|
90
|
+ }}
|
|
91
|
+ </option>
|
89
|
92
|
</select>
|
90
|
93
|
</float-label>
|
91
|
94
|
</div>
|
|
@@ -242,9 +245,10 @@
|
242
|
245
|
id="customSwitch2"
|
243
|
246
|
:checked="sellItem.currentYearBanked"
|
244
|
247
|
/>
|
245
|
|
- <label class="custom-control-label" for="customSwitch2">
|
246
|
|
- {{ sellItem.currentYearBanked ? "Yes" : "No" }}
|
247
|
|
- </label>
|
|
248
|
+ <label
|
|
249
|
+ class="custom-control-label"
|
|
250
|
+ for="customSwitch2"
|
|
251
|
+ >{{ sellItem.currentYearBanked ? "Yes" : "No" }}</label>
|
248
|
252
|
<div
|
249
|
253
|
class="spacebanked1"
|
250
|
254
|
:class="{ 'spacebanked1--clicked': sellItem.currentYearBanked }"
|
|
@@ -253,8 +257,7 @@
|
253
|
257
|
<label
|
254
|
258
|
for="If yes, please confirm with whom"
|
255
|
259
|
v-if="sellItem.currentYearBanked"
|
256
|
|
- >Please confirm with whom</label
|
257
|
|
- >
|
|
260
|
+ >Please confirm with whom</label>
|
258
|
261
|
</div>
|
259
|
262
|
<div class="validation"></div>
|
260
|
263
|
</div>
|
|
@@ -361,7 +364,7 @@
|
361
|
364
|
placeholder="Cell Number"
|
362
|
365
|
data-rule="minlen:4"
|
363
|
366
|
data-msg="Please enter your cell number"
|
364
|
|
- v-model="week.owner.cellNumner"
|
|
367
|
+ v-model="week.owner.cellNumber"
|
365
|
368
|
/>
|
366
|
369
|
</float-label>
|
367
|
370
|
|
|
@@ -390,9 +393,7 @@
|
390
|
393
|
<div class="form">
|
391
|
394
|
<div class="row">
|
392
|
395
|
<div class="form-group col-md-6">
|
393
|
|
- <label v-if="!weekParam.weekStatus" class="uniSelectLabel" for="status"
|
394
|
|
- >STATUS</label
|
395
|
|
- >
|
|
396
|
+ <label v-if="!weekParam.weekStatus" class="uniSelectLabel" for="status">STATUS</label>
|
396
|
397
|
<float-label label="STATUS" fixed>
|
397
|
398
|
<select
|
398
|
399
|
class="form-control uniSelect"
|
|
@@ -406,9 +407,7 @@
|
406
|
407
|
</float-label>
|
407
|
408
|
</div>
|
408
|
409
|
<div class="form-group col-md-6">
|
409
|
|
- <label v-if="!weekParam.publish" class="uniSelectLabel" for="publish"
|
410
|
|
- >Publish</label
|
411
|
|
- >
|
|
410
|
+ <label v-if="!weekParam.publish" class="uniSelectLabel" for="publish">Publish</label>
|
412
|
411
|
<float-label label="Publish" fixed>
|
413
|
412
|
<select
|
414
|
413
|
class="form-control uniSelect"
|
|
@@ -515,11 +514,17 @@ export default {
|
515
|
514
|
this.selectedWeekType = this.weekParam.weekType;
|
516
|
515
|
this.selectedStatus = this.weekParam.status;
|
517
|
516
|
this.selectedPublish = this.weekParam.publish;
|
518
|
|
- var date = new Date(this.weekParam.arrivalDate).toISOString().substring(0, 10);
|
|
517
|
+ var date = new Date(this.weekParam.arrivalDate)
|
|
518
|
+ .toISOString()
|
|
519
|
+ .substring(0, 10);
|
519
|
520
|
this.dateParam = date;
|
520
|
|
- var depDate = new Date(this.weekParam.departureDate).toISOString().substring(0, 10);
|
|
521
|
+ var depDate = new Date(this.weekParam.departureDate)
|
|
522
|
+ .toISOString()
|
|
523
|
+ .substring(0, 10);
|
521
|
524
|
this.depDateParam = depDate;
|
522
|
|
- var datePub = new Date(this.weekParam.publish).toISOString().substring(0, 10);
|
|
525
|
+ var datePub = new Date(this.weekParam.publish)
|
|
526
|
+ .toISOString()
|
|
527
|
+ .substring(0, 10);
|
523
|
528
|
this.pubDateParam = datePub;
|
524
|
529
|
},
|
525
|
530
|
created() {
|
|
@@ -553,7 +558,11 @@ export default {
|
553
|
558
|
},
|
554
|
559
|
filteredResort() {
|
555
|
560
|
let list = [];
|
556
|
|
- if (this.sellItem && this.sellItem.region && this.sellItem.region.regionCode) {
|
|
561
|
+ if (
|
|
562
|
+ this.sellItem &&
|
|
563
|
+ this.sellItem.region &&
|
|
564
|
+ this.sellItem.region.regionCode
|
|
565
|
+ ) {
|
557
|
566
|
const item = this.detailedRegion.find(
|
558
|
567
|
region => region.region.regionCode === this.sellItem.region.regionCode
|
559
|
568
|
);
|
|
@@ -571,7 +580,12 @@ export default {
|
571
|
580
|
},
|
572
|
581
|
methods: {
|
573
|
582
|
...mapActions("individual", ["getIndividual"]),
|
574
|
|
- ...mapActions("timeshare", ["initTimeshare", "onResortChange", "saveWeek", "getBlankWeek"]),
|
|
583
|
+ ...mapActions("timeshare", [
|
|
584
|
+ "initTimeshare",
|
|
585
|
+ "onResortChange",
|
|
586
|
+ "saveWeek",
|
|
587
|
+ "getBlankWeek"
|
|
588
|
+ ]),
|
575
|
589
|
...mapActions("payment", ["addPayment"]),
|
576
|
590
|
...mapActions("bank", ["getBanks"]),
|
577
|
591
|
...mapActions("myWeeks", ["getItems", "getWeek", "editSave"]),
|
|
@@ -605,9 +619,18 @@ export default {
|
605
|
619
|
this.weekParam.maxSleep = sleepMax;
|
606
|
620
|
}
|
607
|
621
|
});
|
608
|
|
- this.weekParam.arrivalDate = new Date(this.dateParam).toISOString().substring(0, 10);
|
609
|
|
- this.weekParam.departureDate = new Date(this.depDateParam).toISOString().substring(0, 10);
|
610
|
|
- this.weekParam.publishedDate = new Date(this.pubDateParam).toISOString().substring(0, 10);
|
|
622
|
+ if (this.week.owner.cellNumber === "") {
|
|
623
|
+ this.week.owner.cellNumber = "0000000000";
|
|
624
|
+ }
|
|
625
|
+ this.weekParam.arrivalDate = new Date(this.dateParam)
|
|
626
|
+ .toISOString()
|
|
627
|
+ .substring(0, 10);
|
|
628
|
+ this.weekParam.departureDate = new Date(this.depDateParam)
|
|
629
|
+ .toISOString()
|
|
630
|
+ .substring(0, 10);
|
|
631
|
+ this.weekParam.publishedDate = new Date(this.pubDateParam)
|
|
632
|
+ .toISOString()
|
|
633
|
+ .substring(0, 10);
|
611
|
634
|
this.weekParam.regionId = this.weekParam.region.id;
|
612
|
635
|
this.weekParam.agentId = this.week.agentId;
|
613
|
636
|
this.weekParam.bankedWith = this.week.bankedWith;
|
|
@@ -619,7 +642,9 @@ export default {
|
619
|
642
|
delete this.weekParam.agency;
|
620
|
643
|
delete this.weekParam.agent;
|
621
|
644
|
delete this.status;
|
622
|
|
- console.log(this.weekParam);
|
|
645
|
+ delete this.weekParam.owner.howMarried;
|
|
646
|
+ delete this.weekParam.cellNumber;
|
|
647
|
+ console.log(JSON.stringify(this.weekParam));
|
623
|
648
|
this.editSave(this.weekParam);
|
624
|
649
|
},
|
625
|
650
|
resortChange() {
|