Bladeren bron

Changes made to remove errors on files

master
Lene 5 jaren geleden
bovenliggende
commit
557c0d6304
52 gewijzigde bestanden met toevoegingen van 923 en 921 verwijderingen
  1. 7
    7
      src/App.vue
  2. 1
    0
      src/components/about/aboutTimeshare.vue
  3. 17
    17
      src/components/admin/logs/SearchLogs.vue
  4. 12
    12
      src/components/admin/misc/carouselList.vue
  5. 21
    21
      src/components/admin/misc/carouselSearch.vue
  6. 12
    12
      src/components/admin/property/propertyTypeEdit.vue
  7. 11
    11
      src/components/admin/property/propertyTypeList.vue
  8. 6
    6
      src/components/admin/property/userDefinedField.vue
  9. 25
    25
      src/components/admin/property/userDefinedGroupPage.vue
  10. 10
    10
      src/components/admin/property/userDefinedGroupsPage.vue
  11. 25
    25
      src/components/admin/status/agentsUserManagementPage.vue
  12. 1
    1
      src/components/admin/status/tenderWeekAdminPage.vue
  13. 1
    0
      src/components/admin/status/timeshareAdminPage.vue
  14. 20
    20
      src/components/admin/status/userManagementPage.vue
  15. 8
    7
      src/components/admin/unitConfiguration/unitConfigurationPage.vue
  16. 3
    2
      src/components/communication/templateDetail.vue
  17. 2
    2
      src/components/communication/templateInnerItem.vue
  18. 1
    0
      src/components/communication/templatePage.vue
  19. 1
    1
      src/components/financial/makePayment.vue
  20. 10
    10
      src/components/financial/payments.vue
  21. 16
    16
      src/components/processFlow/makeOffer.vue
  22. 12
    12
      src/components/processFlow/offers.vue
  23. 60
    60
      src/components/property/propertyCreate.vue
  24. 28
    28
      src/components/property/propertyList.vue
  25. 18
    18
      src/components/property/propertyPage.vue
  26. 13
    13
      src/components/property/propertySearchPage.vue
  27. 19
    19
      src/components/property/propertySearchResults.vue
  28. 1
    1
      src/components/property/propertyeditPage.vue
  29. 6
    6
      src/components/shared/checkItem.vue
  30. 2
    1
      src/components/shared/gallerySlideShow.vue
  31. 9
    9
      src/components/shared/lightBoxGallery.vue
  32. 61
    63
      src/components/shared/listView.vue
  33. 7
    7
      src/components/shared/listViewControl.vue
  34. 13
    13
      src/components/shared/navBar.vue
  35. 18
    18
      src/components/shared/searchTab.vue
  36. 2
    2
      src/components/timeshare/buy/buyPage.vue
  37. 3
    2
      src/components/timeshare/myWeeksPage.vue
  38. 1
    0
      src/components/timeshare/searchTimeshare.vue
  39. 21
    23
      src/main.js
  40. 184
    184
      src/router/index.js
  41. 31
    31
      src/store/index.js
  42. 8
    8
      src/store/modules/financial/payment.js
  43. 25
    26
      src/store/modules/logs/searchLog.js
  44. 13
    13
      src/store/modules/misc/carousel.js
  45. 16
    16
      src/store/modules/processFlow/bid.js
  46. 15
    15
      src/store/modules/property/propertyLists.js
  47. 39
    39
      src/store/modules/property/propertySearch.js
  48. 1
    1
      src/store/modules/timeshare/myWeeks.js
  49. 1
    1
      src/store/modules/timeshare/week.js
  50. 26
    26
      src/store/modules/user/authentication.js
  51. 51
    52
      src/store/modules/user/register.js
  52. 9
    9
      vue.config.js

+ 7
- 7
src/App.vue Bestand weergeven

@@ -13,22 +13,22 @@
13 13
 </template>
14 14
 
15 15
 <script>
16
-import SearchTab from "./components/shared/searchTab.vue";
17
-import NavBar from "./components/shared/navBar.vue";
18
-import FooterSection from "./components/shared/footerSection.vue";
16
+import SearchTab from './components/shared/searchTab.vue';
17
+import NavBar from './components/shared/navBar.vue';
18
+import FooterSection from './components/shared/footerSection.vue';
19 19
 
20 20
 export default {
21
-  name: "app",
21
+  name: 'app',
22 22
   components: {
23 23
     SearchTab,
24 24
     NavBar,
25
-    FooterSection
25
+    FooterSection,
26 26
   },
27 27
   methods: {
28 28
     routerGoTo(goTo) {
29 29
       this.$router.push(goTo);
30
-    }
31
-  }
30
+    },
31
+  },
32 32
 };
33 33
 </script>
34 34
 

+ 1
- 0
src/components/about/aboutTimeshare.vue Bestand weergeven

@@ -1,6 +1,7 @@
1 1
 <template>
2 2
   <!--/ About Star /-->
3 3
   <section class="section-about">
4
+    <!-- eslint-disable max-len -->
4 5
     <div class="container">
5 6
       <div class="row">
6 7
         <div class="col-sm-12">

+ 17
- 17
src/components/admin/logs/SearchLogs.vue Bestand weergeven

@@ -66,39 +66,39 @@
66 66
 </template>
67 67
 
68 68
 <script>
69
-import { mapState, mapActions, mapGetters } from "vuex";
70
-import JsonExcel from "vue-json-excel";
71
-import listView from "../../shared/listView.vue";
69
+import { mapState, mapActions, mapGetters } from 'vuex';
70
+import JsonExcel from 'vue-json-excel';
71
+import listView from '../../shared/listView.vue';
72 72
 
73 73
 export default {
74
-  name: "searchLog",
74
+  name: 'searchLog',
75 75
   components: {
76 76
     listView,
77
-    JsonExcel
77
+    JsonExcel,
78 78
   },
79 79
   data() {
80 80
     return {
81 81
       exportFields: {
82
-        Date: "date",
83
-        Time: "time",
84
-        User: "userName",
85
-        Type: "type",
86
-        Field: "property",
87
-        Value: "value"
88
-      }
82
+        Date: 'date',
83
+        Time: 'time',
84
+        User: 'userName',
85
+        Type: 'type',
86
+        Field: 'property',
87
+        Value: 'value',
88
+      },
89 89
     };
90 90
   },
91 91
   methods: {
92
-    ...mapActions("searchLog", ["getPropertySearchLogs", "clearFilter"])
92
+    ...mapActions('searchLog', ['getPropertySearchLogs', 'clearFilter']),
93 93
   },
94 94
   mounted() {
95 95
     this.getPropertySearchLogs();
96 96
   },
97 97
   computed: {
98
-    ...mapState("searchLog", ["list", "fields", "filter"]),
98
+    ...mapState('searchLog', ['list', 'fields', 'filter']),
99 99
     ...mapGetters({
100
-      list: "searchLog/filterList"
101
-    })
102
-  }
100
+      list: 'searchLog/filterList',
101
+    }),
102
+  },
103 103
 };
104 104
 </script>

+ 12
- 12
src/components/admin/misc/carouselList.vue Bestand weergeven

@@ -28,39 +28,39 @@
28 28
 </template>
29 29
 
30 30
 <script>
31
-import { mapState, mapActions } from "vuex";
32
-import listView from "../../shared/listView.vue";
31
+import { mapState, mapActions } from 'vuex';
32
+import listView from '../../shared/listView.vue';
33 33
 
34 34
 export default {
35
-  name: "CarouselList",
35
+  name: 'CarouselList',
36 36
   components: {
37
-    listView
37
+    listView,
38 38
   },
39 39
   data() {
40 40
     return {
41
-      columns: ["id", "header", "image"],
42
-      formats: ["", "", "image"]
41
+      columns: ['id', 'header', 'image'],
42
+      formats: ['', '', 'image'],
43 43
     };
44 44
   },
45 45
   methods: {
46
-    ...mapActions("carousel", ["getCarouselList", "deleteCarousel"]),
46
+    ...mapActions('carousel', ['getCarouselList', 'deleteCarousel']),
47 47
     New() {
48
-      this.$router.push("/carousel/details/0");
48
+      this.$router.push('/carousel/details/0');
49 49
     },
50 50
     Edit(itemID) {
51 51
       this.$router.push({
52
-        path: `/carousel/details/${itemID}`
52
+        path: `/carousel/details/${itemID}`,
53 53
       });
54 54
     },
55 55
     Delete(item) {
56 56
       this.deleteCarousel(item.id);
57
-    }
57
+    },
58 58
   },
59 59
   mounted() {
60 60
     this.getCarouselList();
61 61
   },
62 62
   computed: {
63
-    ...mapState("carousel", ["carouselList"])
64
-  }
63
+    ...mapState('carousel', ['carouselList']),
64
+  },
65 65
 };
66 66
 </script>

+ 21
- 21
src/components/admin/misc/carouselSearch.vue Bestand weergeven

@@ -27,61 +27,61 @@
27 27
 </template>
28 28
 
29 29
 <script>
30
-import { mapState, mapActions } from "vuex";
31
-import ListView from "../../shared/listView.vue";
32
-import ListView2 from "../../shared/listView.vue";
33
-import Log from "../../../assets/Log";
30
+import { mapState, mapActions } from 'vuex';
31
+import ListView from '../../shared/listView.vue';
32
+import ListView2 from '../../shared/listView.vue';
33
+import Log from '../../../assets/Log';
34 34
 
35 35
 export default {
36
-  name: "CarouselSearch",
36
+  name: 'CarouselSearch',
37 37
   props: {
38
-    name: String
38
+    name: String,
39 39
   },
40 40
   components: {
41 41
     ListView,
42
-    ListView2
42
+    ListView2,
43 43
   },
44 44
   data() {
45 45
     return {
46
-      user: Log.getUser()
46
+      user: Log.getUser(),
47 47
     };
48 48
   },
49 49
   mounted() {
50
-    if (this.name === "Timeshare") {
50
+    if (this.name === 'Timeshare') {
51 51
       this.getItems(this.user.id);
52 52
     } else {
53 53
       this.getLiveProperties();
54 54
     }
55 55
   },
56 56
   computed: {
57
-    ...mapState("myWeeks", ["items"]),
58
-    ...mapState("propertyList", ["propertiesLive"]),
57
+    ...mapState('myWeeks', ['items']),
58
+    ...mapState('propertyList', ['propertiesLive']),
59 59
     // eslint-disable-next-line vue/return-in-computed-property
60 60
     nameChanged() {
61
-      if (this.name === "Timeshare") {
61
+      if (this.name === 'Timeshare') {
62 62
         this.getItems(this.user.id);
63 63
       } else {
64 64
         this.getLiveProperties();
65 65
       }
66
-    }
66
+    },
67 67
   },
68 68
   methods: {
69
-    ...mapActions("myWeeks", ["getItems"]),
70
-    ...mapActions("propertyList", ["getLiveProperties"]),
69
+    ...mapActions('myWeeks', ['getItems']),
70
+    ...mapActions('propertyList', ['getLiveProperties']),
71 71
     onRowClick(item) {
72
-      if (this.name === "Timeshare") {
72
+      if (this.name === 'Timeshare') {
73 73
         const week = this.items[item];
74
-        this.$emit("onSelected", week);
74
+        this.$emit('onSelected', week);
75 75
       } else {
76 76
         const prop = this.propertiesLive[item];
77
-        this.$emit("onSelected", prop);
77
+        this.$emit('onSelected', prop);
78 78
       }
79
-    }
79
+    },
80 80
   },
81 81
   watch: {
82 82
     nameChanged() {
83 83
       return null;
84
-    }
85
-  }
84
+    },
85
+  },
86 86
 };
87 87
 </script>

+ 12
- 12
src/components/admin/property/propertyTypeEdit.vue Bestand weergeven

@@ -60,10 +60,10 @@
60 60
 </template>
61 61
 
62 62
 <script>
63
-import { mapState, mapActions } from "vuex";
63
+import { mapState, mapActions } from 'vuex';
64 64
 
65 65
 export default {
66
-  name: "PropertyType",
66
+  name: 'PropertyType',
67 67
   data() {
68 68
     return {};
69 69
   },
@@ -74,14 +74,14 @@ export default {
74 74
     }
75 75
   },
76 76
   computed: {
77
-    ...mapState("propertyTypes", ["propertyType"])
77
+    ...mapState('propertyTypes', ['propertyType']),
78 78
   },
79 79
   methods: {
80
-    ...mapActions("propertyTypes", [
81
-      "getPropertyType",
82
-      "savePropertyType",
83
-      "updatePropertyType",
84
-      "clearPropertyType"
80
+    ...mapActions('propertyTypes', [
81
+      'getPropertyType',
82
+      'savePropertyType',
83
+      'updatePropertyType',
84
+      'clearPropertyType',
85 85
     ]),
86 86
     SubmitData() {
87 87
       if (this.propertyType.id > 0) {
@@ -89,11 +89,11 @@ export default {
89 89
       } else {
90 90
         this.savePropertyType(this.propertyType);
91 91
       }
92
-      this.$router.push("/propertyTypes/list");
92
+      this.$router.push('/propertyTypes/list');
93 93
     },
94 94
     Close() {
95
-      this.$router.push("/propertyTypes/list");
96
-    }
97
-  }
95
+      this.$router.push('/propertyTypes/list');
96
+    },
97
+  },
98 98
 };
99 99
 </script>

+ 11
- 11
src/components/admin/property/propertyTypeList.vue Bestand weergeven

@@ -29,38 +29,38 @@
29 29
 </template>
30 30
 
31 31
 <script>
32
-import { mapState, mapActions } from "vuex";
33
-import listView from "../../shared/listView.vue";
32
+import { mapState, mapActions } from 'vuex';
33
+import listView from '../../shared/listView.vue';
34 34
 
35 35
 export default {
36
-  name: "PropertyTypeList",
36
+  name: 'PropertyTypeList',
37 37
   components: {
38
-    listView
38
+    listView,
39 39
   },
40 40
   data() {
41 41
     return {
42
-      columns: ["propertyUsageType", "description"]
42
+      columns: ['propertyUsageType', 'description'],
43 43
     };
44 44
   },
45 45
   methods: {
46
-    ...mapActions("propertyTypes", ["getPropertyTypes", "deletePropertyType"]),
46
+    ...mapActions('propertyTypes', ['getPropertyTypes', 'deletePropertyType']),
47 47
     New() {
48
-      this.$router.push("/propertyType/new");
48
+      this.$router.push('/propertyType/new');
49 49
     },
50 50
     Edit(item) {
51 51
       this.$router.push({
52
-        path: `/propertyType/${item.id}`
52
+        path: `/propertyType/${item.id}`,
53 53
       });
54 54
     },
55 55
     Delete(item) {
56 56
       this.deletePropertyType(item.id);
57
-    }
57
+    },
58 58
   },
59 59
   mounted() {
60 60
     this.getPropertyTypes();
61 61
   },
62 62
   computed: {
63
-    ...mapState("propertyTypes", ["propertyTypes"])
64
-  }
63
+    ...mapState('propertyTypes', ['propertyTypes']),
64
+  },
65 65
 };
66 66
 </script>

+ 6
- 6
src/components/admin/property/userDefinedField.vue Bestand weergeven

@@ -68,13 +68,13 @@
68 68
 
69 69
 <script>
70 70
 export default {
71
-  name: "UserField",
71
+  name: 'UserField',
72 72
   props: {
73
-    field: {}
73
+    field: {},
74 74
   },
75 75
   data() {
76 76
     return {
77
-      userField: {}
77
+      userField: {},
78 78
     };
79 79
   },
80 80
   mounted() {
@@ -84,8 +84,8 @@ export default {
84 84
   },
85 85
   methods: {
86 86
     SubmitData() {
87
-      this.$emit("UpdateUserField", this.userField);
88
-    }
89
-  }
87
+      this.$emit('UpdateUserField', this.userField);
88
+    },
89
+  },
90 90
 };
91 91
 </script>

+ 25
- 25
src/components/admin/property/userDefinedGroupPage.vue Bestand weergeven

@@ -124,21 +124,21 @@
124 124
 </template>
125 125
 
126 126
 <script>
127
-import { mapState, mapActions } from "vuex";
128
-import userFields from "./userDefinedField.vue";
129
-import listView from "../../shared/listView.vue";
127
+import { mapState, mapActions } from 'vuex';
128
+import userFields from './userDefinedField.vue';
129
+import listView from '../../shared/listView.vue';
130 130
 
131 131
 export default {
132
-  name: "UserDefinedGroup",
132
+  name: 'UserDefinedGroup',
133 133
   components: {
134 134
     userFields,
135
-    listView
135
+    listView,
136 136
   },
137 137
   data() {
138 138
     return {
139 139
       item: {},
140 140
       showField: false,
141
-      columns: ["fieldName", "fieldType", "rank"]
141
+      columns: ['fieldName', 'fieldType', 'rank'],
142 142
     };
143 143
   },
144 144
   mounted() {
@@ -151,27 +151,27 @@ export default {
151 151
     }
152 152
   },
153 153
   computed: {
154
-    ...mapState("propertyAdmin", ["userDefinedGroup", "userFields", "userField"])
154
+    ...mapState('propertyAdmin', ['userDefinedGroup', 'userFields', 'userField']),
155 155
   },
156 156
   methods: {
157
-    ...mapActions("propertyAdmin", [
158
-      "getUserDefinedGroup",
159
-      "getUserFields",
160
-      "saveUserDefinedGroup",
161
-      "updateUserDefinedGroup",
162
-      "clearUserGroup",
163
-      "clearUserFields",
164
-      "clearUserField",
165
-      "saveUserField",
166
-      "updateUserField",
167
-      "deleteUserField"
157
+    ...mapActions('propertyAdmin', [
158
+      'getUserDefinedGroup',
159
+      'getUserFields',
160
+      'saveUserDefinedGroup',
161
+      'updateUserDefinedGroup',
162
+      'clearUserGroup',
163
+      'clearUserFields',
164
+      'clearUserField',
165
+      'saveUserField',
166
+      'updateUserField',
167
+      'deleteUserField',
168 168
     ]),
169 169
     SubmitData() {
170 170
       this.userDefinedGroup.fields = [];
171 171
       let reload = false;
172 172
       if (this.$route.params.id > 0) {
173 173
         this.updateUserDefinedGroup(this.userDefinedGroup);
174
-        this.userFields.forEach(fieldData => {
174
+        this.userFields.forEach((fieldData) => {
175 175
           if (fieldData.id === 0) {
176 176
             fieldData.groupId = this.userDefinedGroup.id;
177 177
             this.saveUserField(fieldData);
@@ -181,16 +181,16 @@ export default {
181 181
         });
182 182
       } else {
183 183
         reload = true;
184
-        this.userFields.forEach(fieldData => {
184
+        this.userFields.forEach((fieldData) => {
185 185
           this.userDefinedGroup.fields.push({
186 186
             fieldName: fieldData.fieldName,
187 187
             fieldType: fieldData.fieldType,
188
-            rank: fieldData.rank
188
+            rank: fieldData.rank,
189 189
           });
190 190
         });
191 191
         this.saveUserDefinedGroup(this.userDefinedGroup);
192 192
       }
193
-      this.$router.push("/userDefinedGroups/list");
193
+      this.$router.push('/userDefinedGroups/list');
194 194
       // this.$router.push({
195 195
       //   path: '/userDefinedGroups/list',
196 196
       //   query: { reload },
@@ -207,7 +207,7 @@ export default {
207 207
       this.showField = true;
208 208
     },
209 209
     Close() {
210
-      this.$router.push("/userDefinedGroups/list");
210
+      this.$router.push('/userDefinedGroups/list');
211 211
     },
212 212
     UpdateUserField(item) {
213 213
       if (item.id === 0) {
@@ -221,7 +221,7 @@ export default {
221 221
       } else {
222 222
         this.deleteUserField(item.id);
223 223
       }
224
-    }
225
-  }
224
+    },
225
+  },
226 226
 };
227 227
 </script>

+ 10
- 10
src/components/admin/property/userDefinedGroupsPage.vue Bestand weergeven

@@ -32,29 +32,29 @@
32 32
   </div>
33 33
 </template>
34 34
 <script>
35
-import { mapState, mapActions } from "vuex";
36
-import listView from "../../shared/listView.vue";
35
+import { mapState, mapActions } from 'vuex';
36
+import listView from '../../shared/listView.vue';
37 37
 
38 38
 export default {
39
-  name: "UserDefinedGroup",
39
+  name: 'UserDefinedGroup',
40 40
   components: {
41
-    listView
41
+    listView,
42 42
   },
43 43
   data() {
44 44
     return {
45
-      columns: ["description", "propertyUsageType", "rank"]
45
+      columns: ['description', 'propertyUsageType', 'rank'],
46 46
     };
47 47
   },
48 48
   mounted() {
49 49
     this.getUserDefinedGroups();
50 50
   },
51 51
   computed: {
52
-    ...mapState("propertyAdmin", ["userDefinedGroups"])
52
+    ...mapState('propertyAdmin', ['userDefinedGroups']),
53 53
   },
54 54
   methods: {
55
-    ...mapActions("propertyAdmin", ["getUserDefinedGroups", "deleteUserDefinedGroup"]),
55
+    ...mapActions('propertyAdmin', ['getUserDefinedGroups', 'deleteUserDefinedGroup']),
56 56
     New() {
57
-      this.$router.push("/userDefinedGroups/userDefinedGroup");
57
+      this.$router.push('/userDefinedGroups/userDefinedGroup');
58 58
     },
59 59
     Edit(item) {
60 60
       this.$router.push(`/userDefinedGroups/userDefinedGroup/${item.id}`);
@@ -64,7 +64,7 @@ export default {
64 64
         this.userDefinedGroups.pop(item);
65 65
       }
66 66
       this.deleteUserDefinedGroup(item.id);
67
-    }
68
-  }
67
+    },
68
+  },
69 69
 };
70 70
 </script>

+ 25
- 25
src/components/admin/status/agentsUserManagementPage.vue Bestand weergeven

@@ -61,43 +61,43 @@
61 61
 </template>
62 62
 
63 63
 <script>
64
-import { mapState, mapActions } from "vuex";
65
-import axios from "axios";
66
-import Agency from "../../user/registerAgencySection.vue";
67
-import alert from "../../shared/alert.vue";
68
-import ListView from "../../shared/listView.vue";
64
+import { mapState, mapActions } from 'vuex';
65
+import axios from 'axios';
66
+import Agency from '../../user/registerAgencySection.vue';
67
+// import alert from '../../shared/alert.vue';
68
+import ListView from '../../shared/listView.vue';
69 69
 
70 70
 export default {
71
-  name: "agentManagementPage",
71
+  name: 'agentManagementPage',
72 72
   components: {
73 73
     ListView,
74 74
     Agency,
75
-    alert
75
+    // alert,
76 76
   },
77 77
   props: {
78
-    delete: Boolean
78
+    delete: Boolean,
79 79
   },
80 80
   data() {
81 81
     return {
82 82
       columns: [
83
-        "id",
84
-        "name",
85
-        "surname",
86
-        "cellNumber",
87
-        "telephone",
88
-        "email",
89
-        "isDeleted"
83
+        'id',
84
+        'name',
85
+        'surname',
86
+        'cellNumber',
87
+        'telephone',
88
+        'email',
89
+        'isDeleted',
90 90
       ],
91
-      headers: ["", "", "", "", "", "", "", "ResetPwd", "Modify", "Remove"],
92
-      item: {}
91
+      headers: ['', '', '', '', '', '', '', 'ResetPwd', 'Modify', 'Remove'],
92
+      item: {},
93 93
     };
94 94
   },
95 95
   methods: {
96
-    ...mapActions("register", ["getAgents", "deleteAgent"]),
96
+    ...mapActions('register', ['getAgents', 'deleteAgent']),
97 97
     addNewAgent({ commit }) {
98 98
       axios
99
-        .post("/api/agent")
100
-        .then(result => commit("saveAgent", result.data))
99
+        .post('/api/agent')
100
+        .then(result => commit('saveAgent', result.data))
101 101
         .catch(console.error);
102 102
     },
103 103
     routerGoTo(goTo) {
@@ -105,20 +105,20 @@ export default {
105 105
     },
106 106
     Edit(item) {
107 107
       this.$router.push({
108
-        path: "/user/updateProfileInfo",
109
-        query: { id: item.id }
108
+        path: '/user/updateProfileInfo',
109
+        query: { id: item.id },
110 110
       });
111 111
     },
112 112
     Delete(item) {
113 113
       this.deleteAgent(item.id);
114
-    }
114
+    },
115 115
   },
116 116
   mounted() {
117 117
     this.getAgents();
118 118
   },
119 119
   computed: {
120
-    ...mapState("register", ["agents", "removeAgent"])
121
-  }
120
+    ...mapState('register', ['agents', 'removeAgent']),
121
+  },
122 122
 };
123 123
 </script>
124 124
 

+ 1
- 1
src/components/admin/status/tenderWeekAdminPage.vue Bestand weergeven

@@ -34,7 +34,7 @@ export default {
34 34
     this.getItems();
35 35
   },
36 36
   components: {
37
-    ListView
37
+    ListView,
38 38
   },
39 39
   computed: {
40 40
     ...mapState('tenderWeek', ['items']),

+ 1
- 0
src/components/admin/status/timeshareAdminPage.vue Bestand weergeven

@@ -1,5 +1,6 @@
1 1
 /* eslint-disable no-restricted-syntax */
2 2
 /* eslint-disable guard-for-in */
3
+<!-- eslint-disable max-len -->
3 4
 <template>
4 5
   <div>
5 6
     <br />

+ 20
- 20
src/components/admin/status/userManagementPage.vue Bestand weergeven

@@ -43,53 +43,53 @@
43 43
 </template>
44 44
 
45 45
 <script>
46
-import { mapState, mapActions } from "vuex";
47
-import alert from "../../shared/alert.vue";
48
-import ListView from "../../shared/listView.vue";
46
+import { mapState, mapActions } from 'vuex';
47
+// import alert from '../../shared/alert.vue';
48
+import ListView from '../../shared/listView.vue';
49 49
 
50 50
 export default {
51
-  name: "userManagementPage",
51
+  name: 'userManagementPage',
52 52
   components: {
53 53
     ListView,
54
-    alert
54
+    // alert,
55 55
   },
56 56
   data() {
57 57
     return {
58 58
       columns: [
59
-        "id",
60
-        "name",
61
-        "surname",
62
-        "cellNumber",
63
-        "telephone",
64
-        "email",
65
-        "isDeleted"
59
+        'id',
60
+        'name',
61
+        'surname',
62
+        'cellNumber',
63
+        'telephone',
64
+        'email',
65
+        'isDeleted',
66 66
       ],
67
-      headers: ["", "", "", "", "", "", ""],
68
-      item: {}
67
+      headers: ['', '', '', '', '', '', ''],
68
+      item: {},
69 69
     };
70 70
   },
71 71
   props: {},
72 72
   methods: {
73
-    ...mapActions("register", ["getIndividuals", "deleteIndividual"]),
73
+    ...mapActions('register', ['getIndividuals', 'deleteIndividual']),
74 74
     routerGoTo(goTo) {
75 75
       this.$router.push(goTo);
76 76
     },
77 77
     Edit(item) {
78 78
       this.$router.push({
79
-        path: "/user/updateProfileInfo",
80
-        query: { id: item.id }
79
+        path: '/user/updateProfileInfo',
80
+        query: { id: item.id },
81 81
       });
82 82
     },
83 83
     Delete(item) {
84 84
       this.deleteIndividual(item.id);
85
-    }
85
+    },
86 86
   },
87 87
   mounted() {
88 88
     this.getIndividuals();
89 89
   },
90 90
   computed: {
91
-    ...mapState("register", ["individuals", "removeIndividual"])
92
-  }
91
+    ...mapState('register', ['individuals', 'removeIndividual']),
92
+  },
93 93
 };
94 94
 </script>
95 95
 

+ 8
- 7
src/components/admin/unitConfiguration/unitConfigurationPage.vue Bestand weergeven

@@ -1,5 +1,6 @@
1 1
 <template>
2 2
   <div>
3
+    <!-- eslint-disable max-len -->
3 4
     <!-- <section class="intro-single"> -->
4 5
     <div class="container">
5 6
       <br />
@@ -25,23 +26,23 @@
25 26
   </div>
26 27
 </template>
27 28
 <script>
28
-import { mapState, mapActions } from "vuex";
29
-import ListView from "../../shared/listView.vue";
29
+import { mapState, mapActions } from 'vuex';
30
+import ListView from '../../shared/listView.vue';
30 31
 
31 32
 export default {
32
-  name: "UnitConfiguration",
33
+  name: 'UnitConfiguration',
33 34
   components: {
34
-    ListView
35
+    ListView,
35 36
   },
36 37
   created() {
37 38
     this.getUnitConfigurationList();
38 39
   },
39 40
   computed: {
40
-    ...mapState("unitConfiguration", ["unitConfigurationList"])
41
+    ...mapState('unitConfiguration', ['unitConfigurationList']),
41 42
   },
42 43
   methods: {
43
-    ...mapActions("unitConfiguration", ["getUnitConfigurationList"])
44
-  }
44
+    ...mapActions('unitConfiguration', ['getUnitConfigurationList']),
45
+  },
45 46
 };
46 47
 </script>
47 48
 <style></style>

+ 3
- 2
src/components/communication/templateDetail.vue Bestand weergeven

@@ -1,4 +1,5 @@
1 1
 <template>
2
+<!-- eslint-disable max-len -->
2 3
   <div style="padding:10px;">
3 4
     <div
4 5
       class="container"
@@ -215,9 +216,9 @@ export default {
215 216
     ItemList() {
216 217
       return this.item.placeHolders;
217 218
     },
218
-    PlaceHolders(){
219
+    PlaceHolders() {
219 220
       return this.placeHolders;
220
-    }
221
+    },
221 222
   },
222 223
   methods: {
223 224
     ...mapActions('template', ['addItem', 'editItem']),

+ 2
- 2
src/components/communication/templateInnerItem.vue Bestand weergeven

@@ -63,10 +63,10 @@ export default {
63 63
       if (this.item.name === undefined) {
64 64
         msg += 'Please give a name...';
65 65
       }
66
-      if (this.item.class == undefined) {
66
+      if (this.item.class === undefined) {
67 67
         msg += 'Please choose a class...';
68 68
       }
69
-      if (this.item.property == undefined) {
69
+      if (this.item.property === undefined) {
70 70
         msg += 'Please choose a property...';
71 71
       }
72 72
       if (msg.length > 0) {

+ 1
- 0
src/components/communication/templatePage.vue Bestand weergeven

@@ -1,4 +1,5 @@
1 1
 <template>
2
+<!-- eslint-disable max-len -->
2 3
   <div class="container-fluid" style="margin-top:25px;">
3 4
     <div class="row">
4 5
       <div class="col-md-1"></div>

+ 1
- 1
src/components/financial/makePayment.vue Bestand weergeven

@@ -1,3 +1,3 @@
1 1
 <template>
2 2
   <h1>Payment Page</h1>
3
-</template>
3
+</template>

+ 10
- 10
src/components/financial/payments.vue Bestand weergeven

@@ -29,32 +29,32 @@
29 29
 </template>
30 30
 
31 31
 <script>
32
-import { mapState, mapActions } from "vuex";
33
-import listView from "../shared/listView.vue";
34
-import Log from "../../assets/Log";
32
+import { mapState, mapActions } from 'vuex';
33
+import listView from '../shared/listView.vue';
34
+import Log from '../../assets/Log';
35 35
 
36 36
 export default {
37
-  name: "PaymentList",
37
+  name: 'PaymentList',
38 38
   components: {
39
-    listView
39
+    listView,
40 40
   },
41 41
   data() {
42 42
     return {
43
-      userId: Log.getUser().Id
43
+      userId: Log.getUser().Id,
44 44
     };
45 45
   },
46 46
   methods: {
47
-    ...mapActions("Payment", ["getPayments"])
47
+    ...mapActions('Payment', ['getPayments']),
48 48
   },
49 49
   mounted() {
50 50
     this.getProperties(Object.assign(this.user.id));
51 51
   },
52 52
   computed: {
53
-    ...mapState("Payment", ["payments"]),
53
+    ...mapState('Payment', ['payments']),
54 54
     UserChanged() {
55 55
       this.getProperties(Object.assign(this.user.id));
56 56
       return this.user;
57
-    }
58
-  }
57
+    },
58
+  },
59 59
 };
60 60
 </script>

+ 16
- 16
src/components/processFlow/makeOffer.vue Bestand weergeven

@@ -203,32 +203,32 @@
203 203
 </template>
204 204
 
205 205
 <script>
206
-import { mapState, mapActions } from "vuex";
207
-import Log from "../../assets/Log";
206
+import { mapState, mapActions } from 'vuex';
207
+import Log from '../../assets/Log';
208 208
 
209 209
 export default {
210
-  name: "MakeOffer",
210
+  name: 'MakeOffer',
211 211
   props: {
212 212
     isMakeOffer: Boolean,
213 213
     isProperty: Boolean,
214 214
     canEdit: Boolean,
215 215
     item: Object,
216 216
     bidId: Number,
217
-    updateItem: Function
217
+    updateItem: Function,
218 218
   },
219 219
   data() {
220 220
     return {
221 221
       isDecline: false,
222 222
       isSaved: false,
223
-      message: "",
223
+      message: '',
224 224
       isInfo: true,
225
-      isLoggedIn: Log.isLoggedIn()
225
+      isLoggedIn: Log.isLoggedIn(),
226 226
     };
227 227
   },
228 228
   methods: {
229
-    ...mapActions("bid", ["getBid", "saveBid", "acceptBid", "declineBid"]),
229
+    ...mapActions('bid', ['getBid', 'saveBid', 'acceptBid', 'declineBid']),
230 230
     SendOffer() {
231
-      alert("Under Development");
231
+      alert('Under Development');
232 232
       // this.getBid(0);
233 233
       // this.bidItem.id = 0;
234 234
       // this.bidItem.amount = this.item.offer;
@@ -248,7 +248,7 @@ export default {
248 248
     Accept() {
249 249
       this.acceptBid(this.item.id);
250 250
       this.isSaved = true;
251
-      this.message = "Offer Accepted.";
251
+      this.message = 'Offer Accepted.';
252 252
       this.isInfo = true;
253 253
     },
254 254
     Decline() {
@@ -259,23 +259,23 @@ export default {
259 259
 
260 260
       const decline = {
261 261
         id: this.item.id,
262
-        comment: this.item.declineReason
262
+        comment: this.item.declineReason,
263 263
       };
264 264
 
265 265
       this.declineBid(decline);
266 266
       this.isSaved = true;
267
-      this.message = "Offer Declined.";
267
+      this.message = 'Offer Declined.';
268 268
       this.isInfo = false;
269
-    }
269
+    },
270 270
   },
271 271
   computed: {
272
-    ...mapState("bid", ["bidIt,em"])
272
+    ...mapState('bid', ['bidIt,em']),
273 273
   },
274 274
   watch: {
275 275
     item() {
276 276
       this.isSaved = false;
277
-      this.canEdit = this.item.statusCode === "E1";
278
-    }
279
-  }
277
+      this.canEdit = this.item.statusCode === 'E1';
278
+    },
279
+  },
280 280
 };
281 281
 </script>

+ 12
- 12
src/components/processFlow/offers.vue Bestand weergeven

@@ -46,35 +46,35 @@
46 46
 </template>
47 47
 
48 48
 <script>
49
-import { mapState, mapActions } from "vuex";
50
-import makeOffer from "./makeOffer.vue";
51
-import listView from "../shared/listView.vue";
49
+import { mapState, mapActions } from 'vuex';
50
+import makeOffer from './makeOffer.vue';
51
+import listView from '../shared/listView.vue';
52 52
 
53 53
 export default {
54
-  name: "offers",
54
+  name: 'offers',
55 55
   components: { makeOffer, listView },
56 56
   data() {
57 57
     return {
58 58
       item: {},
59
-      columns: ["date", "type", "shortDescription", "status", "price", "offer", "madeBy"],
60
-      formats: ["date", "text", "text", "text", "money", "money", "text"],
61
-      columnHeaders: ["", "", "description", "", "", "offerPrice", "offerBy"]
59
+      columns: ['date', 'type', 'shortDescription', 'status', 'price', 'offer', 'madeBy'],
60
+      formats: ['date', 'text', 'text', 'text', 'money', 'money', 'text'],
61
+      columnHeaders: ['', '', 'description', '', '', 'offerPrice', 'offerBy'],
62 62
     };
63 63
   },
64 64
   methods: {
65
-    ...mapActions("bid", ["getBids"]),
65
+    ...mapActions('bid', ['getBids']),
66 66
     Edit(item) {
67 67
       this.item = item;
68 68
 
69 69
       const element = this.$refs.MyModalForm;
70
-      $(element).modal("show");
71
-    }
70
+      $(element).modal('show');
71
+    },
72 72
   },
73 73
   computed: {
74
-    ...mapState("bid", ["bidItems"])
74
+    ...mapState('bid', ['bidItems']),
75 75
   },
76 76
   mounted() {
77 77
     this.getBids();
78
-  }
78
+  },
79 79
 };
80 80
 </script>

+ 60
- 60
src/components/property/propertyCreate.vue Bestand weergeven

@@ -401,62 +401,62 @@
401 401
 </template>
402 402
 
403 403
 <script>
404
-import { mapState, mapActions } from "vuex";
405
-import { VueEditor } from "vue2-editor";
406
-import UserField from "./propertyUserField.vue";
407
-import ImageLoad from "./propertyImage.vue";
408
-import Log from "../../assets/Log";
404
+import { mapState, mapActions } from 'vuex';
405
+import { VueEditor } from 'vue2-editor';
406
+import UserField from './propertyUserField.vue';
407
+import ImageLoad from './propertyImage.vue';
408
+import Log from '../../assets/Log';
409 409
 
410 410
 export default {
411
-  name: "PropertyCreate",
411
+  name: 'PropertyCreate',
412 412
   components: {
413 413
     UserField,
414 414
     ImageLoad,
415
-    VueEditor
415
+    VueEditor,
416 416
   },
417 417
   data() {
418 418
     return {
419
-      propertyType: "Residential",
420
-      salesType: "Rental",
421
-      selectedProvince: "",
422
-      selectedCity: "",
419
+      propertyType: 'Residential',
420
+      salesType: 'Rental',
421
+      selectedProvince: '',
422
+      selectedCity: '',
423 423
       images: [],
424 424
       propertyFieldValues: [],
425 425
       defaultImage: 0,
426 426
       wait: false,
427 427
       customToolbar: [
428 428
         [{ header: [false, 1, 2, 3, 4, 5, 6] }],
429
-        ["bold", "italic", "underline", "strike"],
430
-        [{ align: "" }, { align: "center" }, { align: "right" }, { align: "justify" }],
431
-        [{ list: "ordered" }, { list: "bullet" }, { list: "check" }],
432
-        [{ script: "sub" }, { script: "super" }],
433
-        [{ indent: "-1" }, { indent: "+1" }]
429
+        ['bold', 'italic', 'underline', 'strike'],
430
+        [{ align: '' }, { align: 'center' }, { align: 'right' }, { align: 'justify' }],
431
+        [{ list: 'ordered' }, { list: 'bullet' }, { list: 'check' }],
432
+        [{ script: 'sub' }, { script: 'super' }],
433
+        [{ indent: '-1' }, { indent: '+1' }],
434 434
       ],
435
-      error: "",
435
+      error: '',
436 436
       showPropertyTypeError: false,
437 437
       showProvinceError: false,
438 438
       showCityError: false,
439 439
       showSuburbError: false,
440 440
       showDateError: false,
441 441
       user: Log.getUser(),
442
-      mayEdit: Log.isLoggedIn()
442
+      mayEdit: Log.isLoggedIn(),
443 443
     };
444 444
   },
445 445
   methods: {
446
-    ...mapActions("searchTab", ["getProvince", "getCities", "getSuburbs"]),
447
-    ...mapActions("property", [
448
-      "getPropertyTypes",
449
-      "getPropertyOverviewFields",
450
-      "getPropertyFields",
451
-      "saveProperty",
452
-      "getProperty",
453
-      "getPropertyImages",
454
-      "clearProperty",
455
-      "clearPropertyImages",
456
-      "getPropertyEditDisplay",
457
-      "getPropertySavedOverviewFields",
458
-      "getPropertySavedFields",
459
-      "getSavedPropertyData"
446
+    ...mapActions('searchTab', ['getProvince', 'getCities', 'getSuburbs']),
447
+    ...mapActions('property', [
448
+      'getPropertyTypes',
449
+      'getPropertyOverviewFields',
450
+      'getPropertyFields',
451
+      'saveProperty',
452
+      'getProperty',
453
+      'getPropertyImages',
454
+      'clearProperty',
455
+      'clearPropertyImages',
456
+      'getPropertyEditDisplay',
457
+      'getPropertySavedOverviewFields',
458
+      'getPropertySavedFields',
459
+      'getSavedPropertyData',
460 460
     ]),
461 461
     TypeChanged() {
462 462
       this.property.propertyUsageType = this.propertyType;
@@ -475,22 +475,22 @@ export default {
475 475
         this.showSuburbError = true;
476 476
       }
477 477
 
478
-      if (this.salesType === "Rental" && this.property.dateAvailable === "undef") {
478
+      if (this.salesType === 'Rental' && this.property.dateAvailable === 'undef') {
479 479
         this.showDateError = true;
480 480
       }
481 481
 
482 482
       if (
483
-        this.showPropertyTypeError ||
484
-        this.showProvinceError ||
485
-        this.showCityError ||
486
-        this.showSuburbError ||
487
-        this.showDateError
483
+        this.showPropertyTypeError
484
+        || this.showProvinceError
485
+        || this.showCityError
486
+        || this.showSuburbError
487
+        || this.showDateError
488 488
       ) {
489 489
         return;
490 490
       }
491 491
 
492 492
       this.wait = true;
493
-      if (this.salesType === "Sale") {
493
+      if (this.salesType === 'Sale') {
494 494
         this.property.isSale = true;
495 495
         this.property.dateAvailable = new Date();
496 496
       }
@@ -502,7 +502,7 @@ export default {
502 502
         }
503 503
         this.property.propertyImages.push({
504 504
           image: this.images[i],
505
-          isDefault: setAsDefault
505
+          isDefault: setAsDefault,
506 506
         });
507 507
       }
508 508
       this.property.propertyUserFields = this.propertyFieldValues;
@@ -512,18 +512,18 @@ export default {
512 512
       }
513 513
 
514 514
       this.saveProperty(this.property)
515
-        .then(fulfilled => {
515
+        .then((fulfilled) => {
516 516
           this.$router.push(`/property/property/${fulfilled.data.id}`);
517 517
         })
518
-        .catch(error => {
518
+        .catch((error) => {
519 519
           console.log(error.message);
520 520
         });
521 521
     },
522 522
     Close() {
523
-      this.$router.push("/property/admin/list/my");
523
+      this.$router.push('/property/admin/list/my');
524 524
     },
525 525
     Login() {
526
-      this.$router.push("/user/login");
526
+      this.$router.push('/user/login');
527 527
     },
528 528
     PropertyTypeSelected(item) {
529 529
       if (item.target.options.selectedIndex > 0) {
@@ -545,7 +545,7 @@ export default {
545 545
       if (item.target.options.selectedIndex > 0) {
546 546
         this.selectedCity = this.cities[item.target.options.selectedIndex - 1].description;
547 547
         this.getSuburbs(
548
-          Object.assign({}, { province: this.selectedProvince, city: this.selectedCity })
548
+          Object.assign({}, { province: this.selectedProvince, city: this.selectedCity }),
549 549
         );
550 550
         this.showCityError = false;
551 551
       } else {
@@ -565,7 +565,7 @@ export default {
565 565
     },
566 566
     UpdateUserDefinedFields(item) {
567 567
       let update = false;
568
-      this.propertyFieldValues.forEach(element => {
568
+      this.propertyFieldValues.forEach((element) => {
569 569
         if (element.userDefinedFieldId === item.userDefinedFieldId) {
570 570
           element.value = item.value;
571 571
           update = true;
@@ -577,7 +577,7 @@ export default {
577 577
     },
578 578
     UpdateDefaultImage(item) {
579 579
       this.defaultImage = item;
580
-    }
580
+    },
581 581
   },
582 582
   mounted() {
583 583
     this.wait = false;
@@ -592,8 +592,8 @@ export default {
592 592
     if (this.propertyFields.length > 0) {
593 593
       this.propertyFields = [];
594 594
     }
595
-    if (this.property.description !== "") {
596
-      this.property.description = "";
595
+    if (this.property.description !== '') {
596
+      this.property.description = '';
597 597
     }
598 598
 
599 599
     if (this.$route.params.propertyUsageType) {
@@ -608,15 +608,15 @@ export default {
608 608
     this.getPropertyFields(this.propertyType);
609 609
   },
610 610
   computed: {
611
-    ...mapState("searchTab", ["provinces", "cities", "suburbs"]),
612
-    ...mapState("property", [
613
-      "propertyTypes",
614
-      "propertyOverviewFields",
615
-      "propertyFields",
616
-      "property",
617
-      "propertyImages"
611
+    ...mapState('searchTab', ['provinces', 'cities', 'suburbs']),
612
+    ...mapState('property', [
613
+      'propertyTypes',
614
+      'propertyOverviewFields',
615
+      'propertyFields',
616
+      'property',
617
+      'propertyImages',
618 618
     ]),
619
-    ...mapState("authentication", ["user"]),
619
+    ...mapState('authentication', ['user']),
620 620
     SalesTypeChanged() {
621 621
       // eslint-disable-next-line vue/no-side-effects-in-computed-properties
622 622
       // this.propertyType = this.$route.params.propType;
@@ -634,12 +634,12 @@ export default {
634 634
       this.getPropertyTypes(this.propertyType);
635 635
 
636 636
       return this.propertyType;
637
-    }
637
+    },
638 638
   },
639 639
   watch: {
640 640
     SalesTypeChanged() {
641 641
       return null;
642
-    }
643
-  }
642
+    },
643
+  },
644 644
 };
645 645
 </script>

+ 28
- 28
src/components/property/propertyList.vue Bestand weergeven

@@ -35,43 +35,43 @@
35 35
 </template>
36 36
 
37 37
 <script>
38
-import { mapState, mapActions } from "vuex";
39
-import listView from "../shared/listView.vue";
40
-import Log from "../../assets/Log";
38
+import { mapState, mapActions } from 'vuex';
39
+import listView from '../shared/listView.vue';
40
+import Log from '../../assets/Log';
41 41
 
42 42
 export default {
43
-  name: "PropertyList",
43
+  name: 'PropertyList',
44 44
   components: {
45
-    listView
45
+    listView,
46 46
   },
47 47
   data() {
48 48
     return {
49
-      propertyType: "",
50
-      role: "MY",
49
+      propertyType: '',
50
+      role: 'MY',
51 51
       user: Log.getUser(),
52 52
       columns: [
53
-        "name",
54
-        "id",
55
-        "dateAvailable",
56
-        "size",
57
-        "price",
58
-        "usageType",
59
-        "type",
60
-        "saleType",
61
-        "publish",
62
-        "status"
53
+        'name',
54
+        'id',
55
+        'dateAvailable',
56
+        'size',
57
+        'price',
58
+        'usageType',
59
+        'type',
60
+        'saleType',
61
+        'publish',
62
+        'status',
63 63
       ],
64
-      formats: ["text", "text", "date", "text", "money", "text", "text", "text", "text", "text"],
65
-      headers: ["", "", "Available From", "", "", "", "Property Type", "", "", ""]
64
+      formats: ['text', 'text', 'date', 'text', 'money', 'text', 'text', 'text', 'text', 'text'],
65
+      headers: ['', '', 'Available From', '', '', '', 'Property Type', '', '', ''],
66 66
     };
67 67
   },
68 68
   methods: {
69
-    ...mapActions("propertyList", ["getProperties", "deleteProperty", "publishProperty"]),
69
+    ...mapActions('propertyList', ['getProperties', 'deleteProperty', 'publishProperty']),
70 70
     Edit(item) {
71
-      const salesType = item.isSale ? "Sale" : "Rental";
71
+      const salesType = item.isSale ? 'Sale' : 'Rental';
72 72
       this.$router.push({
73
-        path: "/property/edit",
74
-        query: { id: item.id }
73
+        path: '/property/edit',
74
+        query: { id: item.id },
75 75
       });
76 76
     },
77 77
     Delete(item) {
@@ -79,22 +79,22 @@ export default {
79 79
     },
80 80
     Publish(item) {
81 81
       this.publishProperty(item);
82
-    }
82
+    },
83 83
   },
84 84
   mounted() {
85 85
     this.getProperties(Object.assign(this.user.id));
86 86
   },
87 87
   computed: {
88
-    ...mapState("propertyList", ["properties"]),
88
+    ...mapState('propertyList', ['properties']),
89 89
     UserChanged() {
90 90
       this.getProperties(Object.assign(this.user.id));
91 91
       return this.user;
92
-    }
92
+    },
93 93
   },
94 94
   watch: {
95 95
     UserChanged() {
96 96
       console.log(this.user);
97
-    }
98
-  }
97
+    },
98
+  },
99 99
 };
100 100
 </script>

+ 18
- 18
src/components/property/propertyPage.vue Bestand weergeven

@@ -283,20 +283,20 @@
283 283
 </template>
284 284
 
285 285
 <script>
286
-import { mapState, mapActions } from "vuex";
287
-import makeOffer from "../processFlow/makeOffer.vue";
288
-import gallery from "../shared/gallerySlideShow.vue";
286
+import { mapState, mapActions } from 'vuex';
287
+import makeOffer from '../processFlow/makeOffer.vue';
288
+import gallery from '../shared/gallerySlideShow.vue';
289 289
 
290 290
 export default {
291
-  name: "property",
291
+  name: 'property',
292 292
   components: {
293 293
     makeOffer,
294
-    gallery
294
+    gallery,
295 295
   },
296 296
   data() {
297 297
     return {
298 298
       index: null,
299
-      date: new Date()
299
+      date: new Date(),
300 300
     };
301 301
   },
302 302
   mounted() {
@@ -305,30 +305,30 @@ export default {
305 305
     this.mayEditProperty(this.$route.params.id);
306 306
   },
307 307
   computed: {
308
-    ...mapState("property", ["property", "propertyImages"]),
309
-    ...mapState("propertyEdit", ["mayEdit"])
308
+    ...mapState('property', ['property', 'propertyImages']),
309
+    ...mapState('propertyEdit', ['mayEdit']),
310 310
   },
311 311
   methods: {
312
-    ...mapActions("property", [
313
-      "getProperty",
314
-      "getPropertyImages",
315
-      "clearPropertyImages"
312
+    ...mapActions('property', [
313
+      'getProperty',
314
+      'getPropertyImages',
315
+      'clearPropertyImages',
316 316
     ]),
317
-    ...mapActions("propertyEdit", ["mayEditProperty"]),
317
+    ...mapActions('propertyEdit', ['mayEditProperty']),
318 318
     formatPrice(value) {
319 319
       const val = (value / 1).toFixed(2);
320
-      return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");
320
+      return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
321 321
     },
322 322
     formatAddress(value) {
323
-      if (value !== "") {
323
+      if (value !== '') {
324 324
         return `${value}<br/>`;
325 325
       }
326
-      return "";
327
-    }
326
+      return '';
327
+    },
328 328
   },
329 329
   beforeDestroy() {
330 330
     this.clearPropertyImages();
331
-  }
331
+  },
332 332
 };
333 333
 </script>
334 334
 

+ 13
- 13
src/components/property/propertySearchPage.vue Bestand weergeven

@@ -150,26 +150,26 @@
150 150
   </div>
151 151
 </template>
152 152
 <script>
153
-import { mapState, mapActions } from "vuex";
154
-import autoComplete from "../shared/autoComplete.vue";
153
+import { mapState, mapActions } from 'vuex';
154
+import autoComplete from '../shared/autoComplete.vue';
155 155
 
156 156
 export default {
157
-  name: "propertysearch",
157
+  name: 'propertysearch',
158 158
   components: {
159
-    autoComplete
159
+    autoComplete,
160 160
   },
161 161
   data() {
162 162
     return {
163
-      propertyUsageType: "Residential",
164
-      salesType: "Sale",
165
-      searchText: ""
163
+      propertyUsageType: 'Residential',
164
+      salesType: 'Sale',
165
+      searchText: '',
166 166
     };
167 167
   },
168 168
   computed: {
169
-    ...mapState("propertySearch", ["suburbs", "suburbList", "propertySearch"])
169
+    ...mapState('propertySearch', ['suburbs', 'suburbList', 'propertySearch']),
170 170
   },
171 171
   methods: {
172
-    ...mapActions("propertySearch", ["getSuburbs", "applyFilter"]),
172
+    ...mapActions('propertySearch', ['getSuburbs', 'applyFilter']),
173 173
     SetType(item) {
174 174
       this.propertyUsageType = item;
175 175
       localStorage.propertySearchUsageType = item;
@@ -182,7 +182,7 @@ export default {
182 182
       this.propertySearch.propertyUsageType = this.propertyUsageType;
183 183
       this.propertySearch.salesType = this.salesType;
184 184
 
185
-      this.$router.push("/property/propertySearch/results");
185
+      this.$router.push('/property/propertySearch/results');
186 186
     },
187 187
     Filter() {
188 188
       this.applyFilter(this.searchText);
@@ -192,7 +192,7 @@ export default {
192 192
     },
193 193
     SelectedFilter(item) {
194 194
       this.searchText = item;
195
-    }
195
+    },
196 196
   },
197 197
   mounted() {
198 198
     this.getSuburbs();
@@ -201,8 +201,8 @@ export default {
201 201
     } else if (localStorage.propertySearchUsageType) {
202 202
       this.propertyUsageType = localStorage.propertySearchUsageType;
203 203
     } else {
204
-      this.propertyUsageType = "Residential";
204
+      this.propertyUsageType = 'Residential';
205 205
     }
206
-  }
206
+  },
207 207
 };
208 208
 </script>

+ 19
- 19
src/components/property/propertySearchResults.vue Bestand weergeven

@@ -57,20 +57,20 @@
57 57
   </div>
58 58
 </template>
59 59
 <script>
60
-import { mapState, mapActions } from "vuex";
61
-import propertyCard from "./propertyCard.vue";
60
+import { mapState, mapActions } from 'vuex';
61
+import propertyCard from './propertyCard.vue';
62 62
 
63 63
 export default {
64
-  name: "propertysearch",
64
+  name: 'propertysearch',
65 65
   components: {
66
-    propertyCard
66
+    propertyCard,
67 67
   },
68 68
   data() {
69 69
     return {};
70 70
   },
71 71
   mounted() {
72
-    if (typeof this.propertySearch.propertyUsageType === "undefined") {
73
-      this.propertySearch.propertyUsageType = "Residential";
72
+    if (typeof this.propertySearch.propertyUsageType === 'undefined') {
73
+      this.propertySearch.propertyUsageType = 'Residential';
74 74
     }
75 75
     if (this.user) {
76 76
       this.propertySearch.userName = this.user.username;
@@ -79,36 +79,36 @@ export default {
79 79
     this.searchProperties(this.propertySearch);
80 80
   },
81 81
   methods: {
82
-    ...mapActions("propertySearch", [
83
-      "searchProperties",
84
-      "clearProperties",
85
-      "updateResultsShowing"
82
+    ...mapActions('propertySearch', [
83
+      'searchProperties',
84
+      'clearProperties',
85
+      'updateResultsShowing',
86 86
     ]),
87 87
     SetType(item) {
88 88
       this.propertySearch.propertyUsageType = item;
89 89
     },
90 90
     SearchPage() {
91 91
       this.clearProperties();
92
-      this.$router.push("/property/search");
93
-    }
92
+      this.$router.push('/property/search');
93
+    },
94 94
   },
95 95
   computed: {
96
-    ...mapState("propertySearch", ["properties", "propertySearch", "resultsShowing"]),
97
-    ...mapState("authentication", ["user"]),
96
+    ...mapState('propertySearch', ['properties', 'propertySearch', 'resultsShowing']),
97
+    ...mapState('authentication', ['user']),
98 98
     ParamsChanged() {
99 99
       console.log(JSON.stringify(this.propertySearch));
100
-      if (typeof this.propertySearch.propertyUsageType === "undefined") {
100
+      if (typeof this.propertySearch.propertyUsageType === 'undefined') {
101 101
         // eslint-disable-next-line vue/no-side-effects-in-computed-properties
102
-        this.propertySearch.propertyUsageType = "Residential";
102
+        this.propertySearch.propertyUsageType = 'Residential';
103 103
       }
104 104
       this.searchProperties(this.propertySearch);
105 105
       return null;
106
-    }
106
+    },
107 107
   },
108 108
   watch: {
109 109
     ParamsChanged() {
110 110
       return null;
111
-    }
112
-  }
111
+    },
112
+  },
113 113
 };
114 114
 </script>

+ 1
- 1
src/components/property/propertyeditPage.vue Bestand weergeven

@@ -421,7 +421,7 @@ export default {
421 421
     UpdateValue(item) {
422 422
       if (item.isUDF) {
423 423
         if (item.isPropOverview) {
424
-          this.propertyOverviewFields[0].fields[item.arrayIndex].value =            item.value;
424
+          this.propertyOverviewFields[0].fields[item.arrayIndex].value = item.value;
425 425
         } else if (item.isPropOverview === false) {
426 426
           this.propertyFields[item.arrayIndex].fields[
427 427
             item.arrayItemIndex

+ 6
- 6
src/components/shared/checkItem.vue Bestand weergeven

@@ -12,19 +12,19 @@ export default {
12 12
   props: {
13 13
     title: undefined,
14 14
     show: {
15
-      default: false
16
-    }
15
+      default: false,
16
+    },
17 17
   },
18 18
   methods: {
19 19
     checkItem() {
20
-      this.$emit("checkItem", this.title, !this.show);
21
-    }
20
+      this.$emit('checkItem', this.title, !this.show);
21
+    },
22 22
   },
23 23
   computed: {
24 24
     Show() {
25 25
       return this.show;
26
-    }
27
-  }
26
+    },
27
+  },
28 28
 };
29 29
 </script>
30 30
 <style>

+ 2
- 1
src/components/shared/gallerySlideShow.vue Bestand weergeven

@@ -1,5 +1,6 @@
1 1
 // Source: https://github.com/KitchenStories/vue-gallery-slideshow
2 2
 <template>
3
+<!-- eslint-disable max-len -->
3 4
   <transition name="modal">
4 5
     <div v-if="imgIndex !== null" class="vgs" @click="close">
5 6
       <button type="button" class="vgs__close" @click="close">&times;</button>
@@ -130,7 +131,7 @@ export default {
130 131
       const galleryWidth = this.$refs.gallery.clientWidth;
131 132
       const currThumbsWidth = this.imgIndex * this.thumbnailWidth;
132 133
       const maxThumbsWidth = this.images.length * this.thumbnailWidth;
133
-      const centerPos =        Math.floor(galleryWidth / (this.thumbnailWidth * 2))
134
+      const centerPos = Math.floor(galleryWidth / (this.thumbnailWidth * 2))
134 135
         * this.thumbnailWidth;
135 136
 
136 137
       // Prevent scrolling of images if not needed

+ 9
- 9
src/components/shared/lightBoxGallery.vue Bestand weergeven

@@ -45,31 +45,31 @@ export default {
45 45
     return {
46 46
       bg: false,
47 47
       currentImage: 0,
48
-      count: true
48
+      count: true,
49 49
     };
50 50
   },
51 51
   props: {
52 52
     thumbnails: {
53 53
       type: Array,
54
-      default: () => []
54
+      default: () => [],
55 55
     },
56 56
     largeImages: {
57 57
       type: Array,
58
-      default: () => []
58
+      default: () => [],
59 59
     },
60 60
     captions: {
61 61
       type: Array,
62
-      default: () => []
62
+      default: () => [],
63 63
     },
64 64
     thumbnailsPath: {
65 65
       type: String,
66
-      default: ""
66
+      default: '',
67 67
     },
68 68
     largePath: {
69 69
       type: String,
70
-      default: ""
70
+      default: '',
71 71
     },
72
-    caption: true
72
+    caption: true,
73 73
   },
74 74
   methods: {
75 75
     lightboxEffect(curr) {
@@ -91,8 +91,8 @@ export default {
91 91
       } else {
92 92
         this.currentImage = this.largeImages.length - 1;
93 93
       }
94
-    }
95
-  }
94
+    },
95
+  },
96 96
 };
97 97
 </script>
98 98
 

+ 61
- 63
src/components/shared/listView.vue Bestand weergeven

@@ -174,17 +174,17 @@
174 174
 </template>
175 175
 
176 176
 <script>
177
-import _ from "lodash";
178
-import ItemsPerPageList from "../../assets/staticData/itemsPerPage";
179
-import BasePagination from "./basePagination.vue";
180
-import Alert from "./alert.vue";
181
-import ListViewControl from "./listViewControl.vue";
177
+import _ from 'lodash';
178
+import ItemsPerPageList from '../../assets/staticData/itemsPerPage';
179
+import BasePagination from './basePagination.vue';
180
+import Alert from './alert.vue';
181
+import ListViewControl from './listViewControl.vue';
182 182
 
183 183
 export default {
184 184
   components: {
185 185
     BasePagination,
186 186
     Alert,
187
-    ListViewControl
187
+    ListViewControl,
188 188
   },
189 189
   mounted() {
190 190
     try {
@@ -200,92 +200,92 @@ export default {
200 200
   },
201 201
   props: {
202 202
     compact: {
203
-      default: true
203
+      default: true,
204 204
     },
205 205
     allowSelect: {
206
-      default: true
206
+      default: true,
207 207
     },
208 208
     allowMultipleSelect: {
209
-      default: false
209
+      default: false,
210 210
     },
211 211
     hideSearch: {
212
-      default: false
212
+      default: false,
213 213
     },
214 214
     showNew: {
215
-      default: true
215
+      default: true,
216 216
     },
217 217
     items: undefined,
218 218
     editable: {
219
-      default: false
219
+      default: false,
220 220
     },
221 221
     deleteable: {
222
-      default: false
222
+      default: false,
223 223
     },
224 224
     columnCount: {
225
-      default: 6
225
+      default: 6,
226 226
     },
227 227
     showPager: {
228
-      default: true
228
+      default: true,
229 229
     },
230 230
     title: {
231
-      default: undefined
231
+      default: undefined,
232 232
     },
233 233
     sortKey: {
234
-      default: "id"
234
+      default: 'id',
235 235
     },
236 236
     hideItemCount: {
237
-      default: false
237
+      default: false,
238 238
     },
239 239
     currentPage: {
240
-      default: 1
240
+      default: 1,
241 241
     },
242 242
     bordered: {
243
-      default: true
243
+      default: true,
244 244
     },
245 245
     striped: {
246
-      default: true
246
+      default: true,
247 247
     },
248 248
     showColumnChooser: {
249
-      default: true
249
+      default: true,
250 250
     },
251 251
     displayColumns: {
252
-      default: []
252
+      default: [],
253 253
     },
254 254
     displayFormats: {
255
-      default: []
255
+      default: [],
256 256
     },
257 257
     displayHeaders: {
258
-      default: []
258
+      default: [],
259 259
     },
260 260
     showCustomAction: {
261
-      default: false
261
+      default: false,
262 262
     },
263 263
     CustomActionHeading: {
264
-      default: ""
264
+      default: '',
265 265
     },
266 266
     CustomActionCondition: {
267
-      default: ""
268
-    }
267
+      default: '',
268
+    },
269 269
   },
270 270
   data() {
271 271
     return {
272 272
       hover: -1,
273 273
       selectedItems: [],
274 274
       showControl: false,
275
-      sortKey: "",
275
+      sortKey: '',
276 276
       reverse: false,
277
-      searchItem: "",
277
+      searchItem: '',
278 278
       visibleItemsPerPageCount: 20,
279 279
       itemsPerPageList: ItemsPerPageList,
280 280
       visibleColumn: [],
281
-      allColumn: []
281
+      allColumn: [],
282 282
     };
283 283
   },
284 284
   methods: {
285 285
     checkItem(column, show) {
286 286
       const list = [];
287
-      for (var i in this.allColumn) {
288
-        let item = this.allColumn[i];
287
+      for (const i in this.allColumn) {
288
+        const item = this.allColumn[i];
289 289
         if (item && item.column === column) {
290 290
           item.show = show;
291 291
         }
@@ -302,11 +302,12 @@ export default {
302 302
           for (const o in Object.keys(item)) {
303 303
             if (!listAll.includes(Object.keys(item)[o]) && !Array.isArray(Object.values(item)[o])) {
304 304
               const columnName = Object.keys(item)[o];
305
-              if (!listAll.some(x => x.column === columnName))
305
+              if (!listAll.some(x => x.column === columnName)) {
306 306
                 listAll.push({
307 307
                   column: columnName,
308
-                  show: _.filter(listAll, x => x.show).length < this.columnCount
308
+                  show: _.filter(listAll, x => x.show).length < this.columnCount,
309 309
                 });
310
+              }
310 311
             }
311 312
           }
312 313
         }
@@ -315,14 +316,14 @@ export default {
315 316
     },
316 317
     onClearSelected() {
317 318
       this.selectedItems = [];
318
-      this.$emit("onClearSelected");
319
+      this.$emit('onClearSelected');
319 320
     },
320 321
     isSelected(i) {
321 322
       const ind = this.getActualIndex(i);
322 323
       return _.some(this.selectedItems, x => x === ind);
323 324
     },
324 325
     onNew() {
325
-      this.$emit("onNew");
326
+      this.$emit('onNew');
326 327
     },
327 328
     isObject(item) {
328 329
       return !!item && item.constructor === Object;
@@ -331,7 +332,7 @@ export default {
331 332
       return !!item && item.constructor === Date;
332 333
     },
333 334
     isDecimal(item) {
334
-      if (!!item && item.constructor === Number && item.indexOf(".") > 0) {
335
+      if (!!item && item.constructor === Number && item.indexOf('.') > 0) {
335 336
         return true;
336 337
       }
337 338
       return false;
@@ -341,17 +342,17 @@ export default {
341 342
         !!item &&
342 343
         item.constructor === String &&
343 344
         item.length > 9 &&
344
-        item.substring(0, 9) === "data:image"
345
+        item.substring(0, 9) === 'data:image'
345 346
       );
346 347
     },
347 348
     onEdit(item) {
348
-      this.$emit("onEdit", item);
349
+      this.$emit('onEdit', item);
349 350
     },
350 351
     onDelete(item) {
351
-      this.$emit("onDelete", item);
352
+      this.$emit('onDelete', item);
352 353
     },
353 354
     onCustomClick(item) {
354
-      this.$emit("onCustomClick", item);
355
+      this.$emit('onCustomClick', item);
355 356
     },
356 357
     onRowClick(item, i) {
357 358
       const ind = this.getActualIndex(i);
@@ -363,7 +364,7 @@ export default {
363 364
         }
364 365
         this.selectedItems.push(ind);
365 366
       }
366
-      this.$emit("onRowClick", this.selectedItems);
367
+      this.$emit('onRowClick', this.selectedItems);
367 368
     },
368 369
     getActualIndex(index) {
369 370
       return (this.currentPage - 1) * this.visibleItemsPerPageCount + index;
@@ -388,10 +389,10 @@ export default {
388 389
     async pageChangeHandle(value) {
389 390
       console.log(value);
390 391
       switch (value) {
391
-        case "next":
392
+        case 'next':
392 393
           this.currentPage += 1;
393 394
           break;
394
-        case "previous":
395
+        case 'previous':
395 396
           this.currentPage -= 1;
396 397
           break;
397 398
         default:
@@ -403,23 +404,23 @@ export default {
403 404
         this.currentPage = 1;
404 405
       }
405 406
     },
406
-    inArray: function(array, value) {
407
-      var lenght = array.length;
408
-      for (var i = 0; i < lenght; i++) {
407
+    inArray(array, value) {
408
+      const lenght = array.length;
409
+      for (let i = 0; i < lenght; i++) {
409 410
         if (array[i] === value) return true;
410 411
       }
411 412
       return false;
412
-    }
413
+    },
413 414
   },
414 415
   computed: {
415 416
     ListWidth() {
416 417
       if (this.showControl) {
417
-        return "col-md-9";
418
+        return 'col-md-9';
418 419
       }
419
-      return "col-md-12";
420
+      return 'col-md-12';
420 421
     },
421 422
     SortDirection() {
422
-      return this.reverse ? "desc" : "asc";
423
+      return this.reverse ? 'desc' : 'asc';
423 424
     },
424 425
     PageCount() {
425 426
       return this.visibleItemsPerPageCount !== 0
@@ -453,14 +454,11 @@ export default {
453 454
       return list;
454 455
     },
455 456
     FilteredItems() {
456
-      const list = _.filter(this.items, item =>
457
-        Object.values(item).some(
458
-          i =>
459
-            JSON.stringify(i)
460
-              .toLowerCase()
461
-              .indexOf(this.searchItem.toLowerCase()) > -1
462
-        )
463
-      );
457
+      const list = _.filter(this.items, item => Object.values(item).some(
458
+        i => JSON.stringify(i)
459
+          .toLowerCase()
460
+          .indexOf(this.searchItem.toLowerCase()) > -1,
461
+      ));
464 462
       return _.orderBy(list, this.sortKey, this.SortDirection);
465 463
     },
466 464
     DisplayItems() {
@@ -472,8 +470,8 @@ export default {
472 470
       }
473 471
       return list.slice(startSlice, endSlice);
474 472
     },
475
-    GetAllColumn() {}
476
-  }
473
+    GetAllColumn() {},
474
+  },
477 475
 };
478 476
 </script>
479 477
 <style scoped>

+ 7
- 7
src/components/shared/listViewControl.vue Bestand weergeven

@@ -14,19 +14,19 @@
14 14
   </div>
15 15
 </template>
16 16
 <script>
17
-import CheckItem from "./checkItem.vue";
17
+import CheckItem from './checkItem.vue';
18 18
 
19 19
 export default {
20 20
   components: {
21
-    CheckItem
21
+    CheckItem,
22 22
   },
23 23
   data() {
24 24
     return {
25
-      searchItem: undefined
25
+      searchItem: undefined,
26 26
     };
27 27
   },
28 28
   props: {
29
-    items: undefined
29
+    items: undefined,
30 30
   },
31 31
   methods: {
32 32
     isInSelected(i) {
@@ -38,10 +38,10 @@ export default {
38 38
       return false;
39 39
     },
40 40
     checkItem(column, show) {
41
-      this.$emit("checkItem", column, show);
42
-    }
41
+      this.$emit('checkItem', column, show);
42
+    },
43 43
   },
44
-  computed: {}
44
+  computed: {},
45 45
 };
46 46
 </script>
47 47
 <style>

+ 13
- 13
src/components/shared/navBar.vue Bestand weergeven

@@ -214,17 +214,17 @@
214 214
 </template>
215 215
 
216 216
 <script>
217
-import { mapState, mapActions } from "vuex";
218
-import Log from "../../assets/Log";
217
+import { mapState, mapActions } from 'vuex';
218
+import Log from '../../assets/Log';
219 219
 
220 220
 export default {
221 221
   computed: {
222
-    ...mapState("authentication", [
223
-      "user",
224
-      "flag",
225
-      "status",
226
-      "person",
227
-      "token"
222
+    ...mapState('authentication', [
223
+      'user',
224
+      'flag',
225
+      'status',
226
+      'person',
227
+      'token',
228 228
     ]),
229 229
     isLoggedIn() {
230 230
       console.log(Log.isLoggedIn());
@@ -236,15 +236,15 @@ export default {
236 236
     // eslint-disable-next-line vue/return-in-computed-property
237 237
     Logout() {
238 238
       return this.logout();
239
-    }
239
+    },
240 240
   },
241 241
   methods: {
242
-    ...mapActions("authentication", ["logout"]),
242
+    ...mapActions('authentication', ['logout']),
243 243
 
244 244
     routerGoTo(goTo) {
245
-      this.$emit("routerGoTo", goTo);
246
-    }
247
-  }
245
+      this.$emit('routerGoTo', goTo);
246
+    },
247
+  },
248 248
 };
249 249
 </script>
250 250
 <style scoped>

+ 18
- 18
src/components/shared/searchTab.vue Bestand weergeven

@@ -87,54 +87,54 @@
87 87
 </template>
88 88
 
89 89
 <script>
90
-import { mapState } from "vuex";
91
-import propertySearch from "../property/propertySearchFields.vue";
92
-import timeshareSearch from "../timeshare/searchTimeshare.vue";
90
+import { mapState } from 'vuex';
91
+import propertySearch from '../property/propertySearchFields.vue';
92
+import timeshareSearch from '../timeshare/searchTimeshare.vue';
93 93
 
94 94
 export default {
95 95
   components: {
96 96
     propertySearch,
97
-    timeshareSearch
97
+    timeshareSearch,
98 98
   },
99 99
   data() {
100 100
     return {
101
-      selectedPropertyType: "Timeshare",
102
-      keyword: ""
101
+      selectedPropertyType: 'Timeshare',
102
+      keyword: '',
103 103
     };
104 104
   },
105 105
   computed: {
106
-    ...mapState("weekList", ["filter"]),
107
-    ...mapState("propertySearch", ["propertySearch"])
106
+    ...mapState('weekList', ['filter']),
107
+    ...mapState('propertySearch', ['propertySearch']),
108 108
   },
109 109
   methods: {
110 110
     updateType(item) {
111 111
       this.selectedPropertyType = item;
112 112
     },
113 113
     Search() {
114
-      if (this.selectedPropertyType === "Timeshare") {
115
-        this.$router.push("/timesharesearch");
114
+      if (this.selectedPropertyType === 'Timeshare') {
115
+        this.$router.push('/timesharesearch');
116 116
       } else {
117 117
         this.propertySearch.keyword = this.keyword;
118
-        this.$router.push("/property/propertySearch/results");
118
+        this.$router.push('/property/propertySearch/results');
119 119
       }
120 120
     },
121 121
     setTypeTimeshare() {
122
-      this.selectedPropertyType = "Timeshare";
122
+      this.selectedPropertyType = 'Timeshare';
123 123
     },
124 124
     setTypeResidential() {
125
-      this.selectedPropertyType = "Residential";
125
+      this.selectedPropertyType = 'Residential';
126 126
     },
127 127
     setTypeCommercial() {
128
-      this.selectedPropertyType = "Commercial";
128
+      this.selectedPropertyType = 'Commercial';
129 129
     },
130 130
     clearKeyword() {
131
-      this.keyword = "";
131
+      this.keyword = '';
132 132
     },
133 133
     keywordChanged() {
134
-      if (this.selectedPropertyType !== "Timeshare") {
134
+      if (this.selectedPropertyType !== 'Timeshare') {
135 135
         this.propertySearch.keyword = this.keyword;
136 136
       }
137
-    }
138
-  }
137
+    },
138
+  },
139 139
 };
140 140
 </script>

+ 2
- 2
src/components/timeshare/buy/buyPage.vue Bestand weergeven

@@ -117,8 +117,8 @@ import Alert from '../../shared/alert.vue';
117 117
 
118 118
 export default {
119 119
   name: 'TimeshareToBuy',
120
-  components:{
121
-    Alert
120
+  components: {
121
+    Alert,
122 122
   },
123 123
   data() {
124 124
     return {

+ 3
- 2
src/components/timeshare/myWeeksPage.vue Bestand weergeven

@@ -1,10 +1,11 @@
1 1
 <template>
2
+<!-- eslint-disable max-len -->
2 3
 <div>
3 4
   <br />
4 5
   <div class="row">
5 6
     <div class="offset-1 col-md-3">
6 7
       {{items[selectedItems]}}
7
-      <button 
8
+      <button
8 9
         type="button"
9 10
         :class="{'form-control btn btn-primary ': (1===1), 'my-disable': (!(selectedItems.length == 1) || !items[selectedItems] || items[selectedItems].status.code !== 'A2')}"
10 11
         value="Publish Week"
@@ -68,4 +69,4 @@ export default {
68 69
   background-color: lightgray;
69 70
   border-color: lightgray;
70 71
 }
71
-</style>
72
+</style>

+ 1
- 0
src/components/timeshare/searchTimeshare.vue Bestand weergeven

@@ -1,4 +1,5 @@
1 1
 <template>
2
+<!-- eslint-disable max-len -->
2 3
   <div class="container">
3 4
     <form
4 5
       id="mainForm"

+ 21
- 23
src/main.js Bestand weergeven

@@ -1,20 +1,20 @@
1 1
 /* eslint-disable prefer-template */
2
-import Vue from "vue";
3
-import EvaIcons from "vue-eva-icons";
4
-import axios from "axios";
5
-import App from "./App.vue";
6
-import router from "./router";
7
-import store from "./store";
8
-import moment from "moment";
2
+import Vue from 'vue';
3
+import EvaIcons from 'vue-eva-icons';
4
+import axios from 'axios';
5
+import moment from 'moment';
6
+import App from './App.vue';
7
+import router from './router';
8
+import store from './store';
9 9
 
10 10
 Vue.use(EvaIcons);
11 11
 
12 12
 Vue.config.productionTip = false;
13
-axios.defaults.baseURL = "http://localhost:57260/";
13
+axios.defaults.baseURL = 'http://localhost:57260/';
14 14
 Vue.prototype.$axios = axios;
15 15
 
16 16
 Vue.prototype.$http = axios;
17
-const token = localStorage.getItem("token");
17
+const token = localStorage.getItem('token');
18 18
 if (token) {
19 19
   Vue.prototype.$http.defaults.headers.common.Authorization = token;
20 20
 }
@@ -25,39 +25,37 @@ router.beforeEach((to, from, next) => {
25 25
       next();
26 26
       return;
27 27
     }
28
-    next("/users/login");
28
+    next('/users/login');
29 29
   } else {
30 30
     next();
31 31
   }
32 32
 });
33 33
 
34
-Vue.filter("toCurrency", value => {
35
-  if (typeof value !== "number") {
34
+Vue.filter('toCurrency', (value) => {
35
+  if (typeof value !== 'number') {
36 36
     return value;
37 37
   }
38
-  const formatter = new Intl.NumberFormat("en-US", {
39
-    minimumFractionDigits: 2
38
+  const formatter = new Intl.NumberFormat('en-US', {
39
+    minimumFractionDigits: 2,
40 40
   });
41 41
   return `R ${formatter.format(value)}`;
42 42
 });
43 43
 
44
-Vue.filter("toProper", value => {
45
-  if (typeof value !== "string") {
44
+Vue.filter('toProper', (value) => {
45
+  if (typeof value !== 'string') {
46 46
     console.log(typeof value);
47 47
     return value;
48 48
   }
49
-  value = value.replace(/([a-z])([A-Z])/g, "$1 $2");
49
+  value = value.replace(/([a-z])([A-Z])/g, '$1 $2');
50 50
   return value.charAt(0).toUpperCase() + value.slice(1);
51 51
 });
52 52
 
53
-Vue.filter("toDate", value => value.substring(0, value.length > 9 ? 10 : value.length));
53
+Vue.filter('toDate', value => value.substring(0, value.length > 9 ? 10 : value.length));
54 54
 
55
-Vue.filter("toTime", value => {
56
-  return moment(String(value)).format("hh:mm");
57
-});
55
+Vue.filter('toTime', value => moment(String(value)).format('hh:mm'));
58 56
 
59 57
 new Vue({
60 58
   render: h => h(App),
61 59
   router,
62
-  store
63
-}).$mount("#app");
60
+  store,
61
+}).$mount('#app');

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

@@ -1,58 +1,58 @@
1 1
 /* eslint-disable import/prefer-default-export */
2
-import Vue from "vue";
3
-import Router from "vue-router";
2
+import Vue from 'vue';
3
+import Router from 'vue-router';
4 4
 
5
-import HomePage from "../components/home/homePage.vue";
5
+import HomePage from '../components/home/homePage.vue';
6 6
 
7
-import TimeshareBuy from "../components/timeshare/buy/buyPage.vue";
8
-import TimeshareSell from "../components/timeshare/sell/sellPage.vue";
9
-import TimeshareFAQ from "../components/timeshare/faqPage.vue";
10
-import TimeshareSearch from "../components/timeshare/buy/weekListPage.vue";
11
-import MyWeeksPage from "../components/timeshare/myWeeksPage.vue";
7
+import TimeshareBuy from '../components/timeshare/buy/buyPage.vue';
8
+import TimeshareSell from '../components/timeshare/sell/sellPage.vue';
9
+import TimeshareFAQ from '../components/timeshare/faqPage.vue';
10
+import TimeshareSearch from '../components/timeshare/buy/weekListPage.vue';
11
+import MyWeeksPage from '../components/timeshare/myWeeksPage.vue';
12 12
 
13
-import Login from "../components/user/loginPage.vue";
14
-import PrivateIndividual from "../components/user/registerPage.vue";
15
-import Agency from "../components/user/registerAgencySection.vue";
16
-import UpdateInfo from "../components/user/updateProfileInfo.vue";
13
+import Login from '../components/user/loginPage.vue';
14
+import PrivateIndividual from '../components/user/registerPage.vue';
15
+import Agency from '../components/user/registerAgencySection.vue';
16
+import UpdateInfo from '../components/user/updateProfileInfo.vue';
17 17
 
18
-import PropertySearch from "../components/property/propertySearchPage.vue";
19
-import PropertyPage from "../components/property/propertyPage.vue";
20
-import PropertyEdit from "../components/property/propertyeditPage.vue";
21
-import PropertyCreate from "../components/property/propertyCreate.vue";
22
-import PropertyList from "../components/property/propertyList.vue";
23
-import PropertyTypeList from "../components/admin/property/propertyTypeList.vue";
24
-import PropertyType from "../components/admin/property/propertyTypeEdit.vue";
25
-import UserDefinedGroups from "../components/admin/property/userDefinedGroupsPage.vue";
26
-import UserDefinedGroup from "../components/admin/property/userDefinedGroupPage.vue";
18
+import PropertySearch from '../components/property/propertySearchPage.vue';
19
+import PropertyPage from '../components/property/propertyPage.vue';
20
+import PropertyEdit from '../components/property/propertyeditPage.vue';
21
+import PropertyCreate from '../components/property/propertyCreate.vue';
22
+import PropertyList from '../components/property/propertyList.vue';
23
+import PropertyTypeList from '../components/admin/property/propertyTypeList.vue';
24
+import PropertyType from '../components/admin/property/propertyTypeEdit.vue';
25
+import UserDefinedGroups from '../components/admin/property/userDefinedGroupsPage.vue';
26
+import UserDefinedGroup from '../components/admin/property/userDefinedGroupPage.vue';
27 27
 
28
-import AboutUs from "../components/about/aboutUsPage.vue";
29
-import AboutTimeshare from "../components/about/aboutTimeshare.vue";
28
+import AboutUs from '../components/about/aboutUsPage.vue';
29
+import AboutTimeshare from '../components/about/aboutTimeshare.vue';
30 30
 
31
-import Status from "../components/admin/status/statusPage.vue";
32
-import timeshareAdminPage from "../components/admin/status/timeshareAdminPage.vue";
33
-import tenderWeekAdminPage from "../components/admin/status/tenderWeekAdminPage.vue";
34
-import userManagementPage from "../components/admin/status/userManagementPage.vue";
35
-import changeLogPage from "../components/admin/status/changeLogPage.vue";
36
-import UnitConfiguration from "../components/admin/unitConfiguration/unitConfigurationPage.vue";
37
-import agentManagementPage from "../components/admin/status/agentsUserManagementPage.vue";
31
+import Status from '../components/admin/status/statusPage.vue';
32
+import timeshareAdminPage from '../components/admin/status/timeshareAdminPage.vue';
33
+import tenderWeekAdminPage from '../components/admin/status/tenderWeekAdminPage.vue';
34
+import userManagementPage from '../components/admin/status/userManagementPage.vue';
35
+import changeLogPage from '../components/admin/status/changeLogPage.vue';
36
+import UnitConfiguration from '../components/admin/unitConfiguration/unitConfigurationPage.vue';
37
+import agentManagementPage from '../components/admin/status/agentsUserManagementPage.vue';
38 38
 
39
-import ResortPage from "../components/timeshare/resort/resortPage.vue";
40
-import UnitPage from "../components/timeshare/resort/unitPage.vue";
39
+import ResortPage from '../components/timeshare/resort/resortPage.vue';
40
+import UnitPage from '../components/timeshare/resort/unitPage.vue';
41 41
 
42
-import ContactUs from "../components/misc/contactUs.vue";
43
-import PrivacyPolicy from "../components/misc/privacyPolicyPage.vue";
42
+import ContactUs from '../components/misc/contactUs.vue';
43
+import PrivacyPolicy from '../components/misc/privacyPolicyPage.vue';
44 44
 
45
-import MakeOffer from "../components/processFlow/makeOffer.vue";
46
-import Offer from "../components/processFlow/offers.vue";
47
-import searchLog from "../components/admin/logs/SearchLogs.vue";
45
+import MakeOffer from '../components/processFlow/makeOffer.vue';
46
+import Offer from '../components/processFlow/offers.vue';
47
+import searchLog from '../components/admin/logs/SearchLogs.vue';
48 48
 // import store from '../store';
49 49
 
50
-import TemplatePage from "../components/communication/templatePage.vue";
51
-import CarouselList from "../components/admin/misc/carouselList.vue";
52
-import CarouselDetail from "../components/admin/misc/carousel.vue";
53
-import AlertPage from "../components/shared/alertPage.vue";
54
-import PropertySearchResults from "../components/property/propertySearchResults.vue";
55
-import Payments from "../components/financial/payments.vue";
50
+import TemplatePage from '../components/communication/templatePage.vue';
51
+import CarouselList from '../components/admin/misc/carouselList.vue';
52
+import CarouselDetail from '../components/admin/misc/carousel.vue';
53
+import AlertPage from '../components/shared/alertPage.vue';
54
+import PropertySearchResults from '../components/property/propertySearchResults.vue';
55
+import Payments from '../components/financial/payments.vue';
56 56
 
57 57
 Vue.use(Router);
58 58
 
@@ -61,242 +61,242 @@ export default new Router({
61 61
   scrollBehavior(to, from, savedPosition) {
62 62
     return {
63 63
       x: 0,
64
-      y: 0
64
+      y: 0,
65 65
     };
66 66
   },
67 67
   routes: [
68 68
     {
69
-      path: "/",
70
-      name: "Home",
71
-      component: HomePage
69
+      path: '/',
70
+      name: 'Home',
71
+      component: HomePage,
72 72
     },
73 73
     {
74
-      path: "/shared/alert",
75
-      name: "AlertPage",
76
-      component: AlertPage
74
+      path: '/shared/alert',
75
+      name: 'AlertPage',
76
+      component: AlertPage,
77 77
     },
78 78
     {
79
-      path: "/about/us",
80
-      name: "aboutus",
81
-      component: AboutUs
79
+      path: '/about/us',
80
+      name: 'aboutus',
81
+      component: AboutUs,
82 82
     },
83 83
     {
84
-      path: "/about/timeshare",
85
-      name: "abouttimeshare",
86
-      component: AboutTimeshare
84
+      path: '/about/timeshare',
85
+      name: 'abouttimeshare',
86
+      component: AboutTimeshare,
87 87
     },
88 88
     {
89
-      path: "/communication/template",
90
-      name: "template",
91
-      component: TemplatePage
89
+      path: '/communication/template',
90
+      name: 'template',
91
+      component: TemplatePage,
92 92
     },
93 93
     {
94
-      path: "/timeshare/sell",
95
-      name: "TimeshareSell",
96
-      component: TimeshareSell
94
+      path: '/timeshare/sell',
95
+      name: 'TimeshareSell',
96
+      component: TimeshareSell,
97 97
     },
98 98
     {
99
-      path: "/timeshare/buy",
100
-      name: "TimeshareBuy",
101
-      component: TimeshareBuy
99
+      path: '/timeshare/buy',
100
+      name: 'TimeshareBuy',
101
+      component: TimeshareBuy,
102 102
     },
103 103
     {
104
-      path: "/timeshare/faq",
105
-      name: "TimeshareFAQ",
106
-      component: TimeshareFAQ
104
+      path: '/timeshare/faq',
105
+      name: 'TimeshareFAQ',
106
+      component: TimeshareFAQ,
107 107
     },
108 108
     {
109
-      path: "/timeshare/myWeeks",
110
-      name: "MyWeeks",
111
-      component: MyWeeksPage
109
+      path: '/timeshare/myWeeks',
110
+      name: 'MyWeeks',
111
+      component: MyWeeksPage,
112 112
     },
113 113
     {
114
-      path: "/user/login",
115
-      name: "Login",
116
-      component: Login
114
+      path: '/user/login',
115
+      name: 'Login',
116
+      component: Login,
117 117
     },
118 118
     {
119
-      path: "/user/updateProfileInfo",
120
-      name: "UpdateInfo",
121
-      component: UpdateInfo
119
+      path: '/user/updateProfileInfo',
120
+      name: 'UpdateInfo',
121
+      component: UpdateInfo,
122 122
     },
123 123
     {
124
-      path: "/user/register",
125
-      name: "PrivateIndividual",
126
-      component: PrivateIndividual
124
+      path: '/user/register',
125
+      name: 'PrivateIndividual',
126
+      component: PrivateIndividual,
127 127
     },
128 128
     {
129
-      path: "/user/registeragency",
130
-      name: "Agency",
131
-      component: Agency
129
+      path: '/user/registeragency',
130
+      name: 'Agency',
131
+      component: Agency,
132 132
     },
133 133
     {
134
-      path: "/property/property/:id",
135
-      name: "PropertyPage",
136
-      component: PropertyPage
134
+      path: '/property/property/:id',
135
+      name: 'PropertyPage',
136
+      component: PropertyPage,
137 137
     },
138 138
     {
139
-      path: "/property/search",
140
-      name: "PropertySearchTab",
141
-      component: PropertySearch
139
+      path: '/property/search',
140
+      name: 'PropertySearchTab',
141
+      component: PropertySearch,
142 142
     },
143 143
     {
144
-      path: "/property/search/:propertyUsageType",
145
-      name: "PropertySearchTabType",
146
-      component: PropertySearch
144
+      path: '/property/search/:propertyUsageType',
145
+      name: 'PropertySearchTabType',
146
+      component: PropertySearch,
147 147
     },
148 148
     {
149
-      path: "/property/new/:saleType",
150
-      name: "PropertyNew",
151
-      component: PropertyCreate
149
+      path: '/property/new/:saleType',
150
+      name: 'PropertyNew',
151
+      component: PropertyCreate,
152 152
     },
153 153
     {
154
-      path: "/property/new/:propertyUsageType/:saleType",
155
-      name: "PropertyNewFromSearch",
156
-      component: PropertyCreate
154
+      path: '/property/new/:propertyUsageType/:saleType',
155
+      name: 'PropertyNewFromSearch',
156
+      component: PropertyCreate,
157 157
     },
158 158
     {
159
-      path: "/property/edit",
160
-      name: "PropertyEdit",
161
-      component: PropertyEdit
159
+      path: '/property/edit',
160
+      name: 'PropertyEdit',
161
+      component: PropertyEdit,
162 162
     },
163 163
     {
164
-      path: "/properties",
165
-      name: "PropertyListAdmin",
166
-      component: PropertyList
164
+      path: '/properties',
165
+      name: 'PropertyListAdmin',
166
+      component: PropertyList,
167 167
     },
168 168
     {
169
-      path: "/propertyTypes/list",
170
-      name: "PropertyTypeList",
171
-      component: PropertyTypeList
169
+      path: '/propertyTypes/list',
170
+      name: 'PropertyTypeList',
171
+      component: PropertyTypeList,
172 172
     },
173 173
     {
174
-      path: "/propertyType/new",
175
-      name: "PropertyTypeNew",
176
-      component: PropertyType
174
+      path: '/propertyType/new',
175
+      name: 'PropertyTypeNew',
176
+      component: PropertyType,
177 177
     },
178 178
     {
179
-      path: "/propertyType/:id",
180
-      name: "PropertyTypeEdit",
181
-      component: PropertyType
179
+      path: '/propertyType/:id',
180
+      name: 'PropertyTypeEdit',
181
+      component: PropertyType,
182 182
     },
183 183
     {
184
-      path: "/userDefinedGroups/list",
185
-      name: "UserDefinedGroupsList",
186
-      component: UserDefinedGroups
184
+      path: '/userDefinedGroups/list',
185
+      name: 'UserDefinedGroupsList',
186
+      component: UserDefinedGroups,
187 187
     },
188 188
     {
189
-      path: "/userDefinedGroups/userDefinedGroup/:id",
190
-      name: "UserDefinedGroupEdit",
191
-      component: UserDefinedGroup
189
+      path: '/userDefinedGroups/userDefinedGroup/:id',
190
+      name: 'UserDefinedGroupEdit',
191
+      component: UserDefinedGroup,
192 192
     },
193 193
     {
194
-      path: "/userDefinedGroups/userDefinedGroup",
195
-      name: "UserDefinedGroupNew",
196
-      component: UserDefinedGroup
194
+      path: '/userDefinedGroups/userDefinedGroup',
195
+      name: 'UserDefinedGroupNew',
196
+      component: UserDefinedGroup,
197 197
     },
198 198
     {
199
-      path: "/status/list",
200
-      name: "StatusList",
201
-      component: Status
199
+      path: '/status/list',
200
+      name: 'StatusList',
201
+      component: Status,
202 202
     },
203 203
     {
204
-      path: "/status/timeshareAdmin",
205
-      name: "TimeshareAdmin",
206
-      component: timeshareAdminPage
204
+      path: '/status/timeshareAdmin',
205
+      name: 'TimeshareAdmin',
206
+      component: timeshareAdminPage,
207 207
     },
208 208
     {
209
-      path: "/status/tenderWeekAdmin",
210
-      name: "TenderWeekAdmin",
211
-      component: tenderWeekAdminPage
209
+      path: '/status/tenderWeekAdmin',
210
+      name: 'TenderWeekAdmin',
211
+      component: tenderWeekAdminPage,
212 212
     },
213 213
     {
214
-      path: "/status/userManagementPage",
215
-      name: "userManagementPage",
216
-      component: userManagementPage
214
+      path: '/status/userManagementPage',
215
+      name: 'userManagementPage',
216
+      component: userManagementPage,
217 217
     },
218 218
     {
219
-      path: "/status/agentUserManagementPage",
220
-      name: "agentManagementPage",
221
-      component: agentManagementPage
219
+      path: '/status/agentUserManagementPage',
220
+      name: 'agentManagementPage',
221
+      component: agentManagementPage,
222 222
     },
223 223
     {
224
-      path: "/status/changeLogPage",
225
-      name: "changeLogPage",
226
-      component: changeLogPage
224
+      path: '/status/changeLogPage',
225
+      name: 'changeLogPage',
226
+      component: changeLogPage,
227 227
     },
228 228
     {
229
-      path: "/unitConfiguration/list",
230
-      name: "UnitConfiguration",
231
-      component: UnitConfiguration
229
+      path: '/unitConfiguration/list',
230
+      name: 'UnitConfiguration',
231
+      component: UnitConfiguration,
232 232
     },
233 233
     {
234
-      path: "/contactus",
235
-      name: "ContactUs",
236
-      component: ContactUs
234
+      path: '/contactus',
235
+      name: 'ContactUs',
236
+      component: ContactUs,
237 237
     },
238 238
     {
239
-      path: "/privacypolicy",
240
-      name: "PrivacyPolicy",
241
-      component: PrivacyPolicy
239
+      path: '/privacypolicy',
240
+      name: 'PrivacyPolicy',
241
+      component: PrivacyPolicy,
242 242
     },
243 243
     {
244
-      path: "/resort/:resortCode",
245
-      name: "ResortPage",
244
+      path: '/resort/:resortCode',
245
+      name: 'ResortPage',
246 246
       component: ResortPage,
247
-      props: true
247
+      props: true,
248 248
     },
249 249
     {
250
-      path: "/resort/:resortCode/:unitNumber",
251
-      name: "UnitPage",
250
+      path: '/resort/:resortCode/:unitNumber',
251
+      name: 'UnitPage',
252 252
       component: UnitPage,
253
-      props: true
253
+      props: true,
254 254
     },
255 255
     {
256
-      path: "/timeshare/:weekId",
257
-      name: "TimeshareSellEdit",
256
+      path: '/timeshare/:weekId',
257
+      name: 'TimeshareSellEdit',
258 258
       component: TimeshareSell,
259
-      props: true
259
+      props: true,
260 260
     },
261 261
     {
262
-      path: "/MakeOffer",
263
-      name: "MakeOffer",
264
-      component: MakeOffer
262
+      path: '/MakeOffer',
263
+      name: 'MakeOffer',
264
+      component: MakeOffer,
265 265
     },
266 266
     {
267
-      path: "/Offers",
268
-      name: "Offers",
269
-      component: Offer
267
+      path: '/Offers',
268
+      name: 'Offers',
269
+      component: Offer,
270 270
     },
271 271
     {
272
-      path: "/timesharesearch",
273
-      name: "TimeshareSearch",
274
-      component: TimeshareSearch
272
+      path: '/timesharesearch',
273
+      name: 'TimeshareSearch',
274
+      component: TimeshareSearch,
275 275
     },
276 276
     {
277
-      path: "/searchLog",
278
-      name: "SearchLog",
279
-      component: searchLog
277
+      path: '/searchLog',
278
+      name: 'SearchLog',
279
+      component: searchLog,
280 280
     },
281 281
     {
282
-      path: "/carousel",
283
-      name: "carousel",
284
-      component: CarouselList
282
+      path: '/carousel',
283
+      name: 'carousel',
284
+      component: CarouselList,
285 285
     },
286 286
     {
287
-      path: "/carousel/details/:id",
288
-      name: "CarouselDetails",
289
-      component: CarouselDetail
287
+      path: '/carousel/details/:id',
288
+      name: 'CarouselDetails',
289
+      component: CarouselDetail,
290 290
     },
291 291
     {
292
-      path: "/property/propertySearch/results",
293
-      name: "PropertySearchResults",
294
-      component: PropertySearchResults
292
+      path: '/property/propertySearch/results',
293
+      name: 'PropertySearchResults',
294
+      component: PropertySearchResults,
295 295
     },
296 296
     {
297
-      path: "/payments",
298
-      name: "Payments",
299
-      component: Payments
300
-    }
301
-  ]
297
+      path: '/payments',
298
+      name: 'Payments',
299
+      component: Payments,
300
+    },
301
+  ],
302 302
 });

+ 31
- 31
src/store/index.js Bestand weergeven

@@ -1,33 +1,33 @@
1
-import Vue from "vue";
2
-import Vuex from "vuex";
1
+import Vue from 'vue';
2
+import Vuex from 'vuex';
3 3
 
4
-import TimeshareModule from "./modules/timeshare/timeshare";
5
-import UsersModule from "./modules/users";
6
-import StatusModule from "./modules/timeshare/status";
7
-import UnitConfigurationModule from "./modules/timeshare/unitConfiguration";
8
-import RegionModule from "./modules/timeshare/region";
9
-import SearchTabModule from "./modules/searchTab";
10
-import ResortModule from "./modules/timeshare/resort";
11
-import PropertyModule from "./modules/property/property";
12
-import WeekModule from "./modules/timeshare/week";
13
-import PropertyAdminModule from "./modules/property/propertyAdmin";
14
-import PropertyList from "./modules/property/propertyLists";
15
-import PropertyTypes from "./modules/property/propertyTypes";
16
-import Register from "./modules/user/register";
17
-import WeekList from "./modules/timeshare/weekList";
18
-import MyWeeks from "./modules/timeshare/myWeeks";
19
-import Bid from "./modules/processFlow/bid";
20
-import Authentication from "./modules/user/authentication";
21
-import PropertySearch from "./modules/property/propertySearch";
22
-import SearchLog from "./modules/logs/searchLog";
23
-import Template from "./modules/communication/template";
24
-import Info from "./modules/communication/info";
25
-import PropertyEdit from "./modules/property/propertyEdit";
26
-import Carousel from "./modules/misc/carousel";
27
-import Individual from "./modules/user/individual";
28
-import Alert from "./modules/misc/alert";
29
-import TenderWeek from "./modules/timeshare/tenderWeeks";
30
-import PaymentModule from "./modules/financial/payment";
4
+import TimeshareModule from './modules/timeshare/timeshare';
5
+import UsersModule from './modules/users';
6
+import StatusModule from './modules/timeshare/status';
7
+import UnitConfigurationModule from './modules/timeshare/unitConfiguration';
8
+import RegionModule from './modules/timeshare/region';
9
+import SearchTabModule from './modules/searchTab';
10
+import ResortModule from './modules/timeshare/resort';
11
+import PropertyModule from './modules/property/property';
12
+import WeekModule from './modules/timeshare/week';
13
+import PropertyAdminModule from './modules/property/propertyAdmin';
14
+import PropertyList from './modules/property/propertyLists';
15
+import PropertyTypes from './modules/property/propertyTypes';
16
+import Register from './modules/user/register';
17
+import WeekList from './modules/timeshare/weekList';
18
+import MyWeeks from './modules/timeshare/myWeeks';
19
+import Bid from './modules/processFlow/bid';
20
+import Authentication from './modules/user/authentication';
21
+import PropertySearch from './modules/property/propertySearch';
22
+import SearchLog from './modules/logs/searchLog';
23
+import Template from './modules/communication/template';
24
+import Info from './modules/communication/info';
25
+import PropertyEdit from './modules/property/propertyEdit';
26
+import Carousel from './modules/misc/carousel';
27
+import Individual from './modules/user/individual';
28
+import Alert from './modules/misc/alert';
29
+import TenderWeek from './modules/timeshare/tenderWeeks';
30
+import PaymentModule from './modules/financial/payment';
31 31
 
32 32
 Vue.use(Vuex);
33 33
 /* eslint no-param-reassign: ["error", { "props": false }] */
@@ -59,6 +59,6 @@ export default new Vuex.Store({
59 59
     individual: Individual,
60 60
     alert: Alert,
61 61
     tenderWeek: TenderWeek,
62
-    payment: PaymentModule
63
-  }
62
+    payment: PaymentModule,
63
+  },
64 64
 });

+ 8
- 8
src/store/modules/financial/payment.js Bestand weergeven

@@ -1,10 +1,10 @@
1
-import axios from "axios";
1
+import axios from 'axios';
2 2
 
3 3
 export default {
4 4
   amespaced: true,
5 5
   state: {
6 6
     payments: [],
7
-    payment: {}
7
+    payment: {},
8 8
   },
9 9
   mutations: {
10 10
     setPayment(state, item) {
@@ -12,21 +12,21 @@ export default {
12 12
     },
13 13
     setPayments(state, items) {
14 14
       state.payments = items;
15
-    }
15
+    },
16 16
   },
17 17
   getters: {},
18 18
   actions: {
19 19
     getPayment({ commit }, id) {
20 20
       axios
21 21
         .get(`/api/payment/${id}`)
22
-        .then(result => commit("setPayment", result.data))
22
+        .then(result => commit('setPayment', result.data))
23 23
         .catch(console.error);
24 24
     },
25 25
     getPayments({ commit }) {
26 26
       axios
27
-        .get("/api/payment")
28
-        .then(result => commit("setPayments", result.data))
27
+        .get('/api/payment')
28
+        .then(result => commit('setPayments', result.data))
29 29
         .catch(console.error);
30
-    }
31
-  }
30
+    },
31
+  },
32 32
 };

+ 25
- 26
src/store/modules/logs/searchLog.js Bestand weergeven

@@ -1,5 +1,5 @@
1
-import axios from "axios";
2
-import _ from "lodash";
1
+import axios from 'axios';
2
+import _ from 'lodash';
3 3
 
4 4
 export default {
5 5
   namespaced: true,
@@ -8,43 +8,43 @@ export default {
8 8
     fields: [],
9 9
     filter: {
10 10
       by: undefined,
11
-      value: undefined
12
-    }
11
+      value: undefined,
12
+    },
13 13
   },
14 14
   mutations: {
15 15
     updateSearch(state, data) {
16 16
       state.list = [];
17 17
       state.fields = [];
18 18
       state.list = data;
19
-      data.forEach(item => {
19
+      data.forEach((item) => {
20 20
         state.fields.push(item.property);
21 21
       });
22
-      state.fields.push("UserName");
23
-      state.fields.push("Type");
24
-      state.fields.push("Date");
25
-      state.fields.push("Time");
22
+      state.fields.push('UserName');
23
+      state.fields.push('Type');
24
+      state.fields.push('Date');
25
+      state.fields.push('Time');
26 26
       state.fields = state.fields.filter((x, i, a) => a.indexOf(x) === i);
27 27
     },
28 28
     onClearFilter(state) {
29 29
       state.filter = {
30 30
         by: undefined,
31
-        value: undefined
31
+        value: undefined,
32 32
       };
33
-    }
33
+    },
34 34
   },
35 35
   getters: {
36
-    filterList: state => {
36
+    filterList: (state) => {
37 37
       let lst = state.list;
38 38
       const { filter } = state;
39 39
       if (filter) {
40 40
         if (filter.by) {
41
-          if (filter.by === "UserName") {
41
+          if (filter.by === 'UserName') {
42 42
             lst = _.filter(lst, x => x.userName.toUpperCase().includes(filter.value.toUpperCase()));
43
-          } else if (filter.by === "Type") {
43
+          } else if (filter.by === 'Type') {
44 44
             lst = _.filter(lst, x => x.type.toUpperCase().includes(filter.value.toUpperCase()));
45
-          } else if (filter.by === "Date") {
45
+          } else if (filter.by === 'Date') {
46 46
             lst = _.filter(lst, x => x.date.toUpperCase().includes(filter.value.toUpperCase()));
47
-          } else if (filter.by === "Time") {
47
+          } else if (filter.by === 'Time') {
48 48
             lst = _.filter(lst, x => x.time.toUpperCase().includes(filter.value.toUpperCase()));
49 49
           } else {
50 50
             lst = _.filter(lst, x => x.property === filter.by);
@@ -55,25 +55,24 @@ export default {
55 55
         } else if (filter.value) {
56 56
           lst = _.filter(
57 57
             lst,
58
-            x =>
59
-              x.value.toUpperCase().includes(filter.value.toUpperCase()) ||
60
-              x.userName.toUpperCase().includes(filter.value.toUpperCase()) ||
61
-              x.type.toUpperCase().includes(filter.value.toUpperCase())
58
+            x => x.value.toUpperCase().includes(filter.value.toUpperCase())
59
+              || x.userName.toUpperCase().includes(filter.value.toUpperCase())
60
+              || x.type.toUpperCase().includes(filter.value.toUpperCase()),
62 61
           );
63 62
         }
64 63
       }
65 64
       return lst;
66
-    }
65
+    },
67 66
   },
68 67
   actions: {
69 68
     getPropertySearchLogs({ commit }) {
70 69
       axios
71
-        .get("/api/searchLog")
72
-        .then(result => commit("updateSearch", result.data))
70
+        .get('/api/searchLog')
71
+        .then(result => commit('updateSearch', result.data))
73 72
         .catch(console.error);
74 73
     },
75 74
     clearFilter({ commit }) {
76
-      commit("onClearFilter");
77
-    }
78
-  }
75
+      commit('onClearFilter');
76
+    },
77
+  },
79 78
 };

+ 13
- 13
src/store/modules/misc/carousel.js Bestand weergeven

@@ -1,4 +1,4 @@
1
-import axios from "axios";
1
+import axios from 'axios';
2 2
 
3 3
 export default {
4 4
   namespaced: true,
@@ -8,9 +8,9 @@ export default {
8 8
       id: 0,
9 9
       propertyID: 0,
10 10
       timeshareID: 0,
11
-      header: "",
12
-      image: ""
13
-    }
11
+      header: '',
12
+      image: '',
13
+    },
14 14
   },
15 15
   mutations: {
16 16
     setCarouselItem(state, item) {
@@ -24,33 +24,33 @@ export default {
24 24
     },
25 25
     removeCarousel(state, id) {
26 26
       state.carouselList.pop(state.carouselList.find(p => p.id === id));
27
-    }
27
+    },
28 28
   },
29 29
   getters: {},
30 30
   actions: {
31 31
     getCarouselItem({ commit }, id) {
32 32
       axios
33 33
         .get(`/api/Carousel/${id}`)
34
-        .then(result => commit("setCarouselItem", result.data))
34
+        .then(result => commit('setCarouselItem', result.data))
35 35
         .catch(console.error);
36 36
     },
37 37
     getCarouselList({ commit }) {
38 38
       axios
39
-        .get("/api/Carousel")
40
-        .then(result => commit("setCarouselList", result.data))
39
+        .get('/api/Carousel')
40
+        .then(result => commit('setCarouselList', result.data))
41 41
         .catch(console.error);
42 42
     },
43 43
     saveCarouselItem({ commit }, item) {
44 44
       axios
45
-        .post("/api/Carousel", item)
46
-        .then(result => commit("addToCarouselList", result.data))
45
+        .post('/api/Carousel', item)
46
+        .then(result => commit('addToCarouselList', result.data))
47 47
         .catch(console.error);
48 48
     },
49 49
     deleteCarousel({ commit }, id) {
50 50
       axios
51 51
         .delete(`/api/Carousel/${id}`)
52
-        .then(commit("removeCarousel", id))
52
+        .then(commit('removeCarousel', id))
53 53
         .catch(console.error);
54
-    }
55
-  }
54
+    },
55
+  },
56 56
 };

+ 16
- 16
src/store/modules/processFlow/bid.js Bestand weergeven

@@ -1,11 +1,11 @@
1
-import axios from "axios";
2
-import log from "../../../assets/Log";
1
+import axios from 'axios';
2
+import log from '../../../assets/Log';
3 3
 
4 4
 export default {
5 5
   namespaced: true,
6 6
   state: {
7 7
     bidItem: {},
8
-    bidItems: []
8
+    bidItems: [],
9 9
   },
10 10
   mutations: {
11 11
     setBid(state, bid) {
@@ -20,20 +20,20 @@ export default {
20 20
     updateBidList(state, bid) {
21 21
       state.bidItems.find(item => item.id === bid.id).status = bid.status;
22 22
       console.log(JSON.stringify(bid));
23
-    }
23
+    },
24 24
   },
25 25
   getters: {},
26 26
   actions: {
27 27
     getBid({ commit }, id) {
28 28
       axios
29 29
         .get(`/api/bid/${id}`)
30
-        .then(result => commit("addToBids", result.data))
30
+        .then(result => commit('addToBids', result.data))
31 31
         .catch(console.error);
32 32
     },
33 33
     getBids({ commit }) {
34 34
       axios
35
-        .get("/api/bid/GetBids/All")
36
-        .then(result => commit("setBids", result.data))
35
+        .get('/api/bid/GetBids/All')
36
+        .then(result => commit('setBids', result.data))
37 37
         .catch(console.error);
38 38
     },
39 39
     saveBid({ commit }, item) {
@@ -42,27 +42,27 @@ export default {
42 42
       }
43 43
       console.log(JSON.stringify(item));
44 44
       axios
45
-        .post("/api/bid", item)
46
-        .then(result => commit("setBid", result.data))
45
+        .post('/api/bid', item)
46
+        .then(result => commit('setBid', result.data))
47 47
         .catch(console.error);
48 48
     },
49 49
     updateBid({ commit }, item) {
50 50
       axios
51
-        .put("/api/bid", item)
52
-        .then(result => commit("setBid", item))
51
+        .put('/api/bid', item)
52
+        .then(result => commit('setBid', item))
53 53
         .catch(console.error);
54 54
     },
55 55
     acceptBid({ commit }, id) {
56 56
       axios
57 57
         .put(`/api/bid/AcceptBid/${id}`)
58
-        .then(result => commit("updateBidList", result.data))
58
+        .then(result => commit('updateBidList', result.data))
59 59
         .catch(console.error);
60 60
     },
61 61
     declineBid({ commit }, item) {
62 62
       axios
63
-        .put("/api/bid/DeclineBid", item)
64
-        .then(result => commit("updateBidList", result.data))
63
+        .put('/api/bid/DeclineBid', item)
64
+        .then(result => commit('updateBidList', result.data))
65 65
         .catch(console.error);
66
-    }
67
-  }
66
+    },
67
+  },
68 68
 };

+ 15
- 15
src/store/modules/property/propertyLists.js Bestand weergeven

@@ -1,10 +1,10 @@
1
-import axios from "axios";
1
+import axios from 'axios';
2 2
 
3 3
 export default {
4 4
   namespaced: true,
5 5
   state: {
6 6
     properties: [],
7
-    propertiesLive: []
7
+    propertiesLive: [],
8 8
   },
9 9
   mutations: {
10 10
     setProperties(state, properties) {
@@ -14,14 +14,14 @@ export default {
14 14
       state.properties.pop(state.properties.find(item => item.id === id));
15 15
     },
16 16
     updatePropertyPublish(state, curItem) {
17
-      state.properties.find(item => item.id === curItem.id).publish = "Yes";
17
+      state.properties.find(item => item.id === curItem.id).publish = 'Yes';
18 18
     },
19 19
     updatePropertyUnpublish(state, curItem) {
20
-      state.properties.find(item => item.id === curItem.id).publish = "No";
20
+      state.properties.find(item => item.id === curItem.id).publish = 'No';
21 21
     },
22 22
     setLiveProperties(state, items) {
23 23
       state.propertiesLive = items;
24
-    }
24
+    },
25 25
   },
26 26
   getters: {},
27 27
   actions: {
@@ -29,32 +29,32 @@ export default {
29 29
       console.log(`/api/property/GetPropertyList/${item}`);
30 30
       axios
31 31
         .get(`/api/property/GetPropertyList/${item}`) // .get(`/api/property/${item.propertyType}/${item.user}`)
32
-        .then(result => commit("setProperties", result.data))
32
+        .then(result => commit('setProperties', result.data))
33 33
         .catch(console.error);
34 34
     },
35 35
     getLiveProperties({ commit }) {
36 36
       axios
37
-        .get("/api/property/GetLivePropertyList") // .get(`/api/property/${item.propertyType}/${item.user}`)
38
-        .then(result => commit("setLiveProperties", result.data))
37
+        .get('/api/property/GetLivePropertyList') // .get(`/api/property/${item.propertyType}/${item.user}`)
38
+        .then(result => commit('setLiveProperties', result.data))
39 39
         .catch(console.error);
40 40
     },
41 41
     deleteProperty({ commit }, id) {
42 42
       axios
43 43
         .delete(`/api/property/${id}`)
44
-        .then(commit("removeProperties", id))
44
+        .then(commit('removeProperties', id))
45 45
         .catch(console.error);
46 46
     },
47 47
     publishProperty({ commit }, item) {
48 48
       axios
49
-        .put("/api/property/publishproperty", item)
50
-        .then(result => commit("updatePropertyPublish", item))
49
+        .put('/api/property/publishproperty', item)
50
+        .then(result => commit('updatePropertyPublish', item))
51 51
         .catch(console.error);
52 52
     },
53 53
     unpublishProperty({ commit }, item) {
54 54
       axios
55
-        .put("/api/property/unpublishproperty", item)
56
-        .then(result => commit("updatePropertyUnpublish", item))
55
+        .put('/api/property/unpublishproperty', item)
56
+        .then(result => commit('updatePropertyUnpublish', item))
57 57
         .catch(console.error);
58
-    }
59
-  }
58
+    },
59
+  },
60 60
 };

+ 39
- 39
src/store/modules/property/propertySearch.js Bestand weergeven

@@ -1,32 +1,32 @@
1 1
 /* eslint-disable valid-typeof */
2 2
 /* eslint-disable max-len */
3 3
 /* eslint-disable indent */
4
-import axios from "axios";
5
-import _ from "lodash";
6
-import log from "../../../assets/Log";
4
+import axios from 'axios';
5
+import _ from 'lodash';
6
+import log from '../../../assets/Log';
7 7
 
8 8
 export default {
9 9
   namespaced: true,
10 10
   state: {
11 11
     propertySearch: {
12
-      userName: "",
13
-      salesType: "Sale",
14
-      propertyUsageType: "All",
15
-      propertyType: "All",
16
-      province: "All",
17
-      city: "All",
18
-      suburb: "All",
12
+      userName: '',
13
+      salesType: 'Sale',
14
+      propertyUsageType: 'All',
15
+      propertyType: 'All',
16
+      province: 'All',
17
+      city: 'All',
18
+      suburb: 'All',
19 19
       minPrice: 0,
20 20
       maxPrice: 0,
21 21
       availableFrom: undefined,
22
-      propertyId: 0
22
+      propertyId: 0,
23 23
     },
24 24
     properties: [],
25 25
     latestProperties: [],
26 26
     suburbs: [],
27
-    searchText: "",
27
+    searchText: '',
28 28
     suburbList: [],
29
-    resultsShowing: false
29
+    resultsShowing: false,
30 30
   },
31 31
   mutations: {
32 32
     updateSearch(state, propertySearch) {
@@ -40,10 +40,10 @@ export default {
40 40
       state.propertySearch = search;
41 41
     },
42 42
     onClearFilter(state, filter) {
43
-      if (filter === "availableFrom") {
43
+      if (filter === 'availableFrom') {
44 44
         state.propertySearch[filter] = undefined;
45 45
       } else {
46
-        state.propertySearch[filter] = "All";
46
+        state.propertySearch[filter] = 'All';
47 47
       }
48 48
     },
49 49
     setSuburbs(state, items) {
@@ -59,63 +59,63 @@ export default {
59 59
     },
60 60
     setResultsShowing(state, value) {
61 61
       state.resultsShowing = value;
62
-    }
62
+    },
63 63
   },
64 64
   getters: {
65
-    filterSuburbs: state => {
65
+    filterSuburbs: (state) => {
66 66
       let subs = state.suburbs;
67 67
       if (state.searchText) {
68 68
         subs = _.filter(subs, s => s.display.contains(state.searchText));
69 69
       }
70 70
       return subs;
71
-    }
71
+    },
72 72
   },
73 73
   actions: {
74 74
     clearFilter({ commit }, filter) {
75
-      commit("onClearFilter", filter);
75
+      commit('onClearFilter', filter);
76 76
     },
77 77
     searchProperties({ commit }, item) {
78
-      if (item.keyword === "") {
79
-        item.keyword = "All";
78
+      if (item.keyword === '') {
79
+        item.keyword = 'All';
80 80
       }
81 81
       if (log.isLoggedIn()) {
82 82
         item.userName = log.getUser().username;
83
-      } else if (item.userName === "") {
84
-        item.userName = "Unknown";
83
+      } else if (item.userName === '') {
84
+        item.userName = 'Unknown';
85 85
       }
86
-      if (item.suburb === "") {
87
-        item.suburb = "All";
86
+      if (item.suburb === '') {
87
+        item.suburb = 'All';
88 88
       }
89
-      if (item.city === "") {
90
-        item.city = "All";
89
+      if (item.city === '') {
90
+        item.city = 'All';
91 91
       }
92
-      if (item.province === "") {
93
-        item.province = "All";
92
+      if (item.province === '') {
93
+        item.province = 'All';
94 94
       }
95 95
       axios
96 96
         .get(
97
-          `/api/Property/Search/${item.userName}/${item.keyword}/${item.salesType}/${item.propertyUsageType}/${item.propertyType}/${item.province}/${item.city}/${item.suburb}/${item.minPrice}/${item.maxPrice}/${item.availableFrom}/${item.propertyId}`
97
+          `/api/Property/Search/${item.userName}/${item.keyword}/${item.salesType}/${item.propertyUsageType}/${item.propertyType}/${item.province}/${item.city}/${item.suburb}/${item.minPrice}/${item.maxPrice}/${item.availableFrom}/${item.propertyId}`,
98 98
         )
99
-        .then(result => commit("updateSearch", result.data))
99
+        .then(result => commit('updateSearch', result.data))
100 100
         .catch(console.error);
101 101
     },
102 102
     searchLatestProperties({ commit }) {
103 103
       axios
104
-        .get("/api/property/latestProperties")
105
-        .then(response => commit("setLatestProperties", response.data))
104
+        .get('/api/property/latestProperties')
105
+        .then(response => commit('setLatestProperties', response.data))
106 106
         .catch(console.error);
107 107
     },
108 108
     getSuburbs({ commit }) {
109 109
       axios
110
-        .get("/api/suburb/GetSearchList")
111
-        .then(response => commit("setSuburbs", response.data))
110
+        .get('/api/suburb/GetSearchList')
111
+        .then(response => commit('setSuburbs', response.data))
112 112
         .catch(console.error);
113 113
     },
114 114
     applyFilter({ commit }, value) {
115
-      commit("setFilter", { value });
115
+      commit('setFilter', { value });
116 116
     },
117 117
     updateResultsShowing({ commit }, value) {
118
-      commit("setResultsShowing", value);
119
-    }
120
-  }
118
+      commit('setResultsShowing', value);
119
+    },
120
+  },
121 121
 };

+ 1
- 1
src/store/modules/timeshare/myWeeks.js Bestand weergeven

@@ -37,7 +37,7 @@ export default {
37 37
     },
38 38
     publishWeek(id) {
39 39
       axios.post(`/api/timeshareweek/publishweek/${id}`).catch(console.error);
40
-    }
40
+    },
41 41
 
42 42
   },
43 43
 };

+ 1
- 1
src/store/modules/timeshare/week.js Bestand weergeven

@@ -1,7 +1,7 @@
1 1
 /* eslint-disable prefer-destructuring */
2 2
 /* eslint-disable no-restricted-syntax */
3 3
 /* eslint-disable guard-for-in */
4
-import axios from 'axios';
4
+// import axios from 'axios';
5 5
 
6 6
 export default {
7 7
   namespaced: true,

+ 26
- 26
src/store/modules/user/authentication.js Bestand weergeven

@@ -1,7 +1,7 @@
1
-import Vue from "vue";
2
-import Vuex from "vuex";
3
-import axios from "axios";
4
-import log from "../../../assets/Log";
1
+import Vue from 'vue';
2
+import Vuex from 'vuex';
3
+import axios from 'axios';
4
+import log from '../../../assets/Log';
5 5
 
6 6
 Vue.use(Vuex);
7 7
 export default {
@@ -13,21 +13,21 @@ export default {
13 13
     token: undefined,
14 14
     user: undefined,
15 15
     person: undefined,
16
-    agency: undefined
16
+    agency: undefined,
17 17
   },
18 18
   mutations: {
19 19
     auth_request(state) {
20
-      state.status = "loading";
20
+      state.status = 'loading';
21 21
     },
22 22
     auth_success(state, user) {
23
-      state.status = "success";
23
+      state.status = 'success';
24 24
       state.token = user.token;
25 25
       state.user = user.user;
26 26
       state.person = user.person;
27 27
       state.agency = user.agency;
28 28
     },
29 29
     auth_error(state) {
30
-      state.status = "error";
30
+      state.status = 'error';
31 31
     },
32 32
     logout(state) {
33 33
       state.status = undefined;
@@ -45,12 +45,12 @@ export default {
45 45
     },
46 46
     updateFlag(state) {
47 47
       state.flag = true;
48
-    }
48
+    },
49 49
   },
50 50
   getters: {
51 51
     authStatus: state => state.status,
52 52
     getPerson: () => log.getPerson(),
53
-    getUser: () => log.getUser()
53
+    getUser: () => log.getUser(),
54 54
   },
55 55
   actions: {
56 56
     init({ commit }) {
@@ -58,41 +58,41 @@ export default {
58 58
       if (!log.isLoggedIn() && log.tokenExpired) {
59 59
         log.clearValues();
60 60
       } else log.updateTokenExpiry();
61
-      commit("runInit", {
62
-        user: log.getJSONObject("user"),
63
-        token: log.getJSONObject("token"),
64
-        person: log.getJSONObject("person"),
65
-        agency: log.getJSONObject("agency")
61
+      commit('runInit', {
62
+        user: log.getJSONObject('user'),
63
+        token: log.getJSONObject('token'),
64
+        person: log.getJSONObject('person'),
65
+        agency: log.getJSONObject('agency'),
66 66
       });
67 67
     },
68 68
     login({ commit }, user) {
69 69
       axios({
70
-        url: "/api/register/authenticate",
70
+        url: '/api/register/authenticate',
71 71
         data: {
72 72
           username: user.username,
73
-          password: user.password
73
+          password: user.password,
74 74
         },
75
-        method: "POST"
75
+        method: 'POST',
76 76
       })
77
-        .then(resp => {
77
+        .then((resp) => {
78 78
           log.clearValues();
79 79
           log.setValues(resp.data);
80 80
 
81
-          commit("auth_success", resp.data);
81
+          commit('auth_success', resp.data);
82 82
           console.log(JSON.stringify(resp.data));
83 83
         })
84
-        .catch(err => {
85
-          commit("auth_error");
84
+        .catch((err) => {
85
+          commit('auth_error');
86 86
           log.clearValues();
87
-          commit("auth_error", err.data);
87
+          commit('auth_error', err.data);
88 88
         });
89 89
     },
90 90
     logout({ commit }) {
91 91
       return new Promise(() => {
92
-        commit("logout");
92
+        commit('logout');
93 93
         log.clearValues();
94 94
         delete axios.defaults.headers.common.Authorization;
95 95
       });
96
-    }
97
-  }
96
+    },
97
+  },
98 98
 };

+ 51
- 52
src/store/modules/user/register.js Bestand weergeven

@@ -1,4 +1,4 @@
1
-import axios from "axios";
1
+import axios from 'axios';
2 2
 
3 3
 export default {
4 4
   namespaced: true,
@@ -6,27 +6,27 @@ export default {
6 6
     individuals: [],
7 7
     agents: [],
8 8
     registerIndividual: {
9
-      name: "",
10
-      surname: "",
11
-      email: "",
12
-      cellNumber: "",
13
-      username: "",
14
-      password: ""
9
+      name: '',
10
+      surname: '',
11
+      email: '',
12
+      cellNumber: '',
13
+      username: '',
14
+      password: '',
15 15
     },
16 16
     registerAgency: {
17
-      name: "",
18
-      eaabeffcNumber: "",
19
-      companyRegNumber: "",
17
+      name: '',
18
+      eaabeffcNumber: '',
19
+      companyRegNumber: '',
20 20
       user: {
21
-        name: "",
22
-        surname: "",
23
-        email: "",
24
-        cellNumber: "",
25
-        username: "",
26
-        password: "",
27
-        role: ""
28
-      }
29
-    }
21
+        name: '',
22
+        surname: '',
23
+        email: '',
24
+        cellNumber: '',
25
+        username: '',
26
+        password: '',
27
+        role: '',
28
+      },
29
+    },
30 30
   },
31 31
   mutations: {
32 32
     setIndividual(state, type) {
@@ -56,32 +56,31 @@ export default {
56 56
     },
57 57
     updateAgency(state, type) {
58 58
       state.registerAgency.find(item => item.id === type.id).eaabeffcNumber = type.eaabeffcNumber;
59
-      state.registerAgency.find(item => item.id === type.id).companyRegNumber =
60
-        type.companyRegNumber;
59
+      state.registerAgency.find(item => item.id === type.id).companyRegNumber = type.companyRegNumber;
61 60
     },
62 61
     clearIndividual(state) {
63 62
       state.registerIndividual = {
64
-        name: "",
65
-        surname: "",
66
-        email: "",
67
-        cellNumber: "",
68
-        username: "",
69
-        password: ""
63
+        name: '',
64
+        surname: '',
65
+        email: '',
66
+        cellNumber: '',
67
+        username: '',
68
+        password: '',
70 69
       };
71 70
     },
72 71
     clearAgency(state) {
73 72
       state.registerAgency = {
74
-        name: "",
75
-        eaabeffcNumber: "",
76
-        companyRegNumber: "",
73
+        name: '',
74
+        eaabeffcNumber: '',
75
+        companyRegNumber: '',
77 76
         user: {
78
-          name: "",
79
-          surname: "",
80
-          email: "",
81
-          cellNumber: "",
82
-          username: "",
83
-          password: ""
84
-        }
77
+          name: '',
78
+          surname: '',
79
+          email: '',
80
+          cellNumber: '',
81
+          username: '',
82
+          password: '',
83
+        },
85 84
       };
86 85
     },
87 86
     removeIndividual(state, id) {
@@ -92,20 +91,20 @@ export default {
92 91
     },
93 92
     removeAgent(state, id) {
94 93
       state.registerAgency.pop(state.registerAgency.find(a => a.id === id));
95
-    }
94
+    },
96 95
   },
97 96
   getters: {},
98 97
   actions: {
99 98
     getIndividuals({ commit }) {
100 99
       axios
101
-        .get("/api/individual")
102
-        .then(result => commit("setIndividuals", result.data))
100
+        .get('/api/individual')
101
+        .then(result => commit('setIndividuals', result.data))
103 102
         .catch(console.error);
104 103
     },
105 104
     getAgents({ commit }) {
106 105
       axios
107
-        .get("/api/agent")
108
-        .then(result => commit("setAgents", result.data))
106
+        .get('/api/agent')
107
+        .then(result => commit('setAgents', result.data))
109 108
         .catch(console.error);
110 109
     },
111 110
     // getAgency({
@@ -119,20 +118,20 @@ export default {
119 118
 
120 119
     saveIndividual({ commit }, item) {
121 120
       axios
122
-        .post("/api/register/register", item)
123
-        .then(result => commit("addIndividual", result.data))
121
+        .post('/api/register/register', item)
122
+        .then(result => commit('addIndividual', result.data))
124 123
         .catch(console.error);
125 124
     },
126 125
     saveAgency({ commit }, item) {
127 126
       axios
128
-        .post("/api/register/registeragency", item)
129
-        .then(result => commit("addAgency", result.data))
127
+        .post('/api/register/registeragency', item)
128
+        .then(result => commit('addAgency', result.data))
130 129
         .catch(console.error);
131 130
     },
132 131
     saveAgent({ commit }, item) {
133 132
       axios
134
-        .post("/api/agent", item)
135
-        .then(result => commit("addAgent", result.data))
133
+        .post('/api/agent', item)
134
+        .then(result => commit('addAgent', result.data))
136 135
         .catch(console.error);
137 136
     },
138 137
     // updateIndividual({
@@ -164,15 +163,15 @@ export default {
164 163
     deleteIndividual({ commit }, id) {
165 164
       axios
166 165
         .delete(`/api/individual/${id}`)
167
-        .then(result => commit("removeIndividual", id))
166
+        .then(result => commit('removeIndividual', id))
168 167
         .catch(console.error);
169 168
     },
170 169
     deleteAgent({ commit }, id) {
171 170
       axios
172 171
         .delete(`/api/agent/${id}`)
173
-        .then(result => commit("removeAgent", id))
172
+        .then(result => commit('removeAgent', id))
174 173
         .catch(console.error);
175
-    }
174
+    },
176 175
     // deleteAgency({
177 176
     //   commit,
178 177
     // }, id) {
@@ -181,5 +180,5 @@ export default {
181 180
     //     .then(result => commit('removeAgency', id))
182 181
     //     .catch(console.error);
183 182
     // },
184
-  }
183
+  },
185 184
 };

+ 9
- 9
vue.config.js Bestand weergeven

@@ -1,14 +1,14 @@
1 1
 module.exports = {
2 2
   devServer: {
3 3
     proxy: {
4
-      "/api": {
5
-        target: "http://192.168.6.188:5000",
6
-        changeOrigin: true
4
+      '/api': {
5
+        target: 'http://192.168.6.188:5000',
6
+        changeOrigin: true,
7 7
       },
8
-      "/nph-srep": {
9
-        target: "http://www.unipoint-consoft.co.za",      
10
-        changeOrigin: true
11
-      }
12
-    }
13
-  }
8
+      '/nph-srep': {
9
+        target: 'http://www.unipoint-consoft.co.za',
10
+        changeOrigin: true,
11
+      },
12
+    },
13
+  },
14 14
 };

Laden…
Annuleren
Opslaan