@lancom/shared 0.0.382 → 0.0.384

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.
Files changed (55) hide show
  1. package/assets/js/api/index.js +3 -0
  2. package/components/checkout/cart/cart.mixin.js +8 -13
  3. package/components/checkout/cart/cart.vue +9 -44
  4. package/components/checkout/cart/cart_price_info/cart-price-info.scss +11 -0
  5. package/components/checkout/cart/cart_price_info/cart-price-info.vue +7 -2
  6. package/components/checkout/cart/cart_pricing/cart-pricing.scss +11 -3
  7. package/components/checkout/cart/cart_pricing/cart-pricing.vue +6 -2
  8. package/components/checkout/cart/cart_shipments_pricing/cart-shipments-pricing.scss +3 -0
  9. package/components/checkout/cart/cart_shipments_pricing/cart-shipments-pricing.vue +13 -3
  10. package/components/checkout/cart/cart_shipping/cart-shipping.scss +43 -0
  11. package/components/checkout/cart/cart_shipping/cart-shipping.vue +126 -0
  12. package/components/checkout/order/address-form/address-form.vue +5 -0
  13. package/components/checkout/order/order-billing-information/order-billing-information.vue +6 -5
  14. package/components/checkout/order/order-payment-information/order-payment-information.vue +9 -0
  15. package/components/common/payment/payment_card/applepay/applepay.scss +8 -0
  16. package/components/common/payment/payment_card/applepay/applepay.vue +16 -0
  17. package/components/common/payment/payment_card/payment-card.vue +7 -0
  18. package/components/common/postcode_select/postcode-select.scss +6 -0
  19. package/components/common/postcode_select/postcode-select.vue +16 -6
  20. package/components/common/pricing_discounts_table/pricing-discounts-table.vue +12 -2
  21. package/components/customer/customer_coupons/customer-coupons.scss +33 -0
  22. package/components/customer/customer_coupons/customer-coupons.vue +103 -0
  23. package/components/customer/customer_coupons/customer_coupon_apply/customer-coupon-apply.scss +1 -0
  24. package/components/customer/customer_coupons/customer_coupon_apply/customer-coupon-apply.vue +51 -0
  25. package/components/customer/customer_coupons/customer_coupon_prints/customer-coupon-prints.scss +1 -0
  26. package/components/customer/customer_coupons/customer_coupon_prints/customer-coupon-prints.vue +33 -0
  27. package/components/customer/customer_coupons/customer_coupon_prints/customer_coupon_print/customer-coupon-print.scss +19 -0
  28. package/components/customer/customer_coupons/customer_coupon_prints/customer_coupon_print/customer-coupon-print.vue +82 -0
  29. package/components/customer/customer_coupons/customer_coupon_products/customer-coupon-products.scss +1 -0
  30. package/components/customer/customer_coupons/customer_coupon_products/customer-coupon-products.vue +33 -0
  31. package/components/customer/customer_coupons/customer_coupon_products/customer_coupon_product/customer-coupon-product.scss +17 -0
  32. package/components/customer/customer_coupons/customer_coupon_products/customer_coupon_product/customer-coupon-product.vue +52 -0
  33. package/components/customer/customer_navigation_menu/customer-navigation-menu.vue +72 -0
  34. package/components/customer/customer_orders/customer-orders.scss +26 -12
  35. package/components/customer/customer_orders/customer-orders.vue +64 -33
  36. package/components/customer/customer_orders/customer_order_reorder/customer-order-reorder.scss +1 -0
  37. package/components/customer/customer_orders/customer_order_reorder/customer-order-reorder.vue +55 -0
  38. package/components/customer/customer_orders/customer_order_trackings/customer-order-trackings.scss +8 -0
  39. package/components/customer/customer_orders/customer_order_trackings/customer-order-trackings.vue +38 -0
  40. package/components/quotes/quote_view/quote-view.vue +1 -0
  41. package/components/quotes/quote_view/quote_option_view/quote-option-view.vue +4 -0
  42. package/components/quotes/quote_view/quote_product_color_simple_products/quote-product-color-simple-products.vue +9 -2
  43. package/components/quotes/quote_view/quote_product_color_simple_products/quote_product_color_simple_product/quote-product-color-simple-product.scss +54 -1
  44. package/components/quotes/quote_view/quote_product_color_simple_products/quote_product_color_simple_product/quote-product-color-simple-product.vue +83 -5
  45. package/components/quotes/quote_view/quote_view_product/quote-view-product.scss +7 -0
  46. package/components/quotes/quote_view/quote_view_product/quote-view-product.vue +33 -11
  47. package/feeds/google-shopping.js +10 -4
  48. package/package.json +1 -1
  49. package/pages/checkout/order.vue +13 -4
  50. package/pages/customer/coupons.vue +39 -0
  51. package/pages/customer/orders.vue +39 -0
  52. package/pages/customer/settings.vue +4 -2
  53. package/routes/index.js +6 -1
  54. package/store/cart.js +4 -3
  55. package/pages/customer/orders/index.vue +0 -29
