Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug on "decline" action #9

Closed
RomainTweaks opened this issue Apr 1, 2019 · 5 comments
Closed

Bug on "decline" action #9

RomainTweaks opened this issue Apr 1, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@RomainTweaks
Copy link

RomainTweaks commented Apr 1, 2019

I have an issue with the modal and the notice. When the user click on the decline btn, or decline all, apps required are set to false.

In the callback of my app i have this log : "User consent for app myapp: consent=false",
and in the cookie set by Orejime my app is also set to false.

But visually in the modal the orejime-AppItem-slider is on position activate.

We can reproduce this issue on the demo page : https://orejime.netlify.com/

Can you fix this please?

[Edit]
After investigation I found where the bug is located.
In ConsentManager inside the declineAll function you have to add an if statement before the call of updateConsent to check if the app is required or not and then update to false only if it isn't required.

this.config.apps.map((app) => { if (!app.required) { this.updateConsent(app.name, false); } });

[Edit 2]
For the button decline all in the modal this is the function toggle that needs to be changed in /components/apps.js like this :

const toggle = (apps, value) => { apps.map((app)=>{ if (!app.required) { manager.updateConsent(app.name, value); } }) }

Can you put this fix in the repo please? @Leimi

@manuhabitela manuhabitela reopened this Apr 3, 2019
@manuhabitela manuhabitela added the bug Something isn't working label Apr 3, 2019
@manuhabitela
Copy link
Contributor

manuhabitela commented Apr 3, 2019

Hey, thanks. I added the fix 54ae635, will publish a new version in the week.

@RomainTweaks
Copy link
Author

Nice thank you!

By the way, can i ask you to make a little addition to the Notice component? :)

Or would you prefer if I created a new Issue?

@manuhabitela
Copy link
Contributor

Please make another issue ;)

@RomainTweaks
Copy link
Author

Ok

@manuhabitela
Copy link
Contributor

This should now be fixed in version 1.1.0, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants