Browse Source

Changed Update Profile Info

master
Lene Scholtz 5 years ago
parent
commit
36db99c5d4
1 changed files with 51 additions and 89 deletions
  1. 51
    89
      src/components/user/updateProfileInfo.vue

+ 51
- 89
src/components/user/updateProfileInfo.vue View File

@@ -2,116 +2,78 @@
2 2
   <!-- eslint-disable max-len -->
3 3
   <div class="container">
4 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>
5
+    <div class="title-box-d">
6
+      <h1 class="title-d" style="text-align:left; font-size: 250%">Update Profile Info</h1>
11 7
     </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>Modify</th>
24
-          </tr>
25
-        </thead>
26
-        <tbody>
27
-          <tr>
28
-            <td>{{ user.id }}</td>
29
-            <td>{{ indiv.name }}</td>
30
-            <td>{{ indiv.surname }}</td>
31
-            <td>{{ indiv.cellNumber }}</td>
32
-            <td>{{ indiv.landlineNumber }}</td>
33
-            <td>{{ indiv.emailAddress }}</td>
34
-            <td>{{ user.role }}</td>
35
-            <td>
36
-              <button
37
-                type="button"
38
-                data-toggle="modal"
39
-                :data-target="'#myModal' + i"
40
-                class="btn"
41
-                style="margin:2px; color: #60CBEB"
42
-              >Edit</button>
43
-              <div :id="'myModal' + i" class="modal fade" role="dialog">
44
-                <div class="modal-dialog modal-lg">
45
-                  <div class="modal-content">
46
-                    <div class="modal-header">
47
-                      <button type="button" class="close" data-dismiss="modal">&times;</button>
48
-                    </div>
49
-                    <div padding-left="20px">
50
-                      <Individual name="PrivateIndividual" :isAddIndividual="false" :item="item" />
51
-                    </div>
52
-                  </div>
53
-                </div>
54
-              </div>
55
-            </td>
56
-          </tr>
57
-        </tbody>
58
-      </table>
8
+    <div class="row mb-4">
9
+      <div class="container col-md-10">
10
+        <form
11
+          id="mainForm"
12
+          method="POST"
13
+          action="/to-sell"
14
+          accept-charset="UTF-8"
15
+          enctype="multipart/form-data"
16
+        >
17
+          <div class="col-md-12" style="text-align:left"></div>
18
+          <DetailIndividual :currentUser="sellItem.owner" :showBank="true" :showAddress="true" />
19
+        </form>
20
+      </div>
59 21
     </div>
60
-    <br />
61 22
   </div>
62 23
 </template>
63 24
 
64 25
 <script>
65 26
 import { mapState, mapActions, mapGetters } from 'vuex';
66
-import Individual from './registerPage.vue';
27
+import DetailIndividual from './timeshareIndividual.vue';
67 28
 
68 29
 export default {
69
-  name: 'UpdateInfo',
70
-  components: {
71
-    Individual,
72
-  },
73
-  props: {
74
-    currentUser: {
75
-      name: undefined,
76
-      surname: undefined,
77
-      idNumber: undefined,
78
-      companyRegNumber: undefined,
79
-      emailAddress: undefined,
80
-      cellNumber: undefined,
81
-      landlineNumer: undefined,
82
-      bankingDetails: {},
83
-      address: {},
84
-    },
85
-    showChangeCurrentUser: {
86
-      default: false,
87
-    },
88
-    showBank: {
89
-      default: false,
90
-    },
91
-    showAddress: {
92
-      default: false,
93
-    },
94
-  },
30
+  name: 'TimeshareToSell',
95 31
   data() {
96
-    return {
97
-      item: {},
98
-    };
32
+    return { selectedItem: {} };
33
+  },
34
+  props: {},
35
+  components: {
36
+    DetailIndividual,
99 37
   },
100 38
   mounted() {
101
-    if (!this.currentUser) {
102
-      if (this.user) {
103
-        this.getIndividual(this.user.id);
104
-      }
105
-    }
39
+    this.selectedItem = this.indiv;
106 40
   },
107 41
   computed: {
42
+    ...mapState('timeshare', [
43
+      'resorts',
44
+      'regions',
45
+      'detailedRegion',
46
+      'seasons',
47
+      'result',
48
+      'resortBedrooms',
49
+      'maxSleep',
50
+      'bankedEntities',
51
+      'sellItem',
52
+      'agencies',
53
+      'agents',
54
+    ]),
108 55
     ...mapState('individual', ['indiv']),
56
+    ...mapState('authentication', ['isLoggedIn']),
109 57
     ...mapGetters({
110 58
       user: 'authentication/getUser',
59
+      person: 'authentication/getPerson',
111 60
     }),
61
+    isLoggedIn() {
62
+      return this.user && this.person;
63
+    },
112 64
   },
113 65
   methods: {
114 66
     ...mapActions('individual', ['getIndividual']),
67
+    ...mapActions('timeshare', ['initTimeshare', 'onResortChange', 'saveWeek']),
115 68
   },
116 69
 };
117 70
 </script>
71
+<style>
72
+.myWell {
73
+  width: 100%;
74
+  background-color: #60cbeb;
75
+  border-radius: 6px;
76
+  padding: 5px;
77
+  margin: 3px;
78
+}
79
+</style>

Loading…
Cancel
Save