@@ -0,0 +1,39 @@
1
+ <template>
2
+ <div
3
+ :data-aos="aosFadeRight"
4
+ class="CustomerOrdersPage__wrapper">
5
+ <customer-navigation-menu active-menu-item="orders" />
6
+ <customer-orders :customer="user" />
7
+ </div>
8
+ </template>
9
+
10
+ <script>
11
+ import { mapGetters } from 'vuex';
12
+ import metaInfo from '@lancom/shared/mixins/meta-info';
13
+
14
+ export default {
15
+ name: 'CustomerOrdersPage',
16
+ components: {
17
+ CustomerOrders: () => import('@lancom/shared/components/customer/customer_orders/customer-orders'),
18
+ CustomerNavigationMenu: () => import('@lancom/shared/components/customer/customer_navigation_menu/customer-navigation-menu')
19
+ },
20
+ mixins: [metaInfo],
21
+ computed: {
22
+ ...mapGetters('auth', ['user'])
23
+ }
24
+ };
25
+ </script>
26
+
27
+ <style lang="scss" scoped>
28
+ @import "@/assets/scss/variables";
29
+
30
+ .CustomerOrdersPage {
31
+ &__wrapper {
32
+ margin: 50px auto;
33
+ width: 1100px;
34
+ @media (max-width: $bp-extra-small-max) {
35
+ width: auto;
36
+ }
37
+ }
38
+ }
39
+ </style>
@@ -2,6 +2,7 @@
2
2
  <div
3
3
  :data-aos="aosFadeRight"
4
4
  class="CustomerSettingsPage__wrapper">
5
+ <customer-navigation-menu active-menu-item="settings" />
5
6
  <customer-settings />
6
7
  </div>
7
8
  </template>
