@lancom/shared 0.0.125 → 0.0.126

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.
@@ -27,6 +27,6 @@ export const prepareHeaders = method => {
27
27
 
28
28
  export const _post = (url, data, config) => axiosApiInstance.post(buildPath(url), data, { ...config, headers: prepareHeaders() }).then(response => response.data);
29
29
  export const _get = (url, params) => axiosApiInstance.get(buildPath(url), { params, headers: prepareHeaders('get') }).then(response => response.data);
30
- export const _put = (url, data) => axiosApiInstance.put(buildPath(url), data, { headers: prepareHeaders() }).then(response => response.data);
31
- export const _patch = (url, data) => axiosApiInstance.patch(buildPath(url), data, { headers: prepareHeaders() }).then(response => response.data);
30
+ export const _put = (url, data) => axiosApiInstance.put(buildPath(url), { ...data, __v: undefined }, { headers: prepareHeaders() }).then(response => response.data);
31
+ export const _patch = (url, data) => axiosApiInstance.patch(buildPath(url), { ...data, __v: undefined }, { headers: prepareHeaders() }).then(response => response.data);
32
32
  export const _delete = (url, data) => axiosApiInstance.delete(buildPath(url), { data, headers: prepareHeaders() }).then(response => response.data);
@@ -14,7 +14,15 @@ export function convertQuoteToOrder(quote, option) {
14
14
  printsTotal: option.printsTotal,
15
15
  shippingTotal: option.shippingTotal,
16
16
  adminShippingTotal: option.adminShippingTotal,
17
- quote: quote._id
17
+ quote: quote._id,
18
+ resources: quote.file ? [{
19
+ status: 'pending approval',
20
+ prints: [],
21
+ revision: null,
22
+ note: null,
23
+ type: 'Artwork Files',
24
+ file: quote.file
25
+ }] : []
18
26
  };
19
27
  }
20
28
 
@@ -1,10 +1,18 @@
1
+ @import "@/assets/scss/variables";
2
+
1
3
  .OrderCheckoutMethod {
2
4
  &__controls {
3
5
  display: flex;
4
6
  width: 100%;
7
+ @media (max-width: $bp-small-max) {
8
+ flex-direction: column;
9
+ }
5
10
  > div {
6
11
  flex-grow: 1;
7
12
  margin: 0 5px;
13
+ @media (max-width: $bp-small-max) {
14
+ margin: 0 5px 20px 5px;
15
+ }
8
16
  }
9
17
  }
10
18
  }
@@ -10,13 +10,6 @@
10
10
  :btn-block="true"
11
11
  @onclick="isRegister = false" />
12
12
  </div>
13
- <div>
14
- <btn
15
- :btn-class="isRegister ? 'green' : 'white'"
16
- btn-label="REGISTER"
17
- :btn-block="true"
18
- @onclick="isRegister = true" />
19
- </div>
20
13
  <div style="margin-top: -10px">
21
14
  <progress-steps-controls
22
15
  next-btn-class="white"
@@ -24,6 +17,13 @@
24
17
  label-next="Checkout as Guest"
25
18
  @next="$emit('next')" />
26
19
  </div>
20
+ <div>
21
+ <btn
22
+ :btn-class="isRegister ? 'green' : 'white'"
23
+ btn-label="REGISTER"
24
+ :btn-block="true"
25
+ @onclick="isRegister = true" />
26
+ </div>
27
27
  </div>
28
28
  </div>
29
29
  </div>
@@ -27,7 +27,7 @@
27
27
  :allow-empty="false"
28
28
  :option-height="35"
29
29
  :loading="isLoading"
30
- track-by="value"
30
+ track-by="_id"
31
31
  @search-change="handleSearchWithDebounce">
32
32
  <div
33
33
  slot="singleLabel"
@@ -28,6 +28,17 @@
28
28
  text-decoration: none;
29
29
  }
30
30
  }
31
+ &-all {
32
+ padding: 10px;
33
+ text-align: center;
34
+ display: block;
35
+ background-color: $white;
36
+ border-bottom: 1px solid $gray_main;
37
+ &:hover {
38
+ background-color: $black;
39
+ color: $white;
40
+ }
41
+ }
31
42
  }
32
43
  &__input {
33
44
  input {
@@ -34,6 +34,13 @@
34
34
  :product="product"
35
35
  class="ProductsAutocomplete__result-item"
36
36
  @select="$emit('select', product)" />
37
+ <div class="ProductsAutocomplete__result-item">
38
+ <nuxt-link
39
+ class="ProductsAutocomplete__result-item-all"
40
+ :to="fullSearchLink">
41
+ click to see all results
42
+ </nuxt-link>
43
+ </div>
37
44
  </div>
38
45
  </div>
39
46
  </div>
@@ -70,11 +77,14 @@ export default {
70
77
  ...mapGetters(['shop']),
71
78
  hasProducts() {
72
79
  return this.products.length > 0;
80
+ },
81
+ fullSearchLink() {
82
+ return `/products?text=${this.text}`;
73
83
  }
74
84
  },
75
85
  methods: {
76
86
  goToSearch() {
77
- this.$router.push(`/products?text=${this.text}`);
87
+ this.$router.push(this.fullSearchLink);
78
88
  },
79
89
  showResults() {
80
90
  clearTimeout(this.hideTimer);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.125",
3
+ "version": "0.0.126",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {