ソースを参照

Merge Issues.

master
George Williams 5年前
コミット
f515343be6

+ 42
- 18
README.md ファイルの表示

36
 
36
 
37
 ### Structure
37
 ### Structure
38
 
38
 
39
-├── index.html
40
-├── main.js
41
-├── assets
42
-│ └── staticData
43
-│ ├── alertTypes.js
44
-│ ├── itemsPerPage.js
45
-│ ├── maritalStatus.js
46
-│  
47
-├── components
48
-│ ├── App.vue
49
-│ └── ...
50
-└── store
51
-├── index.js # where we assemble modules and export the store
52
-├── actions.js # root actions
53
-├── mutations.js # root mutations
54
-└── modules
55
-├── cart.js # cart module
56
-└── products.js # products module
39
+#### To Get All Classes
40
+
41
+http://localhost:57260/api/info/getAllClasses
42
+
43
+#### To Get Property from Class
44
+
45
+http://localhost:57260/api/info/UnivateProperties_API.Model.Users.User
46
+
47
+#### To Add Template
48
+
49
+http://localhost:57260/api/template
50
+{
51
+"Name": "WeekAuthorized",
52
+"Subject": "[Resort][unit] [Module]",
53
+"Body": "<h4>Dear [Username]</h4><p>Your week information has been confirmed.</p><p>Please log on to the Uni-Vate Website and publish your week.</p><p>This will allow all websites users to view your Week.</p><h4>Thank you</h4><h4><b>Uni-Vate Properties</b></h4>",
54
+"PlaceHolders": [
55
+{
56
+"Name": "[Resort]",
57
+"BoundTo": "ResortName",
58
+"BoundToClass": "UnivateProperties_API.Model.Timeshare.TimeshareWeek",
59
+"BoundToClassDisplay": "TimeshareWeek",
60
+},
61
+{
62
+"Name": "[Unit]",
63
+"BoundTo": "UnitNumber",
64
+"BoundToClass": "UnivateProperties_API.Model.Timeshare.TimeshareWeek",
65
+"BoundToClassDisplay": "TimeshareWeek",
66
+},
67
+{
68
+"Name": "[Module]",
69
+"BoundTo": "Module",
70
+"BoundToClass": "UnivateProperties_API.Model.Timeshare.TimeshareWeek",
71
+"BoundToClassDisplay": "TimeshareWeek",
72
+},
73
+{
74
+"Name": "[Username]",
75
+"BoundTo": "Username",
76
+"BoundToClass": "UnivateProperties_API.Model.Users.User",
77
+"BoundToClassDisplay": "User",
78
+}
79
+]
80
+}
57
 
81
 
58
 ### Tender Weeks
82
 ### Tender Weeks
59
 
83
 

バイナリ
public/img/kloader.gif ファイルの表示


バイナリ
public/img/loading.gif ファイルの表示


+ 4
- 4
src/components/admin/property/propertyTypeList.vue ファイルの表示

44
               <button
44
               <button
45
                 type="button"
45
                 type="button"
46
                 @click="Edit(item.id)"
46
                 @click="Edit(item.id)"
47
-                class="btn btn-b-n"
48
-                style="width: 85px; height:40px;"
47
+                class="btn"
48
+                style="margin:2px; color: #60CBEB"
49
               >Edit</button>
49
               >Edit</button>
50
             </td>
50
             </td>
51
             <td>
51
             <td>
52
               <button
52
               <button
53
                 type="button"
53
                 type="button"
54
                 @click="Delete(item.id)"
54
                 @click="Delete(item.id)"
55
-                class="btn btn-b-n"
56
-                style="width: 85px; height:40px;"
55
+                class="btn"
56
+                style="margin:2px; color: #60CBEB"
57
               >Delete</button>
57
               >Delete</button>
58
             </td>
58
             </td>
59
           </tr>
59
           </tr>

+ 4
- 4
src/components/admin/property/userDefinedGroupPage.vue ファイルの表示

120
                 <button
120
                 <button
121
                   type="button"
121
                   type="button"
122
                   @click="Edit(item)"
122
                   @click="Edit(item)"
123
-                  class="btn btn-b-n"
124
-                  style="width: 85px; height:40px;"
123
+                  class="btn"
124
+                  style="margin:2px; color: #60CBEB"
125
                 >Edit</button>
125
                 >Edit</button>
126
               </td>
126
               </td>
127
               <td>
127
               <td>
128
                 <button
128
                 <button
129
                   type="button"
129
                   type="button"
130
                   @click="Delete(item)"
130
                   @click="Delete(item)"
131
-                  class="btn btn-b-n"
132
-                  style="width: 85px; height:40px;"
131
+                  class="btn"
132
+                  style="margin:2px; color: #60CBEB"
133
                 >Delete</button>
133
                 >Delete</button>
134
               </td>
134
               </td>
135
             </tr>
135
             </tr>

+ 4
- 4
src/components/admin/property/userDefinedGroupsPage.vue ファイルの表示

43
               <button
43
               <button
44
                 type="button"
44
                 type="button"
45
                 @click="Edit(item.id)"
45
                 @click="Edit(item.id)"
46
-                class="btn btn-b-n"
47
-                style="width: 85px; height:40px;"
46
+                class="btn"
47
+                style="margin:2px; color: #60CBEB"
48
               >Edit</button>
48
               >Edit</button>
49
             </td>
49
             </td>
50
             <td>
50
             <td>
51
               <button
51
               <button
52
                 type="button"
52
                 type="button"
53
                 @click="Delete(item)"
53
                 @click="Delete(item)"
54
-                class="btn btn-b-n"
55
-                style="width: 85px; height:40px;"
54
+                class="btn"
55
+                style="margin:2px; color: #60CBEB"
56
               >Delete</button>
56
               >Delete</button>
57
             </td>
57
             </td>
58
           </tr>
58
           </tr>

+ 241
- 0
src/components/admin/status/agentsUserManagementPage.vue ファイルの表示

