@lancom/shared 0.0.383 → 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 (54) hide show
  1. package/assets/js/api/index.js +3 -0
  2. package/components/checkout/cart/cart.mixin.js +5 -1
  3. package/components/checkout/cart/cart.vue +8 -20
  4. package/components/checkout/cart/cart_price_info/cart-price-info.vue +8 -53
  5. package/components/checkout/cart/cart_pricing/cart-pricing.scss +11 -3
  6. package/components/checkout/cart/cart_pricing/cart-pricing.vue +6 -2
  7. package/components/checkout/cart/cart_shipments_pricing/cart-shipments-pricing.scss +3 -0
  8. package/components/checkout/cart/cart_shipments_pricing/cart-shipments-pricing.vue +12 -2
  9. package/components/checkout/cart/cart_shipping/cart-shipping.scss +43 -0
  10. package/components/checkout/cart/cart_shipping/cart-shipping.vue +126 -0
  11. package/components/checkout/order/address-form/address-form.vue +5 -0
  12. package/components/checkout/order/order-billing-information/order-billing-information.vue +1 -0
  13. package/components/checkout/order/order-payment-information/order-payment-information.vue +9 -0
  14. package/components/common/payment/payment_card/applepay/applepay.scss +8 -0
  15. package/components/common/payment/payment_card/applepay/applepay.vue +16 -0
  16. package/components/common/payment/payment_card/payment-card.vue +7 -0
  17. package/components/common/postcode_select/postcode-select.scss +6 -0
  18. package/components/common/postcode_select/postcode-select.vue +16 -6
  19. package/components/common/pricing_discounts_table/pricing-discounts-table.vue +12 -2
  20. package/components/customer/customer_coupons/customer-coupons.scss +33 -0
  21. package/components/customer/customer_coupons/customer-coupons.vue +103 -0
  22. package/components/customer/customer_coupons/customer_coupon_apply/customer-coupon-apply.scss +1 -0
  23. package/components/customer/customer_coupons/customer_coupon_apply/customer-coupon-apply.vue +51 -0
  24. package/components/customer/customer_coupons/customer_coupon_prints/customer-coupon-prints.scss +1 -0
  25. package/components/customer/customer_coupons/customer_coupon_prints/customer-coupon-prints.vue +33 -0
  26. package/components/customer/customer_coupons/customer_coupon_prints/customer_coupon_print/customer-coupon-print.scss +19 -0
  27. package/components/customer/customer_coupons/customer_coupon_prints/customer_coupon_print/customer-coupon-print.vue +82 -0
  28. package/components/customer/customer_coupons/customer_coupon_products/customer-coupon-products.scss +1 -0
  29. package/components/customer/customer_coupons/customer_coupon_products/customer-coupon-products.vue +33 -0
  30. package/components/customer/customer_coupons/customer_coupon_products/customer_coupon_product/customer-coupon-product.scss +17 -0
  31. package/components/customer/customer_coupons/customer_coupon_products/customer_coupon_product/customer-coupon-product.vue +52 -0
  32. package/components/customer/customer_navigation_menu/customer-navigation-menu.vue +72 -0
  33. package/components/customer/customer_orders/customer-orders.scss +26 -12
  34. package/components/customer/customer_orders/customer-orders.vue +64 -33
  35. package/components/customer/customer_orders/customer_order_reorder/customer-order-reorder.scss +1 -0
  36. package/components/customer/customer_orders/customer_order_reorder/customer-order-reorder.vue +55 -0
  37. package/components/customer/customer_orders/customer_order_trackings/customer-order-trackings.scss +8 -0
  38. package/components/customer/customer_orders/customer_order_trackings/customer-order-trackings.vue +38 -0
  39. package/components/quotes/quote_view/quote-view.vue +1 -0
  40. package/components/quotes/quote_view/quote_option_view/quote-option-view.vue +4 -0
  41. package/components/quotes/quote_view/quote_product_color_simple_products/quote-product-color-simple-products.vue +9 -2
  42. package/components/quotes/quote_view/quote_product_color_simple_products/quote_product_color_simple_product/quote-product-color-simple-product.scss +54 -1
  43. package/components/quotes/quote_view/quote_product_color_simple_products/quote_product_color_simple_product/quote-product-color-simple-product.vue +83 -5
  44. package/components/quotes/quote_view/quote_view_product/quote-view-product.scss +7 -0
  45. package/components/quotes/quote_view/quote_view_product/quote-view-product.vue +33 -11
  46. package/feeds/google-shopping.js +10 -4
  47. package/package.json +1 -1
  48. package/pages/checkout/order.vue +13 -4
  49. package/pages/customer/coupons.vue +39 -0
  50. package/pages/customer/orders.vue +39 -0
  51. package/pages/customer/settings.vue +4 -2
  52. package/routes/index.js +6 -1
  53. package/store/cart.js +1 -1
  54. package/pages/customer/orders/index.vue +0 -29
@@ -38,6 +38,9 @@ const api = {
38
38
  fetchCustomerOrders(customer, shop) {
39
39
  return _get(`shop/${shop}/customer/${customer._id}/orders`);
40
40
  },
41
+ fetchCustomerCoupons(customer, shop) {
42
+ return _get(`shop/${shop}/customer/${customer._id}/coupons`);
43
+ },
41
44
  searchProducts(shop, text, save) {
42
45
  return _get(`shop/${shop}/products/search`, { text, save });
43
46
  },
@@ -28,11 +28,15 @@ export default {
28
28
  'quantities',
29
29
  'notValidProductsQuantities',
30
30
  'notValidStockQuantities',
31
- 'notValidPrintsQuantities'
31
+ 'notValidPrintsQuantities',
32
+ 'notValidProductsPickup'
32
33
  ]),
33
34
  isNotValidQuantity() {
34
35
  return this.isNotValidProductsQuantity || this.isNotValidStockQuantity || this.isNotValidPrintsQuantity || this.isNotValidPrintsBigSizeQuantity;
35
36
  },
37
+ isNotValidShipping() {
38
+ return (this.needToPickup && this.notValidProductsPickup.length > 0) || !this.suburb;
39
+ },
36
40
  isNotValidProductsQuantity() {
37
41
  return this.notValidProductsQuantities.length > 0;
38
42
  },
@@ -20,16 +20,13 @@
20
20
  :btn-block="true"
21
21
  @onclick="removeAllSimpleProducts" />
22
22
  <div class="Cart__total-container">
23
+ <cart-shipping
24
+ class="mb-10"
25
+ @suburb="handleSuburbChange" />
23
26
  <cart-price-info @loaded="loadedPricing($event)" />
24
27
  </div>
25
28
  <div class="Cart__postcode-container">
26
- <postcode-select
27
- :suburb="suburb"
28
- :labelless="true"
29
- :only-postcode="onlyPostcode"
30
- :placeholder="postcodeLabel"
31
- :label-text="postcodeInfoLabel"
32
- @select="handleSuburbChange" />
29
+
33
30
  </div>
34
31
  <div class="Cart__coupon-container">
35
32
  <coupon-select
@@ -42,7 +39,7 @@
42
39
  </div>
43
40
  <div class="mt-10">
44
41
  <btn
45
- :btn-disabled="isNotValidQuantity || cartPricingError || cartPricingCalculating"
42
+ :btn-disabled="isNotValidShipping || isNotValidQuantity || cartPricingError || cartPricingCalculating"
46
43
  :btn-block="true"
47
44
  :to="'/checkout/order'"
48
45
  btn-class="green"
@@ -73,13 +70,13 @@
73
70
  <script>
74
71
  import { mapGetters, mapMutations } from 'vuex';
75
72
  import gtm from '@lancom/shared/assets/js/utils/gtm';
76
- import PostcodeSelect from '@lancom/shared/components/common/postcode_select/postcode-select';
77
73
  import CouponSelect from '@lancom/shared/components/common/coupon_select/coupon-select';
78
74
  import CartQuantityErrors from '@lancom/shared/components/checkout/cart/cart_quantity_errors/cart-quantity-errors';
79
75
  import CartEntity from '@lancom/shared/components/checkout/cart/cart_entity/cart-entity';
80
76
  import { price } from '@lancom/shared/assets/js/utils/filters';
81
77
  import CartMixin from '@lancom/shared/components/checkout/cart/cart.mixin';
82
78
  import CartPriceInfo from '@lancom/shared/components/checkout/cart/cart_price_info/cart-price-info';
79
+ import CartShipping from '@lancom/shared/components/checkout/cart/cart_shipping/cart-shipping';
83
80
 
