@lancom/shared 0.0.280 → 0.0.281
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 +3 -0
- package/assets/js/api/index.js +5 -2
- package/assets/js/models/print-area.js +5 -3
- package/assets/js/utils/colors.js +1 -1
- package/assets/js/utils/fabric-helper.js +1 -1
- package/assets/js/utils/filters.js +2 -2
- package/assets/scss/_common.scss +10 -0
- package/components/asides/contact_us/contact-us.vue +9 -2
- package/components/asides/menu/menu.vue +1 -25
- package/components/checkout/cart/cart.mixin.js +3 -3
- package/components/checkout/cart/cart.scss +8 -109
- package/components/checkout/cart/cart.vue +84 -46
- package/components/checkout/cart/cart_entity/cart_entity_color_simple_products/cart_entity_color_simple_product/cart-entity-color-simple-product.vue +7 -4
- package/components/checkout/cart/cart_price_info/cart-price-info.vue +4 -5
- package/components/checkout/cart/cart_pricing/cart-pricing.scss +34 -0
- package/components/checkout/cart/cart_pricing/cart-pricing.vue +112 -0
- package/components/checkout/cart/cart_shipments_pricing/cart-shipments-pricing.vue +2 -2
- package/components/checkout/order/address-form/address-form.scss +16 -0
- package/components/checkout/order/address-form/address-form.vue +199 -91
- package/components/checkout/order/order-billing-information/order-billing-information.scss +1 -1
- package/components/checkout/order/order-payment-information/order-payment-information.vue +15 -5
- package/components/checkout/order/order.vue +2 -1
- package/components/common/client_settings/client-settings.scss +6 -0
- package/components/common/client_settings/client-settings.vue +9 -1
- package/components/common/payment/payment_card/stripe/stripe.vue +1 -0
- package/components/common/payment/payment_success/payment-success.vue +8 -1
- package/components/common/postcode_select/postcode-select.vue +22 -12
- package/components/common/price.vue +1 -1
- package/components/common/pricing_table/pricing-table.vue +3 -2
- package/components/common/tabs.vue +17 -8
- package/components/editor/editor.scss +6 -0
- package/components/editor/editor.vue +22 -19
- package/components/editor/editor_layers/editor-layers.vue +3 -2
- package/components/editor/editor_print_area_options/editor-print-area-options.vue +2 -0
- package/components/editor/editor_product_details/editor-product-details.scss +8 -2
- package/components/editor/editor_product_details/editor-product-details.vue +22 -25
- package/components/editor/editor_wizard/editor-wizard.vue +2 -1
- package/components/editor/editor_workspace/editor-workspace.vue +3 -2
- package/components/modals/cart_modal/cart-modal.vue +1 -1
- package/components/modals/order_modal/order-modal.vue +6 -0
- package/components/modals/payment_modal/payment-modal.vue +4 -3
- package/components/order/order_payment/order-payment.vue +6 -6
- package/components/product/editor_pricing/editor-pricing.scss +75 -0
- package/components/product/editor_pricing/editor-pricing.vue +228 -0
- package/components/product/editor_pricing/editor_pricing_details/editor-pricing-details.scss +0 -0
- package/components/product/editor_pricing/editor_pricing_details/editor-pricing-details.vue +29 -0
- package/components/product/editor_pricing/editor_pricing_details/editor_pricing_details_prints/editor-pricing-details-prints.scss +41 -0
- package/components/product/editor_pricing/editor_pricing_details/editor_pricing_details_prints/editor-pricing-details-prints.vue +118 -0
- package/components/product/editor_pricing/editor_pricing_details/editor_pricing_details_products/editor-pricing-details-products.scss +41 -0
- package/components/product/editor_pricing/editor_pricing_details/editor_pricing_details_products/editor-pricing-details-products.vue +102 -0
- package/components/product/product.vue +1 -1
- package/components/product/product_colors_selector/product-colors-selector.scss +117 -0
- package/components/product/product_colors_selector/product-colors-selector.vue +188 -0
- package/components/product/product_multipacks_carousel/product-multipacks-carousel.vue +3 -1
- package/components/product/product_size_selector/product_size_selector_color/product_size_selector_color_cell/product-size-selector-color-cell.vue +4 -5
- package/components/product/products_size_selector_color/product_size_selector_color/product-size-selector-color.scss +58 -0
- package/components/product/products_size_selector_color/product_size_selector_color/product-size-selector-color.vue +128 -0
- package/components/product/products_size_selector_color/products-size-selector-color.scss +12 -0
- package/components/product/products_size_selector_color/products-size-selector-color.vue +43 -0
- package/components/product/wizard/wizard_print_layers/wizard_print_layer/wizard-print-layer.vue +2 -1
- package/components/product/wizard/wizard_print_size/wizard_print_area_print_size/wizard-print-area-print-size.vue +2 -1
- package/components/product/wizard/wizard_print_type/wizard_print_area_print_type/wizard-print-area-print-type.vue +2 -1
- package/components/products/product_list/product-list.scss +2 -2
- package/components/products/product_list_product/product-list-product.scss +7 -11
- package/components/products/product_list_product/product-list-product.vue +7 -15
- package/components/the_aside/the-aside.vue +1 -0
- package/feeds/google-shopping.js +4 -4
- package/layouts/error.vue +39 -0
- package/layouts/products.vue +386 -0
- package/mixins/payment.js +2 -1
- package/mixins/product-preview.js +1 -1
- package/mixins/product-view.js +313 -0
- package/nuxt.config.js +0 -5
- package/package.json +1 -1
- package/pages/checkout/cart.vue +40 -0
- package/pages/checkout/order.vue +72 -0
- package/pages/customer/create.vue +33 -0
- package/pages/customer/password/_token.vue +79 -0
- package/pages/customer/recovery.vue +33 -0
- package/pages/customer/settings.vue +33 -0
- package/pages/customer/signin.vue +33 -0
- package/routes/index.js +35 -0
- package/store/cart.js +11 -6
- package/store/order.js +2 -2
- package/store/product.js +0 -6
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="PostcodeSelect
|
|
2
|
+
<div class="PostcodeSelect">
|
|
3
3
|
<validation-provider
|
|
4
4
|
v-slot="{ errors }"
|
|
5
5
|
tag="div"
|
|
6
6
|
:rules="required ? 'required' : ''"
|
|
7
7
|
name="Postcode"
|
|
8
|
-
class="form-group
|
|
8
|
+
class="form-group">
|
|
9
9
|
<label
|
|
10
10
|
v-if="labelless"
|
|
11
11
|
class="form-label"
|
|
@@ -88,7 +88,7 @@ export default {
|
|
|
88
88
|
},
|
|
89
89
|
filters: { highlight },
|
|
90
90
|
props: {
|
|
91
|
-
|
|
91
|
+
codeCountry: {
|
|
92
92
|
type: Object
|
|
93
93
|
},
|
|
94
94
|
value: {
|
|
@@ -130,12 +130,10 @@ export default {
|
|
|
130
130
|
computed: {
|
|
131
131
|
model: {
|
|
132
132
|
get() {
|
|
133
|
-
return this.selected?.
|
|
133
|
+
return this.selected?._id ? this.selected : null;
|
|
134
134
|
},
|
|
135
135
|
set(option) {
|
|
136
|
-
this.
|
|
137
|
-
this.$emit('input', option.value);
|
|
138
|
-
this.$emit('select', this.suburbs.find(({ _id }) => _id === option._id));
|
|
136
|
+
this.updatePostcode(option);
|
|
139
137
|
}
|
|
140
138
|
}
|
|
141
139
|
},
|
|
@@ -150,20 +148,32 @@ export default {
|
|
|
150
148
|
async handleSearch(query) {
|
|
151
149
|
if (query.length) {
|
|
152
150
|
this.isLoading = true;
|
|
153
|
-
const country = this.
|
|
154
|
-
|
|
151
|
+
const country = this.codeCountry || this.country;
|
|
152
|
+
const countryName = country ? (country.isoCode === 'GB' ? 'England' : (country.name || country)) : 'Australia';
|
|
153
|
+
this.suburbs = await api.fetchSuburbs({ query, country: countryName });
|
|
155
154
|
this.options = this.suburbs.map(this.createOptionFromSuburb);
|
|
156
155
|
this.isLoading = false;
|
|
157
156
|
} else {
|
|
158
157
|
this.options = [];
|
|
159
158
|
}
|
|
160
159
|
},
|
|
161
|
-
createOptionFromSuburb({ locality, state, postcode, city, _id }) {
|
|
160
|
+
createOptionFromSuburb({ locality, state, postcode, city, _id, address, id }) {
|
|
162
161
|
return {
|
|
163
|
-
label: [locality || city, state, postcode].filter(i => !!i).join(', '),
|
|
162
|
+
label: address || [locality || city, state, postcode].filter(i => !!i).join(', '),
|
|
164
163
|
value: postcode,
|
|
165
|
-
_id: _id
|
|
164
|
+
_id: id || _id
|
|
166
165
|
};
|
|
166
|
+
},
|
|
167
|
+
async updatePostcode(option) {
|
|
168
|
+
this.selected = option;
|
|
169
|
+
if (!option.value) {
|
|
170
|
+
const suburb = await api.fetchAddressInfo(option._id);
|
|
171
|
+
this.$emit('input', suburb.postcode);
|
|
172
|
+
this.$emit('select', suburb);
|
|
173
|
+
} else {
|
|
174
|
+
this.$emit('input', option.value);
|
|
175
|
+
this.$emit('select', this.suburbs.find(({ _id }) => _id === option._id));
|
|
176
|
+
}
|
|
167
177
|
}
|
|
168
178
|
}
|
|
169
179
|
};
|
|
@@ -71,7 +71,8 @@ export default {
|
|
|
71
71
|
},
|
|
72
72
|
computed: {
|
|
73
73
|
...mapGetters([
|
|
74
|
-
'pricingSettings'
|
|
74
|
+
'pricingSettings',
|
|
75
|
+
'currency'
|
|
75
76
|
]),
|
|
76
77
|
thList() {
|
|
77
78
|
return this.items.map(item => get(item, this.nameAttr));
|
|
@@ -138,7 +139,7 @@ export default {
|
|
|
138
139
|
const printType = this.items.find(item => printTypeName === get(item, this.nameAttr));
|
|
139
140
|
const pricing = get(printType, this.pricingAttr);
|
|
140
141
|
const item = pricing.find(({ min, max }) => (!min || range.min >= min) && (!max || range.min <= max));
|
|
141
|
-
return item ? (this.withGst ? priceWithTax(item.price, this.pricingSettings) : price(item.price)) : '-';
|
|
142
|
+
return item ? (this.withGst ? priceWithTax(item.price, this.pricingSettings, this.currency) : price(item.price, this.currency)) : '-';
|
|
142
143
|
}
|
|
143
144
|
}
|
|
144
145
|
};
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
shadow: btnsShadow
|
|
11
11
|
}"
|
|
12
12
|
@click="select(tab)">
|
|
13
|
-
<div class="
|
|
13
|
+
<div class="lc_medium16 tab-label">
|
|
14
14
|
<i
|
|
15
15
|
v-if="tab.icon"
|
|
16
16
|
:class="[tab.icon, 'tab-icon']">
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
</div>
|
|
20
20
|
<div
|
|
21
21
|
v-if="tab.description"
|
|
22
|
-
class="lc_regular12 lc_grey1 mt-5">
|
|
22
|
+
class="tab-description lc_regular12 lc_grey1 mt-5">
|
|
23
23
|
{{ tab.description }}
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
@@ -98,7 +98,7 @@ export default {
|
|
|
98
98
|
@import "@/assets/scss/variables";
|
|
99
99
|
|
|
100
100
|
.tab {
|
|
101
|
-
flex-
|
|
101
|
+
flex-basis: 100%;
|
|
102
102
|
display: flex;
|
|
103
103
|
align-items: center;
|
|
104
104
|
border-radius: 2px;
|
|
@@ -124,10 +124,10 @@ export default {
|
|
|
124
124
|
transition: background-color .22s ease-in-out;
|
|
125
125
|
}
|
|
126
126
|
&s--large & {
|
|
127
|
-
height:
|
|
127
|
+
height: 85px;
|
|
128
128
|
flex-direction: column;
|
|
129
129
|
padding: 10px;
|
|
130
|
-
min-width:
|
|
130
|
+
min-width: 130px;
|
|
131
131
|
white-space: normal;
|
|
132
132
|
}
|
|
133
133
|
&s--primary & {
|
|
@@ -153,9 +153,6 @@ export default {
|
|
|
153
153
|
padding: 0 12px;
|
|
154
154
|
position: relative;
|
|
155
155
|
}
|
|
156
|
-
&-icon {
|
|
157
|
-
font-size: 26px;
|
|
158
|
-
}
|
|
159
156
|
&s--large &-label,
|
|
160
157
|
&s--primary &-label,
|
|
161
158
|
&s--secondary &-label {
|
|
@@ -180,6 +177,18 @@ export default {
|
|
|
180
177
|
&.shadow {
|
|
181
178
|
box-shadow: 1px 1px 2px rgb(214, 214, 214);
|
|
182
179
|
}
|
|
180
|
+
@media (max-width: $bp-medium-max) {
|
|
181
|
+
.tab-label {
|
|
182
|
+
font-size: 14px !important;
|
|
183
|
+
line-height: 20px !important;
|
|
184
|
+
}
|
|
185
|
+
.tab-icon {
|
|
186
|
+
font-size: 14px !important;
|
|
187
|
+
}
|
|
188
|
+
.tab-description {
|
|
189
|
+
font-size: 11px !important;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
183
192
|
}
|
|
184
193
|
.fullWidth .tab {
|
|
185
194
|
flex-grow: 1;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<breakpoint
|
|
5
5
|
name="md"
|
|
6
6
|
mode="up">
|
|
7
|
-
<div class="col-md-
|
|
7
|
+
<div class="col-md-6 col-12 Editor__col">
|
|
8
8
|
<tabs
|
|
9
9
|
:tabs="tabs"
|
|
10
10
|
:selected="selectedTab"
|
|
@@ -55,8 +55,10 @@
|
|
|
55
55
|
</div>
|
|
56
56
|
</div>
|
|
57
57
|
</breakpoint>
|
|
58
|
-
<div class="col-md-
|
|
59
|
-
<
|
|
58
|
+
<div class="col-md-6 col-12 Editor__col">
|
|
59
|
+
<client-only>
|
|
60
|
+
<editor-workspace class="Editor__workspace" />
|
|
61
|
+
</client-only>
|
|
60
62
|
</div>
|
|
61
63
|
</div>
|
|
62
64
|
<breakpoint
|
|
@@ -190,7 +192,7 @@ export default {
|
|
|
190
192
|
this.setEditModeSelectedLayer(false);
|
|
191
193
|
},
|
|
192
194
|
async showResetAllConfirm() {
|
|
193
|
-
const message = '
|
|
195
|
+
const message = 'This will reset the current design. Are you sure?';
|
|
194
196
|
const reset = await this.showConfirmationModal(message);
|
|
195
197
|
|
|
196
198
|
if (reset) {
|
|
@@ -198,22 +200,23 @@ export default {
|
|
|
198
200
|
this.resetLayers();
|
|
199
201
|
}
|
|
200
202
|
},
|
|
201
|
-
proceedToCard() {
|
|
203
|
+
async proceedToCard() {
|
|
202
204
|
const entities = generateCartProducts(this.product, this.template.simpleProducts, this.template.layers, this.isPrintPricing, this.layerThumbnails);
|
|
203
|
-
this.addToCart({ entities, shop: this.shop, pricing: this.productPricing, country: this.country, currency: this.currency });
|
|
204
|
-
this.
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
}
|
|
205
|
+
await this.addToCart({ entities, shop: this.shop, pricing: this.productPricing, country: this.country, currency: this.currency });
|
|
206
|
+
this.$router.push('/checkout/cart');
|
|
207
|
+
// this.showCartModal(async () => {
|
|
208
|
+
// const message = 'Do you wish to continue with editing the current design or reset the editor?';
|
|
209
|
+
// const reset = await this.showConfirmationModal(message, {
|
|
210
|
+
// cancelLabel: 'Keep design',
|
|
211
|
+
// submitLabel: 'Reset editor'
|
|
212
|
+
// });
|
|
213
|
+
// if (reset) {
|
|
214
|
+
// this.clearTemplate();
|
|
215
|
+
// this.resetLayers();
|
|
216
|
+
// } else {
|
|
217
|
+
// this.clearTemplate(true);
|
|
218
|
+
// }
|
|
219
|
+
// });
|
|
217
220
|
},
|
|
218
221
|
goToDesignAndClosePopover() {
|
|
219
222
|
this.selectTab('design');
|
|
@@ -53,13 +53,14 @@
|
|
|
53
53
|
</transition>
|
|
54
54
|
<editor-pricing
|
|
55
55
|
v-if="hasPricing"
|
|
56
|
-
class="EditorLayers__pricing"
|
|
56
|
+
class="EditorLayers__pricing"
|
|
57
|
+
:has-cart-btn="false" />
|
|
57
58
|
</div>
|
|
58
59
|
</template>
|
|
59
60
|
|
|
60
61
|
<script>
|
|
61
62
|
import { createNamespacedHelpers } from 'vuex';
|
|
62
|
-
import EditorPricing from '@lancom/shared/components/
|
|
63
|
+
import EditorPricing from '@lancom/shared/components/product/editor_pricing/editor-pricing';
|
|
63
64
|
import { cloneLayerModel } from '@lancom/shared/assets/js/models/product-layers';
|
|
64
65
|
import EditorLayerForms from './editor_layer_forms';
|
|
65
66
|
import EditorLayersLayer from './editor_layers_layer/editor-layers-layer';
|
|
@@ -70,6 +70,8 @@ export default {
|
|
|
70
70
|
const productsOptions = this.getProductOptions();
|
|
71
71
|
const options = productsOptions.filter(({ sides }) => sides.includes(this.side));
|
|
72
72
|
this.options = this.allowNoPrint ? [...options, { label: 'No Print' }] : options;
|
|
73
|
+
|
|
74
|
+
this.select(this.options[0]);
|
|
73
75
|
},
|
|
74
76
|
select(option) {
|
|
75
77
|
this.$emit('select', option);
|
|
@@ -6,14 +6,20 @@
|
|
|
6
6
|
&__header {
|
|
7
7
|
display: flex;
|
|
8
8
|
align-items: center;
|
|
9
|
+
margin-top: 5px;
|
|
10
|
+
&-logo {
|
|
11
|
+
img {
|
|
12
|
+
max-width: 75px;
|
|
13
|
+
max-height: 55px;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
9
16
|
&-info {
|
|
10
|
-
margin-left:
|
|
17
|
+
margin-left: 10px;
|
|
11
18
|
flex-grow: 1;
|
|
12
19
|
}
|
|
13
20
|
&-row {
|
|
14
21
|
display: flex;
|
|
15
22
|
align-items: center;
|
|
16
|
-
justify-content: space-between;
|
|
17
23
|
& + & {
|
|
18
24
|
margin-top: 5px;
|
|
19
25
|
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="EditorProductDetails__wrapper">
|
|
3
|
+
<h3 class="lc_h3 lc_black">
|
|
4
|
+
{{ product.name }}
|
|
5
|
+
</h3>
|
|
3
6
|
<div class="EditorProductDetails__header">
|
|
4
|
-
<div
|
|
7
|
+
<div
|
|
8
|
+
v-if="product.brand.logo"
|
|
9
|
+
class="EditorProductDetails__header-logo">
|
|
5
10
|
<img :src="product.brand.logo | staticLink" />
|
|
6
11
|
</div>
|
|
7
12
|
<div class="EditorProductDetails__header-info">
|
|
8
13
|
<div class="EditorProductDetails__header-row">
|
|
9
|
-
<h3 class="lc_h3 lc_black">
|
|
10
|
-
{{ product.name }}
|
|
11
|
-
</h3>
|
|
12
14
|
<span
|
|
13
15
|
v-if="defaultSimpleProduct && defaultSimpleProduct.pricing[0]"
|
|
14
16
|
class="lc_regular16 lc_grey1">
|
|
@@ -27,18 +29,7 @@
|
|
|
27
29
|
</template>
|
|
28
30
|
</v-popover>
|
|
29
31
|
</span>
|
|
30
|
-
|
|
31
|
-
<div class="EditorProductDetails__header-row">
|
|
32
|
-
<span class="EditorProductDetails__product-link">
|
|
33
|
-
SKU:
|
|
34
|
-
<a
|
|
35
|
-
:href="productLink"
|
|
36
|
-
target="_blank">
|
|
37
|
-
{{ product.SKU }}
|
|
38
|
-
<i class="icon-blank"></i>
|
|
39
|
-
</a>
|
|
40
|
-
</span>
|
|
41
|
-
<span class="lc_regular16 lc_grey1">
|
|
32
|
+
<span class="lc_regular16 lc_grey1 ml-6">
|
|
42
33
|
+
|
|
43
34
|
<v-popover
|
|
44
35
|
ref="popover"
|
|
@@ -59,6 +50,17 @@
|
|
|
59
50
|
</v-popover>
|
|
60
51
|
</span>
|
|
61
52
|
</div>
|
|
53
|
+
<div class="EditorProductDetails__header-row">
|
|
54
|
+
<span class="EditorProductDetails__product-link">
|
|
55
|
+
SKU:
|
|
56
|
+
<a
|
|
57
|
+
:href="productLink"
|
|
58
|
+
target="_blank">
|
|
59
|
+
{{ product.SKU }}
|
|
60
|
+
<i class="icon-blank"></i>
|
|
61
|
+
</a>
|
|
62
|
+
</span>
|
|
63
|
+
</div>
|
|
62
64
|
</div>
|
|
63
65
|
</div>
|
|
64
66
|
<div
|
|
@@ -69,13 +71,10 @@
|
|
|
69
71
|
<fragment
|
|
70
72
|
v-if="productDetailsLoaded && productAvailableInCurrentCountry">
|
|
71
73
|
<div class="EditorProductDetails__section">
|
|
72
|
-
<product-colors-selector />
|
|
73
|
-
</div>
|
|
74
|
-
<div class="EditorProductDetails__section">
|
|
75
|
-
<editor-pricing />
|
|
74
|
+
<product-colors-selector :has-another-print-btn="false" />
|
|
76
75
|
</div>
|
|
77
76
|
<div class="EditorProductDetails__section">
|
|
78
|
-
<
|
|
77
|
+
<editor-pricing :has-cart-btn="false" />
|
|
79
78
|
</div>
|
|
80
79
|
</fragment>
|
|
81
80
|
</div>
|
|
@@ -83,9 +82,8 @@
|
|
|
83
82
|
|
|
84
83
|
<script>
|
|
85
84
|
import { mapGetters } from 'vuex';
|
|
86
|
-
import ProductColorsSelector from '@lancom/shared/components/product/
|
|
87
|
-
import
|
|
88
|
-
import EditorPricing from '@lancom/shared/components/editor/editor_pricing/editor-pricing';
|
|
85
|
+
import ProductColorsSelector from '@lancom/shared/components/product/product_colors_selector/product-colors-selector';
|
|
86
|
+
import EditorPricing from '@lancom/shared/components/product/editor_pricing/editor-pricing';
|
|
89
87
|
import PricingDiscountsTable from '@lancom/shared/components/common/pricing_discounts_table/pricing-discounts-table';
|
|
90
88
|
import modals from '@lancom/shared/mixins/modals';
|
|
91
89
|
import { staticLink, priceWithTax } from '@lancom/shared/assets/js/utils/filters';
|
|
@@ -96,7 +94,6 @@ export default {
|
|
|
96
94
|
name: 'EditorProductDetails',
|
|
97
95
|
components: {
|
|
98
96
|
ProductColorsSelector,
|
|
99
|
-
ProductSizeSelector,
|
|
100
97
|
PricingDiscountsTable,
|
|
101
98
|
EditorPricing,
|
|
102
99
|
PricingTable
|
|
@@ -17,13 +17,14 @@
|
|
|
17
17
|
</div>
|
|
18
18
|
<editor-pricing
|
|
19
19
|
v-if="hasPricing"
|
|
20
|
+
:has-cart-btn="false"
|
|
20
21
|
class="EditorWizard__pricing" />
|
|
21
22
|
</div>
|
|
22
23
|
</template>
|
|
23
24
|
|
|
24
25
|
<script>
|
|
25
26
|
import { mapGetters, mapMutations } from 'vuex';
|
|
26
|
-
import EditorPricing from '@lancom/shared/components/
|
|
27
|
+
import EditorPricing from '@lancom/shared/components/product/editor_pricing/editor-pricing';
|
|
27
28
|
import Wizard from '@lancom/shared/components/product/wizard/wizard';
|
|
28
29
|
|
|
29
30
|
export default {
|
|
@@ -90,6 +90,7 @@
|
|
|
90
90
|
}">
|
|
91
91
|
<editor-print-area-options
|
|
92
92
|
v-if="productDetailsLoaded"
|
|
93
|
+
ref="areaOptions"
|
|
93
94
|
:product="product"
|
|
94
95
|
:selected="selectedPrintArea._id"
|
|
95
96
|
:side="editableSide.id"
|
|
@@ -109,7 +110,7 @@
|
|
|
109
110
|
<script>
|
|
110
111
|
import { createNamespacedHelpers } from 'vuex';
|
|
111
112
|
import EditorPrintAreaOptions from '@lancom/shared/components/editor/editor_print_area_options/editor-print-area-options';
|
|
112
|
-
import EditorPricing from '@lancom/shared/components/
|
|
113
|
+
import EditorPricing from '@lancom/shared/components/product/editor_pricing/editor-pricing';
|
|
113
114
|
import Tabs from '@lancom/shared/components/common/tabs';
|
|
114
115
|
import EditorWorkspaceSide from './editor_workspace_side/editor-workspace-side';
|
|
115
116
|
|
|
@@ -156,7 +157,7 @@ export default {
|
|
|
156
157
|
'setEditablePrintArea'
|
|
157
158
|
]),
|
|
158
159
|
selectTab(value) {
|
|
159
|
-
this.setEditableSide({ id: value });
|
|
160
|
+
this.setEditableSide({ id: value });
|
|
160
161
|
},
|
|
161
162
|
toggleSide() {
|
|
162
163
|
this.setEditableSide({
|
|
@@ -335,6 +335,12 @@ export default {
|
|
|
335
335
|
this.$set(this.form, 'postcode', suburb.postcode);
|
|
336
336
|
this.$set(this.form, 'city', suburb.locality);
|
|
337
337
|
this.$set(this.form, 'country', suburb.country);
|
|
338
|
+
if (suburb.addressLine1) {
|
|
339
|
+
this.$set(this.address, 'addressLine1', suburb.addressLine1);
|
|
340
|
+
}
|
|
341
|
+
if (suburb.addressLine2) {
|
|
342
|
+
this.$set(this.address, 'addressLine2', suburb.addressLine2);
|
|
343
|
+
}
|
|
338
344
|
}
|
|
339
345
|
},
|
|
340
346
|
handleSuburbChange(suburb) {
|
|
@@ -104,7 +104,7 @@ export default {
|
|
|
104
104
|
data() {
|
|
105
105
|
return {
|
|
106
106
|
processing: false,
|
|
107
|
-
loadingCard:
|
|
107
|
+
loadingCard: true,
|
|
108
108
|
form: {},
|
|
109
109
|
fields: null,
|
|
110
110
|
agreeTermsAndCondition: false,
|
|
@@ -113,7 +113,7 @@ export default {
|
|
|
113
113
|
};
|
|
114
114
|
},
|
|
115
115
|
computed: {
|
|
116
|
-
...mapGetters(['shop', 'country', 'payment']),
|
|
116
|
+
...mapGetters(['shop', 'country', 'payment', 'currency']),
|
|
117
117
|
...mapGetters('order', ['orderData']),
|
|
118
118
|
isVisibleChargeMessage() {
|
|
119
119
|
return this.isSuccessOrderCharge || this.isFailedOrderCharge;
|
|
@@ -152,7 +152,7 @@ export default {
|
|
|
152
152
|
...mapMutations('product', ['clearTemplate']),
|
|
153
153
|
...mapMutations('layers', ['resetLayers']),
|
|
154
154
|
initedCard() {
|
|
155
|
-
this.loadingCard =
|
|
155
|
+
this.loadingCard = false;
|
|
156
156
|
},
|
|
157
157
|
handleErrors(err) {
|
|
158
158
|
// err.messages.forEach(({ message }) => this.$toastr.e(message));
|
|
@@ -165,6 +165,7 @@ export default {
|
|
|
165
165
|
card,
|
|
166
166
|
shop: this.shop._id,
|
|
167
167
|
country: this.country?._id,
|
|
168
|
+
currency: this.currency?.isoCode,
|
|
168
169
|
payment: this.payment,
|
|
169
170
|
recaptchaToken: await this.getRecaptcha('order_payment')
|
|
170
171
|
};
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
</div>
|
|
25
25
|
<div class="OrderPrice__content">
|
|
26
26
|
<div>
|
|
27
|
-
<payment-
|
|
27
|
+
<payment-card
|
|
28
28
|
ref="paymentCart"
|
|
29
29
|
:amount="model.totalGST"
|
|
30
30
|
:has-spinner="false"
|
|
31
31
|
:payment-data="order.shippingAddress">
|
|
32
|
-
</payment-
|
|
32
|
+
</payment-card>
|
|
33
33
|
<div
|
|
34
34
|
v-if="errorMessage"
|
|
35
35
|
class="OrderPayment__error">
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
<script>
|
|
52
52
|
import { mapGetters } from 'vuex';
|
|
53
53
|
import api from '@lancom/shared/assets/js/api';
|
|
54
|
-
import
|
|
54
|
+
import PaymentCard from '@lancom/shared/components/common/payment/payment_card/payment-card';
|
|
55
55
|
import PaymentSuccess from '@lancom/shared/components/common/payment/payment_success/payment-success';
|
|
56
56
|
|
|
57
57
|
export default {
|
|
58
58
|
name: 'OrderPayment',
|
|
59
59
|
components: {
|
|
60
|
-
|
|
60
|
+
PaymentCard,
|
|
61
61
|
PaymentSuccess
|
|
62
62
|
},
|
|
63
63
|
props: {
|
|
@@ -77,7 +77,7 @@ export default {
|
|
|
77
77
|
};
|
|
78
78
|
},
|
|
79
79
|
computed: {
|
|
80
|
-
...mapGetters(['shop', 'country', 'payment']),
|
|
80
|
+
...mapGetters(['shop', 'country', 'currency', 'payment']),
|
|
81
81
|
model() {
|
|
82
82
|
return this.invoice || this.order;
|
|
83
83
|
}
|
|
@@ -96,7 +96,7 @@ export default {
|
|
|
96
96
|
if (card) {
|
|
97
97
|
const { _id: invoice } = this.invoice || {};
|
|
98
98
|
const recaptchaToken = await this.getRecaptcha('order_payment');
|
|
99
|
-
const payload = { invoice, card, shop: this.shop._id, country: this.country?._id, payment: this.payment, recaptchaToken };
|
|
99
|
+
const payload = { invoice, card, shop: this.shop._id, country: this.country?._id, payment: this.payment, currency: this.currency?.isoCode, recaptchaToken };
|
|
100
100
|
const { paid } = await api.createOrderPayment(this.order._id, payload);
|
|
101
101
|
this.model.paid = paid;
|
|
102
102
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
@import "@/assets/scss/variables";
|
|
2
|
+
.EditorPricing {
|
|
3
|
+
&__main {
|
|
4
|
+
&-alert {
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
height: 50px;
|
|
9
|
+
font-weight: 600;
|
|
10
|
+
font-size: 20px;
|
|
11
|
+
line-height: 27px;
|
|
12
|
+
background-color: $gray;
|
|
13
|
+
color: $gray_main;
|
|
14
|
+
@media (max-width: $bp-extra-small-max) {
|
|
15
|
+
height: 63px;
|
|
16
|
+
padding: 15px;
|
|
17
|
+
font-size: 16px;
|
|
18
|
+
}
|
|
19
|
+
img {
|
|
20
|
+
margin-right: 10px;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
&__footer {
|
|
25
|
+
background: $green;
|
|
26
|
+
height: 76px;
|
|
27
|
+
padding: 0 14px;
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: space-between;
|
|
31
|
+
@media (max-width: $bp-extra-small-max) {
|
|
32
|
+
flex-wrap: wrap;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
height: auto;
|
|
35
|
+
min-height: 110px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&-section {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
&__total {
|
|
44
|
+
margin-left: 38px;
|
|
45
|
+
font-weight: 500;
|
|
46
|
+
font-size: 22px;
|
|
47
|
+
line-height: 30px;
|
|
48
|
+
text-transform: uppercase;
|
|
49
|
+
color: $black;
|
|
50
|
+
span {
|
|
51
|
+
font-weight: bold;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
&__toggle-details {
|
|
55
|
+
font-weight: 800;
|
|
56
|
+
font-size: 16px;
|
|
57
|
+
line-height: 22px;
|
|
58
|
+
text-decoration: underline;
|
|
59
|
+
text-transform: uppercase;
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
@media (max-width: $bp-extra-small-max) {
|
|
62
|
+
text-align: center;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
&__add-to-cart-button {
|
|
66
|
+
margin-left: 30px;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
::v-deep .btn-green {
|
|
70
|
+
background-color: white;
|
|
71
|
+
color: $black;
|
|
72
|
+
&.disabled {
|
|
73
|
+
background-color: $gray;
|
|
74
|
+
}
|
|
75
|
+
}
|