ソースを参照

Added Update Profile

master
Lene Scholtz 5年前
コミット
cf5f883406

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

@@ -186,6 +186,17 @@
186 186
                 <a class="dropdown-item cursor-pointer" @click="routerGoTo('/Offers')">Offers</a>
187 187
               </div>
188 188
             </li>
189
+            <li v-if="isLoggedIn">
190
+              <a
191
+                class="nav-link"
192
+                @click="routerGoTo('/user/updateProfileInfo')"
193
+                id="navbarDropdown"
194
+                role="button"
195
+                data-toggle="dropdown"
196
+                aria-haspopup="true"
197
+                aria-expanded="false"
198
+              >Update Profile</a>
199
+            </li>
189 200
             <li class="nav-item dropdown" v-if="!isLoggedIn">
190 201
               <a
191 202
                 class="nav-link"

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

@@ -119,7 +119,7 @@
119 119
                   class="form-control"
120 120
                   :type="isPasswordShown"
121 121
                   v-model="registerIndividual.password"
122
-                  id="password"
122
+                  id="confirmpassword"
123 123
                   placeholder="Confirm Password"
124 124
                   name="confirmpassword"
125 125
                   value

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

@@ -0,0 +1,71 @@
1
+<template>
2
+  <!-- eslint-disable max-len -->
3
+  <div class="container">
4
+    <br />
5
+    <div class="row">
6
+      <div class="col-md-12 col-lg-8">
7
+        <div class="title-box-d">
8
+          <h1 class="title-d" style="text-align:left; font-size: 250%">Update Profile Info</h1>
9
+        </div>
10
+      </div>
11
+    </div>
12
+    <div class="container">
13
+      <table class="table table-bordered">
14
+        <thead>
15
+          <tr>
16
+            <th>ID</th>
17
+            <th>Name</th>
18
+            <th>Surname</th>
19
+            <th>Cell Number</th>
20
+            <th>Telephone Number</th>
21
+            <th>Email</th>
22
+            <th>Role</th>
23
+            <th></th>
24
+          </tr>
25
+        </thead>
26
+        <tbody>
27
+          <tr v-for="(item, i) in individuals" :key="i">
28
+            <td>{{ item.id }}</td>
29
+            <td>{{ item.name }}</td>
30
+            <td>{{ item.surname }}</td>
31
+            <td>{{ item.cellNumber }}</td>
32
+            <td>{{ item.telephone }}</td>
33
+            <td>{{ item.email }}</td>
34
+            <td v-if="item.user">{{ item.user.role }}</td>
35
+            <td v-else></td>
36
+            <td>
37
+              <button
38
+                type="button"
39
+                @click="Edit(item)"
40
+                class="btn btn-b-n"
41
+                style="width: 85px; height:40px;"
42
+              >Edit</button>
43
+            </td>
44
+          </tr>
45
+        </tbody>
46
+      </table>
47
+    </div>
48
+    <br />
49
+  </div>
50
+</template>
51
+
52
+<script>
53
+import { mapState, mapActions } from 'vuex';
54
+// import axios from 'axios';
55
+
56
+export default {
57
+  name: 'UpdateInfo',
58
+  data() {
59
+    return {};
60
+  },
61
+  methods: {
62
+    ...mapActions('registerIndividual', ['getIndividuals']),
63
+  },
64
+  mounted() {
65
+    this.getIndividuals();
66
+  },
67
+  computed: {
68
+    ...mapState('registerIndividual', ['individuals']),
69
+  },
70
+};
71
+</script>

+ 189
- 183
src/router/index.js ファイルの表示

@@ -13,6 +13,7 @@ import MyWeeksPage from '../components/timeshare/myWeeksPage.vue';
13 13
 import Login from '../components/user/loginPage.vue';
14 14
 import PrivateIndividual from '../components/user/registerPage.vue';
15 15
 import Agency from '../components/user/registerAgencySection.vue';
16
+import UpdateInfo from '../components/user/updateProfileInfo.vue';
16 17
 
17 18
 import PropertySearch from '../components/property/propertySearchPage.vue';
18 19
 import PropertyPage from '../components/property/propertyPage.vue';
@@ -46,7 +47,6 @@ import searchLog from '../components/admin/logs/SearchLogs.vue';
46 47
 
47 48
 Vue.use(Router);
48 49
 
49
-
50 50
 export default new Router({
51 51
   scrollBehavior(to, from, savedPosition) {
52 52
     return {
@@ -54,187 +54,193 @@ export default new Router({
54 54
       y: 0,
55 55
     };
56 56
   },
57
-  routes: [{
58
-    path: '/',
59
-    name: 'Home',
60
-    component: HomePage,
61
-  },
62
-  {
63
-    path: '/about/us',
64
-    name: 'aboutus',
65
-    component: AboutUs,
66
-  },
67
-  {
68
-    path: '/about/timeshare',
69
-    name: 'abouttimeshare',
70
-    component: AboutTimeshare,
71
-  },
72
-  {
73
-    path: '/timeshare/sell',
74
-    name: 'TimeshareSell',
75
-    component: TimeshareSell,
76
-  },
77
-  {
78
-    path: '/timeshare/buy',
79
-    name: 'TimeshareBuy',
80
-    component: TimeshareBuy,
81
-  },
82
-  {
83
-    path: '/timeshare/faq',
84
-    name: 'TimeshareFAQ',
85
-    component: TimeshareFAQ,
86
-  },
87
-  {
88
-    path: '/timeshare/myWeeks',
89
-    name: 'MyWeeks',
90
-    component: MyWeeksPage,
91
-  },
92
-  {
93
-    path: '/user/login',
94
-    name: 'Login',
95
-    component: Login,
96
-  },
97
-  {
98
-    path: '/user/register',
99
-    name: 'PrivateIndividual',
100
-    component: PrivateIndividual,
101
-  },
102
-  {
103
-    path: '/user/registeragency',
104
-    name: 'Agency',
105
-    component: Agency,
106
-  },
107
-  {
108
-    path: '/property/property/:id',
109
-    name: 'PropertyPage',
110
-    component: PropertyPage,
111
-  },
112
-  {
113
-    path: '/property/:propertyUsageType/search',
114
-    name: 'PropertySearch',
115
-    component: PropertySearch,
116
-  },
117
-  {
118
-    path: '/property/search',
119
-    name: 'PropertySearchTab',
120
-    component: PropertySearch,
121
-  },
122
-  {
123
-    path: '/property/:propType/:saleType',
124
-    name: 'PropertyNew',
125
-    component: PropertyEdit,
126
-  },
127
-  {
128
-    path: '/property/edit/:id/:propType/:saleType',
129
-    name: 'PropertyEdit',
130
-    component: PropertyEdit,
131
-  },
132
-  {
133
-    path: '/property/list/:propertyType/:user',
134
-    name: 'PropertyList',
135
-    component: PropertyList,
136
-  },
137
-  {
138
-    path: '/propertyTypes/list',
139
-    name: 'PropertyTypeList',
140
-    component: PropertyTypeList,
141
-  },
142
-  {
143
-    path: '/propertyType/new',
144
-    name: 'PropertyTypeNew',
145
-    component: PropertyType,
146
-  },
147
-  {
148
-    path: '/propertyType/:id',
149
-    name: 'PropertyTypeEdit',
150
-    component: PropertyType,
151
-  },
152
-  {
153
-    path: '/userDefinedGroups/list',
154
-    name: 'UserDefinedGroupsList',
155
-    component: UserDefinedGroups,
156
-  },
157
-  {
158
-    path: '/userDefinedGroups/userDefinedGroup/:id',
159
-    name: 'UserDefinedGroupEdit',
160
-    component: UserDefinedGroup,
161
-  },
162
-  {
163
-    path: '/userDefinedGroups/userDefinedGroup',
164
-    name: 'UserDefinedGroupNew',
165
-    component: UserDefinedGroup,
166
-  },
167
-  {
168
-    path: '/status/list',
169
-    name: 'StatusList',
170
-    component: Status,
171
-  },
172
-  {
173
-    path: '/status/timeshareAdmin',
174
-    name: 'TimeshareAdmin',
175
-    component: timeshareAdminPage,
176
-  },
177
-  {
178
-    path: '/status/tenderWeekAdmin',
179
-    name: 'TenderWeekAdmin',
180
-    component: tenderWeekAdminPage,
181
-  },
182
-  {
183
-    path: '/status/userManagementPage',
184
-    name: 'userManagementPage',
185
-    component: userManagementPage,
186
-  },
187
-  {
188
-    path: '/status/changeLogPage',
189
-    name: 'changeLogPage',
190
-    component: changeLogPage,
191
-  },
192
-  {
193
-    path: '/unitConfiguration/list',
194
-    name: 'UnitConfiguration',
195
-    component: UnitConfiguration,
196
-  },
197
-  {
198
-    path: '/contactus',
199
-    name: 'ContactUs',
200
-    component: ContactUs,
201
-  },
202
-  {
203
-    path: '/privacypolicy',
204
-    name: 'PrivacyPolicy',
205
-    component: PrivacyPolicy,
206
-  },
207
-  {
208
-    path: '/resort/:resortCode',
209
-    name: 'ResortPage',
210
-    component: ResortPage,
211
-    props: true,
212
-  },
213
-  {
214
-    path: '/resort/:resortCode/:weekId',
215
-    name: 'UnitPage',
216
-    component: UnitPage,
217
-    props: true,
218
-  },
219
-  {
220
-    path: '/MakeOffer',
221
-    name: 'MakeOffer',
222
-    component: MakeOffer,
223
-  },
224
-  {
225
-    path: '/Offers',
226
-    name: 'Offers',
227
-    component: Offer,
228
-  },
229
-  {
230
-    path: '/timeshare/search',
231
-    name: 'TimeshareSearch',
232
-    component: TimeshareSearch,
233
-  },
234
-  {
235
-    path: '/searchLog',
236
-    name: 'SearchLog',
237
-    component: searchLog,
238
-  },
57
+  routes: [
58
+    {
59
+      path: '/',
60
+      name: 'Home',
61
+      component: HomePage,
62
+    },
63
+    {
64
+      path: '/about/us',
65
+      name: 'aboutus',
66
+      component: AboutUs,
67
+    },
68
+    {
69
+      path: '/about/timeshare',
70
+      name: 'abouttimeshare',
71
+      component: AboutTimeshare,
72
+    },
73
+    {
74
+      path: '/timeshare/sell',
75
+      name: 'TimeshareSell',
76
+      component: TimeshareSell,
77
+    },
78
+    {
79
+      path: '/timeshare/buy',
80
+      name: 'TimeshareBuy',
81
+      component: TimeshareBuy,
82
+    },
83
+    {
84
+      path: '/timeshare/faq',
85
+      name: 'TimeshareFAQ',
86
+      component: TimeshareFAQ,
87
+    },
88
+    {
89
+      path: '/timeshare/myWeeks',
90
+      name: 'MyWeeks',
91
+      component: MyWeeksPage,
92
+    },
93
+    {
94
+      path: '/user/login',
95
+      name: 'Login',
96
+      component: Login,
97
+    },
98
+    {
99
+      path: '/user/updateProfileInfo',
100
+      name: 'UpdateInfo',
101
+      component: UpdateInfo,
102
+    },
103
+    {
104
+      path: '/user/register',
105
+      name: 'PrivateIndividual',
106
+      component: PrivateIndividual,
107
+    },
108
+    {
109
+      path: '/user/registeragency',
110
+      name: 'Agency',
111
+      component: Agency,
112
+    },
113
+    {
114
+      path: '/property/property/:id',
115
+      name: 'PropertyPage',
116
+      component: PropertyPage,
117
+    },
118
+    {
119
+      path: '/property/:propertyUsageType/search',
120
+      name: 'PropertySearch',
121
+      component: PropertySearch,
122
+    },
123
+    {
124
+      path: '/property/search',
125
+      name: 'PropertySearchTab',
126
+      component: PropertySearch,
127
+    },
128
+    {
129
+      path: '/property/:propType/:saleType',
130
+      name: 'PropertyNew',
131
+      component: PropertyEdit,
132
+    },
133
+    {
134
+      path: '/property/edit/:id/:propType/:saleType',
135
+      name: 'PropertyEdit',
136
+      component: PropertyEdit,
137
+    },
138
+    {
139
+      path: '/property/list/:propertyType/:user',
140
+      name: 'PropertyList',
141
+      component: PropertyList,
142
+    },
143
+    {
144
+      path: '/propertyTypes/list',
145
+      name: 'PropertyTypeList',
146
+      component: PropertyTypeList,
147
+    },
148
+    {
149
+      path: '/propertyType/new',
150
+      name: 'PropertyTypeNew',
151
+      component: PropertyType,
152
+    },
153
+    {
154
+      path: '/propertyType/:id',
155
+      name: 'PropertyTypeEdit',
156
+      component: PropertyType,
157
+    },
158
+    {
159
+      path: '/userDefinedGroups/list',
160
+      name: 'UserDefinedGroupsList',
161
+      component: UserDefinedGroups,
162
+    },
163
+    {
164
+      path: '/userDefinedGroups/userDefinedGroup/:id',
165
+      name: 'UserDefinedGroupEdit',
166
+      component: UserDefinedGroup,
167
+    },
168
+    {
169
+      path: '/userDefinedGroups/userDefinedGroup',
170
+      name: 'UserDefinedGroupNew',
171
+      component: UserDefinedGroup,
172
+    },
173
+    {
174
+      path: '/status/list',
175
+      name: 'StatusList',
176
+      component: Status,
177
+    },
178
+    {
179
+      path: '/status/timeshareAdmin',
180
+      name: 'TimeshareAdmin',
181
+      component: timeshareAdminPage,
182
+    },
183
+    {
184
+      path: '/status/tenderWeekAdmin',
185
+      name: 'TenderWeekAdmin',
186
+      component: tenderWeekAdminPage,
187
+    },
188
+    {
189
+      path: '/status/userManagementPage',
190
+      name: 'userManagementPage',
191
+      component: userManagementPage,
192
+    },
193
+    {
194
+      path: '/status/changeLogPage',
195
+      name: 'changeLogPage',
196
+      component: changeLogPage,
197
+    },
198
+    {
199
+      path: '/unitConfiguration/list',
200
+      name: 'UnitConfiguration',
201
+      component: UnitConfiguration,
202
+    },
203
+    {
204
+      path: '/contactus',
205
+      name: 'ContactUs',
206
+      component: ContactUs,
207
+    },
208
+    {
209
+      path: '/privacypolicy',
210
+      name: 'PrivacyPolicy',
211
+      component: PrivacyPolicy,
212
+    },
213
+    {
214
+      path: '/resort/:resortCode',
215
+      name: 'ResortPage',
216
+      component: ResortPage,
217
+      props: true,
218
+    },
219
+    {
220
+      path: '/resort/:resortCode/:weekId',
221
+      name: 'UnitPage',
222
+      component: UnitPage,
223
+      props: true,
224
+    },
225
+    {
226
+      path: '/MakeOffer',
227
+      name: 'MakeOffer',
228
+      component: MakeOffer,
229
+    },
230
+    {
231
+      path: '/Offers',
232
+      name: 'Offers',
233
+      component: Offer,
234
+    },
235
+    {
236
+      path: '/timeshare/search',
237
+      name: 'TimeshareSearch',
238
+      component: TimeshareSearch,
239
+    },
240
+    {
241
+      path: '/searchLog',
242
+      name: 'SearchLog',
243
+      component: searchLog,
244
+    },
239 245
   ],
240 246
 });

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