From 8ae5cb09326659415fe7961316f4f78daba3f782 Mon Sep 17 00:00:00 2001 From: dpiwko Date: Mon, 13 Sep 2021 09:10:11 +0200 Subject: [PATCH 1/4] cmp changes to board test --- package.json | 1 + src/components/popup/details/details.jsx | 8 ++++++++ src/components/popup/details/details.less | 6 ++++++ src/components/popup/intro/intro.jsx | 8 ++++++++ src/components/popup/intro/intro.less | 5 +++++ src/components/popup/popup.jsx | 7 +++++++ src/index.js | 2 ++ src/lib/store.js | 5 +++++ 8 files changed, 42 insertions(+) diff --git a/package.json b/package.json index 7b925981..d3b35462 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "start": "serve build -s -c 1", "prestart": "npm run build", "build": "cross-env NODE_ENV=production webpack --progress", + "dev-build": "cross-env NODE_ENV=development webpack --progress", "prebuild": "npm run clean && mkdirp build", "test": "npm run -s lint && jest --coverage", "test:watch": "npm run -s test -- --watch", diff --git a/src/components/popup/details/details.jsx b/src/components/popup/details/details.jsx index 44f5c9b1..49094160 100644 --- a/src/components/popup/details/details.jsx +++ b/src/components/popup/details/details.jsx @@ -91,6 +91,12 @@ export default class Details extends Component { }; }; + handleSaveAndGo = () => { + const { store } = this.props; + store.selectAllVendors(false); + this.props.onSaveOrClose(); + }; + render(props, state) { const { onSaveOrClose, @@ -194,6 +200,8 @@ export default class Details extends Component { localizeKey='back'>Back + { window.__tcfConfig.showAgreeAndGoButton && } ); diff --git a/src/components/popup/details/details.less b/src/components/popup/details/details.less index 4174e813..17508ca1 100644 --- a/src/components/popup/details/details.less +++ b/src/components/popup/details/details.less @@ -36,6 +36,12 @@ margin-right: 20px; width: 205px; } + + .saveAndGo { + margin-right: 20px; + width: 270px; + } + .cancel { margin-right: 25px; background: none; diff --git a/src/components/popup/intro/intro.jsx b/src/components/popup/intro/intro.jsx index 2f872fb5..8b07a9cf 100644 --- a/src/components/popup/intro/intro.jsx +++ b/src/components/popup/intro/intro.jsx @@ -29,6 +29,7 @@ export default class Intro extends Component { const { onAcceptAll, + onDontAgree, onShowPurposes } = props; @@ -64,6 +65,13 @@ export default class Intro extends Component { > Got it, thanks! + { window.__tcfConfig.showDontAgreeButton && } ); diff --git a/src/components/popup/intro/intro.less b/src/components/popup/intro/intro.less index 913b864c..3a6b86b6 100644 --- a/src/components/popup/intro/intro.less +++ b/src/components/popup/intro/intro.less @@ -74,6 +74,11 @@ div.intro { .acceptAll { flex: 1; } + + .dontAgree { + flex: 1; + margin-left: 10px; + } } .intro { diff --git a/src/components/popup/popup.jsx b/src/components/popup/popup.jsx index 926534a7..d99f49a4 100644 --- a/src/components/popup/popup.jsx +++ b/src/components/popup/popup.jsx @@ -33,6 +33,12 @@ export default class Popup extends Component { this.onCancel() }; + handleDontAgree = () => { + const { store, onSave } = this.props; + store.initialVendorsRejection(); + onSave(); + }; + render(props) { const { store } = props; const { isConsentToolShowing, section } = store; @@ -50,6 +56,7 @@ export default class Popup extends Component {
{ + this.setCustomVendorsConsent(false); + this.selectAllVendors(false); + }; + selectPurpose = (purposeId, isSelected) => { const {contractPurposeIds} = config; const {purposeConsents} = this.tcModel; From cca50a8fe50cec76129629da0df8ceb27e563337 Mon Sep 17 00:00:00 2001 From: dpiwko Date: Mon, 13 Sep 2021 13:22:18 +0200 Subject: [PATCH 2/4] ob --- src/components/popup/details/details.jsx | 2 +- src/components/popup/intro/intro.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/popup/details/details.jsx b/src/components/popup/details/details.jsx index 49094160..b9a4284e 100644 --- a/src/components/popup/details/details.jsx +++ b/src/components/popup/details/details.jsx @@ -200,7 +200,7 @@ export default class Details extends Component { localizeKey='back'>Back - { window.__tcfConfig.showAgreeAndGoButton && } diff --git a/src/components/popup/intro/intro.jsx b/src/components/popup/intro/intro.jsx index 8b07a9cf..bdd906f2 100644 --- a/src/components/popup/intro/intro.jsx +++ b/src/components/popup/intro/intro.jsx @@ -65,7 +65,7 @@ export default class Intro extends Component { > Got it, thanks! - { window.__tcfConfig.showDontAgreeButton && - { window.__tcfConfig['showAgreeAndGoButton'] && } diff --git a/src/components/popup/intro/intro.jsx b/src/components/popup/intro/intro.jsx index bdd906f2..8b07a9cf 100644 --- a/src/components/popup/intro/intro.jsx +++ b/src/components/popup/intro/intro.jsx @@ -65,7 +65,7 @@ export default class Intro extends Component { > Got it, thanks! - { window.__tcfConfig['showDontAgreeButton'] &&