wickes-css2 2.105.0-develop.7 → 2.105.0-develop.9

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 (36) hide show
  1. package/Readme.md +1 -1
  2. package/build/css/my-account-main-v2.css +1 -1
  3. package/build/css/pages/my-account-v2.css +1 -1
  4. package/build/css/pages/page_discount.css +1 -1
  5. package/build/js/basket.min.js +1 -1
  6. package/build/js/bundle.min.js +1 -1
  7. package/build/js/checkout.min.js +1 -1
  8. package/build/js/merged-checkout.min.js +1 -1
  9. package/build/js/my-account.min.js +1 -1
  10. package/build/js/page/my-account.js +32 -47
  11. package/build/js/project-list.min.js +1 -1
  12. package/build/js/share-project-list.min.js +1 -0
  13. package/package.json +2 -2
  14. package/src/components/my-account/barcode.hbs +1 -3
  15. package/src/components/my-account/cards-swap.hbs +10 -0
  16. package/src/components/my-account/clipboard-code-card.hbs +3 -3
  17. package/src/components/my-account/discount.hbs +1 -1
  18. package/src/components/my-account/greetings.hbs +1 -1
  19. package/src/data/my-account/data_my-account.json +9 -0
  20. package/src/js/components/cards-swap.js +74 -0
  21. package/src/js/components/share-project-list.js +56 -0
  22. package/src/js/page/my-account.js +32 -47
  23. package/src/page_my-account-installer.html +1 -1
  24. package/src/page_my-account-trade-pro-carousel-double.html +127 -0
  25. package/src/page_my-account-trade-pro-carousel.html +134 -0
  26. package/src/page_my-account-trade-pro.html +1 -1
  27. package/src/page_tradepro-discount-app.html +1 -1
  28. package/src/page_tradepro-discount-double.html +109 -0
  29. package/src/page_tradepro-discount.html +36 -2
  30. package/src/scss/components/my-account/_barcode.scss +9 -1
  31. package/src/scss/components/my-account/_cards-swap.scss +60 -0
  32. package/src/scss/components/my-account/_clipboard-code.scss +11 -3
  33. package/src/scss/components/my-account/_discount.scss +12 -2
  34. package/src/scss/pages/my-account-v2.scss +42 -5
  35. package/src/scss/pages/page_discount.scss +8 -4
  36. package/src/sitemap.html +3 -0
@@ -0,0 +1 @@
1
+ !function t(r,i,c){function l(n,e){if(!i[n]){if(!r[n]){var o="function"==typeof require&&require;if(!e&&o)return o(n,!0);if(a)return a(n,!0);throw(e=new Error("Cannot find module '"+n+"'")).code="MODULE_NOT_FOUND",e}o=i[n]={exports:{}},r[n][0].call(o.exports,function(e){return l(r[n][1][e]||e)},o,o.exports,t,r,i,c)}return i[n].exports}for(var a="function"==typeof require&&require,e=0;e<c.length;e++)l(c[e]);return l}({1:[function(e,n,o){"use strict";var t,r,i,c,l=e("./utils/copy-to-clipboard");function a(){var e,n;t.length&&(e=t.get(0),t.removeAttr("disabled"),e.focus(),n=(e.value||"").length,"function"==typeof e.setSelectionRange?e.setSelectionRange(0,n):"function"==typeof e.select&&e.select())}t=$("#share-list-modal #shopping-list-link"),r=$("#copy-link"),i=r.find("a"),c="copy-link_hovered",i.on("click",function(e){e.preventDefault()}),r.on("click",function(e){e.preventDefault(),a();e=(t.val()||"").trim();e&&(0,l.copyToClipboard)(e,r[0],{noUpperCase:!0}).then(function(){i.addClass(c)}).catch(function(e){console.error(e)})}),t.on("click",function(e){e.preventDefault(),a(),i.removeClass(c)})},{"./utils/copy-to-clipboard":2}],2:[function(e,n,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.copyToClipboard=function(e,n){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},e=function(e,n){e=null==e?"":e+"";return(n.noUpperCase?e:e.replace(/(^\w|\s\w)/g,function(e){return e.toUpperCase()})).split(" ").filter(function(e){return""!==e}).join(" ").trim()}(e,o);if(!e)return Promise.reject(new Error("Empty text"));if(null!=(o=window.webkit)&&null!=(o=o.messageHandlers)&&o.copy)try{return window.webkit.messageHandlers.copy.postMessage(e),Promise.resolve(!0)}catch(e){console.error(e)}if(null!=(o=window.Android)&&o.copyToClipboard&&"function"==typeof window.Android.copyToClipboard)try{return window.Android.copyToClipboard(e),Promise.resolve(!0)}catch(e){console.error(e)}if(null!=(o=navigator.clipboard)&&o.writeText)return navigator.clipboard.writeText(e).then(function(){return!0});return function(a,u){return new Promise(function(e,n){try{var o,t=$(u).parent(),r=$("<textarea>").val(a).attr("readonly","readonly").css({position:"fixed",top:0,left:"-9999px",opacity:0,width:"1px",height:"1px",padding:0,border:0,margin:0}),i=(t.append(r),r.get(0)),c=(i.focus(),(i.value||"").length),l=("function"==typeof i.setSelectionRange?i.setSelectionRange(0,c):r.select(),document.execCommand("copy"));r.remove(),window.getSelection&&(o=window.getSelection())&&o.removeAllRanges&&o.removeAllRanges(),l?e(!0):n(new Error("execCommand failed"))}catch(e){n(e)}})}(e,n)}},{}]},{},[1]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wickes-css2",
3
- "version": "2.105.0-develop.7",
3
+ "version": "2.105.0-develop.9",
4
4
  "description": "CSS and JS and page templates in use by Wickes",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -125,7 +125,7 @@
125
125
  "branches": [
126
126
  "alt-master",
127
127
  {
128
- "name": "custom-tag/0.5.0-icons",
128
+ "name": "develop",
129
129
  "prerelease": "${name.replace(/^custom-tag\\//g, '')}"
130
130
  }
131
131
  ],
@@ -1,7 +1,5 @@
1
1
  <div class="barcode">
2
- <div class="barcode__discount">
3
- <img src="{{discountSrc}}" />
4
- </div>
2
+ <div class="barcode__discount barcode__discount--text">{{discountText}}</div>
5
3
  <div class="barcode__content">