1
+<template>
2
+  <!-- eslint-disable max-len -->
3
+  <div class="container">
4
+    <br />
5
+    <br />
6
+    <div class="row">
7
+      <div class="col-md-12 col-lg-8">
8
+        <div class="title-box-d">
9
+          <h1 class="title-d" style="text-align:left; font-size: 250%">Agent Management</h1>
10
+        </div>
11
+      </div>
12
+    </div>
13
+    <div class="row">
14
+      <div class="col-md-2 offset-1">
15
+        <button
16
+          @click="routerGoTo('/status/userManagementPage')"
17
+          type="button"
18
+          class="btn btn-b-n"
19
+        >Private Users</button>
20
+      </div>
21
+      <div class="col-md-2 offset-2">
22
+        <button type="button" class="btn btn-b-n">Agents</button>
23
+      </div>
24
+      <div class="col-md-2 offset-2">
25
+        <button type="button" class="btn btn-b-n">New Agent</button>
26
+      </div>
27
+    </div>
28
+    <div class="container">
29
+      <div class="d-flex justify-content-between">
30
+        <div class="p-2">
31
+          <input v-model="searchItem" class="form-control" placeholder="Search ..." />
32
+        </div>
33
+      </div>
34
+      <br />
35
+      <table class="table table-bordered">
36
+        <thead>
37
+          <tr>
38
+            <td colspan="10">
39
+              <div class="myWell">
40
+                <h4>Agents</h4>
41
+              </div>
42
+            </td>
43
+          </tr>
44
+          <tr>
45
+            <th>
46
+              <b>ID</b>
47
+            </th>
48
+            <th>
49
+              <b>Name</b>
50
+            </th>
51
+            <th>
52
+              <b>Surname</b>
53
+            </th>
54
+            <th>
55
+              <b>Cell Number</b>
56
+            </th>
57
+            <th>
58
+              <b>Telephone Number</b>
59
+            </th>
60
+            <th>
61
+              <b>Email</b>
62
+            </th>
63
+            <th>
64
+              <b>Role</b>
65
+            </th>
66
+            <th>
67
+              <b>Reset Password</b>
68
+            </th>
69
+            <th>
70
+              <b>Modify</b>
71
+            </th>
72
+            <th>
73
+              <b>Remove</b>
74
+            </th>
75
+          </tr>
76
+        </thead>
77
+        <tbody>
78
+          <tr v-for="(item, i) in DisplayItems" :key="i">
79
+            <td>{{ item.id }}</td>
80
+            <td>{{ item.name }}</td>
81
+            <td>{{ item.surname }}</td>
82
+            <td>{{ item.cellNumber }}</td>
83
+            <td>{{ item.telephone }}</td>
84
+            <td>{{ item.email }}</td>
85
+            <td v-if="item.user">{{ item.user.role }}</td>
86
+            <td v-else></td>
87
+            <td>
88
+              <button type="button" class="btn" style="margin:2px; color: #60CBEB">Reset</button>
89
+            </td>
90
+            <td>
91
+              <button
92
+                type="button"
93
+                data-toggle="modal"
94
+                :data-target="'#myModal' + i"
95
+                class="btn"
96
+                style="margin:2px; color: #60CBEB"
97
+              >Edit</button>
98
+              <div :id="'myModal' + i" class="modal fade" role="dialog">
99
+                <div class="modal-dialog modal-lg">
100
+                  <div class="modal-content">
101
+                    <div class="modal-header">
102
+                      <button type="button" class="close" data-dismiss="modal">&times;</button>
103
+                    </div>
104
+                    <Agency name="Agency" :isAddAgent="false" :item="item" />
105
+                  </div>
106
+                </div>
107
+              </div>
108
+            </td>
109
+            <td>
110
+              <button
111
+                type="button"
112
+                class="btn"
113
+                style="width: 85px; height:40px; color:#60CBEB"
114
+              >Delete</button>
115
+            </td>
116
+          </tr>
117
+        </tbody>
118
+      </table>
119
+      <div class="d-flex justify-content-between">
120
+        <div class="p-1">{{ currentPage + ' / ' + PageCount }}</div>
121
+        <div class="p-1">
122
+          <BasePagination
123
+            :currentPage="currentPage"
124
+            :pageCount="PageCount"
125
+            @nextPage="pageChangeHandle('next')"
126
+            @previousPage="pageChangeHandle('previous')"
127
+            @loadPage="pageChangeHandle"
128
+          />
129
+        </div>
130
+      </div>
131
+    </div>
132
+    <br />
133
+  </div>
134
+</template>
135
+
136
+<script>
137
+import { mapState, mapActions } from 'vuex';
138
+import axios from 'axios';
139
+import _ from 'lodash';
140
+import ItemsPerPageList from '../../../assets/staticData/itemsPerPage';
141
+import BasePagination from '../../shared/basePagination.vue';
142
+import Agency from '../../user/registerAgencySection.vue';
143
+
144
+export default {
145
+  name: 'agentManagementPage',
146
+  components: {
147
+    BasePagination,
148
+    Agency,
149
+  },
150
+  data() {
151
+    return {
152
+      sortKey: '',
153
+      reverse: false,
154
+      searchItem: '',
155
+      itemsPerPageList: ItemsPerPageList,
156
+      visibleItemsPerPageCount: 0,
157
+      currentPage: 1,
158
+      item: {},
159
+    };
160
+  },
161
+  methods: {
162
+    ...mapActions('register', ['getAgents']),
163
+    addNewAgent({ commit }) {
164
+      axios
165
+        .post('/api/agent')
166
+        .then(result => commit('saveAgent', result.data))
167
+        .catch(console.error);
168
+    },
169
+    routerGoTo(goTo) {
170
+      this.$router.push(goTo);
171
+    },
172
+    sortBy(sortKey) {
173
+      this.reverse = this.sortKey === sortKey ? !this.reverse : false;
174
+      this.sortKey = sortKey;
175
+    },
176
+    async pageChangeHandle(value) {
177
+      console.log(value);
178
+      switch (value) {
179
+        case 'next':
180
+          this.currentPage += 1;
181
+          break;
182
+        case 'previous':
183
+          this.currentPage -= 1;
184
+          break;
185
+        default:
186
+          this.currentPage = value;
187
+      }
188
+    },
189
+    onChangeItemsPerPage() {
190
+      if (this.currentPage !== 1) {
191
+        this.currentPage = 1;
192
+      }
193
+    },
194
+  },
195
+  mounted() {
196
+    this.getAgents();
197
+    try {
198
+      // to assign initial value to itemsPerPage
199
+      if (this.itemsPerPageList && this.itemsPerPageList.length > 0) {
200
+        const [startItem] = this.itemsPerPageList;
201
+        this.visibleItemsPerPageCount = startItem;
202
+      }
203
+    } catch (error) {
204
+      throw error;
205
+    }
206
+  },
207
+  computed: {
208
+    ...mapState('register', ['agents']),
209
+
210
+    SortDirection() {
211
+      return this.reverse ? 'desc' : 'asc';
212
+    },
213
+    PageCount() {
214
+      return this.visibleItemsPerPageCount !== 0
215
+        ? Math.ceil(this.FilteredItems.length / this.visibleItemsPerPageCount)
216
+        : 1;
217
+    },
218
+    FilteredItems() {
219
+      const list = _.filter(this.agents, item => Object.values(item).some(
220
+          i => JSON.stringify(i)
221
+              .toLowerCase()
222
+              .indexOf(this.searchItem) > -1,
223
+        ),);
224
+      return _.orderBy(list, this.sortKey, this.SortDirection);
225
+    },
226
+    DisplayItems() {
227
+      const list = this.FilteredItems;
228
+      const startSlice = (this.currentPage - 1) * this.visibleItemsPerPageCount;
229
+      let endSlice = this.currentPage * this.visibleItemsPerPageCount;
230
+      if (endSlice > list.length) {
231
+        endSlice = list.length;
232
+      }
233
+      return list.slice(startSlice, endSlice);
234
+    },
235
+  },
236
+};
237
+</script>
238
+
239
+
240
+<style>
241
+</style>

+ 166
- 63
src/components/admin/status/userManagementPage.vue ファイルの表示

1
 <template>
1
 <template>
2
   <!-- eslint-disable max-len -->
2
   <!-- eslint-disable max-len -->
3
   <div class="container">
3
   <div class="container">
4
-    <br />
5
-    <br />
6
     <br />
4
     <br />
7
     <br />
5
     <br />
8
     <div class="row">
6
     <div class="row">
10
         <div class="title-box-d">
8
         <div class="title-box-d">
11
           <h1 class="title-d" style="text-align:left; font-size: 250%">User Management</h1>
9
           <h1 class="title-d" style="text-align:left; font-size: 250%">User Management</h1>
12
         </div>
10
         </div>
13
-        <br />
14
       </div>
11
       </div>
15
     </div>
12
     </div>
16
-    <button @click="addNewAgent" type="button" class="btn btn-b-n">Add New Agent</button>
17
-    <br />
18
-    <br />
13
+    <div class="row">
14
+      <div class="col-md-2 offset-1">
15
+        <button type="button" class="btn btn-b-n">Private Users</button>
16
+      </div>
17
+      <div class="col-md-2 offset-2">
18
+        <button
19
+          @click="routerGoTo('/status/agentUserManagementPage')"
20
+          type="button"
21
+          class="btn btn-b-n"
22
+        >Agents</button>
23
+      </div>
24
+    </div>
19
     <div class="container">
25
     <div class="container">
26
+      <div class="d-flex justify-content-between">
27
+        <div class="p-2">
28
+          <input v-model="searchItem" class="form-control" placeholder="Search ..." />
29
+        </div>
30
+      </div>
31
+      <br />
20
       <table class="table table-bordered">
32
       <table class="table table-bordered">
21
         <thead>
33
         <thead>
22
-          <tr>
23
-            <th>ID</th>
24
-            <th>Name</th>
25
-            <th>Surname</th>
26
-            <th>Cell Number</th>
27
-            <th>Telephone Number</th>
28
-            <th>Email</th>
29
-            <th>Role</th>
30
-            <th>Reset Password</th>
31
-            <th></th>
32
-            <th></th>
33
-          </tr>
34
-        </thead>
35
-        <tbody>
36
           <tr>
34
           <tr>
37
             <td colspan="10">
35
             <td colspan="10">
38
-              <h5>Private Users</h5>
39
-            </td>
40
-          </tr>
41
-          <tr v-for="(item, i) in individuals" :key="i">
42
-            <td>{{ item.id }}</td>
43
-            <td>{{ item.name }}</td>
44
-            <td>{{ item.surname }}</td>
45
-            <td>{{ item.cellNumber }}</td>
46
-            <td>{{ item.telephone }}</td>
47
-            <td>{{ item.email }}</td>
48
-            <td v-if="item.user">{{ item.user.role }}</td>
49
-            <td v-else></td>
50
-            <td></td>
51
-            <td>
52
-              <button
53
-                type="button"
54
-                @click="Edit(item)"
55
-                class="btn btn-b-n"
56
-                style="width: 85px; height:40px;"
57
-              >Edit</button>
58
-            </td>
59
-            <td>
60
-              <button type="button" class="btn btn-b-n" style="width: 85px; height:40px">Delete</button>
36
+              <div class="myWell">
37
+                <h4>Private Users</h4>
38
+              </div>
61
             </td>
39
             </td>
62
           </tr>
40
           </tr>
63
           <tr>
41
           <tr>
64
-            <td colspan="10">
65
-              <h5>Agents</h5>
66
-            </td>
42
+            <th>
43
+              <b>ID</b>
44
+            </th>
45
+            <th>
46
+              <b>Name</b>
47
+            </th>
48
+            <th>
49
+              <b>Surname</b>
50
+            </th>
51
+            <th>
52
+              <b>Cell Number</b>
53
+            </th>
54
+            <th>
55
+              <b>Telephone Number</b>
56
+            </th>
57
+            <th>
58
+              <b>Email</b>
59
+            </th>
60
+            <th>
61
+              <b>Role</b>
62
+            </th>
63
+            <th>
64
+              <b>Reset Password</b>
65
+            </th>
66
+            <th>
67
+              <b>Modify</b>
68
+            </th>
69
+            <th>
70
+              <b>Remove</b>
71
+            </th>
67
           </tr>
72
           </tr>
68
-          <tr v-for="(item, i) in agents" :key="i">
73
+        </thead>
74
+        <tbody>
75
+          <tr v-for="(item, i) in DisplayItems" :key="i">
69
             <td>{{ item.id }}</td>
76
             <td>{{ item.id }}</td>
70
             <td>{{ item.name }}</td>
77
             <td>{{ item.name }}</td>
71
             <td>{{ item.surname }}</td>
78
             <td>{{ item.surname }}</td>
74
             <td>{{ item.email }}</td>
81
             <td>{{ item.email }}</td>
75
             <td v-if="item.user">{{ item.user.role }}</td>
82
             <td v-if="item.user">{{ item.user.role }}</td>
76
             <td v-else></td>
83
             <td v-else></td>
77
-            <td></td>
84
+            <td>
85
+              <button type="button" class="btn" style="margin:2px; color: #60CBEB">Reset</button>
86
+            </td>
78
             <td>
87
             <td>
79
               <button
88
               <button
80
                 type="button"
89
                 type="button"
81
-                @click="Edit(item)"
82
-                class="btn btn-b-n"
83
-                style="width: 85px; height:40px;"
90
+                data-toggle="modal"
91
+                :data-target="'#myModal' + i"
92
+                class="btn"
93
+                style="margin:2px; color: #60CBEB"
84
               >Edit</button>
94
               >Edit</button>
95
+              <div :id="'myModal' + i" class="modal fade" role="dialog">
96
+                <div class="modal-dialog modal-lg">
97
+                  <div class="modal-content">
98
+                    <div class="modal-header">
99
+                      <button type="button" class="close" data-dismiss="modal">&times;</button>
100
+                    </div>
101
+                    <div padding-left="20px">
102
+                      <Individual name="PrivateIndividual" :isAddIndividual="false" :item="item" />
103
+                    </div>
104
+                  </div>
105
+                </div>
106
+              </div>
85
             </td>
107
             </td>
86
             <td>
108
             <td>
87
-              <button type="button" class="btn btn-b-n" style="width: 85px; height:40px">Delete</button>
109
+              <button type="button" class="btn" style="margin:2px; color: #60CBEB">Delete</button>
88
             </td>
110
             </td>
89
           </tr>
111
           </tr>
90
         </tbody>
112
         </tbody>
91
       </table>
113
       </table>
114
+      <div class="d-flex justify-content-between">
115
+        <div class="p-1">{{ currentPage + ' / ' + PageCount }}</div>
116
+        <div class="p-1">
117
+          <BasePagination
118
+            :currentPage="currentPage"
119
+            :pageCount="PageCount"
120
+            @nextPage="pageChangeHandle('next')"
121
+            @previousPage="pageChangeHandle('previous')"
122
+            @loadPage="pageChangeHandle"
123
+          />
124
+        </div>
125
+      </div>
126
+      <br />
92
     </div>
127
     </div>
93
-    <br />
94
   </div>
128
   </div>
95
 </template>
129
 </template>
130
+
96
 <script>
131
 <script>
97
 import { mapState, mapActions } from 'vuex';
132
 import { mapState, mapActions } from 'vuex';
98
-import axios from 'axios';
133
+import _ from 'lodash';
134
+import ItemsPerPageList from '../../../assets/staticData/itemsPerPage';
135
+import BasePagination from '../../shared/basePagination.vue';
136
+import Individual from '../../user/registerPage.vue';
99
 
137
 
100
 export default {
138
 export default {
101
   name: 'userManagementPage',
139
   name: 'userManagementPage',
140
+  components: {
141
+    BasePagination,
142
+    Individual,
143
+  },
102
   data() {
144
   data() {
103
-    return {};
145
+    return {
146
+      sortKey: '',
147
+      reverse: false,
148
+      searchItem: '',
149
+      itemsPerPageList: ItemsPerPageList,
150
+      visibleItemsPerPageCount: 0,
151
+      currentPage: 1,
152
+      item: {},
153
+    };
104
   },
154
   },
105
   methods: {
155
   methods: {
106
-    ...mapActions('registerIndividual', ['getIndividuals', 'getAgents']),
107
-    addNewAgent({ commit }) {
108
-      axios
109
-        .post('/api/agent')
110
-        .then(result => commit('saveAgent', result.data))
111
-        .catch(console.error);
156
+    ...mapActions('register', ['getIndividuals']),
157
+    routerGoTo(goTo) {
158
+      this.$router.push(goTo);
159
+    },
160
+    sortBy(sortKey) {
161
+      this.reverse = this.sortKey === sortKey ? !this.reverse : false;
162
+      this.sortKey = sortKey;
163
+    },
164
+    async pageChangeHandle(value) {
165
+      console.log(value);
166
+      switch (value) {
167
+        case 'next':
168
+          this.currentPage += 1;
169
+          break;
170
+        case 'previous':
171
+          this.currentPage -= 1;
172
+          break;
173
+        default:
174
+          this.currentPage = value;
175
+      }
176
+    },
177
+    onChangeItemsPerPage() {
178
+      if (this.currentPage !== 1) {
179
+        this.currentPage = 1;
180
+      }
112
     },
181
     },
113
   },
182
   },
114
   mounted() {
183
   mounted() {
115
     this.getIndividuals();
184
     this.getIndividuals();
116
-    this.getAgents();
185
+    try {
186
+      // to assign initial value to itemsPerPage
187
+      if (this.itemsPerPageList && this.itemsPerPageList.length > 0) {
188
+        const [startItem] = this.itemsPerPageList;
189
+        this.visibleItemsPerPageCount = startItem;
190
+      }
191
+    } catch (error) {
192
+      throw error;
193
+    }
117
   },
194
   },
118
   computed: {
195
   computed: {
119
-    ...mapState('registerIndividual', ['individuals', 'agents']),
196
+    ...mapState('register', ['individuals']),
197
+
198
+    SortDirection() {
199
+      return this.reverse ? 'desc' : 'asc';
200
+    },
201
+    PageCount() {
202
+      return this.visibleItemsPerPageCount !== 0
203
+        ? Math.ceil(this.FilteredItems.length / this.visibleItemsPerPageCount)
204
+        : 1;
205
+    },
206
+    FilteredItems() {
207
+      const list = _.filter(this.individuals, item => Object.values(item).some(
208
+          i => JSON.stringify(i)
209
+              .toLowerCase()
210
+              .indexOf(this.searchItem) > -1,
211
+        ),);
212
+      return _.orderBy(list, this.sortKey, this.SortDirection);
213
+    },
214
+    DisplayItems() {
215
+      const list = this.FilteredItems;
216
+      const startSlice = (this.currentPage - 1) * this.visibleItemsPerPageCount;
217
+      let endSlice = this.currentPage * this.visibleItemsPerPageCount;
218
+      if (endSlice > list.length) {
219
+        endSlice = list.length;
220
+      }
221
+      return list.slice(startSlice, endSlice);
222
+    },
120
   },
223
   },
121
 };
224
 };
122
 </script>
225
 </script>

+ 15
- 10
src/components/processFlow/offers.vue ファイルの表示

1
 <template>
1
 <template>
2
-  <!-- eslint-disable max-len -->
3
   <div>
2
   <div>
3
+    <!-- <section class="intro-single"> -->
4
     <div class="container">
4
     <div class="container">
5
-      <section class="intro-single">
6
-        <div class="container">
7
-          <div class="row">
8
-            <div class="col-md-12 col-lg-8">
9
-              <div class="title-single-box">
10
-                <h1 class="title-single">Bid Offers</h1>
11
-              </div>
12
-            </div>
5
+      <br />
6
+      <br />
7
+      <br />
8
+      <br />
9
+      <div class="row">
10
+        <div class="col-md-12 col-lg-8">
11
+          <!-- <div class="title-single-box"> -->
12
+          <!-- <h2 class="title-single">Status List</h2> -->
13
+          <!-- </div> -->
14
+          <div class="title-box-d">
15
+            <h1 class="title-d" style="text-align:left; font-size: 250%">Bid Offers</h1>
13
           </div>
16
           </div>
17
+          <br />
14
         </div>
18
         </div>
15
-      </section>
19
+      </div>
16
     </div>
20
     </div>
