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

Implement voucher shortcut buttons #962

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

weeman1337
Copy link
Collaborator

@weeman1337 weeman1337 commented Jul 25, 2022

  • migrate to Twig template

grafik

@MyIgel MyIgel added the Type: Feature An idea for a new feature label Aug 13, 2022
/**
* Handles +1 voucher clicks.
*/
document.addEventListener('click', async (event) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bitte nicht auf document den click registrieren. Sondern nur auf den Elementen die du unten prüfst.
Dann wird auch nicht jeder click hier durch gehauen.

const dataset = element.dataset;

if (
typeof dataset.voucherAmount === 'undefined'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dataset.voucherAmount == null
null und undefined sind nur gegenseitig equivalent => damit wird automatisch auf null und auf undefined geprüft. Braucht also kein typeof

try {
csrfToken = getCSRFToken();
} catch (e) {
console.log(e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.error?

@MyIgel
Copy link
Member

MyIgel commented Oct 21, 2022

Also this branch has to be rebased as it has merge conflicts @weeman1337 ;)

@MyIgel
Copy link
Member

MyIgel commented Jan 17, 2023

👋 @weeman1337

@MyIgel MyIgel added the Status: In Progress Fixing this issue is in progress. label Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: In Progress Fixing this issue is in progress. Type: Feature An idea for a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants