Lene 4 jaren geleden
bovenliggende
commit
dd63ca59ed

+ 24
- 21
src/components/property/commercial/createProperty/commercialCreateNew.vue Bestand weergeven

@@ -51,9 +51,9 @@
51 51
               @change="PropertyTypeSelected"
52 52
             >
53 53
               <option value="0">Please select type *</option>
54
-              <option v-for="item in propertyTypes" :value="item.id" :key="item.id">{{
55
-                item.description
56
-              }}</option>
54
+              <option v-for="item in propertyTypes" :value="item.id" :key="item.id">
55
+                {{ item.description }}
56
+              </option>
57 57
             </select>
58 58
           </div>
59 59
           <div v-if="propertyType === 'Commercial'" class="col-md-2">
@@ -94,10 +94,10 @@
94 94
                 </div>
95 95
                 <float-label label="price">
96 96
                   <currency-input
97
-                    onClick="this.setSelectionRange(0, this.value.length)"
97
+                    onclick="this.setSelectionRange(0, this.value.length)"
98 98
                     name="price"
99
-                    :value="value"
100
-                    @input="value = $event"
99
+                    :value="property.price"
100
+                    @input="property.price = $event"
101 101
                     v-model="property.price"
102 102
                     id="price"
103 103
                     class="form-control uniInput"
@@ -139,9 +139,8 @@
139 139
                   class="form-control uniInput"
140 140
                   type="text"
141 141
                   name="streetNumber"
142
-                  id="unit"
142
+                  id="streetNumber"
143 143
                   v-model="property.streetNumber"
144
-                  disabled
145 144
                 />
146 145
               </div>
147 146
             </div>
@@ -154,9 +153,8 @@
154 153
                   class="form-control uniInput"
155 154
                   type="text"
156 155
                   name="streetName"
157
-                  id="unit"
156
+                  id="streetName"
158 157
                   v-model="property.streetName"
159
-                  disabled
160 158
                 />
161 159
               </div>
162 160
             </div>
@@ -169,9 +167,8 @@
169 167
                   class="form-control uniInput"
170 168
                   type="text"
171 169
                   name="suburb"
172
-                  id="unit"
170
+                  id="suburb"
173 171
                   v-model="property.suburb"
174
-                  disabled
175 172
                 />
176 173
               </div>
177 174
             </div>
@@ -184,9 +181,8 @@
184 181
                   class="form-control uniInput"
185 182
                   type="text"
186 183
                   name="city"
187
-                  id="unit"
184
+                  id="city"
188 185
                   v-model="property.city"
189
-                  disabled
190 186
                 />
191 187
               </div>
192 188
             </div>
@@ -199,9 +195,8 @@
199 195
                   class="form-control uniInput"
200 196
                   type="text"
201 197
                   name="province"
202
-                  id="unit"
198
+                  id="province"
203 199
                   v-model="property.province"
204
-                  disabled
205 200
                 />
206 201
               </div>
207 202
             </div>
@@ -214,9 +209,8 @@
214 209
                   class="form-control uniInput"
215 210
                   type="text"
216 211
                   name="postalCode"
217
-                  id="unit"
212
+                  id="postalCode"
218 213
                   v-model="property.postalCode"
219
-                  disabled
220 214
                 />
221 215
               </div>
222 216
             </div>
@@ -229,9 +223,8 @@
229 223
                   class="form-control uniInput"
230 224
                   type="text"
231 225
                   name="country"
232
-                  id="unit"
226
+                  id="country"
233 227
                   v-model="property.country"
234
-                  disabled
235 228
                 />
236 229
               </div>
237 230
             </div>
@@ -261,13 +254,14 @@
261 254
         <div v-for="item in propertyFields" :key="item.id">
262 255
           <div v-if="item.name === 'Commercial Fields'">
263 256
             <UserField
264
-              :fields="item.fields"
257
+              :fields="sortFields"
265 258
               :id="item.name"
266 259
               @UpdateUserDefinedFields="UpdateUserDefinedFields"
267 260
               :fieldValues="item.fields"
268 261
             />
269 262
           </div>
270 263
         </div>
264
+
271 265
         <div class="row">
272 266
           <div class="col-sm-12">
273 267
             <div class="section-header">
