13 Коміти

Автор SHA1 Повідомлення Дата
  brianconwaysa 6a912af253 Google Analytics changed to vue-gtag 7 місяці тому
  Brian Conway e9178e2bc2 Fix Typo on file 2 роки тому
  Brian Conway 103f095d77 Add Consent to TimeshareAdmin and Offers 2 роки тому
  Brian Conway e31ed9dbde Fix Commercial and Timeshare to Buy links to pages 2 роки тому
  Brian Conway a787d59086 Timeshare Sell fix submit 2 роки тому
  Brian Conway 6d95048e8f Timeshare Sell Submit fix 2 роки тому
  Brian Conway 41c5897534 Fix css on nav-tabs 2 роки тому
  Brian Conway da49e43de2 Remove console logging and commented code 2 роки тому
  Brian Conway b0d50488b2 Fix User and Agent Updates 2 роки тому
  Brian Conway 46164eec3e Fix UpdateInfo on Agent/Agency 2 роки тому
  Brian Conway 7e07be9b9f Fix space on buttons on home page 2 роки тому
  Brian Conway ab897683cb Fix registerIndividual insert 2 роки тому
  Brian Conway 8c4f105a40 Fix page formats and heading 2 роки тому
28 змінених файлів з 3602 додано та 18565 видалено
  1. 2268
    17630
      package-lock.json
  2. 5
    3
      package.json
  3. 1
    0
      public/googlea6e63bc009bf908f.html
  4. 31
    0
      src/App.vue
  5. 133
    105
      src/components/admin/property/propertyList.vue
  6. 177
    148
      src/components/admin/status/timeshareAdminList.vue
  7. 12
    4
      src/components/home/carouselSection.vue
  8. 14
    11
      src/components/home/homePage.vue
  9. 21
    2
      src/components/processFlow/offers.vue
  10. 91
    48
      src/components/property/commercial/singleView/contentSection.vue
  11. 52
    32
      src/components/propertyManagement/rentalManagement/carouselSection.vue
  12. 52
    32
      src/components/propertyManagement/sectionalTitle/carouselSection.vue
  13. 1
    5
      src/components/timeshare/buy/weekListComponent.vue
  14. 103
    80
      src/components/timeshare/myWeeksPage.vue
  15. 44
    45
      src/components/timeshare/resort/resortPageNew.vue
  16. 8
    15
      src/components/timeshare/resort/unit/summarySection.vue
  17. 39
    47
      src/components/timeshare/resort/unit/unitPageNew.vue
  18. 33
    25
      src/components/timeshare/sell/contentSectionNew.vue
  19. 9
    10
      src/components/user/registerIndividual.vue
  20. 355
    171
      src/components/user/updateAgentProfile.vue
  21. 29
    43
      src/components/user/updateProfileInfo.vue
  22. 16
    7
      src/main.js
  23. 1
    1
      src/router/index.js
  24. 8
    8
      src/store/modules/timeshare/status.js
  25. 18
    18
      src/store/modules/timeshare/timeshare.js
  26. 24
    32
      src/store/modules/timeshare/weekList.js
  27. 55
    41
      src/store/modules/user/register.js
  28. 2
    2
      vue.config.js

+ 2268
- 17630
package-lock.json
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 5
- 3
package.json Переглянути файл

@@ -10,13 +10,15 @@
10 10
   },
11 11
   "dependencies": {
12 12
     "@nuxtjs/axios": "^5.13.1",
13
+    "@types/gtag.js": "0.0.20",
14
+    "@vue/shared": "^3.5.10",
13 15
     "animate.css": "^3.7.2",
14 16
     "aos": "^3.0.0-beta.6",
15 17
     "axios": "^0.24.0",
16 18
     "bootstrap": "^5.1.3",
17 19
     "bootstrap-vue": "^2.22.0",
18 20
     "core-js": "^2.6.12",
19
-    "crypto-js": "^4.0.0",
21
+    "crypto-js": "^4.2.0",
20 22
     "datatables.net": "^1.11.3",
21 23
     "jquery": "^3.6.0",
22 24
     "js-md5": "^0.7.3",
@@ -24,7 +26,7 @@
24 26
     "jspdf-autotable": "^3.5.14",
25 27
     "lodash": "^4.17.21",
26 28
     "material-design-icons-iconfont": "^3.0.3",
27
-    "moment": "^2.29.1",
29
+    "moment": "^2.30.1",
28 30
     "node-sass": "^4.14.1",
29 31
     "roboto-fontface": "*",
30 32
     "sass-loader": "^7.3.1",
@@ -32,13 +34,13 @@
32 34
     "uuid": "^8.3.2",
33 35
     "v-file-upload": "^3.1.7",
34 36
     "vue": "^2.6.12",
35
-    "vue-analytics": "^5.22.1",
36 37
     "vue-carousel": "^0.18.0",
37 38
     "vue-cryptojs": "^2.1.5",
38 39
     "vue-currency-input": "^1.22.6",
39 40
     "vue-disable-autocomplete": "0.0.4",
40 41
     "vue-eva-icons": "^1.1.1",
41 42
     "vue-float-label": "^1.6.1",
43
+    "vue-gtag": "^1.16.1",
42 44
     "vue-head": "^2.2.0",
43 45
     "vue-js-modal": "^1.3.35",
44 46
     "vue-json-excel": "^0.2.99",

+ 1
- 0
public/googlea6e63bc009bf908f.html Переглянути файл

@@ -0,0 +1 @@
1
+google-site-verification: googlea6e63bc009bf908f.html

+ 31
- 0
src/App.vue Переглянути файл

@@ -147,6 +147,37 @@ html {
147 147
 .noWeeks {
148 148
   background-color: #ff4444;
149 149
 }
150
+.nav-tabs li a {
151
+  border-top: none;
152
+  border-left: none;
153
+  border-right: none;
154
+  margin-left: 10px;
155
+  margin-right: 10px;
156
+  background-color: white;
157
+  border-bottom-color: rgb(27, 117, 187);
158
+  border: 1px solid rgb(27, 117, 187);
159
+}
160
+
161
+.nav-tabs li :hover {
162
+  color: white;
163
+  background-color: rgb(27, 117, 187);
164
+}
165
+
166
+.nav-tabs li a.active {
167
+  border-top: none;
168
+  border-left: none;
169
+  border-right: none;
170
+  margin-left: 10px;
171
+  margin-right: 10px;
172
+  color: white;
173
+  background-color: rgb(80, 133, 240);
174
+  border-bottom-color: rgb(80, 133, 240);
175
+}
176
+
177
+.nav-tabs li a :hover {
178
+  background-color: transparent;
179
+  color: white;
180
+}
150 181
 </style>
151 182
 
152 183
 <style scoped>

+ 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>

+ 12
- 4
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>
@@ -321,11 +328,12 @@ export default {
321 328
   border-top: none;
322 329
   border-left: none;
323 330
   border-right: none;
331
+  margin-left: 10px;
332
+  margin-right: 10px;
324 333
   background-color: white;
325 334
   border-bottom-color: rgb(27, 117, 187);
326 335
   border: 1px solid rgb(27, 117, 187);
327 336
 }
328
-
329 337
 .nav-tabs li :hover {
330 338
   color: white;
331 339
   background-color: rgb(27, 117, 187);
@@ -337,7 +345,7 @@ export default {
337 345
   border-right: none;
338 346
   color: white;
339 347
   background-color: rgb(80, 133, 240);
340
-  border-bottom-color: rgb(80, 133, 240);
348
+  border-bottom-color: rgb(221, 221, 221);
341 349
 }
342 350
 
343 351
 .nav-tabs li a :hover {

+ 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: {

+ 91
- 48
src/components/property/commercial/singleView/contentSection.vue Переглянути файл

@@ -3,7 +3,7 @@
3 3
     <div class="container">
4 4
       <div class="row" id="resort-profile">
5 5
         <div class="col-md-4">
6
-          <div class="resPortfolioSection" style="margin-top:-5px">
6
+          <div class="resPortfolioSection" style="margin-top: -5px;">
7 7
             <iframe
8 8
               v-if="property.video !== null"
9 9
               width="100%"
@@ -11,36 +11,52 @@
11 11
               frameborder="0"
12 12
               allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
13 13
               allowfullscreen
14
-              style="margin-bottom:-6px"
14
+              style="margin-bottom: -6px;"
15 15
             ></iframe>
16 16
             <div v-if="propertyImages.length > 0">
17
-              <div v-for="(image, i) in propertyImages" @click="index = i" :key="i">
17
+              <div
18
+                v-for="(image, i) in propertyImages"
19
+                @click="index = i"
20
+                :key="i"
21
+              >
18 22
                 <div v-if="i < 3">
19 23
                   <img
20 24
                     v-if="i === 0"
21
-                    style="width:100%; height:201px;object-fit: cover"
25
+                    style="width: 100%; height: 201px; object-fit: cover;"
22 26
                     :src="image.image"
23 27
                   />
24 28
                   <div v-else-if="i !== 0">
25 29
                     <img
26 30
                       v-if="i % 2 === 0"
27
-                      style="width:50%; height:140px; float:right;"
31
+                      style="width: 50%; height: 140px; float: right;"
32
+                      :src="image.image"
33
+                    />
34
+                    <img
35
+                      v-else
36
+                      style="width: 50%; height: 140px; float: left;"
28 37
                       :src="image.image"
29 38
                     />
30
-                    <img v-else style="width:50%; height:140px; float:left" :src="image.image" />
31 39
                   </div>
32 40
                 </div>
33 41
               </div>
34
-              <gallery :images="Images" :index="index" @close="index = null"></gallery>
42
+              <gallery
43
+                :images="Images"
44
+                :index="index"
45
+                @close="index = null"
46
+              ></gallery>
35 47
             </div>
36 48
           </div>
37 49
 
38 50
           <div
39 51
             class="panel-left p-5"
40
-            :class="propertyImages.length > 0 ? 'galleryImages' : 'noGalleryImages'"
52
+            :class="
53
+              propertyImages.length > 0 ? 'galleryImages' : 'noGalleryImages'
54
+            "
41 55
           >
42 56
             <h2>Property Detail</h2>
43
-            <p v-if="property.showAddress">{{ property.streetNumber }} {{ property.streetName }}</p>
57
+            <p v-if="property.showAddress">
58
+              {{ property.streetNumber }} {{ property.streetName }}
59
+            </p>
44 60
             <p>{{ property.city }}, {{ property.suburb }}</p>
45 61
             <div v-if="property.displayData.length > 0">
46 62
               <div v-for="(data, i) in property.displayData" :key="i">
@@ -57,7 +73,9 @@
57 73
             </div>-->
58 74
             <p>{{ property.shortDescription }}</p>
59 75
 
60
-            <p v-if="property.statusString === 'For Sale'">{{ property.price | toCurrency }}</p>
76
+            <p v-if="property.statusString === 'For Sale'">
77
+              {{ property.price | toCurrency }}
78
+            </p>
61 79
             <p v-else>{{ property.price | toCurrency }} Per Month</p>
62 80
           </div>
63 81
           <div class="panel-left px-5 pb-5 text-center">
@@ -66,25 +84,37 @@
66 84
               href="http://www.facebook.com/sharer.php?u=https://www.univateproperties.co.za/"
67 85
               target="_blank"
68 86
             >
69
-              <img src="img/icon-facebook.svg" alt="Share on Facebook" class="col-3 p-1 mx-1" />
87
+              <img
88
+                src="img/icon-facebook.svg"
89
+                alt="Share on Facebook"
90
+                class="col-3 p-1 mx-1"
91
+              />
70 92
             </a>
71 93
             <a
72 94
               href="mailto:?Subject=Simple Share Buttons&amp;Body=I%20saw%20this%20and%20thought%20of%20you!%20 https://www.univateproperties.co.za/"
73 95
             >
74
-              <img src="/img/icon-email.svg" alt="Share on email" class="col-3 p-1 mx-1" />
96
+              <img
97
+                src="/img/icon-email.svg"
98
+                alt="Share on email"
99
+                class="col-3 p-1 mx-1"
100
+              />
75 101
             </a>
76 102
             <a
77 103
               href="whatsapp://send?text=Have a look at this property: https://www.univateproperties.co.za"
78 104
               data-action="share/whatsapp/share"
79 105
               target="_blank"
80 106
             >
81
-              <img src="img/icon-whatsapp.svg" alt="Share on whatsapp" class="col-3 p-1 mx-1" />
107
+              <img
108
+                src="img/icon-whatsapp.svg"
109
+                alt="Share on whatsapp"
110
+                class="col-3 p-1 mx-1"
111
+              />
82 112
             </a>
83 113
           </div>
84 114
         </div>
85 115
         <div class="col-md-8 p-5 resort-profile">
86 116
           <h2 v-if="property.showAddress">
87
-            <div style="display:inline" v-if="property.propertyName !== null">
117
+            <div style="display: inline;" v-if="property.propertyName !== null">
88 118
               {{ property.propertyName }} /
89 119
             </div>
90 120
             {{ property.streetNumber }} {{ property.streetName }}
@@ -93,10 +123,18 @@
93 123
           <p>{{ property.shortDescription }}</p>
94 124
           <h4>Property Features</h4>
95 125
           <div v-if="property.displayData.length > 0">
96
-            <div v-for="(data, i) in property.displayData" :key="i" class="row my-3">
126
+            <div
127
+              v-for="(data, i) in property.displayData"
128
+              :key="i"
129
+              class="row my-3"
130
+            >
97 131
               <div v-for="(field, j) in data.values" :key="j" class="col-md-6">
98 132
                 <div
99
-                  :style="field.value.toUpperCase() === 'FALSE' ? 'display:none' : 'display:show'"
133
+                  :style="
134
+                    field.value.toUpperCase() === 'FALSE'
135
+                      ? 'display:none'
136
+                      : 'display:show'
137
+                  "
100 138
                   v-if="field.value.toUpperCase() != 'TRUE'"
101 139
                 >
102 140
                   <i class="fa fa-check-circle"></i>
@@ -112,7 +150,7 @@
112 150
 
113 151
           <div class="mt-5" v-html="property.description"></div>
114 152
           <button
115
-            style="float:right; white-space: nowrap;"
153
+            style="float: right; white-space: nowrap;"
116 154
             :class="checkStatus() ? 'btn-disabled mt-3' : 'btn-solid-blue mt-3'"
117 155
             :disabled="checkStatus()"
118 156
             @click="goToSingle()"
@@ -120,7 +158,9 @@
120 158
             ENQUIRE NOW
121 159
           </button>
122 160
 
123
-          <h4 v-if="property.virtualTour !== null" style="margin-top:150px">Virtual Tour</h4>
161
+          <h4 v-if="property.virtualTour !== null" style="margin-top: 150px;">
162
+            Virtual Tour
163
+          </h4>
124 164
           <iframe
125 165
             v-if="property.virtualTour !== null"
126 166
             width="100%"
@@ -129,7 +169,7 @@
129 169
             frameborder="0"
130 170
             allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
131 171
             allowfullscreen
132
-            style="margin-bottom:-6px"
172
+            style="margin-bottom: -6px;"
133 173
             class="mt-3"
134 174
           ></iframe>
135 175
           <h4 v-if="property.video !== null" class="mt-5">Video</h4>
@@ -141,7 +181,7 @@
141 181
             frameborder="0"
142 182
             allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
143 183
             allowfullscreen
144
-            style="margin-bottom:-6px"
184
+            style="margin-bottom: -6px;"
145 185
             class="mt-3"
146 186
           ></iframe>
147 187
         </div>
@@ -152,67 +192,70 @@
152 192
 
153 193
 <script>
154 194
 /* eslint-disable */
155
-import gallery from "../../../shared/gallerySlideShow";
156
-import { mapState, mapActions } from "vuex";
195
+import gallery from '../../../shared/gallerySlideShow'
196
+import { mapState, mapActions } from 'vuex'
157 197
 export default {
158 198
   components: {
159
-    gallery
199
+    gallery,
160 200
   },
161 201
   props: {
162 202
     property: {},
163
-    propertyImages: {}
203
+    propertyImages: {},
164 204
   },
165 205
   data() {
166 206
     return {
167 207
       index: null,
168
-      date: new Date()
169
-    };
208
+      date: new Date(),
209
+    }
170 210
   },
171 211
   computed: {
172
-    ...mapState("status", ["singleStatus"]),
212
+    ...mapState('status', ['singleStatus']),
173 213
     Images() {
174
-      const list = [];
214
+      const list = []
175 215
       if (this.propertyImages) {
176 216
         for (let i = 0; i < this.propertyImages.length; i++) {
177
-          list.push(this.propertyImages[i].image);
217
+          list.push(this.propertyImages[i].image)
178 218
         }
179 219
       }
180
-      return list;
181
-    }
220
+      return list
221
+    },
182 222
   },
183 223
   methods: {
184
-    ...mapActions("status", ["getSingleStatus"]),
224
+    ...mapActions('status', ['getSingleStatus']),
185 225
     goToSingle() {
186
-      this.$router.push({ name: "EnquireNow", params: { id: this.$route.params.id } });
226
+      this.$router.push({
227
+        name: 'EnquireNow',
228
+        params: { id: this.$route.params.id },
229
+      })
187 230
     },
188 231
     checkStatus() {
189
-      this.getSingleStatus(this.property.statusId);
232
+      this.getSingleStatus(this.property.statusId)
190 233
       if (
191
-        this.singleStatus.code === "CIP" ||
192
-        this.singleStatus.code === "S" ||
193
-        this.singleStatus.code === "P"
234
+        this.singleStatus.code === 'CIP' ||
235
+        this.singleStatus.code === 'S' ||
236
+        this.singleStatus.code === 'P'
194 237
       ) {
195
-        return true;
238
+        return true
196 239
       } else {
197
-        return false;
240
+        return false
198 241
       }
199
-    }
242
+    },
200 243
   },
201 244
   mounted() {
202
-    if (this.property.video === "") {
203
-      this.property.video = null;
245
+    if (this.property.video === '') {
246
+      this.property.video = null
204 247
     }
205
-    if (this.property.virtualTour === "") {
206
-      this.property.virtualTour = null;
248
+    if (this.property.virtualTour === '') {
249
+      this.property.virtualTour = null
207 250
     }
208
-    this.$emit("Loaded", true);
209
-  }
210
-};
251
+    this.$emit('Loaded', true)
252
+  },
253
+}
211 254
 </script>
212 255
 
213 256
 <style lang="scss" scoped>
214 257
 .btn-disabled {
215
-  font-family: "Muli";
258
+  font-family: 'Muli';
216 259
   font-size: 15px;
217 260
   letter-spacing: 1px;
218 261
   display: inline-block;

+ 52
- 32
src/components/propertyManagement/rentalManagement/carouselSection.vue Переглянути файл

@@ -1,26 +1,37 @@
1 1
 <template>
2 2
   <section id="intro">
3 3
     <div class="container">
4
-      <div class="row">
5
-        <div align="left" class="col-sm-12 col-md-10">
6
-          <div class="intro-content box">
7
-            <div style="margin-top:-40px">
8
-              <h2>Let us manage your property</h2>
9
-              <p>
10
-                At Uni-Vate we appreciate the significant and positive relationship between
11
-                effective Property Management and property prices. We understand that effective
12
-                management not only relies on administrative processes being intact, but also on a
13
-                clear plan and good communication with our clients based on respect, trust
14
-                understanding, openness and accountability. We have access to a comprehensive set of
15
-                human and other resources to ensure that your property is proactively managed to
16
-                protect your investment and to ensure the contentedness of occupants. We offer
17
-                comprehensive property management services, whether it being Sectional Title
18
-                Management, HOA Management or Rental Property Portfolio Management.
19
-              </p>
20
-              <a href="#" class="btn-solid-blue">LIST YOUR PROPERTY WITH UNI-VATE PROPERTIES</a>
21
-              <router-link v-if="!isLoggedIn" to="/user/login" class="btn-white-border"
22
-                >LOGIN TO OWNERS PORTAL</router-link
23
-              >
4
+      <div class="form">
5
+        <div class="row">
6
+          <div align="left" class="col-sm-12 col-md-10">
7
+            <div class="intro-content box">
8
+              <div style="margin-top: -40px;">
9
+                <h2>Let us manage your property</h2>
10
+                <p>
11
+                  At Uni-Vate we appreciate the significant and positive
12
+                  relationship between effective Property Management and
13
+                  property prices. We understand that effective management not
14
+                  only relies on administrative processes being intact, but also
15
+                  on a clear plan and good communication with our clients based
16
+                  on respect, trust understanding, openness and accountability.
17
+                  We have access to a comprehensive set of human and other
18
+                  resources to ensure that your property is proactively managed
19
+                  to protect your investment and to ensure the contentedness of
20
+                  occupants. We offer comprehensive property management
21
+                  services, whether it being Sectional Title Management, HOA
22
+                  Management or Rental Property Portfolio Management.
23
+                </p>
24
+                <a href="#" class="btn-white-border">
25
+                  List your property with Uni-vate Properties
26
+                </a>
27
+                <router-link
28
+                  v-if="!isLoggedIn"
29
+                  to="/user/login"
30
+                  class="btn-white-border"
31
+                >
32
+                  Login to owner portal
33
+                </router-link>
34
+              </div>
24 35
             </div>
25 36
           </div>
26 37
         </div>
@@ -35,8 +46,11 @@
35 46
       :loop="true"
36 47
       :autoHeight="true"
37 48
       id="intro-carousel"
38
-      style="margin-top:-50px;"
39
-      :responsive="{ 0: { items: 1, nav: false }, 600: { items: 1, nav: false } }"
49
+      style="margin-top: -50px;"
50
+      :responsive="{
51
+        0: { items: 1, nav: false },
52
+        600: { items: 1, nav: false },
53
+      }"
40 54
     >
41 55
       <img class="item" src="/img/intro-carousel/home-1.jpg" alt="" />
42 56
       <img class="item" src="/img/intro-carousel/16.jpg" alt="" />
@@ -52,21 +66,27 @@
52 66
 
53 67
 <script>
54 68
 /* eslint-disable */
55
-import { mapState, mapActions } from "vuex";
56
-import Log from "../../../assets/Log";
57
-import carousel from "vue-owl-carousel";
69
+import { mapState, mapActions } from 'vuex'
70
+import Log from '../../../assets/Log'
71
+import carousel from 'vue-owl-carousel'
58 72
 export default {
59 73
   components: {
60
-    carousel
74
+    carousel,
61 75
   },
62 76
   computed: {
63
-    ...mapState("authentication", ["user", "flag", "status", "person", "token"]),
77
+    ...mapState('authentication', [
78
+      'user',
79
+      'flag',
80
+      'status',
81
+      'person',
82
+      'token',
83
+    ]),
64 84
     isLoggedIn() {
65
-      console.log(Log.isLoggedIn());
66
-      return Log.isLoggedIn();
67
-    }
68
-  }
69
-};
85
+      console.log(Log.isLoggedIn())
86
+      return Log.isLoggedIn()
87
+    },
88
+  },
89
+}
70 90
 </script>
71 91
 
72 92
 <style lang="scss" scoped></style>

+ 52
- 32
src/components/propertyManagement/sectionalTitle/carouselSection.vue Переглянути файл

@@ -1,26 +1,37 @@
1 1
 <template>
2 2
   <section id="intro">
3 3
     <div class="container">
