ソースを参照

Added Owner to sell store

master
LeneS 5年前
コミット
903bfc25e3

+ 12
- 56
src/components/misc/address.vue ファイルの表示

@@ -11,7 +11,12 @@
11 11
             <span class="input-group-text">
12 12
               <eva-icon name="home-outline" fill="#60CBEB"></eva-icon>
13 13
             </span>
14
-            <input class="form-control" type="text" name="streetnumber" />
14
+            <input
15
+              class="form-control"
16
+              type="text"
17
+              name="streetnumber"
18
+              v-model="address.streetNumber"
19
+            />
15 20
           </div>
16 21
         </div>
17 22
         <div class="col-md-6" style="margin-bottom: 1em">
@@ -20,7 +25,7 @@
20 25
             <span class="input-group-text">
21 26
               <eva-icon name="home-outline" fill="#60CBEB"></eva-icon>
22 27
             </span>
23
-            <input class="form-control" type="text" name="streetname" />
28
+            <input class="form-control" type="text" name="streetname" v-model="address.streetName" />
24 29
           </div>
25 30
         </div>
26 31
         <div class="col-md-6" style="margin-bottom: 1em">
@@ -29,7 +34,7 @@
29 34
             <span class="input-group-text">
30 35
               <eva-icon name="home-outline" fill="#60CBEB"></eva-icon>
31 36
             </span>
32
-            <input class="form-control" type="text" name="suburb" />
37
+            <input class="form-control" type="text" name="suburb" v-model="address.suburb" />
33 38
           </div>
34 39
         </div>
35 40
         <div class="col-md-6" style="margin-bottom: 1em">
@@ -38,7 +43,7 @@
38 43
             <span class="input-group-text">
39 44
               <eva-icon name="home-outline" fill="#60CBEB"></eva-icon>
40 45
             </span>
41
-            <input class="form-control" type="text" name="city" />
46
+            <input class="form-control" type="text" name="city" v-model="address.city" />
42 47
           </div>
43 48
         </div>
44 49
         <div class="col-md-6" style="margin-bottom: 1em">
@@ -47,7 +52,7 @@
47 52
             <span class="input-group-text">
48 53
               <eva-icon name="home-outline" fill="#60CBEB"></eva-icon>
49 54
             </span>
50
-            <input class="form-control" type="text" name="province" />
55
+            <input class="form-control" type="text" name="province" v-model="address.province" />
51 56
           </div>
52 57
         </div>
53 58
         <div class="col-md-6" style="margin-bottom: 1em">
@@ -56,7 +61,7 @@
56 61
             <span class="input-group-text">
57 62
               <eva-icon name="home-outline" fill="#60CBEB"></eva-icon>
58 63
             </span>
59
-            <input class="form-control" type="text" name="postalcode" />
64
+            <input class="form-control" type="text" name="postalcode" v-model="address.postalCode" />
60 65
           </div>
61 66
         </div>
62 67
       </div>
@@ -65,59 +70,10 @@
65 70
 </template>
66 71
 
67 72
 <script>
68
-import { mapState, mapActions } from "vuex";
69
-
70 73
 export default {
71 74
   props: {
72
-    RegisterHeader: { type: String, default: undefined }
73
-  },
74
-  name: "PrivateIndividual",
75
-  data() {
76
-    return {
77
-      user: null,
78
-      isPasswordShown: "password",
79
-      selectItems: [{ text: "password", value: 0 }],
80
-      selectErrors: "Some error with the field",
81
-      select: null,
82
-      textErrors: "Some error with the field",
83
-      text: "",
84
-      showPassword: false
85
-    };
86
-  },
87
-  computed: {
88
-    ...mapState("registerIndividual", ["registerIndividual"]),
89
-
90
-    Header() {
91
-      return this.RegisterHeader
92
-        ? "Agency Administrator Details"
93
-        : "Private Individual";
94
-    }
75
+    address: {},
95 76
   },
96
-  methods: {
97
-    ...mapActions("registerIndividual", [
98
-      "getIndividual",
99
-      "saveIndividual",
100
-      "updateIndividual",
101
-      "clearIndividual"
102
-    ]),
103
-
104
-    togglePassword() {
105
-      this.showPassword = true;
106
-      this.isPasswordShown = "text";
107
-    },
108
-    passwordToggled() {
109
-      this.showPassword = false;
110
-      this.isPasswordShown = "password";
111
-    },
112
-    SubmitData() {
113
-      this.saveIndividual(this.registerIndividual);
114
-
115
-      this.$router.push("/registerIndividual/");
116
-    },
117
-    Close() {
118
-      this.$router.push("/registerIndividual/");
119
-    }
120
-  }
121 77
 };
