@lancom/shared 0.0.124 → 0.0.127
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 +27 -0
- package/assets/js/api/helpers.js +2 -2
- package/assets/js/utils/quote.js +9 -1
- package/components/checkout/order/order-checkout-method/order-checkout-method.scss +8 -0
- package/components/checkout/order/order-checkout-method/order-checkout-method.vue +7 -7
- package/components/common/postcode_select/postcode-select.vue +1 -1
- package/components/products/products_autocomplete/products-autocomplete.scss +11 -0
- package/components/products/products_autocomplete/products-autocomplete.vue +11 -1
- package/package.json +1 -1
package/assets/js/api/admin.js
CHANGED
|
@@ -37,6 +37,21 @@ export default {
|
|
|
37
37
|
saveOrder(order) {
|
|
38
38
|
return order._id ? _put(`admin/order/${order._id}`, order) : _post('admin/order', order);
|
|
39
39
|
},
|
|
40
|
+
fetchPurchaseOrders(params) {
|
|
41
|
+
return _get(`admin/purchase-orders`, params);
|
|
42
|
+
},
|
|
43
|
+
fetchPurchaseOrderById(id, params) {
|
|
44
|
+
return _get(`admin/purchase-order/${id}`, params);
|
|
45
|
+
},
|
|
46
|
+
savePurchaseOrder(purchaseOrder) {
|
|
47
|
+
return purchaseOrder._id ? _put(`admin/purchase-order/${purchaseOrder._id}`, purchaseOrder) : _post('admin/purchase-order', purchaseOrder);
|
|
48
|
+
},
|
|
49
|
+
fetchPurchaseOrderWoTasks(purchaseOrderId) {
|
|
50
|
+
return _get(`admin/purchase-order/${purchaseOrderId}/wo-tasks`);
|
|
51
|
+
},
|
|
52
|
+
orderSubOrders(body) {
|
|
53
|
+
return _post('admin/sub-orders/ordered', body);
|
|
54
|
+
},
|
|
40
55
|
createOrderSubsequentInvoice(order, invoice) {
|
|
41
56
|
return _post(`admin/shop/${order.shop}/order/${order._id}/invoice`, invoice);
|
|
42
57
|
},
|
|
@@ -263,6 +278,18 @@ export default {
|
|
|
263
278
|
removeSupplier(id) {
|
|
264
279
|
return _delete(`admin/suppliers/${id}`);
|
|
265
280
|
},
|
|
281
|
+
async fetchDecorators(params) {
|
|
282
|
+
return sortByName(await _get('admin/decorators', params));
|
|
283
|
+
},
|
|
284
|
+
fetchDecoratorById(id) {
|
|
285
|
+
return _get(`admin/decorators/${id}`);
|
|
286
|
+
},
|
|
287
|
+
saveDecorator(decorator) {
|
|
288
|
+
return decorator._id ? _put(`admin/decorators/${decorator._id}`, decorator) : _post('admin/decorators', decorator);
|
|
289
|
+
},
|
|
290
|
+
removeDecorator(id) {
|
|
291
|
+
return _delete(`admin/decorators/${id}`);
|
|
292
|
+
},
|
|
266
293
|
async fetchWarehouses(params) {
|
|
267
294
|
return sortByName(await _get('admin/warehouse', params));
|
|
268
295
|
},
|
package/assets/js/api/helpers.js
CHANGED
|
@@ -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);
|
package/assets/js/utils/quote.js
CHANGED
|
@@ -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>
|
|
@@ -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(
|
|
87
|
+
this.$router.push(this.fullSearchLink);
|
|
78
88
|
},
|
|
79
89
|
showResults() {
|
|
80
90
|
clearTimeout(this.hideTimer);
|