Browse Source

Checkin of timeshare

master
Kobus 5 years ago
parent
commit
fcdc0f3887

+ 5
- 0
package-lock.json View File

@@ -11716,6 +11716,11 @@
11716 11716
       "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
11717 11717
       "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
11718 11718
     },
11719
+    "v-file-upload": {
11720
+      "version": "3.1.7",
11721
+      "resolved": "https://registry.npmjs.org/v-file-upload/-/v-file-upload-3.1.7.tgz",
11722
+      "integrity": "sha512-ce+LVMB6NnA+qv0MsCQXpMHy8VnZ+EjzPcSKXGYWXPxKf/qYVGns+AxAw3fUZVuYRGmrSp7YQ7XEOGkZuGMugA=="
11723
+    },
11719 11724
     "validate-npm-package-license": {
11720 11725
       "version": "3.0.4",
11721 11726
       "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",

+ 1
- 0
package.json View File

@@ -20,6 +20,7 @@
20 20
     "roboto-fontface": "*",
21 21
     "sass-loader": "^7.3.1",
22 22
     "stylus-loader": "^3.0.2",
23
+    "v-file-upload": "^3.1.7",
23 24
     "vue": "^2.6.10",
24 25
     "vue-eva-icons": "^1.1.1",
25 26
     "vue-router": "^3.0.7",

+ 3
- 0
src/assets/myData.js View File

@@ -2,5 +2,8 @@ const items = {
2 2
   seasons: ['Peak 1', 'Peak 2', 'Peak 3', 'Peak 4', 'Red', 'White', 'Blue', 'Flexi'],
3 3
   resortBedrooms: ['Studio', '1', '2', '3', '4', '5', '6'],
4 4
   maxBedrooms: ['2', '4', '6', '8', '10', '12'],
5
+  bankedEntities: ['Dial an Exchange', 'RCI', 'First Exchange', 'iExchange',
6
+    'Interval International',
7
+  ],
5 8
 };
6 9
 export default items;

+ 5
- 1
src/components/shared/searchTab.vue View File

@@ -64,7 +64,9 @@
64 64
                 id="pills-video"
65 65
                 role="tabpanel"
66 66
                 aria-labelledby="pills-video-tab"
67
-              >timeshare search</div>
67
+              >
68
+                <timeshareSearch />
69
+              </div>
68 70
               <div
69 71
                 class="tab-pane fade"
70 72
                 id="pills-plans"
@@ -108,10 +110,12 @@
108 110
 
109 111
 <script>
110 112
 import propertySearch from '../property/propertySearchFields.vue';
113
+import timeshareSearch from '../timeshare/searchTimeshare.vue';
111 114
 
112 115
 export default {
113 116
   components: {
114 117
     propertySearch,
118
+    timeshareSearch,
115 119
   },
116 120
   data() {
117 121
     return {

+ 121
- 0
src/components/timeshare/searchTimeshare.vue View File

@@ -0,0 +1,121 @@
1
+<template>
2
+  <div>
3
+    <form
4
+      id="mainForm"
5
+      method="POST"
6
+      action="/filter"
7
+      accept-charset="UTF-8"
8
+      enctype="multipart/form-data"
9
+    >
10
+      <div class="form-group">
11
+        <select class="form-control" name="region" id="region" v-model="selectedRegion">
12
+          <option v-for="(item, i) in regions" :key="i">{{item.regionName}}</option>
13
+        </select>
14
+      </div>
15
+      <div class="form-group">
16
+        <select class="form-control" name="resort" id="resort" v-model="selectedResort">
17
+          <option v-for="(item, i) in filteredResorts" :key="i">{{item.resortName}}</option>
18
+        </select>
19
+      </div>
20
+      <div class="form-group">
21
+        <select class="form-control" id="resort" name="resort">
22
+          <option value>Resort</option>
23
+        </select>
24
+      </div>
25
+      <div class="form-group">
26
+        <select class="form-control" name="season">
27
+          <option value>
28
+            <span style="color:white;">Season</span>
29
+          </option>
30
+        </select>
31
+      </div>
32
+      <div class="form-group">
33
+        <select class="form-control" name="bedrooms">
34
+          <option value>Bedrooms</option>
35
+        </select>
36
+      </div>
37
+
38
+      <div class="form-group">
39
+        <input
40
+          class="form-control"
41
+          type="number"
42
+          step="any"
43
+          id="minPrice"
44
+          name="minPrice"
45
+          placeholder="Minimum Price"
46
+        />
47
+      </div>
48
+      <div class="form-group">
49
+        <input
50
+          class="form-control"
51
+          type="number"
52
+          step="any"
53
+          id="maxPrice"
54
+          name="maxPrice"
55
+          placeholder="Maximum Price"
56
+        />
57
+      </div>
58
+      <div class="form-group">
59
+        <label>Filter Arrival Date From</label>
60
+        <input type="date" class="form-control" name="arrivaldate" value />
61
+      </div>
62
+      <div class="form-group">
63
+        <label>Filter Arrival Date To</label>
64
+        <input type="date" class="form-control" name="arrivaldate" value />
65
+      </div>
66
+
67
+      <br />
68
+
69
+      <button class="btn btn-b-n" type="submit">Search</button>
70
+    </form>
71
+  </div>
72
+</template>
73
+
74
+<script>
75
+import { mapState, mapActions } from 'vuex';
76
+
77
+export default {
78
+  data() {
79
+    return {
80
+      selectedRegion: undefined,
81
+      selectedResort: undefined,
82
+    };
83
+  },
84
+  created() {
85
+    this.initTimeshare();
86
+  },
87
+  computed: {
88
+    ...mapState('timeshare', [
89
+      'resorts',
90
+      'regions',
91
+      'detailedRegion',
92
+      'seasons',
93
+      'resortBedrooms',
94
+      'maxSleep',
95
+      'bankedEntities',
96
+      'sellItem',
97
+      'agencies',
98
+      'agents',
99
+    ]),
100
+    filteredResorts() {
101
+      if (this.selectedRegion) {
102
+        const list = _.find(
103
+          this.detailedRegion,
104
+          i => i.region.regionName === this.selectedRegion,
105
+        ).children;
106
+        return _.sortBy(list, r => r.resortName);
107
+      }
108
+      return this.resorts;
109
+    },
110
+  },
111
+  methods: {
112
+    ...mapActions('timeshare', ['initTimeshare']),
113
+    addResort(item) {
114
+      this.myResort.push(item);
115
+    },
116
+  },
117
+};
118
+</script>
119
+
120
+<style scoped>
121
+</style>

+ 201
- 111
src/components/timeshare/sell/sellPage.vue View File

@@ -14,7 +14,7 @@
14 14
         <hr />
15 15
       </div>
16 16
     </div>
17
-    <div v-for="(item, i) in unitConfigurationList" :key="i">{{item}}</div>
17
+    <div v-for="(item, i) in sellItem" :key="i">{{item}}</div>
18 18
     <div class="row mb-4">
19 19
       <div class="col-md-12">
20 20
         <form
@@ -50,122 +50,131 @@
50 50
               </div>
51 51
             </div>
52 52
             <div class="col-md-4" v-if="refAgent">
53
-              <label for="Name of Agency"></label>
54
-              <input
55
-                class="form-control"
56
-                placeholder="Name of Agency"
57
-                type="text"
58
-                name="name of agency"
59
-                value
60
-              />
53
+              <label for="Name of Agency">Agency</label>
54
+              <select class="form-control" id="Agency" name="agency" v-model="sellItem.agency">
55
+                <option v-for="(item, i) in agencies" :key="i">{{item.agencyName}}</option>
56
+              </select>
61 57
             </div>
62 58
             <div class="col-md-4" v-if="refAgent">
63
-              <label for="Name of Agent"></label>
64
-              <input
65
-                class="form-control"
66
-                placeholder="Name of Agent"
67
-                type="text"
68
-                name="name of agenct"
69
-                value
70
-              />
59
+              <label for="Name of Agent">Agent</label>
60
+              <select class="form-control" id="agent" name="agent" v-model="sellItem.agent">
61
+                <option v-for="(item, i) in agents" :key="i">{{item.name}}</option>
62
+              </select>
71 63
             </div>
72 64
           </div>
73 65
 
74 66
           <div class="form-group row">
75 67
             <div class="col-md-6">
76
-              <label for="Resort Name"></label>
77
-              <select class="form-control" id="resort" name="resort">
78
-                <option value>Please select Resort Name</option>
79
-                <option value></option>
68
+              <label for="Resort Name">Resort Name</label>
69
+              <select
70
+                class="form-control"
71
+                id="resort"
72
+                name="resort"
73
+                v-model="sellItem.resort"
74
+                @change="resortChange()"
75
+              >
80 76
                 <option value="Other">Other</option>
77
+                <option
78
+                  v-for="(resort, r) in resorts"
79
+                  :key="r"
80
+                  :value="resort"
81
+                >{{resort.resortName}}</option>
81 82
               </select>
82 83
             </div>
83 84
             <div class="col-md-6">
84
-              <label for="* If other"></label>
85
-              <input class="form-control" placeholder="* If other" type="text" name="other" value />
85
+              <label for="* If other" v-if="sellItem.otherResort">Name of resort</label>
86
+              <input
87
+                class="form-control"
88
+                v-if="sellItem.otherResort"
89
+                placeholder="* If other"
90
+                type="text"
91
+                name="other"
92
+                v-model="sellItem.otherResortName"
93
+              />
86 94
             </div>
87 95
           </div>
88 96
           <div class="form-group row">
89 97
             <div class="col-md-6">
90
-              <label for="Region"></label>
91
-              <select class="form-control" name="region" id="region">
92
-                <option value>Please select Region</option>
98
+              <label for="Region">Region</label>
99
+              <select class="form-control" name="region" id="region" v-model="sellItem.region">
93 100
                 <option v-for="(region, r) in regions" :key="r">{{region.regionName}}</option>
94 101
               </select>
95 102
             </div>
96 103
             <div class="col-md-6">
97
-              <label for="Season"></label>
98
-              <select class="form-control" name="season">
99
-                <option value>Please select Season</option>
100
-                <option value="Peak">Peak</option>
101
-                <option value="Peak 1">Peak 1</option>
102
-                <option value="Peak 2">Peak 2</option>
103
-                <option value="Peak 3">Peak 3</option>
104
-                <option value="Peak 4">Peak 4</option>
105
-                <option value="Red">Red</option>
106
-                <option value="White">White</option>
107
-                <option value="Blue">Blue</option>
108
-                <option value="Flexi">Flexi</option>
104
+              <label for="Season">Season</label>
105
+              <select class="form-control" name="season" v-model="sellItem.season">
106
+                <option v-for="(season, r) in seasons" :key="r">{{season.name}}</option>
109 107
               </select>
110 108
             </div>
111 109
           </div>
112 110
           <div class="form-group row">
113 111
             <div class="col-md-6">
114
-              <label for="Module"></label>
115
-              <input class="form-control" placeholder="Module" type="text" name="module" value />
112
+              <label for="Module">Module</label>
113
+              <input
114
+                class="form-control"
115
+                placeholder="Module"
116
+                type="text"
117
+                name="module"
118
+                v-model="sellItem.module"
119
+              />
116 120
             </div>
117 121
             <div class="col-md-6">
118
-              <label for="Week number"></label>
119
-              <input class="form-control" placeholder="Week Number" type="text" name="week" value />
122
+              <label for="Week number">Week Number</label>
123
+              <input
124
+                class="form-control"
125
+                placeholder="Week Number"
126
+                type="text"
127
+                name="week"
128
+                v-model="sellItem.weekNumber"
129
+              />
120 130
             </div>
121 131
           </div>
122 132
           <div class="form-group row">
123 133
             <div class="col-md-6">
124
-              <label for="Bedrooms"></label>
125
-              <select class="form-control" name="bedrooms">
126
-                <option value>Please select Bedrooms</option>
127
-                <option value="Studio">Studio</option>
128
-                <option value="1">1</option>
129
-                <option value="2">2</option>
130
-                <option value="3">3</option>
131
-                <option value="4">4</option>
132
-                <option value="5">5</option>
133
-                <option value="6">6</option>
134
+              <label for="Bedrooms">Bedrooms</label>
135
+              <select class="form-control" name="bedrooms" v-model="sellItem.bedrooms">
136
+                <option v-for="(item, i) in resortBedrooms" :key="i">{{item}}</option>
134 137
               </select>
135 138
             </div>
136 139
             <div class="col-md-6">
137
-              <label for="Sleeps maximum"></label>
138
-              <select class="form-control" name="sleeps">
139
-                <option value>Please select Sleeps maximum</option>
140
-                <option value="2">2</option>
141
-                <option value="4">4</option>
142
-                <option value="6">6</option>
143
-                <option value="8">8</option>
144
-                <option value="10">10</option>
145
-                <option value="12">12</option>
140
+              <label for="Sleeps maximum">Sleeps maximum</label>
141
+              <select class="form-control" name="sleeps" v-model="sellItem.maxSleep">
142
+                <option v-for="(item, i) in maxSleep" :key="i">{{item}}</option>
146 143
               </select>
147 144
             </div>
148 145
           </div>
149 146
           <div class="form-group row">
150 147
             <div class="col-md-6">
151
-              <label for="Unit number"></label>
152
-              <input class="form-control" placeholder="Unit Number" type="text" name="unit" value />
148
+              <label for="Unit number">Unit Number</label>
149
+              <input
150
+                class="form-control"
151
+                placeholder="Unit Number"
152
+                type="text"
153
+                name="unit"
154
+                v-model="sellItem.unitNumber"
155
+              />
153 156
             </div>
154 157
             <div class="col-md-6">
155
-              <label for="Owner"></label>
156
-              <input class="form-control" placeholder="Owner" type="text" name="owner" value />
158
+              <label for="Owner">Owner</label>
159
+              <input
160
+                class="form-control"
161
+                placeholder="Owner"
162
+                type="text"
163
+                name="owner"
164
+                v-model="sellItem.owner"
165
+              />
157 166
             </div>
158 167
           </div>
159 168
           <div class="form-group row">
160 169
             <div class="col-md-6">
161
-              <label for="Levy"></label>
170
+              <label for="Levy">Levy Amount</label>
162 171
               <input
163 172
                 class="form-control"
164 173
                 placeholder="Levy"
165 174
                 type="number"
166 175
                 step="any"
167 176
                 name="levy"
168
-                value
177
+                v-model="sellItem.levyAmount"
169 178
               />
170 179
             </div>
171 180
           </div>
@@ -179,7 +188,8 @@
179 188
                   name="spacebankedyear"
180 189
                   id="spacebankedyearyes"
181 190
                   value="Yes"
182
-                  checked
191
+                  @change="changeCurrentBanked"
192
+                  :checked="sellItem.currentYearBanked"
183 193
                 />
184 194
                 <label class="form-check-label" for="spacebankedyearyes">Yes</label>
185 195
               </div>
@@ -190,20 +200,24 @@
190 200
                   name="spacebankedyear"
191 201
                   id="spacebankedyearno"
192 202
                   value="No"
193
-                  checked
203
+                  :checked="!sellItem.currentYearBanked"
204
+                  @change="changeCurrentBanked"
194 205
                 />
195 206
                 <label class="form-check-label" for="spacebankedyearno">No</label>
196 207
               </div>
197 208
             </div>
198 209
             <div class="col-md-6">
199
-              <label for="If yes, please confirm with whom"></label>
200
-              <select class="form-control" name="spacebankOwner">
201
-                <option value>If yes, please confirm with whom</option>
202
-                <option value="Dial an Exchange">Dial an Exchange</option>
203
-                <option value="RCI">RCI</option>
204
-                <option value="First Exchange">First Exchange</option>
205
-                <option value="iExchange">iExchange</option>
206
-                <option value="Interval International">Interval International</option>
210
+              <label
211
+                for="If yes, please confirm with whom"
212
+                v-if="sellItem.currentYearBanked"
213
+              >Please confirm with whom</label>
214
+              <select
215
+                class="form-control"
216
+                name="spacebankOwner"
217
+                v-if="sellItem.currentYearBanked"
218
+                v-model="sellItem.bankedWith"
219
+              >
220
+                <option v-for="(item, i) in bankedEntities" :key="i">{{item}}</option>
207 221
               </select>
208 222
             </div>
209 223
           </div>
@@ -224,11 +238,25 @@
224 238
             >1.1 All levy amounts for the current cycle have been paid in full</label>
225 239
             <div class="col-md-4">
226 240
               <div class="form-check form-check-inline">
227
-                <input class="form-check-input" type="radio" name="paid" value="Yes" checked />
241
+                <input
242
+                  class="form-check-input"
243
+                  type="radio"
244
+                  name="paid"
245
+                  value="Yes"
246
+                  :checked="sellItem.leviesPaidInFull"
247
+                  @change="changeLeviesPaidInFull()"
248
+                />
228 249
                 <label class="form-check-label" for="paid">Yes</label>
229 250
               </div>
230 251
               <div class="form-check form-check-inline">
231
-                <input class="form-check-input" type="radio" name="paid" value="No" checked />
252
+                <input
253
+                  class="form-check-input"
254
+                  type="radio"
255
+                  name="paid"
256
+                  value="No"
257
+                  :checked="!sellItem.leviesPaidInFull"
258
+                  @change="changeLeviesPaidInFull()"
259
+                />
232 260
                 <label class="form-check-label" for="paid">No</label>
233 261
               </div>
234 262
             </div>
@@ -244,11 +272,25 @@
244 272
             >1.2 My week is placed for rental this year</label>
245 273
             <div class="col-md-4">
246 274
               <div class="form-check form-check-inline">
247
-                <input class="form-check-input" type="radio" name="rental" value="Yes" checked />
275
+                <input
276
+                  class="form-check-input"
277
+                  type="radio"
278
+                  name="rental"
279
+                  value="Yes"
280
+                  :checked="sellItem.weekPlacedForRental"
281
+                  @change="changeWeekPlacedForRental()"
282
+                />
248 283
                 <label class="form-check-label" for="paidyes">Yes</label>
249 284
               </div>
250 285
               <div class="form-check form-check-inline">
251
-                <input class="form-check-input" type="radio" name="rental" value="No" checked />
286
+                <input
287
+                  class="form-check-input"
288
+                  type="radio"
289
+                  name="rental"
290
+                  value="No"
291
+                  :checked="!sellItem.weekPlacedForRental"
292
+                  @change="changeWeekPlacedForRental()"
293
+                />
252 294
                 <label class="form-check-label" for="paidno">No</label>
253 295
               </div>
254 296
             </div>
@@ -263,7 +305,12 @@
263 305
               align="left"
264 306
             >1.3 I/We bought the timeshare module/week on the following date:</label>
265 307
             <div class="col-md-4">
266
-              <input type="date" class="form-control" name="date" value />
308
+              <input
309
+                type="date"
310
+                class="form-control"
311
+                name="date"
312
+                v-model="sellItem.originalPurchaseDate"
313
+              />
267 314
             </div>
268 315
           </div>
269 316
 
@@ -276,14 +323,19 @@
276 323
               align="left"
277 324
             >1.4 The purchase price for which I/we bought timeshare module/week was:</label>
278 325
             <div class="col-md-4">
279
-              <input
280
-                class="form-control"
281
-                type="number"
282
-                step="any"
283
-                name="purchasePrice"
284
-                placeholder="R"
285
-                value
286
-              />
326
+              <div class="input-group mb-3">
327
+                <div class="input-group-prepend">
328
+                  <span class="input-group-text">R</span>
329
+                </div>
330
+                <input
331
+                  class="form-control"
332
+                  type="number"
333
+                  step="any"
334
+                  name="purchasePrice"
335
+                  placeholder="R"
336
+                  v-model="sellItem.originalPurchasePrice"
337
+                />
338
+              </div>
287 339
             </div>
288 340
           </div>
289 341
 
@@ -297,13 +349,18 @@
297 349
             >1.5 I/We bought the timeshare module/week for the following dates for the current year:</label>
298 350
             <div class="col-md-4">
299 351
               Arrival Date :
300
-              <input type="date" class="form-control" name="occupationDate1" value />
352
+              <input
353
+                type="date"
354
+                class="form-control"
355
+                name="occupationDate1"
356
+                v-model="sellItem.arrivalDate"
357
+              />
301 358
               Departure Date :
302 359
               <input
303 360
                 type="date"
304 361
                 class="form-control"
305 362
                 name="occupationDate2"
306
-                value
363
+                v-model="sellItem.departureDate"
307 364
               />
308 365
             </div>
309 366
           </div>
@@ -317,14 +374,19 @@
317 374
               align="left"
318 375
             >1.6 The selling price for the timeshare module/week for which I/we want to sell is: (Including Vat)</label>
319 376
             <div class="col-md-4">
320
-              <input
321
-                class="form-control"
322
-                type="number"
323
-                step="any"
324
-                name="sellingPrice"
325
-                placeholder="R"
326
-                value
327
-              />
377
+              <div class="input-group mb-3">
378
+                <div class="input-group-prepend">
379
+                  <span class="input-group-text">R</span>
380
+                </div>
381
+                <input
382
+                  class="form-control"
383
+                  type="number"
384
+                  step="any"
385
+                  name="sellingPrice"
386
+                  placeholder="R"
387
+                  v-model="sellItem.sellingPrice"
388
+                />
389
+              </div>
328 390
             </div>
329 391
           </div>
330 392
 
@@ -337,14 +399,19 @@
337 399
               align="left"
338 400
             >1.7 Estate agent’s commission agreed to (state Rand value)</label>
339 401
             <div class="col-md-4">
340
-              <input
341
-                class="form-control"
342
-                type="number"
343
-                step="any"
344
-                name="commission"
345
-                placeholder="R"
346
-                value
347
-              />
402
+              <div class="input-group mb-3">
403
+                <div class="input-group-prepend">
404
+                  <span class="input-group-text">R</span>
405
+                </div>
406
+                <input
407
+                  class="form-control"
408
+                  type="number"
409
+                  step="any"
410
+                  name="commission"
411
+                  placeholder="R"
412
+                  v-model="sellItem.agentCommission"
413
+                />
414
+              </div>
348 415
             </div>
349 416
           </div>
350 417
 
@@ -357,7 +424,7 @@
357 424
               align="left"
358 425
             >1.8 Mandate to sell timeshare</label>
359 426
             <div class="col-md-4">
360
-              <input class="btn btn-b-n" type="file" name="mandate" value />
427
+              <input class="btn btn-b-n" type="file" name="mandate" />
361 428
             </div>
362 429
           </div>
363 430
 
@@ -391,9 +458,8 @@ export default {
391 458
       'regions',
392 459
       'detailedRegion',
393 460
       'seasons',
394
-      'unitConfigurationList',
395 461
       'resortBedrooms',
396
-      'maxBedrooms',
462
+      'maxSleep',
397 463
       'bankedEntities',
398 464
       'sellItem',
399 465
       'agencies',
@@ -404,9 +470,33 @@ export default {
404 470
     },
405 471
   },
406 472
   methods: {
473
+    previewFiles(event) {
474
+      console.log(event.target.files);
475
+    },
407 476
     changeRef() {
477
+      this.sellItem.agent = undefined;
478
+      this.sellItem.agency = undefined;
408 479
       this.sellItem.referedByAgent = !this.sellItem.referedByAgent;
409 480
     },
481
+    changeLeviesPaidInFull() {
482
+      this.sellItem.leviesPaidInFull = !this.sellItem.leviesPaidInFull;
483
+    },
484
+    changeWeekPlacedForRental() {
485
+      this.sellItem.weekPlacedForRental = !this.sellItem.weekPlacedForRental;
486
+    },
487
+    changeCurrentBanked() {
488
+      this.sellItem.bankedWith = undefined;
489
+      this.sellItem.currentYearBanked = !this.sellItem.currentYearBanked;
490
+    },
491
+    resortChange() {
492
+      if (this.sellItem && this.sellItem.resort === 'Other') {
493
+        this.sellItem.otherResortName = undefined;
494
+        this.sellItem.otherResort = true;
495
+      } else {
496
+        this.sellItem.otherResortName = undefined;
497
+        this.sellItem.otherResort = false;
498
+      }
499
+    },
410 500
     ...mapActions('timeshare', ['initTimeshare']),
411 501
   },
412 502
 };

+ 2
- 0
src/main.js View File

@@ -1,10 +1,12 @@
1 1
 import Vue from 'vue';
2 2
 import EvaIcons from 'vue-eva-icons';
3
+import FileUpload from 'v-file-upload';
3 4
 import App from './App.vue';
4 5
 import router from './router';
5 6
 import store from './store';
6 7
 
7 8
 Vue.use(EvaIcons);
9
+Vue.use(FileUpload);
8 10
 
9 11
 Vue.config.productionTip = false;
10 12
 

+ 162
- 163
src/router/index.js View File

@@ -40,168 +40,167 @@ import PrivacyPolicy from '../components/misc/privacyPolicyPage.vue';
40 40
 Vue.use(Router);
41 41
 
42 42
 export default new Router({
43
-  routes: [
44
-    {
45
-      path: '/',
46
-      name: 'Home',
47
-      component: HomePage,
48
-    },
49
-    {
50
-      path: '/about/us',
51
-      name: 'aboutus',
52
-      component: AboutUs,
53
-    },
54
-    {
55
-      path: '/about/timeshare',
56
-      name: 'abouttimeshare',
57
-      component: AboutTimeshare,
58
-    },
59
-    {
60
-      path: '/timeshare/sell',
61
-      name: 'TimeshareSell',
62
-      component: TimeshareSell,
63
-    },
64
-    {
65
-      path: '/timeshare/buy',
66
-      name: 'TimeshareBuy',
67
-      component: TimeshareBuy,
68
-    },
69
-    {
70
-      path: '/timeshare/faq',
71
-      name: 'TimeshareFAQ',
72
-      component: TimeshareFAQ,
73
-    },
74
-    {
75
-      path: '/user/login',
76
-      name: 'Login',
77
-      component: Login,
78
-    },
79
-    {
80
-      path: '/user/register',
81
-      name: 'PrivateIndividual',
82
-      component: PrivateIndividual,
83
-    },
84
-    {
85
-      path: '/user/registeragency',
86
-      name: 'Agency',
87
-      component: Agency,
88
-    },
89
-    {
90
-      path: '/property/property/:id',
91
-      name: 'PropertyPage',
92
-      component: PropertyPage,
93
-    },
94
-    {
95
-      path: '/property/:propertyType/search',
96
-      name: 'PropertySearch',
97
-      component: PropertySearch,
98
-    },
99
-    {
100
-      path: '/property/search',
101
-      name: 'PropertySearchTab',
102
-      component: PropertySearch,
103
-    },
104
-    {
105
-      path: '/property/:propType/:saleType',
106
-      name: 'PropertyNew',
107
-      component: PropertyEdit,
108
-    },
109
-    {
110
-      path: '/property/:id',
111
-      name: 'PropertyEdit',
112
-      component: PropertyEdit,
113
-    },
114
-    {
115
-      path: '/property/list/:propertyType/:user',
116
-      name: 'PropertyList',
117
-      component: PropertyList,
118
-    },
119
-    {
120
-      path: '/propertyTypes/list',
121
-      name: 'PropertyTypeList',
122
-      component: PropertyTypeList,
123
-    },
124
-    {
125
-      path: '/propertyType/new',
126
-      name: 'PropertyTypeNew',
127
-      component: PropertyType,
128
-    },
129
-    {
130
-      path: '/propertyType/:id',
131
-      name: 'PropertyTypeEdit',
132
-      component: PropertyType,
133
-    },
134
-    {
135
-      path: '/userDefinedGroups/list',
136
-      name: 'UserDefinedGroupsList',
137
-      component: UserDefinedGroups,
138
-    },
139
-    {
140
-      path: '/userDefinedGroups/userDefinedGroup/:id',
141
-      name: 'UserDefinedGroupEdit',
142
-      component: UserDefinedGroup,
143
-    },
144
-    {
145
-      path: '/userDefinedGroups/userDefinedGroup',
146
-      name: 'UserDefinedGroupNew',
147
-      component: UserDefinedGroup,
148
-    },
149
-    {
150
-      path: '/userField',
151
-      name: 'UserDefinedField',
152
-      component: UserField,
153
-    },
154
-    {
155
-      path: '/status/list',
156
-      name: 'StatusList',
157
-      component: Status,
158
-    },
159
-    {
160
-      path: '/status/timeshareAdmin',
161
-      name: 'TimeshareAdmin',
162
-      component: timeshareAdminPage,
163
-    },
164
-    {
165
-      path: '/status/tenderWeekAdmin',
166
-      name: 'TenderWeekAdmin',
167
-      component: tenderWeekAdminPage,
168
-    },
169
-    {
170
-      path: '/status/userManagementPage',
171
-      name: 'userManagementPage',
172
-      component: userManagementPage,
173
-    },
174
-    {
175
-      path: '/status/changeLogPage',
176
-      name: 'changeLogPage',
177
-      component: changeLogPage,
178
-    },
179
-    {
180
-      path: '/unitConfiguration/list',
181
-      name: 'UnitConfiguration',
182
-      component: UnitConfiguration,
183
-    },
184
-    {
185
-      path: '/contactus',
186
-      name: 'ContactUs',
187
-      component: ContactUs,
188
-    },
189
-    {
190
-      path: '/privacypolicy',
191
-      name: 'PrivacyPolicy',
192
-      component: PrivacyPolicy,
193
-    },
194
-    {
195
-      path: '/resort/:resortCode',
196
-      name: 'ResortPage',
197
-      component: ResortPage,
198
-      props: true,
199
-    },
200
-    {
201
-      path: '/resort/:resortCode/:weekId',
202
-      name: 'UnitPage',
203
-      component: UnitPage,
204
-      props: true,
205
-    },
43
+  routes: [{
44
+    path: '/',
45
+    name: 'Home',
46
+    component: HomePage,
47
+  },
48
+  {
49
+    path: '/about/us',
50
+    name: 'aboutus',
51
+    component: AboutUs,
52
+  },
53
+  {
54
+    path: '/about/timeshare',
55
+    name: 'abouttimeshare',
56
+    component: AboutTimeshare,
57
+  },
58
+  {
59
+    path: '/timeshare/sell',
60
+    name: 'TimeshareSell',
61
+    component: TimeshareSell,
62
+  },
63
+  {
64
+    path: '/timeshare/buy',
65
+    name: 'TimeshareBuy',
66
+    component: TimeshareBuy,
67
+  },
68
+  {
69
+    path: '/timeshare/faq',
70
+    name: 'TimeshareFAQ',
71
+    component: TimeshareFAQ,
72
+  },
73
+  {
74
+    path: '/user/login',
75
+    name: 'Login',
76
+    component: Login,
77
+  },
78
+  {
79
+    path: '/user/register',
80
+    name: 'PrivateIndividual',
81
+    component: PrivateIndividual,
82
+  },
83
+  {
84
+    path: '/user/registeragency',
85
+    name: 'Agency',
86
+    component: Agency,
87
+  },
88
+  {
89
+    path: '/property/property/:id',
90
+    name: 'PropertyPage',
91
+    component: PropertyPage,
92
+  },
93
+  {
94
+    path: '/property/:propertyType/search',
95
+    name: 'PropertySearch',
96
+    component: PropertySearch,
97
+  },
98
+  {
99
+    path: '/property/search',
100
+    name: 'PropertySearchTab',
101
+    component: PropertySearch,
102
+  },
103
+  {
104
+    path: '/property/:propType/:saleType',
105
+    name: 'PropertyNew',
106
+    component: PropertyEdit,
107
+  },
108
+  {
109
+    path: '/property/:id',
110
+    name: 'PropertyEdit',
111
+    component: PropertyEdit,
112
+  },
113
+  {
114
+    path: '/property/list/:propertyType/:user',
115
+    name: 'PropertyList',
116
+    component: PropertyList,
117
+  },
118
+  {
119
+    path: '/propertyTypes/list',
120
+    name: 'PropertyTypeList',
121
+    component: PropertyTypeList,
122
+  },
123
+  {
124
+    path: '/propertyType/new',
125
+    name: 'PropertyTypeNew',
126
+    component: PropertyType,
127
+  },
128
+  {
129
+    path: '/propertyType/:id',
130
+    name: 'PropertyTypeEdit',
131
+    component: PropertyType,
132
+  },
133
+  {
134
+    path: '/userDefinedGroups/list',
135
+    name: 'UserDefinedGroupsList',
136
+    component: UserDefinedGroups,
137
+  },
138
+  {
139
+    path: '/userDefinedGroups/userDefinedGroup/:id',
140
+    name: 'UserDefinedGroupEdit',
141
+    component: UserDefinedGroup,
142
+  },
143
+  {
144
+    path: '/userDefinedGroups/userDefinedGroup',
145
+    name: 'UserDefinedGroupNew',
146
+    component: UserDefinedGroup,
147
+  },
148
+  {
149
+    path: '/userField',
150
+    name: 'UserDefinedField',
151
+    component: UserField,
152
+  },
153
+  {
154
+    path: '/status/list',
155
+    name: 'StatusList',
156
+    component: Status,
157
+  },
158
+  {
159
+    path: '/status/timeshareAdmin',
160
+    name: 'TimeshareAdmin',
161
+    component: timeshareAdminPage,
162
+  },
163
+  {
164
+    path: '/status/tenderWeekAdmin',
165
+    name: 'TenderWeekAdmin',
166
+    component: tenderWeekAdminPage,
167
+  },
168
+  {
169
+    path: '/status/userManagementPage',
170
+    name: 'userManagementPage',
171
+    component: userManagementPage,
172
+  },
173
+  {
174
+    path: '/status/changeLogPage',
175
+    name: 'changeLogPage',
176
+    component: changeLogPage,
177
+  },
178
+  {
179
+    path: '/unitConfiguration/list',
180
+    name: 'UnitConfiguration',
181
+    component: UnitConfiguration,
182
+  },
183
+  {
184
+    path: '/contactus',
185
+    name: 'ContactUs',
186
+    component: ContactUs,
187
+  },
188
+  {
189
+    path: '/privacypolicy',
190
+    name: 'PrivacyPolicy',
191
+    component: PrivacyPolicy,
192
+  },
193
+  {
194
+    path: '/resort/:resortCode',
195
+    name: 'ResortPage',
196
+    component: ResortPage,
197
+    props: true,
198
+  },
199
+  {
200
+    path: '/resort/:resortCode/:weekId',
201
+    name: 'UnitPage',
202
+    component: UnitPage,
203
+    props: true,
204
+  },
206 205
   ],
207 206
 });

+ 31
- 34
src/store/modules/timeshare/timeshare.js View File

@@ -10,32 +10,39 @@ export default {
10 10
     regions: [],
11 11
     detailedRegion: [],
12 12
     seasons: [],
13
-    unitConfigurationList: [],
14 13
     resortBedrooms: [],
15
-    maxBedrooms: [],
14
+    maxSleep: [],
16 15
     bankedEntities: [],
17 16
     agencies: [],
18 17
     agents: [],
19 18
     sellItem: {
20 19
       referedByAgent: false,
21
-      agent: {},
22
-      agency: {},
20
+      agent: undefined,
21
+      agency: undefined,
23 22
       otherResort: false,
24
-      resort: {},
25
-      region: '',
26
-      season: '',
27
-      module: '',
28
-      weekNumber: '',
29
-      levyAmount: 0,
23
+      otherResortName: undefined,
24
+      resort: undefined,
25
+      region: undefined,
26
+      owner: undefined,
27
+      season: undefined,
28
+      module: undefined,
29
+      unitNumber: undefined,
30
+      bedrooms: undefined,
31
+      maxSleep: undefined,
32
+      weekNumber: undefined,
33
+      levyAmount: undefined,
30 34
       currentYearBanked: false,
31
-      bankedWith: '',
35
+      bankedWith: undefined,
32 36
       leviesPaidInFull: false,
33 37
       weekPlacedForRental: false,
34
-      originalPurchasePrice: 0,
35
-      originalPurchaseDate: null,
36
-      arrivalDate: null,
37
-      departureDate: null,
38
-      status: {},
38
+      originalPurchasePrice: undefined,
39
+      originalPurchaseDate: undefined,
40
+      arrivalDate: undefined,
41
+      departureDate: undefined,
42
+      sellingPrice: undefined,
43
+      agentCommission: undefined,
44
+      mandate: undefined,
45
+      status: undefined,
39 46
     },
40 47
   },
41 48
   mutations: {
@@ -54,8 +61,8 @@ export default {
54 61
     setResortBedrooms(state, resortBedrooms) {
55 62
       state.resortBedrooms = resortBedrooms;
56 63
     },
57
-    setMaxBedrooms(state, maxBedrooms) {
58
-      state.maxBedrooms = maxBedrooms;
64
+    setMaxSleep(state, maxSleep) {
65
+      state.maxSleep = maxSleep;
59 66
     },
60 67
     setBankedEntities(state, bankedEntities) {
61 68
       state.bankedEntities = bankedEntities;
@@ -79,38 +86,28 @@ export default {
79 86
       dispatch,
80 87
     }) {
81 88
       commit('setResortBedrooms', MyData.resortBedrooms);
82
-      commit('setMaxBedrooms', MyData.maxBedrooms);
89
+      commit('setMaxSleep', MyData.maxBedrooms);
83 90
       commit('setBankedEntities', MyData.bankedEntities);
84
-      dispatch('getUnitConfigurationList');
85
-      dispatch('getSeason');
91
+      dispatch('getSeasons');
86 92
       dispatch('getAgents');
87 93
       dispatch('getAgencies');
88 94
       dispatch('getResorts');
89 95
       dispatch('getRegions');
90 96
     },
91
-    getUnitConfigurationList({
92
-      commit,
93
-      state,
94
-    }) {
95
-      console.log(111);
96
-      axios.get('/api/unitConfiguration')
97
-        .then(result => commit('setUnitConfigurationList', result.data))
98
-        .catch(console.error);
99
-      console.log(state.unitConfigurationList);
100
-    },
101 97
     getSeasons({
102 98
       commit,
103 99
     }) {
104 100
       axios
105
-        .get('http://localhost:57260/api/season')
101
+        .get('/api/season')
106 102
         .then(result => commit('setSeason', result.data))
107 103
         .catch(console.error);
108 104
     },
109 105
     getAgencies({
110 106
       commit,
111 107
     }) {
108
+      console.log(123);
112 109
       axios
113
-        .get('http://localhost:57260/api/agency')
110
+        .get('/api/agency')
114 111
         .then(result => commit('setAgency', result.data))
115 112
         .catch(console.error);
116 113
     },
@@ -118,7 +115,7 @@ export default {
118 115
       commit,
119 116
     }) {
120 117
       axios
121
-        .get('http://localhost:57260/api/agent')
118
+        .get('/api/agent')
122 119
         .then(result => commit('setAgent', result.data))
123 120
         .catch(console.error);
124 121
     },

Loading…
Cancel
Save