@lancom/shared 0.0.100 → 0.0.101

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.
@@ -118,6 +118,12 @@ export default {
118
118
  removeUser(id) {
119
119
  return _delete(`admin/user/${id}`);
120
120
  },
121
+ fetchInventoryHistory(params) {
122
+ return _get('admin/inventory-history', params);
123
+ },
124
+ fetchInventory(params) {
125
+ return _get('admin/inventory');
126
+ },
121
127
  fetchProducts(params) {
122
128
  return _get('admin/products', params);
123
129
  },
@@ -5,15 +5,14 @@
5
5
  </div>
6
6
  <div class="OrderBillingInformation__form">
7
7
  <validation-observer
8
- ref="form"
9
- v-slot="{ invalid }">
8
+ ref="form">
10
9
  <div class="OrderBillingInformation__content">
11
10
  <address-form
12
11
  :address="order.shippingAddress"
13
12
  :without-additional-info="true" />
14
13
  </div>
15
14
  <progress-steps-controls
16
- :disabled-next="invalid || !order.shippingAddress.postcode"
15
+ :disabled-next="!isValid"
17
16
  @prev="$emit('prev')"
18
17
  @next="submit" />
19
18
  </validation-observer>
@@ -40,11 +39,17 @@ export default {
40
39
  },
41
40
  data() {
42
41
  return {
43
- copyToShippingAddress: true
42
+ copyToShippingAddress: true,
43
+ isValid: true
44
44
  };
45
45
  },
46
46
  methods: {
47
- submit() {
47
+ async submit() {
48
+ this.isValid = await this.$refs.form.validate() && !!this.order.shippingAddress.postcode;
49
+ if (!this.isValid) {
50
+ return;
51
+ }
52
+
48
53
  if (this.copyToShippingAddress) {
49
54
  this.order.shippingAddress = { ...this.order.shippingAddress };
50
55
  this.$emit('next');
@@ -83,6 +83,7 @@ export default {
83
83
  const url = image && staticLink(image.thumb);
84
84
  this.$emit('onuploaded', { ...image, url });
85
85
  } catch (e) {
86
+ console.dir(e);
86
87
  this.onProgress(0);
87
88
  const { message, data } = e.response.data;
88
89
  if (message === 'Conversion failed' && this.hasConversionErrorModal) {
@@ -39,6 +39,9 @@
39
39
  <div class="lc_regular16">
40
40
  Order ID: {{ orderId }}
41
41
  </div>
42
+ <div class="lc_regular16">
43
+ Invoice ID: INV{{ orderId.replace('ORD', '') }}-01
44
+ </div>
42
45
  </div>
43
46
  </div>
44
47
  <table class="OrderView__table mt-4 lc_table bordered">
@@ -1,6 +1,8 @@
1
1
  <template>
2
2
  <article class="StaticPage__wrapper">
3
- <h1 class="StaticPage__title lc_h1">
3
+ <h1
4
+ v-if="visibleTitle"
5
+ class="StaticPage__title lc_h1">
4
6
  {{ item.title }}
5
7
  </h1>
6
8
  <div
@@ -16,6 +18,10 @@ export default {
16
18
  item: {
17
19
  type: Object,
18
20
  required: true
21
+ },
22
+ visibleTitle: {
23
+ type: Boolean,
24
+ default: true
19
25
  }
20
26
  }
21
27
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.100",
3
+ "version": "0.0.101",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {
@@ -8,7 +8,7 @@ export default ({ app }) => {
8
8
 
9
9
  if (process.client) {
10
10
  app.router.beforeEach((to, from, next) => {
11
- enabled = true;
11
+ // enabled = true;
12
12
  next();
13
13
  });
14
14
  }