@lancom/shared 0.0.267 → 0.0.269
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 +11 -11
- package/assets/js/constants/country.js +1 -1
- package/assets/js/utils/fabric-helper.js +10 -4
- package/assets/scss/ui_kit/_forms.scss +2 -2
- package/assets/scss/ui_kit/_tooltip.scss +3 -1
- package/assets/scss/variables/_theme.scss +3 -3
- package/components/checkout/cart/cart.mixin.js +5 -5
- package/components/checkout/cart/cart_price_info/cart-price-info.vue +2 -2
- package/components/checkout/cart/cart_shipments_pricing/cart-shipments-pricing.vue +2 -2
- package/components/checkout/order/address-form/address-form.vue +4 -3
- package/components/checkout/order/order-shipping-method/order-shipping-method.vue +2 -2
- package/components/checkout/order/order.vue +1 -1
- package/components/common/payment/payment_card/pinpayment/pinpayment.vue +34 -5
- package/components/common/postcode_select/postcode-select.vue +5 -1
- package/components/common/products_list_dropdown/products-list-dropdown.vue +1 -1
- package/components/common/products_total_pricing/products-total-pricing.vue +5 -1
- package/components/design/approve_design_header/approve-design-header.vue +1 -1
- package/components/editor/editor.vue +8 -2
- package/components/editor/editor_pricing/editor-pricing.vue +2 -2
- package/components/editor/editor_pricing/editor_pricing_details/editor_pricing_details_prints/editor-pricing-details-prints.vue +8 -7
- package/components/editor/editor_pricing/editor_pricing_details/editor_pricing_details_products/editor-pricing-details-products.vue +12 -4
- package/components/editor/editor_print_area_options/editor-print-area-options.scss +5 -4
- package/components/editor/editor_print_area_options/editor_print_area_option/editor-print-area-option.scss +39 -0
- package/components/editor/editor_print_area_options/editor_print_area_option/editor-print-area-option.vue +29 -6
- package/components/editor/editor_product_details/editor-product-details.scss +6 -0
- package/components/editor/editor_product_details/editor-product-details.vue +13 -3
- package/components/editor/editor_workspace/editor_workspace_side/editor-workspace-side.vue +12 -2
- package/components/faq/faq.vue +2 -2
- package/components/modals/order_modal/order-modal.vue +17 -3
- package/components/order/order_price/order-price.vue +5 -3
- package/components/order/order_prints_groups/order-prints-groups.vue +3 -1
- package/components/order/order_products_groups/order-products-groups.vue +3 -1
- package/components/order/order_refund_view/order-refund-view.vue +5 -3
- package/components/order/order_setup_groups/order-setup-groups.vue +4 -2
- package/components/order/order_sku_groups/order-sku-groups.vue +3 -1
- package/components/order/order_view/order-view.vue +10 -6
- package/components/pricing/pricing_digital_printing/pricing-digital-printing.vue +3 -1
- package/components/pricing/pricing_example/pricing-example.vue +3 -3
- package/components/pricing/pricing_how_we_calculate/pricing-how-we-calculate.vue +7 -2
- package/components/pricing/pricing_products_calculator/pricing_product_calculator/pricing-product-calculator.vue +2 -2
- package/components/pricing/pricing_screen_printing/pricing-screen-printing.vue +3 -1
- package/components/product/product_color_image/product-color-image.vue +2 -3
- package/components/product/product_price_range/product-price-range.vue +6 -5
- package/components/product/product_prints_price_info/product-prints-price-info.vue +2 -2
- package/components/products/products_autocomplete/products-autocomplete.scss +10 -12
- package/components/quotes/quote_request/quote-request.vue +1 -1
- package/components/quotes/quote_view/quote_option_view/quote-option-view.vue +5 -4
- package/mixins/meta-info.js +9 -2
- package/mixins/products-price.js +3 -2
- package/package.json +1 -1
- package/static/icons/print-area/back_hoodie.svg +3 -0
- package/static/icons/print-area/back_hoodie_a3.svg +4 -0
- package/static/icons/print-area/back_hoodie_a4_v.svg +4 -0
- package/static/icons/print-area/back_hoodie_half_a4_h.svg +4 -0
- package/static/icons/print-area/back_hoodie_rect10_l.svg +4 -0
- package/static/icons/print-area/back_polo.svg +3 -0
- package/static/icons/print-area/back_polo_a3.svg +4 -0
- package/static/icons/print-area/back_polo_a4_v.svg +4 -0
- package/static/icons/print-area/back_polo_half_a4_h.svg +4 -0
- package/static/icons/print-area/back_polo_rect10_l.svg +4 -0
- package/static/icons/print-area/back_tee.svg +3 -0
- package/static/icons/print-area/back_tee_a3.svg +4 -0
- package/static/icons/print-area/back_tee_a4_v.svg +4 -0
- package/static/icons/print-area/back_tee_bottom.svg +12 -0
- package/static/icons/print-area/back_tee_center.svg +12 -0
- package/static/icons/print-area/back_tee_half_a4_h.svg +4 -0
- package/static/icons/print-area/back_tee_rect10_l.svg +4 -0
- package/static/icons/print-area/back_tee_top.svg +12 -0
- package/static/icons/print-area/front_hoodie.svg +3 -0
- package/static/icons/print-area/front_hoodie_a3.svg +4 -0
- package/static/icons/print-area/front_hoodie_a4_v.svg +4 -0
- package/static/icons/print-area/front_hoodie_half_a4_h.svg +4 -0
- package/static/icons/print-area/front_hoodie_rect10_l.svg +4 -0
- package/static/icons/print-area/front_polo.svg +3 -0
- package/static/icons/print-area/front_polo_a3.svg +4 -0
- package/static/icons/print-area/front_polo_a4_v.svg +4 -0
- package/static/icons/print-area/front_polo_half_a4_h.svg +4 -0
- package/static/icons/print-area/front_polo_rect10_l.svg +4 -0
- package/static/icons/print-area/front_tee.svg +3 -0
- package/static/icons/print-area/front_tee_a3.svg +4 -0
- package/static/icons/print-area/front_tee_a4_v.svg +4 -0
- package/static/icons/print-area/front_tee_center.svg +12 -0
- package/static/icons/print-area/front_tee_half_a4_h.svg +4 -0
- package/static/icons/print-area/front_tee_left.svg +5 -0
- package/static/icons/print-area/front_tee_rect10_l.svg +4 -0
- package/static/icons/print-area/front_tee_right.svg +12 -0
- package/static/icons/print-area/sleeve-left_tee.svg +3 -0
- package/static/icons/print-area/sleeve-left_tee_left.svg +12 -0
- package/static/icons/print-area/sleeve-right_tee.svg +3 -0
- package/static/icons/print-area/sleeve-right_tee_right.svg +12 -0
- package/store/cart.js +7 -6
- package/store/index.js +16 -5
- package/store/product.js +3 -2
package/assets/js/api/admin.js
CHANGED
|
@@ -132,34 +132,34 @@ export default {
|
|
|
132
132
|
return _post(`admin/orders/pick-pdf`, { orders });
|
|
133
133
|
},
|
|
134
134
|
saveOrderSubsequentInvoice(order, invoice) {
|
|
135
|
-
return invoice._id ? _put(`admin/shop/${order.shop}/order/${order._id}/invoice/${invoice._id}`, invoice) : _post(`admin/shop/${order.shop}/order/${order._id}/invoice`, invoice);
|
|
135
|
+
return invoice._id ? _put(`admin/shop/${order.shop?._id || order.shop}/order/${order._id}/invoice/${invoice._id}`, invoice) : _post(`admin/shop/${order.shop?._id || order.shop}/order/${order._id}/invoice`, invoice);
|
|
136
136
|
},
|
|
137
137
|
sendOrderSubsequentInvoice(order, invoice) {
|
|
138
|
-
return _post(`admin/shop/${order.shop}/order/${order._id}/invoice/${invoice}/send`);
|
|
138
|
+
return _post(`admin/shop/${order.shop?._id || order.shop}/order/${order._id}/invoice/${invoice}/send`);
|
|
139
139
|
},
|
|
140
|
-
|
|
141
|
-
return _post(`admin/shop/${order.shop}/order/${order._id}/shipment/${shipment._id || shipment.guid}/export-to-
|
|
140
|
+
exportOrderToShippingService(order, shipment) {
|
|
141
|
+
return _post(`admin/shop/${order.shop?._id || order.shop}/order/${order._id}/shipment/${shipment._id || shipment.guid}/export-to-shipping-service`, shipment);
|
|
142
142
|
},
|
|
143
143
|
markShipmentAsDispatched(order, shipment) {
|
|
144
|
-
return _post(`admin/shop/${order.shop}/order/${order._id}/shipment/${shipment._id || shipment.guid}/dispatched`, shipment);
|
|
144
|
+
return _post(`admin/shop/${order.shop?._id || order.shop}/order/${order._id}/shipment/${shipment._id || shipment.guid}/dispatched`, shipment);
|
|
145
145
|
},
|
|
146
146
|
markSubOrderAsDispatched(order, subOrder) {
|
|
147
|
-
return _post(`admin/shop/${order.shop}/order/${order._id}/sub-order/${subOrder._id}/dispatched`, subOrder);
|
|
147
|
+
return _post(`admin/shop/${order.shop?._id || order.shop}/order/${order._id}/sub-order/${subOrder._id}/dispatched`, subOrder);
|
|
148
148
|
},
|
|
149
149
|
generateDuplicateOrderCode(order) {
|
|
150
150
|
return _get(`admin/order/${order}/duplicate-code`);
|
|
151
151
|
},
|
|
152
152
|
sendShipmentTracking(order, shipment, tracking) {
|
|
153
|
-
return _post(`admin/shop/${order.shop}/order/${order._id}/shipment/${shipment._id || shipment.guid}/tracking/${tracking._id}/send`, tracking);
|
|
153
|
+
return _post(`admin/shop/${order.shop?._id || order.shop}/order/${order._id}/shipment/${shipment._id || shipment.guid}/tracking/${tracking._id}/send`, tracking);
|
|
154
154
|
},
|
|
155
|
-
|
|
156
|
-
return _delete(`admin/shop/${order.shop}/order/${order._id}/shipment/${shipment._id || shipment.guid}`);
|
|
155
|
+
removeShipment(order, shipment) {
|
|
156
|
+
return _delete(`admin/shop/${order.shop?._id || order.shop}/order/${order._id}/shipment/${shipment._id || shipment.guid}`);
|
|
157
157
|
},
|
|
158
158
|
calculateShipmentRates(order, shipment) {
|
|
159
|
-
return _get(`admin/shop/${order.shop}/order/${order._id}/shipment/${shipment._id || shipment.guid}/calculate-shipping`);
|
|
159
|
+
return _get(`admin/shop/${order.shop?._id || order.shop}/order/${order._id}/shipment/${shipment._id || shipment.guid}/calculate-shipping`);
|
|
160
160
|
},
|
|
161
161
|
createPrintLabels(order, shipment, rate) {
|
|
162
|
-
return _post(`admin/shop/${order.shop}/order/${order._id}/shipment/${shipment._id || shipment.guid}/print-labels`, rate);
|
|
162
|
+
return _post(`admin/shop/${order.shop?._id || order.shop}/order/${order._id}/shipment/${shipment._id || shipment.guid}/print-labels`, rate);
|
|
163
163
|
},
|
|
164
164
|
createOrderRefund(order, refund, shop) {
|
|
165
165
|
return _post(`shop/${shop}/order/${order}/refund`, refund);
|
|
@@ -351,10 +351,16 @@ export default class FabricHelper {
|
|
|
351
351
|
}
|
|
352
352
|
});
|
|
353
353
|
object.on('changed', () => {
|
|
354
|
-
this.dispatch('setField', { field: 'copy', value: object.text });
|
|
355
|
-
this.dispatch('setField', { field: 'boundingRect', value: object.getBoundingRect() });
|
|
356
|
-
|
|
357
|
-
|
|
354
|
+
// this.dispatch('setField', { field: 'copy', value: object.text });
|
|
355
|
+
// this.dispatch('setField', { field: 'boundingRect', value: object.getBoundingRect() });
|
|
356
|
+
if (/\n/g.test(object.text || '')) {
|
|
357
|
+
this.discardActiveObjects();
|
|
358
|
+
object.text = object.text.replace(/\n/g, '');
|
|
359
|
+
this.dispatch('setField', { field: 'copy', value: object.text });
|
|
360
|
+
} else {
|
|
361
|
+
this.dispatch('setDeleteButtonPosition', object.oCoords.tr);
|
|
362
|
+
this.checkBoundingIntersection(object);
|
|
363
|
+
}
|
|
358
364
|
});
|
|
359
365
|
}
|
|
360
366
|
/*
|
|
@@ -177,7 +177,7 @@ html[dir=rtl] .form-icon-left {
|
|
|
177
177
|
height: 50px;
|
|
178
178
|
border-width: 1px;
|
|
179
179
|
border-style: solid;
|
|
180
|
-
border-color:
|
|
180
|
+
border-color: $grey_3;
|
|
181
181
|
border-radius: 5px;
|
|
182
182
|
font-style: normal;
|
|
183
183
|
font-weight: normal;
|
|
@@ -424,7 +424,7 @@ html[dir=rtl] .textarea {
|
|
|
424
424
|
}
|
|
425
425
|
&__tags {
|
|
426
426
|
min-height: 50px;
|
|
427
|
-
border: 1px solid
|
|
427
|
+
border: 1px solid $grey_3;
|
|
428
428
|
border-radius: 8px !important;
|
|
429
429
|
padding: 19px 3px 4px 20px;
|
|
430
430
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import "@/assets/scss/variables";
|
|
2
|
+
|
|
1
3
|
.tooltip {
|
|
2
4
|
display: block !important;
|
|
3
5
|
z-index: 10000;
|
|
@@ -25,7 +27,7 @@
|
|
|
25
27
|
&.white &-inner {
|
|
26
28
|
background: #FFF !important;
|
|
27
29
|
color: #575872 !important;
|
|
28
|
-
border: 1px solid
|
|
30
|
+
border: 1px solid $grey_3 !important;
|
|
29
31
|
}
|
|
30
32
|
&.white &-arrow {
|
|
31
33
|
border-color: #FFF !important;
|
|
@@ -15,7 +15,7 @@ $white_high_emphasis: #FFFFFF;
|
|
|
15
15
|
$white_medium_emphasis: rgba(255, 255, 255, .66);
|
|
16
16
|
$gray: #575872 !default;
|
|
17
17
|
$medium_gray: #B0B0BA !default;
|
|
18
|
-
$light_gray: #F9F9FC
|
|
18
|
+
$light_gray: #F9F9FC;
|
|
19
19
|
$link: #5D89A9;
|
|
20
20
|
$error: #E44868;
|
|
21
21
|
$secondary_900: #20303C;
|
|
@@ -52,8 +52,8 @@ $black: #343750 !default;
|
|
|
52
52
|
$gray_main: #616277 !default;
|
|
53
53
|
$grey_1: #616277 !default;
|
|
54
54
|
$grey_2: #B0B0BA !default;
|
|
55
|
-
$grey_3: #EFF1F2
|
|
56
|
-
$grey_4: #F9F9FC
|
|
55
|
+
$grey_3: #EFF1F2;
|
|
56
|
+
$grey_4: #F9F9FC;
|
|
57
57
|
$grey_5: #9898A5 !default;
|
|
58
58
|
|
|
59
59
|
$white: #fff;
|
|
@@ -12,7 +12,7 @@ export default {
|
|
|
12
12
|
};
|
|
13
13
|
},
|
|
14
14
|
computed: {
|
|
15
|
-
...mapGetters(['shop']),
|
|
15
|
+
...mapGetters(['shop', 'country']),
|
|
16
16
|
...mapGetters('auth', ['user']),
|
|
17
17
|
...mapGetters('cart', [
|
|
18
18
|
'entities',
|
|
@@ -45,11 +45,11 @@ export default {
|
|
|
45
45
|
},
|
|
46
46
|
watch: {
|
|
47
47
|
entities() {
|
|
48
|
-
this.calculateCartPriceWithDebounce({ shop: this.shop });
|
|
48
|
+
this.calculateCartPriceWithDebounce({ shop: this.shop, country: this.country });
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
mounted() {
|
|
52
|
-
this.calculateCartPriceWithDebounce({ shop: this.shop });
|
|
52
|
+
this.calculateCartPriceWithDebounce({ shop: this.shop, country: this.country });
|
|
53
53
|
if (!this.suburb && this.user?.suburb) {
|
|
54
54
|
this.handleSuburbChange(this.user.suburb);
|
|
55
55
|
}
|
|
@@ -65,11 +65,11 @@ export default {
|
|
|
65
65
|
]),
|
|
66
66
|
handleSuburbChange(suburb) {
|
|
67
67
|
this.setSuburb(suburb);
|
|
68
|
-
this.calculateCartPrice({ shop: this.shop });
|
|
68
|
+
this.calculateCartPrice({ shop: this.shop, country: this.country });
|
|
69
69
|
},
|
|
70
70
|
handleCouponChange(coupon) {
|
|
71
71
|
this.setCoupon(coupon);
|
|
72
|
-
this.calculateCartPrice({ shop: this.shop });
|
|
72
|
+
this.calculateCartPrice({ shop: this.shop, country: this.country });
|
|
73
73
|
},
|
|
74
74
|
async removeSimpleProducts(simpleProducts) {
|
|
75
75
|
const message = 'This will delete all items in this row, Press OK to continue or Cancel';
|
|
@@ -41,7 +41,7 @@ export default {
|
|
|
41
41
|
};
|
|
42
42
|
},
|
|
43
43
|
computed: {
|
|
44
|
-
...mapGetters(['shop']),
|
|
44
|
+
...mapGetters(['shop', 'country']),
|
|
45
45
|
...mapGetters('cart', [
|
|
46
46
|
'entities',
|
|
47
47
|
'cartPricing',
|
|
@@ -62,7 +62,7 @@ export default {
|
|
|
62
62
|
'calculateCartPrice'
|
|
63
63
|
]),
|
|
64
64
|
async calculatePrice() {
|
|
65
|
-
await this.calculateCartPrice({ shop: this.shop });
|
|
65
|
+
await this.calculateCartPrice({ shop: this.shop, country: this.country });
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
};
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
:class="{
|
|
34
34
|
'CartShipmentsPricing__rate--disabled': rate.disabled
|
|
35
35
|
}"
|
|
36
|
-
@click="selectRate({ supplier, rate, shop })">
|
|
36
|
+
@click="selectRate({ supplier, rate, shop, country })">
|
|
37
37
|
<div class="CartShipmentsPricing__rate-info">
|
|
38
38
|
<div class="CartShipmentsPricing__rate-icon">
|
|
39
39
|
<checked-icon :checked="rate.selected" />
|
|
@@ -77,7 +77,7 @@ export default {
|
|
|
77
77
|
},
|
|
78
78
|
mixins: [confirm],
|
|
79
79
|
computed: {
|
|
80
|
-
...mapGetters(['shop']),
|
|
80
|
+
...mapGetters(['shop', 'country']),
|
|
81
81
|
...mapGetters('cart', [
|
|
82
82
|
'cartPricing'
|
|
83
83
|
]),
|
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
<input
|
|
204
204
|
id="country"
|
|
205
205
|
ref="country"
|
|
206
|
-
value="Only Australia"
|
|
206
|
+
:value="address.country === 'Australia' ? 'Only Australia' : address.country"
|
|
207
207
|
name="country"
|
|
208
208
|
type="country"
|
|
209
209
|
class="form-field filled labelless"
|
|
@@ -264,7 +264,7 @@ export default {
|
|
|
264
264
|
}
|
|
265
265
|
},
|
|
266
266
|
computed: {
|
|
267
|
-
...mapGetters(['shop']),
|
|
267
|
+
...mapGetters(['shop', 'country']),
|
|
268
268
|
...mapGetters('cart', [
|
|
269
269
|
'suburb'
|
|
270
270
|
]),
|
|
@@ -296,12 +296,13 @@ export default {
|
|
|
296
296
|
this.$set(this.address, 'state', suburb.state);
|
|
297
297
|
this.$set(this.address, 'postcode', suburb.postcode);
|
|
298
298
|
this.$set(this.address, 'city', suburb.locality);
|
|
299
|
+
this.$set(this.address, 'country', suburb.country);
|
|
299
300
|
}
|
|
300
301
|
},
|
|
301
302
|
handleSuburbChange(suburb) {
|
|
302
303
|
this.setAddressSuburb(suburb);
|
|
303
304
|
this.setSuburb(suburb);
|
|
304
|
-
this.calculateCartPrice({ shop: this.shop });
|
|
305
|
+
this.calculateCartPrice({ shop: this.shop, country: this.country });
|
|
305
306
|
}
|
|
306
307
|
}
|
|
307
308
|
};
|
|
@@ -45,7 +45,7 @@ export default {
|
|
|
45
45
|
};
|
|
46
46
|
},
|
|
47
47
|
computed: {
|
|
48
|
-
...mapGetters(['shop']),
|
|
48
|
+
...mapGetters(['shop', 'country']),
|
|
49
49
|
...mapGetters('cart', ['cartPricing']),
|
|
50
50
|
shippingPricing() {
|
|
51
51
|
return this.cartPricing?.shipping;
|
|
@@ -53,7 +53,7 @@ export default {
|
|
|
53
53
|
},
|
|
54
54
|
mounted() {
|
|
55
55
|
if (!this.shippingPricing) {
|
|
56
|
-
this.calculateCartPrice({ shop: this.shop });
|
|
56
|
+
this.calculateCartPrice({ shop: this.shop, country: this.country });
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
methods: {
|
|
@@ -86,6 +86,8 @@
|
|
|
86
86
|
</template>
|
|
87
87
|
|
|
88
88
|
<script>
|
|
89
|
+
let interval = null;
|
|
90
|
+
|
|
89
91
|
export default {
|
|
90
92
|
name: 'Payment',
|
|
91
93
|
props: {
|
|
@@ -108,14 +110,17 @@ export default {
|
|
|
108
110
|
fields: null
|
|
109
111
|
};
|
|
110
112
|
},
|
|
111
|
-
mounted() {
|
|
113
|
+
async mounted() {
|
|
112
114
|
this.loading = true;
|
|
115
|
+
|
|
116
|
+
await this.preloadPinpayments();
|
|
117
|
+
|
|
113
118
|
if (window.HostedFields) {
|
|
114
|
-
this.initHostedPayment();
|
|
119
|
+
await this.initHostedPayment();
|
|
115
120
|
} else {
|
|
116
|
-
window.addEventListener('load', () => {
|
|
121
|
+
window.addEventListener('load', async () => {
|
|
117
122
|
if (!this.fields) {
|
|
118
|
-
this.initHostedPayment();
|
|
123
|
+
await this.initHostedPayment();
|
|
119
124
|
}
|
|
120
125
|
});
|
|
121
126
|
}
|
|
@@ -194,7 +199,31 @@ export default {
|
|
|
194
199
|
}
|
|
195
200
|
);
|
|
196
201
|
});
|
|
197
|
-
}
|
|
202
|
+
},
|
|
203
|
+
async preloadPinpayments() {
|
|
204
|
+
if (!window.HostedFields) {
|
|
205
|
+
clearInterval(interval);
|
|
206
|
+
await this.loadPinpayments();
|
|
207
|
+
await new Promise((resolve, reject) => {
|
|
208
|
+
interval = setInterval(() => {
|
|
209
|
+
if (window.HostedFields) {
|
|
210
|
+
clearInterval(interval);
|
|
211
|
+
resolve()
|
|
212
|
+
}
|
|
213
|
+
}, 100);
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
loadPinpayments() {
|
|
218
|
+
return new Promise((resolve) => {
|
|
219
|
+
const script = document.createElement('script');
|
|
220
|
+
script.type = "text/javascript";
|
|
221
|
+
script.src = 'https://cdn.pinpayments.com/pin.hosted_fields.v1.js';
|
|
222
|
+
script.onload = () => resolve();
|
|
223
|
+
const body = document.getElementsByTagName('body')[0];
|
|
224
|
+
body.appendChild(script);
|
|
225
|
+
});
|
|
226
|
+
}
|
|
198
227
|
}
|
|
199
228
|
};
|
|
200
229
|
</script>
|
|
@@ -88,6 +88,9 @@ export default {
|
|
|
88
88
|
},
|
|
89
89
|
filters: { highlight },
|
|
90
90
|
props: {
|
|
91
|
+
country: {
|
|
92
|
+
type: Object
|
|
93
|
+
},
|
|
91
94
|
value: {
|
|
92
95
|
type: String
|
|
93
96
|
},
|
|
@@ -147,7 +150,8 @@ export default {
|
|
|
147
150
|
async handleSearch(query) {
|
|
148
151
|
if (query.length) {
|
|
149
152
|
this.isLoading = true;
|
|
150
|
-
this.
|
|
153
|
+
const country = this.country ? (this.country.isoCode === 'GB' ? 'England' : (this.country.name || this.country)) : 'Australia';
|
|
154
|
+
this.suburbs = await api.fetchSuburbs({ query, country });
|
|
151
155
|
this.options = this.suburbs.map(this.createOptionFromSuburb);
|
|
152
156
|
this.isLoading = false;
|
|
153
157
|
} else {
|
|
@@ -21,13 +21,14 @@
|
|
|
21
21
|
Total: {{ pricing.totalPrice | price(currency) }} <br />
|
|
22
22
|
</div>
|
|
23
23
|
<div class="lc_regular14 mt-4">
|
|
24
|
-
Incl.
|
|
24
|
+
Incl. {{ taxName }} ({{ pricing.tax.percent }}) {{ pricing.tax.totalPrice | price(currency) }}
|
|
25
25
|
</div>
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
28
|
</template>
|
|
29
29
|
|
|
30
30
|
<script>
|
|
31
|
+
import { mapGetters } from 'vuex';
|
|
31
32
|
import { price } from '@lancom/shared/assets/js/utils/filters';
|
|
32
33
|
|
|
33
34
|
export default {
|
|
@@ -44,6 +45,9 @@ export default {
|
|
|
44
45
|
type: String,
|
|
45
46
|
default: 'Tee'
|
|
46
47
|
}
|
|
48
|
+
},
|
|
49
|
+
computed: {
|
|
50
|
+
...mapGetters(['taxName'])
|
|
47
51
|
}
|
|
48
52
|
};
|
|
49
53
|
</script>
|
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
</component>
|
|
19
19
|
</template>
|
|
20
20
|
</tabs>
|
|
21
|
-
<div
|
|
21
|
+
<div
|
|
22
|
+
v-if="productAvailableInCurrentCountry"
|
|
23
|
+
class="Editor__footer">
|
|
22
24
|
<btn
|
|
23
25
|
btn-label="Start again"
|
|
24
26
|
btn-class="white"
|
|
@@ -135,8 +137,12 @@ export default {
|
|
|
135
137
|
...mapGetters('layers', [
|
|
136
138
|
'layerThumbnails'
|
|
137
139
|
]),
|
|
140
|
+
productAvailableInCurrentCountry() {
|
|
141
|
+
const { countries } = this.product;
|
|
142
|
+
return !(countries || []).length || countries.includes(this.country._id);
|
|
143
|
+
},
|
|
138
144
|
addToCartDisabled() {
|
|
139
|
-
return !
|
|
145
|
+
return !this.usedSimpleProducts.length || (this.product.printOnly && !this.template.layers.length);
|
|
140
146
|
}
|
|
141
147
|
},
|
|
142
148
|
watch: {
|
|
@@ -116,11 +116,11 @@ export default {
|
|
|
116
116
|
return {
|
|
117
117
|
price: null,
|
|
118
118
|
showDetails: false,
|
|
119
|
-
calculatePriceWithDebounce: debounce(() => this.calculateProductPrice(this.shop), 500)
|
|
119
|
+
calculatePriceWithDebounce: debounce(() => this.calculateProductPrice({ shop: this.shop, country: this.country }), 500)
|
|
120
120
|
};
|
|
121
121
|
},
|
|
122
122
|
computed: {
|
|
123
|
-
...mapGetters(['shop']),
|
|
123
|
+
...mapGetters(['shop', 'country']),
|
|
124
124
|
...mapGetters('product', [
|
|
125
125
|
'defaultSimpleProduct',
|
|
126
126
|
'usedSimpleProducts',
|
|
@@ -32,18 +32,18 @@
|
|
|
32
32
|
</td>
|
|
33
33
|
<td>
|
|
34
34
|
<strong>
|
|
35
|
-
{{ group.setupPriceWithoutTax | priceWithTax(pricingSettings, currency) }}
|
|
35
|
+
{{ (priceIncludeGST ? group.setupPrice : group.setupPriceWithoutTax) | priceWithTax(pricingSettings, currency) }}
|
|
36
36
|
</strong>
|
|
37
37
|
</td>
|
|
38
38
|
<td>
|
|
39
39
|
<span v-if="group.costType !== 'setup only'">
|
|
40
40
|
<strong>
|
|
41
|
-
{{ (
|
|
41
|
+
{{ (priceIncludeGST ? group.totalPrice : group.totalPriceWithoutTax) | price(currency) }}
|
|
42
42
|
</strong>
|
|
43
|
-
= {{ group.amount }} x {{ (
|
|
43
|
+
= {{ group.amount }} x {{ (priceIncludeGST ? group.price : group.priceWithoutTax) | price(currency) }}
|
|
44
44
|
</span>
|
|
45
45
|
<strong v-else>
|
|
46
|
-
{{ (
|
|
46
|
+
{{ (priceIncludeGST ? group.totalPrice : group.totalPriceWithoutTax) | price(currency) }}
|
|
47
47
|
</strong>
|
|
48
48
|
</td>
|
|
49
49
|
</tr>
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
</td>
|
|
59
59
|
<td>
|
|
60
60
|
<strong>
|
|
61
|
-
{{ (
|
|
61
|
+
{{ (priceIncludeGST ? productPricing.products.prints.totalPrice : productPricing.products.prints.totalPriceWithoutTax) | price(currency) }}
|
|
62
62
|
</strong>
|
|
63
63
|
</td>
|
|
64
64
|
</tr>
|
|
@@ -80,12 +80,13 @@ export default {
|
|
|
80
80
|
sizesRange
|
|
81
81
|
},
|
|
82
82
|
computed: {
|
|
83
|
-
...mapGetters(['
|
|
83
|
+
...mapGetters(['pricingSettings']),
|
|
84
84
|
...mapGetters('product', [
|
|
85
85
|
'product',
|
|
86
86
|
'usedSimpleProducts',
|
|
87
87
|
'productPricing',
|
|
88
|
-
'mainProductPricing'
|
|
88
|
+
'mainProductPricing',
|
|
89
|
+
'priceIncludeGST'
|
|
89
90
|
]),
|
|
90
91
|
hasPrintSurcharge() {
|
|
91
92
|
return this.product.printSurcharge > 0;
|
|
@@ -31,13 +31,20 @@
|
|
|
31
31
|
{{ group.sizes | sizesRange }}
|
|
32
32
|
</td>
|
|
33
33
|
<td>
|
|
34
|
-
<span
|
|
34
|
+
<span
|
|
35
|
+
v-if="priceIncludeGST"
|
|
36
|
+
class="EditorPricingDetailsProducts__hoverable">
|
|
35
37
|
{{ groupPrice | priceWithTax(pricingSettings, currency) }}
|
|
36
38
|
</span>
|
|
39
|
+
<span
|
|
40
|
+
v-else
|
|
41
|
+
class="EditorPricingDetailsProducts__hoverable">
|
|
42
|
+
{{ groupPrice | price(currency) }}
|
|
43
|
+
</span>
|
|
37
44
|
</td>
|
|
38
45
|
<td>
|
|
39
46
|
<strong>
|
|
40
|
-
{{ (
|
|
47
|
+
{{ (priceIncludeGST ? group.totalPrice : group.totalPriceWithoutTax) | price(currency) }}
|
|
41
48
|
</strong>
|
|
42
49
|
</td>
|
|
43
50
|
</tr>
|
|
@@ -47,7 +54,7 @@
|
|
|
47
54
|
</td>
|
|
48
55
|
<td>
|
|
49
56
|
<strong>
|
|
50
|
-
{{ (
|
|
57
|
+
{{ (priceIncludeGST ? productPricing.products.products.totalPrice : productPricing.products.products.totalPriceWithoutTax) | price(currency) }}
|
|
51
58
|
</strong>
|
|
52
59
|
</td>
|
|
53
60
|
</tr>
|
|
@@ -74,7 +81,8 @@ export default {
|
|
|
74
81
|
'product',
|
|
75
82
|
'usedSimpleProducts',
|
|
76
83
|
'mainProductPricing',
|
|
77
|
-
'productPricing'
|
|
84
|
+
'productPricing',
|
|
85
|
+
'priceIncludeGST'
|
|
78
86
|
]),
|
|
79
87
|
hasUsedSimpleProducts() {
|
|
80
88
|
return this.usedSimpleProducts.length > 0;
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
.EditorPrintAreaOptions {
|
|
4
4
|
&__wrapper {
|
|
5
|
-
display:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
grid-row-gap: 8px;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
9
8
|
padding: 8px 0;
|
|
10
9
|
&.singleRow {
|
|
11
10
|
grid-template-columns: repeat(4, 1fr);
|
|
@@ -13,6 +12,8 @@
|
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
&__option {
|
|
15
|
+
margin: 0 5px;
|
|
16
|
+
min-width: 150px;
|
|
16
17
|
display: flex;
|
|
17
18
|
align-items: center;
|
|
18
19
|
justify-content: center;
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
&__content {
|
|
10
10
|
text-align: center;
|
|
11
11
|
padding: 8px 0;
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
12
14
|
&:hover {
|
|
13
15
|
background-color: $green_lighter;
|
|
14
16
|
}
|
|
@@ -25,4 +27,41 @@
|
|
|
25
27
|
&__suboptions &__content {
|
|
26
28
|
padding: 12px 0;
|
|
27
29
|
}
|
|
30
|
+
&__icon {
|
|
31
|
+
width: 30px;
|
|
32
|
+
height: 25px;
|
|
33
|
+
margin-right: 10px;
|
|
34
|
+
margin-left: 10px;
|
|
35
|
+
background-repeat: no-repeat;
|
|
36
|
+
background-size: contain;
|
|
37
|
+
background-position: center;
|
|
38
|
+
|
|
39
|
+
@each $type in tee {
|
|
40
|
+
@each $side in front, back, sleeve-left, sleeve-right {
|
|
41
|
+
&.#{$side}.#{$type} {
|
|
42
|
+
background-image: url(./../../../../static/icons/print-area/#{$side}_#{$type}.svg);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// TEE - FRONT
|
|
48
|
+
@each $position in center, left, right {
|
|
49
|
+
&.front.tee.#{$position} {
|
|
50
|
+
background-image: url(./../../../../static/icons/print-area/front_tee_#{$position}.svg);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
// TEE - BACK
|
|
54
|
+
@each $position in center, top, bottom {
|
|
55
|
+
&.back.tee.#{$position} {
|
|
56
|
+
background-image: url(./../../../../static/icons/print-area/back_tee_#{$position}.svg);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
// TEE - SLEEVE LEFT
|
|
60
|
+
&.sleeve-left.tee.left {
|
|
61
|
+
background-image: url(./../../../../static/icons/print-area/sleeve-left_tee_left.svg);
|
|
62
|
+
}
|
|
63
|
+
&.sleeve-right.tee.right {
|
|
64
|
+
background-image: url(./../../../../static/icons/print-area/sleeve-right_tee_right.svg);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
28
67
|
}
|
|
@@ -6,13 +6,24 @@
|
|
|
6
6
|
@click="handleClick"
|
|
7
7
|
@mouseover="$emit('option-mouseover', option)"
|
|
8
8
|
@mouseleave="$emit('option-mouseleave', option)">
|
|
9
|
-
<div
|
|
10
|
-
|
|
9
|
+
<div
|
|
10
|
+
v-if="option.printArea"
|
|
11
|
+
class="EditorPrintAreaOption__icon"
|
|
12
|
+
:class="{
|
|
13
|
+
[option.printArea.alias]: true,
|
|
14
|
+
[option.printArea.side]: true,
|
|
15
|
+
[productType]: true
|
|
16
|
+
}">
|
|
11
17
|
</div>
|
|
12
|
-
<div
|
|
13
|
-
<
|
|
14
|
-
{{
|
|
15
|
-
</
|
|
18
|
+
<div>
|
|
19
|
+
<div class="lc_caption">
|
|
20
|
+
{{ option.label }}
|
|
21
|
+
</div>
|
|
22
|
+
<div class="lc_regular10">
|
|
23
|
+
<span v-if="option.printArea && calcPrintPrice(option) > 0">
|
|
24
|
+
{{ calcPrintPrice(option) | priceWithTax(pricingSettings, currency) }}
|
|
25
|
+
</span>
|
|
26
|
+
</div>
|
|
16
27
|
</div>
|
|
17
28
|
</div>
|
|
18
29
|
<div
|
|
@@ -26,6 +37,15 @@
|
|
|
26
37
|
@click="selectSuboption(suboption)"
|
|
27
38
|
@mouseover="$emit('option-mouseover', suboption)"
|
|
28
39
|
@mouseleave="$emit('option-mouseleave', suboption)">
|
|
40
|
+
<div
|
|
41
|
+
v-if="suboption.printArea"
|
|
42
|
+
class="EditorPrintAreaOption__icon"
|
|
43
|
+
:class="{
|
|
44
|
+
[suboption.printArea.alias]: true,
|
|
45
|
+
[option.printArea.side]: true,
|
|
46
|
+
[productType]: true
|
|
47
|
+
}">
|
|
48
|
+
</div>
|
|
29
49
|
<div class="lc_caption">
|
|
30
50
|
{{ suboption.label }}
|
|
31
51
|
</div>
|
|
@@ -64,6 +84,9 @@ export default {
|
|
|
64
84
|
};
|
|
65
85
|
},
|
|
66
86
|
computed: {
|
|
87
|
+
productType() {
|
|
88
|
+
return 'tee' || this.product.productType?.alias;
|
|
89
|
+
},
|
|
67
90
|
...mapGetters([
|
|
68
91
|
'pricingSettings'
|
|
69
92
|
]),
|