21
+    <!-- </section> -->
17
     <div class="container">
22
     <div class="container">
18
       <table class="table table-bordered">
23
       <table class="table table-bordered">
19
         <thead>
24
         <thead>

+ 2
- 2
src/components/property/propertyList.vue ファイルの表示

56
               <button
56
               <button
57
                 type="button"
57
                 type="button"
58
                 @click="Edit(item)"
58
                 @click="Edit(item)"
59
-                class="btn btn-b-n"
60
-                style="width: 85px; height:40px;"
59
+                class="btn"
60
+                style="margin:2px; color: #60CBEB"
61
               >Edit</button>
61
               >Edit</button>
62
             </td>
62
             </td>
63
             <td>
63
             <td>

+ 4
- 1
src/components/shared/alert.vue ファイルの表示

11
     </div>
11
     </div>
12
     <div class="alert alert-warning" v-if="type === 'WARNING'">
12
     <div class="alert alert-warning" v-if="type === 'WARNING'">
13
       <eva-icon name="alert-circle-outline"></eva-icon>
13
       <eva-icon name="alert-circle-outline"></eva-icon>
14
-      <strong>{{ text }}</strong>
14
+      <strong class="color-black">{{ text }}</strong>
15
     </div>
15
     </div>
16
     <div class="alert alert-danger" v-if="type === 'ERROR'">
16
     <div class="alert alert-danger" v-if="type === 'ERROR'">
17
       <eva-icon name="slash-outline"></eva-icon>
17
       <eva-icon name="slash-outline"></eva-icon>
41
 </script>
41
 </script>
42
 
42
 
43
 <style>
43
 <style>
44
+.color-black {
45
+  color: black;
46
+}
44
 </style>
47
 </style>

+ 1
- 13
src/components/shared/navBar.vue ファイルの表示

166
                 <a class="dropdown-item cursor-pointer" @click="routerGoTo('/Offers')">Offers</a>
166
                 <a class="dropdown-item cursor-pointer" @click="routerGoTo('/Offers')">Offers</a>
167
               </div>
167
               </div>
168
             </li>
168
             </li>
169
-            <li v-if="isLoggedIn">
170
-              <a
171
-                class="nav-link"
172
-                @click="routerGoTo('/user/updateProfileInfo')"
173
-                id="navbarDropdown"
174
-                role="button"
175
-                data-toggle="dropdown"
176
-                aria-haspopup="true"
177
-                aria-expanded="false"
178
-              >Update Profile</a>
179
-            </li>
180
             <li class="nav-item dropdown" v-if="!isLoggedIn">
169
             <li class="nav-item dropdown" v-if="!isLoggedIn">
181
               <a
170
               <a
182
                 class="nav-link"
171
                 class="nav-link"
192
               <span>
181
               <span>
193
                 <a class="nav-link" @click="logout(routerGoTo('/user/login'))">Logout</a>
182
                 <a class="nav-link" @click="logout(routerGoTo('/user/login'))">Logout</a>
194
               </span>
183
               </span>
195
-              <!-- <span v-else></span> -->
196
             </li>
184
             </li>
197
             <li>
185
             <li>
198
               <span v-if="isLoggedIn">
186
               <span v-if="isLoggedIn">
199
-                <a>
187
+                <a @click="routerGoTo('/user/updateProfileInfo')">
200
                   Welcome!
188
                   Welcome!
201
                   <br />
189
                   <br />
202
                   {{ NAME }}
190
                   {{ NAME }}

+ 15
- 5
src/components/timeshare/buy/weekListComponent.vue ファイルの表示

38
     </div>
38
     </div>
39
     <div v-else>
39
     <div v-else>
40
       <div class="row">
40
       <div class="row">
41
-        <div class="col-md-12">
42
-          <hr />No Results Found
43
-          <hr />
41
+        <hr />
42
+        <div class="col-md-12" v-if="status !== '' && status !== undefined">
43
+          <b>{{status}}</b>
44
         </div>
44
         </div>
45
+        <div class="col-md-12" v-if="status !== '' && status !== undefined">
46
+          <img
47
+            class="img-fluid"
48
+            src="/img/kloader.gif"
49
+            alt="UVProp logo"
50
+            style="width:128px;height:128px;"
51
+          />
52
+        </div>
53
+        <div v-else>No Results Found</div>
54
+        <hr />
45
       </div>
55
       </div>
46
     </div>
56
     </div>
47
   </div>
57
   </div>
55
   },
65
   },
56
   components: {},
66
   components: {},
57
   computed: {
67
   computed: {
58
-    ...mapState('weekList', ['weeks']),
68
+    ...mapState('weekList', ['weeks', 'status']),
59
     ...mapGetters({
69
     ...mapGetters({
60
       filteredWeeks: 'weekList/filteredWeeks',
70
       filteredWeeks: 'weekList/filteredWeeks',
71
+      getRegions: 'weekList/getRegions',
61
     }),
72
     }),
62
   },
73
   },
63
   mounted() {
74
   mounted() {
68
   },
79
   },
69
   methods: {
80
   methods: {
70
     View(item) {
81
     View(item) {
71
-      console.log(item);
72
       this.$router.push(`/resort/${item.resort.resortCode}/${item.id}`);
82
       this.$router.push(`/resort/${item.resort.resortCode}/${item.id}`);
73
     },
83
     },
74
     ...mapActions('weekList', ['getWeeks', 'applyResortFilter']),
84
     ...mapActions('weekList', ['getWeeks', 'applyResortFilter']),

+ 38
- 5
src/components/timeshare/sell/sellPage.vue ファイルの表示

16
             <div style="float: right;" class="btn btn-link color-b"></div>
16
             <div style="float: right;" class="btn btn-link color-b"></div>
17
           </div>
17
           </div>
18
           <br />
18
           <br />
19
-          <br />
20
-          <p>* You need to be logged in to submit your listing. Please register and log in if you have not done so already.</p>
19
+          <div v-if="!isLoggedIn">
20
+            <hr />
21
+            <Alert
22
+              :text="'* You need to be logged in to submit your listing. Please register and log in if you have not done so already.'"
23
+              :type="'WARNING'"
24
+            />
25
+          </div>
21
           <hr />
26
           <hr />
27
+          <br />
22
           <div class="form-group row">
28
           <div class="form-group row">
23
             <div class="col-md-4">
29
             <div class="col-md-4">
24
               <div class="form-group">
30
               <div class="form-group">
118
                     >
124
                     >
119
                       <option value="Other">Other</option>
125
                       <option value="Other">Other</option>
120
                       <option
126
                       <option
121
-                        v-for="(resort, r) in resorts"
127
+                        v-for="(resort, r) in filteredResort"
122
                         :key="r"
128
                         :key="r"
123
                         :value="resort"
129
                         :value="resort"
124
                       >{{resort.resortName}}</option>
130
                       >{{resort.resortName}}</option>
507
 import DetailIndividual from '../../user/timeshareIndividual.vue';
513
 import DetailIndividual from '../../user/timeshareIndividual.vue';
508
 import BankDetails from '../../shared/bankAccount.vue';
514
 import BankDetails from '../../shared/bankAccount.vue';
509
 import Address from '../../misc/address.vue';
515
 import Address from '../../misc/address.vue';
516
+import Alert from '../../shared/alert.vue';
510
 
517
 
511
 export default {
518
 export default {
512
   name: 'TimeshareToSell',
519
   name: 'TimeshareToSell',
513
-  components: { DetailIndividual, BankDetails, Address },
520
+  components: {
521
+    DetailIndividual,
522
+    BankDetails,
523
+    Address,
524
+    Alert,
525
+  },
514
   created() {
526
   created() {
515
     this.initTimeshare();
527
     this.initTimeshare();
516
   },
528
   },
528
       'agencies',
540
       'agencies',
529
       'agents',
541
       'agents',
530
     ]),
542
     ]),
