Browse Source

Univate.2 > Timeshare To Sell Changes

master
George Williams 4 years ago
parent
commit
cfe8cb94d5
1 changed files with 176 additions and 155 deletions
  1. 176
    155
      src/components/timeshare/sell/contentSection.vue

+ 176
- 155
src/components/timeshare/sell/contentSection.vue View File

18
                   :checked="refAgent"
18
                   :checked="refAgent"
19
                   @change="changeRef"
19
                   @change="changeRef"
20
                 />
20
                 />
21
-                <label
22
-                  class="custom-control-label"
23
-                  for="customSwitch1"
24
-                >{{ refAgent ? "Yes" : "No" }}</label>
21
+                <label class="custom-control-label" for="customSwitch1">{{
22
+                  refAgent ? "Yes" : "No"
23
+                }}</label>
25
                 <div class="refbyAgent" :class="{ 'refbyAgent--clicked': refAgent }">
24
                 <div class="refbyAgent" :class="{ 'refbyAgent--clicked': refAgent }">
26
                   <div class="col-md-6" v-if="refAgent">
25
                   <div class="col-md-6" v-if="refAgent">
27
                     <label for="Name of Agency">Agency</label>
26
                     <label for="Name of Agency">Agency</label>
32
                       v-model="sellItem.agencyId"
31
                       v-model="sellItem.agencyId"
33
                     >
32
                     >
34
                       <option v-for="(item, i) in agencies" :key="i" :value="item.id">
33
                       <option v-for="(item, i) in agencies" :key="i" :value="item.id">
35
-                        {{
36
-                        item.agencyName
37
-                        }}
34
+                        {{ item.agencyName }}
38
                       </option>
35
                       </option>
39
                     </select>
36
                     </select>
40
                   </div>
37
                   </div>
67
             <div class="form-row">
64
             <div class="form-row">
68
               <div class="form-group col-md-6">
65
               <div class="form-group col-md-6">
69
                 <div class="input-group">
66
                 <div class="input-group">
70
-                  <label
71
-                    v-if="!sellItem.region"
72
-                    class="uniSelectLabel"
73
-                    for="weekInfoRegionSelect"
74
-                  >REGION</label>
67
+                  <label v-if="!sellItem.region" class="uniSelectLabel" for="weekInfoRegionSelect"
68
+                    >REGION</label
69
+                  >
75
 
70
 
76
                   <select
71
                   <select
77
                     id="weekInfoRegionSelect"
72
                     id="weekInfoRegionSelect"
80
                     @change="regionChange()"
75
                     @change="regionChange()"
81
                     style="font-size: 15px"
76
                     style="font-size: 15px"
82
                   >
77
                   >
83
-                    <option
84
-                      v-for="(region, r) in regions"
85
-                      :key="r"
86
-                      :value="region"
87
-                    >{{ region.regionName }}</option>
78
+                    <option v-for="(region, r) in regions" :key="r" :value="region">{{
79
+                      region.regionName
80
+                    }}</option>
88
                   </select>
81
                   </select>
89
                 </div>
82
                 </div>
90
 
83
 
101
               </div>
94
               </div>
102
               <div class="form-group col-md-6">
95
               <div class="form-group col-md-6">
103
                 <div class="input-group">
96
                 <div class="input-group">
104
-                  <label
105
-                    v-if="!sellItem.resort"
106
-                    class="uniSelectLabel"
107
-                    for="weekInfoResortSelect"
108
-                  >RESORT NAME</label>
97
+                  <label v-if="!sellItem.resort" class="uniSelectLabel" for="weekInfoResortSelect"
98
+                    >RESORT NAME</label
99
+                  >
109
 
100
 
110
                   <select
101
                   <select
111
                     id="weekInfoResortSelect"
102
                     id="weekInfoResortSelect"
114
                     @change="resortChange()"
105
                     @change="resortChange()"
115
                   >
106
                   >
116
                     <option value="Other">Other</option>
107
                     <option value="Other">Other</option>
117
-                    <option
118
-                      v-for="(resort, r) in filteredResort"
119
-                      :key="r"
120
-                      :value="resort"
121
-                    >{{ resort.resortName }}</option>
108
+                    <option v-for="(resort, r) in filteredResort" :key="r" :value="resort">{{
109
+                      resort.resortName
110
+                    }}</option>
122
                   </select>
111
                   </select>
123
                 </div>
112
                 </div>
124
                 <!-- <input
113
                 <!-- <input
195
                 <div class="validation"></div>
184
                 <div class="validation"></div>
196
               </div>
185
               </div>
197
               <div class="form-group col-md-6">
186
               <div class="form-group col-md-6">
198
-                <label v-if="!sellItem.bedrooms" class="uniSelectLabel" for="region">BEDROOM/S</label>
187
+                <label v-if="!sellItem.bedrooms" class="uniSelectLabel" for="region"
188
+                  >BEDROOM/S</label
189
+                >
199
 
190
 
200
                 <select
191
                 <select
201
                   class="form-control uniSelect"
192
                   class="form-control uniSelect"
208
                 <div class="validation"></div>
199
                 <div class="validation"></div>
209
               </div>
200
               </div>
210
               <div class="form-group col-md-6">
201
               <div class="form-group col-md-6">
211
-                <label v-if="!sellItem.maxSleep" class="uniSelectLabel" for="region">SLEEP MAX</label>
202
+                <label v-if="!sellItem.maxSleep" class="uniSelectLabel" for="region"
203
+                  >SLEEP MAX</label
204
+                >
212
 
205
 
213
                 <select
206
                 <select
214
                   class="form-control uniSelect"
207
                   class="form-control uniSelect"
233
                 <div class="validation"></div>
226
                 <div class="validation"></div>
234
               </div>
227
               </div>
235
               <div class="form-group col-md-6">
228
               <div class="form-group col-md-6">
236
-                <label v-if="!sellItem.weekType" class="uniSelectLabel" for="region">WEEK TYPE</label>
229
+                <label v-if="!sellItem.weekType" class="uniSelectLabel" for="region"
230
+                  >WEEK TYPE</label
231
+                >
237
                 <select
232
                 <select
238
                   class="form-control uniSelect"
233
                   class="form-control uniSelect"
239
                   name="region"
234
                   name="region"
259
                   :checked="sellItem.currentYearBanked"
254
                   :checked="sellItem.currentYearBanked"
260
                   @change="changeCurrentBanked"
255
                   @change="changeCurrentBanked"
261
                 />
256
                 />
262
-                <label
263
-                  class="custom-control-label"
264
-                  for="customSwitch2"
265
-                >{{ sellItem.currentYearBanked ? "Yes" : "No" }}</label>
257
+                <label class="custom-control-label" for="customSwitch2">{{
258
+                  sellItem.currentYearBanked ? "Yes" : "No"
259
+                }}</label>
266
                 <div
260
                 <div
267
                   class="spacebanked1"
261
                   class="spacebanked1"
268
                   :class="{ 'spacebanked1--clicked': sellItem.currentYearBanked }"
262
                   :class="{ 'spacebanked1--clicked': sellItem.currentYearBanked }"
269
                 >
263
                 >
270
                   <div class="col-md-6">
264
                   <div class="col-md-6">
271
-                    <label
272
-                      for="If yes, please confirm with whom"
273
-                      v-if="sellItem.currentYearBanked"
274
-                    >Please confirm with whom</label>
265
+                    <label for="If yes, please confirm with whom" v-if="sellItem.currentYearBanked"
266
+                      >Please confirm with whom</label
267
+                    >
275
                     <select
268
                     <select
276
                       class="form-control uniSelect"
269
                       class="form-control uniSelect"
277
                       name="spacebankOwner"
270
                       name="spacebankOwner"
347
             </div>
340
             </div>
348
             <div class="row">
341
             <div class="row">
349
               <div class="form-group col-md-6">
342
               <div class="form-group col-md-6">
350
-                <input
351
-                  type="text"
352
-                  name="marital"
353
-                  class="form-control"
354
-                  id="marital"
355
-                  placeholder="Marital Status"
356
-                  data-rule="minlen:4"
357
-                  data-msg="Please enter your marital status"
358
-                  v-model="indiv.maritalStatus"
359
-                />
343
+                <div class="input-group">
344
+                  <label
345
+                    v-if="!indiv.howMarried || indiv.howMarried === 'NotApplicable'"
346
+                    for="howMarried"
347
+                    class="uniSelectLabel"
348
+                    >Marital Status</label
349
+                  >
350
+                  <select class="form-control uniSelect" id="howMarried" v-model="indiv.howMarried">
351
+                    <option value="N/A">N/A</option>
352
+                    <option value="In Community Of Property">In Community Of Property</option>
353
+                    <option value="Out of Community Of Property"
354
+                      >Out of Community Of Property</option
355
+                    >
356
+                    <option value="Other">Other</option>
357
+                    <option value="Traditional Wedding">Traditional Wedding</option>
358
+                    <option value="Single">Single</option>
359
+                    <option value="Divorced">Divorced</option>
360
+                    <option value="Widow">Widow</option>
361
+                    <option value="Committed Relationship">Committed Relationship</option>
362
+                    <option value="Partner">Partner</option>
363
+                  </select>
364
+                </div>
360
                 <div class="validation"></div>
365
                 <div class="validation"></div>
361
               </div>
366
               </div>
362
               <div class="form-group col-md-6">
367
               <div class="form-group col-md-6">
400
               </div>
405
               </div>
401
             </div>
406
             </div>
402
           </div>
407
           </div>
408
+          <div v-if="indiv.howMarried === 'In Community Of Property'" class="section-header">
409
+            <h2>Spouse Details</h2>
410
+          </div>
411
+          <div v-if="indiv.howMarried === 'In Community Of Property'" class="form">
412
+            <div class="form-row">
413
+              <div class="form-group col-md-6">
414
+                <input
415
+                  type="text"
416
+                  class="form-control"
417
+                  placeholder="SPOUSE NAME"
418
+                  data-msg="Please enter your spouse's name"
419
+                  v-model="indiv.spouseName"
420
+                />
421
+                <div class="validation"></div>
422
+              </div>
423
+              <div class="form-group col-md-6">
424
+                <input
425
+                  type="text"
426
+                  class="form-control"
427
+                  placeholder="SPOUSE SURNAME"
428
+                  data-msg="Please enter your spouse's surname"
429
+                  v-model="indiv.spouseSurname"
430
+                />
431
+                <div class="validation"></div>
432
+              </div>
433
+              <div class="form-group col-md-6">
434
+                <input
435
+                  type="text"
436
+                  class="form-control"
437
+                  placeholder="SPOUSE EMAIL"
438
+                  data-rule="minlen:4"
439
+                  data-msg="Please enter your spouse's email"
440
+                  v-model="indiv.spouseEmail"
441
+                />
442
+                <div class="validation"></div>
443
+              </div>
444
+              <div class="form-group col-md-6">
445
+                <input
446
+                  type="text"
447
+                  class="form-control"
448
+                  placeholder="SPOUSE TELEPHONE"
449
+                  data-rule="minlen:4"
450
+                  data-msg="Please enter your spouse's telephone number"
451
+                  v-model="indiv.spouseTelephone"
452
+                />
453
+                <div class="validation"></div>
454
+              </div>
455
+              <div class="form-group col-md-6">
456
+                <input
457
+                  type="text"
458
+                  class="form-control"
459
+                  placeholder="SPOUSE CELL NUMBER"
460
+                  data-rule="minlen:4"
461
+                  data-msg="Please enter your spouse's cellphone number"
462
+                  v-model="indiv.spouseCellnumber"
463
+                />
464
+                <div class="validation"></div>
465
+              </div>
466
+            </div>
467
+          </div>
468
+
403
           <div class="section-header">
469
           <div class="section-header">
404
             <h2>Address</h2>
470
             <h2>Address</h2>
405
           </div>
471
           </div>
494
               </div>
560
               </div>
495
             </div>
561
             </div>
496
           </div>
562
           </div>
497
-          <div class="section-header">
498
-            <h2>Banking Details</h2>
499
-          </div>
500
-          <div class="form">
501
-            <div class="form-row">
502
-              <div class="form-group col-md-6">
503
-                <div class="input-group">
504
-                  <label
505
-                    v-if="!indiv.bankingDetails.bank"
506
-                    class="uniSelectLabel"
507
-                    for="weekInfoRegionSelect"
508
-                  >BANK</label>
509
-
510
-                  <select
511
-                    id="weekInfoRegionSelect"
512
-                    class="form-control uniSelect"
513
-                    @change="regionChange()"
514
-                    style="font-size: 15px"
515
-                    v-model="indiv.bankingDetails.bank"
516
-                  >
517
-                    <option v-for="bank in banks" :key="bank.id" :value="bank">{{ bank.name }}</option>
518
-                  </select>
519
-                </div>
520
-                <div class="validation"></div>
521
-              </div>
522
-              <div class="form-group col-md-6">
523
-                <input
524
-                  type="text"
525
-                  class="form-control"
526
-                  name="acc-nr"
527
-                  id="acc-nr"
528
-                  placeholder="Account Number"
529
-                  data-msg="Please enter account number"
530
-                  v-model="indiv.bankingDetails.accountNumber"
531
-                />
532
-                <div class="validation"></div>
533
-              </div>
534
-              <div class="form-group col-md-6">
535
-                <input
536
-                  type="text"
537
-                  name="holder"
538
-                  class="form-control"
539
-                  id="holder"
540
-                  placeholder="Account Holder"
541
-                  data-rule="minlen:4"
542
-                  data-msg="Please enter account holder"
543
-                  v-model="indiv.bankingDetails.accountHolder"
544
-                />
545
-                <div class="validation"></div>
546
-              </div>
547
-            </div>
548
-          </div>
549
 
563
 
550
           <div class="section-header">
564
           <div class="section-header">
551
             <h2>Share Transfer Information</h2>
565
             <h2>Share Transfer Information</h2>
559
                 class="form-group col-md-12"
573
                 class="form-group col-md-12"
560
                 style="border:solid;border-width:2px; border-color:rgb(27, 117, 187); border-radius: 3px"
574
                 style="border:solid;border-width:2px; border-color:rgb(27, 117, 187); border-radius: 3px"
561
               >
575
               >
562
-                <p
563
-                  style="text-align: left; margin:auto; padding:10px"
564
-                >1. With respect to my timeshare module/week, I confirm that:</p>
576
+                <p style="text-align: left; margin:auto; padding:10px">
577
+                  1. With respect to my timeshare module/week, I confirm that:
578
+                </p>
565
                 <div class="validation"></div>
579
                 <div class="validation"></div>
566
               </div>
580
               </div>
567
             </div>
581
             </div>
579
                     :checked="sellItem.leviesPaidInFull"
593
                     :checked="sellItem.leviesPaidInFull"
580
                     @change="changeLeviesPaidInFull"
594
                     @change="changeLeviesPaidInFull"
581
                   />
595
                   />
582
-                  <label
583
-                    class="custom-control-label"
584
-                    for="customSwitch3"
585
-                  >{{ sellItem.leviesPaidInFull ? "Yes" : "No" }}</label>
596
+                  <label class="custom-control-label" for="customSwitch3">{{
597
+                    sellItem.leviesPaidInFull ? "Yes" : "No"
598
+                  }}</label>
586
                 </div>
599
                 </div>
587
                 <div class="validation"></div>
600
                 <div class="validation"></div>
588
               </div>
601
               </div>
590
 
603
 
591
             <div class="form-row">
604
             <div class="form-row">
592
               <div class="col-md-8">
605
               <div class="col-md-8">
593
-                <p>1.2. My week is placed for rental this year</p>
606
+                <p>1.2. My week is placed on rental or exchange this year</p>
594
               </div>
607
               </div>
595
               <div class="form-group col-md-2">
608
               <div class="form-group col-md-2">
596
                 <div class="custom-control custom-switch">
609
                 <div class="custom-control custom-switch">
601
                     :checked="sellItem.weekPlacedForRental"
614
                     :checked="sellItem.weekPlacedForRental"
602
                     @change="changeWeekPlacedForRental"
615
                     @change="changeWeekPlacedForRental"
603
                   />
616
                   />
604
-                  <label
605
-                    class="custom-control-label"
606
-                    for="customSwitch4"
607
-                  >{{ sellItem.weekPlacedForRental ? "Yes" : "No" }}</label>
617
+                  <label class="custom-control-label" for="customSwitch4">{{
618
+                    sellItem.weekPlacedForRental ? "Yes" : "No"
619
+                  }}</label>
608
                 </div>
620
                 </div>
609
                 <div class="validation"></div>
621
                 <div class="validation"></div>
610
               </div>
622
               </div>
710
 
722
 
711
             <div class="form-row">
723
             <div class="form-row">
712
               <div class="col-md-8">
724
               <div class="col-md-8">
713
-                <p>1.8. Mandate to sell timeshare</p>
725
+                <p>
726
+                  1.8. I hereby Mandate Uni-Vate properties to sell the timeshare listed above on my
727
+                  behalf
728
+                </p>
714
               </div>
729
               </div>
715
               <div class="form-group col-md-4">
730
               <div class="form-group col-md-4">
716
-                <div class="custom-file">
717
-                  <input class="custom-file-input mb-2" type="file" name="mandate" />
718
-                  <label class="custom-file-label" for="customFile">Choose file</label>
719
-                </div>
720
-
721
-                <div class="validation"></div>
731
+                <input type="checkbox" @change="SetMandateDate" v-model="sellItem.mandate" />
722
               </div>
732
               </div>
723
             </div>
733
             </div>
724
-            <div class="text-center col-12">
725
-              <button class="btn-solid-blue" v-if="!sellItem.id" @click="submitSale()">SUBMIT</button>
734
+            <div class="form-row" v-if="!CanSave">
735
+              <div class="col-md-12">
736
+                <p class="alert myError">Please ensure that you add spouse details.</p>
737
+              </div>
738
+            </div>
739
+            <div class="text-center col-12" v-if="CanSave">
740
+              <button class="btn-solid-blue" v-if="!sellItem.id" @click="submitSale()">
741
+                SUBMIT
742
+              </button>
726
               <button class="btn-solid-blue" v-else @click="newSale()">NEW WEEK</button>
743
               <button class="btn-solid-blue" v-else @click="newSale()">NEW WEEK</button>
727
             </div>
744
             </div>
728
             <div class="text-center col-12">
745
             <div class="text-center col-12">
747
 import addressAutoComplete from "../../shared/addressAutoComplete";
764
 import addressAutoComplete from "../../shared/addressAutoComplete";
748
 import Alert from "../../shared/alert.vue";
765
 import Alert from "../../shared/alert.vue";
749
 import Log from "../../../assets/Log";
766
 import Log from "../../../assets/Log";
767
+import _ from "lodash";
750
 
768
 