@@ -407,6 +401,7 @@ export default {
407 401
     TypeChanged() {
408 402
       this.property.propertyUsageType = this.propertyType;
409 403
     },
404
+
410 405
     SubmitData() {
411 406
       if (this.property.propertyTypeId === 0) {
412 407
         this.showPropertyTypeError = true;
@@ -542,6 +537,14 @@ export default {
542 537
     ]),
543 538
     ...mapState("authentication", ["user"]),
544 539
     ...mapGetters("fees", ["getListingFee"]),
540
+    sortFields() {
541
+      var display = [];
542
+
543
+      display = this.propertyFields[0].fields.sort((a, b) => (a.rank > b.rank ? 1 : -1));
544
+      console.log(display);
545
+
546
+      return display;
547
+    },
545 548
     SalesTypeChanged() {
546 549
       // eslint-disable-next-line vue/no-side-effects-in-computed-properties
547 550
       // this.propertyType = this.$route.params.propType;

+ 7
- 7
src/components/property/editProperty/editProperty.vue Bestand weergeven

@@ -160,7 +160,7 @@
160 160
                         name="streetNumber"
161 161
                         id="unit"
162 162
                         v-model="property.streetNumber"
163
-                        disabled
163
+                        :disabled="!canEdit"
164 164
                       />
165 165
                     </div>
166 166
                   </div>
@@ -175,7 +175,7 @@
175 175
                         name="streetName"
176 176
                         id="unit"
177 177
                         v-model="property.streetName"
178
-                        disabled
178
+                        :disabled="!canEdit"
179 179
                       />
180 180
                     </div>
181 181
                   </div>
@@ -190,7 +190,7 @@
190 190
                         name="suburb"
191 191
                         id="unit"
192 192
                         v-model="property.suburb"
193
-                        disabled
193
+                        :disabled="!canEdit"
194 194
                       />
195 195
                     </div>
196 196
                   </div>
@@ -205,7 +205,7 @@
205 205
                         name="city"
206 206
                         id="unit"
207 207
                         v-model="property.city"
208
-                        disabled
208
+                        :disabled="!canEdit"
209 209
                       />
210 210
                     </div>
211 211
                   </div>
@@ -220,7 +220,7 @@
220 220
                         name="province"
221 221
                         id="unit"
222 222
                         v-model="property.province"
223
-                        disabled
223
+                        :disabled="!canEdit"
224 224
                       />
225 225
                     </div>
226 226
                   </div>
@@ -235,7 +235,7 @@
235 235
                         name="postalCode"
236 236
                         id="unit"
237 237
                         v-model="property.postalCode"
238
-                        disabled
238
+                        :disabled="!canEdit"
239 239
                       />
240 240
                     </div>
241 241
                   </div>
@@ -250,7 +250,7 @@
250 250
                         name="country"
251 251
                         id="unit"
252 252
                         v-model="property.country"
253
-                        disabled
253
+                        :disabled="!canEdit"
254 254
                       />
255 255
                     </div>
256 256
                   </div>

+ 20
- 29
src/components/property/residential/createProperty/residentialCreateNew.vue Bestand weergeven

@@ -51,9 +51,9 @@
51 51
               @change="PropertyTypeSelected"
52 52
             >
53 53
               <option value="0">Please select type *</option>
54
-              <option v-for="item in propertyTypes" :value="item.id" :key="item.id">{{
55
-                item.description
56
-              }}</option>
54
+              <option v-for="item in propertyTypes" :value="item.id" :key="item.id">
55
+                {{ item.description }}
56
+              </option>
57 57
             </select>
58 58
           </div>
59 59
         </div>
@@ -79,15 +79,10 @@
79 79
                   >
80 80
                 </div>
81 81
                 <float-label label="Price">
82
-                  <currency-input
83
-                    onClick="this.setSelectionRange(0, this.value.length)"
84
-                    name="price"
85
-                    :value="value"
86
-                    @input="value = $event"
87
-                    v-model="property.price"
88
-                    id="price"
89
-                    class="form-control uniInput"
90
-                  />
82
+                  <currency-input <<<<<<< HEAD ======= onclick="this.setSelectionRange(0,
83
+                  this.value.length)" >>>>>>> 6bbfd86e089da859d019dcbda5cc0fe053af8db2 name="price"
84
+                  :value="property.price" @input="property.price = $event" v-model="property.price"
85
+                  id="price" class="form-control uniInput" />
91 86
                 </float-label>
92 87
               </div>
93 88
               <div v-if="salesType === 'Rental'" class="col-md-6">
@@ -125,9 +120,8 @@
125 120
                   class="form-control uniInput"
126 121
                   type="text"
127 122
                   name="streetNumber"
128
-                  id="unit"
123
+                  id="streetNumber"
129 124
                   v-model="property.streetNumber"
130
-                  disabled
131 125
                 />
132 126
               </div>
133 127
             </div>
@@ -140,9 +134,8 @@
140 134
                   class="form-control uniInput"
141 135
                   type="text"
142 136
                   name="streetName"
143
-                  id="unit"
137
+                  id="streetName"
144 138
                   v-model="property.streetName"
145
-                  disabled
146 139
                 />
147 140
               </div>
148 141
             </div>
@@ -155,9 +148,8 @@
155 148
                   class="form-control uniInput"
156 149
                   type="text"
157 150
                   name="suburb"
158
-                  id="unit"
151
+                  id="suburb"
159 152
                   v-model="property.suburb"
160
-                  disabled
161 153
                 />
162 154
               </div>
163 155
             </div>
@@ -170,9 +162,8 @@
170 162
                   class="form-control uniInput"
171 163
                   type="text"
172 164
                   name="city"
173
-                  id="unit"
165
+                  id="city"
174 166
                   v-model="property.city"
175
-                  disabled
176 167
                 />
177 168
               </div>
178 169
             </div>
@@ -185,9 +176,8 @@
185 176
                   class="form-control uniInput"
186 177
                   type="text"
187 178
                   name="province"
188
-                  id="unit"
179
+                  id="province"
189 180
                   v-model="property.province"
190
-                  disabled
191 181
                 />
192 182
               </div>
193 183
             </div>
@@ -200,9 +190,8 @@
200 190
                   class="form-control uniInput"
201 191
                   type="text"
202 192
                   name="postalCode"
203
-                  id="unit"
193
+                  id="postalCode"
204 194
                   v-model="property.postalCode"
205
-                  disabled
206 195
                 />
207 196
               </div>
208 197
             </div>
@@ -215,9 +204,8 @@
215 204
                   class="form-control uniInput"
216 205
                   type="text"
217 206
                   name="country"
218
-                  id="unit"
207
+                  id="country"
219 208
                   v-model="property.country"
220
-                  disabled
221 209
                 />
222 210
               </div>
223 211
             </div>
@@ -261,8 +249,8 @@
261 249
           :fields="propertyOverviewFields[0].fields"
262 250
           @UpdateUserDefinedFields="UpdateUserDefinedFields"
263 251
           :id="1"
264
-        ></UserField>
265
-        <div class="row">
252
+        ></UserField> -->
253
+        <!-- <div class="row">
266 254
           <div class="col-md-12">
267 255
             <div v-for="item in propertyFields" :key="item.id">
268 256
               <div class="row">
@@ -280,7 +268,7 @@
280 268
               />
281 269
             </div>
282 270
           </div>
283
-        </div> -->
271
+        </div>-->
284 272
         <div class="row">
285 273
           <div class="col-sm-12">
286 274
             <div class="section-header">
@@ -568,6 +556,9 @@ export default {
568 556
     ]),
569 557
     ...mapState("authentication", ["user"]),
570 558
     ...mapGetters("fees", ["getListingFee"]),
559
+    sortFields() {
560
+      return this.propertyFields[0].fields.sort((a, b) => (a.rank > b.rank ? 1 : -1));
561
+    },
571 562
     SalesTypeChanged() {
572 563
       // eslint-disable-next-line vue/no-side-effects-in-computed-properties
573 564
       // this.propertyType = this.$route.params.propType;

+ 78
- 69
src/components/shared/listView.vue Bestand weergeven

@@ -2,7 +2,7 @@
2 2
 <template>
3 3
   <div>
4 4
     <div style="height:5px"></div>
5
-    <div class="d-flex justify-content-between ">
5
+    <div class="d-flex justify-content-between">
6 6
       <div class="p-2" v-if="!hideSearch">
7 7
         <float-label label="SEARCH">
8 8
           <input v-model="searchItem" class="form-control uniInput mt-3" placeholder="Search..." />
@@ -14,9 +14,11 @@
14 14
       <div class="p-2">
15 15
         <div class="d-flex flex-row">
16 16
           <div class="p2" v-if="showColumnChooser">
17
-            <div class="btn-solid-blue cursor-pointer" data-toggle="modal" data-target="#myModal">
18
-              Column Chooser
19
-            </div>
17
+            <div
18
+              class="btn-solid-blue cursor-pointer"
19
+              data-toggle="modal"
20
+              data-target="#myModal"
21
+            >Column Chooser</div>
20 22
             <div class="col-md-12">
21 23
               <div id="myModal" class="modal fade" role="dialog">
22 24
                 <div class="modal-dialog modal-lg" style="width:500px">
@@ -35,14 +37,10 @@
35 37
             </div>
36 38
           </div>
37 39
           <div class="p2" v-if="selectedItems.length > 0">
38
-            <div class="btn-solid-blue cursor-pointer" @click="onClearSelected()">
39
-              Clear Selected
40
-            </div>
40
+            <div class="btn-solid-blue cursor-pointer" @click="onClearSelected()">Clear Selected</div>
41 41
           </div>
42 42
           <div class="p2" v-if="showNew">
43
-            <div class="btn-solid-blue cursor-pointer" @click="onNew()">
44
-              New
45
-            </div>
43
+            <div class="btn-solid-blue cursor-pointer" @click="onNew()">New</div>
46 44
           </div>
47 45
         </div>
48 46
       </div>
@@ -64,12 +62,14 @@
64 62
                 :class="{ active: hover === c }"
65 63
               >
66 64
                 <div class="d-flex bd-highlight">
67
-                  <div v-if="displayHeaders.length === 0" class="p-2 w-100 bd-highlight">
68
-                    {{ column | toProper }}
69
-                  </div>
70
-                  <div v-else class="p-2 w-100 bd-highlight">
71
-                    {{ displayHeaders[c] !== "" ? displayHeaders[c] : column | toProper }}
72
-                  </div>
65
+                  <div
66
+                    v-if="displayHeaders.length === 0"
67
+                    class="p-2 w-100 bd-highlight"
68
+                  >{{ column | toProper }}</div>
69
+                  <div
70
+                    v-else
71
+                    class="p-2 w-100 bd-highlight"
72
+                  >{{ displayHeaders[c] !== "" ? displayHeaders[c] : column | toProper }}</div>
73 73
                   <div class="p-2 flex-shrink-1 bd-highlight">
74 74
                     <img
75 75
                       src="../../../public/img/sort-up.png"
@@ -98,26 +98,28 @@
98 98
             :class="{ selected: isSelected(i), 'cursor-pointer': allowSelect }"
99 99
           >
100 100
             <td v-for="(column, c) in Columns" :key="c">
101
-              <div v-if="displayFormats.length === 0">
102
-                {{ isObject(item[column]) ? item[column].display : item[column] }}
103
-              </div>
101
+              <div
102
+                v-if="displayFormats.length === 0"
103
+              >{{ isObject(item[column]) ? item[column].display : item[column] }}</div>
104 104
               <div v-else-if="displayFormats.length > 0 && displayFormats[c] === 'date'">
105
-                <div v-if="item[column] !== '0001-01-01T00:00:00'">
106
-                  {{ isObject(item[column]) ? item[column].display : item[column] | toDate }}
107
-                </div>
108
-              </div>
109
-              <div v-else-if="displayFormats.length > 0 && displayFormats[c] === 'money'">
110
-                {{ isObject(item[column]) ? item[column].display : item[column] | toCurrency }}
105
+                <div
106
+                  v-if="item[column] !== '0001-01-01T00:00:00'"
107
+                >{{ isObject(item[column]) ? item[column].display : item[column] | toDate }}</div>
111 108
               </div>
109
+              <div
110
+                v-else-if="displayFormats.length > 0 && displayFormats[c] === 'money'"
111
+              >{{ isObject(item[column]) ? item[column].display : item[column] | toCurrency }}</div>
112 112
               <div v-else-if="displayFormats.length > 0 && displayFormats[c] === 'image'">
113 113
                 <img :src="item[column]" style="height:100px; width:100px; object-fit: cover;" />
114 114
               </div>
115 115
               <div v-else>{{ isObject(item[column]) ? item[column].display : item[column] }}</div>
116 116
             </td>
117 117
             <td v-if="showCustomAction" class="my-width">
118
-              <button type="button" class="btn my-btn" @click="onCustomClick(item)">
119
-                {{ CustomActionHeading }}
120
-              </button>
118
+              <button
119
+                type="button"
120
+                class="btn my-btn"
121
+                @click="onCustomClick(item)"
122
+              >{{ CustomActionHeading }}</button>
121 123
             </td>
122 124
             <td v-if="editable" class="my-width">
123 125
               <a @click="onEdit(item)" class="p-3">
@@ -137,10 +139,10 @@
137 139
       <div class="d-flex justify-content-between" v-if="showPager">
138 140
         <div class="p-1">
139 141
           {{
140
-            currentPage +
141
-              " / " +
142
-              PageCount +
143
-              (!hideItemCount ? " - (" + FilteredItems.length + " items)" : "")
142
+          currentPage +
143
+          " / " +
144
+          PageCount +
145
+          (!hideItemCount ? " - (" + FilteredItems.length + " items)" : "")
144 146
           }}
145 147
         </div>
146 148
         <div class="p-1">
@@ -185,7 +187,7 @@ export default {
185 187
   components: {
186 188
     BasePagination,
187 189
     Alert,
188
-    ListViewControl
190
+    ListViewControl,
189 191
   },
190 192
   mounted() {
191 193
     try {
@@ -201,72 +203,75 @@ export default {
201 203
   },
202 204
   props: {
203 205
     compact: {
204
-      default: true
206
+      default: true,
205 207
     },
206 208
     allowSelect: {
207
-      default: true
209
+      default: true,
208 210
     },
209 211
     allowMultipleSelect: {
210
-      default: false
212
+      default: false,
211 213
     },
212 214
     hideSearch: {
213
-      default: false
215
+      default: false,
214 216
     },
215 217
     showNew: {
216
-      default: true
218
+      default: true,
217 219
     },
218 220
     items: undefined,
219 221
     editable: {
220
-      default: false
222
+      default: false,
221 223
     },
222 224
     deleteable: {
223
-      default: false
225
+      default: false,
224 226
     },
225 227
     columnCount: {
226
-      default: 6
228
+      default: 6,
227 229
     },
228 230
     showPager: {
229
-      default: true
231
+      default: true,
230 232
     },
231 233
     title: {
232
-      default: undefined
234
+      default: undefined,
233 235
     },
234 236
     sortKey: {
235
-      default: "id"
237
+      default: "id",
236 238
     },
237 239
     hideItemCount: {
238
-      default: false
240
+      default: false,
239 241
     },
240 242
     currentPage: {
241
-      default: 1
243
+      default: 1,
242 244
     },
243 245
     bordered: {
244
-      default: true
246
+      default: true,
245 247
     },
246 248
     striped: {
247
-      default: true
249
+      default: true,
248 250
     },
249 251
     showColumnChooser: {
250
-      default: true
252
+      default: true,
251 253
     },
252 254
     displayColumns: {
253
-      default: []
255
+      type: Array,
256
+      default: () => [],
254 257
     },
255 258
     displayFormats: {
256
-      default: []
259
+      type: Array,
260
+      default: () => [],
257 261
     },
258 262
     displayHeaders: {
259
-      default: []
263
+      type: Array,
264
+      default: () => [],
260 265
     },
261 266
     showCustomAction: {
262
-      default: false
267
+      default: false,
263 268
     },
264 269
     CustomActionHeading: {
265
-      default: ""
270
+      default: "",
266 271
     },
267 272
     CustomActionCondition: {
268
-      default: ""
269
-    }
273
+      default: "",
274
+    },
270 275
   },
271 276
   data() {
272 277
     return {
@@ -279,7 +284,7 @@ export default {
279 284
       visibleItemsPerPageCount: 20,
280 285
       itemsPerPageList: ItemsPerPageList,
281 286
       visibleColumn: [],
282
-      allColumn: []
287
+      allColumn: [],
283 288
     };
284 289
   },
285 290
   methods: {
@@ -301,12 +306,16 @@ export default {
301 306
         for (const i in Object.keys(this.items)) {
302 307
           const item = this.items[i];
303 308
           for (const o in Object.keys(item)) {
304
-            if (!listAll.includes(Object.keys(item)[o]) && !Array.isArray(Object.values(item)[o])) {
309
+            if (
310
+              !listAll.includes(Object.keys(item)[o]) &&
311
+              !Array.isArray(Object.values(item)[o])
312
+            ) {
305 313
               const columnName = Object.keys(item)[o];
306
-              if (!listAll.some(x => x.column === columnName)) {
314
+              if (!listAll.some((x) => x.column === columnName)) {
307 315
                 listAll.push({
308 316
                   column: columnName,
309
-                  show: _.filter(listAll, x => x.show).length < this.columnCount
317
+                  show:
318
+                    _.filter(listAll, (x) => x.show).length < this.columnCount,
310 319
                 });
311 320
               }
312 321
             }
@@ -321,7 +330,7 @@ export default {
321 330
     },
322 331
     isSelected(i) {
323 332
       const ind = this.getActualIndex(i);
324
-      return _.some(this.selectedItems, x => x === ind);
333
+      return _.some(this.selectedItems, (x) => x === ind);
325 334
     },
326 335
     onNew() {
327 336
       this.$emit("onNew");
@@ -357,8 +366,8 @@ export default {
357 366
     },
358 367
     onRowClick(item, i) {
359 368
       const ind = this.getActualIndex(i);
360
-      if (_.some(this.selectedItems, x => x === ind)) {
361
-        this.selectedItems = this.selectedItems.filter(x => x !== ind);
369
+      if (_.some(this.selectedItems, (x) => x === ind)) {
370
+        this.selectedItems = this.selectedItems.filter((x) => x !== ind);
362 371
       } else {
363 372
         if (!this.allowMultipleSelect) {
364 373
           this.selectedItems = [];
@@ -411,7 +420,7 @@ export default {
411 420
         if (array[i] === value) return true;
412 421
       }
413 422
       return false;
414
-    }
423
+    },
415 424
   },
416 425
   computed: {
417 426
     ListWidth() {
@@ -438,7 +447,7 @@ export default {
438 447
           listColumns.push(this.displayColumns[i]);
439 448
         }
440 449
       } else {
441
-        const list = _.filter(this.allColumn, x => x.show);
450
+        const list = _.filter(this.allColumn, (x) => x.show);
442 451
         for (const i in list) {
443 452
           const item = list[i];
444 453
           if (item) {
@@ -455,9 +464,9 @@ export default {
455 464
       return list;
456 465
     },
457 466
     FilteredItems() {
458
-      const list = _.filter(this.items, item =>
467
+      const list = _.filter(this.items, (item) =>
459 468
         Object.values(item).some(
460
-          i =>
469
+          (i) =>
461 470
             JSON.stringify(i)
462 471
               .toLowerCase()
463 472
               .indexOf(this.searchItem.toLowerCase()) > -1
@@ -475,8 +484,8 @@ export default {
475 484
       return list.slice(startSlice, endSlice);
476 485
     },
477 486
 
478
-    GetAllColumn() {}
479
-  }
487
+    GetAllColumn() {},
488
+  },
480 489
 };
481 490
 </script>
482 491
 <style scoped>

+ 5
- 5
src/components/timeshare/resort/contentSection.vue Bestand weergeven

@@ -62,10 +62,10 @@ export default {
62 62
     ResortImages,
63 63
     gallerySection,
64 64
   },
65
-  async mounted() {
66
-    await this.initResort(this.resortCode);
67
-    setTimeout(() => (this.boolLoaded = true), 2000);
68
-  },
65
+  // async mounted() {
66
+  //   await this.initResort(this.resortCode);
67
+  //   setTimeout(() => (this.boolLoaded = true), 2000);
68
+  // },
69 69
   data() {
70 70
     return {
71 71
       index: null,
@@ -83,7 +83,7 @@ export default {
83 83
     },
84 84
   },
85 85
   methods: {
86
-    ...mapActions("resort", ["initResort"]),
86
+    ...mapActions("resort", ["GetResortData"]),
87 87
     routerGoTo(goto) {
88 88
       this.$router.push(goto);
89 89
     },

+ 6
- 5
src/components/timeshare/resort/resortPage.vue Bestand weergeven

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <div>
3
-    <carouselSection v-if="boolLoaded" :resortImages="images" />
3
+    <carouselSection v-if="boolLoaded" :resortImages="resort.images" />
4 4
     <main id="main" style="margin-top:-20px">
5 5
       <contentSection :resortCode="resortCode" />
6 6
     </main>
@@ -26,9 +26,10 @@ export default {
26 26
     resortCode: {},
27 27
   },
28 28
   async created() {
29
-    this.initResort(this.resortCode).then(() => {
30
-      setTimeout(() => (this.boolLoaded = true), 2000);
31
-    });
29
+    this.getResortData(this.resortCode);
30
+    // .then(() => {
31
+    //   setTimeout(() => (this.boolLoaded = true), 2000);
32
+    // });
32 33
   },
33 34
   computed: {
34 35
     ...mapState("resort", ["resort", "description", "images", "layout"]),
@@ -39,7 +40,7 @@ export default {
39 40
     },
40 41
   },
41 42
   methods: {
42
-    ...mapActions("resort", ["initResort"]),
43
+    ...mapActions("resort", ["getResortData"]),
43 44
     routerGoTo(goto) {
44 45
       this.$router.push(goto);
45 46
     },

+ 100
- 0
src/components/timeshare/resort/resortPageNew.vue Bestand weergeven

@@ -0,0 +1,100 @@
1
+<template>
2
+  <div>
3
+    <carouselSection v-if="!wait" :resortImages="resort.images" />
4
+    <main id="main" style="margin-top:-20px">
5
+      <section>
6
+        <div class="container">
7
+          <div class="row" id="resort-profile">
8
+            <div class="col-md-3">
9
+              <img src="img/listings/property1/property1-gallery.jpg" class="img-fluid" alt />
10
+              <div class="row no-gutters">
11
+                <div class="col-6">
12
+                  <img src="img/listings/property1/property1-gallery.jpg" class="img-fluid" alt />
13
+                </div>
14
+                <div class="col-6">
15
+                  <img src="img/listings/property1/property1-gallery.jpg" class="img-fluid" alt />
16
+                </div>
17
+              </div>
18
+              <gallerySection :images="resort.images" />
19
+              <FilterComponent :hideTop="true" />
20
+            </div>
21
+            <div class="col-md-9 p-5 resort-profile">
22
+              <h2>{{ resort.prName }}</h2>
23
+              <WeekList :resortCode="resortCode" />
24
+              <p v-if="resort.description && resort.description !== ''">{{ resort.description }}</p>
25
+              <br v-if="resort.description && resort.description !== ''" />
26
+              <p>{{ resort.prNotes }}</p>
27
+              <div class="d-flex mt-3">
28
+                <iframe
29
+                  width="100%"
30
+                  height="200"
31
+                  id="gmap_canvas"
32
+                  :src="
33
+                'https://maps.google.com/maps?q=' +
34
+                  resort.prLatitude +
35
+                  ',' +
36
+                  resort.prLongitude +
37
+                  '&hl=en&z=14&amp;output=embed'
38
+              "
39
+                  frameborder="0"
40
+                  scrolling="no"
41
+                  marginheight="0"
42
+                  marginwidth="0"
43
+                ></iframe>
44
+              </div>
45
+            </div>
46
+          </div>
47
+        </div>
48
+      </section>
49
+    </main>
50
+    <div v-if="wait" id="preloader"></div>
51
+  </div>
52
+</template>
53
+
54
+<script>
55
+/* eslint-disable */
56
+import { mapState, mapActions } from "vuex";
57
+import WeekList from "../buy/weekListComponent.vue";
58
+import FilterComponent from "../searchTimeshare.vue";
59
+import ResortImages from "./resortImage.vue";
60
+import gallerySection from "./gallerySection";
61
+import carouselSection from "./carouselSection";
62
+
63
+export default {
64
+  components: {
65
+    carouselSection,
66
+    WeekList,
67
+    FilterComponent,
68
+    ResortImages,
69
+    gallerySection,
70
+  },
71
+  data() {
72
+    return {
73
+      wait: false,
74
+    };
75
+  },
76
+  props: {
77
+    resortCode: {},
78
+  },
79
+  methods: {
80
+    ...mapActions("resort", ["getResortData"]),
81
+    routerGoTo(goto) {
82
+      this.$router.push(goto);
83
+    },
84
+  },
85
+  computed: {
86
+    ...mapState("resort", ["resort"]),
87
+  },
88
+  mounted() {
89
+    this.wait = true;
90
+    this.getResortData(this.resortCode).then((fulfilled) => {
91
+      this.wait = false;
92
+    });
93
+    // .then(() => {
94
+    //   setTimeout(() => (this.boolLoaded = true), 2000);
95
+    // });
96
+  },
97
+};
98
+</script>
99
+
100
+<style lang="scss" scoped></style>

+ 1
- 1
src/components/timeshare/resort/unit/summarySection.vue Bestand weergeven

@@ -9,7 +9,7 @@
9 9
     </div>
10 10
     <div class="row mt-5">
11 11
       <div class="col-md-12 col-lg-4">
12
-        <gallerySection :images="images" />
12
+        <gallerySection :images="resort.images" />
13 13
       </div>
14 14
       <div class="col-md-12 col-lg-8 summarySection">
15 15
         <h4>

+ 124
- 0
src/components/timeshare/resort/unit/unitPageNew.vue Bestand weergeven

@@ -0,0 +1,124 @@
1
+<template>
2
+  <main id="main" style="padding-bottom:50px">
3
+    <carouselSection v-if="!wait" :resortImages="resort.images" />
4
+    <summarySection :resortCode="resortCode" :unitNumber="unitNumber" />
5
+    <div class="container">
6
+      <div class="row mt-5">
7
+        <div class="col">
8
+          <tabSection
9
+            style="margin-bottom:100px"
10
+            :resortCode="resortCode"
11
+            :resortCoords="resort.prPostAdd1"
12
+            :layoutImages="layouts"
13
+            :resortName="resort.prName"
14
+          />
15
+        </div>
16
+      </div>
17
+    </div>
18
+    <div v-if="wait" id="preloader"></div>
19
+  </main>
20
+</template>
21
+
22
+<script>
23
+/* eslint-disable */
24
+import { mapState, mapActions, mapGetters } from "vuex";
25
+import gallerySection from "../gallerySection";
26
+import tabSection from "./tabSection";
27
+import summarySection from "./summarySection";
28
+import carouselSection from "./carouselSection";
29
+
30
+export default {
31
+  name: "unit",
32
+  components: {
33
+    gallerySection,
34
+    tabSection,
35
+    summarySection,
36
+    carouselSection,
37
+  },
38
+  props: {
39
+    resortCode: {},
40
+    unitNumber: {},
41
+  },
42
+  data() {
43
+    return {
44
+      wait: false,
45
+    };
46
+  },
47
+  mounted() {
48
+    // await this.initResort(this.resortCode);
49
+    // if (this.resortCode) {
50
+    //   this.applyResortFilter(this.resortCode);
51
+    // }
52
+    // await this.layouts.push(this.layout);
53
+    // await this.getWeeks();
54
+    // setTimeout(() => {
55
+    //   this.boolLoaded = true;
56
+    // }, 500);
57
+    this.wait = true;
58
+    this.getResortData(this.resortCode).then((fulfilled) => {
59
+      this.applyResortFilter(this.resortCode);
60
+      this.getWeeks();
61
+      this.wait = false;
62
+    });
63
+  },
64
+  computed: {
65
+    ...mapState("resort", ["resort"]),
66
+
67
+    ...mapGetters({
68
+      weekById: "weekList/weekById",
69
+    }),
70
+    week() {
71
+      return this.weekById(this.resortCode, this.unitNumber);
72
+    },
73
+    layouts() {
74
+      var layouts = [];
75
+      layouts.push(this.resort.layout);
76
+      return layouts;
77
+    },
78
+    // ...mapState('week', ['currentWeek']),
79
+  },
80
+  methods: {
81
+    ...mapActions("weekList", ["getWeeks", "applyResortFilter"]),
82
+    ...mapActions("resort", ["getResortData"]),
83
+    // ...mapActions('week', ['initWeek']),
84
+    formatPrice(value) {
85
+      if (value) {
86
+        const val = (value / 1).toFixed(2);
87
+        return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");
88
+      }
89
+      return "";
90
+    },
91
+  },
92
+};
93
+</script>
94
+
95
+<style lang="scss" scoped>
96
+/* Extra small devices (phones, 600px and down) */
97
+@media only screen and (max-width: 600px) {
98
+  .summarySection {
99
+    margin-top: 1px;
100
+  }
101
+}
102
+
103
+/* Small devices (portrait tablets and large phones, 600px and up) */
104
+@media only screen and (min-width: 600px) {
105
+  .summarySection {
106
+    margin-top: 1px;
107
+  }
108
+}
109
+
110
+/* Medium devices (landscape tablets, 768px and up) */
111
+@media only screen and (min-width: 768px) {
112
+  .summarySection {
113
+    margin-top: -50px;
114
+  }
115
+}
116
+
117
+/* Large devices (laptops/desktops, 992px and up) */
118
+@media only screen and (min-width: 992px) {
119
+}
120
+
121
+/* Extra large devices (large laptops and desktops, 1200px and up) */
122
+@media only screen and (min-width: 1200px) {
123
+}
124
+</style>

+ 2
- 2
src/router/index.js Bestand weergeven

@@ -50,8 +50,8 @@ import UnitConfiguration from "../components/admin/unitConfiguration/unitConfigu
50 50
 import agentManagementPage from "../components/admin/status/agentsUserManagementPage.vue";
51 51
 import Fees from "../components/admin/fees/feesPage.vue";
52 52
 
53
-import ResortPage from "../components/timeshare/resort/resortPage.vue";
54
-import UnitPage from "../components/timeshare/resort/unit/unitPage.vue";
53
+import ResortPage from "../components/timeshare/resort/resortPageNew.vue";
54
+import UnitPage from "../components/timeshare/resort/unit/unitPageNew.vue";
55 55
 import ToBuySearch from "../components/timeshare/buy/toBuySearchResults.vue";
56 56
 
57 57
 import ContactUs from "../components/misc/contactUs.vue";

+ 12
- 0
src/store/modules/timeshare/resort.js Bestand weergeven

@@ -1,6 +1,7 @@
1 1
 /* eslint-disable no-restricted-syntax */
2 2
 /* eslint-disable guard-for-in */
3 3
 import axios from "axios";
4
+import { reject } from "core-js/fn/promise";
4 5
 
5 6
 export default {
6 7
   namespaced: true,
@@ -134,6 +135,17 @@ export default {
134 135
           `https://www.tradeunipoint.com/unibackend/seam/resource/rest/products/social/${resortCode}`
135 136
         )
136 137
         .then(result => commit("setResortMedia", result.data));
138
+    },
139
+    getResortData({ commit }, resortCode) {
140
+      return new Promise((resolve, reject) => {
141
+        axios
142
+          .get(`/api/resort/GetResortData/${resortCode}`)
143
+          .then(result => {
144
+            commit("setResort", result.data);
145
+            resolve();
146
+          })
147
+          .catch(error => reject(new Error(error.message)));
148
+      });
137 149
     }
138 150
   }
139 151
 };

+ 1
- 1
vue.config.js Bestand weergeven

@@ -2,7 +2,7 @@ module.exports = {
2 2
   devServer: {
3 3
     proxy: {
4 4
       "/api": {
5
-        // target: "http://localhost:57260/",
5
+        //target: "http://localhost:57260/",
6 6
         target: "http://training.provision-sa.com:82",
7 7
         changeOrigin: true
8 8
       },

Laden…
Annuleren
Opslaan