wickes-css2 2.103.0-develop.13 → 2.103.0-develop.15

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 (32) hide show
  1. package/build/css/category-main.css +1 -1
  2. package/build/css/homepage-main.css +1 -1
  3. package/build/css/kitchen-plp-main.css +1 -1
  4. package/build/css/main.css +1 -1
  5. package/build/css/my-account-main-v2.css +1 -1
  6. package/build/css/my-account-main.css +1 -1
  7. package/build/css/pages/tradePro-rewards.css +1 -1
  8. package/build/css/pdp-main-before-combine.css +1 -1
  9. package/build/css/pdp-main-non-critical.css +1 -1
  10. package/build/css/pdp-main.css +1 -1
  11. package/build/css/plp-main.css +1 -1
  12. package/build/css/store-locator-main.css +1 -1
  13. package/build/img/Barcode-simple.png +0 -0
  14. package/build/img/QR.png +0 -0
  15. package/build/js/mini-basket-slider.min.js +1 -1
  16. package/build/js/page/billie-business-type.js +6 -11
  17. package/build/js/page/checkout-payment-details.js +0 -42
  18. package/build/js/page/components/mini-basket-slider.js +11 -0
  19. package/package.json +2 -2
  20. package/src/components/address-billie.hbs +36 -38
  21. package/src/components/checkout-edit-billing-address.hbs +3 -1
  22. package/src/components/voucher.hbs +2 -2
  23. package/src/data/data_voucher_tradePro.json +44 -4
  24. package/src/img/Barcode-simple.png +0 -0
  25. package/src/img/QR.png +0 -0
  26. package/src/js/page/billie-business-type.js +6 -11
  27. package/src/js/page/checkout-payment-details.js +0 -42
  28. package/src/js/page/components/mini-basket-slider.js +11 -0
  29. package/src/page_tradePro_rewards_QR.html +65 -0
  30. package/src/scss/components/_custom-slider.scss +3 -0
  31. package/src/scss/pages/tradePro-rewards.scss +18 -1
  32. package/src/sitemap.html +4 -0
@@ -12,8 +12,40 @@
12
12
  "expiration": "Offer ends: 1st October 2025",
13
13
  "barcodeNumber": "00016221000711490",
14
14
  "buttonText": "Redeem now",
15
+ "buttonLink": "#",
16
+ "barcodeImgSrc": "./img/Barcode-simple.png",
17
+ "barcodeImgAlt": "Barcode image"
18
+ },
19
+ "online": {
20
+ "label": "Type: Online",
21
+ "title": "Exclusive £4.99 all you can eat breakfast",
22
+ "note": "Offer ends: 1st October 2025",
23
+ "code": "WKBREAKFAST1023",
24
+ "buttonText": "Redeem now",
15
25
  "buttonLink": "#"
16
26
  },
27
+ "description": {
28
+ "short": "Exclusive £4.99 all you can eat breakfast.",
29
+ "long": "As a TradePro member, enjoy an exclusive discount Monday to Friday on all you can eat breakfast at Toby Carvery. <b>Redeem now! Hurry, ends 1st October.</b>"
30
+ }
31
+ },
32
+ "qr": {
33
+ "title":"£4.99 unlimited breakfast. Ends October 1st",
34
+ "isOnline": false,
35
+ "isInstore": true,
36
+ "img": "./img/placeholders/img-placeholder-rewards.png",
37
+ "imgAlt": "Voucher image",
38
+ "instore": {
39
+ "label": "Type: Online & In-store ",
40
+ "title": "Exclusive £4.99 all you can eat breakfast.",
41
+ "expiration": "Offer ends: 1st October 2025",
42
+ "barcodeNumber": "00016221000711490",
43
+ "buttonText": "Redeem now",
44
+ "buttonLink": "#",
45
+ "isQR": true,
46
+ "barcodeImgSrc": "./img/QR.png",
47
+ "barcodeImgAlt": "QR image"
48
+ },
17
49
  "online": {
18
50
  "label": "Type: Online",
19
51
  "title": "Exclusive £4.99 all you can eat breakfast",
@@ -39,7 +71,9 @@
39
71
  "expiration": "Offer ends: 1st October 2025",
40
72
  "barcodeNumber": "00016221000711490",
41
73
  "buttonText": "Redeem now",
42
- "buttonLink": "#"
74
+ "buttonLink": "#",
75
+ "barcodeImgSrc": "./img/Barcode-simple.png",
76
+ "barcodeImgAlt": "Barcode image"
43
77
  },
44
78
  "online": {
45
79
  "label": "Type: Online",
@@ -66,7 +100,9 @@
66
100
  "expiration": "Offer ends: 1st October 2025",
67
101
  "barcodeNumber": "00016221000711490",
68
102
  "buttonText": "Redeem now",
69
- "buttonLink": "#"
103
+ "buttonLink": "#",
104
+ "barcodeImgSrc": "./img/Barcode-simple.png",
105
+ "barcodeImgAlt": "Barcode image"
70
106
  },
71
107
  "online": {
72
108
  "label": "Type: Online",
@@ -93,7 +129,9 @@
93
129
  "expiration": "Offer ends: 1st October 2025",
94
130
  "barcodeNumber": "00016221000711490",
95
131
  "buttonText": "Redeem now",
96
- "buttonLink": "#"
132
+ "buttonLink": "#",
133
+ "barcodeImgSrc": "./img/Barcode-simple.png",
134
+ "barcodeImgAlt": "Barcode image"
97
135
  },
98
136
  "online": {
99
137
  "label": "Type: Online",
@@ -120,7 +158,9 @@
120
158
  "expiration": "Offer ends: 1st October 2025",
121
159
  "barcodeNumber": "00016221000711490",
122
160
  "buttonText": "Redeem now",
123
- "buttonLink": "#"
161
+ "buttonLink": "#",
162
+ "barcodeImgSrc": "./img/Barcode-simple.png",
163
+ "barcodeImgAlt": "Barcode image"
124
164
  },
125
165
  "online": {
126
166
  "label": "Type: Online",
Binary file
package/src/img/QR.png ADDED
Binary file
@@ -3,32 +3,27 @@ var Wick = window.Wick || {};
3
3
  Wick.BusinessType = {
4
4
  el: {
5
5
  radios: 'input[name="businessType"]',
6
- panels: '.radio-expanded-content',
7
- hiddenClass: 'd-none',
6
+ panels: '.radio-expanded-content'
8
7
  },
9
8
 
10
9
  refreshPanels() {
11
10
  const $radios = $(this.el.radios);
12
11
  const $panels = $(this.el.panels);
13
- const $checked = $radios.filter(':checked');
12
+ const selectedValue = $radios.filter(':checked').val();
14
13
 
15
- $panels.addClass(this.el.hiddenClass);
16
- if (!$checked.length) {
17
- return;
18
- }
19
-
20
- const selectedValue = $checked.val();
21
- $(`#${selectedValue}-fields`).removeClass(this.el.hiddenClass);
14
+ $panels.hide();
15
+ $(`#${selectedValue}-fields`).show();
22
16
  },
23
17
 
24
18
  bindEvents() {
25
- $(document).on('change', this.el.radios, this.refreshPanels.bind(this));
19
+ $(this.el.radios).on('change', this.refreshPanels.bind(this));
26
20
  },
27
21
 
28
22
  init() {
29
23
  if (!$(this.el.radios).length) {
30
24
  return;
31
25
  }
26
+
32
27
  this.refreshPanels();
33
28
  this.bindEvents();
34
29
  }
@@ -14,10 +14,6 @@ Wick.CheckoutPaymentDetails = (function() {
14
14
  $placeOrder: $('.checkout-payment-details__place-order'),
15
15
  $billingAddress: $('.billing-address'),
16
16
  hiddenCardDetailsClass: 'checkout-payment-details__card-details_hidden',
17
- $billieBusiness: $('[data-billie-business]'),
18
- businessTypeName: '[name="businessType"]',
19
- $unregisteredFields: $('#unregistered-fields'),
20
- $registeredFields: $('#registered-fields'),
21
17
  hiddenClass: 'd-none',
22
18
  }
23
19
 
@@ -56,36 +52,7 @@ Wick.CheckoutPaymentDetails = (function() {
56
52
  })
57
53
  }
58
54
 
59
- function showBillieBusiness() {
60
- elements.$billieBusiness.removeClass(elements.hiddenClass);
61
- }
62
-
63
- function hideBillieBusiness() {
64
- elements.$billieBusiness.addClass(elements.hiddenClass);
65
-
66
- elements.$unregisteredFields
67
- .addClass(elements.hiddenClass)
68
- .removeAttr('style');
69
-
70
- elements.$registeredFields
71
- .addClass(elements.hiddenClass)
72
- .removeAttr('style');
73
-
74
- elements.$billieBusiness.find('input[type="radio"]').prop('checked', false);
75
- elements.$billieBusiness.find('input.tbx').val('');
76
- }
77
-
78
- function toggleBusinessTypeFields(type) {
79
- const isUnregistered = type === 'unregistered';
80
- const isRegistered = type === 'registered';
81
-
82
- elements.$unregisteredFields.toggleClass(elements.hiddenClass, !isUnregistered);
83
- elements.$registeredFields.toggleClass(elements.hiddenClass, !isRegistered);
84
- }
85
-
86
-
87
55
  function changeDetailsBlock(checkedMethod) {
88
- if (checkedMethod !== 'billie') hideBillieBusiness();
89
56
  switch(checkedMethod) {
90
57
  case 'paypal':
91
58
  hideCardDetails();
@@ -102,7 +69,6 @@ Wick.CheckoutPaymentDetails = (function() {
102
69
  buttonText: 'Pay with Billie'
103
70
  }
104
71
  changeLabelText(detailsLabel);
105
- showBillieBusiness();
106
72
  break;
107
73
  case 'clearpay':
108
74
  detailsLabel = {
@@ -169,16 +135,8 @@ Wick.CheckoutPaymentDetails = (function() {
169
135
  elements.$placeOrder.addClass(elements.hiddenClass);
170
136
  }
171
137
 
172
- function initBillieBusinessTypeToggle() {
173
- $(document).on('change', elements.businessTypeName, function () {
174
- toggleBusinessTypeFields($(this).val());
175
- });
176
- }
177
-
178
138
  function init() {
179
139
  const paymentMethods = getPaymentMethods();
180
- initBillieBusinessTypeToggle();
181
- hideBillieBusiness();
182
140
 
183
141
  elements.$wrapperPaymentInput.on('change', elements.paymentInputName, function() {
184
142
  const checkedMethod = $(this).val();
@@ -340,6 +340,17 @@ Wick.MiniBasketSliderFE = {
340
340
  },
341
341
  showNotification: function(data) {
342
342
  showNotification(data, Wick.MiniBasketSliderFE.el.notifications);
343
+
344
+ Wick.MiniBasketSliderFE.scrollToNotifications();
345
+ },
346
+ scrollToNotifications: function() {
347
+ const $notifications = $(Wick.MiniBasketSliderFE.el.notifications);
348
+ if (!$notifications.children().length) return;
349
+
350
+ const $scrollContainer = $(Wick.MiniBasketSliderFE.el.customSliderWrap);
351
+ if (!$scrollContainer.length) return;
352
+
353
+ $scrollContainer.stop(true, true).animate({ scrollTop: 0 }, 200);
343
354
  },
344
355
  isMessageExist: isMessageExist,
345
356
  getMessageInfo: getMessageInfo,
@@ -0,0 +1,65 @@
1
+ {{#extend
2
+ "my-account-v2"
3
+ pageClass="page_tradePro-rewards"
4
+ title="TradePro Rewards"
5
+ logo-tp=true
6
+ tradepro-nav=true
7
+ pageMyAcc=true
8
+ myAccV2=true
9
+ isLoggedIn=true
10
+ mainClass="pt-0"
11
+ dataBreadcrumbs=my_account.tradeProRewards.breadcrumbsDetailsPage
12
+ }}
13
+ {{#content "head" mode="append"}}
14
+ <link type="text/css" rel="stylesheet" href="./css/pages/tradePro-rewards.css">
15
+ {{/content}}
16
+ {{#content "main"}}
17
+ <div class="container">
18
+ <div class="row">
19
+ <div class="col-12">
20
+ {{> my-account/mobile-nav
21
+ menu=my_account.tradepro.menu
22
+ active-index=4
23
+ page-name=my_account.tradepro.menu.[4].title
24
+ }}
25
+ </div>
26
+ </div>
27
+ </div>
28
+
29
+ <div class="container top-indent">
30
+ <div class="row">
31
+ <div class="col-12">
32
+ {{#with page_tradePro_vouchers.qr}}
33
+ <h1 class="text-start">{{title}}</h1>
34
+ {{> voucher}}
35
+ {{/with}}
36
+ {{#extend "accordion" header=page_tradePro_vouchers.terms.title collapsed="accordion_collapsed voucher--terms" hidden="hidden-state"}}
37
+ {{#content "content"}}{{page_tradePro_vouchers.terms.text}}{{/content}}
38
+ {{/extend}}
39
+ </div>
40
+ </div>
41
+ </div>
42
+
43
+ {{#extend "cards-slider"
44
+ title="Other TradePro Rewards"
45
+ secondary=true
46
+ }}
47
+ {{#content "cards"}}
48
+ {{#each page_tradePro_cards.reward_cards}}
49
+ {{> reward_card
50
+ modificator="swiper-slide"
51
+ imgSrc=imgSrc
52
+ title=title
53
+ description=description
54
+ btnText=btnText
55
+ btnUrl=btnUrl
56
+ }}
57
+ {{/each}}
58
+ {{/content}}
59
+ {{/extend}}
60
+
61
+ {{/content}}
62
+ {{#content "foot" mode="append"}}
63
+ <script defer src="./js/tradePro-rewards.min.js"></script>
64
+ {{/content}}
65
+ {{/extend}}
@@ -162,10 +162,12 @@
162
162
  width: 100%;
163
163
  height: auto;
164
164
  max-width: 64px;
165
+ max-height: 64px;
165
166
 
166
167
  .product-img {
167
168
  width: 100%;
168
169
  height: auto;
170
+ object-fit: contain;
169
171
  }
170
172
  }
171
173
 
@@ -607,6 +609,7 @@
607
609
 
608
610
  &__image {
609
611
  max-width: 94px;
612
+ max-height: 94px;
610
613
  }
611
614
  }
612
615
 
@@ -105,8 +105,25 @@ $voucher-cell-height-xl: 296px;
105
105
  }
106
106
  }
107
107
 
108
+ &__qr-img {
109
+ width: 183px;
110
+ height: 183px;
111
+ margin: auto;
112
+
113
+ & > * {
114
+ width: 100%;
115
+ height: 100%;
116
+ }
117
+
118
+ @include media-breakpoint-up(md) {
119
+ width: 166px;
120
+ height: 166px;
121
+ }
122
+ }
123
+
108
124
  &__barcode-number {
109
- margin-top: 4px;
125
+ margin-top: 8px;
126
+ word-break: break-word;
110
127
  }
111
128
 
112
129
  &__label {
package/src/sitemap.html CHANGED
@@ -717,6 +717,10 @@
717
717
  <span class="page-id">10.16</span>
718
718
  <a href="page_tradePro_rewards_instoreAndOnline.html" target="_blank">TradePro Rewards In-store & Online</a>
719
719
  </li>
720
+ <li>
721
+ <span class="page-id"></span>
722
+ <a href="page_tradePro_rewards_QR.html" target="_blank">TradePro Rewards QR</a>
723
+ </li>
720
724
  <li>
721
725
  <span class="page-id">10.17</span>
722
726
  <a href="page_tradePro_rewards_noInstoreAndOnline.html" target="_blank">TradePro Rewards No barcode & No Online Code Reward</a>