@lancom/shared 0.0.169 → 0.0.170

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.
@@ -1,5 +1,6 @@
1
1
  const gtm = {
2
2
  push(data, skipReset) {
3
+ console.log('push:data: ', data);
3
4
  window.dataLayer = window.dataLayer || [];
4
5
  if (!skipReset) {
5
6
  window.dataLayer.push(function() {
@@ -11,6 +11,17 @@
11
11
  padding: 15px;
12
12
  }
13
13
  }
14
+ &__same-day-dispatch {
15
+ width: 30px;
16
+ height: 30px;
17
+ background-image: url('/icons/same-day-dispatch.svg');
18
+ background-position: center center;
19
+ background-repeat: no-repeat;
20
+ background-size: contain;
21
+ display: inline-block;
22
+ position: relative;
23
+ top: 7px;
24
+ }
14
25
  &__info {
15
26
  flex-grow: 1;
16
27
  }
@@ -12,7 +12,7 @@
12
12
  v-if="product.sameDayDispatch"
13
13
  class="lc_body-small">
14
14
  <div class="mt-5">
15
- <i class="icon-delivery"></i>
15
+ <span class="CartEntity__same-day-dispatch"></span>
16
16
  <span>
17
17
  This product qualifies for same day dispatch.
18
18
  <nuxt-link
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.169",
3
+ "version": "0.0.170",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {
package/store/product.js CHANGED
@@ -10,6 +10,7 @@ import { filterBigSize } from '@lancom/shared/assets/js/utils/product';
10
10
  import { sortByName } from '../assets/js/utils/filters';
11
11
 
12
12
  export const state = () => ({
13
+ calculatingPrice: false,
13
14
  priceIncludeGST: false,
14
15
  product: null,
15
16
  preSetPrint: null,
@@ -43,6 +44,7 @@ export const state = () => ({
43
44
  });
44
45
 
45
46
  export const getters = {
47
+ calculatingPrice: ({ calculatingPrice }) => calculatingPrice,
46
48
  product: ({ product }) => product,
47
49
  preSetPrint: ({ preSetPrint }) => preSetPrint,
48
50
  preSetPrintPriceRange: ({ preSetPrint, product }) => {
@@ -168,9 +170,11 @@ export const actions = {
168
170
  commit('setPrintTypes', response);
169
171
  },
170
172
  async calculateProductPrice({ state: { template, product, isPrintPricing }, commit, getters }, shop) {
173
+ commit('setCalculatingPrice', true);
171
174
  const entities = getProductsForCalculatePricing(product, getters.usedSimpleProducts, template.layers, isPrintPricing, true);
172
175
  const response = await api.calculateProductPrice({ entities }, shop._id);
173
176
  commit('setProductPricing', response);
177
+ commit('setCalculatingPrice', false);
174
178
  },
175
179
  async createLayer(
176
180
  {
@@ -405,6 +409,9 @@ export const mutations = {
405
409
  },
406
410
  setEditableSide(state, side) {
407
411
  state.editableSide = side;
412
+ },
413
+ setCalculatingPrice(state, calculatingPrice) {
414
+ state.calculatingPrice = calculatingPrice;
408
415
  }
409
416
  };
410
417