|
@@ -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,19 +19,21 @@
|
64
|
19
|
<div class="form-row">
|
65
|
20
|
<div class="form-group col-md-6">
|
66
|
21
|
<div class="input-group">
|
67
|
|
- <!-- {{weekParam}} -->
|
68
|
22
|
<label class="uniSelectLabel" for="weekInfoRegionSelect">REGION</label>
|
69
|
|
- <select
|
70
|
|
- class="form-control uniSelect"
|
71
|
|
- v-model="selectedRegion"
|
72
|
|
- style="font-size: 15px"
|
73
|
|
- >
|
74
|
|
- <option v-for="(region, r) in regions" :key="r" :value="region.regionCode">{{
|
75
|
|
- region.regionName
|
76
|
|
- }}</option>
|
77
|
|
- </select>
|
78
|
|
- <div class="validation"></div>
|
79
|
23
|
</div>
|
|
24
|
+ <select
|
|
25
|
+ class="form-control uniSelect"
|
|
26
|
+ v-model="selectedRegion"
|
|
27
|
+ style="font-size: 15px"
|
|
28
|
+ >
|
|
29
|
+ <option
|
|
30
|
+ v-for="(region, r) in regions"
|
|
31
|
+ :key="r"
|
|
32
|
+ :value="region.regionCode"
|
|
33
|
+ >{{ region.regionName }}</option>
|
|
34
|
+ </select>
|
|
35
|
+ <div class="validation"></div>
|
|
36
|
+
|
80
|
37
|
<div class="validation"></div>
|
81
|
38
|
</div>
|
82
|
39
|
<div class="form-group col-md-6">
|
|
@@ -89,8 +46,7 @@
|
89
|
46
|
v-for="(resort, r) in filteredResort"
|
90
|
47
|
:key="r"
|
91
|
48
|
:value="resort.resortCode"
|
92
|
|
- >{{ resort.resortName }}</option
|
93
|
|
- >
|
|
49
|
+ >{{ resort.resortName }}</option>
|
94
|
50
|
</select>
|
95
|
51
|
<div class="validation"></div>
|
96
|
52
|
</div>
|
|
@@ -108,9 +64,7 @@
|
108
|
64
|
</div>
|
109
|
65
|
<div class="form-group col-md-6">
|
110
|
66
|
<div v-if="weekParam.otherResort">
|
111
|
|
- <label v-if="!weekParam.region" class="uniSelectLabel" for="region"
|
112
|
|
- >REGION</label
|
113
|
|
- >
|
|
67
|
+ <label v-if="!weekParam.region" class="uniSelectLabel" for="region">REGION</label>
|
114
|
68
|
</div>
|
115
|
69
|
|
116
|
70
|
<select
|
|
@@ -216,20 +170,20 @@
|
216
|
170
|
<div class="form-group col-md-6">
|
217
|
171
|
Arrival Date :
|
218
|
172
|
<input
|
219
|
|
- type="datetime-local"
|
|
173
|
+ type="date"
|
220
|
174
|
class="form-control"
|
221
|
175
|
name="occupationDate1"
|
222
|
|
- v-model="weekParam.arrivalDate"
|
|
176
|
+ v-model="dateParam"
|
223
|
177
|
/>
|
224
|
178
|
<div class="validation"></div>
|
225
|
179
|
</div>
|
226
|
180
|
<div class="form-group col-md-6">
|
227
|
181
|
Departure Date :
|
228
|
182
|
<input
|
229
|
|
- type="datetime-local"
|
|
183
|
+ type="date"
|
230
|
184
|
class="form-control"
|
231
|
185
|
name="occupationDate2"
|
232
|
|
- v-model="weekParam.departureDate"
|
|
186
|
+ v-model="depDateParam"
|
233
|
187
|
/>
|
234
|
188
|
<div class="validation"></div>
|
235
|
189
|
</div>
|
|
@@ -258,9 +212,11 @@
|
258
|
212
|
id="customSwitch2"
|
259
|
213
|
:checked="sellItem.currentYearBanked"
|
260
|
214
|
/>
|
261
|
|
- <label class="custom-control-label" for="customSwitch2">{{
|
|
215
|
+ <label class="custom-control-label" for="customSwitch2">
|
|
216
|
+ {{
|
262
|
217
|
sellItem.currentYearBanked ? "Yes" : "No"
|
263
|
|
- }}</label>
|
|
218
|
+ }}
|
|
219
|
+ </label>
|
264
|
220
|
<div
|
265
|
221
|
class="spacebanked1"
|
266
|
222
|
:class="{ 'spacebanked1--clicked': sellItem.currentYearBanked }"
|
|
@@ -269,26 +225,7 @@
|
269
|
225
|
<label
|
270
|
226
|
for="If yes, please confirm with whom"
|
271
|
227
|
v-if="sellItem.currentYearBanked"
|
272
|
|
- >Please confirm with whom</label
|
273
|
|
- >
|
274
|
|
- <select
|
275
|
|
- class="form-control uniSelect"
|
276
|
|
- id="howMarried"
|
277
|
|
- v-model="indiv.howMarried"
|
278
|
|
- >
|
279
|
|
- <option value="N/A">N/A</option>
|
280
|
|
- <option value="In Community Of Property">In Community Of Property</option>
|
281
|
|
- <option value="Out of Community Of Property"
|
282
|
|
- >Out of Community Of Property</option
|
283
|
|
- >
|
284
|
|
- <option value="Other">Other</option>
|
285
|
|
- <option value="Traditional Wedding">Traditional Wedding</option>
|
286
|
|
- <option value="Single">Single</option>
|
287
|
|
- <option value="Divorced">Divorced</option>
|
288
|
|
- <option value="Widow">Widow</option>
|
289
|
|
- <option value="Committed Relationship">Committed Relationship</option>
|
290
|
|
- <option value="Partner">Partner</option>
|
291
|
|
- </select>
|
|
228
|
+ >Please confirm with whom</label>
|
292
|
229
|
</div>
|
293
|
230
|
<div class="validation"></div>
|
294
|
231
|
</div>
|
|
@@ -403,36 +340,36 @@
|
403
|
340
|
<div class="form">
|
404
|
341
|
<div class="row">
|
405
|
342
|
<div class="form-group col-md-6">
|
406
|
|
- <label class="uniSelectLabel" for="region">STATUS</label>
|
|
343
|
+ <label class="uniSelectLabel" for="status">STATUS</label>
|
407
|
344
|
<select
|
408
|
345
|
class="form-control uniSelect"
|
409
|
|
- name="region"
|
410
|
|
- id="region"
|
411
|
|
- v-model="selectedWeekType"
|
|
346
|
+ name="status"
|
|
347
|
+ id="status"
|
|
348
|
+ v-model="weekParam.weekStatus"
|
412
|
349
|
>
|
413
|
350
|
<option :key="0">For Sale</option>
|
414
|
351
|
<option :key="1">Sold</option>
|
415
|
352
|
</select>
|
416
|
353
|
</div>
|
417
|
354
|
<div class="form-group col-md-6">
|
418
|
|
- <label class="uniSelectLabel" for="region">Publish</label>
|
|
355
|
+ <label class="uniSelectLabel" for="publish">Publish</label>
|
419
|
356
|
<select
|
420
|
357
|
class="form-control uniSelect"
|
421
|
|
- name="region"
|
422
|
|
- id="region"
|
423
|
|
- v-model="selectedWeekType"
|
|
358
|
+ name="publish"
|
|
359
|
+ id="publish"
|
|
360
|
+ v-model="weekParam.publish"
|
424
|
361
|
>
|
425
|
|
- <option :key="0">Yes</option>
|
426
|
|
- <option :key="1">No</option>
|
|
362
|
+ <option :key="0" :value="false">No</option>
|
|
363
|
+ <option :key="1" :value="true">Yes</option>
|
427
|
364
|
</select>
|
428
|
365
|
</div>
|
429
|
366
|
<div class="form-group col-md-6">
|
430
|
367
|
Date Published :
|
431
|
368
|
<input
|
432
|
|
- type="datetime-local"
|
|
369
|
+ type="date"
|
433
|
370
|
class="form-control"
|
434
|
|
- name="occupationDate2"
|
435
|
|
- v-model="datetime"
|
|
371
|
+ name="publishDate"
|
|
372
|
+ v-model="pubDateParam"
|
436
|
373
|
/>
|
437
|
374
|
<div class="validation"></div>
|
438
|
375
|
</div>
|
|
@@ -442,9 +379,7 @@
|
442
|
379
|
<div id="sendmessage">Your details has been sent. Thank you!</div>
|
443
|
380
|
<div id="errormessage"></div>
|
444
|
381
|
<div class="text-center col-12">
|
445
|
|
- <button class="btn-solid-blue" v-on:click="saveEdit()">
|
446
|
|
- Save
|
447
|
|
- </button>
|
|
382
|
+ <button class="btn-solid-blue" v-on:click="saveEdit()">Save</button>
|
448
|
383
|
</div>
|
449
|
384
|
<div class="text-center col-12">
|
450
|
385
|
<button class="btn-solid-blue" v-on:click="backToListView()">Back</button>
|
|
@@ -488,7 +423,12 @@ export default {
|
488
|
423
|
selectedSeason: {},
|
489
|
424
|
selectedBedrooms: {},
|
490
|
425
|
selectedMaxSleep: {},
|
491
|
|
- selectedWeekType: {}
|
|
426
|
+ selectedWeekType: {},
|
|
427
|
+ selectedStatus: {},
|
|
428
|
+ selectedPublish: {},
|
|
429
|
+ dateParam: {},
|
|
430
|
+ depDateParam: {},
|
|
431
|
+ pubDateParam: {}
|
492
|
432
|
};
|
493
|
433
|
},
|
494
|
434
|
components: {
|
|
@@ -513,6 +453,20 @@ export default {
|
513
|
453
|
this.selectedBedrooms = this.weekParam.bedrooms;
|
514
|
454
|
this.selectedMaxSleep = this.weekParam.maxSleep;
|
515
|
455
|
this.selectedWeekType = this.weekParam.weekType;
|
|
456
|
+ this.selectedStatus = this.weekParam.status;
|
|
457
|
+ this.selectedPublish = this.weekParam.publish;
|
|
458
|
+ var date = new Date(this.weekParam.arrivalDate)
|
|
459
|
+ .toISOString()
|
|
460
|
+ .substring(0, 10);
|
|
461
|
+ this.dateParam = date;
|
|
462
|
+ var depDate = new Date(this.weekParam.departureDate)
|
|
463
|
+ .toISOString()
|
|
464
|
+ .substring(0, 10);
|
|
465
|
+ this.depDateParam = depDate;
|
|
466
|
+ var datePub = new Date(this.weekParam.publish)
|
|
467
|
+ .toISOString()
|
|
468
|
+ .substring(0, 10);
|
|
469
|
+ this.pubDateParam = datePub;
|
516
|
470
|
},
|
517
|
471
|
created() {
|
518
|
472
|
this.initTimeshare(this.weekId);
|
|
@@ -545,7 +499,11 @@ export default {
|
545
|
499
|
},
|
546
|
500
|
filteredResort() {
|
547
|
501
|
let list = [];
|
548
|
|
- if (this.sellItem && this.sellItem.region && this.sellItem.region.regionCode) {
|
|
502
|
+ if (
|
|
503
|
+ this.sellItem &&
|
|
504
|
+ this.sellItem.region &&
|
|
505
|
+ this.sellItem.region.regionCode
|
|
506
|
+ ) {
|
549
|
507
|
const item = this.detailedRegion.find(
|
550
|
508
|
region => region.region.regionCode === this.sellItem.region.regionCode
|
551
|
509
|
);
|
|
@@ -563,7 +521,12 @@ export default {
|
563
|
521
|
},
|
564
|
522
|
methods: {
|
565
|
523
|
...mapActions("individual", ["getIndividual"]),
|
566
|
|
- ...mapActions("timeshare", ["initTimeshare", "onResortChange", "saveWeek", "getBlankWeek"]),
|
|
524
|
+ ...mapActions("timeshare", [
|
|
525
|
+ "initTimeshare",
|
|
526
|
+ "onResortChange",
|
|
527
|
+ "saveWeek",
|
|
528
|
+ "getBlankWeek"
|
|
529
|
+ ]),
|
567
|
530
|
...mapActions("payment", ["addPayment"]),
|
568
|
531
|
...mapActions("bank", ["getBanks"]),
|
569
|
532
|
...mapActions("myWeeks", ["getItems", "getWeek", "editSave"]),
|
|
@@ -579,29 +542,44 @@ export default {
|
579
|
542
|
});
|
580
|
543
|
this.resorts.forEach(resort => {
|
581
|
544
|
if (resort.resortCode === this.selectedResort) {
|
582
|
|
- this.weekParam.resort = resort;
|
|
545
|
+ this.weekParam.resortName = resort.resortName;
|
583
|
546
|
}
|
584
|
547
|
});
|
585
|
548
|
this.seasons.forEach(season => {
|
586
|
|
- if (season.name === this.selectedSeason) {
|
587
|
|
- this.weekParam.season = season;
|
|
549
|
+ if (season.name === this.selectedSeason.name) {
|
|
550
|
+ this.weekParam.season = season.name;
|
588
|
551
|
}
|
589
|
552
|
});
|
590
|
|
- this.bedrooms.forEach(beedroom => {
|
|
553
|
+ this.resortBedrooms.forEach(bedroom => {
|
591
|
554
|
if (bedroom === this.selectedBedrooms) {
|
592
|
|
- this.weekParam.beedroom = beedroom;
|
|
555
|
+ this.weekParam.bedroom = bedroom;
|
593
|
556
|
}
|
594
|
557
|
});
|
595
|
558
|
this.maxSleep.forEach(sleepMax => {
|
596
|
|
- if (maxSleep === this.selectedMaxSleep) {
|
597
|
|
- this.weekParam.maxSleep = maxSleep;
|
598
|
|
- }
|
599
|
|
- });
|
600
|
|
- this.weekType.forEach(typeWeek => {
|
601
|
|
- if (weekType === this.selectedWeekType) {
|
602
|
|
- this.weekParam.weekType = weekType;
|
|
559
|
+ if (sleepMax === this.selectedMaxSleep) {
|
|
560
|
+ this.weekParam.maxSleep = sleepMax;
|
603
|
561
|
}
|
604
|
562
|
});
|
|
563
|
+ this.weekParam.arrivalDate = new Date(this.dateParam)
|
|
564
|
+ .toISOString()
|
|
565
|
+ .substring(0, 10);
|
|
566
|
+ this.weekParam.departureDate = new Date(this.depDateParam)
|
|
567
|
+ .toISOString()
|
|
568
|
+ .substring(0, 10);
|
|
569
|
+ this.weekParam.publishedDate = new Date(this.pubDateParam)
|
|
570
|
+ .toISOString()
|
|
571
|
+ .substring(0, 10);
|
|
572
|
+ this.weekParam.regionId = this.weekParam.region.id;
|
|
573
|
+ this.weekParam.agentId = this.week.agentId;
|
|
574
|
+ this.weekParam.bankedWith = this.week.bankedWith;
|
|
575
|
+ this.weekParam.owner = this.week.owner;
|
|
576
|
+ parseFloat(this.weekParam.sellPrice);
|
|
577
|
+ parseFloat(this.weekParam.levyAmount);
|
|
578
|
+ delete this.weekParam.weekType;
|
|
579
|
+ delete this.weekParam.Owner;
|
|
580
|
+ delete this.weekParam.agency;
|
|
581
|
+ delete this.weekParam.agent;
|
|
582
|
+ delete this.status;
|
605
|
583
|
console.log(this.weekParam);
|
606
|
584
|
this.editSave(this.weekParam);
|
607
|
585
|
},
|