-
-
Notifications
You must be signed in to change notification settings - Fork 860
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
Show only breaking participants in check-in screen #2556
base: develop
Are you sure you want to change the base?
Conversation
I'm having a bit of a trouble reducing the cyclomatic complexity of the get_context_data method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! Thanks for this PR! Don't need to worry about Codeclimate BTW.
I was expecting more that the filter is added as an option on the top bar of the page, so it would be more of a frontend change than backend. Having it as a frontend filter would be more flexible, and could include adjudicators as well.
However, that would also require a backend change to pass the teams' break(s) to the frontend. Does this sound like a good plan?
@tienne-B |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'd have to set breaking_team_short_names
for CheckInVenuesStatusView
as well
console.log('Breaking Teams and Adjudicators') | ||
// print each object in the array | ||
const temp = this.entitiesByPresence.filter(isBreaking) | ||
for (let i = 0; i < temp.length; i++) { | ||
console.log(temp[i]) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using console
, as it's just for debugging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it's just temporary, will remove
const isBreaking = (entityByPresence) => { | ||
if (entityByPresence.type === 'Adjudicator') { | ||
return entityByPresence.breaking | ||
} else if (this.breakingTeamShortNames.includes(entityByPresence.name)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could using team IDs be shorter and avoid needing to escape the strings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do
Fixes #2475