4
-      <div class="row">
5
-        <div align="left" class="col-sm-12 col-md-10">
6
-          <div class="intro-content box">
7
-            <div style="margin-top:-40px">
8
-              <h2>Let us manage your property</h2>
9
-              <p>
10
-                At Uni-Vate we appreciate the significant and positive relationship between
11
-                effective Property Management and property prices. We understand that effective
12
-                management not only relies on administrative processes being intact, but also on a
13
-                clear plan and good communication with our clients based on respect, trust
14
-                understanding, openness and accountability. We have access to a comprehensive set of
15
-                human and other resources to ensure that your property is proactively managed to
16
-                protect your investment and to ensure the contentedness of occupants. We offer
17
-                comprehensive property management services, whether it being Sectional Title
18
-                Management, HOA Management or Rental Property Portfolio Management.
19
-              </p>
20
-              <a href="#" class="btn-solid-blue">LIST YOUR PROPERTY WITH UNI-VATE PROPERTIES</a>
21
-              <router-link v-if="!isLoggedIn" to="/user/login" class="btn-white-border"
22
-                >LOGIN TO OWNERS PORTAL</router-link
23
-              >
4
+      <div class="form">
5
+        <div class="row">
6
+          <div align="left" class="col-sm-12 col-md-10">
7
+            <div class="intro-content box">
8
+              <div style="margin-top: -40px;">
9
+                <h2>Let us manage your property</h2>
10
+                <p>
11
+                  At Uni-Vate we appreciate the significant and positive
12
+                  relationship between effective Property Management and
13
+                  property prices. We understand that effective management not
14
+                  only relies on administrative processes being intact, but also
15
+                  on a clear plan and good communication with our clients based
16
+                  on respect, trust understanding, openness and accountability.
17
+                  We have access to a comprehensive set of human and other
18
+                  resources to ensure that your property is proactively managed
19
+                  to protect your investment and to ensure the contentedness of
20
+                  occupants. We offer comprehensive property management
21
+                  services, whether it being Sectional Title Management, HOA
22
+                  Management or Rental Property Portfolio Management.
23
+                </p>
24
+                <a href="#" class="btn-white-border">
25
+                  List your property with Uni-vate Properties
26
+                </a>
27
+                <router-link
28
+                  v-if="!isLoggedIn"
29
+                  to="/user/login"
30
+                  class="btn-white-border"
31
+                >
32
+                  Login to owners portal
33
+                </router-link>
34
+              </div>
24 35
             </div>
25 36
           </div>
26 37
         </div>
@@ -35,8 +46,11 @@
35 46
       :loop="true"
36 47
       :autoHeight="true"
37 48
       id="intro-carousel"
38
-      style="margin-top:-50px;"
39
-      :responsive="{ 0: { items: 1, nav: false }, 600: { items: 1, nav: false } }"
49
+      style="margin-top: -50px;"
50
+      :responsive="{
51
+        0: { items: 1, nav: false },
52
+        600: { items: 1, nav: false },
53
+      }"
40 54
     >
41 55
       <img class="item" src="/img/intro-carousel/home-1.jpg" alt="" />
42 56
       <img class="item" src="/img/intro-carousel/16.jpg" alt="" />
@@ -52,21 +66,27 @@
52 66
 
53 67
 <script>
54 68
 /* eslint-disable */
55
-import { mapState, mapActions } from "vuex";
56
-import Log from "../../../assets/Log";
57
-import carousel from "vue-owl-carousel";
69
+import { mapState, mapActions } from 'vuex'
70
+import Log from '../../../assets/Log'
71
+import carousel from 'vue-owl-carousel'
58 72
 export default {
59 73
   components: {
60
-    carousel
74
+    carousel,
61 75
   },
62 76
   computed: {
63
-    ...mapState("authentication", ["user", "flag", "status", "person", "token"]),
77
+    ...mapState('authentication', [
78
+      'user',
79
+      'flag',
80
+      'status',
81
+      'person',
82
+      'token',
83
+    ]),
64 84
     isLoggedIn() {
65
-      console.log(Log.isLoggedIn());
66
-      return Log.isLoggedIn();
67
-    }
68
-  }
69
-};
85
+      console.log(Log.isLoggedIn())
86
+      return Log.isLoggedIn()
87
+    },
88
+  },
89
+}
70 90
 </script>
71 91
 
72 92
 <style lang="scss" scoped></style>

+ 1
- 5
src/components/timeshare/buy/weekListComponent.vue Переглянути файл

@@ -168,11 +168,7 @@ export default {
168 168
     },
169 169
   },
170 170
   mounted() {
171
-    //if (this.resortCode) {
172
-    //  this.applyResortFilter(this.resortCode);
173
-    //}
174 171
     this.getByResortCode(this.$route.params.resortCode)
175
-    //this.getWeeks();
176 172
   },
