@lancom/shared 0.0.103 → 0.0.104
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
CHANGED
|
@@ -206,6 +206,9 @@ export default {
|
|
|
206
206
|
async fetchSuppliers(params) {
|
|
207
207
|
return sortByName(await _get('admin/suppliers', params));
|
|
208
208
|
},
|
|
209
|
+
validateSuppliers() {
|
|
210
|
+
return _get('admin/suppliers/validate');
|
|
211
|
+
},
|
|
209
212
|
fetchSupplierById(id) {
|
|
210
213
|
return _get(`admin/suppliers/${id}`);
|
|
211
214
|
},
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
</div>
|
|
6
6
|
<div class="OrderBillingInformation__form">
|
|
7
7
|
<validation-observer
|
|
8
|
+
v-slot="{ invalid }"
|
|
8
9
|
ref="form">
|
|
9
10
|
<div class="OrderBillingInformation__content">
|
|
10
11
|
<address-form
|
|
@@ -12,7 +13,7 @@
|
|
|
12
13
|
:without-additional-info="true" />
|
|
13
14
|
</div>
|
|
14
15
|
<progress-steps-controls
|
|
15
|
-
:disabled-next="
|
|
16
|
+
:disabled-next="isSubmit && invalid"
|
|
16
17
|
@prev="$emit('prev')"
|
|
17
18
|
@next="submit" />
|
|
18
19
|
</validation-observer>
|
|
@@ -23,7 +24,6 @@
|
|
|
23
24
|
<script>
|
|
24
25
|
import AddressForm from '@lancom/shared/components/checkout/order/address-form/address-form';
|
|
25
26
|
import ProgressStepsControls from '@lancom/shared/components/common/progress_steps/progress_steps_controls/progress-steps-controls';
|
|
26
|
-
import { ORDER_STEPS } from '@lancom/shared/assets/js/constants/order';
|
|
27
27
|
|
|
28
28
|
export default {
|
|
29
29
|
name: 'OrderBillingInformation',
|
|
@@ -40,13 +40,15 @@ export default {
|
|
|
40
40
|
data() {
|
|
41
41
|
return {
|
|
42
42
|
copyToShippingAddress: true,
|
|
43
|
-
|
|
43
|
+
isSubmit: false
|
|
44
44
|
};
|
|
45
45
|
},
|
|
46
46
|
methods: {
|
|
47
47
|
async submit() {
|
|
48
|
-
this.
|
|
49
|
-
|
|
48
|
+
this.isSubmit = true;
|
|
49
|
+
|
|
50
|
+
const isValid = await this.$refs.form.validate() && !!this.order.shippingAddress.postcode;
|
|
51
|
+
if (!isValid) {
|
|
50
52
|
return;
|
|
51
53
|
}
|
|
52
54
|
|