@lancom/shared 0.0.390 → 0.0.392
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/js/api/admin.js +1 -1
- package/components/checkout/cart/cart.vue +1 -1
- package/components/checkout/order/order-success/order-success.scss +1 -0
- package/components/customer/customer_form/customer-form.vue +35 -23
- package/middleware/authenticated.js +5 -0
- package/package.json +1 -1
- package/pages/customer/coupons.vue +1 -0
- package/pages/customer/orders.vue +1 -0
- package/pages/customer/settings.vue +1 -0
- package/store/auth.js +1 -0
package/assets/js/api/admin.js
CHANGED
|
@@ -291,7 +291,7 @@ export default {
|
|
|
291
291
|
return customer._id ? _put(`admin/customer/${customer._id}`, customer) : _post('admin/customer', customer);
|
|
292
292
|
},
|
|
293
293
|
saveCustomerPassword(customer) {
|
|
294
|
-
return _put(`admin/customer/${customer._id}/password/${customer.passwordResetToken}`, customer);
|
|
294
|
+
return _put(`admin/customer/${customer._id}/password/${customer.passwordResetToken || customer._id}`, customer);
|
|
295
295
|
},
|
|
296
296
|
removeCustomer(id) {
|
|
297
297
|
return _delete(`admin/customer/${id}`);
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
</template>
|
|
75
75
|
|
|
76
76
|
<script>
|
|
77
|
-
import { mapGetters
|
|
77
|
+
import { mapGetters } from 'vuex';
|
|
78
78
|
import gtm from '@lancom/shared/assets/js/utils/gtm';
|
|
79
79
|
import CouponSelect from '@lancom/shared/components/common/coupon_select/coupon-select';
|
|
80
80
|
import CartQuantityErrors from '@lancom/shared/components/checkout/cart/cart_quantity_errors/cart-quantity-errors';
|
|
@@ -34,27 +34,31 @@
|
|
|
34
34
|
{{ errors[0] }}
|
|
35
35
|
</span>
|
|
36
36
|
</validation-provider>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="col-6">
|
|
37
39
|
<validation-provider
|
|
40
|
+
v-if="!customer._id"
|
|
38
41
|
v-slot="{ errors }"
|
|
39
42
|
tag="div"
|
|
40
|
-
name="
|
|
43
|
+
name="Password"
|
|
41
44
|
rules="required"
|
|
42
45
|
class="form-row">
|
|
43
46
|
<label
|
|
44
|
-
for="
|
|
47
|
+
for="password"
|
|
45
48
|
class="form-label">
|
|
46
|
-
|
|
49
|
+
Password
|
|
47
50
|
</label>
|
|
48
51
|
<input
|
|
49
|
-
id="
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
id="password"
|
|
53
|
+
ref="password"
|
|
54
|
+
v-model="customer.password"
|
|
55
|
+
name="password"
|
|
56
|
+
type="password"
|
|
53
57
|
class="form-field labelless"
|
|
54
|
-
placeholder="
|
|
58
|
+
placeholder="Password"
|
|
55
59
|
:class="{
|
|
56
60
|
'is-invalid': errors.length,
|
|
57
|
-
filled: customer.
|
|
61
|
+
filled: customer.password
|
|
58
62
|
}" />
|
|
59
63
|
<span
|
|
60
64
|
v-if="errors.length"
|
|
@@ -62,34 +66,31 @@
|
|
|
62
66
|
{{ errors[0] }}
|
|
63
67
|
</span>
|
|
64
68
|
</validation-provider>
|
|
65
|
-
<phone-input
|
|
66
|
-
v-model="customer.phone"
|
|
67
|
-
label-text="Phone (optional)" />
|
|
68
69
|
</div>
|
|
70
|
+
</div>
|
|
71
|
+
<div class="row">
|
|
69
72
|
<div class="col-6">
|
|
70
73
|
<validation-provider
|
|
71
|
-
v-if="!customer._id"
|
|
72
74
|
v-slot="{ errors }"
|
|
73
75
|
tag="div"
|
|
74
|
-
name="
|
|
76
|
+
name="First Name"
|
|
75
77
|
rules="required"
|
|
76
78
|
class="form-row">
|
|
77
79
|
<label
|
|
78
|
-
for="
|
|
80
|
+
for="firstName"
|
|
79
81
|
class="form-label">
|
|
80
|
-
|
|
82
|
+
First Name
|
|
81
83
|
</label>
|
|
82
84
|
<input
|
|
83
|
-
id="
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
type="password"
|
|
85
|
+
id="firstName"
|
|
86
|
+
v-model="customer.firstName"
|
|
87
|
+
name="firstName"
|
|
88
|
+
type="text"
|
|
88
89
|
class="form-field labelless"
|
|
89
|
-
placeholder="
|
|
90
|
+
placeholder="First Name"
|
|
90
91
|
:class="{
|
|
91
92
|
'is-invalid': errors.length,
|
|
92
|
-
filled: customer.
|
|
93
|
+
filled: customer.firstName
|
|
93
94
|
}" />
|
|
94
95
|
<span
|
|
95
96
|
v-if="errors.length"
|
|
@@ -97,6 +98,8 @@
|
|
|
97
98
|
{{ errors[0] }}
|
|
98
99
|
</span>
|
|
99
100
|
</validation-provider>
|
|
101
|
+
</div>
|
|
102
|
+
<div class="col-6">
|
|
100
103
|
<validation-provider
|
|
101
104
|
v-slot="{ errors }"
|
|
102
105
|
tag="div"
|
|
@@ -125,6 +128,15 @@
|
|
|
125
128
|
{{ errors[0] }}
|
|
126
129
|
</span>
|
|
127
130
|
</validation-provider>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
<div class="row">
|
|
134
|
+
<div class="col-6">
|
|
135
|
+
<phone-input
|
|
136
|
+
v-model="customer.phone"
|
|
137
|
+
label-text="Phone (optional)" />
|
|
138
|
+
</div>
|
|
139
|
+
<div class="col-6">
|
|
128
140
|
<validation-provider
|
|
129
141
|
v-slot="{ errors }"
|
|
130
142
|
tag="div"
|
package/package.json
CHANGED
|
@@ -13,6 +13,7 @@ import metaInfo from '@lancom/shared/mixins/meta-info';
|
|
|
13
13
|
|
|
14
14
|
export default {
|
|
15
15
|
name: 'CustomerCouponsPage',
|
|
16
|
+
middleware: 'authenticated',
|
|
16
17
|
components: {
|
|
17
18
|
CustomerCoupons: () => import('@lancom/shared/components/customer/customer_coupons/customer-coupons'),
|
|
18
19
|
CustomerMenu: () => import('@lancom/shared/components/customer/customer_navigation_menu/customer-navigation-menu')
|
|
@@ -13,6 +13,7 @@ import metaInfo from '@lancom/shared/mixins/meta-info';
|
|
|
13
13
|
|
|
14
14
|
export default {
|
|
15
15
|
name: 'CustomerOrdersPage',
|
|
16
|
+
middleware: 'authenticated',
|
|
16
17
|
components: {
|
|
17
18
|
CustomerOrders: () => import('@lancom/shared/components/customer/customer_orders/customer-orders'),
|
|
18
19
|
CustomerNavigationMenu: () => import('@lancom/shared/components/customer/customer_navigation_menu/customer-navigation-menu')
|
|
@@ -12,6 +12,7 @@ import metaInfo from '@lancom/shared/mixins/meta-info';
|
|
|
12
12
|
|
|
13
13
|
export default {
|
|
14
14
|
name: 'CustomerCreatePage',
|
|
15
|
+
middleware: 'authenticated',
|
|
15
16
|
components: {
|
|
16
17
|
CustomerNavigationMenu: () => import('@lancom/shared/components/customer/customer_navigation_menu/customer-navigation-menu'),
|
|
17
18
|
CustomerSettings: () => import('@lancom/shared/components/pages/customer/settings/settings')
|
package/store/auth.js
CHANGED