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

Fix participant detail view without delegation #4336

Merged

Conversation

Elblinator
Copy link
Member

clsoses #4335

@Elblinator Elblinator added this to the 4.2 milestone Nov 11, 2024
@Elblinator Elblinator marked this pull request as ready for review November 11, 2024 10:23
Copy link
Member

@luisa-beerboom luisa-beerboom left a comment

Choose a reason for hiding this comment

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

Only code review.
If this works, I'm generally fine with it, just one remark.

@@ -234,7 +234,7 @@ export class ParticipantDetailViewComponent extends BaseMeetingComponent {
// TODO: Open groups subscription
this.groups = this.groupRepo.getViewModelListWithoutSystemGroupsObservable();

this.disableExpandControl = this.user.vote_delegations_from();
this.disableExpandControl = this.user?.hasVoteRightFromOthers ? this.user.vote_delegations_from() : [];
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it suffice to rewrite vote_delegations_from so it returns [] if there are no delegations?

Copy link
Member

Choose a reason for hiding this comment

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

Okay, I looked at the error message again, that looks like either the user or the meeting_user has not yet loaded at that point. Probably need to ensure that happens first or maybe add a cheeky little '?' after the offending variable, before calling vote_delegations_from. Your choice.

@Elblinator Elblinator force-pushed the 4335-fix-detail-view-without-delegations branch from 2b1a368 to 3e16107 Compare November 11, 2024 10:48
@Elblinator Elblinator merged commit 2a25888 into OpenSlides:main Nov 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants