Преглед на файлове

Add Consent to TimeshareAdmin and Offers

master
Brian Conway преди 2 години
родител
ревизия
103f095d77

+ 133
- 105
src/components/admin/property/propertyList.vue Целия файл

@@ -8,11 +8,16 @@
8 8
         <h6>{{ curAgency }}</h6>
9 9
       </div>
10 10
       <div v-if="ROLE === 'Agent'">
11
-        <h6>{{ agent[0].name + " " + agent[0].surname }}</h6>
11
+        <h6>{{ agent[0].name + ' ' + agent[0].surname }}</h6>
12 12
       </div>
13 13
       <div class="row">
14 14
         <div class="col-lg-6 offset-3">
15
-          <input class="form-control uniSelect" type="text" placeholder="SEARCH" v-model="filter" />
15
+          <input
16
+            class="form-control uniSelect"
17
+            type="text"
18
+            placeholder="SEARCH"
19
+            v-model="filter"
20
+          />
16 21
         </div>
17 22
       </div>
18 23
       <div class="row">
@@ -76,7 +81,11 @@
76 81
                 <td>{{ item.type }}</td>
77 82
                 <td v-if="!item.isPublished">
78 83
                   <a v-on:click="Publish(item)">
79
-                    <img src="../../../../public/img/icons/Upload.png" height="25" width="25" />
84
+                    <img
85
+                      src="../../../../public/img/icons/Upload.png"
86
+                      height="25"
87
+                      width="25"
88
+                    />
80 89
                   </a>
81 90
                 </td>
82 91
                 <td v-else>
@@ -90,12 +99,20 @@
90 99
                 </td>
91 100
                 <td>
92 101
                   <a v-on:click="Edit(item)">
93
-                    <img src="../../../../public/img/icons/Edit.png" height="25" width="25" />
102
+                    <img
103
+                      src="../../../../public/img/icons/Edit.png"
104
+                      height="25"
105
+                      width="25"
106
+                    />
94 107
                   </a>
95 108
                 </td>
96 109
                 <td>
97 110
                   <a v-on:click="Delete(item)">
98
-                    <img src="../../../../public/img/icons/delete.png" height="25" width="25" />
111
+                    <img
112
+                      src="../../../../public/img/icons/delete.png"
113
+                      height="25"
114
+                      width="25"
115
+                    />
99 116
                   </a>
100 117
                 </td>
101 118
               </tr>
@@ -104,7 +121,10 @@
104 121
           <div class="d-flex justify-content-between" v-if="showPager">
105 122
             <div class="p-1">
106 123
               {{
107
-                currentPage + " / " + PageCount + (" - (" + FilteredProperties.length + " items)")
124
+                currentPage +
125
+                ' / ' +
126
+                PageCount +
127
+                (' - (' + FilteredProperties.length + ' items)')
108 128
               }}
109 129
             </div>
110 130
             <div class="p-1">
@@ -124,7 +144,9 @@
124 144
                     v-model="visibleItemsPerPageCount"
125 145
                     @change="onChangeItemsPerPage()"
126 146
                   >
127
-                    <option v-for="(item, i) in itemsPerPageList" :key="i">{{ item }}</option>
147
+                    <option v-for="(item, i) in itemsPerPageList" :key="i">
148
+                      {{ item }}
149
+                    </option>
128 150
                   </select>
129 151
                 </div>
130 152
               </div>
@@ -133,7 +155,11 @@
133 155
           <div class="p-2">
134 156
             <div class="d-flex flex-row">
135 157
               <div>
136
-                <button v-if="sortKey !== 'id'" class="btn-solid-blue" @click="ClearSort">
158
+                <button
159
+                  v-if="sortKey !== 'id'"
160
+                  class="btn-solid-blue"
161
+                  @click="ClearSort"
162
+                >
137 163
                   Clear Sort
138 164
                 </button>
139 165
               </div>
@@ -147,15 +173,15 @@
147 173
 
148 174
 <script>
149 175
 /* eslint-disable */
150
-import { mapState, mapActions } from "vuex";
151
-import Log from "../../../assets/Log";
152
-import BasePagination from "../../shared/basePagination";
153
-import ItemsPerPageList from "../../../assets/staticData/itemsPerPageFive";
154
-import _ from "lodash";
176
+import { mapState, mapActions } from 'vuex'
177
+import Log from '../../../assets/Log'
178
+import BasePagination from '../../shared/basePagination'
179
+import ItemsPerPageList from '../../../assets/staticData/itemsPerPageFive'
180
+import _ from 'lodash'
155 181
 
156 182
 export default {
157 183
   components: {
158
-    BasePagination
184
+    BasePagination,
159 185
   },
160 186
   data() {
161 187
     return {
@@ -168,155 +194,157 @@ export default {
168 194
       itemsPerPageList: ItemsPerPageList,
169 195
       currentPage: 1,
170 196
       reverse: true,
171
-      sortKey: "id",
197
+      sortKey: 'id',
172 198
       displayColumns: [
173
-        "ID",
174
-        "Owner",
175
-        "Reference",
176
-        "Property",
177
-        "Unit",
178
-        "Size",
179
-        "Price Ex VAT",
180
-        "Region",
181
-        "Town",
182
-        "Suburb",
183
-        "Status",
184
-        "Type",
185
-        "Publish"
199
+        'ID',
200
+        'Owner',
201
+        'Reference',
202
+        'Property',
203
+        'Unit',
204
+        'Size',
205
+        'Price Ex VAT',
206
+        'Region',
207
+        'Town',
208
+        'Suburb',
209
+        'Status',
210
+        'Type',
211
+        'Publish',
186 212
       ],
187 213
       columns: [
188
-        "id",
189
-        "owner",
190
-        "reference",
191
-        "property",
192
-        "unit",
193
-        "size",
194
-        "price",
195
-        "region",
196
-        "town",
197
-        "suburb",
198
-        "status",
199
-        "type",
200
-        "isPublished"
201
-      ]
202
-    };
214
+        'id',
215
+        'owner',
216
+        'reference',
217
+        'property',
218
+        'unit',
219
+        'size',
220
+        'price',
221
+        'region',
222
+        'town',
223
+        'suburb',
224
+        'status',
225
+        'type',
226
+        'isPublished',
227
+      ],
228
+    }
203 229
   },
204 230
   methods: {
205
-    ...mapActions("propertyList", [
206
-      "getAdminProperties",
207
-      "deleteProperty",
208
-      "publishProperty",
209
-      "unpublishProperty"
231
+    ...mapActions('propertyList', [
232
+      'getAdminProperties',
233
+      'deleteProperty',
234
+      'publishProperty',
235
+      'unpublishProperty',
210 236
     ]),
211
-    ...mapActions("register", ["getAgentById"]),
212
-    ...mapActions("timeshare", ["getAgencies"]),
237
+    ...mapActions('register', ['getAgentById']),
238
+    ...mapActions('timeshare', ['getAgencies']),
213 239
     Publish(item) {
214
-      this.publishProperty(item);
240
+      this.publishProperty(item)
215 241
     },
216 242
     Unpublish(item) {
217
-      this.unpublishProperty(item);
243
+      this.unpublishProperty(item)
218 244
     },
219 245
     Edit(item) {
220
-      this.$router.push(`/property/edit/${item.id}`);
246
+      this.$router.push(`/property/edit/${item.id}`)
221 247
     },
222 248
     Delete(item) {
223
-      this.deleteProperty(item.id);
249
+      this.deleteProperty(item.id)
224 250
     },
225 251
     async pageChangeHandle(value) {
226 252
       switch (value) {
227
-        case "next":
228
-          this.currentPage += 1;
229
-          break;
230
-        case "previous":
231
-          this.currentPage -= 1;
232
-          break;
253
+        case 'next':
254
+          this.currentPage += 1
255
+          break
256
+        case 'previous':
257
+          this.currentPage -= 1
258
+          break
233 259
         default:
234
-          this.currentPage = value;
260
+          this.currentPage = value
235 261
       }
236 262
     },
237 263
     sortBy(sortKey) {
238
-      this.reverse = this.sortKey === sortKey ? !this.reverse : false;
239
-      this.sortKey = sortKey;
264
+      this.reverse = this.sortKey === sortKey ? !this.reverse : false
265
+      this.sortKey = sortKey
240 266
     },
241 267
     ClearSort() {
242
-      this.reverse = true;
243
-      this.sortKey = "id";
244
-    }
268
+      this.reverse = true
269
+      this.sortKey = 'id'
270
+    },
245 271
   },
246 272
   computed: {
247
-    ...mapState("propertyList", ["properties"]),
248
-    ...mapState("register", ["agent"]),
249
-    ...mapState("timeshare", ["agencies"]),
273
+    ...mapState('propertyList', ['properties']),
274
+    ...mapState('register', ['agent']),
275
+    ...mapState('timeshare', ['agencies']),
250 276
     FilteredProperties() {
251 277
       if (this.filter) {
252
-        const list = _.filter(this.properties, item =>
278
+        const list = _.filter(this.properties, (item) =>
253 279
           Object.values(item).some(
254
-            i =>
280
+            (i) =>
255 281
               JSON.stringify(i)
256 282
                 .toLowerCase()
257
-                .indexOf(this.filter.toLowerCase()) > -1
258
-          )
259
-        );
260
-        return _.orderBy(list, this.sortKey, this.SortDirection);
283
+                .indexOf(this.filter.toLowerCase()) > -1,
284
+          ),
285
+        )
286
+        return _.orderBy(list, this.sortKey, this.SortDirection)
261 287
       } else {
262
-        return _.orderBy(this.properties, this.sortKey, this.SortDirection);
288
+        return _.orderBy(this.properties, this.sortKey, this.SortDirection)
263 289
       }
264 290
     },
265 291
     PageCount() {
266 292
       return this.visibleItemsPerPageCount !== 0
267
-        ? Math.ceil(this.FilteredProperties.length / this.visibleItemsPerPageCount)
268
-        : 1;
293
+        ? Math.ceil(
294
+            this.FilteredProperties.length / this.visibleItemsPerPageCount,
295
+          )
296
+        : 1
269 297
     },
270 298
     curAgency() {
271
-      var selAgency = "";
272
-      this.agencies.forEach(agency => {
299
+      var selAgency = ''
300
+      this.agencies.forEach((agency) => {
273 301
         if (this.agent[0].agencyId === agency.id) {
274
-          selAgency = agency.agencyName;
302
+          selAgency = agency.agencyName
275 303
         }
276
-      });
277
-      return selAgency;
304
+      })
305
+      return selAgency
278 306
     },
279 307
     DisplayItems() {
280
-      const list = this.FilteredProperties;
281
-      const startSlice = (this.currentPage - 1) * this.visibleItemsPerPageCount;
282
-      let endSlice = this.currentPage * this.visibleItemsPerPageCount;
308
+      const list = this.FilteredProperties
309
+      const startSlice = (this.currentPage - 1) * this.visibleItemsPerPageCount
310
+      let endSlice = this.currentPage * this.visibleItemsPerPageCount
283 311
       if (endSlice > list.length) {
284
-        endSlice = list.length;
312
+        endSlice = list.length
285 313
       }
286
-      return list.slice(startSlice, endSlice);
314
+      return list.slice(startSlice, endSlice)
287 315
     },
288 316
     SortDirection() {
289
-      return this.reverse ? "desc" : "asc";
317
+      return this.reverse ? 'desc' : 'asc'
290 318
     },
291 319
     ROLE() {
292
-      return Log.getUser().role;
293
-    }
320
+      return Log.getUser().role
321
+    },
294 322
   },
295 323
   created() {
296
-    this.getAgentById(Log.getUser().id);
297
-    this.getAgencies();
324
+    this.getAgentById(Log.getUser().id)
325
+    this.getAgencies()
298 326
   },
299 327
   mounted() {
300
-    this.wait = true;
301
-    this.getAdminProperties(this.userId).then(fulfuilled => {
302
-      this.wait = false;
328
+    this.wait = true
329
+    this.getAdminProperties(this.userId).then((fulfuilled) => {
330
+      this.wait = false
303 331
       if (this.itemsPerPageList && this.itemsPerPageList.length > 0) {
304
-        const [startItem] = this.itemsPerPageList;
305
-        this.visibleItemsPerPageCount = startItem;
332
+        const [startItem] = this.itemsPerPageList
333
+        this.visibleItemsPerPageCount = startItem
306 334
       }
307
-    });
335
+    })
308 336
   },
309 337
   watch: {
310 338
     filter: {
311 339
       immediate: true,
312 340
       handler(val, oldVal) {
313 341
         if (val != oldVal) {
314
-          this.currentPage = 1;
342
+          this.currentPage = 1
315 343
         }
316
-      }
317
-    }
318
-  }
319
-};
344
+      },
345
+    },
346
+  },
347
+}
320 348
 </script>
321 349
 
322 350
 <style lang="scss" scoped>
@@ -351,6 +379,6 @@ export default {
351 379
   border-bottom: solid;
352 380
   border-width: 2px;
353 381
   border-color: rgb(27, 117, 187);
354
-  font-family: "Muli";
382
+  font-family: 'Muli';
355 383
 }
356 384
 </style>

+ 177
- 148
src/components/admin/status/timeshareAdminList.vue Целия файл

@@ -2,7 +2,7 @@
2 2
   <section id="contact2">
3 3
     <div class="container">
4 4
       <div class="section-header">
5
-        <h1>Property Admin</h1>
5
+        <h1>Timeshare Admin</h1>
6 6
       </div>
7 7
       <div class="row">
8 8
         <div class="col-lg-4"></div>
@@ -84,11 +84,14 @@
84 84
     <div class="container-fluid">
85 85
       <div class="row justify-content-center">
86 86
         <div class="col-auto">
87
-          <table class="table table-striped table-responsive" style="max-width:1920px">
87
+          <table
88
+            class="table table-striped table-responsive"
89
+            style="max-width: 1920px;"
90
+          >
88 91
             <thead>
89 92
               <tr>
90 93
                 <th scope="col" v-for="(col, c) in displayColumns" :key="c">
91
-                  <div @click="sortBy(columns[c])" style="cursor: pointer">
94
+                  <div @click="sortBy(columns[c])" style="cursor: pointer;">
92 95
                     <div class="d-flex bd-highlight">
93 96
                       <div class="w-100 bd-highlight">{{ col }}</div>
94 97
                       <div class="flex-shrink-1 bd-highlight">
@@ -135,9 +138,14 @@
135 138
                 <td>{{ item.sellPrice | toCurrency }}</td>
136 139
                 <td>{{ item.pulbishedDate | toDate }}</td>
137 140
                 <td>{{ item.status.description }}</td>
141
+                <td>{{ item.consent }}</td>
138 142
                 <td v-if="!item.publish">
139 143
                   <a v-on:click="Publish(item)">
140
-                    <img src="../../../../public/img/icons/Upload.png" height="25" width="25" />
144
+                    <img
145
+                      src="../../../../public/img/icons/Upload.png"
146
+                      height="25"
147
+                      width="25"
148
+                    />
141 149
                   </a>
142 150
                 </td>
143 151
                 <td v-else>
@@ -151,12 +159,20 @@
151 159
                 </td>
152 160
                 <td>
153 161
                   <a v-on:click="Edit(item)">
154
-                    <img src="../../../../public/img/icons/Edit.png" height="25" width="25" />
162
+                    <img
163
+                      src="../../../../public/img/icons/Edit.png"
164
+                      height="25"
165
+                      width="25"
166
+                    />
155 167
                   </a>
156 168
                 </td>
157 169
                 <td>
158 170
                   <a v-on:click="Delete(item)">
159
-                    <img src="../../../../public/img/icons/delete.png" height="25" width="25" />
171
+                    <img
172
+                      src="../../../../public/img/icons/delete.png"
173
+                      height="25"
174
+                      width="25"
175
+                    />
160 176
                   </a>
161 177
                 </td>
162 178
               </tr>
@@ -164,7 +180,12 @@
164 180
           </table>
165 181
           <div class="d-flex justify-content-between" v-if="showPager">
166 182
             <div class="p-1">
167
-              {{ currentPage + " / " + PageCount + (" - (" + FilteredListings.length + " items)") }}
183
+              {{
184
+                currentPage +
185
+                ' / ' +
186
+                PageCount +
187
+                (' - (' + FilteredListings.length + ' items)')
188
+              }}
168 189
             </div>
169 190
             <div class="p-1">
170 191
               <BasePagination
@@ -194,7 +215,11 @@
194 215
           <div class="p-2">
195 216
             <div class="d-flex flex-row">
196 217
               <div>
197
-                <button v-if="sortKey !== 'id'" class="btn-solid-blue" @click="ClearSort">
218
+                <button
219
+                  v-if="sortKey !== 'id'"
220
+                  class="btn-solid-blue"
221
+                  @click="ClearSort"
222
+                >
198 223
                   Clear Sort
199 224
                 </button>
200 225
               </div>
@@ -209,15 +234,15 @@
209 234
 
210 235
 <script>
211 236
 /* eslint-disable */
212
-import { mapState, mapActions, mapGetters } from "vuex";
213
-import Log from "../../../assets/Log";
214
-import BasePagination from "../../shared/basePagination";
215
-import ItemsPerPageList from "../../../assets/staticData/itemsPerPageFive";
216
-import _ from "lodash";
237
+import { mapState, mapActions, mapGetters } from 'vuex'
238
+import Log from '../../../assets/Log'
239
+import BasePagination from '../../shared/basePagination'
240
+import ItemsPerPageList from '../../../assets/staticData/itemsPerPageFive'
241
+import _ from 'lodash'
217 242
 
218 243
 export default {
219 244
   components: {
220
-    BasePagination
245
+    BasePagination,
221 246
   },
222 247
   data() {
223 248
     return {
@@ -230,209 +255,213 @@ export default {
230 255
       itemsPerPageList: ItemsPerPageList,
231 256
       currentPage: 1,
232 257
       reverse: true,
233
-      sortKey: "id",
234
-      selectedExcelDownload: "",
258
+      sortKey: 'id',
259
+      selectedExcelDownload: '',
235 260
       excelFields: {
236
-        Ref: "id",
237
-        Owner: "owner",
238
-        agent: "Agent",
239
-        Resort: "resort.resortName",
240
-        Module: "module",
241
-        Unit: "unitNumber",
242
-        Beds: "bedrooms",
243
-        MaxSleep: "maxSleep",
244
-        Season: "season",
245
-        Region: "region.regionName",
261
+        Ref: 'id',
262
+        Owner: 'owner',
263
+        agent: 'Agent',
264
+        Resort: 'resort.resortName',
265
+        Module: 'module',
266
+        Unit: 'unitNumber',
267
+        Beds: 'bedrooms',
268
+        MaxSleep: 'maxSleep',
269
+        Season: 'season',
270
+        Region: 'region.regionName',
246 271
         Amount: {
247
-          field: "sellPrice",
248
-          callback: value => {
249
-            return "R " + value;
250
-          }
272
+          field: 'sellPrice',
273
+          callback: (value) => {
274
+            return 'R ' + value
275
+          },
251 276
         },
252 277
         Levy: {
253
-          field: "levyAmount",
254
-          callback: value => {
255
-            return "R " + value;
256
-          }
278
+          field: 'levyAmount',
279
+          callback: (value) => {
280
+            return 'R ' + value
281
+          },
257 282
         },
258 283
         ArrivalDate: {
259
-          field: "arrivalDate",
260
-          callback: value => {
261
-            return value.substring(0, 10);
262
-          }
284
+          field: 'arrivalDate',
285
+          callback: (value) => {
286
+            return value.substring(0, 10)
287
+          },
263 288
         },
264 289
         DepartureDate: {
265
-          field: "departureDate",
266
-          callback: value => {
267
-            return value.substring(0, 10);
268
-          }
290
+          field: 'departureDate',
291
+          callback: (value) => {
292
+            return value.substring(0, 10)
293
+          },
269 294
         },
270 295
         Submitted: {
271
-          field: "pulbishedDate",
272
-          callback: value => {
273
-            return value.substring(0, 10);
274
-          }
296
+          field: 'pulbishedDate',
297
+          callback: (value) => {
298
+            return value.substring(0, 10)
299
+          },
275 300
         },
276
-        Status: "status.description"
301
+        Status: 'status.description',
277 302
       },
278 303
       displayColumns: [
279
-        "Ref",
280
-        "Owner",
281
-        "Agent",
282
-        "Resort",
283
-        "Week Module",
284
-        "Unit",
285
-        "Beds",
286
-        "Season",
287
-        "Region",
288
-        "Amount",
289
-        "Submitted",
290
-        "Status"
304
+        'Ref',
305
+        'Owner',
306
+        'Agent',
307
+        'Resort',
308
+        'Week Module',
309
+        'Unit',
310
+        'Beds',
311
+        'Season',
312
+        'Region',
313
+        'Amount',
314
+        'Submitted',
315
+        'Status',
316
+        'Consent',
291 317
       ],
292 318
       columns: [
293
-        "id",
294
-        "owner",
295
-        "agent",
296
-        "resort",
297
-        "module",
298
-        "unitNumber",
299
-        "bedrooms",
300
-        "season",
301
-        "region",
302
-        "sellPrice",
303
-        "weekStatus"
304
-      ]
305
-    };
319
+        'id',
320
+        'owner',
321
+        'agent',
322
+        'resort',
323
+        'module',
324
+        'unitNumber',
325
+        'bedrooms',
326
+        'season',
327
+        'region',
328
+        'sellPrice',
329
+        'weekStatus',
330
+        'consent',
331
+      ],
332
+    }
306 333
   },
307 334
   methods: {
308
-    ...mapActions("myWeeks", ["getAllItems"]),
309
-    ...mapActions("timeshare", ["updateFilter"]),
310
-    ...mapActions("myWeeks", [
311
-      "getItems",
312
-      "verifyWeek",
313
-      "editSave",
314
-      "publishWeek",
315
-      "unpublishWeek",
316
-      "deleteListing"
335
+    ...mapActions('myWeeks', ['getAllItems']),
336
+    ...mapActions('timeshare', ['updateFilter']),
337
+    ...mapActions('myWeeks', [
338
+      'getItems',
339
+      'verifyWeek',
340
+      'editSave',
341
+      'publishWeek',
342
+      'unpublishWeek',
343
+      'deleteListing',
317 344
     ]),
318 345
     updateLazyFilter() {
319
-      this.updateFilter(this.filter);
346
+      this.updateFilter(this.filter)
320 347
     },
321 348
     downloadExcelSheet() {
322
-      if (this.selectedExcelDownload == "displayItems") {
323
-        const elem = this.$refs.dlDisplay;
324
-        elem.$el.click();
325
-      } else if (this.selectedExcelDownload == "allPublished") {
326
-        const elem = this.$refs.dlPublished;
327
-        elem.$el.click();
328
-      } else if (this.selectedExcelDownload == "allItems") {
329
-        const elem = this.$refs.dlAll;
330
-        elem.$el.click();
349
+      if (this.selectedExcelDownload == 'displayItems') {
350
+        const elem = this.$refs.dlDisplay
351
+        elem.$el.click()
352
+      } else if (this.selectedExcelDownload == 'allPublished') {
353
+        const elem = this.$refs.dlPublished
354
+        elem.$el.click()
355
+      } else if (this.selectedExcelDownload == 'allItems') {
356
+        const elem = this.$refs.dlAll
357
+        elem.$el.click()
331 358
       }
332 359
     },
333 360
     Publish(item) {
334
-      var today = new Date();
335
-      var dd = String(today.getDate()).padStart(2, "0");
336
-      var mm = String(today.getMonth() + 1).padStart(2, "0"); //January is 0!
337
-      var yyyy = today.getFullYear();
338
-      item.pulbishedDate = today.toISOString().substring(0, 19);
339
-      item.publish = true;
361
+      var today = new Date()
362
+      var dd = String(today.getDate()).padStart(2, '0')
363
+      var mm = String(today.getMonth() + 1).padStart(2, '0') //January is 0!
364
+      var yyyy = today.getFullYear()
365
+      item.pulbishedDate = today.toISOString().substring(0, 19)
366
+      item.publish = true
340 367
       // item.status.id = 26;
341 368
       // item.status.code = "FS";
342 369
       // item.status.description = "For Sale";
343 370
       // item.status.statusType = true;
344 371
       // console.log(JSON.stringify(item));
345 372
       // this.publishOnly(item);
346
-      this.publishWeek(item);
373
+      this.publishWeek(item)
347 374
     },
348 375
     Unpublish(item) {
349
-      this.unpublishWeek(item);
376
+      this.unpublishWeek(item)
350 377
     },
351 378
     Edit(item) {
352
-      this.$router.push({ name: "EditTimeshare", params: { weekParam: item } });
379
+      this.$router.push({ name: 'EditTimeshare', params: { weekParam: item } })
353 380
       // this.$router.push(`/editTimeShare/${item.id}`);
354 381
     },
355 382
     Delete(item) {
356
-      this.deleteListing(item.id);
383
+      this.deleteListing(item.id)
357 384
     },
358 385
     async pageChangeHandle(value) {
359 386
       switch (value) {
360
-        case "next":
361
-          this.currentPage += 1;
362
-          break;
363
-        case "previous":
364
-          this.currentPage -= 1;
365
-          break;
387
+        case 'next':
388
+          this.currentPage += 1
389
+          break
390
+        case 'previous':
391
+          this.currentPage -= 1
392
+          break
366 393
         default:
367
-          this.currentPage = value;
394
+          this.currentPage = value
368 395
       }
369 396
     },
370 397
     sortBy(sortKey) {
371
-      this.reverse = this.sortKey === sortKey ? !this.reverse : false;
372
-      this.sortKey = sortKey;
398
+      this.reverse = this.sortKey === sortKey ? !this.reverse : false
399
+      this.sortKey = sortKey
373 400
     },
374 401
     ClearSort() {
375
-      this.reverse = true;
376
-      this.sortKey = "id";
377
-    }
402
+      this.reverse = true
403
+      this.sortKey = 'id'
404
+    },
378 405
   },
379 406
   computed: {
380
-    ...mapState("propertyList", ["properties"]),
381
-    ...mapState("timeshare", ["timeshareFilter"]),
382
-    ...mapGetters({ getNeedsVerify: "myWeeks/getNeedsVerify" }),
407
+    ...mapState('propertyList', ['properties']),
408
+    ...mapState('timeshare', ['timeshareFilter']),
409
+    ...mapGetters({ getNeedsVerify: 'myWeeks/getNeedsVerify' }),
383 410
     FilteredListings() {
384 411
       if (this.timeshareFilter) {
385
-        const list = _.filter(this.getNeedsVerify, item =>
412
+        const list = _.filter(this.getNeedsVerify, (item) =>
386 413
           Object.values(item).some(
387
-            i =>
414
+            (i) =>
388 415
               JSON.stringify(i)
389 416
                 .toLowerCase()
390
-                .indexOf(this.timeshareFilter.toLowerCase()) > -1
391
-          )
392
-        );
393
-        return _.orderBy(list, this.sortKey, this.SortDirection);
417
+                .indexOf(this.timeshareFilter.toLowerCase()) > -1,
418
+          ),
419
+        )
420
+        return _.orderBy(list, this.sortKey, this.SortDirection)
394 421
       } else {
395
-        return _.orderBy(this.getNeedsVerify, this.sortKey, this.SortDirection);
422
+        return _.orderBy(this.getNeedsVerify, this.sortKey, this.SortDirection)
396 423
       }
397 424
     },
398 425
     AllListingsSortedById() {
399
-      return _.orderBy(this.getNeedsVerify, "id", "desc");
426
+      return _.orderBy(this.getNeedsVerify, 'id', 'desc')
400 427
     },
401 428
     OnlyPublished() {
402
-      var list = [];
403
-      this.FilteredListings.forEach(listing => {
429
+      var list = []
430
+      this.FilteredListings.forEach((listing) => {
404 431
         if (listing.publish) {
405
-          list.push(listing);
432
+          list.push(listing)
406 433
         }
407
-      });
408
-      return list;
434
+      })
435
+      return list
409 436
     },
410 437
     PageCount() {
411 438
       return this.visibleItemsPerPageCount !== 0
412
-        ? Math.ceil(this.FilteredListings.length / this.visibleItemsPerPageCount)
413
-        : 1;
439
+        ? Math.ceil(
440
+            this.FilteredListings.length / this.visibleItemsPerPageCount,
441
+          )
442
+        : 1
414 443
     },
415 444
     DisplayItems() {
416
-      const list = this.FilteredListings;
417
-      const startSlice = (this.currentPage - 1) * this.visibleItemsPerPageCount;
418
-      let endSlice = this.currentPage * this.visibleItemsPerPageCount;
445
+      const list = this.FilteredListings
446
+      const startSlice = (this.currentPage - 1) * this.visibleItemsPerPageCount
447
+      let endSlice = this.currentPage * this.visibleItemsPerPageCount
419 448
       if (endSlice > list.length) {
420
-        endSlice = list.length;
449
+        endSlice = list.length
421 450
       }
422
-      return list.slice(startSlice, endSlice);
451
+      return list.slice(startSlice, endSlice)
423 452
     },
424 453
     SortDirection() {
425
-      return this.reverse ? "desc" : "asc";
426
-    }
454
+      return this.reverse ? 'desc' : 'asc'
455
+    },
427 456
   },
428 457
   created() {
429 458
     this.getItems(this.userId).then(() => {
430
-      this.wait = false;
431
-    });
459
+      this.wait = false
460
+    })
432 461
   },
433 462
   mounted() {
434
-    if (this.timeshareFilter !== "") {
435
-      this.filter = this.timeshareFilter;
463
+    if (this.timeshareFilter !== '') {
464
+      this.filter = this.timeshareFilter
436 465
     }
437 466
     // this.getAdminProperties(this.userId).then(fulfuilled => {
438 467
     //   this.wait = false;
@@ -447,12 +476,12 @@ export default {
447 476
       immediate: true,
448 477
       handler(val, oldVal) {
449 478
         if (val != oldVal) {
450
-          this.currentPage = 1;
479
+          this.currentPage = 1
451 480
         }
452
-      }
453
-    }
454
-  }
455
-};
481
+      },
482
+    },
483
+  },
484
+}
456 485
 </script>
457 486
 
458 487
 <style lang="scss" scoped>
@@ -487,6 +516,6 @@ export default {
487 516
   border-bottom: solid;
488 517
   border-width: 2px;
489 518
   border-color: rgb(27, 117, 187);
490
-  font-family: "Muli";
519
+  font-family: 'Muli';
491 520
 }
492 521
 </style>

+ 9
- 2
src/components/home/carouselSection.vue Целия файл

@@ -140,8 +140,15 @@
140 140
                   </div>
141 141
                 </div>
142 142
               </div>
143
-
144
-              <div></div>
143
+              <div>
144
+                <p>
145
+                  <strong class="color-black">
146
+                    Please note that Uni-Vate Properties will be closed for the
147
+                    festive season from 15th December and will reopen on the 5th
148
+                    of January.
149
+                  </strong>
150
+                </p>
151
+              </div>
145 152
             </div>
146 153
           </div>
147 154
         </div>

+ 14
- 11
src/components/home/homePage.vue Целия файл

@@ -9,31 +9,34 @@
9 9
   </div>
10 10
 </template>
11 11
 <script>
12
-import CarouselSection from "./carouselSection.vue";
12
+import CarouselSection from './carouselSection.vue'
13 13
 //import ServiceSection from "./serviceSection.vue";
14
-import PropertySection from "./propertySection.vue";
14
+import PropertySection from './propertySection.vue'
15 15
 //import NewsSection from "./newsSection.vue";
16 16
 //import TestimonialSection from "./testimonialSection.vue";
17
-import AOS from "aos";
18
-import "aos/dist/aos.css";
17
+import AOS from 'aos'
18
+import 'aos/dist/aos.css'
19 19
 export default {
20 20
   created() {
21
-    AOS.init();
21
+    AOS.init()
22 22
   },
23 23
   components: {
24 24
     CarouselSection,
25 25
     //ServiceSection,
26
-    PropertySection
26
+    PropertySection,
27 27
     //NewsSection,
28 28
     //TestimonialSection
29 29
   },
30 30
   head: {
31 31
     title: {
32
-      inner: "Uni-Vate Properties"
32
+      inner: 'Uni-Vate Properties',
33 33
     },
34 34
     meta: [
35
-      { name: "google-site-verification", content: "wgxKi_f6JKZBurr242rfYmwmyjrcdkbWWBxrkcNvn90" }
36
-    ]
37
-  }
38
-};
35
+      {
36
+        name: 'google-site-verification',
37
+        content: 'wgxKi_f6JKZBurr242rfYmwmyjrcdkbWWBxrkcNvn90',
38
+      },
39
+    ],
40
+  },
41
+}
39 42
 </script>

+ 21
- 2
src/components/processFlow/offers.vue Целия файл

@@ -73,9 +73,28 @@ export default {
73 73
         'price',
74 74
         'offer',
75 75
         'madeBy',
76
+        'consent',
77
+      ],
78
+      formats: [
79
+        'date',
80
+        'text',
81
+        'text',
82
+        'text',
83
+        'money',
84
+        'money',
85
+        'text',
86
+        'boolean',
87
+      ],
88
+      columnHeaders: [
89
+        '',
90
+        '',
91
+        'description',
92
+        '',
93
+        '',
94
+        'offerPrice',
95
+        'offerBy',
96
+        'Consent',
76 97
       ],
77
-      formats: ['date', 'text', 'text', 'text', 'money', 'money', 'text'],
78
-      columnHeaders: ['', '', 'description', '', '', 'offerPrice', 'offerBy'],
79 98
     }
80 99
   },
81 100
   methods: {

+ 103
- 80
src/components/timeshare/myWeeksPage.vue Целия файл

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <!-- eslint-disable max-len -->
3
-  <main id="main" style="margin-top:-30px;padding-bottom:50px">
3
+  <main id="main" style="margin-top: -30px; padding-bottom: 50px;">
4 4
     <div class="container">
5 5
       <div class="row">
6 6
         <div class="col">
@@ -13,11 +13,14 @@
13 13
     <div class="container-fluid">
14 14
       <div class="row justify-content-center">
15 15
         <div class="col-auto">
16
-          <table class="table table-striped table-responsive" style="max-width:1920px">
16
+          <table
17
+            class="table table-striped table-responsive"
18
+            style="max-width: 1920px;"
19
+          >
17 20
             <thead>
18 21
               <tr>
19 22
                 <th scope="col" v-for="(col, c) in displayColumns" :key="c">
20
-                  <div @click="sortBy(columns[c])" style="cursor: pointer">
23
+                  <div @click="sortBy(columns[c])" style="cursor: pointer;">
21 24
                     <div class="d-flex bd-highlight">
22 25
                       <div class="w-100 bd-highlight">{{ col }}</div>
23 26
                       <div class="flex-shrink-1 bd-highlight">
@@ -63,6 +66,7 @@
63 66
                 <td>{{ item.sellPrice | toCurrency }}</td>
64 67
                 <td>{{ item.pulbishedDate | toDate }}</td>
65 68
                 <td>{{ item.status.description }}</td>
69
+                <td>{{ item.consent }}</td>
66 70
                 <!-- <td v-if="!item.publish">
67 71
                   <a v-on:click="Publish(item)">
68 72
                     <img src="../../../public/img/icons/Upload.png" height="25" width="25" />
@@ -75,12 +79,20 @@
75 79
                 </td> -->
76 80
                 <td>
77 81
                   <a v-on:click="Edit(item)">
78
-                    <img src="../../../public/img/icons/Edit.png" height="25" width="25" />
82
+                    <img
83
+                      src="../../../public/img/icons/Edit.png"
84
+                      height="25"
85
+                      width="25"
86
+                    />
79 87
                   </a>
80 88
                 </td>
81 89
                 <td>
82 90
                   <a v-on:click="Delete(item)">
83
-                    <img src="../../../public/img/icons/delete.png" height="25" width="25" />
91
+                    <img
92
+                      src="../../../public/img/icons/delete.png"
93
+                      height="25"
94
+                      width="25"
95
+                    />
84 96
                   </a>
85 97
                 </td>
86 98
               </tr>
@@ -88,7 +100,12 @@
88 100
           </table>
89 101
           <div class="d-flex justify-content-between" v-if="showPager">
90 102
             <div class="p-1">
91
-              {{ currentPage + " / " + PageCount + (" - (" + FilteredListings.length + " items)") }}
103
+              {{
104
+                currentPage +
105
+                ' / ' +
106
+                PageCount +
107
+                (' - (' + FilteredListings.length + ' items)')
108
+              }}
92 109
             </div>
93 110
             <div class="p-1">
94 111
               <BasePagination
@@ -118,7 +135,11 @@
118 135
           <div class="p-2">
119 136
             <div class="d-flex flex-row">
120 137
               <div>
121
-                <button v-if="sortKey !== 'id'" class="btn-solid-blue" @click="ClearSort">
138
+                <button
139
+                  v-if="sortKey !== 'id'"
140
+                  class="btn-solid-blue"
141
+                  @click="ClearSort"
142
+                >
122 143
                   Clear Sort
123 144
                 </button>
124 145
               </div>
@@ -160,17 +181,17 @@
160 181
 </template>
161 182
 <script>
162 183
 /* eslint-disable */
163
-import { mapState, mapActions, mapGetters } from "vuex";
164
-import Log from "../../assets/Log";
165
-import ListView from "../shared/listView.vue";
166
-import BasePagination from "../shared/basePagination";
167
-import ItemsPerPageList from "../../assets/staticData/itemsPerPageFive";
168
-import _ from "lodash";
184
+import { mapState, mapActions, mapGetters } from 'vuex'
185
+import Log from '../../assets/Log'
186
+import ListView from '../shared/listView.vue'
187
+import BasePagination from '../shared/basePagination'
188
+import ItemsPerPageList from '../../assets/staticData/itemsPerPageFive'
189
+import _ from 'lodash'
169 190
 
170 191
 export default {
171 192
   components: {
172 193
     ListView,
173
-    BasePagination
194
+    BasePagination,
174 195
   },
175 196
   data() {
176 197
     return {
@@ -181,121 +202,123 @@ export default {
181 202
       itemsPerPageList: ItemsPerPageList,
182 203
       reverse: true,
183 204
       currentPage: 1,
184
-      sortKey: "id",
205
+      sortKey: 'id',
185 206
       displayColumns: [
186
-        "Ref",
187
-        "Owner",
188
-        "Agent",
189
-        "Resort",
190
-        "Week Module",
191
-        "Unit",
192
-        "Beds",
193
-        "Season",
194
-        "Region",
195
-        "Amount",
196
-        "Submitted",
197
-        "Status"
207
+        'Ref',
208
+        'Owner',
209
+        'Agent',
210
+        'Resort',
211
+        'Week Module',
212
+        'Unit',
213
+        'Beds',
214
+        'Season',
215
+        'Region',
216
+        'Amount',
217
+        'Submitted',
218
+        'Status',
219
+        'Consent',
198 220
       ],
199 221
       columns: [
200
-        "id",
201
-        "owner",
202
-        "agent",
203
-        "resort",
204
-        "module",
205
-        "unitNumber",
206
-        "bedrooms",
207
-        "season",
208
-        "region",
209
-        "sellPrice",
210
-        "weekStatus"
211
-      ]
212
-    };
222
+        'id',
223
+        'owner',
224
+        'agent',
225
+        'resort',
226
+        'module',
227
+        'unitNumber',
228
+        'bedrooms',
229
+        'season',
230
+        'region',
231
+        'sellPrice',
232
+        'weekStatus',
233
+        'consent',
234
+      ],
235
+    }
213 236
   },
214 237
   created() {
215 238
     this.getItems(Log.getUser().id).then(() => {
216
-      this.wait = false;
217
-    });
239
+      this.wait = false
240
+    })
218 241
   },