177 173
   methods: {
178 174
     ...mapActions('weekList', [
@@ -181,7 +177,7 @@ export default {
181 177
       'getByResortCode',
182 178
     ]),
183 179
     View(item) {
184
-      this.$router.push(`/resort/${item.resort.resortCode}/${item.unitNumber}`)
180
+      this.$router.push(`/resort/${item.resort.resortCode}/${item.id}`)
185 181
     },
186 182
     onChangeItemsPerPage() {
187 183
       if (this.currentPage !== 1) {

+ 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 {

+ 44
- 45
src/components/timeshare/resort/resortPageNew.vue Переглянути файл

@@ -4,50 +4,52 @@
4 4
     <main id="main" style="margin-top: 20px;">
5 5
       <section>
6 6
         <div class="container">
7
-          <div class="row" id="resort-profile">
8
-            <div class="col-md-3">
9
-              <gallerySection :images="resort.images" />
10
-              <FilterComponent :hideTop="true" />
11
-            </div>
12
-            <div
13
-              class="col-md-9 resort-profile"
14
-              style="margin-top: 15px; margin-bottom: 15px;"
15
-            >
16
-              <h2>{{ resort.prName }}</h2>
17
-              <WeekList :resortCode="resortCode" />
18
-              <p v-if="description && description !== ''">
19
-                {{ description }}
20
-              </p>
21
-              <br v-if="description && description !== ''" />
22
-              <div class="d-flex mt-3">
23
-                <iframe
24
-                  width="100%"
25
-                  height="200"
26
-                  id="gmap_canvas"
27
-                  :src="
28
-                    'https://maps.google.com/maps?q=' +
29
-                    resort.prLatitude +
30
-                    ',' +
31
-                    resort.prLongitude +
32
-                    '&hl=en&z=14&amp;output=embed'
33
-                  "
34
-                  frameborder="0"
35
-                  scrolling="no"
36
-                  marginheight="0"
37
-                  marginwidth="0"
38
-                ></iframe>
7
+          <div class="form">
8
+            <div class="row" id="resort-profile">
9
+              <div class="col-md-3">
10
+                <gallerySection :images="resort.images" />
11
+                <FilterComponent :hideTop="true" />
39 12
               </div>
40
-            </div>
41
-          </div>
42
-          <div class="row">
43
-            <div class="col">
44
-              <router-link
45
-                style="float: right;"
46
-                class="btn-white-border mb-4"
47
-                to="/timeshare/buy"
13
+              <div
14
+                class="col-md-9 resort-profile"
15
+                style="margin-top: 15px; margin-bottom: 15px;"
48 16
               >
49
-                Back
50
-              </router-link>
17
+                <h2>{{ resort.prName }}</h2>
18
+                <WeekList :resortCode="resortCode" />
19
+                <p v-if="description && description !== ''">
20
+                  {{ description }}
21
+                </p>
22
+                <br v-if="description && description !== ''" />
23
+                <div class="d-flex mt-3">
24
+                  <iframe
25
+                    width="100%"
26
+                    height="200"
27
+                    id="gmap_canvas"
28
+                    :src="
29
+                      'https://maps.google.com/maps?q=' +
30
+                      resort.prLatitude +
31
+                      ',' +
32
+                      resort.prLongitude +
33
+                      '&hl=en&z=14&amp;output=embed'
34
+                    "
35
+                    frameborder="0"
36
+                    scrolling="no"
37
+                    marginheight="0"
38
+                    marginwidth="0"
39
+                  ></iframe>
40
+                </div>
41
+              </div>
42
+            </div>
43
+            <div class="row">
44
+              <div class="col">
45
+                <router-link
46
+                  style="float: right;"
47
+                  class="btn-white-border mb-4"
48
+                  to="/timeshare/buy"
49
+                >
50
+                  Back
51
+                </router-link>
52
+              </div>
51 53
             </div>
52 54
           </div>
53 55
         </div>
@@ -94,11 +96,8 @@ export default {
94 96
     ...mapState('resort', ['resort', 'images', 'description']),
95 97
   },
96 98
   created() {
97
-    console.log('Resort Description')
98
-    console.log(this.resortCode)
99 99
     this.getDescription(this.resortCode)
100 100
 
101
-    console.log(this.resort.description)
102 101
     this.getResortData(
103 102
       this.resortCode.includes('SILV') ? 'SILV1' : this.resortCode,
104 103
     ).then(() => (this.wait = false))

+ 8
- 15
src/components/timeshare/resort/unit/summarySection.vue Переглянути файл

@@ -3,7 +3,7 @@
3 3
     <div class="row">
4 4
       <div class="col">
5 5
         <div class="section-header">
6
-          <h2>{{ week ? week.resort.resortName : '' }}</h2>
6
+          <!--<h2>{{ week ? week.resort.resortName : '' }}</h2> -->
7 7
         </div>
8 8
       </div>
9 9
     </div>
@@ -25,7 +25,7 @@
25 25
             <tr>
26 26
               <th scope="col">Unit</th>
27 27
               <th scope="col">Week / Module</th>
28
-              <th scope="col">2020 Arrival Date</th>
28
+              <th scope="col">Arrival Date</th>
29 29
               <th scope="col">Bedrooms</th>
30 30
               <th scope="col">Season</th>
31 31
               <th scope="col">Current Year Levy</th>
@@ -105,25 +105,18 @@ export default {
105 105
     makeOffer,
106 106
     gallerySection,
107 107
   },
108
+  mounted() {
109
+    this.getWeek(this.weekId)
110
+  },
108 111
   computed: {
109 112
     ...mapState('resort', ['resort', 'description', 'images', 'layout']),
110
-
111
-    ...mapGetters({
112
-      weekById: 'weekList/weekById',
113
-    }),
114
-    week() {
115
-      return this.weekById(this.resortCode, this.unitNumber)
116
-    },
117
-    // ...mapState('week', ['currentWeek']),
113
+    ...mapState('weekList', ['week']),
118 114
   },
119 115
   props: {
120
-    resortCode: {},
121
-    unitNumber: {},
116
+    weekId: {},
122 117
   },
123 118
   methods: {
124
-    ...mapActions('weekList', ['getWeeks', 'applyResortFilter']),
125
-    ...mapActions('resort', ['initResort']),
126
-    // ...mapActions('week', ['initWeek']),
119
+    ...mapActions('weekList', ['getWeek']),
127 120
     formatPrice(value) {
128 121
       if (value) {
129 122
         const val = (value / 1).toFixed(2)

+ 39
- 47
src/components/timeshare/resort/unit/unitPageNew.vue Переглянути файл

@@ -1,12 +1,12 @@
1 1
 <template>
2
-  <main id="main" style="padding-bottom:50px">
2
+  <main id="main" style="padding-bottom: 50px;">
3 3
     <!-- <carouselSection v-if="!wait" :resortImages="resort.images" /> -->
4
-    <summarySection :resortCode="resortCode" :unitNumber="unitNumber" />
4
+    <summarySection :weekId="weekId" />
5 5
     <div class="container">
6 6
       <div class="row mt-5">
7 7
         <div class="col">
8 8
           <tabSection
9
-            style="margin-bottom:100px"
9
+            style="margin-bottom: 100px;"
10 10
             :resortCode="calculatedCode"
11 11
             :resortCoords="resort.prPostAdd1"
12 12
             :layoutImages="layouts"
@@ -21,28 +21,28 @@
21 21
 
22 22
 <script>
23 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";
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 29
 
30 30
 export default {
31
-  name: "unit",
31
+  name: 'unit',
32 32
   components: {
33 33
     gallerySection,
34 34
     tabSection,
35 35
     summarySection,
36
-    carouselSection
36
+    carouselSection,
37 37
   },
38 38
   props: {
39 39
     resortCode: {},
40
-    unitNumber: {}
40
+    weekId: {},
41 41
   },
42 42
   data() {
43 43
     return {
44
-      wait: false
45
-    };
44
+      wait: false,
45
+    }
46 46
   },
47 47
   mounted() {
48 48
     // await this.initResort(this.resortCode);
@@ -54,50 +54,42 @@ export default {
54 54
     // setTimeout(() => {
55 55
     //   this.boolLoaded = true;
56 56
     // }, 500);
57
-    this.wait = true;
58
-    this.getResortData(this.resortCode.includes("SILV") ? "SILV1" : this.resortCode).then(
59
-      fulfilled => {
60
-        this.applyResortFilter(this.resortCode.includes("SILV") ? "SILV1" : this.resortCode);
61
-        this.getWeeks();
62
-        this.wait = false;
63
-      }
64
-    );
57
+    this.wait = true
58
+    console.log(this.weekId)
59
+    this.getResortData(
60
+      this.resortCode.includes('SILV') ? 'SILV1' : this.resortCode,
61
+    ).then((fulfilled) => {
62
+      this.applyResortFilter(
63
+        this.resortCode.includes('SILV') ? 'SILV1' : this.resortCode,
64
+      )
65
+      this.getWeeks()
66
+      this.wait = false
67
+    })
65 68
   },
66 69
   computed: {
67
-    ...mapState("resort", ["resort"]),
68
-
69
-    ...mapGetters({
70
-      weekById: "weekList/weekById"
71
-    }),
72
-    week() {
73
-      return this.weekById(
74
-        this.resortCode.includes("SILV") ? "SILV1" : this.resortCode,
75
-        this.unitNumber
76
-      );
77
-    },
70
+    ...mapState('resort', ['resort']),
71
+    ...mapState('weekList', ['weeks', 'week']),
78 72
     layouts() {
79
-      var layouts = [];
80
-      layouts.push(this.resort.layout);
81
-      return layouts;
73
+      var layouts = []
74
+      layouts.push(this.resort.layout)
75
+      return layouts
82 76
     },
83 77
     calculatedCode() {
84
-      return this.resortCode.includes("SILV") ? "SILV1" : this.resortCode;
85
-    }
86
-    // ...mapState('week', ['currentWeek']),
78
+      return this.resortCode.includes('SILV') ? 'SILV1' : this.resortCode
79
+    },
87 80
   },
88 81
   methods: {
89
-    ...mapActions("weekList", ["getWeeks", "applyResortFilter"]),
90
-    ...mapActions("resort", ["getResortData"]),
91
-    // ...mapActions('week', ['initWeek']),
82
+    ...mapActions('weekList', ['getWeeks', 'getWeek', 'applyResortFilter']),
83
+    ...mapActions('resort', ['getResortData']),
92 84
     formatPrice(value) {
93 85
       if (value) {
94
-        const val = (value / 1).toFixed(2);
95
-        return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");
86
+        const val = (value / 1).toFixed(2)
87
+        return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ' ')
96 88
       }
97
-      return "";
98
-    }
99
-  }
100
-};
89
+      return ''
90
+    },
91
+  },
92
+}
101 93
 </script>
102 94
 
103 95
 <style lang="scss" scoped>

+ 33
- 25
src/components/timeshare/sell/contentSectionNew.vue Переглянути файл

@@ -724,11 +724,14 @@
724 724
                         data-msg="Please enter your cell number"
725 725
                         v-model="indiv.cellNumber"
726 726
                         v-bind:class="{
727
-                          'is-valid': indiv.cellNumber,
727
+                          'is-valid':
728
+                            indiv.cellNumber &&
729
+                            validPhoneNumber(indiv.cellNumber),
728 730
                           'is-invalid':
729
-                            !requiredField(
730
-                              validPhoneNumber(indiv.cellNumber),
731
-                            ) && cellNumberLoad,
731
+                            !requiredField(indiv.cellNumber) ||
732
+                            (indiv.cellNumber &&
733
+                              !validPhoneNumber(indiv.cellNumber) &&
734
+                              cellNumberLoad),
732 735
                         }"
733 736
                         v-on:keyup="cellNumberLoad = true"
734 737
                         v-on:blur="cellNumberLoad = true"
@@ -1191,11 +1194,6 @@
1191 1194
                     </p>
1192 1195
                   </div>
1193 1196
                 </div>
1194
-                <div class="form-row">
1195
-                  <div class="col-md-12">
1196
-                    <alert :text="errorMessage" :type="errorOccurred" />
1197
-                  </div>
1198
-                </div>
1199 1197
                 <div align="left" class="custom-control custom-switch mb-2">
1200 1198
                   <div class="row">
1201 1199
                     <div align="center" class="col">
@@ -1221,22 +1219,33 @@
1221 1219
                     v-if="!sellItem.id"
1222 1220
                     @click="submitSale()"
1223 1221
                   >
1224
-                    SUBMIT
1222
+                    Submit
1225 1223
                   </button>
1226 1224
                   <button class="btn-white-border" v-else @click="newSale()">
1227
-                    NEW WEEK
1225
+                    New Week
1228 1226
                   </button>
1229 1227
                 </div>
1228
+                <div class="row">
1229
+                  <div v-if="boolMessage" class="row">
1230
+                    <div class="col">
1231
+                      <alert
1232
+                        :text="'Your Information has been updated!'"
1233
+                        :type="'SUCCESS'"
1234
+                      />
1235
+                    </div>
1236
+                  </div>
1237
+                  <div v-if="boolValidationError" class="row">
1238
+                    <div class="col">
1239
+                      <alert :text="errorMessage" :type="errorOccurred" />
1240
+                    </div>
1241
+                  </div>
1242
+                </div>
1230 1243
                 <!-- <div class="text-center col-12">
1231 1244
               <button class="btn-solid-blue" @click="paygateRedirect()">PayGate</button>
1232 1245
             </div>-->
1233
-                <br />
1234
-                <br />
1235 1246
               </div>
1236 1247
             </div>
1237 1248
           </div>
1238
-          <br />
1239
-          <br />
1240 1249
         </div>
1241 1250
         <div v-if="wait" id="preloader"></div>
1242 1251
       </div>
@@ -1557,6 +1566,7 @@ export default {
1557 1566
             console.log('saveweek')
1558 1567
             this.saveWeek(this.sellItem)
1559 1568
               .then((fulfilled) => {
1569
+                this.boolMessage = true
1560 1570
                 // this.$router.push({
1561 1571
                 //   name: "PaymentOption",
1562 1572
                 //   params: { week: fulfilled, indiv: this.indiv }
@@ -1717,18 +1727,17 @@ export default {
1717 1727
         this.sellItem.levyAmount &&
1718 1728
         this.sellItem.arrivalDate &&
1719 1729
         this.sellItem.departureDate &&
1720
-        this.sellItem.sellPrice &&
1721
-        this.validEmail(individual.emailAddress) &&
1722
-        this.validPhoneNumber(this.sellItem.cellNumber) &&
1723
-        this.validPhoneNumber(this.sellItem.landlineNumber)
1730
+        this.sellItem.sellPrice
1724 1731
       ) {
1725 1732
         if (this.selectedUserType === 'custom') {
1726 1733
           if (
1727
-            this.nameLoad &&
1728
-            this.surnameLoad &&
1729
-            this.emailAddressLoad &&
1730
-            this.cellNumberLoad &&
1731
-            this.spouseEmailLoad
1734
+            this.indiv.name &&
1735
+            this.indiv.surname &&
1736
+            this.indiv.emailAddress &&
1737
+            this.indiv.cellNumber &&
1738
+            this.validEmail(this.indiv.emailAddress) &&
1739
+            this.validPhoneNumber(this.indiv.cellNumber) &&
1740
+            this.validPhoneNumber(this.indiv.landlineNumber)
1732 1741
           ) {
1733 1742
             console.log('passed custom')
1734 1743
             this.errorOccurred = ''
@@ -1741,7 +1750,6 @@ export default {
1741 1750
             this.surnameLoad = true
1742 1751
             this.emailAddressLoad = true
1743 1752
             this.cellNumberLoad = true
1744
-            this.spouseEmailLoad = true
1745 1753
             this.boolValidationError = true
1746 1754
             this.errorOccurred = 'ERROR'
1747 1755
             this.errorMessage =

+ 9
- 10
src/components/user/registerIndividual.vue Переглянути файл

@@ -338,7 +338,6 @@ export default {
338 338
         this.indivUser.username &&
339 339
         this.indivUser.password &&
340 340
         this.indivUser.password === this.indivUser.confirmPassword &&
341
-        this.validEmail(this.indiviUser.email) &&
342 341
         this.validPhoneNumber(this.indivUser.cellNumber) &&
343 342
         this.validPhoneNumber(this.indivUser.telephone)
344 343
       ) {
@@ -348,15 +347,15 @@ export default {
348 347
         return true
349 348
       } else {
350 349
         this.boolValidationError = true
351
-        ;(this.nameLoad = true),
352
-          (this.surnameLoad = true),
353
-          (this.emailLoad = true),
354
-          (this.cellNumberLoad = true),
355
-          (this.telephoneLoad = true),
356
-          (this.usernameLoad = true),
357
-          (this.passwordLoad = true),
358
-          (this.confirmPasswordLoad = true),
359
-          (this.errorOccurred = 'ERROR')
350
+        this.nameLoad = true
351
+        this.surnameLoad = true
352
+        this.emailLoad = true
353
+        this.cellNumberLoad = true
354
+        this.telephoneLoad = true
355
+        this.usernameLoad = true
356
+        this.passwordLoad = true
357
+        this.confirmPasswordLoad = true
358
+        this.errorOccurred = 'ERROR'
360 359
         this.errorMessage = 'Please check form and correct all input fields!'
361 360
         return false
362 361
       }

+ 355
- 171
src/components/user/updateAgentProfile.vue Переглянути файл

@@ -5,194 +5,252 @@
5 5
         <div class="form">
6 6
           <div class="row">
7 7
             <div class="section-header">
8
-              <h2>Update Agent Info</h2>
8
+              <h2>update agent info</h2>
9 9
             </div>
10 10
           </div>
11
-          <div class="row">
12
-            <div class="col">
13
-              <float-label>
11
+          <div class="row mb-4">
12
+            <div class="col-md-6">
13
+              <float-label fixed label="Username">
14 14
                 <input
15 15
                   type="text"
16
-                  name="name"
17
-                  class="form-control uniInput"
18
-                  id="name"
19
-                  placeholder="USERNAME"
16
+                  name="username"
17
+                  class="form-control uniinput"
18
+                  id="username"
19
+                  placeholder="Username"
20 20
                   data-rule="minlen:4"
21
-                  data-msg="Please enter your name"
21
+                  data-msg="please enter your username"
22 22
                   v-model="agent.user.username"
23
+                  v-bind:class="{
24
+                    'is-valid': agent.user.username,
25
+                    'is-invalid':
26
+                      !requiredField(agent.user.username) && usernameLoad,
27
+                  }"
28
+                  v-on:keyup="usernameLoad = true"
29
+                  v-on:blur="usernameLoad = true"
23 30
                 />
31
+                <div class="invalid-feedback">Username is Required!</div>
24 32
               </float-label>
25 33
             </div>
26
-            <div class="col">
27
-              <float-label>
34
+            <div class="form-group col-md-6">
35
+              <float-label fixed label="Name">
28 36
                 <input
29 37
                   type="text"
30 38
                   name="name"
31 39
                   class="form-control uniInput"
32 40
                   id="name"
33
-                  placeholder="NAME"
41
+                  placeholder="Name"
34 42
                   data-rule="minlen:4"
35 43
                   data-msg="Please enter your name"
36 44
                   v-model="agent.name"
45
+                  v-bind:class="{
46
+                    'is-valid': agent.name,
47
+                    'is-invalid': !requiredField(agent.name) && nameLoad,
48
+                  }"
49
+                  v-on:keyup="nameLoad = true"
50
+                  v-on:blur="nameLoad = true"
37 51
                 />
52
+                <div class="invalid-feedback">Name is Required!</div>
38 53
               </float-label>
39 54
             </div>
40 55
           </div>
41 56
           <div class="row mt-4">
42
-            <div class="col-md-6">
43
-              <float-label>
57
+            <div class="form-group col-md-6">
58
+              <float-label fixed label="Surname">
44 59
                 <input
45 60
                   type="text"
46 61
                   class="form-control uniInput"
47 62
                   name="surname"
48 63
                   id="surname"
49
-                  placeholder="SURNAME"
64
+                  placeholder="Surname"
50 65
                   data-msg="Please enter your surname"
51 66
                   v-model="agent.surname"
67
+                  v-bind:class="{
68
+                    'is-valid': agent.surname,
69
+                    'is-invalid': !requiredField(agent.surname) && surnameLoad,
70
+                  }"
71
+                  v-on:keyup="surnameLoad = true"
72
+                  v-on:blur="surnameLoad = true"
52 73
                 />
74
+                <div class="invalid-feedback">Surname is Required!</div>
53 75
               </float-label>
54 76
             </div>
55
-            <div class="col">
56
-              <float-label>
77
+            <div class="form-group col-md-6">
78
+              <float-label fixed label="Email">
57 79
                 <input
58 80
                   type="text"
59 81
                   class="form-control uniInput"
60 82
                   name="email"
61 83
                   id="email"
62
-                  placeholder="EMAIL ADDRESS"
84
+                  placeholder="Email Address"
63 85
                   data-msg="Please enter your email address"
64 86
                   v-model="agent.email"
87
+                  v-bind:class="{
88
+                    'is-valid': agent.email && validEmail(agent.email),
89
+                    'is-invalid': !validEmail(agent.email) && emailAddressLoad,
90
+                  }"
91
+                  v-on:keyup="emailAddressLoad = true"
92
+                  v-on:blur="emailAddressLoad = true"
65 93
                 />
94
+                <div class="invalid-feedback">
95
+                  Valid Email address is Required!
96
+                </div>
66 97
               </float-label>
67 98
             </div>
68
-            <!-- <div class="col">
69
-            <float-label>
70
-              <input
71
-                type="text"
72
-                name="idnum"
73
-                class="form-control uniInput"
74
-                id="idnum"
75
-                placeholder="ID NUMBER"
76
-                data-rule="minlen:4"
77
-                data-msg="Please enter your ID number"
78
-              />
79
-            </float-label>
80
-          </div> -->
81
-          </div>
82
-          <!-- <div class="row mt-4">
83
-          <div class="col-md-6">
84
-            <float-label>
85
-              <input
86
-                type="text"
87
-                class="form-control uniInput"
88
-                name="company"
89
-                id="company"
90
-                placeholder="COMPANY REG NUMBER"
91
-                data-rule="minlen:4"
92
-                data-msg="Please enter your company reg number"
93
-              />
94
-            </float-label>
95 99
           </div>
96
-        </div> -->
97 100
           <div class="row mt-4">
98
-            <div class="col">
99
-              <float-label>
101
+            <div class="form-group col-md-6">
102
+              <float-label fixed label="Cell Number">
100 103
                 <input
101 104
                   type="text"
102 105
                   name="cell"
103 106
                   class="form-control uniInput"
104 107
                   id="cell"
105
-                  placeholder="CELL NUMBER"
108
+                  placeholder="Cell Number"
106 109
                   data-rule="minlen:4"
107 110
                   data-msg="Please enter your cell number"
108 111
                   v-model="agent.cellNumber"
112
+                  v-bind:class="{
113
+                    'is-valid':
114
+                      agent.cellNumber && validPhoneNumber(agent.cellNumber),
115
+                    'is-invalid':
116
+                      !requiredField(agent.cellNumber) ||
117
+                      (agent.cellNumber &&
118
+                        !validPhoneNumber(agent.cellNumber) &&
119
+                        cellNumberLoad),
120
+                  }"
121
+                  v-on:keyup="cellNumberLoad = true"
122
+                  v-on:blur="cellNumberLoad = true"
109 123
                 />
124
+                <div class="invalid-feedback">
125
+                  Valid Cell Number is Required!
126
+                </div>
110 127
               </float-label>
111 128
             </div>
112
-            <div class="col">
113
-              <float-label>
129
+            <div class="form-group col-md-6">
130
+              <float-label fixed label="Telephone Number">
114 131
                 <input
115 132
                   type="text"
116 133
                   class="form-control uniInput"
117
-                  name="landline"
118
-                  id="landline"
119
-                  placeholder="TELEPHONE NUMBER"
134
+                  name="telephone"
135
+                  id="telephone"
136
+                  placeholder="Telephone Number"
120 137
                   data-msg="Please enter your Telephone number"
121 138
                   v-model="agent.telephone"
139
+                  v-bind:class="{
140
+                    'is-valid':
141
+                      agent.telephone && validPhoneNumber(agent.telephone),
142
+                    'is-invalid':
143
+                      agent.telephone && !validPhoneNumber(agent.telephone),
144
+                  }"
122 145
                 />
123
-              </float-label>
124
-            </div>
125
-          </div>
126
-          <div class="row mt-4">
127
-            <div class="col">
128
-              <float-label fixed label="AGENCY">
129
-                <select
130
-                  v-model="agent.agencyId"
131
-                  class="form-control uniSelect"
132
-                  name=""
133
-                  id=""
134
-                >
135
-                  <option
136
-                    v-for="agency in agencies"
137
-                    :key="agency.id"
138
-                    :value="agency.id"
139
-                  >
140
-                    {{ agency.agencyName }}
141
-                  </option>
142
-                </select>
143
-              </float-label>
144
-            </div>
145
-          </div>
146
-          <div v-if="pullUserRole === 'Super Admin'">
147
-            <div class="row">
148
-              <div class="col">
149
-                <div class="section-header">
150
-                  <h2>Access Control</h2>
146
+                <div class="invalid-feedback">
147
+                  Valid telephone number is required!!
151 148
                 </div>
152
-              </div>
149
+              </float-label>
153 150
             </div>
154
-            <div class="row">
151
+
152
+            <div class="row mt-4">
155 153
               <div class="col-md-6">
156
-                <float-label label="User Role" style="width: 100%;">
154
+                <float-label fixed label="Agency" style="width: 100%;">
157 155
                   <select
158 156
                     class="form-control uniSelect"
159
-                    id="howMarried"
160
-                    v-model="agent.user.role"
157
+                    v-model="agent.agencyId"
158
+                    v-bind:class="{
159
+                      'is-valid': agent.agencyId,
160
+                      'is-invalid':
161
+                        !requiredField(agent.agencyId) && inputAgencyLoad,
162
+                    }"
163
+                    v-on:keyup="inputAgencyLoad = true"
164
+                    v-on:blur="inputAgencyLoad = true"
161 165
                   >
166
+                    <option value="">Private User</option>
162 167
                     <option
163
-                      v-for="role in getRoles"
164
-                      :key="role.id"
165
-                      :value="role.roleName"
168
+                      v-for="(item, i) in agencies"
169
+                      :key="i"
170
+                      :value="item.id"
166 171
                     >
167
-                      {{ role.roleName }}
172
+                      {{ item.agencyName }}
168 173
                     </option>
169 174
                   </select>
170 175
                 </float-label>
171 176
               </div>
172
-              <div class="col-md-6">
173
-                <input
174
-                  class="mr-2 mt-3"
175
-                  name="changePass"
176
-                  type="checkbox"
177
-                  v-model="agent.user.loginPasswordChange"
178
-                />
179
-                <label for="changePass">Change Password on Next Login</label>
180
-              </div>
181 177
             </div>
182
-          </div>
183
-          <div class="row">
184
-            <div class="col">
185
-              <Alert :text="errorMessage" :type="errorOccurred" />
178
+
179
+            <div v-if="pullUserRole === 'Super Admin'">
180
+              <div class="row">
181
+                <div class="col">
182
+                  <div class="section-header">
183
+                    <h2>Access Control</h2>
184
+                  </div>
185
+                </div>
186
+              </div>
187
+
188
+              <div class="row">
189
+                <div class="col-md-6">
190
+                  <float-label label="User Role" style="width: 100%;">
191
+                    <select
192
+                      class="form-control uniSelect"
193
+                      id="howMarried"
194
+                      v-model="agent.user.role"
195
+                      v-bind:class="{
196
+                        'is-valid': agent.user.role,
197
+                        'is-invalid':
198
+                          !requiredField(agent.user.role) && userRoleLoad,
199
+                      }"
200
+                      v-on:keyup="userRoleLoad = true"
201
+                      v-on:blur="userRoleLoad = true"
202
+                    >
203
+                      <option
204
+                        v-for="role in getRoles"
205
+                        :key="role.id"
206
+                        :value="role.roleName"
207
+                      >
208
+                        {{ role.roleName }}
209
+                      </option>
210
+                    </select>
211
+                    <div class="invalid-feedback">
212
+                      User Role is Required!
213
+                    </div>
214
+                  </float-label>
215
+                </div>
216
+
217
+                <div class="col-md-6">
218
+                  <input
219
+                    class="mr-2 mt-3"
220
+                    name="changePass"
221
+                    type="checkbox"
222
+                    v-model="agent.user.loginPasswordChange"
223
+                  />
224
+                  <label for="changePass">Change Password on Next Login</label>
225
+                </div>
226
+              </div>
186 227
             </div>
187
-          </div>
188
-          <div class="row mt-5 mb-5">
189
-            <div class="col">
190
-              <button class="btn-solid-blue" @click="sendToApi()">SAVE</button>
228
+            <div class="row">
229
+              <div v-if="boolMessage" class="row">
230
+                <div class="col">
231
+                  <alert
232
+                    :text="'Your Information has been updated!'"
233
+                    :type="'SUCCESS'"
234
+                  />
235
+                </div>
236
+              </div>
237
+              <div v-if="boolValidationError" class="row">
238
+                <div class="col">
239
+                  <alert :text="errorMessage" :type="errorOccurred" />
240
+                </div>
241
+              </div>
191 242
             </div>
192
-            <div class="col">
193
-              <button class="btn-solid-blue" @click="$router.go(-1)">
194
-                CLOSE
195
-              </button>
243
+            <div class="row mt-5 mb-5">
244
+              <div class="col">
245
+                <button class="btn-white-border" @click="sendToApi()">
246
+                  Update
247
+                </button>
248
+              </div>
249
+              <div class="col">
250
+                <button class="btn-white-border" @click="$router.go(-1)">
251
+                  Cancel
252
+                </button>
253
+              </div>
196 254
             </div>
197 255
           </div>
198 256
         </div>
@@ -208,97 +266,223 @@ import Log from '../../assets/Log'
208 266
 import Alert from '../shared/alert'
209 267
 
210 268
 export default {
211
-  props: {
212
-    agent: {},
213
-  },
269
+  name: 'UpdateAgentProfile',
214 270
   components: {
215 271
     Alert,
216 272
   },
217 273
   data() {
218 274
     return {
275
+      selectedItem: {},
276
+      agent: {},
219 277
       errorOccurred: '',
220 278
       errorMessage: '',
221
-      boolError: false,
279
+      boolMessage: false,
280
+      boolValidationError: false,
281
+      usernameLoad: false,
282
+      nameLoad: false,
283
+      surnameLoad: false,
284
+      emailAddressLoad: false,
285
+      cellNumberLoad: false,
286
+      telephoneNumberLoad: false,
287
+      spouseEmailLoad: false,
288
+      userRoleLoad: false,
289
+      inputAgencyLoad: false,
222 290
     }
223 291
   },
292
+  props: {},
224 293
   created() {
225 294
     this.retrieveUserRoles()
295
+    this.getIndividual(Log.getUser().id).then(() => {
296
+      if (this.$route.params.agent) {
297
+        this.agent = this.$route.params.agent
298
+
299
+        if (this.agent.address === null) {
300
+          this.agent.address = {}
301
+        }
302
+
303
+        if (
304
+          this.agent.user.role === 'Agent' ||
305
+          this.agent.user.role === 'Agency' ||
306
+          this.agent.user.role === 'Management Agent'
307
+        ) {
308
+          this.getAgentById(this.agent.userId)
309
+          this.agent.agencyId = this.agent.agencyId
310
+        }
311
+      } else {
312
+        this.agent = this.indiv
313
+        this.agent.email = this.indiv.emailAddress
314
+        this.agent.user = Log.getUser()
315
+      }
316
+    })
226 317
     this.getAgencies()
318
+    this.selectedItem = this.currentUser
227 319
   },
228 320
   computed: {
321
+    ...mapState('individual', ['indiv']),
322
+    ...mapState('register', ['agencies']),
323
+    ...mapGetters({
324
+      user: 'authentication/getUser',
325
+      person: 'authentication/getPerson',
326
+    }),
229 327
     ...mapGetters('role', ['getRoles']),
230
-    ...mapState('timeshare', ['agencies']),
328
+    isLoggedIn() {
329
+      return this.user && this.person
330
+    },
231 331
     pullUserRole() {
232 332
       return Log.getUser().role
233 333
     },
234 334
   },
235 335
   methods: {
336
+    ...mapActions('individual', ['getIndividual', 'updateIndividual']),
236 337
     ...mapActions('role', ['retrieveUserRoles']),
237
-    ...mapActions('timeshare', ['getAgencies', 'updateAgent']),
238
-    ...mapActions('register', ['saveAgent']),
239
-    validPhoneNumber(number) {
240
-      const rx = /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/im
241
-      return rx.test(String(number))
338
+    ...mapActions('register', [
339
+      'getAgentById',
340
+      'getAgencies',
341
+      'saveAgent',
342
+      'updateAgent',
343
+    ]),
344
+    onSelectedItemItemChange(item) {
345
+      this.currentUser = item
242 346
     },
243 347
     sendToApi() {
244 348
       this.boolError = false
245 349
       this.agent.fullName = this.agent.name + ' ' + this.agent.surname
246
-      if (this.agent.telephone !== '') {
247
-        if (this.agent.telephone !== null) {
248
-          if (!this.validPhoneNumber(this.agent.telephone)) {
249
-            this.boolError = true
250
-            this.errorOccurred = 'ERROR'
251
-            this.errorMessage =
252
-              'The telephone number is not in the correct format.'
350
+      this.agent.emailAddress = this.agent.email
351
+      if (this.validatePage()) {
352
+        if (!this.boolValidationError) {
353
+          if (
354
+            this.agent.user.role === 'Agent' ||
355
+            this.agent.user.role === 'Agency' ||
356
+            this.agent.user.role === 'Managing Agent'
357
+          ) {
358
+            this.saveAgent(this.agent)
359
+              .then(() => {
360
+                this.boolMessage = true
361
+                if (Log.getUser().role === 'Super Admin') {
362
+                  if (
363
+                    this.agent.id ===
364
+                    JSON.parse(localStorage.getItem('person')).id
365
+                  ) {
366
+                    var newPerson = {
367
+                      id: JSON.parse(localStorage.getItem('person')).id,
368
+                      email: this.agent.email,
369
+                      fullname: this.agent.name + ' ' + this.agent.surname,
370
+                      name: this.agent.name,
371
+                      surname: this.agent.surname,
372
+                    }
373
+                    localStorage.setItem('person', JSON.stringify(newPerson))
374
+                    this.$router.go()
375
+                  }
376
+                  //this.$router.push('/status/agentuserManagementPage')
377
+                } else {
378
+                  var newPerson = {
379
+                    id: JSON.parse(localStorage.getItem('person')).id,
380
+                    email: this.agent.email,
381
+                    fullname: this.agent.name + ' ' + this.agent.surname,
382
+                    name: this.agent.name,
383
+                    surname: this.agent.surname,
384
+                  }
385
+                  localStorage.setItem('person', JSON.stringify(newPerson))
386
+                  this.$router.go()
387
+                }
388
+              })
389
+              .catch((err) => {
390
+                this.errorOccurred = 'ERROR'
391
+                this.errorMessage = 'Server Error: CONNECTION_REFUSED'
392
+                if (err.status) {
393
+                  if (err.data.message) {
394
+                    this.errorMessage = err.data.message
395
+                  } else {
396
+                    this.errorMessage = err
397
+                  }
398
+                }
399
+              })
400
+          } else {
401
+            this.updateAgent(this.agent).then(() => {
402
+              this.boolMessage = true
403
+              if (Log.getUser().role === 'Super Admin') {
404
+                if (
405
+                  this.agent.id ===
406
+                  JSON.parse(localStorage.getItem('person')).id
407
+                ) {
408
+                  var newPerson = {
409
+                    id: JSON.parse(localStorage.getItem('person')).id,
410
+                    email: this.agent.email,
411
+                    fullname: this.agent.name + ' ' + this.agent.surname,
412
+                    name: this.agent.name,
413
+                    surname: this.agent.surname,
414
+                  }
415
+                  localStorage.setItem('person', JSON.stringify(newPerson))
416
+                  //this.$router.go()
417
+                }
418
+                //this.$router.push('/status/userManagementPage')
419
+              } else {
420
+                var newPerson = {
421
+                  id: JSON.parse(localStorage.getItem('person')).id,
422
+                  email: this.agent.email,
423
+                  fullname: this.agent.name + ' ' + this.agent.surname,
424
+                  name: this.agent.name,
425
+                  surname: this.agent.surname,
426
+                }
427
+                localStorage.setItem('person', JSON.stringify(newPerson))
428
+                //this.$router.go()
429
+              }
430
+            })
253 431
           }
254 432
         }
433
+      }
434
+    },
435
+    requiredField: function (tfield) {
436
+      if (tfield) {
437
+        return true
255 438
       } else {
256
-        this.agent.telephone = null
439
+        return false
257 440
       }
258
-      if (this.agent.cellNumber !== '') {
259
-        if (this.agent.cellNumber !== null) {
260
-          if (!this.validPhoneNumber(this.agent.cellNumber)) {
261
-            this.boolError = true
262
-            this.errorOccurred = 'ERROR'
263
-            this.errorMessage =
264
-              'The cellphone number is not in the correct format.'
265
-          }
266
-        }
441
+    },
442
+    validEmail: function (email) {
443
+      var re = /(.+)@(.+){2,}\.(.+){2,}/
444
+      if (email) {
445
+        return re.test(email.toLowerCase())
267 446
       } else {
268
-        this.agent.cellNumber = null
447
+        return re.test(email)
269 448
       }
449
+    },
450
+    validPhoneNumber(number) {
451
+      if (number) {
452
+        const rx = /^\(?\d{3}\)?[-\s]?\d{3}[-\s]?\d{4}$/
453
+        // const rx = /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/im
454
+        return rx.test(String(number))
455
+      } else {
456
+        return true
457
+      }
458
+    },
459
+    validatePage: function () {
460
+      if (
461
+        this.agent.name &&
462
+        this.agent.surname &&
463
+        this.agent.emailAddress &&
464
+        this.agent.cellNumber &&
465
+        this.agent.user.role &&
466
+        this.validEmail(this.agent.emailAddress) &&
467
+        this.validPhoneNumber(this.agent.cellNumber) &&
468
+        this.validPhoneNumber(this.agent.telephone)
469
+      ) {
470
+        this.errorOccurred = ''
471
+        this.errorMessage = ''
472
+        this.boolValidationError = false
270 473
 
271
-      if (!this.boolError) {
272
-        if (
273
-          this.agent.user.role === 'Agent' ||
274
-          this.agent.user.role === 'Agency' ||
275
-          this.agent.user.role === 'Managing Agent'
276
-        ) {
277
-          this.updateAgent(this.agent).then(() => {
278
-            var newPerson = {
279
-              id: JSON.parse(localStorage.getItem('person')).id,
280
-              email: this.agent.email,
281
-              fullname: this.agent.name + ' ' + this.agent.surname,
282
-              name: this.agent.name,
283
-              surname: this.agent.surnmame,
284
-            }
285
-            localStorage.setItem('person', JSON.stringify(newPerson))
286
-            console.log(newPerson)
287
-            this.$router.push('/')
288
-          })
289
-        } else {
290
-          this.saveAgent(this.agent)
291
-            .then(() => {
292
-              if (Log.getUser().role === 'Super Admin') {
293
-                this.$router.push('/status/userManagementPage')
294
-              } else {
295
-                this.$router.push('/')
296
-              }
297
-            })
298
-            .catch((ex) => {
299
-              console.log(ex)
300
-            })
301
-        }
474
+        return true
475
+      } else {
476
+        this.nameLoad = true
477
+        this.surnameLoad = true
478
+        this.emailAddressLoadLoad = true
479
+        this.cellNumberLoad = true
480
+        this.telephoneLoad = true
481
+        this.userRoleLoad = true
482
+        this.boolValidationError = true
483
+        this.errorOccurred = 'ERROR'
484
+        this.errorMessage = 'Please check form and correct all input fields!'
485
+        return false
302 486
       }
303 487
     },
304 488
   },

+ 29
- 43
src/components/user/updateProfileInfo.vue Переглянути файл

@@ -31,7 +31,7 @@
31 31
                 type="text"
32 32
                 name="username"
33 33
                 class="form-control uniInput"
34
-                id="name"
34
+                id="username"
35 35
                 placeholder="Name"
36 36
                 data-rule="minlen:4"
37 37
                 data-msg="Please enter your name"
@@ -192,16 +192,20 @@
192 192
                 data-msg="Please enter your cell number"
193 193
                 v-model="individual.cellNumber"
194 194
                 v-bind:class="{
195
-                  'is-valid': individual.cellNumber,
195
+                  'is-valid':
196
+                    individual.cellNumber &&
197
+                    validPhoneNumber(individual.cellNumber),
196 198
                   'is-invalid':
197
-                    !requiredField(validPhoneNumber(individual.cellNumber)) &&
198
-                    cellNumberLoad,
199
+                    !requiredField(individual.cellNumber) ||
200
+                    (individual.cellNumber &&
201
+                      !validPhoneNumber(individual.cellNumber) &&
202
+                      cellNumberLoad),
199 203
                 }"
200 204
                 v-on:keyup="cellNumberLoad = true"
201 205
                 v-on:blur="cellNumberLoad = true"
202 206
               />
203 207
               <div class="invalid-feedback">
204
-                Cell Number is Required!
208
+                Valid Cell Number is Required!
205 209
               </div>
206 210
             </float-label>
207 211
           </div>
@@ -210,10 +214,10 @@
210 214
               <input
211 215
                 type="text"
212 216
                 class="form-control uniInput"
213
-                name="landline"
214
-                id="landline"
217
+                name="telephone"
218
+                id="telephone"
215 219
                 placeholder="Telephone Number"
216
-                data-msg="Please enter your landline number"
220
+                data-msg="Please enter your Telephone number"
217 221
                 v-model="individual.telephone"
218 222
                 v-bind:class="{
219 223
                   'is-valid':
@@ -223,8 +227,6 @@
223 227
                     individual.telephone &&
224 228
                     !validPhoneNumber(individual.telephone),
225 229
                 }"
226
-                v-on:keyup="landlineNumberLoad = true"
227
-                v-on:blur="landlineNumberLoad = true"
228 230
               />
229 231
               <div class="invalid-feedback">
230 232
                 Valid telephone number is required!!
@@ -301,7 +303,7 @@
301 303
                 <input
302 304
                   type="text"
303 305
                   class="form-control uniInput"
304
-                  placeholder="SPOUSE CELL NUMBER"
306
+                  placeholder="Spouse Cell Number"
305 307
                   data-rule="minlen:4"
306 308
                   data-msg="Please enter your spouse's cellphone number"
307 309
                   v-model="individual.spouseCellnumber"
@@ -463,7 +465,11 @@
463 465
                   v-model="individual.agencyId"
464 466
                   v-bind:class="{
465 467
                     'is-valid': individual.agencyId,
468
+                    'is-invalid':
469
+                      !requiredField(individual.agencyId) && inputAgencyLoad,
466 470
                   }"
471
+                  v-on:keyup="inputAgencyLoad = true"
472
+                  v-on:blur="inputAgencyLoad = true"
467 473
                 >
468 474
                   <option value="">Private User</option>
469 475
                   <option
@@ -541,6 +547,7 @@ export default {
541 547
       landlineNumberLoad: false,
542 548
       spouseEmailLoad: false,
543 549
       userRoleLoad: false,
550
+      inputAgencyLoad: false,
544 551
     }
545 552
   },
546 553
   props: {},
@@ -564,7 +571,8 @@ export default {
564 571
 
565 572
         if (
566 573
           this.individual.user.role === 'Agent' ||
567
-          this.individual.user.role === 'Agency'
574
+          this.individual.user.role === 'Agency' ||
575
+          this.individual.user.role === 'Managment Agent'
568 576
         ) {
569 577
           this.getAgentById(this.individual.userId)
570 578
           this.individual.agencyId = this.agent[0].agencyId
@@ -572,29 +580,15 @@ export default {
572 580
       } else {
573 581
         this.individual = this.indiv
574 582
         this.individual.email = this.indiv.emailAddress
575
-        console.log(this.indiv)
576 583
         this.individual.user = Log.getUser()
577 584
       }
578 585
       this.getAgencies()
579 586
     })
580 587
   },
581 588
   computed: {
582
-    ...mapState('timeshare', [
583
-      'resorts',
584
-      'regions',
585
-      'detailedRegion',
586
-      'seasons',
587
-      'result',
588
-      'resortBedrooms',
589
-      'maxSleep',
590
-      'bankedEntities',
591
-      'sellItem',
592
-      'agencies',
593
-      'agents',
594
-    ]),
595 589
     ...mapState('individual', ['indiv']),
596 590
     ...mapState('authentication', ['isLoggedIn', 'user']),
597
-    ...mapState('register', ['agent']),
591
+    ...mapState('register', ['agent', 'agencies']),
598 592
     ...mapGetters({
599 593
       user: 'authentication/getUser',
600 594
       person: 'authentication/getPerson',
@@ -610,16 +604,15 @@ export default {
610 604
   methods: {
611 605
     ...mapActions('individual', ['getIndividual', 'updateIndividual']),
612 606
     ...mapActions('role', ['retrieveUserRoles']),
613
-    ...mapActions('register', ['getAgentById', 'saveAgent']),
614
-    ...mapActions('timeshare', ['getAgencies']),
607
+    ...mapActions('register', ['getAgentById', 'getAgencies', 'saveAgent']),
615 608
     onSelectedItemItemChange(item) {
616 609
       this.currentUser = item
617 610
     },
618 611
     isAgent() {
619 612
       if (
620
-        this.individual.user.role.toUpperCase() === 'AGENCY' ||
621
-        this.individual.user.role.toUpperCase() === 'AGENT' ||
622
-        this.individual.user.role.toUpperCase() === 'MANAGING AGENT'
613
+        this.individual.user.role === 'Agency' ||
614
+        this.individual.user.role === 'Agent' ||
615
+        this.individual.user.role === 'Managing Agent'
623 616
       ) {
624 617
         return true
625 618
       } else {
@@ -650,8 +643,6 @@ export default {
650 643
               .then(() => {
651 644
                 this.boolMessage = true
652 645
                 if (Log.getUser().role === 'Super Admin') {
653
-                  // console.log(this.individual);
654
-                  // console.log(JSON.parse(localStorage.getItem("person")));
655 646
                   if (
656 647
                     this.individual.id ===
657 648
                     JSON.parse(localStorage.getItem('person')).id
@@ -681,18 +672,14 @@ export default {
681 672
                   this.$router.go()
682 673
                 }
683 674
               })
684
-              .catch((ex) => {
685
-                console.log(ex)
686
-                this.errorOccurred = 'ERRORHTML'
687
-
675
+              .catch((err) => {
688 676
                 this.errorOccurred = 'ERROR'
689 677
                 this.errorMessage = 'Server Error: CONNECTION_REFUSED'
690
-                console.log(err.status)
691 678
                 if (err.status) {
692 679
                   if (err.data.message) {
693 680
                     this.errorMessage = err.data.message
694 681
                   } else {
695
-                    this.errorMessage = ex
682
+                    this.errorMessage = err
696 683
                   }
697 684
                 }
698 685
               })
@@ -758,7 +745,6 @@ export default {
758 745
       }
759 746
     },
760 747
     validatePage: function () {
761
-      console.log('validatePage')
762 748
       if (
763 749
         this.individual.name &&
764 750
         this.individual.surname &&
@@ -769,17 +755,17 @@ export default {
769 755
         this.validPhoneNumber(this.individual.cellNumber) &&
770 756
         this.validPhoneNumber(this.individual.telephone)
771 757
       ) {
772
-        console.log('passed')
773 758
         this.errorOccurred = ''
774 759
         this.errorMessage = ''
775 760
         this.boolValidationError = false
761
+
776 762
         return true
777 763
       } else {
778
-        console.log('failed')
779 764
         this.nameLoad = true
780 765
         this.surnameLoad = true
781 766
         this.emailAddressLoadLoad = true
782 767
         this.cellNumberLoad = true
768
+        this.telephoneLoad = true
783 769
         this.userRoleLoad = true
784 770
         this.boolValidationError = true
785 771
         this.errorOccurred = 'ERROR'

+ 16
- 7
src/main.js Переглянути файл

@@ -4,6 +4,7 @@ import EvaIcons from 'vue-eva-icons'
4 4
 import axios from 'axios'
5 5
 import moment from 'moment'
6 6
 import App from './App.vue'
7
+import VueGtag from "vue-gtag";
7 8
 import router from './router'
8 9
 import store from './store'
9 10
 import * as VueGoogleMaps from 'vue2-google-maps'
@@ -12,7 +13,7 @@ import VueSocialSharing from 'vue-social-sharing'
12 13
 import VueCurrencyInput from 'vue-currency-input'
13 14
 import VueFloatLabel from 'vue-float-label'
14 15
 import VueCryptojs from 'vue-cryptojs'
15
-import VueAnalytics from 'vue-analytics'
16
+//import VueAnalytics from 'vue-analytics'
16 17
 import JsonExcel from 'vue-json-excel'
17 18
 import VModal from 'vue-js-modal'
18 19
 import vueFloatLabel from 'vue-float-label'
@@ -50,14 +51,22 @@ Vue.use(VueGoogleMaps, {
50 51
         },
51 52
     })
52 53
     //More info @ https://webdeasy.de/en/vue-analytics-en/
53
-Vue.use(VueAnalytics, {
54
-    id: 'UA-128891091-1',
55
-    router,
56
-})
54
+// Vue.use(VueAnalytics, {
55
+//     id: 'UA-128891091-1',
56
+//     router,
57
+// })
58
+Vue.use(VueGtag, {
59
+    config: {
60
+        id: 'G-WG43TKF30K',
61
+        params: {
62
+            send_page_view: false
63
+        }
64
+    }
65
+}, router)
57 66
 
58 67
 Vue.config.productionTip = false
59
-axios.defaults.baseURL = 'http://localhost:57260'
60
-    //axios.defaults.baseURL = "https://www.pvsl.co.za:86/";
68
+//axios.defaults.baseURL = 'http://localhost:57260'
69
+    axios.defaults.baseURL = 'https://www.pvsl.co.za:86/'
61 70
     //axios.defaults.baseURL = 'http://training.provision-sa.com:120/'
62 71
 
63 72
 Vue.prototype.$axios = axios

+ 1
- 1
src/router/index.js Переглянути файл

@@ -399,7 +399,7 @@ export default new Router({
399 399
             props: true,
400 400
         },
401 401
         {
402
-            path: '/resort/:resortCode/:unitNumber',
402
+            path: '/resort/:resortCode/:weekId',
403 403
             name: 'UnitPage',
404 404
             component: UnitPage,
405 405
             props: true,

+ 8
- 8
src/store/modules/timeshare/status.js Переглянути файл

@@ -5,24 +5,24 @@ export default {
5 5
     namespaced: true,
6 6
     state: {
7 7
         statusList: [],
8
-        status: {},
8
+        singleStatus: {},
9 9
     },
10 10
     mutations: {
11 11
         setStatusList(state, list) {
12 12
             state.statusList = list
13 13
         },
14
-        addNewStatus(state, status) {
15
-            state.statusList.push(status)
14
+        addNewStatus(state, jsstatus) {
15
+            state.statusList.push(jsstatus)
16 16
         },
17
-        setSingleStatus(state, status) {
18
-            state.status = status
17
+        setSingleStatus(state, jsstatus) {
18
+            state.singleStatus = jsstatus
19 19
         },
20
-        deleteStatus(state, id) {
21
-            var index = state.statusList.findIndex((stat) => stat.id == id)
20
+        deleteStatus(state, jsid) {
21
+            var index = state.statusList.findIndex((stat) => stat.id == jsid)
22 22
             state.statusList.splice(index, 1)
23 23
         },
24 24
         clearStatus(state) {
25
-            state.status = {
25
+            state.singleStatus = {
26 26
                 code: '',
27 27
                 description: '',
28 28
             }

+ 18
- 18
src/store/modules/timeshare/timeshare.js Переглянути файл

@@ -67,32 +67,32 @@ export default {
67 67
         filterStore(state, input) {
68 68
             state.timeshareFilter = input
69 69
         },
70
-        setAgency(state, agencies) {
71
-            state.agencies = agencies
70
+        setAgency(state, jstimesharetype) {
71
+            state.agencies = jstimesharetype
72 72
         },
73
-        setAgent(state, agents) {
74
-            state.agents = agents
73
+        setAgent(state, jstimesharetype) {
74
+            state.agents = jstimesharetype
75 75
         },
76
-        setSeason(state, seasons) {
77
-            state.seasons = seasons
76
+        setSeason(state, jstimesharetype) {
77
+            state.seasons = jstimesharetype
78 78
         },
79
-        setResortBedrooms(state, resortBedrooms) {
80
-            state.resortBedrooms = resortBedrooms
79
+        setResortBedrooms(state, jstimesharetype) {
80
+            state.resortBedrooms = jstimesharetype
81 81
         },
82
-        setMaxSleep(state, maxSleep) {
83
-            state.maxSleep = maxSleep
82
+        setMaxSleep(state, jstimesharetype) {
83
+            state.maxSleep = jstimesharetype
84 84
         },
85
-        setBankedEntities(state, bankedEntities) {
86
-            state.bankedEntities = bankedEntities
85
+        setBankedEntities(state, jstimesharetype) {
86
+            state.bankedEntities = jstimesharetype
87 87
         },
88
-        addResort(state, resorts) {
89
-            state.resorts = resorts
88
+        addResort(state, jstimesharetype) {
89
+            state.resorts = jstimesharetype
90 90
         },
91
-        addRegion(state, regions) {
92
-            state.regions = regions
91
+        addRegion(state, jstimesharetype) {
92
+            state.regions = jstimesharetype
93 93
         },
94
-        addDetailedRegion(state, detailedRegion) {
95
-            state.detailedRegion.push(detailedRegion)
94
+        addDetailedRegion(state, jstimesharetype) {
95
+            state.detailedRegion.push(jstimesharetype)
96 96
         },
97 97
         changeResort(state, resort) {
98 98
             for (const reg in state.detailedRegion) {

+ 24
- 32
src/store/modules/timeshare/weekList.js Переглянути файл

@@ -10,6 +10,7 @@ export default {
10 10
     namespaced: true,
11 11
     state: {
12 12
         weeks: [],
13
+        week: {},
13 14
         status: undefined,
14 15
         filter: {
15 16
             season: undefined,
@@ -38,18 +39,21 @@ export default {
38 39
         onError(state) {
39 40
             state.status = 'Error occurred getting data.'
40 41
         },
41
-        onClearFilter(state, filter) {
42
-            state.filter[filter] = undefined
42
+        onClearFilter(state, jsfilter) {
43
+            state.filter[jsfilter] = undefined
43 44
         },
44
-        setWeeks(state, weeks) {
45
-            state.weeks = weeks
45
+        setWeeks(state, jsweeks) {
46
+            state.weeks = jsweeks
46 47
             state.status = ''
47 48
         },
48
-        addWeek(state, week) {
49
-            state.weeks.push(week)
49
+        setWeek(state, jsweek) {
50
+            state.week = jsweek
50 51
         },
51
-        applyResort(state, resort) {
52
-            state.filter.resort = resort
52
+        addWeek(state, jsweek) {
53
+            state.weeks.push(jsweek)
54
+        },
55
+        applyResort(state, jsresort) {
56
+            state.filter.resort = jsresort
53 57
         },
54 58
     },
55 59
     getters: {
@@ -140,15 +144,8 @@ export default {
140 144
             return rootGetters['timeshare/getRegionCode']('KK')
141 145
         },
142 146
         weekById(state) {
143
-            return (resortCode, unitNumber) => {
144
-                const w = state.weeks.find(
145
-                    (week) =>
146
-                    week.resort !== undefined &&
147
-                    week.resort.resortCode === resortCode &&
148
-                    week.unitNumber === unitNumber,
149
-                )
150
-                console.log(resortCode, unitNumber)
151
-
147
+            return (week) => {
148
+                const w = state.weeks.find((week) => week.id === weekId)
152 149
                 if (w) {
153 150
                     return w
154 151
                 }
@@ -167,7 +164,6 @@ export default {
167 164
                 .get('/api/timeshareweek/getByResortCode/' + resortCode)
168 165
                 .then((result) => {
169 166
                     commit('setWeeks', result.data)
170
-                    console.log(result)
171 167
                 })
172 168
         },
173 169
         async getWeeks({ commit, rootGetters }) {
@@ -183,29 +179,25 @@ export default {
183 179
                         if (myItem !== undefined) {
184 180
                             const code = myItem.resort.resortCode
185 181
                             myItem.region = {
186
-                                regionName: rootGetters['timeshare/getRegionCode'](code),
182
+                                regionName: rootGetters['timeshare/getRegionCode'](this.code),
187 183
                             }
188 184
                             myItem.resort = {
189
-                                resortName: rootGetters['timeshare/getResortName'](code),
190
-                                resortCode: code,
185
+                                resortName: rootGetters['timeshare/getResortName'](this.code),
186
+                                resortCode: this.code,
191 187
                             }
192 188
                         }
193 189
                     }
194
-
195
-                    console.log(code)
196
-                        //console.log(arr3)
197 190
                     commit('setWeeks', arr2)
198 191
                 })
199 192
                 .catch(console.error)
200 193
         },
201
-        // getWeeks({ commit }) {
202
-        //   axios.get("api/timeshareweek").then(result =>
203
-        //     commit(
204
-        //       "setWeeks",
205
-        //       result.data.filter(x => x.region !== null)
206
-        //     )
207
-        //   );
208
-        // },
194
+        async getWeek({ commit }, jsweekId) {
195
+            commit('onLoading')
196
+            await axios.get('/api/timeshareweek/' + jsweekId).then((result) => {
197
+                commit('setWeek', result.data)
198
+            })
199
+        },
200
+
209 201
         clearFilter({ commit }, filter) {
210 202
             commit('onClearFilter', filter)
211 203
         },

+ 55
- 41
src/store/modules/user/register.js Переглянути файл

@@ -39,45 +39,59 @@ export default {
39 39
         },
40 40
     },
41 41
     mutations: {
42
-        setIndividual(state, type) {
43
-            state.registerIndividual = type
42
+        setIndividual(state, jsregistertype) {
43
+            state.registerIndividual = jsregistertype
44 44
         },
45
-        setIndividuals(state, type) {
46
-            state.individuals = type
45
+        setIndividuals(state, jsregistertype) {
46
+            state.individuals = jsregistertype
47 47
         },
48
-        setAgents(state, type) {
49
-            state.agents = type
48
+        setAgents(state, jsregistertype) {
49
+            state.agents = jsregistertype
50 50
         },
51
-        setSingleAgent(state, agent) {
52
-            state.agent = agent
51
+        setSingleAgent(state, jsregistertype) {
52
+            state.agent = jsregistertype
53 53
         },
54
-        setAgencies(state, type) {
55
-            state.agencies = type
54
+        setAgencies(state, jsregistertype) {
55
+            state.agencies = jsregistertype
56 56
         },
57
-        setAgency(state, type) {
58
-            state.registerAgency = type
57
+        setAgency(state, jsregistertype) {
58
+            state.registerAgency = jsregistertype
59 59
         },
60
-        addIndividual(state, type) {
61
-            state.registerIndividual = type
60
+        addIndividual(state, jsregistertype) {
61
+            state.registerIndividual = jsregistertype
62 62
         },
63
-        addAgency(state, type) {
64
-            state.registerAgency = type
63
+        addAgency(state, jsregistertype) {
64
+            state.registerAgency = jsregistertype
65 65
         },
66
-        addAgent(state, type) {
67
-            state.registerIndividual = type
66
+        addAgent(state, jsregistertype) {
67
+            state.registerIndividual = jsregistertype
68 68
         },
69
-        updateIndividual(state, type) {
70
-            state.registerIndividual.find((item) => item.id === type.id).username =
71
-                type.username
72
-            state.registerIndividual.find((item) => item.id === type.id).password =
73
-                type.password
69
+        updateIndividual(state, jsregistertype) {
70
+            state.registerIndividual.find(
71
+                (item) => item.id === jsregistertype.id,
72
+            ).username = type.username
73
+            state.registerIndividual.find(
74
+                (item) => item.id === jsregistertype.id,
75
+            ).password = type.password
74 76
         },
75
-        updateAgency(state, type) {
76
-            state.registerAgency.find((item) => item.id === type.id).eaabeffcNumber =
77
-                type.eaabeffcNumber
77
+        updateAgency(state, jsregistertype) {
78 78
             state.registerAgency.find(
79
-                (item) => item.id === type.id,
80
-            ).companyRegNumber = type.companyRegNumber
79
+                (item) => item.id === jsregistertype.id,
80
+            ).eaabeffcNumber = jsregistertype.eaabeffcNumber
81
+            state.registerAgency.find(
82
+                (item) => item.id === jsregistertype.id,
83
+            ).companyRegNumber = jsregistertype.companyRegNumber
84
+        },
85
+        agentUpdate(state, jsregistertype) {
86
+            var index
87
+            var count = 0
88
+            state.agents.forEach((item) => {
89
+                if (item.id === jsregistertype.id) {
90
+                    index = count
91
+                }
92
+                count++
93
+            })
94
+            Object.assign(state.agents[index], jsregistertype)
81 95
         },
82 96
         clearIndividual(state) {
83 97
             state.registerIndividual = {
@@ -85,6 +99,7 @@ export default {
85 99
                 surname: '',
86 100
                 email: '',
87 101
                 cellNumber: '',
102
+                telephone: '',
88 103
                 username: '',
89 104
                 password: '',
90 105
                 acceptedTerms: false,
@@ -145,8 +160,6 @@ export default {
145 160
             axios
146 161
                 .get('/api/agent')
147 162
                 .then((result) => {
148
-                    //console.log('Agents')
149
-                    //console.log(result)
150 163
                     commit('setAgents', result.data)
151 164
                 })
152 165
                 .catch(console.error)
@@ -155,8 +168,7 @@ export default {
155 168
             await axios
156 169
                 .get('/api/agent/single/' + userId)
157 170
                 .then((result) => {
158
-                    console.log(result)
159
-                    commit('setSingleAgent', result.data)
171
+                    commit('setSingleAgent', result.data[0])
160 172
                 })
161 173
                 .catch((e) => {
162 174
                     console.log(e)
@@ -166,8 +178,6 @@ export default {
166 178
             axios
167 179
                 .get('/api/agency')
168 180
                 .then((result) => {
169
-                    //console.log('Agencies')
170
-                    //console.log(result)
171 181
                     commit('setAgencies', result.data)
172 182
                 })
173 183
                 .catch(console.error)
@@ -187,9 +197,7 @@ export default {
187 197
                     return promise.resolve()
188 198
                 })
189 199
                 .catch((ex) => {
190
-                    //console.log(ex.response)
191 200
                     return promise.reject(ex.response)
192
-                        //console.error;
193 201
                 })
194 202
         },
195 203
         async saveAgency({ commit }, item) {
@@ -197,13 +205,9 @@ export default {
197 205
                 .post('/api/register/registeragency', item)
198 206
                 .then((res) => {
199 207
                     commit('addAgency', res.data)
200
-                    console.log(promise.resolve())
201
-                    console.log('Agency Added')
202 208
                     return promise.resolve()
203 209
                 })
204 210
                 .catch((ex) => {
205
-                    console.log('regAgency API failed')
206
-                        //console.log(ex.response)
207 211
                     return promise.reject(ex.response)
208 212
                 })
209 213
         },
@@ -221,7 +225,7 @@ export default {
221 225
         async updateIndividual({ commit }, userParam) {
222 226
             await axios
223 227
                 .put('/api/user/', userParam)
224
-                .then((result) => console.log(result))
228
+                .then((result) => {})
225 229
                 .catch(console.error)
226 230
         },
227 231
         updateAgency({ commit }, item) {
@@ -230,6 +234,16 @@ export default {
230 234
                 .then((result) => commit('updateAgency', item))
231 235
                 .catch(console.error)
232 236
         },
237
+        async updateAgent({ commit }, agent) {
238
+            await axios
239
+                .put('/api/agent', agent)
240
+                .then((result) => {
241
+                    commit('updateAgent', result.data)
242
+                })
243
+                .catch((ex) => {
244
+                    console.log(ex)
245
+                })
246
+        },
233 247
         // clearIndividual({
234 248
         //   commit,
235 249
         // }) {

+ 2
- 2
vue.config.js Переглянути файл

@@ -2,9 +2,9 @@ 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:120/',
7
-                //target: "https://www.pvsl.co.za:86/",
7
+                target: 'https://www.pvsl.co.za:86/',
8 8
                 changeOrigin: true,
9 9
             },
10 10
             '/nph-srep': {

Завантаження…
Відмінити
Зберегти