13 Revīzijas

Autors SHA1 Ziņojums Datums
  brianconwaysa 6a912af253 Google Analytics changed to vue-gtag 7 mēnešus atpakaļ
  Brian Conway e9178e2bc2 Fix Typo on file 2 gadus atpakaļ
  Brian Conway 103f095d77 Add Consent to TimeshareAdmin and Offers 2 gadus atpakaļ
  Brian Conway e31ed9dbde Fix Commercial and Timeshare to Buy links to pages 2 gadus atpakaļ
  Brian Conway a787d59086 Timeshare Sell fix submit 2 gadus atpakaļ
  Brian Conway 6d95048e8f Timeshare Sell Submit fix 2 gadus atpakaļ
  Brian Conway 41c5897534 Fix css on nav-tabs 2 gadus atpakaļ
  Brian Conway da49e43de2 Remove console logging and commented code 2 gadus atpakaļ
  Brian Conway b0d50488b2 Fix User and Agent Updates 2 gadus atpakaļ
  Brian Conway 46164eec3e Fix UpdateInfo on Agent/Agency 2 gadus atpakaļ
  Brian Conway 7e07be9b9f Fix space on buttons on home page 2 gadus atpakaļ
  Brian Conway ab897683cb Fix registerIndividual insert 2 gadus atpakaļ
  Brian Conway 8c4f105a40 Fix page formats and heading 2 gadus atpakaļ

+ 2268
- 17630
package-lock.json
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Parādīt failu


+ 5
- 3
package.json Parādīt failu

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

+ 1
- 0
public/googlea6e63bc009bf908f.html Parādīt failu

1
+google-site-verification: googlea6e63bc009bf908f.html

+ 31
- 0
src/App.vue Parādīt failu

147
 .noWeeks {
147
 .noWeeks {
148
   background-color: #ff4444;
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
 </style>
181
 </style>
151
 
182
 
152
 <style scoped>
183
 <style scoped>

+ 133
- 105
src/components/admin/property/propertyList.vue Parādīt failu

8
         <h6>{{ curAgency }}</h6>
8
         <h6>{{ curAgency }}</h6>
9
       </div>
9
       </div>
10
       <div v-if="ROLE === 'Agent'">
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
       </div>
12
       </div>
13
       <div class="row">
13
       <div class="row">
14
         <div class="col-lg-6 offset-3">
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
         </div>
21
         </div>
17
       </div>
22
       </div>
18
       <div class="row">
23
       <div class="row">
76
                 <td>{{ item.type }}</td>
81
                 <td>{{ item.type }}</td>
77
                 <td v-if="!item.isPublished">
82
                 <td v-if="!item.isPublished">
78
                   <a v-on:click="Publish(item)">
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
                   </a>
89
                   </a>
81
                 </td>
90
                 </td>
82
                 <td v-else>
91
                 <td v-else>
90
                 </td>
99
                 </td>
91
                 <td>
100
                 <td>
92
                   <a v-on:click="Edit(item)">
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
                   </a>
107
                   </a>
95
                 </td>
108
                 </td>
96
                 <td>
109
                 <td>
97
                   <a v-on:click="Delete(item)">
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
                   </a>
116
                   </a>
100
                 </td>
117
                 </td>
101
               </tr>
118
               </tr>
104
           <div class="d-flex justify-content-between" v-if="showPager">
121
           <div class="d-flex justify-content-between" v-if="showPager">
105
             <div class="p-1">
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
             </div>
129
             </div>
110
             <div class="p-1">
130
             <div class="p-1">
124
                     v-model="visibleItemsPerPageCount"
144
                     v-model="visibleItemsPerPageCount"
125
                     @change="onChangeItemsPerPage()"
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
                   </select>
150
                   </select>
129
                 </div>
151
                 </div>
130
               </div>
152
               </div>
133
           <div class="p-2">
155
           <div class="p-2">
134
             <div class="d-flex flex-row">
156
             <div class="d-flex flex-row">
135
               <div>
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
                   Clear Sort
163
                   Clear Sort
138
                 </button>
164
                 </button>
139
               </div>
165
               </div>
147
 
173
 
148
 <script>
174
 <script>
149
 /* eslint-disable */
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
 export default {
182
 export default {
157
   components: {
183
   components: {
158
-    BasePagination
184
+    BasePagination,
159
   },
185
   },
160
   data() {
186
   data() {
161
     return {
187
     return {
168
       itemsPerPageList: ItemsPerPageList,
194
       itemsPerPageList: ItemsPerPageList,
169
       currentPage: 1,
195
       currentPage: 1,
170
       reverse: true,
196
       reverse: true,
171
-      sortKey: "id",
197
+      sortKey: 'id',
172
       displayColumns: [
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
       columns: [
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
   methods: {
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
     Publish(item) {
239
     Publish(item) {
214
-      this.publishProperty(item);
240
+      this.publishProperty(item)
215
     },
241
     },
216
     Unpublish(item) {
242
     Unpublish(item) {
217
-      this.unpublishProperty(item);
243
+      this.unpublishProperty(item)
218
     },
244
     },
219
     Edit(item) {
245
     Edit(item) {
220
-      this.$router.push(`/property/edit/${item.id}`);
246
+      this.$router.push(`/property/edit/${item.id}`)
221
     },
247
     },
222
     Delete(item) {
248
     Delete(item) {
223
-      this.deleteProperty(item.id);
249
+      this.deleteProperty(item.id)
224
     },
250
     },
225
     async pageChangeHandle(value) {
251
     async pageChangeHandle(value) {
226
       switch (value) {
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
         default:
259
         default:
234
-          this.currentPage = value;
260
+          this.currentPage = value
235
       }
261
       }
236
     },
262
     },
237
     sortBy(sortKey) {
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
     ClearSort() {
267
     ClearSort() {
242
-      this.reverse = true;
243
-      this.sortKey = "id";
244
-    }
268
+      this.reverse = true
269
+      this.sortKey = 'id'
270
+    },
245
   },
271
   },
246
   computed: {
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
     FilteredProperties() {
276
     FilteredProperties() {
251
       if (this.filter) {
277
       if (this.filter) {
252
-        const list = _.filter(this.properties, item =>
278
+        const list = _.filter(this.properties, (item) =>
253
           Object.values(item).some(
279
           Object.values(item).some(
254
-            i =>
280
+            (i) =>
255
               JSON.stringify(i)
281
               JSON.stringify(i)
256
                 .toLowerCase()
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
       } else {
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
     PageCount() {
291
     PageCount() {
266
       return this.visibleItemsPerPageCount !== 0
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
     curAgency() {
298
     curAgency() {
271
-      var selAgency = "";
272
-      this.agencies.forEach(agency => {
299
+      var selAgency = ''
300
+      this.agencies.forEach((agency) => {
273
         if (this.agent[0].agencyId === agency.id) {
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
     DisplayItems() {
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
       if (endSlice > list.length) {
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
     SortDirection() {
316
     SortDirection() {
289
-      return this.reverse ? "desc" : "asc";
317
+      return this.reverse ? 'desc' : 'asc'
290
     },
318
     },
291
     ROLE() {
319
     ROLE() {
292
-      return Log.getUser().role;
293
-    }
320
+      return Log.getUser().role
321
+    },
294
   },
322
   },
295
   created() {
323
   created() {
296
-    this.getAgentById(Log.getUser().id);
297
-    this.getAgencies();
324
+    this.getAgentById(Log.getUser().id)
325
+    this.getAgencies()
298
   },
326
   },
299
   mounted() {
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
       if (this.itemsPerPageList && this.itemsPerPageList.length > 0) {
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
   watch: {
337
   watch: {
310
     filter: {
338
     filter: {
311
       immediate: true,
339
       immediate: true,
312
       handler(val, oldVal) {
340
       handler(val, oldVal) {
313
         if (val != oldVal) {
341
         if (val != oldVal) {
314
-          this.currentPage = 1;
342
+          this.currentPage = 1
315
         }
343
         }
316
-      }
317
-    }
318
-  }
319
-};
344
+      },
345
+    },
346
+  },
347
+}
320
 </script>
348
 </script>
321
 
349
 
322
 <style lang="scss" scoped>
350
 <style lang="scss" scoped>
351
   border-bottom: solid;
379
   border-bottom: solid;
352
   border-width: 2px;
380
   border-width: 2px;
353
   border-color: rgb(27, 117, 187);
381
   border-color: rgb(27, 117, 187);
354
-  font-family: "Muli";
382
+  font-family: 'Muli';
355
 }
383
 }
356
 </style>
384
 </style>

+ 177
- 148
src/components/admin/status/timeshareAdminList.vue Parādīt failu

2
   <section id="contact2">
2
   <section id="contact2">
3
     <div class="container">
3
     <div class="container">
4
       <div class="section-header">
4
       <div class="section-header">
5
-        <h1>Property Admin</h1>
5
+        <h1>Timeshare Admin</h1>
6
       </div>
6
       </div>
7
       <div class="row">
7
       <div class="row">
8
         <div class="col-lg-4"></div>
8
         <div class="col-lg-4"></div>
84
     <div class="container-fluid">
84
     <div class="container-fluid">
85
       <div class="row justify-content-center">
85
       <div class="row justify-content-center">
86
         <div class="col-auto">
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
             <thead>
91
             <thead>
89
               <tr>
92
               <tr>
90
                 <th scope="col" v-for="(col, c) in displayColumns" :key="c">
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
                     <div class="d-flex bd-highlight">
95
                     <div class="d-flex bd-highlight">
93
                       <div class="w-100 bd-highlight">{{ col }}</div>
96
                       <div class="w-100 bd-highlight">{{ col }}</div>
94
                       <div class="flex-shrink-1 bd-highlight">
97
                       <div class="flex-shrink-1 bd-highlight">
135
                 <td>{{ item.sellPrice | toCurrency }}</td>
138
                 <td>{{ item.sellPrice | toCurrency }}</td>
136
                 <td>{{ item.pulbishedDate | toDate }}</td>
139
                 <td>{{ item.pulbishedDate | toDate }}</td>
137
                 <td>{{ item.status.description }}</td>
140
                 <td>{{ item.status.description }}</td>
141
+                <td>{{ item.consent }}</td>
138
                 <td v-if="!item.publish">
142
                 <td v-if="!item.publish">
139
                   <a v-on:click="Publish(item)">
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
                   </a>
149
                   </a>
142
                 </td>
150
                 </td>
143
                 <td v-else>
151
                 <td v-else>
151
                 </td>
159
                 </td>
152
                 <td>
160
                 <td>
153
                   <a v-on:click="Edit(item)">
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
                   </a>
167
                   </a>
156
                 </td>
168
                 </td>
157
                 <td>
169
                 <td>
158
                   <a v-on:click="Delete(item)">
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
                   </a>
176
                   </a>
161
                 </td>
177
                 </td>
162
               </tr>
178
               </tr>
164
           </table>
180
           </table>
165
           <div class="d-flex justify-content-between" v-if="showPager">
181
           <div class="d-flex justify-content-between" v-if="showPager">
166
             <div class="p-1">
182
             <div class="p-1">
167
-              {{ currentPage + " / " + PageCount + (" - (" + FilteredListings.length + " items)") }}
183
+              {{
184
+                currentPage +
185
+                ' / ' +
186
+                PageCount +
187
+                (' - (' + FilteredListings.length + ' items)')
188
+              }}
168
             </div>
189
             </div>
169
             <div class="p-1">
190
             <div class="p-1">
170
               <BasePagination
191
               <BasePagination
194
           <div class="p-2">
215
           <div class="p-2">
195
             <div class="d-flex flex-row">
216
             <div class="d-flex flex-row">
196
               <div>
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
                   Clear Sort
223
                   Clear Sort
199
                 </button>
224
                 </button>
200
               </div>
225
               </div>
209
 
234
 
210
 <script>
235
 <script>
211
 /* eslint-disable */
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
 export default {
243
 export default {
219
   components: {
244
   components: {
220
-    BasePagination
245
+    BasePagination,
221
   },
246
   },
222
   data() {
247
   data() {
223
     return {
248
     return {
230
       itemsPerPageList: ItemsPerPageList,
255
       itemsPerPageList: ItemsPerPageList,
231
       currentPage: 1,
256
       currentPage: 1,
232
       reverse: true,
257
       reverse: true,
233
-      sortKey: "id",
234
-      selectedExcelDownload: "",
258
+      sortKey: 'id',
259
+      selectedExcelDownload: '',
235
       excelFields: {
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
         Amount: {
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
         Levy: {
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
         ArrivalDate: {
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
         DepartureDate: {
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
         Submitted: {
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
       displayColumns: [
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
       columns: [
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
   methods: {
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
     updateLazyFilter() {
345
     updateLazyFilter() {
319
-      this.updateFilter(this.filter);
346
+      this.updateFilter(this.filter)
320
     },
347
     },
321
     downloadExcelSheet() {
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
     Publish(item) {
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
       // item.status.id = 26;
367
       // item.status.id = 26;
341
       // item.status.code = "FS";
368
       // item.status.code = "FS";
342
       // item.status.description = "For Sale";
369
       // item.status.description = "For Sale";
343
       // item.status.statusType = true;
370
       // item.status.statusType = true;
344
       // console.log(JSON.stringify(item));
371
       // console.log(JSON.stringify(item));
345
       // this.publishOnly(item);
372
       // this.publishOnly(item);
346
-      this.publishWeek(item);
373
+      this.publishWeek(item)
347
     },
374
     },
348
     Unpublish(item) {
375
     Unpublish(item) {
349
-      this.unpublishWeek(item);
376
+      this.unpublishWeek(item)
350
     },
377
     },
351
     Edit(item) {
378
     Edit(item) {
352
-      this.$router.push({ name: "EditTimeshare", params: { weekParam: item } });
379
+      this.$router.push({ name: 'EditTimeshare', params: { weekParam: item } })
353
       // this.$router.push(`/editTimeShare/${item.id}`);
380
       // this.$router.push(`/editTimeShare/${item.id}`);
354
     },
381
     },
355
     Delete(item) {
382
     Delete(item) {
356
-      this.deleteListing(item.id);
383
+      this.deleteListing(item.id)
357
     },
384
     },
358
     async pageChangeHandle(value) {
385
     async pageChangeHandle(value) {
359
       switch (value) {
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
         default:
393
         default:
367
-          this.currentPage = value;
394
+          this.currentPage = value
368
       }
395
       }
369
     },
396
     },
370
     sortBy(sortKey) {
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
     ClearSort() {
401
     ClearSort() {
375
-      this.reverse = true;
376
-      this.sortKey = "id";
377
-    }
402
+      this.reverse = true
403
+      this.sortKey = 'id'
404
+    },
378
   },
405
   },
379
   computed: {
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
     FilteredListings() {
410
     FilteredListings() {
384
       if (this.timeshareFilter) {
411
       if (this.timeshareFilter) {
385
-        const list = _.filter(this.getNeedsVerify, item =>
412
+        const list = _.filter(this.getNeedsVerify, (item) =>
386
           Object.values(item).some(
413
           Object.values(item).some(
387
-            i =>
414
+            (i) =>
388
               JSON.stringify(i)
415
               JSON.stringify(i)
389
                 .toLowerCase()
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
       } else {
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
     AllListingsSortedById() {
425
     AllListingsSortedById() {
399
-      return _.orderBy(this.getNeedsVerify, "id", "desc");
426
+      return _.orderBy(this.getNeedsVerify, 'id', 'desc')
400
     },
427
     },
401
     OnlyPublished() {
428
     OnlyPublished() {
402
-      var list = [];
403
-      this.FilteredListings.forEach(listing => {
429
+      var list = []
430
+      this.FilteredListings.forEach((listing) => {
404
         if (listing.publish) {
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
     PageCount() {
437
     PageCount() {
411
       return this.visibleItemsPerPageCount !== 0
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
     DisplayItems() {
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
       if (endSlice > list.length) {
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
     SortDirection() {
453
     SortDirection() {
425
-      return this.reverse ? "desc" : "asc";
426
-    }
454
+      return this.reverse ? 'desc' : 'asc'
455
+    },
427
   },
456
   },
428
   created() {
457
   created() {
429
     this.getItems(this.userId).then(() => {
458
     this.getItems(this.userId).then(() => {
430
-      this.wait = false;
431
-    });
459
+      this.wait = false
460
+    })
432
   },
461
   },
433
   mounted() {
462
   mounted() {
434
-    if (this.timeshareFilter !== "") {
435
-      this.filter = this.timeshareFilter;
463
+    if (this.timeshareFilter !== '') {
464
+      this.filter = this.timeshareFilter
436
     }
465
     }
437
     // this.getAdminProperties(this.userId).then(fulfuilled => {
466
     // this.getAdminProperties(this.userId).then(fulfuilled => {
438
     //   this.wait = false;
467
     //   this.wait = false;
447
       immediate: true,
476
       immediate: true,
448
       handler(val, oldVal) {
477
       handler(val, oldVal) {
449
         if (val != oldVal) {
478
         if (val != oldVal) {
450
-          this.currentPage = 1;
479
+          this.currentPage = 1
451
         }
480
         }
452
-      }
453
-    }
454
-  }
455
-};
481
+      },
482
+    },
483
+  },
484
+}
456
 </script>
485
 </script>
457
 
486
 
458
 <style lang="scss" scoped>
487
 <style lang="scss" scoped>
487
   border-bottom: solid;
516
   border-bottom: solid;
488
   border-width: 2px;
517
   border-width: 2px;
489
   border-color: rgb(27, 117, 187);
518
   border-color: rgb(27, 117, 187);
490
-  font-family: "Muli";
519
+  font-family: 'Muli';
491
 }
520
 }
492
 </style>
521
 </style>

+ 12
- 4
src/components/home/carouselSection.vue Parādīt failu

140
                   </div>
140
                   </div>
141
                 </div>
141
                 </div>
142
               </div>
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
             </div>
152
             </div>
146
           </div>
153
           </div>
147
         </div>
154
         </div>
321
   border-top: none;
328
   border-top: none;
322
   border-left: none;
329
   border-left: none;
323
   border-right: none;
330
   border-right: none;
331
+  margin-left: 10px;
332
+  margin-right: 10px;
324
   background-color: white;
333
   background-color: white;
325
   border-bottom-color: rgb(27, 117, 187);
334
   border-bottom-color: rgb(27, 117, 187);
326
   border: 1px solid rgb(27, 117, 187);
335
   border: 1px solid rgb(27, 117, 187);
327
 }
336
 }
328
-
329
 .nav-tabs li :hover {
337
 .nav-tabs li :hover {
330
   color: white;
338
   color: white;
331
   background-color: rgb(27, 117, 187);
339
   background-color: rgb(27, 117, 187);
337
   border-right: none;
345
   border-right: none;
338
   color: white;
346
   color: white;
339
   background-color: rgb(80, 133, 240);
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
 .nav-tabs li a :hover {
351
 .nav-tabs li a :hover {

+ 14
- 11
src/components/home/homePage.vue Parādīt failu

9
   </div>
9
   </div>
10
 </template>
10
 </template>
11
 <script>
11
 <script>
12
-import CarouselSection from "./carouselSection.vue";
12
+import CarouselSection from './carouselSection.vue'
13
 //import ServiceSection from "./serviceSection.vue";
13
 //import ServiceSection from "./serviceSection.vue";
14
-import PropertySection from "./propertySection.vue";
14
+import PropertySection from './propertySection.vue'
15
 //import NewsSection from "./newsSection.vue";
15
 //import NewsSection from "./newsSection.vue";
16
 //import TestimonialSection from "./testimonialSection.vue";
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
 export default {
19
 export default {
20
   created() {
20
   created() {
21
-    AOS.init();
21
+    AOS.init()
22
   },
22
   },
23
   components: {
23
   components: {
24
     CarouselSection,
24
     CarouselSection,
25
     //ServiceSection,
25
     //ServiceSection,
26
-    PropertySection
26
+    PropertySection,
27
     //NewsSection,
27
     //NewsSection,
28
     //TestimonialSection
28
     //TestimonialSection
29
   },
29
   },
30
   head: {
30
   head: {
31
     title: {
31
     title: {
32
-      inner: "Uni-Vate Properties"
32
+      inner: 'Uni-Vate Properties',
33
     },
33
     },
34
     meta: [
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
 </script>
42
 </script>

+ 21
- 2
src/components/processFlow/offers.vue Parādīt failu

73
         'price',
73
         'price',
74
         'offer',
74
         'offer',
75
         'madeBy',
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
   methods: {
100
   methods: {

+ 91
- 48
src/components/property/commercial/singleView/contentSection.vue Parādīt failu

3
     <div class="container">
3
     <div class="container">
4
       <div class="row" id="resort-profile">
4
       <div class="row" id="resort-profile">
5
         <div class="col-md-4">
5
         <div class="col-md-4">
6
-          <div class="resPortfolioSection" style="margin-top:-5px">
6
+          <div class="resPortfolioSection" style="margin-top: -5px;">
7
             <iframe
7
             <iframe
8
               v-if="property.video !== null"
8
               v-if="property.video !== null"
9
               width="100%"
9
               width="100%"
11
               frameborder="0"
11
               frameborder="0"
12
               allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
12
               allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
13
               allowfullscreen
13
               allowfullscreen
14
-              style="margin-bottom:-6px"
14
+              style="margin-bottom: -6px;"
15
             ></iframe>
15
             ></iframe>
16
             <div v-if="propertyImages.length > 0">
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
                 <div v-if="i < 3">
22
                 <div v-if="i < 3">
19
                   <img
23
                   <img
20
                     v-if="i === 0"
24
                     v-if="i === 0"
21
-                    style="width:100%; height:201px;object-fit: cover"
25
+                    style="width: 100%; height: 201px; object-fit: cover;"
22
                     :src="image.image"
26
                     :src="image.image"
23
                   />
27
                   />
24
                   <div v-else-if="i !== 0">
28
                   <div v-else-if="i !== 0">
25
                     <img
29
                     <img
26
                       v-if="i % 2 === 0"
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
                       :src="image.image"
37
                       :src="image.image"
29
                     />
38
                     />
30
-                    <img v-else style="width:50%; height:140px; float:left" :src="image.image" />
31
                   </div>
39
                   </div>
32
                 </div>
40
                 </div>
33
               </div>
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
             </div>
47
             </div>
36
           </div>
48
           </div>
37
 
49
 
38
           <div
50
           <div
39
             class="panel-left p-5"
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
             <h2>Property Detail</h2>
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
             <p>{{ property.city }}, {{ property.suburb }}</p>
60
             <p>{{ property.city }}, {{ property.suburb }}</p>
45
             <div v-if="property.displayData.length > 0">
61
             <div v-if="property.displayData.length > 0">
46
               <div v-for="(data, i) in property.displayData" :key="i">
62
               <div v-for="(data, i) in property.displayData" :key="i">
57
             </div>-->
73
             </div>-->
58
             <p>{{ property.shortDescription }}</p>
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
             <p v-else>{{ property.price | toCurrency }} Per Month</p>
79
             <p v-else>{{ property.price | toCurrency }} Per Month</p>
62
           </div>
80
           </div>
63
           <div class="panel-left px-5 pb-5 text-center">
81
           <div class="panel-left px-5 pb-5 text-center">
66
               href="http://www.facebook.com/sharer.php?u=https://www.univateproperties.co.za/"
84
               href="http://www.facebook.com/sharer.php?u=https://www.univateproperties.co.za/"
67
               target="_blank"
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
             </a>
92
             </a>
71
             <a
93
             <a
72
               href="mailto:?Subject=Simple Share Buttons&amp;Body=I%20saw%20this%20and%20thought%20of%20you!%20 https://www.univateproperties.co.za/"
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
             </a>
101
             </a>
76
             <a
102
             <a
77
               href="whatsapp://send?text=Have a look at this property: https://www.univateproperties.co.za"
103
               href="whatsapp://send?text=Have a look at this property: https://www.univateproperties.co.za"
78
               data-action="share/whatsapp/share"
104
               data-action="share/whatsapp/share"
79
               target="_blank"
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
             </a>
112
             </a>
83
           </div>
113
           </div>
84
         </div>
114
         </div>
85
         <div class="col-md-8 p-5 resort-profile">
115
         <div class="col-md-8 p-5 resort-profile">
86
           <h2 v-if="property.showAddress">
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
               {{ property.propertyName }} /
118
               {{ property.propertyName }} /
89
             </div>
119
             </div>
90
             {{ property.streetNumber }} {{ property.streetName }}
120
             {{ property.streetNumber }} {{ property.streetName }}
93
           <p>{{ property.shortDescription }}</p>
123
           <p>{{ property.shortDescription }}</p>
94
           <h4>Property Features</h4>
124
           <h4>Property Features</h4>
95
           <div v-if="property.displayData.length > 0">
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
               <div v-for="(field, j) in data.values" :key="j" class="col-md-6">
131
               <div v-for="(field, j) in data.values" :key="j" class="col-md-6">
98
                 <div
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
                   v-if="field.value.toUpperCase() != 'TRUE'"
138
                   v-if="field.value.toUpperCase() != 'TRUE'"
101
                 >
139
                 >
102
                   <i class="fa fa-check-circle"></i>
140
                   <i class="fa fa-check-circle"></i>
112
 
150
 
113
           <div class="mt-5" v-html="property.description"></div>
151
           <div class="mt-5" v-html="property.description"></div>
114
           <button
152
           <button
115
-            style="float:right; white-space: nowrap;"
153
+            style="float: right; white-space: nowrap;"
116
             :class="checkStatus() ? 'btn-disabled mt-3' : 'btn-solid-blue mt-3'"
154
             :class="checkStatus() ? 'btn-disabled mt-3' : 'btn-solid-blue mt-3'"
117
             :disabled="checkStatus()"
155
             :disabled="checkStatus()"
118
             @click="goToSingle()"
156
             @click="goToSingle()"
120
             ENQUIRE NOW
158
             ENQUIRE NOW
121
           </button>
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
           <iframe
164
           <iframe
125
             v-if="property.virtualTour !== null"
165
             v-if="property.virtualTour !== null"
126
             width="100%"
166
             width="100%"
129
             frameborder="0"
169
             frameborder="0"
130
             allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
170
             allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
131
             allowfullscreen
171
             allowfullscreen
132
-            style="margin-bottom:-6px"
172
+            style="margin-bottom: -6px;"
133
             class="mt-3"
173
             class="mt-3"
134
           ></iframe>
174
           ></iframe>
135
           <h4 v-if="property.video !== null" class="mt-5">Video</h4>
175
           <h4 v-if="property.video !== null" class="mt-5">Video</h4>
141
             frameborder="0"
181
             frameborder="0"
142
             allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
182
             allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
143
             allowfullscreen
183
             allowfullscreen
144
-            style="margin-bottom:-6px"
184
+            style="margin-bottom: -6px;"
145
             class="mt-3"
185
             class="mt-3"
146
           ></iframe>
186
           ></iframe>
147
         </div>
187
         </div>
152
 
192
 
153
 <script>
193
 <script>
154
 /* eslint-disable */
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
 export default {
197
 export default {
158
   components: {
198
   components: {
159
-    gallery
199
+    gallery,
160
   },
200
   },
161
   props: {
201
   props: {
162
     property: {},
202
     property: {},
163
-    propertyImages: {}
203
+    propertyImages: {},
164
   },
204
   },
165
   data() {
205
   data() {
166
     return {
206
     return {
167
       index: null,
207
       index: null,
168
-      date: new Date()
169
-    };
208
+      date: new Date(),
209
+    }
170
   },
210
   },
171
   computed: {
211
   computed: {
172
-    ...mapState("status", ["singleStatus"]),
212
+    ...mapState('status', ['singleStatus']),
173
     Images() {
213
     Images() {
174
-      const list = [];
214
+      const list = []
175
       if (this.propertyImages) {
215
       if (this.propertyImages) {
176
         for (let i = 0; i < this.propertyImages.length; i++) {
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
   methods: {
223
   methods: {
184
-    ...mapActions("status", ["getSingleStatus"]),
224
+    ...mapActions('status', ['getSingleStatus']),
185
     goToSingle() {
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
     checkStatus() {
231
     checkStatus() {
189
-      this.getSingleStatus(this.property.statusId);
232
+      this.getSingleStatus(this.property.statusId)
190
       if (
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
       } else {
239
       } else {
197
-        return false;
240
+        return false
198
       }
241
       }
199
-    }
242
+    },
200
   },
243
   },
201
   mounted() {
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
 </script>
254
 </script>
212
 
255
 
213
 <style lang="scss" scoped>
256
 <style lang="scss" scoped>
214
 .btn-disabled {
257
 .btn-disabled {
215
-  font-family: "Muli";
258
+  font-family: 'Muli';
216
   font-size: 15px;
259
   font-size: 15px;
217
   letter-spacing: 1px;
260
   letter-spacing: 1px;
218
   display: inline-block;
261
   display: inline-block;

+ 52
- 32
src/components/propertyManagement/rentalManagement/carouselSection.vue Parādīt failu

1
 <template>
1
 <template>
2
   <section id="intro">
2
   <section id="intro">
3
     <div class="container">
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
             </div>
35
             </div>
25
           </div>
36
           </div>
26
         </div>
37
         </div>
35
       :loop="true"
46
       :loop="true"
36
       :autoHeight="true"
47
       :autoHeight="true"
37
       id="intro-carousel"
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
       <img class="item" src="/img/intro-carousel/home-1.jpg" alt="" />
55
       <img class="item" src="/img/intro-carousel/home-1.jpg" alt="" />
42
       <img class="item" src="/img/intro-carousel/16.jpg" alt="" />
56
       <img class="item" src="/img/intro-carousel/16.jpg" alt="" />
52
 
66
 
53
 <script>
67
 <script>
54
 /* eslint-disable */
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
 export default {
72
 export default {
59
   components: {
73
   components: {
60
-    carousel
74
+    carousel,
61
   },
75
   },
62
   computed: {
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
     isLoggedIn() {
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
 </script>
90
 </script>
71
 
91
 
72
 <style lang="scss" scoped></style>
92
 <style lang="scss" scoped></style>

+ 52
- 32
src/components/propertyManagement/sectionalTitle/carouselSection.vue Parādīt failu

1
 <template>
1
 <template>
2
   <section id="intro">
2
   <section id="intro">
3
     <div class="container">
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
             </div>
35
             </div>
25
           </div>
36
           </div>
26
         </div>
37
         </div>
35
       :loop="true"
46
       :loop="true"
36
       :autoHeight="true"
47
       :autoHeight="true"
37
       id="intro-carousel"
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
       <img class="item" src="/img/intro-carousel/home-1.jpg" alt="" />
55
       <img class="item" src="/img/intro-carousel/home-1.jpg" alt="" />
42
       <img class="item" src="/img/intro-carousel/16.jpg" alt="" />
56
       <img class="item" src="/img/intro-carousel/16.jpg" alt="" />
52
 
66
 
53
 <script>
67
 <script>
54
 /* eslint-disable */
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
 export default {
72
 export default {
59
   components: {
73
   components: {
60
-    carousel
74
+    carousel,
61
   },
75
   },
62
   computed: {
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
     isLoggedIn() {
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
 </script>
90
 </script>
71
 
91
 
72
 <style lang="scss" scoped></style>
92
 <style lang="scss" scoped></style>

+ 1
- 5
src/components/timeshare/buy/weekListComponent.vue Parādīt failu

168
     },
168
     },
169
   },
169
   },
170
   mounted() {
170
   mounted() {
171
-    //if (this.resortCode) {
172
-    //  this.applyResortFilter(this.resortCode);
173
-    //}
174
     this.getByResortCode(this.$route.params.resortCode)
171
     this.getByResortCode(this.$route.params.resortCode)
175
-    //this.getWeeks();
176
   },
172
   },
177
   methods: {
173
   methods: {
178
     ...mapActions('weekList', [
174
     ...mapActions('weekList', [
181
       'getByResortCode',
177
       'getByResortCode',
182
     ]),
178
     ]),
183
     View(item) {
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
     onChangeItemsPerPage() {
182
     onChangeItemsPerPage() {
187
       if (this.currentPage !== 1) {
183
       if (this.currentPage !== 1) {

+ 103
- 80
src/components/timeshare/myWeeksPage.vue Parādīt failu

1
 <template>
1
 <template>
2
   <!-- eslint-disable max-len -->
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
     <div class="container">
4
     <div class="container">
5
       <div class="row">
5
       <div class="row">
6
         <div class="col">
6
         <div class="col">
13
     <div class="container-fluid">
13
     <div class="container-fluid">
14
       <div class="row justify-content-center">
14
       <div class="row justify-content-center">
15
         <div class="col-auto">
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
             <thead>
20
             <thead>
18
               <tr>
21
               <tr>
19
                 <th scope="col" v-for="(col, c) in displayColumns" :key="c">
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
                     <div class="d-flex bd-highlight">
24
                     <div class="d-flex bd-highlight">
22
                       <div class="w-100 bd-highlight">{{ col }}</div>
25
                       <div class="w-100 bd-highlight">{{ col }}</div>
23
                       <div class="flex-shrink-1 bd-highlight">
26
                       <div class="flex-shrink-1 bd-highlight">
63
                 <td>{{ item.sellPrice | toCurrency }}</td>
66
                 <td>{{ item.sellPrice | toCurrency }}</td>
64
                 <td>{{ item.pulbishedDate | toDate }}</td>
67
                 <td>{{ item.pulbishedDate | toDate }}</td>
65
                 <td>{{ item.status.description }}</td>
68
                 <td>{{ item.status.description }}</td>
69
+                <td>{{ item.consent }}</td>
66
                 <!-- <td v-if="!item.publish">
70
                 <!-- <td v-if="!item.publish">
67
                   <a v-on:click="Publish(item)">
71
                   <a v-on:click="Publish(item)">
68
                     <img src="../../../public/img/icons/Upload.png" height="25" width="25" />
72
                     <img src="../../../public/img/icons/Upload.png" height="25" width="25" />
75
                 </td> -->
79
                 </td> -->
76
                 <td>
80
                 <td>
77
                   <a v-on:click="Edit(item)">
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
                   </a>
87
                   </a>
80
                 </td>
88
                 </td>
81
                 <td>
89
                 <td>
82
                   <a v-on:click="Delete(item)">
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
                   </a>
96
                   </a>
85
                 </td>
97
                 </td>
86
               </tr>
98
               </tr>
88
           </table>
100
           </table>
89
           <div class="d-flex justify-content-between" v-if="showPager">
101
           <div class="d-flex justify-content-between" v-if="showPager">
90
             <div class="p-1">
102
             <div class="p-1">
91
-              {{ currentPage + " / " + PageCount + (" - (" + FilteredListings.length + " items)") }}
103
+              {{
104
+                currentPage +
105
+                ' / ' +
106
+                PageCount +
107
+                (' - (' + FilteredListings.length + ' items)')
108
+              }}
92
             </div>
109
             </div>
93
             <div class="p-1">
110
             <div class="p-1">
94
               <BasePagination
111
               <BasePagination
118
           <div class="p-2">
135
           <div class="p-2">
119
             <div class="d-flex flex-row">
136
             <div class="d-flex flex-row">
120
               <div>
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
                   Clear Sort
143
                   Clear Sort
123
                 </button>
144
                 </button>
124
               </div>
145
               </div>
160
 </template>
181
 </template>
161
 <script>
182
 <script>
162
 /* eslint-disable */
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
 export default {
191
 export default {
171
   components: {
192
   components: {
172
     ListView,
193
     ListView,
173
-    BasePagination
194
+    BasePagination,
174
   },
195
   },
175
   data() {
196
   data() {
176
     return {
197
     return {
181
       itemsPerPageList: ItemsPerPageList,
202
       itemsPerPageList: ItemsPerPageList,
182
       reverse: true,
203
       reverse: true,
183
       currentPage: 1,
204
       currentPage: 1,
184
-      sortKey: "id",
205
+      sortKey: 'id',
185
       displayColumns: [
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
       columns: [
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
   created() {
237
   created() {
215
     this.getItems(Log.getUser().id).then(() => {
238
     this.getItems(Log.getUser().id).then(() => {
216
-      this.wait = false;
217
-    });
239
+      this.wait = false
240
+    })
218
   },
241
   },
219
   mounted() {},
242
   mounted() {},
220
   computed: {
243
   computed: {
221
-    ...mapGetters({ getNeedsVerify: "myWeeks/getNeedsVerify" }),
222
-    ...mapState("myWeeks", ["items"]),
244
+    ...mapGetters({ getNeedsVerify: 'myWeeks/getNeedsVerify' }),
245
+    ...mapState('myWeeks', ['items']),
223
     FilteredListings() {
246
     FilteredListings() {
224
       if (this.filter) {
247
       if (this.filter) {
225
-        const list = _.filter(this.getNeedsVerify, item =>
248
+        const list = _.filter(this.getNeedsVerify, (item) =>
226
           Object.values(item).some(
249
           Object.values(item).some(
227
-            i =>
250
+            (i) =>
228
               JSON.stringify(i)
251
               JSON.stringify(i)
229
                 .toLowerCase()
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
       } else {
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
     PageCount() {
261
     PageCount() {
239
       return this.visibleItemsPerPageCount !== 0
262
       return this.visibleItemsPerPageCount !== 0
240
         ? Math.ceil(this.items.length / this.visibleItemsPerPageCount)
263
         ? Math.ceil(this.items.length / this.visibleItemsPerPageCount)
241
-        : 1;
264
+        : 1
242
     },
265
     },
243
     DisplayItems() {
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
       if (endSlice > list.length) {
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
     SortDirection() {
275
     SortDirection() {
253
-      return this.reverse ? "desc" : "asc";
254
-    }
276
+      return this.reverse ? 'desc' : 'asc'
277
+    },
255
   },
278
   },
256
   methods: {
279
   methods: {
257
-    ...mapActions("myWeeks", ["getItems"]),
280
+    ...mapActions('myWeeks', ['getItems']),
258
     onEdit(item) {
281
     onEdit(item) {
259
-      this.$router.push(`/timeshare/${item.id}`);
282
+      this.$router.push(`/timeshare/${item.id}`)
260
     },
283
     },
261
     onNew() {
284
     onNew() {
262
-      this.$router.push("/timeshare/sell");
285
+      this.$router.push('/timeshare/sell')
263
     },
286
     },
264
     onRowClick(items) {
287
     onRowClick(items) {
265
-      this.selectedItems = items;
288
+      this.selectedItems = items
266
     },
289
     },
267
     onClearSelected() {
290
     onClearSelected() {
268
-      this.selectedItems = [];
291
+      this.selectedItems = []
269
     },
292
     },
270
     Edit(item) {
293
     Edit(item) {
271
-      this.$router.push({ name: "EditTimeshare", params: { weekParam: item } });
294
+      this.$router.push({ name: 'EditTimeshare', params: { weekParam: item } })
272
       // this.$router.push(`/editTimeShare/${item.id}`);
295
       // this.$router.push(`/editTimeShare/${item.id}`);
273
     },
296
     },
274
     Delete(item) {
297
     Delete(item) {
275
-      this.deleteListing(item.id);
298
+      this.deleteListing(item.id)
276
     },
299
     },
277
     async pageChangeHandle(value) {
300
     async pageChangeHandle(value) {
278
       switch (value) {
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
         default:
308
         default:
286
-          this.currentPage = value;
309
+          this.currentPage = value
287
       }
310
       }
288
     },
311
     },
289
     sortBy(sortKey) {
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
     ClearSort() {
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
 </script>
322
 </script>
300
 <style scoped>
323
 <style scoped>
301
 .my-disable {
324
 .my-disable {

+ 44
- 45
src/components/timeshare/resort/resortPageNew.vue Parādīt failu

4
     <main id="main" style="margin-top: 20px;">
4
     <main id="main" style="margin-top: 20px;">
5
       <section>
5
       <section>
6
         <div class="container">
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
               </div>
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
             </div>
53
             </div>
52
           </div>
54
           </div>
53
         </div>
55
         </div>
94
     ...mapState('resort', ['resort', 'images', 'description']),
96
     ...mapState('resort', ['resort', 'images', 'description']),
95
   },
97
   },
96
   created() {
98
   created() {
97
-    console.log('Resort Description')
98
-    console.log(this.resortCode)
99
     this.getDescription(this.resortCode)
99
     this.getDescription(this.resortCode)
100
 
100
 
101
-    console.log(this.resort.description)
102
     this.getResortData(
101
     this.getResortData(
103
       this.resortCode.includes('SILV') ? 'SILV1' : this.resortCode,
102
       this.resortCode.includes('SILV') ? 'SILV1' : this.resortCode,
104
     ).then(() => (this.wait = false))
103
     ).then(() => (this.wait = false))

+ 8
- 15
src/components/timeshare/resort/unit/summarySection.vue Parādīt failu

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

+ 39
- 47
src/components/timeshare/resort/unit/unitPageNew.vue Parādīt failu

1
 <template>
1
 <template>
2
-  <main id="main" style="padding-bottom:50px">
2
+  <main id="main" style="padding-bottom: 50px;">
3
     <!-- <carouselSection v-if="!wait" :resortImages="resort.images" /> -->
3
     <!-- <carouselSection v-if="!wait" :resortImages="resort.images" /> -->
4
-    <summarySection :resortCode="resortCode" :unitNumber="unitNumber" />
4
+    <summarySection :weekId="weekId" />
5
     <div class="container">
5
     <div class="container">
6
       <div class="row mt-5">
6
       <div class="row mt-5">
7
         <div class="col">
7
         <div class="col">
8
           <tabSection
8
           <tabSection
9
-            style="margin-bottom:100px"
9
+            style="margin-bottom: 100px;"
10
             :resortCode="calculatedCode"
10
             :resortCode="calculatedCode"
11
             :resortCoords="resort.prPostAdd1"
11
             :resortCoords="resort.prPostAdd1"
12
             :layoutImages="layouts"
12
             :layoutImages="layouts"
21
 
21
 
22
 <script>
22
 <script>
23
 /* eslint-disable */
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
 export default {
30
 export default {
31
-  name: "unit",
31
+  name: 'unit',
32
   components: {
32
   components: {
33
     gallerySection,
33
     gallerySection,
34
     tabSection,
34
     tabSection,
35
     summarySection,
35
     summarySection,
36
-    carouselSection
36
+    carouselSection,
37
   },
37
   },
38
   props: {
38
   props: {
39
     resortCode: {},
39
     resortCode: {},
40
-    unitNumber: {}
40
+    weekId: {},
41
   },
41
   },
42
   data() {
42
   data() {
43
     return {
43
     return {
44
-      wait: false
45
-    };
44
+      wait: false,
45
+    }
46
   },
46
   },
47
   mounted() {
47
   mounted() {
48
     // await this.initResort(this.resortCode);
48
     // await this.initResort(this.resortCode);
54
     // setTimeout(() => {
54
     // setTimeout(() => {
55
     //   this.boolLoaded = true;
55
     //   this.boolLoaded = true;
56
     // }, 500);
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
   computed: {
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
     layouts() {
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
     calculatedCode() {
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
   methods: {
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
     formatPrice(value) {
84
     formatPrice(value) {
93
       if (value) {
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
 </script>
93
 </script>
102
 
94
 
103
 <style lang="scss" scoped>
95
 <style lang="scss" scoped>

+ 33
- 25
src/components/timeshare/sell/contentSectionNew.vue Parādīt failu

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

+ 9
- 10
src/components/user/registerIndividual.vue Parādīt failu

338
         this.indivUser.username &&
338
         this.indivUser.username &&
339
         this.indivUser.password &&
339
         this.indivUser.password &&
340
         this.indivUser.password === this.indivUser.confirmPassword &&
340
         this.indivUser.password === this.indivUser.confirmPassword &&
341
-        this.validEmail(this.indiviUser.email) &&
342
         this.validPhoneNumber(this.indivUser.cellNumber) &&
341
         this.validPhoneNumber(this.indivUser.cellNumber) &&
343
         this.validPhoneNumber(this.indivUser.telephone)
342
         this.validPhoneNumber(this.indivUser.telephone)
344
       ) {
343
       ) {
348
         return true
347
         return true
349
       } else {
348
       } else {
350
         this.boolValidationError = true
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
         this.errorMessage = 'Please check form and correct all input fields!'
359
         this.errorMessage = 'Please check form and correct all input fields!'
361
         return false
360
         return false
362
       }
361
       }

+ 355
- 171
src/components/user/updateAgentProfile.vue Parādīt failu

5
         <div class="form">
5
         <div class="form">
6
           <div class="row">
6
           <div class="row">
7
             <div class="section-header">
7
             <div class="section-header">
8
-              <h2>Update Agent Info</h2>
8
+              <h2>update agent info</h2>
9
             </div>
9
             </div>
10
           </div>
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
                 <input
14
                 <input
15
                   type="text"
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
                   data-rule="minlen:4"
20
                   data-rule="minlen:4"
21
-                  data-msg="Please enter your name"
21
+                  data-msg="please enter your username"
22
                   v-model="agent.user.username"
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
               </float-label>
32
               </float-label>
25
             </div>
33
             </div>
26
-            <div class="col">
27
-              <float-label>
34
+            <div class="form-group col-md-6">
35
+              <float-label fixed label="Name">
28
                 <input
36
                 <input
29
                   type="text"
37
                   type="text"
30
                   name="name"
38
                   name="name"
31
                   class="form-control uniInput"
39
                   class="form-control uniInput"
32
                   id="name"
40
                   id="name"
33
-                  placeholder="NAME"
41
+                  placeholder="Name"
34
                   data-rule="minlen:4"
42
                   data-rule="minlen:4"
35
                   data-msg="Please enter your name"
43
                   data-msg="Please enter your name"
36
                   v-model="agent.name"
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
               </float-label>
53
               </float-label>
39
             </div>
54
             </div>
40
           </div>
55
           </div>
41
           <div class="row mt-4">
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
                 <input
59
                 <input
45
                   type="text"
60
                   type="text"
46
                   class="form-control uniInput"
61
                   class="form-control uniInput"
47
                   name="surname"
62
                   name="surname"
48
                   id="surname"
63
                   id="surname"
49
-                  placeholder="SURNAME"
64
+                  placeholder="Surname"
50
                   data-msg="Please enter your surname"
65
                   data-msg="Please enter your surname"
51
                   v-model="agent.surname"
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
               </float-label>
75
               </float-label>
54
             </div>
76
             </div>
55
-            <div class="col">
56
-              <float-label>
77
+            <div class="form-group col-md-6">
78
+              <float-label fixed label="Email">
57
                 <input
79
                 <input
58
                   type="text"
80
                   type="text"
59
                   class="form-control uniInput"
81
                   class="form-control uniInput"
60
                   name="email"
82
                   name="email"
61
                   id="email"
83
                   id="email"
62
-                  placeholder="EMAIL ADDRESS"
84
+                  placeholder="Email Address"
63
                   data-msg="Please enter your email address"
85
                   data-msg="Please enter your email address"
64
                   v-model="agent.email"
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
               </float-label>
97
               </float-label>
67
             </div>
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
           </div>
99
           </div>
96
-        </div> -->
97
           <div class="row mt-4">
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
                 <input
103
                 <input
101
                   type="text"
104
                   type="text"
102
                   name="cell"
105
                   name="cell"
103
                   class="form-control uniInput"
106
                   class="form-control uniInput"
104
                   id="cell"
107
                   id="cell"
105
-                  placeholder="CELL NUMBER"
108
+                  placeholder="Cell Number"
106
                   data-rule="minlen:4"
109
                   data-rule="minlen:4"
107
                   data-msg="Please enter your cell number"
110
                   data-msg="Please enter your cell number"
108
                   v-model="agent.cellNumber"
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
               </float-label>
127
               </float-label>
111
             </div>
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
                 <input
131
                 <input
115
                   type="text"
132
                   type="text"
116
                   class="form-control uniInput"
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
                   data-msg="Please enter your Telephone number"
137
                   data-msg="Please enter your Telephone number"
121
                   v-model="agent.telephone"
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
                 </div>
148
                 </div>
152
-              </div>
149
+              </float-label>
153
             </div>
150
             </div>
154
-            <div class="row">
151
+
152
+            <div class="row mt-4">
155
               <div class="col-md-6">
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
                   <select
155
                   <select
158
                     class="form-control uniSelect"
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
                     <option
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
                     </option>
173
                     </option>
169
                   </select>
174
                   </select>
170
                 </float-label>
175
                 </float-label>
171
               </div>
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
             </div>
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
             </div>
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
             </div>
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
             </div>
254
             </div>
197
           </div>
255
           </div>
198
         </div>
256
         </div>
208
 import Alert from '../shared/alert'
266
 import Alert from '../shared/alert'
209
 
267
 
210
 export default {
268
 export default {
211
-  props: {
212
-    agent: {},
213
-  },
269
+  name: 'UpdateAgentProfile',
214
   components: {
270
   components: {
215
     Alert,
271
     Alert,
216
   },
272
   },
217
   data() {
273
   data() {
218
     return {
274
     return {
275
+      selectedItem: {},
276
+      agent: {},
219
       errorOccurred: '',
277
       errorOccurred: '',
220
       errorMessage: '',
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
   created() {
293
   created() {
225
     this.retrieveUserRoles()
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
     this.getAgencies()
317
     this.getAgencies()
318
+    this.selectedItem = this.currentUser
227
   },
319
   },
228
   computed: {
320
   computed: {
321
+    ...mapState('individual', ['indiv']),
322
+    ...mapState('register', ['agencies']),
323
+    ...mapGetters({
324
+      user: 'authentication/getUser',
325
+      person: 'authentication/getPerson',
326
+    }),
229
     ...mapGetters('role', ['getRoles']),
327
     ...mapGetters('role', ['getRoles']),
230
-    ...mapState('timeshare', ['agencies']),
328
+    isLoggedIn() {
329
+      return this.user && this.person
330
+    },
231
     pullUserRole() {
331
     pullUserRole() {
232
       return Log.getUser().role
332
       return Log.getUser().role
233
     },
333
     },
234
   },
334
   },
235
   methods: {
335
   methods: {
336
+    ...mapActions('individual', ['getIndividual', 'updateIndividual']),
236
     ...mapActions('role', ['retrieveUserRoles']),
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
     sendToApi() {
347
     sendToApi() {
244
       this.boolError = false
348
       this.boolError = false
245
       this.agent.fullName = this.agent.name + ' ' + this.agent.surname
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
       } else {
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
       } else {
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 Parādīt failu

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

+ 16
- 7
src/main.js Parādīt failu

4
 import axios from 'axios'
4
 import axios from 'axios'
5
 import moment from 'moment'
5
 import moment from 'moment'
6
 import App from './App.vue'
6
 import App from './App.vue'
7
+import VueGtag from "vue-gtag";
7
 import router from './router'
8
 import router from './router'
8
 import store from './store'
9
 import store from './store'
9
 import * as VueGoogleMaps from 'vue2-google-maps'
10
 import * as VueGoogleMaps from 'vue2-google-maps'
12
 import VueCurrencyInput from 'vue-currency-input'
13
 import VueCurrencyInput from 'vue-currency-input'
13
 import VueFloatLabel from 'vue-float-label'
14
 import VueFloatLabel from 'vue-float-label'
14
 import VueCryptojs from 'vue-cryptojs'
15
 import VueCryptojs from 'vue-cryptojs'
15
-import VueAnalytics from 'vue-analytics'
16
+//import VueAnalytics from 'vue-analytics'
16
 import JsonExcel from 'vue-json-excel'
17
 import JsonExcel from 'vue-json-excel'
17
 import VModal from 'vue-js-modal'
18
 import VModal from 'vue-js-modal'
18
 import vueFloatLabel from 'vue-float-label'
19
 import vueFloatLabel from 'vue-float-label'
50
         },
51
         },
51
     })
52
     })
52
     //More info @ https://webdeasy.de/en/vue-analytics-en/
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
 Vue.config.productionTip = false
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
     //axios.defaults.baseURL = 'http://training.provision-sa.com:120/'
70
     //axios.defaults.baseURL = 'http://training.provision-sa.com:120/'
62
 
71
 
63
 Vue.prototype.$axios = axios
72
 Vue.prototype.$axios = axios

+ 1
- 1
src/router/index.js Parādīt failu

399
             props: true,
399
             props: true,
400
         },
400
         },
401
         {
401
         {
402
-            path: '/resort/:resortCode/:unitNumber',
402
+            path: '/resort/:resortCode/:weekId',
403
             name: 'UnitPage',
403
             name: 'UnitPage',
404
             component: UnitPage,
404
             component: UnitPage,
405
             props: true,
405
             props: true,

+ 8
- 8
src/store/modules/timeshare/status.js Parādīt failu

5
     namespaced: true,
5
     namespaced: true,
6
     state: {
6
     state: {
7
         statusList: [],
7
         statusList: [],
8
-        status: {},
8
+        singleStatus: {},
9
     },
9
     },
10
     mutations: {
10
     mutations: {
11
         setStatusList(state, list) {
11
         setStatusList(state, list) {
12
             state.statusList = list
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
             state.statusList.splice(index, 1)
22
             state.statusList.splice(index, 1)
23
         },
23
         },
24
         clearStatus(state) {
24
         clearStatus(state) {
25
-            state.status = {
25
+            state.singleStatus = {
26
                 code: '',
26
                 code: '',
27
                 description: '',
27
                 description: '',
28
             }
28
             }

+ 18
- 18
src/store/modules/timeshare/timeshare.js Parādīt failu

67
         filterStore(state, input) {
67
         filterStore(state, input) {
68
             state.timeshareFilter = input
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
         changeResort(state, resort) {
97
         changeResort(state, resort) {
98
             for (const reg in state.detailedRegion) {
98
             for (const reg in state.detailedRegion) {

+ 24
- 32
src/store/modules/timeshare/weekList.js Parādīt failu

10
     namespaced: true,
10
     namespaced: true,
11
     state: {
11
     state: {
12
         weeks: [],
12
         weeks: [],
13
+        week: {},
13
         status: undefined,
14
         status: undefined,
14
         filter: {
15
         filter: {
15
             season: undefined,
16
             season: undefined,
38
         onError(state) {
39
         onError(state) {
39
             state.status = 'Error occurred getting data.'
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
             state.status = ''
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
     getters: {
59
     getters: {
140
             return rootGetters['timeshare/getRegionCode']('KK')
144
             return rootGetters['timeshare/getRegionCode']('KK')
141
         },
145
         },
142
         weekById(state) {
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
                 if (w) {
149
                 if (w) {
153
                     return w
150
                     return w
154
                 }
151
                 }
167
                 .get('/api/timeshareweek/getByResortCode/' + resortCode)
164
                 .get('/api/timeshareweek/getByResortCode/' + resortCode)
168
                 .then((result) => {
165
                 .then((result) => {
169
                     commit('setWeeks', result.data)
166
                     commit('setWeeks', result.data)
170
-                    console.log(result)
171
                 })
167
                 })
172
         },
168
         },
173
         async getWeeks({ commit, rootGetters }) {
169
         async getWeeks({ commit, rootGetters }) {
183
                         if (myItem !== undefined) {
179
                         if (myItem !== undefined) {
184
                             const code = myItem.resort.resortCode
180
                             const code = myItem.resort.resortCode
185
                             myItem.region = {
181
                             myItem.region = {
186
-                                regionName: rootGetters['timeshare/getRegionCode'](code),
182
+                                regionName: rootGetters['timeshare/getRegionCode'](this.code),
187
                             }
183
                             }
188
                             myItem.resort = {
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
                     commit('setWeeks', arr2)
190
                     commit('setWeeks', arr2)
198
                 })
191
                 })
199
                 .catch(console.error)
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
         clearFilter({ commit }, filter) {
201
         clearFilter({ commit }, filter) {
210
             commit('onClearFilter', filter)
202
             commit('onClearFilter', filter)
211
         },
203
         },

+ 55
- 41
src/store/modules/user/register.js Parādīt failu

39
         },
39
         },
40
     },
40
     },
41
     mutations: {
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
             state.registerAgency.find(
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
         clearIndividual(state) {
96
         clearIndividual(state) {
83
             state.registerIndividual = {
97
             state.registerIndividual = {
85
                 surname: '',
99
                 surname: '',
86
                 email: '',
100
                 email: '',
87
                 cellNumber: '',
101
                 cellNumber: '',
102
+                telephone: '',
88
                 username: '',
103
                 username: '',
89
                 password: '',
104
                 password: '',
90
                 acceptedTerms: false,
105
                 acceptedTerms: false,
145
             axios
160
             axios
146
                 .get('/api/agent')
161
                 .get('/api/agent')
147
                 .then((result) => {
162
                 .then((result) => {
148
-                    //console.log('Agents')
149
-                    //console.log(result)
150
                     commit('setAgents', result.data)
163
                     commit('setAgents', result.data)
151
                 })
164
                 })
152
                 .catch(console.error)
165
                 .catch(console.error)
155
             await axios
168
             await axios
156
                 .get('/api/agent/single/' + userId)
169
                 .get('/api/agent/single/' + userId)
157
                 .then((result) => {
170
                 .then((result) => {
158
-                    console.log(result)
159
-                    commit('setSingleAgent', result.data)
171
+                    commit('setSingleAgent', result.data[0])
160
                 })
172
                 })
161
                 .catch((e) => {
173
                 .catch((e) => {
162
                     console.log(e)
174
                     console.log(e)
166
             axios
178
             axios
167
                 .get('/api/agency')
179
                 .get('/api/agency')
168
                 .then((result) => {
180
                 .then((result) => {
169
-                    //console.log('Agencies')
170
-                    //console.log(result)
171
                     commit('setAgencies', result.data)
181
                     commit('setAgencies', result.data)
172
                 })
182
                 })
173
                 .catch(console.error)
183
                 .catch(console.error)
187
                     return promise.resolve()
197
                     return promise.resolve()
188
                 })
198
                 })
189
                 .catch((ex) => {
199
                 .catch((ex) => {
190
-                    //console.log(ex.response)
191
                     return promise.reject(ex.response)
200
                     return promise.reject(ex.response)
192
-                        //console.error;
193
                 })
201
                 })
194
         },
202
         },
195
         async saveAgency({ commit }, item) {
203
         async saveAgency({ commit }, item) {
197
                 .post('/api/register/registeragency', item)
205
                 .post('/api/register/registeragency', item)
198
                 .then((res) => {
206
                 .then((res) => {
199
                     commit('addAgency', res.data)
207
                     commit('addAgency', res.data)
200
-                    console.log(promise.resolve())
201
-                    console.log('Agency Added')
202
                     return promise.resolve()
208
                     return promise.resolve()
203
                 })
209
                 })
204
                 .catch((ex) => {
210
                 .catch((ex) => {
205
-                    console.log('regAgency API failed')
206
-                        //console.log(ex.response)
207
                     return promise.reject(ex.response)
211
                     return promise.reject(ex.response)
208
                 })
212
                 })
209
         },
213
         },
221
         async updateIndividual({ commit }, userParam) {
225
         async updateIndividual({ commit }, userParam) {
222
             await axios
226
             await axios
223
                 .put('/api/user/', userParam)
227
                 .put('/api/user/', userParam)
224
-                .then((result) => console.log(result))
228
+                .then((result) => {})
225
                 .catch(console.error)
229
                 .catch(console.error)
226
         },
230
         },
227
         updateAgency({ commit }, item) {
231
         updateAgency({ commit }, item) {
230
                 .then((result) => commit('updateAgency', item))
234
                 .then((result) => commit('updateAgency', item))
231
                 .catch(console.error)
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
         // clearIndividual({
247
         // clearIndividual({
234
         //   commit,
248
         //   commit,
235
         // }) {
249
         // }) {

+ 2
- 2
vue.config.js Parādīt failu

2
     devServer: {
2
     devServer: {
3
         proxy: {
3
         proxy: {
4
             '/api': {
4
             '/api': {
5
-                target: 'http://localhost:57260/',
5
+                //target: 'http://localhost:57260/',
6
                 //target: 'http://training.provision-sa.com:120/',
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
                 changeOrigin: true,
8
                 changeOrigin: true,
9
             },
9
             },
10
             '/nph-srep': {
10
             '/nph-srep': {

Notiek ielāde…
Atcelt
Saglabāt