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