@lancom/shared 0.0.133 → 0.0.136
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 +36 -0
- package/assets/js/api/index.js +6 -0
- package/assets/js/utils/quote.js +4 -3
- package/components/checkout/cart/cart_entity/cart-entity.mixin.js +19 -3
- package/components/checkout/cart/cart_entity/cart-entity.vue +6 -0
- package/components/checkout/cart/cart_entity/cart_entity_color_simple_products/cart-entity-color-simple-products.mixin.js +4 -0
- package/components/checkout/cart/cart_entity/cart_entity_color_simple_products/cart-entity-color-simple-products.vue +9 -1
- package/components/checkout/cart/cart_entity/cart_entity_color_simple_products/cart_entity_color_simple_product/cart-entity-color-simple-product.scss +8 -0
- package/components/checkout/cart/cart_entity/cart_entity_color_simple_products/cart_entity_color_simple_product/cart-entity-color-simple-product.vue +25 -2
- package/components/common/checkbox.vue +10 -0
- package/components/common/pricing_discounts_table/pricing-discounts-table.vue +13 -3
- package/components/common/tabs.vue +15 -2
- package/components/news/news_list/news-list.scss +44 -0
- package/components/news/news_list/news-list.vue +51 -15
- package/components/order/order_view/order-view.vue +4 -1
- package/components/product/gallery/gallery.vue +6 -0
- package/components/product/product_info_tabs/product-info-tabs.vue +1 -0
- package/components/product/product_prints_price_info/product-prints-price-info.scss +10 -0
- package/components/product/product_prints_price_info/product-prints-price-info.vue +38 -14
- package/components/quotes/quote_request/quote-request.vue +11 -11
- package/package.json +1 -1
package/assets/js/api/admin.js
CHANGED
|
@@ -16,6 +16,18 @@ export default {
|
|
|
16
16
|
removeNews(id) {
|
|
17
17
|
return _delete(`admin/news/${id}`);
|
|
18
18
|
},
|
|
19
|
+
fetchNewsTags() {
|
|
20
|
+
return _get('admin/news-tag');
|
|
21
|
+
},
|
|
22
|
+
fetchNewsTagById(id) {
|
|
23
|
+
return _get(`admin/news-tag/${id}`);
|
|
24
|
+
},
|
|
25
|
+
saveNewsTag(newsTag) {
|
|
26
|
+
return newsTag._id ? _put(`admin/news-tag/${newsTag._id}`, newsTag) : _post('admin/news-tag', newsTag);
|
|
27
|
+
},
|
|
28
|
+
removeNewsTag(id) {
|
|
29
|
+
return _delete(`admin/news-tag/${id}`);
|
|
30
|
+
},
|
|
19
31
|
fetchShops() {
|
|
20
32
|
return _get('admin/shops');
|
|
21
33
|
},
|
|
@@ -130,6 +142,18 @@ export default {
|
|
|
130
142
|
removeTaskType(id) {
|
|
131
143
|
return _delete(`admin/task-types/${id}`);
|
|
132
144
|
},
|
|
145
|
+
fetchAccessTokens() {
|
|
146
|
+
return _get('admin/access-tokens');
|
|
147
|
+
},
|
|
148
|
+
fetchAccessTokenById(id) {
|
|
149
|
+
return _get(`admin/access-tokens/${id}`);
|
|
150
|
+
},
|
|
151
|
+
saveAccessToken(item) {
|
|
152
|
+
return item._id ? _put(`admin/access-tokens/${item._id}`, item) : _post('admin/access-tokens', item);
|
|
153
|
+
},
|
|
154
|
+
removeAccessToken(id) {
|
|
155
|
+
return _delete(`admin/access-tokens/${id}`);
|
|
156
|
+
},
|
|
133
157
|
fetchFAQ() {
|
|
134
158
|
return _get('admin/faq');
|
|
135
159
|
},
|
|
@@ -293,6 +317,18 @@ export default {
|
|
|
293
317
|
removeDecorator(id) {
|
|
294
318
|
return _delete(`admin/decorators/${id}`);
|
|
295
319
|
},
|
|
320
|
+
async fetchWebhooks(params) {
|
|
321
|
+
return sortByName(await _get('admin/webhooks', params));
|
|
322
|
+
},
|
|
323
|
+
fetchWebhookById(id) {
|
|
324
|
+
return _get(`admin/webhooks/${id}`);
|
|
325
|
+
},
|
|
326
|
+
saveWebhook(webhook) {
|
|
327
|
+
return webhook._id ? _put(`admin/webhooks/${webhook._id}`, webhook) : _post('admin/webhooks', webhook);
|
|
328
|
+
},
|
|
329
|
+
removeWebhook(id) {
|
|
330
|
+
return _delete(`admin/webhooks/${id}`);
|
|
331
|
+
},
|
|
296
332
|
async fetchWarehouses(params) {
|
|
297
333
|
return sortByName(await _get('admin/warehouse', params));
|
|
298
334
|
},
|
package/assets/js/api/index.js
CHANGED
|
@@ -63,6 +63,12 @@ const api = {
|
|
|
63
63
|
fetchSingleNews(shop, alias, preview = false) {
|
|
64
64
|
return _get(`shop/${shop}/news/${alias}?preview=${preview}`);
|
|
65
65
|
},
|
|
66
|
+
fetchNewsTags(shop, params) {
|
|
67
|
+
return _get(`shop/${shop}/news-tag`, params);
|
|
68
|
+
},
|
|
69
|
+
fetchNewsTag(shop, alias) {
|
|
70
|
+
return _get(`shop/${shop}/news-tag/${alias}`);
|
|
71
|
+
},
|
|
66
72
|
fetchProductDetails(shop, alias) {
|
|
67
73
|
return _get(`shop/${shop}/products/${alias}/simple-products`);
|
|
68
74
|
},
|
package/assets/js/utils/quote.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export function convertQuoteToOrder(quote, option) {
|
|
2
|
+
const files = [quote.file, ...(quote.files || [])].filter(f => !!f);
|
|
2
3
|
return {
|
|
3
4
|
paymentMethod: option.paymentMethod || 'deposit',
|
|
4
5
|
billingAddress: quote.address,
|
|
@@ -15,14 +16,14 @@ export function convertQuoteToOrder(quote, option) {
|
|
|
15
16
|
shippingTotal: option.shippingTotal,
|
|
16
17
|
adminShippingTotal: option.adminShippingTotal,
|
|
17
18
|
quote: quote._id,
|
|
18
|
-
resources:
|
|
19
|
+
resources: files.map(f => ({
|
|
19
20
|
status: 'pending approval',
|
|
20
21
|
prints: [],
|
|
21
22
|
revision: null,
|
|
22
23
|
note: null,
|
|
23
24
|
type: 'Artwork Files',
|
|
24
|
-
file:
|
|
25
|
-
}
|
|
25
|
+
file: f.file
|
|
26
|
+
}))
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
29
|
|
|
@@ -26,16 +26,19 @@ export default {
|
|
|
26
26
|
hasPrints() {
|
|
27
27
|
return this.sumPrints > 0;
|
|
28
28
|
},
|
|
29
|
+
cartEntityPricing() {
|
|
30
|
+
return this.cartProductsPricing[this.entity.guid] || {};
|
|
31
|
+
},
|
|
29
32
|
totalPrice() {
|
|
30
|
-
const { totalPriceWithoutTax = 0 } = this.
|
|
33
|
+
const { totalPriceWithoutTax = 0 } = this.cartEntityPricing;
|
|
31
34
|
return totalPriceWithoutTax;
|
|
32
35
|
},
|
|
33
36
|
printsTotalPrice() {
|
|
34
|
-
const { prints = {} } = this.
|
|
37
|
+
const { prints = {} } = this.cartEntityPricing;
|
|
35
38
|
return prints.totalPriceWithoutTax || 0;
|
|
36
39
|
},
|
|
37
40
|
productsTotalPrice() {
|
|
38
|
-
const { product = {} } = this.
|
|
41
|
+
const { product = {} } = this.cartEntityPricing;
|
|
39
42
|
return product.totalPriceWithoutTax || 0;
|
|
40
43
|
},
|
|
41
44
|
simpleProductsWithAmount() {
|
|
@@ -46,6 +49,19 @@ export default {
|
|
|
46
49
|
},
|
|
47
50
|
groupedSimpleProducts() {
|
|
48
51
|
return groupSimpleProducts(this.entity, true, true);
|
|
52
|
+
},
|
|
53
|
+
isSameUnitPrices() {
|
|
54
|
+
const { products } = this.cartEntityPricing;
|
|
55
|
+
const uniquePrices = (products?.products || []).reduce((prices, product) => {
|
|
56
|
+
prices.add(product.priceWithoutTax);
|
|
57
|
+
return prices;
|
|
58
|
+
}, new Set());
|
|
59
|
+
return uniquePrices.size === 1;
|
|
60
|
+
},
|
|
61
|
+
unitPrice() {
|
|
62
|
+
const { products } = this.cartEntityPricing;
|
|
63
|
+
const product = (products?.products || [])[0];
|
|
64
|
+
return product ? product.priceWithoutTax : null;
|
|
49
65
|
}
|
|
50
66
|
},
|
|
51
67
|
methods: {
|
|
@@ -33,9 +33,15 @@
|
|
|
33
33
|
:entity="entity"
|
|
34
34
|
:group="group"
|
|
35
35
|
:default-preview="false"
|
|
36
|
+
:display-unit-price="!isSameUnitPrices"
|
|
36
37
|
class="CartEntity__item"
|
|
37
38
|
@remove="removeSimpleProducts" />
|
|
38
39
|
</div>
|
|
40
|
+
<div
|
|
41
|
+
v-if="isSameUnitPrices"
|
|
42
|
+
class="lc_title-small mt-8">
|
|
43
|
+
Price Per Unit: {{ unitPrice | price }}
|
|
44
|
+
</div>
|
|
39
45
|
<div
|
|
40
46
|
v-if="hasPrints"
|
|
41
47
|
class="CartEntity__decorations">
|
|
@@ -34,11 +34,19 @@
|
|
|
34
34
|
<div class="lc_title-small mt-8">
|
|
35
35
|
Qty:
|
|
36
36
|
</div>
|
|
37
|
+
<div
|
|
38
|
+
v-if="displayUnitPrice && cartProductsPricing"
|
|
39
|
+
class="lc_title-small mt-8">
|
|
40
|
+
|
|
41
|
+
</div>
|
|
42
|
+
|
|
37
43
|
</div>
|
|
38
44
|
<cart-entity-color-simple-product
|
|
39
45
|
v-for="simpleProduct in group.simpleProducts"
|
|
40
46
|
:key="simpleProduct._id"
|
|
41
|
-
:simple-product="simpleProduct"
|
|
47
|
+
:simple-product="simpleProduct"
|
|
48
|
+
:entity="entity"
|
|
49
|
+
:display-unit-price="displayUnitPrice" />
|
|
42
50
|
</div>
|
|
43
51
|
<div class="CartEntityColorSimpleProducts__totals">
|
|
44
52
|
<div class="CartEntityColorSimpleProducts__total">
|
|
@@ -38,6 +38,13 @@
|
|
|
38
38
|
class="centered CartColorSimpleProduct__field">
|
|
39
39
|
{{ model }}
|
|
40
40
|
</div>
|
|
41
|
+
<div
|
|
42
|
+
v-if="displayUnitPrice"
|
|
43
|
+
class="centered CartColorSimpleProduct__price">
|
|
44
|
+
<span v-if="model > 0">
|
|
45
|
+
{{ unitPrice | price }}
|
|
46
|
+
</span>
|
|
47
|
+
</div>
|
|
41
48
|
</div>
|
|
42
49
|
</template>
|
|
43
50
|
|
|
@@ -45,12 +52,19 @@
|
|
|
45
52
|
import debounce from 'lodash.debounce';
|
|
46
53
|
import { mapGetters, mapActions } from 'vuex';
|
|
47
54
|
import confirm from '@lancom/shared/mixins/confirm';
|
|
48
|
-
import { inRange } from '@lancom/shared/assets/js/utils/filters';
|
|
55
|
+
import { inRange, price } from '@lancom/shared/assets/js/utils/filters';
|
|
49
56
|
|
|
50
57
|
export default {
|
|
51
58
|
name: 'CartColorSimpleProduct',
|
|
52
59
|
mixins: [confirm],
|
|
60
|
+
filters: {
|
|
61
|
+
price
|
|
62
|
+
},
|
|
53
63
|
props: {
|
|
64
|
+
entity: {
|
|
65
|
+
type: Object,
|
|
66
|
+
required: true
|
|
67
|
+
},
|
|
54
68
|
simpleProduct: {
|
|
55
69
|
type: Object,
|
|
56
70
|
required: true
|
|
@@ -62,6 +76,10 @@ export default {
|
|
|
62
76
|
editable: {
|
|
63
77
|
type: Boolean,
|
|
64
78
|
default: true
|
|
79
|
+
},
|
|
80
|
+
displayUnitPrice: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: false
|
|
65
83
|
}
|
|
66
84
|
},
|
|
67
85
|
data() {
|
|
@@ -72,7 +90,7 @@ export default {
|
|
|
72
90
|
},
|
|
73
91
|
computed: {
|
|
74
92
|
...mapGetters(['shop']),
|
|
75
|
-
...mapGetters('cart', ['simpleProducts']),
|
|
93
|
+
...mapGetters('cart', ['simpleProducts', 'cartProductsPricing']),
|
|
76
94
|
model: {
|
|
77
95
|
get() {
|
|
78
96
|
return (this.simpleProducts.find(sp => sp.guid === this.simpleProduct.guid) || {}).amount || this.defaultValue;
|
|
@@ -88,6 +106,11 @@ export default {
|
|
|
88
106
|
shop: this.shop
|
|
89
107
|
});
|
|
90
108
|
}
|
|
109
|
+
},
|
|
110
|
+
unitPrice() {
|
|
111
|
+
const { products } = this.cartProductsPricing[this.entity.guid] || {};
|
|
112
|
+
const product = (products || {})[this.simpleProduct.guid];
|
|
113
|
+
return product ? product.priceWithoutTax : null;
|
|
91
114
|
}
|
|
92
115
|
},
|
|
93
116
|
methods: {
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
@change="$emit('change', model)" />
|
|
14
14
|
<label
|
|
15
15
|
class="Checkbox__label"
|
|
16
|
+
:class="{ dark }"
|
|
16
17
|
:for="id"
|
|
17
18
|
@click.stop>
|
|
18
19
|
<i class="icon-ok Checkbox__icon"></i>
|
|
@@ -35,6 +36,9 @@ export default {
|
|
|
35
36
|
disabled: {
|
|
36
37
|
default: false
|
|
37
38
|
},
|
|
39
|
+
dark: {
|
|
40
|
+
default: false
|
|
41
|
+
},
|
|
38
42
|
uncheckedValue: {
|
|
39
43
|
default: false
|
|
40
44
|
},
|
|
@@ -128,6 +132,12 @@ html[dir=rtl] {
|
|
|
128
132
|
transform: translateY(-50%);
|
|
129
133
|
}
|
|
130
134
|
|
|
135
|
+
&.dark {
|
|
136
|
+
&:before {
|
|
137
|
+
border: 1px solid $grey_1;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
131
141
|
&:after {
|
|
132
142
|
content: '';
|
|
133
143
|
position: absolute;
|
|
@@ -16,7 +16,12 @@
|
|
|
16
16
|
active: amount >= range.min && ((range.max && amount <= range.max) || !range.max)
|
|
17
17
|
}">
|
|
18
18
|
<td>{{ (range.max >= 9999 || !range.max) ? `${range.min}+` : `${range.min}-${range.max}` }}</td>
|
|
19
|
-
<td
|
|
19
|
+
<td v-if="withGst">
|
|
20
|
+
{{ range.price | priceWithTax(pricingSettings) }}
|
|
21
|
+
</td>
|
|
22
|
+
<td v-else>
|
|
23
|
+
{{ range.price | price }}
|
|
24
|
+
</td>
|
|
20
25
|
</tr>
|
|
21
26
|
</tbody>
|
|
22
27
|
</table>
|
|
@@ -24,12 +29,13 @@
|
|
|
24
29
|
|
|
25
30
|
<script>
|
|
26
31
|
import { mapGetters } from 'vuex';
|
|
27
|
-
import { priceWithTax } from '@lancom/shared/assets/js/utils/filters';
|
|
32
|
+
import { priceWithTax, price } from '@lancom/shared/assets/js/utils/filters';
|
|
28
33
|
|
|
29
34
|
export default {
|
|
30
35
|
name: 'PricingDiscountsTable',
|
|
31
36
|
filters: {
|
|
32
|
-
priceWithTax
|
|
37
|
+
priceWithTax,
|
|
38
|
+
price
|
|
33
39
|
},
|
|
34
40
|
props: {
|
|
35
41
|
prices: {
|
|
@@ -47,6 +53,10 @@ export default {
|
|
|
47
53
|
striped: {
|
|
48
54
|
type: Boolean,
|
|
49
55
|
default: false
|
|
56
|
+
},
|
|
57
|
+
withGst: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: true
|
|
50
60
|
}
|
|
51
61
|
},
|
|
52
62
|
computed: {
|
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
v-for="tab in tabs"
|
|
6
6
|
:key="tab.value"
|
|
7
7
|
class="tab ripple"
|
|
8
|
-
:class="{
|
|
8
|
+
:class="{
|
|
9
|
+
active: currentTab === tab.value,
|
|
10
|
+
shadow: btnsShadow
|
|
11
|
+
}"
|
|
9
12
|
@click="select(tab)">
|
|
10
13
|
<div class="lc_medium18 tab-label">
|
|
11
14
|
<i
|
|
@@ -53,6 +56,10 @@ export default {
|
|
|
53
56
|
type: Boolean,
|
|
54
57
|
default: false
|
|
55
58
|
},
|
|
59
|
+
btnsShadow: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: false
|
|
62
|
+
},
|
|
56
63
|
fullWidth: {
|
|
57
64
|
type: Boolean,
|
|
58
65
|
default: true
|
|
@@ -132,7 +139,6 @@ export default {
|
|
|
132
139
|
&s {
|
|
133
140
|
display: flex;
|
|
134
141
|
border-radius: 4px 4px 0 0;
|
|
135
|
-
overflow: hidden;
|
|
136
142
|
&--secondary,
|
|
137
143
|
&--primary,
|
|
138
144
|
&--large {
|
|
@@ -161,12 +167,19 @@ export default {
|
|
|
161
167
|
background-color: #FFFFFF;
|
|
162
168
|
color: $grey_1;
|
|
163
169
|
}
|
|
170
|
+
&:hover {
|
|
171
|
+
background-color: #FFFFFF;
|
|
172
|
+
color: $grey_1;
|
|
173
|
+
}
|
|
164
174
|
&s--large &.active,
|
|
165
175
|
&s--primary &.active,
|
|
166
176
|
&s--secondary &.active {
|
|
167
177
|
background-color: $grey_4;
|
|
168
178
|
color: $black;
|
|
169
179
|
}
|
|
180
|
+
&.shadow {
|
|
181
|
+
box-shadow: 1px 1px 2px rgb(214, 214, 214);
|
|
182
|
+
}
|
|
170
183
|
}
|
|
171
184
|
.fullWidth .tab {
|
|
172
185
|
flex-grow: 1;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
&__wrapper {
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-wrap: wrap;
|
|
7
|
+
margin-bottom: 20px;
|
|
7
8
|
}
|
|
8
9
|
&__item {
|
|
9
10
|
width: calc(50% - 30px);
|
|
@@ -21,4 +22,47 @@
|
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
.VuePagination {
|
|
29
|
+
&__pagination {
|
|
30
|
+
display: flex;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
&-item {
|
|
33
|
+
font-size: 16px;
|
|
34
|
+
line-height: 170%;
|
|
35
|
+
color: $black;
|
|
36
|
+
width: 50px;
|
|
37
|
+
height: 50px;
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
border: 1px solid $grey_3;
|
|
42
|
+
border-radius: 4px;
|
|
43
|
+
margin: 0 3px;
|
|
44
|
+
a {
|
|
45
|
+
display: block;
|
|
46
|
+
width: 100%;
|
|
47
|
+
height: 100%;
|
|
48
|
+
text-align: center;
|
|
49
|
+
padding-top: 11px;
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
&:hover {
|
|
52
|
+
background-color: $grey_3;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
&.active {
|
|
56
|
+
background-color: $black;
|
|
57
|
+
color: white;
|
|
58
|
+
}
|
|
59
|
+
&.disabled {
|
|
60
|
+
pointer-events: none;
|
|
61
|
+
opacity: .5;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
&__count {
|
|
66
|
+
display: none;
|
|
67
|
+
}
|
|
24
68
|
}
|
|
@@ -1,38 +1,74 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
<div
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<div class="NewsList__wrapper">
|
|
4
|
+
<div
|
|
5
|
+
v-for="(item, index) in news"
|
|
6
|
+
:key="item._id"
|
|
7
|
+
:class="{
|
|
8
|
+
'NewsList__item--large': (index + 1) % 3 === 0
|
|
9
|
+
}"
|
|
10
|
+
class="NewsList__item">
|
|
11
|
+
<transition
|
|
12
|
+
:name="(index + 1) % 3 ? 'from-right-to-left' : 'from-left-to-right'"
|
|
13
|
+
appear>
|
|
14
|
+
<news-list-item :item="item" class="elevation2" />
|
|
15
|
+
</transition>
|
|
16
|
+
</div>
|
|
15
17
|
</div>
|
|
18
|
+
<pagination
|
|
19
|
+
v-if="perPage > 0"
|
|
20
|
+
v-model="currentPage"
|
|
21
|
+
:records="count"
|
|
22
|
+
:per-page="perPage"
|
|
23
|
+
:options="{ chunk: 3 }" />
|
|
16
24
|
</div>
|
|
17
25
|
</template>
|
|
18
26
|
|
|
19
27
|
<script>
|
|
28
|
+
import Pagination from 'vue-pagination-2';
|
|
20
29
|
import NewsListItem from '../news_list_item/news-list-item';
|
|
21
30
|
|
|
22
31
|
export default {
|
|
23
32
|
name: 'NewsList',
|
|
24
33
|
components: {
|
|
25
|
-
NewsListItem
|
|
34
|
+
NewsListItem,
|
|
35
|
+
Pagination
|
|
26
36
|
},
|
|
27
37
|
props: {
|
|
28
38
|
news: {
|
|
29
39
|
type: Array,
|
|
30
40
|
required: true
|
|
41
|
+
},
|
|
42
|
+
count: {
|
|
43
|
+
type: Number
|
|
44
|
+
},
|
|
45
|
+
perPage: {
|
|
46
|
+
type: Number
|
|
47
|
+
},
|
|
48
|
+
page: {
|
|
49
|
+
type: Number
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
computed: {
|
|
53
|
+
currentPage: {
|
|
54
|
+
get() {
|
|
55
|
+
return this.page;
|
|
56
|
+
},
|
|
57
|
+
set(page) {
|
|
58
|
+
const params = [];
|
|
59
|
+
if (page > 1) {
|
|
60
|
+
params.push(`page=${page}`);
|
|
61
|
+
}
|
|
62
|
+
const link = `${this.$route.path}${params.length ? `?${params.join('&')}` : ''}`;
|
|
63
|
+
window.location = link;
|
|
64
|
+
// this.$router.push(link);
|
|
65
|
+
// window.scrollTo(0, 0);
|
|
66
|
+
}
|
|
31
67
|
}
|
|
32
68
|
}
|
|
33
69
|
};
|
|
34
70
|
</script>
|
|
35
71
|
|
|
36
|
-
<style lang="scss"
|
|
72
|
+
<style lang="scss">
|
|
37
73
|
@import 'news-list';
|
|
38
74
|
</style>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</h4>
|
|
18
18
|
</div>
|
|
19
19
|
<h1 class="text-secondary lc_h1">
|
|
20
|
-
|
|
20
|
+
Tax invoice
|
|
21
21
|
</h1>
|
|
22
22
|
</div>
|
|
23
23
|
<div class="OrderView__info">
|
|
@@ -144,6 +144,9 @@
|
|
|
144
144
|
<div class="lc_regular16">
|
|
145
145
|
Total inc GST: <b>{{ model.totalGST | price }}</b>
|
|
146
146
|
</div>
|
|
147
|
+
<div class="lc_regular16">
|
|
148
|
+
Pending Payment: <b>{{ model.totalGST | price }}</b>
|
|
149
|
+
</div>
|
|
147
150
|
</div>
|
|
148
151
|
</div>
|
|
149
152
|
</div>
|
|
@@ -171,6 +171,12 @@ export default {
|
|
|
171
171
|
this.skipUpdateGallery = false;
|
|
172
172
|
}
|
|
173
173
|
},
|
|
174
|
+
mounted() {
|
|
175
|
+
const index = this.filteredImages.findIndex(i => i.color === this.editableColor?._id);
|
|
176
|
+
if (index > -1) {
|
|
177
|
+
this.goToSlide(index, true);
|
|
178
|
+
}
|
|
179
|
+
},
|
|
174
180
|
methods: {
|
|
175
181
|
...mapActions('product', ['selectColor']),
|
|
176
182
|
staticLink,
|
|
@@ -32,6 +32,9 @@
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.ProductPrintsPriceInfo {
|
|
35
|
+
&__wrapper {
|
|
36
|
+
position: relative;
|
|
37
|
+
}
|
|
35
38
|
&__print-pricing {
|
|
36
39
|
margin-top: 30px;
|
|
37
40
|
}
|
|
@@ -60,4 +63,11 @@
|
|
|
60
63
|
justify-content: flex-end;
|
|
61
64
|
padding: 0 0 10px 0;
|
|
62
65
|
}
|
|
66
|
+
&__content {
|
|
67
|
+
opacity: 1;
|
|
68
|
+
transition: opacity 500ms;
|
|
69
|
+
&--hidden {
|
|
70
|
+
opacity: 0;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
63
73
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ProductPrintsPriceInfo__wrapper">
|
|
3
3
|
<div class="ProductPrintsPriceInfo__toggle-gst">
|
|
4
|
-
<checkbox
|
|
4
|
+
<checkbox
|
|
5
|
+
v-model="inclGST"
|
|
6
|
+
:dark="true"
|
|
7
|
+
@change="onChangeInclGST">
|
|
5
8
|
<div class="ml-5">Inc. GST</div>
|
|
6
9
|
</checkbox>
|
|
7
10
|
</div>
|
|
@@ -9,22 +12,29 @@
|
|
|
9
12
|
v-if="avilableTabs.length > 0"
|
|
10
13
|
:tabs="avilableTabs"
|
|
11
14
|
:selected="selectedTab"
|
|
15
|
+
:btns-shadow="true"
|
|
12
16
|
type="secondary"
|
|
13
17
|
@select="selectedTab = $event">
|
|
14
18
|
<template #default="{ currentTab }">
|
|
15
|
-
<product-screen-print-price-info
|
|
16
|
-
v-if="currentTab === 'screen print'"
|
|
17
|
-
:product="product"
|
|
18
|
-
:with-gst="inclGST" />
|
|
19
|
-
<product-print-price-info
|
|
20
|
-
v-else-if="currentTab"
|
|
21
|
-
:product="product"
|
|
22
|
-
:type="currentTab"
|
|
23
|
-
:with-gst="inclGST" />
|
|
24
19
|
<div
|
|
25
|
-
|
|
26
|
-
class="
|
|
27
|
-
|
|
20
|
+
class="ProductPrintsPriceInfo__content"
|
|
21
|
+
:class="{
|
|
22
|
+
'ProductPrintsPriceInfo__content--hidden': inclGSTSpinner
|
|
23
|
+
}">
|
|
24
|
+
<product-screen-print-price-info
|
|
25
|
+
v-if="currentTab === 'screen print'"
|
|
26
|
+
:product="product"
|
|
27
|
+
:with-gst="inclGSTFinal" />
|
|
28
|
+
<product-print-price-info
|
|
29
|
+
v-else-if="currentTab"
|
|
30
|
+
:product="product"
|
|
31
|
+
:type="currentTab"
|
|
32
|
+
:with-gst="inclGSTFinal" />
|
|
33
|
+
<div
|
|
34
|
+
v-if="currentPrintTypeMessage"
|
|
35
|
+
class="ProductPrintsPriceInfo__print-description"
|
|
36
|
+
v-html="currentPrintTypeMessage"></div>
|
|
37
|
+
</div>
|
|
28
38
|
</template>
|
|
29
39
|
</tabs>
|
|
30
40
|
<div
|
|
@@ -59,6 +69,9 @@ export default {
|
|
|
59
69
|
data() {
|
|
60
70
|
return {
|
|
61
71
|
inclGST: false,
|
|
72
|
+
inclGSTFinal: false,
|
|
73
|
+
inclGSTSpinner: false,
|
|
74
|
+
inclGSTSpinnerTimer: null,
|
|
62
75
|
orderPrintTypes: PRINT_TYPES_LIST,
|
|
63
76
|
tabs: [{
|
|
64
77
|
label: 'Black',
|
|
@@ -107,8 +120,19 @@ export default {
|
|
|
107
120
|
group: 'garment-print-price-details'
|
|
108
121
|
});
|
|
109
122
|
},
|
|
123
|
+
destroyed() {
|
|
124
|
+
clearTimeout(this.inclGSTSpinnerTimer);
|
|
125
|
+
},
|
|
110
126
|
methods: {
|
|
111
|
-
...mapActions(['loadHelpMessages'])
|
|
127
|
+
...mapActions(['loadHelpMessages']),
|
|
128
|
+
onChangeInclGST() {
|
|
129
|
+
clearTimeout(this.inclGSTSpinnerTimer);
|
|
130
|
+
this.inclGSTSpinner = true;
|
|
131
|
+
this.inclGSTSpinnerTimer = setTimeout(() => {
|
|
132
|
+
this.inclGSTSpinner = false;
|
|
133
|
+
this.inclGSTFinal = this.inclGST;
|
|
134
|
+
}, 500);
|
|
135
|
+
}
|
|
112
136
|
}
|
|
113
137
|
};
|
|
114
138
|
</script>
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
Upload your logo/artwork
|
|
95
95
|
</div>
|
|
96
96
|
<file-uploader
|
|
97
|
-
:multiple="
|
|
97
|
+
:multiple="true"
|
|
98
98
|
:url="`image/editor/${shop._id}/undefined`"
|
|
99
99
|
:has-conversion-error-modal="false"
|
|
100
100
|
:show-error-message="false"
|
|
@@ -135,14 +135,14 @@
|
|
|
135
135
|
{{ uploadError }}
|
|
136
136
|
</div>
|
|
137
137
|
<div
|
|
138
|
-
v-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
138
|
+
v-for="file in quote.files"
|
|
139
|
+
:key="file._id"
|
|
140
|
+
class="QuoteRequest__upload-file mt-5">
|
|
141
|
+
<span @click="quote.files.splice(quote.files.indexOf(file), 1)">x</span>
|
|
142
142
|
<a
|
|
143
|
-
:href="
|
|
143
|
+
:href="file.origin"
|
|
144
144
|
target="_blank">
|
|
145
|
-
{{
|
|
145
|
+
{{ file.fileName }}
|
|
146
146
|
</a>
|
|
147
147
|
</div>
|
|
148
148
|
</div>
|
|
@@ -357,7 +357,7 @@ export default {
|
|
|
357
357
|
quoteTypes: [],
|
|
358
358
|
needToPrint: null,
|
|
359
359
|
needItBy: null,
|
|
360
|
-
|
|
360
|
+
files: []
|
|
361
361
|
}
|
|
362
362
|
};
|
|
363
363
|
},
|
|
@@ -366,15 +366,15 @@ export default {
|
|
|
366
366
|
},
|
|
367
367
|
methods: {
|
|
368
368
|
handleUploaded(file) {
|
|
369
|
-
this.quote.file
|
|
369
|
+
this.quote.files.push(file);
|
|
370
370
|
},
|
|
371
371
|
handleUploadError(e) {
|
|
372
372
|
const { error, data } = e?.response?.data || {};
|
|
373
373
|
if (data) {
|
|
374
|
-
this.quote.
|
|
374
|
+
this.quote.files.push({
|
|
375
375
|
fileName: data.fileName,
|
|
376
376
|
origin: data.source
|
|
377
|
-
};
|
|
377
|
+
});
|
|
378
378
|
} else {
|
|
379
379
|
this.uploadError = error;
|
|
380
380
|
}
|