84
81
  export default {
85
82
  name: 'CheckoutCart',
@@ -87,23 +84,14 @@ export default {
87
84
  CartEntity,
88
85
  CartPriceInfo,
89
86
  CartQuantityErrors,
90
- PostcodeSelect,
91
- CouponSelect
87
+ CouponSelect,
88
+ CartShipping
92
89
  },
93
90
  filters: { price },
94
91
  mixins: [CartMixin],
95
92
  computed: {
96
93
  ...mapGetters(['MESSAGES', 'SETTINGS', 'currency', 'country']),
97
94
  ...mapGetters('cart', ['isEmpty','cartPricingError', 'cartPricing', 'cartPricingCalculating', 'entities']),
98
- onlyPostcode() {
99
- return !!this.SETTINGS.CART_ONLY_POSTCODE && this.country?.isoCode === 'UK';
100
- },
101
- postcodeLabel() {
102
- return this.onlyPostcode ? 'Postcode' : (this.MESSAGES.CART_POSTCODE || 'Postcode');
103
- },
104
- postcodeInfoLabel() {
105
- return this.MESSAGES.CART_POSTCODE_INFO || 'Enter postcode to calculate shipping';
106
- },
107
95
  couponLabel() {
108
96
  return (this.MESSAGES.CART_COUPON || 'Coupon code').trim();
109
97
  },
@@ -3,37 +3,14 @@
3
3
  <slot name="cart-pricing" v-bind="{ cartPricing, itemsLabel }">
4
4
  <cart-pricing
5
5
  v-if="cartPricing && cartPricing.amount"
6
- :pricing="cartPricing" />
6
+ :pricing="cartPricing"
7
+ :disabled-rates="disabledRates" />
7
8
  </slot>
8
9
  <div
9
10
  v-if="cartPricingError"
10
11
  class="CartPriceInfo__error">
11
12
  {{ cartPricingError }}
12
13
  </div>
13
- <div>
14
- <div class="mt-20 mb-20">
15
- <checkbox
16
- v-model="wantsToPickup"
17
- :dark="true"
18
- @change="calculatePrice()">
19
- <div class="ml-10 CartPriceInfo__pickup-label">
20
- {{ contacts.warehousePickupInfo ? `Pickup from ${contacts.warehousePickupInfo}` : 'Wants to pickup' }}
21
- </div>
22
- </checkbox>
23
- </div>
24
- <div
25
- v-if="hasNotValidProductsPickup"
26
- class="CartPriceInfo__pickup-errors">
27
- <div>Not all items in cart are available for pickup. Some items are available for delivery only</div>
28
- <ul>
29
- <li
30
- v-for="product in notValidProductsPickup"
31
- :key="product._id">
32
- <b>{{ product.name }}. {{ product.size ? product.size.shortName : '' }}</b> order quantity: {{ product.amount }}. Available {{ product.warehouseQuantityStock }}
33
- </li>
34
- </ul>
35
- </div>
36
- </div>
37
14
  </div>
38
15
  </template>
39
16
 
@@ -43,7 +20,7 @@ import debounce from 'lodash.debounce';
43
20
  import CartPricing from '@lancom/shared/components/checkout/cart/cart_pricing/cart-pricing';
44
21
  import { price } from '@lancom/shared/assets/js/utils/filters';
45
22
 
46
- const { mapActions, mapMutations } = createNamespacedHelpers('cart');
23
+ const { mapActions } = createNamespacedHelpers('cart');
47
24
 
48
25
  export default {
49
26
  name: 'LancomCartPriceInfo',
@@ -55,11 +32,14 @@ export default {
55
32
  itemsLabel: {
56
33
  type: String,
57
34
  default: 'Tee'
35
+ },
36
+ disabledRates: {
37
+ type: Boolean,
38
+ default: false
58
39
  }
59
40
  },
60
41
  data() {
61
42
  return {
62
- visiblePickupError: null,
63
43
  price: null,
64
44
  calculatePriceWithDebounce: debounce(this.calculatePrice, 500)
65
45
  };
@@ -67,31 +47,10 @@ export default {
67
47
  computed: {
68
48
  ...mapGetters(['shop', 'country', 'currency', 'contacts']),
69
49
  ...mapGetters('cart', [
70
- 'notValidProductsPickup',
71
- 'needToPickup',
72
- 'needToPickupWithoutErrors',
73
50
  'entities',
74
51
  'cartPricing',
75
52
  'cartPricingError'
76
- ]),
77
- hasNotValidProductsPickup() {
78
- return this.notValidProductsPickup.length > 0;
79
- },
80
- wantsToPickup: {
81
- get() {
82
- return this.needToPickup;
83
- },
84
- set(needToPickup) {
85
- if (needToPickup && this.hasNotValidProductsPickup) {
86
- this.visiblePickupError = true;
87
- } else {
88
- // if (needToPickup) {
89
- // this.setSuburb(null);
90
- // }
91
- this.setNeedToPickup(needToPickup);
92
- }
93
- }
94
- }
53
+ ])
95
54
  },
96
55
  watch: {
97
56
  entities() {
@@ -103,10 +62,6 @@ export default {
103
62
  this.$emit('loaded', this.cartPricing);
104
63
  },
105
64
  methods: {
106
- ...mapMutations([
107
- 'setSuburb',
108
- 'setNeedToPickup'
109
- ]),
110
65
  ...mapActions([
111
66
  'calculateCartPrice'
112
67
  ]),
@@ -3,14 +3,14 @@
3
3
  .CartPricing {
4
4
  &__wrapper {
5
5
  border: 2px solid $gray;
6
- padding: 28px 20px;
6
+ padding: 0px 20px 28px 20px;
7
7
  @media (max-width: $bp-small-max) {
8
- padding: 15px 10px;
8
+ padding: 0px 10px 15px 10px;
9
9
  }
10
10
 
11
11
  @media (max-width: $bp-small-max) {
12
12
  .lc_h3 {
13
- font-size: 19px;
13
+ font-size: 16px;
14
14
  }
15
15
  .lc_body-large {
16
16
  font-size: 14px;
@@ -20,6 +20,14 @@
20
20
  }
21
21
  }
22
22
  }
23
+ &__header {
24
+ padding: 10px;
25
+ background-color: $gray;
26
+ margin: 0 -20px;
27
+ @media (max-width: $bp-small-max) {
28
+ margin: 0 -10px;
29
+ }
30
+ }
23
31
  &__info {
24
32
  padding: 11px;
25
33
  display: flex;
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="CartPricing__wrapper">
3
- <div class="lc_h3 lc_uppercase lc_black">
3
+ <div class="lc_h4 lc_uppercase lc_black CartPricing__header">
4
4
  Order summary
5
5
  </div>
6
6
  <div class="CartPricing__info">
@@ -27,7 +27,7 @@
27
27
  {{ pricing.products.totalPriceWithoutTax | price(currency) }}
28
28
  </div>
29
29
  </div>
30
- <cart-shipments-pricing />
30
+ <cart-shipments-pricing :disabled-rates="disabledRates" />
31
31
  <div class="CartPricing__info">
32
32
  <div class="lc_body-large lc_gray-main">
33
33
  Total Delivery:
@@ -90,6 +90,10 @@ export default {
90
90
  type: Object,
91
91
  required: true
92
92
  },
93
+ disabledRates: {
94
+ type: Boolean,
95
+ default: false
96
+ },
93
97
  itemsLabel: {
94
98
  type: String,
95
99
  default: 'Tee'
@@ -21,6 +21,9 @@
21
21
  justify-content: space-between;
22
22
  font-weight: bold;
23
23
  font-size: 16px;
24
+ &--disabled {
25
+ pointer-events: none !important;
26
+ }
24
27
  }
25
28
  &-brands {
26
29
  display: flex;
@@ -15,7 +15,11 @@
15
15
  class="CartShipmentsPricing__supplier">
16
16
  <div class="CartShipmentsPricing__supplier-info">
17
17
  <div class="CartShipmentsPricing__supplier-brands">
18
- <div @click="removeSupplierConfirm(supplier)">
18
+ <div
19
+ :class="{
20
+ 'CartShipmentsPricing__supplier-info--disabled': disabledRates
21
+ }"
22
+ @click="removeSupplierConfirm(supplier)">
19
23
  <i class="icon-delete"></i>
20
24
  </div>
21
25
  <div>
@@ -31,7 +35,7 @@
31
35
  :key="`rate-${i}`"
32
36
  class="CartShipmentsPricing__rate"
33
37
  :class="{
34
- 'CartShipmentsPricing__rate--disabled': rate.disabled
38
+ 'CartShipmentsPricing__rate--disabled': disabledRates || rate.disabled
35
39
  }"
36
40
  @click="!rate.selected && selectRate({ supplier, rate, shop, country, currency })">
37
41
  <div class="CartShipmentsPricing__rate-info">
@@ -76,6 +80,12 @@ export default {
76
80
  }
77
81
  },
78
82
  mixins: [confirm],
83
+ props: {
84
+ disabledRates: {
85
+ type: Boolean,
86
+ default: false
87
+ }
88
+ },
79
89
  computed: {
80
90
  ...mapGetters(['shop', 'country', 'currency']),
81
91
  ...mapGetters('cart', [
@@ -0,0 +1,43 @@
1
+ @import '@/assets/scss/variables';
2
+
3
+ .CartShipping {
4
+ &__wrapper {
5
+ border: 2px solid $gray;
6
+ padding: 0px 20px 20px 20px;
7
+ @media (max-width: $bp-small-max) {
8
+ padding: 0px 10px 15px 10px;
9
+ }
10
+ @media (max-width: $bp-small-max) {
11
+ .lc_h3 {
12
+ font-size: 16px;
13
+ }
14
+ .lc_body-large {
15
+ font-size: 14px;
16
+ }
17
+ .lc_title-large {
18
+ font-size: 16px;
19
+ }
20
+ }
21
+ ::v-deep {
22
+ .form-label {
23
+ font-size: 15px !important;
24
+ }
25
+ }
26
+ &--warning {
27
+ border-color: $error;
28
+ }
29
+ }
30
+ &__header {
31
+ padding: 10px;
32
+ background-color: $gray;
33
+ margin: 0 -20px;
34
+ @media (max-width: $bp-small-max) {
35
+ margin: 0 -10px;
36
+ }
37
+ }
38
+ &__pickup-errors {
39
+ color: $error;
40
+ font-size: 13px;
41
+ line-height: 17px;
42
+ }
43
+ }
@@ -0,0 +1,126 @@
1
+ <template>
2
+ <div
3
+ class="CartShipping__wrapper"
4
+ :class="{
5
+ 'CartShipping__wrapper--warning': (needToPickup && hasNotValidProductsPickup) || !suburb
6
+ }">
7
+ <div class="lc_h4 lc_uppercase lc_black CartShipping__header">
8
+ Order Shipping
9
+ </div>
10
+ <div class="mt-10">
11
+ <postcode-select
12
+ :suburb="suburb"
13
+ :labelless="true"
14
+ :only-postcode="onlyPostcode"
15
+ :placeholder="postcodeLabel"
16
+ :label-text="postcodeInfoLabel"
17
+ :allow-empty="true"
18
+ @select="$emit('suburb', $event)" />
19
+ <div class="mt-10 mb-10">
20
+ <checkbox
21
+ v-model="wantsToPickup"
22
+ :dark="true"
23
+ @change="calculatePrice()">
24
+ <div class="ml-10 CartPriceInfo__pickup-label">
25
+ {{ contacts.warehousePickupInfo ? `Pickup from ${contacts.warehousePickupInfo}` : 'Wants to pickup' }}
26
+ </div>
27
+ </checkbox>
28
+ </div>
29
+ <div
30
+ v-if="visiblePickupError && hasNotValidProductsPickup"
31
+ class="CartShipping__pickup-errors">
32
+ <div>Not all items in cart are available for pickup. Some items are available for delivery only</div>
33
+ <ul>
34
+ <li
35
+ v-for="product in notValidProductsPickup"
36
+ :key="product._id">
37
+ <b>{{ product.name }}. {{ product.size ? product.size.shortName : '' }}</b> order quantity: {{ product.amount }}. Available {{ product.warehouseQuantityStock }}
38
+ </li>
39
+ </ul>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ </template>
44
+
45
+ <script>
46
+ import { mapGetters, createNamespacedHelpers } from 'vuex';
47
+ import PostcodeSelect from '@lancom/shared/components/common/postcode_select/postcode-select';
48
+ import { price } from '@lancom/shared/assets/js/utils/filters';
49
+
50
+ const { mapActions, mapMutations } = createNamespacedHelpers('cart');
51
+
52
+ export default {
53
+ name: 'LancomCartShipping',
54
+ filters: { price },
55
+ components: {
56
+ PostcodeSelect
57
+ },
58
+ props: {
59
+ itemsLabel: {
60
+ type: String,
61
+ default: 'Tee'
62
+ }
63
+ },
64
+ data() {
65
+ return {
66
+ visiblePickupError: null,
67
+ price: null
68
+ };
69
+ },
70
+ computed: {
71
+ ...mapGetters(['shop', 'SETTINGS', 'MESSAGES', 'country', 'currency', 'contacts']),
72
+ ...mapGetters('cart', [
73
+ 'suburb',
74
+ 'notValidProductsPickup',
75
+ 'needToPickup',
76
+ 'needToPickupWithoutErrors',
77
+ 'cartPricing',
78
+ 'cartPricingError'
79
+ ]),
80
+ postcodeInfoLabel() {
81
+ return this.MESSAGES.CART_POSTCODE_INFO || 'Enter postcode to calculate shipping';
82
+ },
83
+ onlyPostcode() {
84
+ return !!this.SETTINGS.CART_ONLY_POSTCODE && this.country?.isoCode === 'UK';
85
+ },
86
+ postcodeLabel() {
87
+ return this.onlyPostcode ? 'Postcode' : (this.MESSAGES.CART_POSTCODE || 'Postcode');
88
+ },
89
+ hasNotValidProductsPickup() {
90
+ return this.notValidProductsPickup.length > 0;
91
+ },
92
+ wantsToPickup: {
93
+ get() {
94
+ return this.needToPickup;
95
+ },
96
+ set(needToPickup) {
97
+ if (needToPickup && this.hasNotValidProductsPickup) {
98
+ this.visiblePickupError = true;
99
+ } else {
100
+ // if (needToPickup) {
101
+ // this.setSuburb(null);
102
+ // }
103
+ this.setNeedToPickup(needToPickup);
104
+ this.visiblePickupError = false;
105
+ }
106
+ }
107
+ }
108
+ },
109
+ methods: {
110
+ ...mapMutations([
111
+ 'setSuburb',
112
+ 'setNeedToPickup'
113
+ ]),
114
+ ...mapActions([
115
+ 'calculateCartPrice'
116
+ ]),
117
+ async calculatePrice() {
118
+ await this.calculateCartPrice({ shop: this.shop, country: this.country, currency: this.currency });
119
+ }
120
+ }
121
+ };
122
+ </script>
123
+
124
+ <style lang="scss" scoped>
125
+ @import 'cart-shipping.scss';
126
+ </style>
@@ -160,6 +160,7 @@
160
160
  <postcode-select
161
161
  class="form-col col-half"
162
162
  :suburb="address.suburb"
163
+ :disabled="disabledPostcode"
163
164
  :labelless="true"
164
165
  :required="true"
165
166
  :name-prefix="namePrefix"
@@ -244,6 +245,10 @@ export default {
244
245
  type: Boolean,
245
246
  default: false
246
247
  },
248
+ disabledPostcode: {
249
+ type: Boolean,
250
+ default: false
251
+ },
247
252
  namePrefix: {
248
253
  type: String,
249
254
  default: ''
@@ -11,6 +11,7 @@
11
11
  <address-form
12
12
  :address="order.shippingAddress"
13
13
  :only-contact-info="needToPickupWithoutErrors"
14
+ :disabled-postcode="true"
14
15
  :without-additional-info="true" />
15
16
  <div
16
17
  v-if="!needToPickupWithoutErrors"
@@ -34,6 +34,14 @@
34
34
  Google Pay
35
35
  </span>
36
36
  </label>
37
+ <label
38
+ class="form-label OrderPaymentInformation__checkbox"
39
+ @click="updatePaymentType('apple')">
40
+ <checked-icon :checked="paymentMethod === 'apple'" />
41
+ <span class="lc_regular12 lc__grey1 OrderPaymentInformation__checkbox-label">
42
+ Apple Pay
43
+ </span>
44
+ </label>
37
45
  </div>
38
46
  <div
39
47
  v-if="paymentMethod === 'deposit'"
@@ -71,6 +79,7 @@
71
79
  ref="paymentCart"
72
80
  :key="paymentMethod"
73
81
  :google="paymentMethod === 'google'"
82
+ :apple="paymentMethod === 'apple'"
74
83
  :amount="cartPricing.totalPrice"
75
84
  :order="orderData"
76
85
  @inited="initedCard">
@@ -0,0 +1,8 @@
1
+ @import "@/assets/scss/ui_kit";
2
+ @import "@/assets/scss/variables";
3
+
4
+ .Payment {
5
+ &__wrapper {
6
+ font-weight: bold;
7
+ }
8
+ }
@@ -0,0 +1,16 @@
1
+ <template>
2
+ <div class="Payment__wrapper">
3
+ Temporarily Not Available
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ name: 'Applepay'
10
+ };
11
+ </script>
12
+
13
+
14
+ <style lang="scss" scoped>
15
+ @import 'applepay.scss';
16
+ </style>
@@ -17,6 +17,7 @@ import { mapGetters } from 'vuex';
17
17
  export default {
18
18
  name: 'PaymentCard',
19
19
  components: {
20
+ Applepay: () => import('./applepay/applepay'),
20
21
  Googlepay: () => import('./googlepay/googlepay'),
21
22
  Pinpayment: () => import('./pinpayment/pinpayment'),
22
23
  Stripe: () => import('./stripe_card/stripe-card'),
@@ -32,6 +33,9 @@ export default {
32
33
  },
33
34
  google: {
34
35
  type: Boolean
36
+ },
37
+ apple: {
38
+ type: Boolean
35
39
  }
36
40
  },
37
41
  computed: {
@@ -40,6 +44,9 @@ export default {
40
44
  if (this.google) {
41
45
  return 'googlepay';
42
46
  }
47
+ if (this.apple) {
48
+ return 'applepay';
49
+ }
43
50
  return this.payment?.type || 'stripe-payment';
44
51
  }
45
52
  },
@@ -5,4 +5,10 @@
5
5
  font-weight: bold;
6
6
  background-color: $green_lighter;
7
7
  }
8
+ &__clear {
9
+ position: absolute;
10
+ cursor: pointer;
11
+ top: 25px;
12
+ left: -5px;
13
+ }
8
14
  }
@@ -75,6 +75,12 @@
75
75
  {{ errors[0] }}
76
76
  </span>
77
77
  </validation-provider>
78
+ <div
79
+ v-if="allowEmpty && (value || selected)"
80
+ class="PostcodeSelect__clear"
81
+ @click="model = null">
82
+ <i class="icon-close-r"></i>
83
+ </div>
78
84
  </div>
79
85
  </template>
80
86
 
@@ -127,6 +133,10 @@ export default {
127
133
  suburb: {
128
134
  type: Object
129
135
  },
136
+ allowEmpty: {
137
+ type: Boolean,
138
+ default: false
139
+ },
130
140
  namePrefix: {
131
141
  type: String,
132
142
  default: ''
@@ -199,21 +209,21 @@ export default {
199
209
  };
200
210
  },
201
211
  async updatePostcode(option) {
202
- this.selected = option;
203
- if (!option.value) {
212
+ this.selected = (this.allowEmpty && this.selected?._id === option?._id) ? null : option;
213
+ if (this.selected && !this.selected?.value) {
204
214
  try {
205
215
  this.isLoading = true;
206
- const suburb = await api.fetchAddressInfo(option._id, this.shop?._id);
216
+ const suburb = await api.fetchAddressInfo(this.selected._id, this.shop?._id);
207
217
  this.$emit('input', suburb.postcode);
208
218
  this.$emit('select', suburb);
209
- option.label = this.createOptionFromSuburb(suburb).label;
219
+ this.selected.label = this.createOptionFromSuburb(suburb).label;
210
220
  } catch (e) {
211
221
  } finally {
212
222
  this.isLoading = false;
213
223
  }
214
224
  } else {
215
- this.$emit('input', option.value);
216
- this.$emit('select', this.suburbs.find(({ _id }) => _id === option._id));
225
+ this.$emit('input', this.selected?.value);
226
+ this.$emit('select', this.suburbs.find(({ _id }) => _id === this.selected?._id));
217
227
  }
218
228
  }
219
229
  }
@@ -17,10 +17,20 @@
17
17
  }">
18
18
  <td>{{ (range.max >= 9999 || !range.max) ? `${range.min}+` : `${range.min}-${range.max}` }}</td>
19
19
  <td v-if="withGst">
20
- {{ range.price | priceWithTax(pricingSettings, currency) }}
20
+ <span v-if="range.percent">
21
+ {{ range.percent }}%
22
+ </span>
23
+ <span v-else>
24
+ {{ range.price | priceWithTax(pricingSettings, currency) }}
25
+ </span>
21
26
  </td>
22
27
  <td v-else>
23
- {{ range.price | price(currency) }}
28
+ <span v-if="range.percent">
29
+ {{ range.percent }}%
30
+ </span>
31
+ <span v-else>
32
+ {{ range.price | price(currency) }}
33
+ </span>
24
34
  </td>
25
35
  </tr>
26
36
  </tbody>