-
Notifications
You must be signed in to change notification settings - Fork 40
fix: applied missing member count #5953
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
Conversation
Signed-off-by: NaYeong,Kim <nayeongkim@megazone.com>
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
|
✅ There are no commits in this PR that require review. |
|
🎉 @seungyeoneeee has been randomly selected as the reviewer! Please review. 🙏 |
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.
Pull Request Overview
This PR adds a members field to each user group entry to surface the count of users in the dropdown.
- Include member count in the group map
- Pulls
.lengthfrom the users array for display
Comments suppressed due to low confidence (2)
apps/web/src/common/modules/user/UserSelectDropdown.vue:134
- [nitpick] The property name
memberssuggests a collection. Rename tomemberCountfor clarity that it holds a count.
members: storeState.userGroupReferenceMap[userGroupId]?.data.users?.length,
apps/web/src/common/modules/user/UserSelectDropdown.vue:134
- There’s no test covering cases when a group has no users or the
data.usersfield is missing. Consider adding a unit test for the member count fallback behavior.
members: storeState.userGroupReferenceMap[userGroupId]?.data.users?.length,
| return props.userGroupPool?.map((userGroupId) => ({ | ||
| name: userGroupId, | ||
| label: storeState.userGroupReferenceMap[userGroupId]?.label || storeState.userGroupReferenceMap[userGroupId]?.name || userGroupId, | ||
| members: storeState.userGroupReferenceMap[userGroupId]?.data.users?.length, |
Copilot
AI
Jun 23, 2025
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.
If data.users is undefined or empty, members will be undefined. Consider defaulting to zero: ...users?.length || 0.
| members: storeState.userGroupReferenceMap[userGroupId]?.data.users?.length, | |
| members: storeState.userGroupReferenceMap[userGroupId]?.data.users?.length || 0, |
seungyeoneeee
left a comment
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.
LGTM~!!🙇🏻♀️
Skip Review (optional)
style,chore,ci,test,docs)Description (optional)
SSIA
Things to Talk About (optional)