6
4
  {{#if customIcon}}
7
5
  {{{customIcon}}}
@@ -0,0 +1,10 @@
1
+ <div class="cards-swap">
2
+ <div class="cards-swap__card cards-swap__card1 active static">
3
+ <div class="cards-swap__toggle">2</div>
4
+ {{#block "card1"}}{{/block}}
5
+ </div>
6
+ <div class="cards-swap__card cards-swap__card2">
7
+ <div class="cards-swap__toggle">1</div>
8
+ {{#block "card2"}}{{/block}}
9
+ </div>
10
+ </div>
@@ -1,4 +1,4 @@
1
- <div class="clipboard-code {{mod}}">
1
+ <div class="clipboard-code {{mod}} {{#if secondary}}clipboard-code--secondary{{/if}}">
2
2
  <span class="icon-wrap">
3
3
  {{#if customIcon}}
4
4
  {{{customIcon}}}
@@ -10,14 +10,14 @@
10
10
  <p class="title">{{title}}</p>
11
11
  <div class="clipboard-code__cta">
12
12
  <span class="subtitle">{{code}}</span>
13
- <button class="btn btn--icon btn--{{mod}}">
13
+ <button class="btn btn--icon copy-code btn--{{mod}}">
14
14
  <i class="fas fa-copy icon-copy"></i>
15
15
  </button>
16
16
  </div>
17
17
  </div>
18
18
  {{#if description}}
19
19
  <div class="clipboard-code__description">
20
- <p>{{description.text}} <a class="link" href="{{{description.link}}}">{{description.link}}</a></p>
20
+ <p>{{{description.text}}} <a class="link" href="{{{description.link}}}">{{description.link}}</a></p>
21
21
  </div>
22
22
  {{/if}}
23
23
  </div>
@@ -1,4 +1,4 @@
1
- <div class="discount">
1
+ <div class="discount {{mod}} {{#if secondary}}discount--secondary{{/if}}">
2
2
  <div class="discount__content">
3
3
  <span class="icon-wrap">
4
4
  <i class="icon fas fa-barcode-alt"></i>
@@ -1,4 +1,4 @@
1
- <div class="greetings">
1
+ <div class="greetings {{mod}} {{#if secondary}}greetings--secondary{{/if}}">
2
2
  <div>
3
3
  <h2 class="title">Hi {{name}}!</h2>
4
4
  <p class="subtitle">{{subtitle}}</p>
@@ -388,6 +388,7 @@
388
388
  }
389
389
  ],
390
390
  "discount": "img/placeholders/discount-sm.png",
391
+ "discountText": "10% off",
391
392
  "discountCode": "TRADEPRO",
392
393
  "icons": {
393
394
  "tradeproID": "fas fa-user-hard-hat"
@@ -529,6 +530,13 @@
529
530
  }
530
531
  ]
531
532
  },
533
+ "tradepro2": {
534
+ "discount": "img/placeholders/discount-sm-15.jpg",
535
+ "discountText": "15% off",
536
+ "onlineDiscountText": {
537
+ "text": "We're giving our TradePro members <b>15% off everything</b> online and in-store, <b>on top of our existing offers</b>, as a thank you for being a TradePro member. Discount will be automatically applied at checkout when you shop online or via the TradePro app from 5PM Sunday 4th January until 11:59PM Tuesday 6th January. You can also use your barcode in-store from Monday 5th January to Tuesday 6th January."
538
+ }
539
+ },
532
540
  "tradeProRewards": {
533
541
  "breadcrumbsHomePage": [
534
542
  {
@@ -576,6 +584,7 @@
576
584
  }
577
585
  ],
578
586
  "discount": "img/placeholders/discount-sm-15.jpg",
587
+ "discountText": "10% off",
579
588
  "discountCode": "TRADEPROINSTALL",
580
589
  "icons": {
581
590
  "installer": "<svg class=\"icon custom-icon\" width=\"18\" height=\"19\" viewBox=\"0 0 18 19\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M6 0.75C6 0.334375 6.33437 0 6.75 0H7.25C7.66563 0 8 0.334375 8 0.75V2.5L8.8875 0.721875C10.075 1.35938 10.9062 2.58125 10.9937 4H11C11.4156 4 11.75 4.33437 11.75 4.75C11.75 5.16563 11.4156 5.5 11 5.5H3C2.58437 5.5 2.25 5.16563 2.25 4.75C2.25 4.33437 2.58437 4 3 4H3.00625C3.09375 2.58125 3.925 1.35938 5.1125 0.721875L6 2.5V0.75Z\" fill=\"#3E3E3E\"/>\n<path d=\"M10.9688 6.5C10.7219 8.47188 9.04062 10 7 10C4.95937 10 3.27813 8.47188 3.03125 6.5H10.9688Z\" fill=\"#3E3E3E\"/>\n<path d=\"M0 15.2C0 12.8813 1.88125 11 4.2 11H9.8C10.2255 11 10.6362 11.0633 11.0233 11.1811C10.927 11.8173 11.002 12.421 11.1001 12.7031L7.90625 16H0.8C0.359375 16 0 15.6406 0 15.2Z\" fill=\"#3E3E3E\"/>\n<path d=\"M14.875 15.25C16.6016 15.25 18 13.8516 18 12.125C18 11.8262 17.957 11.5371 17.8789 11.2617C17.8184 11.0508 17.5586 11.0039 17.4043 11.1582L15.9043 12.6582C15.8457 12.7168 15.7656 12.75 15.6836 12.75H14.5625C14.3906 12.75 14.25 12.6094 14.25 12.4375V11.3164C14.25 11.2344 14.2832 11.1543 14.3418 11.0957L15.8418 9.5957C15.9961 9.44141 15.9473 9.18164 15.7383 9.12109C15.4629 9.04297 15.1738 9 14.875 9C13.1484 9 11.75 10.3984 11.75 12.125C11.75 12.498 11.8164 12.8574 11.9355 13.1895L8.38867 16.7363C8.14062 16.9844 8 17.3223 8 17.6738C8 18.4062 8.59375 19 9.32617 19C9.67773 19 10.0156 18.8594 10.2637 18.6113L13.8105 15.0645C14.1426 15.1855 14.502 15.25 14.875 15.25ZM9.5625 16.9688C9.68682 16.9688 9.80605 17.0181 9.89396 17.106C9.98186 17.194 10.0312 17.3132 10.0312 17.4375C10.0312 17.5618 9.98186 17.681 9.89396 17.769C9.80605 17.8569 9.68682 17.9062 9.5625 17.9062C9.43818 17.9062 9.31895 17.8569 9.23104 17.769C9.14314 17.681 9.09375 17.5618 9.09375 17.4375C9.09375 17.3132 9.14314 17.194 9.23104 17.106C9.31895 17.0181 9.43818 16.9688 9.5625 16.9688Z\" fill=\"#3E3E3E\"/>\n</svg>\n"
@@ -0,0 +1,74 @@
1
+ class CardsSwap {
2
+ static selectors = {
3
+ root: '.cards-swap',
4
+ card: '.cards-swap__card',
5
+ toggle: '.cards-swap__toggle',
6
+ activeCard: '.cards-swap__card.active',
7
+ };
8
+
9
+ static classes = {
10
+ static: 'static',
11
+ active: 'active',
12
+ };
13
+
14
+ constructor(element) {
15
+ this.element = element;
16
+ this.cards = this.element.querySelectorAll(CardsSwap.selectors.card);
17
+ this.toggles = this.element.querySelectorAll(CardsSwap.selectors.toggle);
18
+ this.init();
19
+ }
20
+
21
+ init() {
22
+ if (this.cards.length !== 2 || this.toggles.length !== 2) return;
23
+ this.cards.forEach((card) => {
24
+ card.classList.remove(CardsSwap.classes.static);
25
+ });
26
+ this.attachToggleListeners();
27
+ this.updateHeight();
28
+
29
+ window.addEventListener(
30
+ 'resize',
31
+ _.debounce(() => {
32
+ this.updateHeight();
33
+ }, 250)
34
+ );
35
+ }
36
+
37
+ attachToggleListeners() {
38
+ this.toggles.forEach((toggle) => {
39
+ toggle.addEventListener('click', () => {
40
+ this.toggleCards();
41
+ });
42
+ });
43
+ }
44
+
45
+ toggleCards() {
46
+ this.cards.forEach((card) => {
47
+ card.classList.toggle(CardsSwap.classes.active);
48
+ });
49
+ this.animateHeight();
50
+ }
51
+
52
+ updateHeight() {
53
+ const activeCard = this.element.querySelector(CardsSwap.selectors.activeCard);
54
+ if (activeCard) {
55
+ this.element.style.transition = 'none';
56
+ this.element.style.height = activeCard.offsetHeight + 'px';
57
+ }
58
+ }
59
+
60
+ animateHeight() {
61
+ const activeCard = this.element.querySelector(CardsSwap.selectors.activeCard);
62
+ if (activeCard) {
63
+ this.element.style.transition = 'height 0.5s linear';
64
+ this.element.style.height = activeCard.offsetHeight + 'px';
65
+ }
66
+ }
67
+ }
68
+
69
+ $(document).ready(function () {
70
+ const cardsSwapElements = document.querySelectorAll(CardsSwap.selectors.root);
71
+ cardsSwapElements.forEach((element) => {
72
+ new CardsSwap(element);
73
+ });
74
+ });
@@ -0,0 +1,56 @@
1
+ // this file should be delete after <script defer="defer" src="./js/share-project-list.min.js"></script>
2
+ // implementation on backend (IC-1182 comment https://wickesit.atlassian.net/browse/IC-1182?focusedCommentId=312018)
3
+
4
+ var Wick = Wick || {};
5
+
6
+ Wick.ShareProjectList = (function () {
7
+ function init() {
8
+ var shoppingListLinkInput = $('#share-list-modal #shopping-list-link'),
9
+ shoppingListLinkEl = shoppingListLinkInput[0],
10
+ linkContainer = $('#copy-link'),
11
+ actualLink = linkContainer.find('a'),
12
+ copyClass = 'copy-link_hovered';
13
+
14
+ actualLink.click(function (e) {
15
+ e.preventDefault();
16
+ });
17
+
18
+ linkContainer.click(function () {
19
+ if (navigator.userAgent.match(/TradeProMobile_iOS|DIYMobile_iOS/i)) {
20
+ iosCopyToClipboard(shoppingListLinkInput);
21
+ } else if (navigator.userAgent.match(/ipad|ipod|iphone/i)) {
22
+ shoppingListLinkEl.select();
23
+ shoppingListLinkEl.setSelectionRange(0, 999999);
24
+ } else {
25
+ shoppingListLinkEl.select();
26
+ }
27
+
28
+ document.execCommand('copy');
29
+ actualLink.addClass(copyClass);
30
+ });
31
+
32
+ shoppingListLinkInput.click(function () {
33
+ linkContainer.click();
34
+ actualLink.removeClass(copyClass);
35
+ });
36
+ }
37
+
38
+ function iosCopyToClipboard($input) {
39
+ var el = $input.get(0);
40
+ var editable = el.contentEditable;
41
+ var readOnly = el.readOnly;
42
+
43
+ el.contentEditable = true;
44
+ el.readOnly = false;
45
+ var range = document.createRange();
46
+ range.selectNodeContents(el);
47
+ var sel = window.getSelection();
48
+ sel.removeAllRanges();
49
+ sel.addRange(range);
50
+ el.setSelectionRange(0, 999999);
51
+ el.contentEditable = editable;
52
+ el.readOnly = readOnly;
53
+ }
54
+
55
+ init();
56
+ })();
@@ -1,58 +1,43 @@
1
- import {copyToClipboard} from "./utils/copy-to-clipboard";
2
- import {isApp} from "./utils/helpers";
1
+ import { copyToClipboard } from './utils/copy-to-clipboard';
2
+ import { isApp } from './utils/helpers';
3
3
 
4
4
  var Wick = window.Wick || {};
5
5
 
6
6
  Wick.MyAccount = {
7
- el: {
8
- $clipboardCode: $('.clipboard-code'),
9
- appInfo: '.app-info',
10
- hideAppInfo: 'app-info--hide'
11
- },
12
- clipboardCodes: {
13
- tradeProId: {
14
- titleEl: '.clipboard-code.trade-pro-id .title',
15
- subtitleEl: '.clipboard-code.trade-pro-id .subtitle',
16
- btnCopy: '.btn--trade-pro-id',
7
+ el: {
8
+ $clipboardCode: $('.clipboard-code'),
9
+ appInfo: '.app-info',
10
+ hideAppInfo: 'app-info--hide',
17
11
  },
18
- discountCode: {
19
- titleEl: '.clipboard-code.discount-code .title',
20
- subtitleEl: '.clipboard-code.discount-code .subtitle',
21
- btnCopy: '.btn--discount-code',
22
- },
23
- },
24
- copyCode(codeType) {
25
- const { titleEl, subtitleEl, btnCopy } = Wick.MyAccount.clipboardCodes[codeType];
26
- const value = $(subtitleEl).text().trim();
27
- const title = $(titleEl).text().trim();
12
+ copyCode($btn) {
13
+ const $container = $btn.closest('.clipboard-code');
14
+ const value = $container.find('.subtitle').text().trim();
15
+ const title = $container.find('.title').text().trim();
28
16
 
29
- copyToClipboard(value, btnCopy);
30
- Wick.SnackBar.show(
31
- {
32
- text: `${title} copied to clipboard`,
33
- type: Wick.SnackBar.types.SUCCESS,
34
- withCloseButton: false,
35
- autoClose: true,
36
- delayBeforeClose: 1500
37
- }
38
- );
39
- },
40
- init() {
41
- Object.keys(Wick.MyAccount.clipboardCodes).forEach((codeType) => {
42
- const { btnCopy } = Wick.MyAccount.clipboardCodes[codeType];
43
- $(btnCopy).on('click', () => Wick.MyAccount.copyCode(codeType));
44
- });
17
+ copyToClipboard(value, $btn);
18
+ Wick.SnackBar.show({
19
+ text: `${title} copied to clipboard`,
20
+ type: Wick.SnackBar.types.SUCCESS,
21
+ withCloseButton: false,
22
+ autoClose: true,
23
+ delayBeforeClose: 1500,
24
+ });
25
+ },
26
+ init() {
27
+ Wick.MyAccount.el.$clipboardCode.find('.copy-code').on('click', function () {
28
+ Wick.MyAccount.copyCode($(this));
29
+ });
45
30
 
46
- if($(Wick.MyAccount.el.appInfo).length && isApp()) {
47
- $(Wick.MyAccount.el.appInfo).addClass(Wick.MyAccount.el.hideAppInfo);
48
- }
49
- }
50
- }
31
+ if ($(Wick.MyAccount.el.appInfo).length && isApp()) {
32
+ $(Wick.MyAccount.el.appInfo).addClass(Wick.MyAccount.el.hideAppInfo);
33
+ }
34
+ },
35
+ };
51
36
 
52
37
  $(document).ready(function () {
53
- if (!Wick.MyAccount.el.$clipboardCode.length) {
54
- return;
55
- }
38
+ if (!Wick.MyAccount.el.$clipboardCode.length) {
39
+ return;
40
+ }
56
41
 
57
- Wick.MyAccount.init();
42
+ Wick.MyAccount.init();
58
43
  });
@@ -33,7 +33,7 @@
33
33
  subtitle=my_account.user.email
34
34
  }}
35
35
  {{> my-account/discount
36
- discountSrc=my_account.installer.discount
36
+ discountText=my_account.installer.discountText
37
37
  installer=true
38
38
  title="In-store discount"
39
39
  code=my_account.discount
@@ -0,0 +1,127 @@
1
+ {{#extend
2
+ "my-account-v2"
3
+ iconUserClass=my_account.tradepro.icons.tradeproID
4
+ dataBreadcrumbs=my_account.tradepro.breadcrumbs
5
+ pageClass="page_my-account_new"
6
+ title="My Account Trade Pro Carousel Double"
7
+ pageMyAcc=true
8
+ myAccV2=true
9
+ isLoggedIn=true
10
+ tradepro-nav=true
11
+ mainClass="my-account"
12
+ switch-vat=true
13
+ }}
14
+ {{#content "main"}}
15
+ <div class="container">
16
+ <div class="row">
17
+ <div class="col-12">
18
+ {{> my-account/mobile-nav my-account-menu-new
19
+ menu=my_account.tradepro.menu
20
+ active-index=0
21
+ page-name=my_account.tradepro.menu.[0].title
22
+ }}
23
+ </div>
24
+ </div>
25
+ </div>
26
+ <div class="account-summary">
27
+ <div class="container">
28
+ <div class="row">
29
+ <div class="col-12">
30
+ <div class="account-summary__wrapper d-none d-sm-grid mb-3">
31
+ {{> my-account/greetings
32
+ name=my_account.user.name
33
+ subtitle=my_account.user.email
34
+ }}
35
+ </div>
36
+ {{#extend "my-account/cards-swap"}}
37
+ {{#content "card1"}}
38
+ <div class="account-summary__wrapper account-summary__wrapper--secondary account-summary__wrapper--double">
39
+ {{> my-account/greetings
40
+ secondary=true
41
+ mod="d-sm-none"
42
+ name=my_account.user.name
43
+ subtitle=my_account.user.email
44
+ }}
45
+ {{> my-account/discount
46
+ secondary=true
47
+ discountText=my_account.tradepro2.discountText
48
+ title="In-store discount"
49
+ code=my_account.discount
50
+ }}
51
+ {{> my-account/clipboard-code-card
52
+ secondary=true
53
+ mod="trade-pro-id"
54
+ icon=my_account.tradepro.icons.tradeproID
55
+ title="TradePro ID"
56
+ code=my_account.tradeProId
57
+ }}
58
+ </div>
59
+ {{/content}}
60
+ {{#content "card2"}}
61
+ <div class="account-summary__wrapper">
62
+ {{> my-account/greetings
63
+ mod="d-sm-none"
64
+ name=my_account.user.name
65
+ subtitle=my_account.user.email
66
+ }}
67
+ {{> my-account/discount
68
+ discountText=my_account.tradepro.discountText
69
+ title="In-store discount"
70
+ code=my_account.discount
71
+ }}
72
+ {{> my-account/clipboard-code-card
73
+ mod="trade-pro-id"
74
+ icon=my_account.tradepro.icons.tradeproID
75
+ title="TradePro ID"
76
+ code=my_account.tradeProId
77
+ }}
78
+ {{> my-account/clipboard-code-card
79
+ mod="discount-code"
80
+ icon="fas fa-badge-percent"
81
+ title="Online discount code"
82
+ code=my_account.tradepro.discountCode
83
+ }}
84
+ </div>
85
+ {{/content}}
86
+ {{/extend}}
87
+ {{> my-account/active-orders/list-orders
88
+ switch-vat=true
89
+ title=my_account.tradepro.activeOrders.sectionTitle
90
+ linkText='View all orders'
91
+ orders=my_account.tradepro.activeOrders.orderList
92
+ }}
93
+ </div>
94
+ </div>
95
+ </div>
96
+ </div>
97
+ <div class="container">
98
+ <div class="row">
99
+ <div class="col-12">
100
+ {{> my-account/menu-items
101
+ items=my_account.tradepro.menu
102
+ }}
103
+ </div>
104
+ </div>
105
+ </div>
106
+ <div class="container">
107
+ <div class="row">
108
+ <div class="col-12">
109
+ {{> my-account/saving-totaliser this-last-year=true}}
110
+ </div>
111
+ </div>
112
+ </div>
113
+ <div class="account-actions">
114
+ <div class="container">
115
+ <div class="row">
116
+ <div class="col-12">
117
+ {{> my-account/user-account-actions mod="d-sm-none"}}
118
+ {{> my-account/contact-us contacts=my_account.contacts}}
119
+ </div>
120
+ </div>
121
+ </div>
122
+ </div>
123
+ {{/content}}
124
+ {{#content "foot" mode="append"}}
125
+ <script defer src="./js/my-account.min.js"></script>
126
+ {{/content}}
127
+ {{/extend}}
@@ -0,0 +1,134 @@
1
+ {{#extend
2
+ "my-account-v2"
3
+ iconUserClass=my_account.tradepro.icons.tradeproID
4
+ dataBreadcrumbs=my_account.tradepro.breadcrumbs
5
+ pageClass="page_my-account_new"
6
+ title="My Account Trade Pro Carousel"
7
+ pageMyAcc=true
8
+ myAccV2=true
9
+ isLoggedIn=true
10
+ tradepro-nav=true
11
+ mainClass="my-account"
12
+ switch-vat=true
13
+ }}
14
+ {{#content "main"}}
15
+ <div class="container">
16
+ <div class="row">
17
+ <div class="col-12">
18
+ {{> my-account/mobile-nav my-account-menu-new
19
+ menu=my_account.tradepro.menu
20
+ active-index=0
21
+ page-name=my_account.tradepro.menu.[0].title
22
+ }}
23
+ </div>
24
+ </div>
25
+ </div>
26
+ <div class="account-summary">
27
+ <div class="container">
28
+ <div class="row">
29
+ <div class="col-12">
30
+ <div class="account-summary__wrapper d-none d-sm-grid mb-3">
31
+ {{> my-account/greetings
32
+ name=my_account.user.name
33
+ subtitle=my_account.user.email
34
+ }}
35
+ </div>
36
+ {{#extend "my-account/cards-swap"}}
37
+ {{#content "card1"}}
38
+ <div class="account-summary__wrapper account-summary__wrapper--secondary">
39
+ {{> my-account/greetings
40
+ mod="d-sm-none"
41
+ secondary=true
42
+ name=my_account.user.name
43
+ subtitle=my_account.user.email
44
+ }}
45
+ {{> my-account/discount
46
+ secondary=true
47
+ discountText=my_account.tradepro2.discountText
48
+ title="In-store discount"
49
+ code=my_account.discount
50
+ }}
51
+ {{> my-account/clipboard-code-card
52
+ secondary=true
53
+ mod="trade-pro-id"
54
+ icon=my_account.tradepro.icons.tradeproID
55
+ title="TradePro ID"
56
+ code=my_account.tradeProId
57
+ }}
58
+ {{> my-account/clipboard-code-card
59
+ secondary=true
60
+ mod="discount-code"
61
+ icon="fas fa-badge-percent"
62
+ title="Online discount code"
63
+ code=my_account.tradepro.discountCode
64
+ }}
65
+ </div>
66
+ {{/content}}
67
+ {{#content "card2"}}
68
+ <div class="account-summary__wrapper">
69
+ {{> my-account/greetings
70
+ mod="d-sm-none"
71
+ name=my_account.user.name
72
+ subtitle=my_account.user.email
73
+ }}
74
+ {{> my-account/discount
75
+ discountText=my_account.tradepro.discountText
76
+ title="In-store discount"
77
+ code=my_account.discount
78
+ }}
79
+ {{> my-account/clipboard-code-card
80
+ mod="trade-pro-id"
81
+ icon=my_account.tradepro.icons.tradeproID
82
+ title="TradePro ID"
83
+ code=my_account.tradeProId
84
+ }}
85
+ {{> my-account/clipboard-code-card
86
+ mod="discount-code"
87
+ icon="fas fa-badge-percent"
88
+ title="Online discount code"
89
+ code=my_account.tradepro.discountCode
90
+ }}
91
+ </div>
92
+ {{/content}}
93
+ {{/extend}}
94
+ {{> my-account/active-orders/list-orders
95
+ switch-vat=true
96
+ title=my_account.tradepro.activeOrders.sectionTitle
97
+ linkText='View all orders'
98
+ orders=my_account.tradepro.activeOrders.orderList
99
+ }}
100
+ </div>
101
+ </div>
102
+ </div>
103
+ </div>
104
+ <div class="container">
105
+ <div class="row">
106
+ <div class="col-12">
107
+ {{> my-account/menu-items
108
+ items=my_account.tradepro.menu
109
+ }}
110
+ </div>
111
+ </div>
112
+ </div>
113
+ <div class="container">
114
+ <div class="row">
115
+ <div class="col-12">
116
+ {{> my-account/saving-totaliser this-last-year=true}}
117
+ </div>
118
+ </div>
119
+ </div>
120
+ <div class="account-actions">
121
+ <div class="container">
122
+ <div class="row">
123
+ <div class="col-12">
124
+ {{> my-account/user-account-actions mod="d-sm-none"}}
125
+ {{> my-account/contact-us contacts=my_account.contacts}}
126
+ </div>
127
+ </div>
128
+ </div>
129
+ </div>
130
+ {{/content}}
131
+ {{#content "foot" mode="append"}}
132
+ <script defer src="./js/my-account.min.js"></script>
133
+ {{/content}}
134
+ {{/extend}}
@@ -33,7 +33,7 @@
33
33
  subtitle=my_account.user.email
34
34
  }}
35
35
  {{> my-account/discount
36
- discountSrc=my_account.tradepro.discount
36
+ discountText=my_account.tradepro.discountText
37
37
  title="In-store discount"
38
38
  code=my_account.discount
39
39
  }}
@@ -32,7 +32,7 @@ mainClass="discount-offer"
32
32
  </div>
33
33
  <div class="discount-offer__body">
34
34
  {{> my-account/discount
35
- discountSrc=my_account.tradepro.discount
35
+ discountText=my_account.tradepro.discountText
36
36
  title="In-store discount"
37
37
  code=my_account.discount
38
38
  }}