122 78
 </script>
123 79
 

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

@@ -0,0 +1,66 @@
1
+<template>
2
+  <!-- eslint-disable max-len -->
3
+  <div class="reg-page">
4
+    <div class="col-md-12" style="text-align:centre">
5
+      <h4>Banking Details</h4>
6
+      <div class="form-group row"></div>
7
+      <div class="row" style="text-align:left">
8
+        <div class="col-md-6" style="margin-bottom: 1em">
9
+          <label>Bank</label>
10
+          <div class="input-group-prepend">
11
+            <span class="input-group-text">
12
+              <eva-icon name="behance-outline" fill="#60CBEB"></eva-icon>
13
+            </span>
14
+            <input class="form-control" type="text" name="bank" v-model="bankingDetails.bank" />
15
+          </div>
16
+        </div>
17
+        <div class="col-md-6" style="margin-bottom: 1em">
18
+          <label>Account Number</label>
19
+          <div class="input-group-prepend">
20
+            <span class="input-group-text">
21
+              <eva-icon name="navigation-outline" fill="#60CBEB"></eva-icon>
22
+            </span>
23
+            <input
24
+              class="form-control"
25
+              type="text"
26
+              name="accountnumber"
27
+              v-model="bankingDetails.accountNumber"
28
+            />
29
+          </div>
30
+        </div>
31
+        <div class="col-md-6" style="margin-bottom: 1em">
32
+          <label>Account Holder</label>
33
+          <div class="input-group-prepend">
34
+            <span class="input-group-text">
35
+              <eva-icon name="person-done-outline" fill="#60CBEB"></eva-icon>
36
+            </span>
37
+            <input
38
+              class="form-control"
39
+              type="text"
40
+              name="accountholder"
41
+              v-model="bankingDetails.accountHolder"
42
+            />
43
+          </div>
44
+        </div>
45
+      </div>
46
+    </div>
47
+  </div>
48
+</template>
49
+
50
+<script>
51
+export default {
52
+  props: {
53
+    bankingDetails: {
54
+      bank: undefined,
55
+      accountNumber: undefined,
56
+      accountHolder: undefined,
57
+    },
58
+  },
59
+};
60
+</script>
61
+
62
+<style>
63
+.goDown {
64
+  margin-top: 150px;
65
+}
66
+</style>

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

@@ -0,0 +1,9 @@
1
+<template>
2
+  <div>Sataliet!!!!!!!!!!!!!</div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  name: 'nasa',
8
+};
9
+</script>

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

@@ -219,11 +219,12 @@
219 219
                 <option v-for="(item, i) in bankedEntities" :key="i">{{item}}</option>
220 220
               </select>
221 221
             </div>
222
-            <br />
223
-            <br />
224
-            <br />
225
-            <DetailIndividual />
226
-            <Address />
222
+            <DetailIndividual :owner="sellItem.owner" />
223
+            <hr />
224
+            <Address :address="sellItem.owner" />
225
+            <hr />
226
+            <BankDetails :bankingDetails="sellItem.owner.bankingDetails" />
227
+            <hr />
227 228
           </div>
228 229
           <hr />
229 230
           <br />
@@ -451,32 +452,36 @@
451 452
   </div>
452 453
 </template>
453 454
 <script>
454
-import { mapState, mapActions } from "vuex";
455
-import DetailIndividual from "../../user/timeshareIndividual.vue";
456
-import Address from "../../misc/address.vue";
455
+import { mapState, mapActions } from 'vuex';
456
+import DetailIndividual from '../../user/timeshareIndividual.vue';
457
+import BankDetails from '../../shared/bankAccount.vue';
458
+import Address from '../../misc/address.vue';
457 459
 
458 460
 export default {
459
-  name: "TimeshareToSell",
460
-  components: { DetailIndividual, Address },
461
+  name: 'TimeshareToSell',
462
+  components: { DetailIndividual, BankDetails, Address },
461 463
   created() {
462 464
     this.initTimeshare();
463 465
   },
464 466
   computed: {
465
-    ...mapState("timeshare", [
466
-      "resorts",
467
-      "regions",
468
-      "detailedRegion",
469
-      "seasons",
470
-      "resortBedrooms",
471
-      "maxSleep",
472
-      "bankedEntities",
473
-      "sellItem",
474
-      "agencies",
475
-      "agents"
467
+    ...mapState('timeshare', [
468
+      'resorts',
469
+      'regions',
470
+      'detailedRegion',
471
+      'seasons',
472
+      'resortBedrooms',
473
+      'maxSleep',
474
+      'bankedEntities',
475
+      'sellItem',
476
+      'agencies',
477
+      'agents',
478
+      'indivdual',
479
+      'address',
480
+      'bankingDetails',
476 481
     ]),
477 482
     refAgent() {
478 483
       return this.sellItem && this.sellItem.referedByAgent;
479
-    }
484
+    },
480 485
   },
481 486
   methods: {
482 487
     previewFiles(event) {
@@ -498,7 +503,7 @@ export default {
498 503
       this.sellItem.currentYearBanked = !this.sellItem.currentYearBanked;
499 504
     },
500 505
     resortChange() {
501
-      if (this.sellItem && this.sellItem.resort === "Other") {
506
+      if (this.sellItem && this.sellItem.resort === 'Other') {
502 507
         this.sellItem.otherResortName = undefined;
503 508
         this.sellItem.otherResort = true;
504 509
       } else {
@@ -506,7 +511,7 @@ export default {
506 511
         this.sellItem.otherResort = false;
507 512
       }
508 513
     },
509
-    ...mapActions("timeshare", ["initTimeshare"])
510
-  }
514
+    ...mapActions('timeshare', ['initTimeshare']),
515
+  },
511 516
 };
512 517
 </script>

+ 20
- 73
src/components/user/timeshareIndividual.vue ファイルの表示

@@ -13,7 +13,7 @@
13 13
             <span class="input-group-text">
14 14
               <eva-icon name="person-outline" fill="#60CBEB"></eva-icon>
15 15
             </span>
16
-            <input class="form-control" type="text" name="name" v-model="registerIndividual.name" />
16
+            <input class="form-control" type="text" name="name" v-model="owner.name" />
17 17
           </div>
18 18
         </div>
19 19
         <div class="col-md-6" style="margin-bottom: 1em">
@@ -22,12 +22,7 @@
22 22
             <span class="input-group-text">
23 23
               <eva-icon name="book-outline" fill="#60CBEB"></eva-icon>
24 24
             </span>
25
-            <input
26
-              class="form-control"
27
-              type="text"
28
-              name="surname"
29
-              v-model="registerIndividual.surname"
30
-            />
25
+            <input class="form-control" type="text" name="surname" v-model="owner.surname" />
31 26
           </div>
32 27
         </div>
33 28
         <div class="col-md-6" style="margin-bottom: 1em">
@@ -36,7 +31,7 @@
36 31
             <span class="input-group-text">
37 32
               <eva-icon name="archive" fill="#60CBEB"></eva-icon>
38 33
             </span>
39
-            <input class="form-control" type="text" name="idnumber" />
34
+            <input class="form-control" type="text" name="idnumber" v-model="owner.idNumber" />
40 35
           </div>
41 36
         </div>
42 37
         <div class="col-md-6" style="margin-bottom: 1em">
@@ -45,7 +40,12 @@
45 40
             <span class="input-group-text">
46 41
               <eva-icon name="npm-outline" fill="#60CBEB"></eva-icon>
47 42
             </span>
48
-            <input class="form-control" type="text" name="companyregnumber" />
43
+            <input
44
+              class="form-control"
45
+              type="text"
46
+              name="companyregnumber"
47
+              v-model="owner.companyRegNumber"
48
+            />
49 49
           </div>
50 50
         </div>
51 51
         <div class="col-md-6" style="margin-bottom: 1em">
@@ -54,7 +54,12 @@
54 54
             <span class="input-group-text">
55 55
               <eva-icon name="people-outline" fill="#60CBEB"></eva-icon>
56 56
             </span>
57
-            <input class="form-control" type="text" name="maritalstatus" />
57
+            <input
58
+              class="form-control"
59
+              type="text"
60
+              name="maritalstatus"
61
+              v-model="owner.maritalstatus"
62
+            />
58 63
           </div>
59 64
         </div>
60 65
         <div class="col-md-6" style="margin-bottom: 1em">
@@ -63,7 +68,7 @@
63 68
             <span class="input-group-text">
64 69
               <eva-icon name="email-outline" fill="#60CBEB"></eva-icon>
65 70
             </span>
66
-            <input class="form-control" type="text" name="email" v-model="registerIndividual.email" />
71
+            <input class="form-control" type="text" name="email" v-model="owner.email" />
67 72
           </div>
68 73
         </div>
69 74
         <div class="col-md-6" style="margin-bottom: 1em">
@@ -72,12 +77,7 @@
72 77
             <span class="input-group-text">
73 78
               <eva-icon name="smartphone-outline" fill="#60CBEB"></eva-icon>
74 79
             </span>
75
-            <input
76
-              class="form-control"
77
-              type="text"
78
-              name="cellnumber"
79
-              v-model="registerIndividual.cellNumber"
80
-            />
80
+            <input class="form-control" type="text" name="cellnumber" v-model="owner.cellNumber" />
81 81
           </div>
82 82
         </div>
83 83
         <div class="col-md-6" style="margin-bottom: 1em">
@@ -86,12 +86,7 @@
86 86
             <span class="input-group-text">
87 87
               <eva-icon name="phone-outline" fill="#60CBEB"></eva-icon>
88 88
             </span>
89
-            <input
90
-              class="form-control"
91
-              type="text"
92
-              name="landline"
93
-              v-model="registerIndividual.telephone"
94
-            />
89
+            <input class="form-control" type="text" name="landline" v-model="owner.telephone" />
95 90
           </div>
96 91
         </div>
97 92
       </div>
@@ -100,59 +95,11 @@
100 95
 </template>
101 96
 
102 97
 <script>
103
-import { mapState, mapActions } from "vuex";
104
-
105 98
 export default {
99
+  component: {},
106 100
   props: {
107
-    RegisterHeader: { type: String, default: undefined }
108
-  },
109
-  name: "PrivateIndividual",
110
-  data() {
111
-    return {
112
-      user: null,
113
-      isPasswordShown: "password",
114
-      selectItems: [{ text: "password", value: 0 }],
115
-      selectErrors: "Some error with the field",
116
-      select: null,
117
-      textErrors: "Some error with the field",
118
-      text: "",
119
-      showPassword: false
120
-    };
121
-  },
122
-  computed: {
123
-    ...mapState("registerIndividual", ["registerIndividual"]),
124
-
125
-    Header() {
126
-      return this.RegisterHeader
127
-        ? "Agency Administrator Details"
128
-        : "Private Individual";
129
-    }
101
+    owner: {},
130 102
   },
131
-  methods: {
132
-    ...mapActions("registerIndividual", [
133
-      "getIndividual",
134
-      "saveIndividual",
135
-      "updateIndividual",
136
-      "clearIndividual"
137
-    ]),
138
-
139
-    togglePassword() {
140
-      this.showPassword = true;
141
-      this.isPasswordShown = "text";
142
-    },
143
-    passwordToggled() {
144
-      this.showPassword = false;
145
-      this.isPasswordShown = "password";
146
-    },
147
-    SubmitData() {
148
-      this.saveIndividual(this.registerIndividual);
149
-
150
-      this.$router.push("/registerIndividual/");
151
-    },
152
-    Close() {
153
-      this.$router.push("/registerIndividual/");
154
-    }
155
-  }
156 103
 };
157 104
 </script>
158 105
 

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

@@ -23,7 +23,6 @@ export default {
23 23
       otherResortName: undefined,
24 24
       resort: undefined,
25 25
       region: undefined,
26
-      owner: undefined,
27 26
       season: undefined,
28 27
       module: undefined,
29 28
       unitNumber: undefined,
@@ -43,6 +42,29 @@ export default {
43 42
       agentCommission: undefined,
44 43
       mandate: undefined,
45 44
       status: undefined,
45
+      owner: {
46
+        name: undefined,
47
+        surname: undefined,
48
+        idNumber: undefined,
49
+        companyRegNumber: undefined,
50
+        maritalStatus: undefined,
51
+        emailAddress: undefined,
52
+        cellNumber: undefined,
53
+        landlineNumber: undefined,
54
+        address: {
55
+          streetNumber: undefined,
56
+          streetName: undefined,
57
+          suburb: undefined,
58
+          city: undefined,
59
+          province: undefined,
60
+          postalCode: undefined,
61
+        },
62
+        bankingDetails: {
63
+          bank: undefined,
64
+          accountNumber: undefined,
65
+          accountHolder: undefined,
66
+        },
67
+      },
46 68
     },
47 69
   },
48 70
   mutations: {

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