219 242
   mounted() {},
220 243
   computed: {
221
-    ...mapGetters({ getNeedsVerify: "myWeeks/getNeedsVerify" }),
222
-    ...mapState("myWeeks", ["items"]),
244
+    ...mapGetters({ getNeedsVerify: 'myWeeks/getNeedsVerify' }),
245
+    ...mapState('myWeeks', ['items']),
223 246
     FilteredListings() {
224 247
       if (this.filter) {
225
-        const list = _.filter(this.getNeedsVerify, item =>
248
+        const list = _.filter(this.getNeedsVerify, (item) =>
226 249
           Object.values(item).some(
227
-            i =>
250
+            (i) =>
228 251
               JSON.stringify(i)
229 252
                 .toLowerCase()
230
-                .indexOf(this.filter.toLowerCase()) > -1
231
-          )
232
-        );
233
-        return _.orderBy(list, this.sortKey, this.SortDirection);
253
+                .indexOf(this.filter.toLowerCase()) > -1,
254
+          ),
255
+        )
256
+        return _.orderBy(list, this.sortKey, this.SortDirection)
234 257
       } else {
235
-        return _.orderBy(this.getNeedsVerify, this.sortKey, this.SortDirection);
258
+        return _.orderBy(this.getNeedsVerify, this.sortKey, this.SortDirection)
236 259
       }
237 260
     },
238 261
     PageCount() {
239 262
       return this.visibleItemsPerPageCount !== 0
240 263
         ? Math.ceil(this.items.length / this.visibleItemsPerPageCount)
241
-        : 1;
264
+        : 1
242 265
     },
243 266
     DisplayItems() {
244
-      const list = this.FilteredListings;
245
-      const startSlice = (this.currentPage - 1) * this.visibleItemsPerPageCount;
246
-      let endSlice = this.currentPage * this.visibleItemsPerPageCount;
267
+      const list = this.FilteredListings
268
+      const startSlice = (this.currentPage - 1) * this.visibleItemsPerPageCount
269
+      let endSlice = this.currentPage * this.visibleItemsPerPageCount
247 270
       if (endSlice > list.length) {
248
-        endSlice = list.length;
271
+        endSlice = list.length
249 272
       }
250
-      return list.slice(startSlice, endSlice);
273
+      return list.slice(startSlice, endSlice)
251 274
     },
252 275
     SortDirection() {
253
-      return this.reverse ? "desc" : "asc";
254
-    }
276
+      return this.reverse ? 'desc' : 'asc'
277
+    },
255 278
   },
256 279
   methods: {
257
-    ...mapActions("myWeeks", ["getItems"]),
280
+    ...mapActions('myWeeks', ['getItems']),
258 281
     onEdit(item) {
259
-      this.$router.push(`/timeshare/${item.id}`);
282
+      this.$router.push(`/timeshare/${item.id}`)
260 283
     },
261 284
     onNew() {
262
-      this.$router.push("/timeshare/sell");
285
+      this.$router.push('/timeshare/sell')
263 286
     },
264 287
     onRowClick(items) {
265
-      this.selectedItems = items;
288
+      this.selectedItems = items
266 289
     },
267 290
     onClearSelected() {
268
-      this.selectedItems = [];
291
+      this.selectedItems = []
269 292
     },
270 293
     Edit(item) {
271
-      this.$router.push({ name: "EditTimeshare", params: { weekParam: item } });
294
+      this.$router.push({ name: 'EditTimeshare', params: { weekParam: item } })
272 295
       // this.$router.push(`/editTimeShare/${item.id}`);
273 296
     },
274 297
     Delete(item) {
275
-      this.deleteListing(item.id);
298
+      this.deleteListing(item.id)
276 299
     },
277 300
     async pageChangeHandle(value) {
278 301
       switch (value) {
279
-        case "next":
280
-          this.currentPage += 1;
281
-          break;
282
-        case "previous":
283
-          this.currentPage -= 1;
284
-          break;
302
+        case 'next':
303
+          this.currentPage += 1
304
+          break
305
+        case 'previous':
306
+          this.currentPage -= 1
307
+          break
285 308
         default:
286
-          this.currentPage = value;
309
+          this.currentPage = value
287 310
       }
288 311
     },
289 312
     sortBy(sortKey) {
290
-      this.reverse = this.sortKey === sortKey ? !this.reverse : false;
291
-      this.sortKey = sortKey;
313
+      this.reverse = this.sortKey === sortKey ? !this.reverse : false
314
+      this.sortKey = sortKey
292 315
     },
293 316
     ClearSort() {
294
-      this.reverse = true;
295
-      this.sortKey = "id";
296
-    }
297
-  }
298
-};
317
+      this.reverse = true
318
+      this.sortKey = 'id'
319
+    },
320
+  },
321
+}
299 322
 </script>
300 323
 <style scoped>
301 324
 .my-disable {

+ 1
- 1
src/router/index.js Целия файл

@@ -66,7 +66,7 @@ import ContactUs from '../components/misc/contactUs.vue'
66 66
 import PrivacyPolicy from '../components/misc//privacyPolicy/privacyPolicyPage.vue'
67 67
 import WebsiteDisclaimer from '../components/misc/Disclaimer/WebsiteDisclaimer.vue'
68 68
 import TermsConditions from '../components/admin/misc/termsConditions.vue'
69
-import TermsConditionsView from '../components/misc/TermsConditions/termsConditions.vue'
69
+import TermsConitionsView from '../components/misc/TermsConditions/termsConditions.vue'
70 70
 import ContactUsLog from '../components/communication/contactUsLog.vue'
71 71
 import ContactUsSourceList from '../components/communication/contactUsSourceList.vue'
72 72
 import ContactUsSource from '../components/communication/contactUsSource.vue'

Loading…
Отказ
Запис