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