543
+    ...mapState('authentication', ['isLoggedIn']),
531
     refAgent() {
544
     refAgent() {
532
       return this.sellItem && this.sellItem.referedByAgent;
545
       return this.sellItem && this.sellItem.referedByAgent;
533
     },
546
     },
547
+    filteredResort() {
548
+      let list = [];
549
+      if (
550
+        this.sellItem
551
+        && this.sellItem.region
552
+        && this.sellItem.region.regionCode
553
+      ) {
554
+        const item = this.detailedRegion.find(
555
+          region => region.region.regionCode === this.sellItem.region.regionCode,
556
+        );
557
+        if (item) {
558
+          list = item.children;
559
+        }
560
+      } else {
561
+        list = this.resorts;
562
+      }
563
+      return _.sortBy(list, x => x.resortName);
564
+    },
534
   },
565
   },
535
   methods: {
566
   methods: {
536
     submitSale() {
567
     submitSale() {
537
-      this.saveWeek(this.sellItem);
568
+      if (this.isLoggedIn) {
569
+        this.saveWeek(this.sellItem);
570
+      } else this.$router.push('/user/login');
538
     },
571
     },
539
     previewFiles(event) {
572
     previewFiles(event) {
540
       console.log(event.target.files);
573
       console.log(event.target.files);

+ 9
- 10
src/components/user/registerAgencySection.vue ファイルの表示

197
           <div class="form-group row"></div>
197
           <div class="form-group row"></div>
198
           <div class="row offset-md-1">
198
           <div class="row offset-md-1">
199
             <div class="col-md-2">
199
             <div class="col-md-2">
200
-              <button @click="SubmitData()" class="btn btn-b-n" type="button">Submit</button>
200
+              <button
201
+                @click="SubmitData()"
202
+                class="btn btn-b-n"
203
+                type="button"
204
+                data-dismiss="modal"
205
+              >Submit</button>
201
             </div>
206
             </div>
202
             <div class="col-md-2 offset-md-1">
207
             <div class="col-md-2 offset-md-1">
203
               <button
208
               <button
204
                 @click="Close(routerGoTo('/user/login'))"
209
                 @click="Close(routerGoTo('/user/login'))"
205
                 class="btn btn-b-n"
210
                 class="btn btn-b-n"
206
                 type="button"
211
                 type="button"
212
+                data-dismiss="modal"
207
               >Cancel</button>
213
               >Cancel</button>
208
             </div>
214
             </div>
209
           </div>
215
           </div>
215
 
221
 
216
 <script>
222
 <script>
217
 import { mapState, mapActions } from 'vuex';
223
 import { mapState, mapActions } from 'vuex';
218
-// import RegisterPage from './registerPage.vue';
219
 
224
 
220
 export default {
225
 export default {
221
-  // data() {
222
-  //   return {
223
-  //     RegisterHeader: 'Agency Administrator Details',
224
-  //   };
225
-  // },
226
   name: 'Agency',
226
   name: 'Agency',
227
-  // components: { RegisterPage },
228
   data() {
227
   data() {
229
     return {
228
     return {
230
       user: null,
229
       user: null,
238
     };
237
     };
239
   },
238
   },
240
   computed: {
239
   computed: {
241
-    ...mapState('registerAgency', ['registerAgency']),
240
+    ...mapState('register', ['registerAgency']),
242
   },
241
   },
243
   methods: {
242
   methods: {
244
-    ...mapActions('registerAgency', [
243
+    ...mapActions('register', [
245
       'getAgency',
244
       'getAgency',
246
       'saveAgency',
245
       'saveAgency',
247
       'updateAgency',
246
       'updateAgency',

+ 9
- 4
src/components/user/registerPage.vue ファイルの表示

143
           <div class="form-group row"></div>
143
           <div class="form-group row"></div>
144
           <div class="row offset-md-1">
144
           <div class="row offset-md-1">
145
             <div class="col-md-2">
145
             <div class="col-md-2">
146
-              <button @click="SubmitData()" class="btn btn-b-n" type="submit">Submit</button>
146
+              <button
147
+                @click="SubmitData()"
148
+                class="btn btn-b-n"
149
+                type="submit"
150
+                data-dismiss="modal"
151
+              >Submit</button>
147
             </div>
152
             </div>
148
             <div class="col-md-2 offset-md-1">
153
             <div class="col-md-2 offset-md-1">
149
-              <button @click="Close()" class="btn btn-b-n" type="submit">Cancel</button>
154
+              <button @click="Close()" class="btn btn-b-n" type="submit" data-dismiss="modal">Cancel</button>
150
             </div>
155
             </div>
151
           </div>
156
           </div>
152
         </div>
157
         </div>
176
     };
181
     };
177
   },
182
   },
178
   computed: {
183
   computed: {
179
-    ...mapState('registerIndividual', ['registerIndividual']),
184
+    ...mapState('register', ['registerIndividual']),
180
 
185
 
181
     Header() {
186
     Header() {
182
       return this.RegisterHeader
187
       return this.RegisterHeader
185
     },
190
     },
186
   },
191
   },
187
   methods: {
192
   methods: {
188
-    ...mapActions('registerIndividual', [
193
+    ...mapActions('register', [
189
       'getIndividual',
194
       'getIndividual',
190
       'saveIndividual',
195
       'saveIndividual',
191
       'updateIndividual',
196
       'updateIndividual',

+ 25
- 7
src/components/user/updateProfileInfo.vue ファイルの表示

36
             <td>
36
             <td>
37
               <button
37
               <button
38
                 type="button"
38
                 type="button"
39
-                @click="Edit(item)"
40
-                class="btn btn-b-n"
41
-                style="width: 85px; height:40px;"
39
+                data-toggle="modal"
40
+                :data-target="'#myModal' + i"
41
+                class="btn"
42
+                style="margin:2px; color: #60CBEB"
42
               >Edit</button>
43
               >Edit</button>
44
+              <div :id="'myModal' + i" class="modal fade" role="dialog">
45
+                <div class="modal-dialog modal-lg">
46
+                  <div class="modal-content">
47
+                    <div class="modal-header">
48
+                      <button type="button" class="close" data-dismiss="modal">&times;</button>
49
+                    </div>
50
+                    <div padding-left="20px">
51
+                      <Individual name="PrivateIndividual" :isAddIndividual="false" :item="item" />
52
+                    </div>
53
+                  </div>
54
+                </div>
55
+              </div>
43
             </td>
56
             </td>
44
           </tr>
57
           </tr>
45
         </tbody>
58
         </tbody>
51
 
64
 
52
 <script>
65
 <script>
53
 import { mapState, mapActions } from 'vuex';
66
 import { mapState, mapActions } from 'vuex';
54
-// import axios from 'axios';
67
+import Individual from './registerPage.vue';
55
 
68
 
56
 export default {
69
 export default {
57
   name: 'UpdateInfo',
70
   name: 'UpdateInfo',
71
+  components: {
72
+    Individual,
73
+  },
58
   data() {
74
   data() {
59
-    return {};
75
+    return {
76
+      item: {},
77
+    };
60
   },
78
   },
61
   methods: {
79
   methods: {
62
-    ...mapActions('registerIndividual', ['getIndividuals']),
80
+    ...mapActions('register', ['getIndividuals']),
63
   },
81
   },
64
   mounted() {
82
   mounted() {
65
     this.getIndividuals();
83
     this.getIndividuals();
66
   },
84
   },
67
   computed: {
85
   computed: {
68
-    ...mapState('registerIndividual', ['individuals']),
86
+    ...mapState('register', ['individuals']),
69
   },
87
   },
70
 };
88
 };
71
 </script>
89
 </script>

+ 11
- 0
src/router/index.js ファイルの表示

34
 import userManagementPage from '../components/admin/status/userManagementPage.vue';
34
 import userManagementPage from '../components/admin/status/userManagementPage.vue';
35
 import changeLogPage from '../components/admin/status/changeLogPage.vue';
35
 import changeLogPage from '../components/admin/status/changeLogPage.vue';
36
 import UnitConfiguration from '../components/admin/unitConfiguration/unitConfigurationPage.vue';
36
 import UnitConfiguration from '../components/admin/unitConfiguration/unitConfigurationPage.vue';
37
+import agentManagementPage from '../components/admin/status/agentsUserManagementPage.vue';
37
 
38
 
38
 import ResortPage from '../components/timeshare/resort/resortPage.vue';
39
 import ResortPage from '../components/timeshare/resort/resortPage.vue';
39
 import UnitPage from '../components/timeshare/resort/unitPage.vue';
40
 import UnitPage from '../components/timeshare/resort/unitPage.vue';
104
       name: 'Login',
105
       name: 'Login',
105
       component: Login,
106
       component: Login,
106
     },
107
     },
108
+    {
109
+      path: '/user/updateProfileInfo',
110
+      name: 'UpdateInfo',
111
+      component: UpdateInfo,
112
+    },
107
     {
113
     {
108
       path: '/user/register',
114
       path: '/user/register',
109
       name: 'PrivateIndividual',
115
       name: 'PrivateIndividual',
199
       name: 'userManagementPage',
205
       name: 'userManagementPage',
200
       component: userManagementPage,
206
       component: userManagementPage,
201
     },
207
     },
208
+    {
209
+      path: '/status/agentUserManagementPage',
210
+      name: 'agentManagementPage',
211
+      component: agentManagementPage,
212
+    },
202
     {
213
     {
203
       path: '/status/changeLogPage',
214
       path: '/status/changeLogPage',
204
       name: 'changeLogPage',
215
       name: 'changeLogPage',

+ 1
- 2
src/store/index.js ファイルの表示

40
     propertyAdmin: PropertyAdminModule,
40
     propertyAdmin: PropertyAdminModule,
41
     propertyList: PropertyList,
41
     propertyList: PropertyList,
42
     propertyTypes: PropertyTypes,
42
     propertyTypes: PropertyTypes,
43
-    registerIndividual: Register,
44
-    registerAgency: Register,
43
+    register: Register,
45
     weekList: WeekList,
44
     weekList: WeekList,
46
     bid: Bid,
45
     bid: Bid,
47
     authentication: Authentication,
46
     authentication: Authentication,

+ 18
- 1
src/store/modules/timeshare/timeshare.js ファイルの表示

120
     },
120
     },
121
   },
121
   },
122
   getters: {
122
   getters: {
123
-
123
+    getRegionCode(state) {
124
+      return (value) => {
125
+        const reg = state.detailedRegion.find(region => region.children.some(resort => resort
126
+          .resortCode === value));
127
+        if (reg && reg.region) {
128
+          return reg.region.regionCode;
129
+        }
130
+        return '';
131
+      };
132
+    },
133
+    getResortName(state) {
134
+      return (value) => {
135
+        const res = state.resorts.find(resort => resort.resortCode === value);
136
+        if (res) {
137
+          return res.resortName;
138
+        }
139
+      };
140
+    },
124
   },
141
   },
125
   actions: {
142
   actions: {
126
     initTimeshare({
143
     initTimeshare({

+ 56
- 15
src/store/modules/timeshare/weekList.js ファイルの表示

1
+/* eslint-disable no-unused-expressions */
1
 /* eslint-disable eqeqeq */
2
 /* eslint-disable eqeqeq */
2
 /* eslint-disable no-restricted-syntax */
3
 /* eslint-disable no-restricted-syntax */
3
 /* eslint-disable guard-for-in */
4
 /* eslint-disable guard-for-in */
8
   namespaced: true,
9
   namespaced: true,
9
   state: {
10
   state: {
10
     weeks: [],
11
     weeks: [],
12
+    status: undefined,
11
     filter: {
13
     filter: {
14
+      status: undefined,
12
       region: undefined,
15
       region: undefined,
13
       resort: undefined,
16
       resort: undefined,
14
       bedrooms: undefined,
17
       bedrooms: undefined,
21
     difFilter: undefined,
24
     difFilter: undefined,
22
   },
25
   },
23
   mutations: {
26
   mutations: {
27
+    onLoading(state) {
28
+      state.status = 'Loading...';
29
+    },
30
+    onError(state) {
31
+      state.status = 'Error occurred getting data.';
32
+    },
24
     onClearFilter(state, filter) {
33
     onClearFilter(state, filter) {
25
       state.filter[filter] = undefined;
34
       state.filter[filter] = undefined;
26
     },
35
     },
27
     setWeeks(state, weeks) {
36
     setWeeks(state, weeks) {
28
       state.weeks = weeks;
37
       state.weeks = weeks;
38
+      state.status = '';
29
     },
39
     },
30
     addWeek(state, week) {
40
     addWeek(state, week) {
31
       state.weeks.push(week);
41
       state.weeks.push(week);
41
       const {
51
       const {
42
         filter,
52
         filter,
43
       } = state;
53
       } = state;
44
-      // console.log(JSON.stringify(weekList));
45
       if (filter) {
54
       if (filter) {
46
         if (filter.keyword) {
55
         if (filter.keyword) {
47
           const list = [];
56
           const list = [];
49
             const item = weekList[i];
58
             const item = weekList[i];
50
             for (const r in item) {
59
             for (const r in item) {
51
               const innerItem = item[r];
60
               const innerItem = item[r];
52
-              if (innerItem && JSON.stringify(innerItem).toLowerCase().includes(filter.keyword
53
-                .toLowerCase())) {
61
+              if (
62
+                innerItem
63
+                && JSON.stringify(innerItem)
64
+                  .toLowerCase()
65
+                  .includes(filter.keyword.toLowerCase())
66
+              ) {
54
                 list.push(item);
67
                 list.push(item);
55
                 break;
68
                 break;
56
               }
69
               }
59
           weekList = list;
72
           weekList = list;
60
         }
73
         }
61
         if (filter.region) {
74
         if (filter.region) {
62
-          weekList = _.filter(weekList, x => x.region && x.region.regionCode === filter.region
63
-            .regionCode);
75
+          weekList = _.filter(
76
+            weekList,
77
+            x => x.region && x.region.regionCode === filter.region.regionCode,
78
+          );
64
         }
79
         }
65
         if (filter.resort) {
80
         if (filter.resort) {
66
-          weekList = _.filter(weekList, x => x.resort.resortCode
67
-            && x.resort.resortCode === filter.resort.resortCode);
81
+          weekList = _.filter(
82
+            weekList,
83
+            x => x.resort.resortCode && x.resort.resortCode === filter.resort.resortCode,
84
+          );
68
         }
85
         }
69
         if (filter.bedrooms) {
86
         if (filter.bedrooms) {
70
           weekList = _.filter(weekList, x => x.bedrooms && x.bedrooms == filter.bedrooms);
87
           weekList = _.filter(weekList, x => x.bedrooms && x.bedrooms == filter.bedrooms);
74
           minDate.setDate(minDate.getDate() - 7);
91
           minDate.setDate(minDate.getDate() - 7);
75
           const maxDate = new Date(filter.date);
92
           const maxDate = new Date(filter.date);
76
           maxDate.setDate(maxDate.getDate() + 7);
93
           maxDate.setDate(maxDate.getDate() + 7);
77
-          weekList = _.filter(weekList, x => new Date(x.arrivalDate)
94
+          weekList = _.filter(
95
+            weekList,
96
+            x => new Date(x.arrivalDate)
78
             && new Date(x.departureDate)
97
             && new Date(x.departureDate)
79
             && new Date(x.arrivalDate) >= minDate
98
             && new Date(x.arrivalDate) >= minDate
80
-            && new Date(x.arrivalDate) <= maxDate);
99
+            && new Date(x.arrivalDate) <= maxDate,
100
+          );
81
         }
101
         }
82
         if (filter.minPrice && filter.minPrice !== 0) {
102
         if (filter.minPrice && filter.minPrice !== 0) {
83
-          weekList = _.filter(weekList, x => x.sellPrice
84
-            && x.sellPrice >= filter.minPrice);
103
+          weekList = _.filter(weekList, x => x.sellPrice && x.sellPrice >= filter.minPrice);
85
         }
104
         }
86
         if (filter.maxPrice && filter.maxPrice !== 0) {
105
         if (filter.maxPrice && filter.maxPrice !== 0) {
87
-          weekList = _.filter(weekList, x => x.sellPrice
88
-            && x.sellPrice <= filter.maxPrice);
106
+          weekList = _.filter(weekList, x => x.sellPrice && x.sellPrice <= filter.maxPrice);
89
         }
107
         }
90
       }
108
       }
91
-      return weekList;
109
+      return _.sortBy((_.sortBy(weekList, 'arrivalDate')), 'resort.resortName');
110
+    },
111
+    getRegions(state, getters, rootState, rootGetters) {
112
+      return rootGetters['timeshare/getRegionCode']('KK');
92
     },
113
     },
93
   },
114
   },
94
   actions: {
115
   actions: {
101
     },
122
     },
102
     getWeeks({
123
     getWeeks({
103
       commit,
124
       commit,
125
+      rootGetters,
104
     }) {
126
     }) {
127
+      commit('onLoading');
105
       axios
128
       axios
106
         .get('/api/timeshareweek')
129
         .get('/api/timeshareweek')
107
-        .then(result => commit('setWeeks', result.data))
130
+        .then((result) => {
131
+          const arr2 = result.data.filter(x => x.region !== null);
132
+          const arr3 = result.data.filter(x => x.region === null);
133
+          for (const item in arr3) {
134
+            const myItem = arr3[item];
135
+            if (myItem !== undefined) {
136
+              const code = myItem.resort.resortCode;
137
+              myItem.region = {
138
+                regionName: rootGetters['timeshare/getRegionCode'](code),
139
+              };
140
+              myItem.resort = {
141
+                resortName: rootGetters['timeshare/getResortName'](code),
142
+                resortCode: code,
143
+              };
144
+              arr2.push(myItem);
145
+            }
146
+          }
147
+          commit('setWeeks', arr2);
148
+        })
108
         .catch(console.error);
149
         .catch(console.error);
109
     },
150
     },
110
     clearFilter({
151
     clearFilter({

+ 4
- 0
vue.config.js ファイルの表示

5
         target: 'http://192.168.6.188:5000',
5
         target: 'http://192.168.6.188:5000',
6
         changeOrigin: true,
6
         changeOrigin: true,
7
       },
7
       },
8
+      '/nph-srep': {
9
+        target: 'http://www.unipoint-consoft.co.za',
10
+        changeOrigin: true,
11
+      },
8
     },
12
     },
9
   },
13
   },
10
 };
14
 };

読み込み中…
キャンセル
保存