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

Add support for publishing new custom votings #115

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

lagartoverde
Copy link
Contributor

Made it possible to publish the new custom votes generated in GN
Related to this lblod/frontend-gelinkt-notuleren#732

@lagartoverde lagartoverde self-assigned this Oct 17, 2024
@lagartoverde lagartoverde added the enhancement New feature or request label Oct 17, 2024

constructor({ uri, position, content, context }) {
this.type = 'customVote';
this.isCustomVote = true;
Copy link
Member

Choose a reason for hiding this comment

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

You're saving this information in 3 separate locations:
isCustomVote on custom votes, isStandardVote on standard votes, and type
why not just use type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahhhh yes, that's something I wanted to ask, I didn't find a way of doing the (eq this.type "customVote) or something similar in handlebars, so I created these properties. Is there a way of doing that?
And I thought I didn't wanted just to have isCustomVote and isStandardVote so I kept the type property

Copy link
Member

Choose a reason for hiding this comment

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

hmm I'll have a look, but at a minimum you could calculate the boolean at the point of passing the context to the template instead of storing it here

Copy link
Member

Choose a reason for hiding this comment

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

you can define your own helpers like this: https://handlebarsjs.com/guide/expressions.html#helpers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done thanks :)

models/versioned-notulen.js Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants