|
@@ -16,9 +16,15 @@
|
16
|
16
|
<div style="float: right;" class="btn btn-link color-b"></div>
|
17
|
17
|
</div>
|
18
|
18
|
<br />
|
19
|
|
- <br />
|
20
|
|
- <p>* You need to be logged in to submit your listing. Please register and log in if you have not done so already.</p>
|
|
19
|
+ <div v-if="!isLoggedIn">
|
|
20
|
+ <hr />
|
|
21
|
+ <Alert
|
|
22
|
+ :text="'* You need to be logged in to submit your listing. Please register and log in if you have not done so already.'"
|
|
23
|
+ :type="'WARNING'"
|
|
24
|
+ />
|
|
25
|
+ </div>
|
21
|
26
|
<hr />
|
|
27
|
+ <br />
|
22
|
28
|
<div class="form-group row">
|
23
|
29
|
<div class="col-md-4">
|
24
|
30
|
<div class="form-group">
|
|
@@ -118,7 +124,7 @@
|
118
|
124
|
>
|
119
|
125
|
<option value="Other">Other</option>
|
120
|
126
|
<option
|
121
|
|
- v-for="(resort, r) in resorts"
|
|
127
|
+ v-for="(resort, r) in filteredResort"
|
122
|
128
|
:key="r"
|
123
|
129
|
:value="resort"
|
124
|
130
|
>{{resort.resortName}}</option>
|
|
@@ -507,10 +513,16 @@ import { mapState, mapActions } from 'vuex';
|
507
|
513
|
import DetailIndividual from '../../user/timeshareIndividual.vue';
|
508
|
514
|
import BankDetails from '../../shared/bankAccount.vue';
|
509
|
515
|
import Address from '../../misc/address.vue';
|
|
516
|
+import Alert from '../../shared/alert.vue';
|
510
|
517
|
|
511
|
518
|
export default {
|
512
|
519
|
name: 'TimeshareToSell',
|
513
|
|
- components: { DetailIndividual, BankDetails, Address },
|
|
520
|
+ components: {
|
|
521
|
+ DetailIndividual,
|
|
522
|
+ BankDetails,
|
|
523
|
+ Address,
|
|
524
|
+ Alert,
|
|
525
|
+ },
|
514
|
526
|
created() {
|
515
|
527
|
this.initTimeshare();
|
516
|
528
|
},
|
|
@@ -528,9 +540,28 @@ export default {
|
528
|
540
|
'agencies',
|
529
|
541
|
'agents',
|
530
|
542
|
]),
|
|
543
|
+ ...mapState('authentication', ['isLoggedIn']),
|
531
|
544
|
refAgent() {
|
532
|
545
|
return this.sellItem && this.sellItem.referedByAgent;
|
533
|
546
|
},
|
|
547
|
+ filteredResort() {
|
|
548
|
+ let list = [];
|
|
549
|
+ if (
|
|
550
|
+ this.sellItem
|
|
551
|
+ && this.sellItem.region
|
|
552
|
+ && this.sellItem.region.regionCode
|
|
553
|
+ ) {
|
|
554
|
+ const item = this.detailedRegion.find(
|
|
555
|
+ region => region.region.regionCode === this.sellItem.region.regionCode,
|
|
556
|
+ );
|
|
557
|
+ if (item) {
|
|
558
|
+ list = item.children;
|
|
559
|
+ }
|
|
560
|
+ } else {
|
|
561
|
+ list = this.resorts;
|
|
562
|
+ }
|
|
563
|
+ return _.sortBy(list, x => x.resortName);
|
|
564
|
+ },
|
534
|
565
|
},
|
535
|
566
|
methods: {
|
536
|
567
|
submitSale() {
|