JannekeDL пре 5 година
родитељ
комит
955b58ba95

+ 5
- 0
package-lock.json Прегледај датотеку

11716
       "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
11716
       "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
11717
       "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
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
     "validate-npm-package-license": {
11724
     "validate-npm-package-license": {
11720
       "version": "3.0.4",
11725
       "version": "3.0.4",
11721
       "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
11726
       "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",

+ 1
- 0
package.json Прегледај датотеку

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

+ 3
- 0
src/assets/myData.js Прегледај датотеку

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

+ 5
- 1
src/components/shared/searchTab.vue Прегледај датотеку

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

+ 121
- 0
src/components/timeshare/searchTimeshare.vue Прегледај датотеку

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 Прегледај датотеку

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

+ 2
- 0
src/main.js Прегледај датотеку

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

+ 162
- 163
src/router/index.js Прегледај датотеку

40
 Vue.use(Router);
40
 Vue.use(Router);
41
 
41
 
42
 export default new Router({
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 Прегледај датотеку

10
     regions: [],
10
     regions: [],
11
     detailedRegion: [],
11
     detailedRegion: [],
12
     seasons: [],
12
     seasons: [],
13
-    unitConfigurationList: [],
14
     resortBedrooms: [],
13
     resortBedrooms: [],
15
-    maxBedrooms: [],
14
+    maxSleep: [],
16
     bankedEntities: [],
15
     bankedEntities: [],
17
     agencies: [],
16
     agencies: [],
18
     agents: [],
17
     agents: [],
19
     sellItem: {
18
     sellItem: {
20
       referedByAgent: false,
19
       referedByAgent: false,
21
-      agent: {},
22
-      agency: {},
20
+      agent: undefined,
21
+      agency: undefined,
23
       otherResort: false,
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
       currentYearBanked: false,
34
       currentYearBanked: false,
31
-      bankedWith: '',
35
+      bankedWith: undefined,
32
       leviesPaidInFull: false,
36
       leviesPaidInFull: false,
33
       weekPlacedForRental: false,
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
   mutations: {
48
   mutations: {
54
     setResortBedrooms(state, resortBedrooms) {
61
     setResortBedrooms(state, resortBedrooms) {
55
       state.resortBedrooms = resortBedrooms;
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
     setBankedEntities(state, bankedEntities) {
67
     setBankedEntities(state, bankedEntities) {
61
       state.bankedEntities = bankedEntities;
68
       state.bankedEntities = bankedEntities;
79
       dispatch,
86
       dispatch,
80
     }) {
87
     }) {
81
       commit('setResortBedrooms', MyData.resortBedrooms);
88
       commit('setResortBedrooms', MyData.resortBedrooms);
82
-      commit('setMaxBedrooms', MyData.maxBedrooms);
89
+      commit('setMaxSleep', MyData.maxBedrooms);
83
       commit('setBankedEntities', MyData.bankedEntities);
90
       commit('setBankedEntities', MyData.bankedEntities);
84
-      dispatch('getUnitConfigurationList');
85
-      dispatch('getSeason');
91
+      dispatch('getSeasons');
86
       dispatch('getAgents');
92
       dispatch('getAgents');
87
       dispatch('getAgencies');
93
       dispatch('getAgencies');
88
       dispatch('getResorts');
94
       dispatch('getResorts');
89
       dispatch('getRegions');
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
     getSeasons({
97
     getSeasons({
102
       commit,
98
       commit,
103
     }) {
99
     }) {
104
       axios
100
       axios
105
-        .get('http://localhost:57260/api/season')
101
+        .get('/api/season')
106
         .then(result => commit('setSeason', result.data))
102
         .then(result => commit('setSeason', result.data))
107
         .catch(console.error);
103
         .catch(console.error);
108
     },
104
     },
109
     getAgencies({
105
     getAgencies({
110
       commit,
106
       commit,
111
     }) {
107
     }) {
108
+      console.log(123);
112
       axios
109
       axios
113
-        .get('http://localhost:57260/api/agency')
110
+        .get('/api/agency')
114
         .then(result => commit('setAgency', result.data))
111
         .then(result => commit('setAgency', result.data))
115
         .catch(console.error);
112
         .catch(console.error);
116
     },
113
     },
118
       commit,
115
       commit,
119
     }) {
116
     }) {
120
       axios
117
       axios
121
-        .get('http://localhost:57260/api/agent')
118
+        .get('/api/agent')
122
         .then(result => commit('setAgent', result.data))
119
         .then(result => commit('setAgent', result.data))
123
         .catch(console.error);
120
         .catch(console.error);
124
     },
121
     },

+ 1
- 1
src/store/modules/timeshare/unitConfiguration.js Прегледај датотеку

15
     getUnitConfigurationList({
15
     getUnitConfigurationList({
16
       commit,
16
       commit,
17
     }) {
17
     }) {
18
-      axios.get('http://localhost:57260/api/unitConfiguration')
18
+      axios.get('/api/unitConfiguration')
19
         .then(result => commit('setUnitConfigurationList', result.data))
19
         .then(result => commit('setUnitConfigurationList', result.data))
20
         .catch(console.error);
20
         .catch(console.error);
21
     },
21
     },

Loading…
Откажи
Сачувај