@@ -12,6 +13,7 @@ import metaInfo from '@lancom/shared/mixins/meta-info';
12
13
  export default {
13
14
  name: 'CustomerCreatePage',
14
15
  components: {
16
+ CustomerNavigationMenu: () => import('@lancom/shared/components/customer/customer_navigation_menu/customer-navigation-menu'),
15
17
  CustomerSettings: () => import('@lancom/shared/components/pages/customer/settings/settings')
16
18
  },
17
19
  mixins: [metaInfo]
@@ -23,8 +25,8 @@ export default {
23
25
 
24
26
  .CustomerSettingsPage {
25
27
  &__wrapper {
26
- margin: 100px auto;
27
- width: 500px;
28
+ margin: 50px auto;
29
+ width: 1100px;
28
30
  @media (max-width: $bp-extra-small-max) {
29
31
  width: auto;
30
32
  }
package/routes/index.js CHANGED
@@ -112,8 +112,13 @@ module.exports = function(routes, resolve) {
112
112
  }, {
113
113
  name: 'customer-orders',
114
114
  path: '/customer/orders',
115
- component: resolve('@lancom/shared/pages/customer/orders/index.vue'),
115
+ component: resolve('@lancom/shared/pages/customer/orders.vue'),
116
116
  chunkName: 'pages/customer/orders'
117
+ }, {
118
+ name: 'customer-coupons',
119
+ path: '/customer/coupons',
120
+ component: resolve('@lancom/shared/pages/customer/coupons.vue'),
121
+ chunkName: 'pages/customer/coupons'
117
122
  }, {
118
123
  name: 'customer-recovery',
119
124
  path: '/customer/recovery',
package/store/cart.js CHANGED
@@ -4,7 +4,7 @@ import gtm from '@lancom/shared/assets/js/utils/gtm';
4
4
  import { getPrintTypeSizePricing } from '@lancom/shared/assets/js/utils/prints';
5
5
  import { filterBigSize } from '@lancom/shared/assets/js/utils/product';
6
6
 
7
- const SUPPLIERS_WITH_RATES_KEY = 'suppliers-with-wates';
7
+ const SUPPLIERS_WITH_RATES_KEY = 'suppliers-with-rates';
8
8
 
9
9
  export const state = () => ({
10
10
  id: null,
@@ -76,6 +76,7 @@ export const getters = {
76
76
  entities: ({ entities }) => entities,
77
77
  coupon: ({ coupon }) => coupon,
78
78
  needToPickup: ({ needToPickup }) => needToPickup,
79
+ needToPickupWithoutErrors: (state, { notValidProductsPickup }) => state.needToPickup && notValidProductsPickup?.length === 0,
79
80
  cartPricingCalculating: ({ cartPricingCalculating }) => cartPricingCalculating,
80
81
  simpleProducts: ({ entities }) => entities.reduce((simpleProducts, entity) => [...simpleProducts, ...(entity.simpleProducts || [])], []),
81
82
  notEmptySimpleProducts: (state, { simpleProducts }) => simpleProducts.filter(e => e.amount > 0),
@@ -189,7 +190,7 @@ export const actions = {
189
190
  await api.saveCart(payload, shop._id);
190
191
  commit('setEntities', entities);
191
192
  },
192
- async calculateCartPrice({ state: { suburb, entities, coupon, cartPricing, needToPickup }, commit }, { shop, country, currency }) {
193
+ async calculateCartPrice({ state: { suburb, entities, coupon, cartPricing }, getters: { needToPickupWithoutErrors }, commit }, { shop, country, currency }) {
193
194
  let savedSuppliersWithRates = null;
194
195
  try {
195
196
  savedSuppliersWithRates = JSON.parse(localStorage.getItem(SUPPLIERS_WITH_RATES_KEY));
@@ -199,7 +200,7 @@ export const actions = {
199
200
  console.log('calculateCartPrice:payload: ', payload)
200
201
  try {
201
202
  commit('setCartPricingCalculating', true);
202
- const response = await api.calculateProductPrice({ ...payload, needToPickup }, shop._id);
203
+ const response = await api.calculateProductPrice({ ...payload, needToPickup: needToPickupWithoutErrors }, shop._id);
203
204
  commit('setCartPricing', response);
204
205
  commit('setCartPricingError', null);
205
206
  } catch (e) {
@@ -1,29 +0,0 @@
1
- <template>
2
- <div class="CustomerCreate__wrapper">
3
- <div class="lc_h2">Customer Orders</div>
4
- <customer-orders class="mt-10" :customer="user" />
5
- </div>
6
- </template>
7
-
8
- <script>
9
- import { mapGetters } from 'vuex';
10
- import CustomerOrders from '@lancom/shared/components/customer/customer_orders/customer-orders';
11
-
12
- export default {
13
- name: 'CustomerOrdersPage',
14
- components: {
15
- CustomerOrders
16
- },
17
- computed: {
18
- ...mapGetters('auth', ['user'])
19
- }
20
- };
21
- </script>
22
-
23
- <style lang="scss" scoped>
24
- .CustomerCreate {
25
- &__wrapper {
26
- padding-top: 30px;
27
- }
28
- }
29
- </style>