2 Commits

Author SHA1 Message Date
  Lene dd63ca59ed Merge branch 'master' of http://provision-sa.co.za:3000/Provision/UnivateProperties 4 years ago
  Lene 2a963ecd02 Timeshare admin page 4 years ago

+ 97
- 119
src/components/admin/status/editTimeShareAdminPage.vue View File

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

+ 16
- 6
src/components/admin/status/timeshareAdminPage.vue View File

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

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

Loading…
Cancel
Save