751
 export default {
769
 export default {
752
   name: "TimeshareToSell",
770
   name: "TimeshareToSell",
753
   props: {
771
   props: {
754
     weekId: {
772
     weekId: {
755
-      default: 0,
756
-    },
773
+      default: 0
774
+    }
757
   },
775
   },
758
   data() {
776
   data() {
759
     return {
777
     return {
760
       wait: false,
778
       wait: false,
761
-      userLoggedIn: Log.isLoggedIn(),
779
+      userLoggedIn: Log.isLoggedIn()
762
     };
780
     };
763
   },
781
   },
764
   components: {
782
   components: {
765
     addressAutoComplete,
783
     addressAutoComplete,
766
-    Alert,
784
+    Alert
767
   },
785
   },
768
   mounted() {
786
   mounted() {
769
     if (this.sellItem.id) {
787
     if (this.sellItem.id) {
789
       "sellItem",
807
       "sellItem",
790
       "agencies",
808
       "agencies",
791
       "agents",
809
       "agents",
792
-      "getTemplate",
810
+      "getTemplate"
793
     ]),
811
     ]),
794
     ...mapState("individual", ["indiv"]),
812
     ...mapState("individual", ["indiv"]),
795
     ...mapState("authentication", ["isLoggedIn"]),
813
     ...mapState("authentication", ["isLoggedIn"]),
796
     ...mapGetters({
814
     ...mapGetters({
797
       user: "authentication/getUser",
815
       user: "authentication/getUser",
798
-      person: "authentication/getPerson",
816
+      person: "authentication/getPerson"
799
     }),
817
     }),
800
     ...mapState("bank", ["banks"]),
818
     ...mapState("bank", ["banks"]),
801
     refAgent() {
819
     refAgent() {
803
     },
821
     },
804
     filteredResort() {
822
     filteredResort() {
805
       let list = [];
823
       let list = [];
806
-      if (
807
-        this.sellItem &&
808
-        this.sellItem.region &&
809
-        this.sellItem.region.regionCode
810
-      ) {
824
+      if (this.sellItem && this.sellItem.region && this.sellItem.region.regionCode) {
811
         const item = this.detailedRegion.find(
825
         const item = this.detailedRegion.find(
812
-          (region) =>
813
-            region.region.regionCode === this.sellItem.region.regionCode
826
+          region => region.region.regionCode === this.sellItem.region.regionCode
814
         );
827
         );
815
         if (item) {
828
         if (item) {
816
           list = item.children;
829
           list = item.children;
818
       } else {
831
       } else {
819
         list = this.resorts;
832
         list = this.resorts;
820
       }
833
       }
821
-      return _.sortBy(list, (x) => x.resortName);
834
+      return _.sortBy(list, x => x.resortName);
822
     },
835
     },
823
     isLoggedIn() {
836
     isLoggedIn() {
824
       return this.user && this.person;
837
       return this.user && this.person;
825
     },
838
     },
826
     displayNotDeletedAgents() {
839
     displayNotDeletedAgents() {
827
       var notDeletedArr = [];
840
       var notDeletedArr = [];
828
-      this.agents.forEach((agent) => {
841
+      this.agents.forEach(agent => {
829
         if (!agent.isDeleted) {
842
         if (!agent.isDeleted) {
830
           if (agent.agencyId === this.sellItem.agencyId) {
843
           if (agent.agencyId === this.sellItem.agencyId) {
831
             notDeletedArr.push(agent);
844
             notDeletedArr.push(agent);
834
       });
847
       });
835
       return notDeletedArr;
848
       return notDeletedArr;
836
     },
849
     },
850
+    CanSave() {
851
+      if (this.indiv.howMarried === "In Community Of Property") {
852
+        if (this.indiv.spouseName || this.indiv.spouseSurname || this.spouseEmail) {
853
+          return true;
854
+        }
855
+        return false;
856
+      }
857
+      return true;
858
+    }
837
   },
859
   },
838
   methods: {
860
   methods: {
839
     ...mapActions("individual", ["getIndividual"]),
861
     ...mapActions("individual", ["getIndividual"]),
840
-    ...mapActions("timeshare", [
841
-      "initTimeshare",
842
-      "onResortChange",
843
-      "saveWeek",
844
-      "getBlankWeek",
845
-    ]),
862
+    ...mapActions("timeshare", ["initTimeshare", "onResortChange", "saveWeek", "getBlankWeek"]),
846
     ...mapActions("payment", ["addPayment"]),
863
     ...mapActions("payment", ["addPayment"]),
847
     ...mapActions("bank", ["getBanks"]),
864
     ...mapActions("bank", ["getBanks"]),
848
     newSale() {
865
     newSale() {
853
       if (this.userLoggedIn) {
870
       if (this.userLoggedIn) {
854
         this.sellItem.ownerObject = this.indiv;
871
         this.sellItem.ownerObject = this.indiv;
855
         this.sellItem.status = undefined;
872
         this.sellItem.status = undefined;
856
-        console.log(JSON.stringify(this.sellItem));
857
-        //   this.saveWeek(this.sellItem).then((fulfilled) => {
858
-        //     this.paygateRedirect();
859
-        //   });
873
+        this.saveWeek(this.sellItem).then(fulfilled => {
874
+          this.paygateRedirect();
875
+        });
860
       } else this.$router.push("/user/login");
876
       } else this.$router.push("/user/login");
861
     },
877
     },
862
     paygateRedirect() {
878
     paygateRedirect() {
866
         creatydById: Log.getUser().id, //Log.getUser().id,
882
         creatydById: Log.getUser().id, //Log.getUser().id,
867
         amount: 380.0,
883
         amount: 380.0,
868
         paymentStatus: "",
884
         paymentStatus: "",
869
-        paymentToken: "",
885
+        paymentToken: ""
870
       };
886
       };
871
 
887
 
872
-      this.addPayment(paymentObj).then((res) => {
888
+      this.addPayment(paymentObj).then(res => {
873
         this.$router.push({
889
         this.$router.push({
874
           name: "PaymentGateway",
890
           name: "PaymentGateway",
875
           params: {
891
           params: {
876
             paymentReqId: res.PAY_REQUEST_ID,
892
             paymentReqId: res.PAY_REQUEST_ID,
877
-            checksum: res.CHECKSUM,
878
-          },
893
+            checksum: res.CHECKSUM
894
+          }
879
         });
895
         });
880
       });
896
       });
881
     },
897
     },
900
     resortChange() {
916
     resortChange() {
901
       this.onResortChange({
917
       this.onResortChange({
902
         resortName: this.sellItem.resort.resortName,
918
         resortName: this.sellItem.resort.resortName,
903
-        resortCode: this.sellItem.resort.resortCode,
919
+        resortCode: this.sellItem.resort.resortCode
904
       });
920
       });
905
 
921
 
906
       if (this.sellItem && this.sellItem.resort === "Other") {
922
       if (this.sellItem && this.sellItem.resort === "Other") {
912
       }
928
       }
913
     },
929
     },
914
     regionChange() {
930
     regionChange() {
915
-      this.sellItem.regionId = this.sellItem.region
916
-        ? this.sellItem.region.id
917
-        : 1;
931
+      this.sellItem.regionId = this.sellItem.region ? this.sellItem.region.id : 1;
918
     },
932
     },
919
     UpdateAddress(address) {
933
     UpdateAddress(address) {
920
       this.indiv.address.streetNumber = address.streetNumber;
934
       this.indiv.address.streetNumber = address.streetNumber;
924
       this.indiv.address.suburb = address.suburb;
938
       this.indiv.address.suburb = address.suburb;
925
       this.indiv.address.postalCode = address.postalCode;
939
       this.indiv.address.postalCode = address.postalCode;
926
     },
940
     },
927
-  },
941
+    SetMandateDate() {
942
+      if (this.sellItem.mandate) {
943
+        this.sellItem.mandateDate = new Date();
944
+      } else {
945
+        this.sellItem.mandateDate = undefined;
946
+      }
947
+    }
948
+  }
928
 };
949
 };
929
 </script>
950
 </script>
930
 
951
 

Loading…
Cancel
Save