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(desktop):invite & modify role #4005

Merged
merged 1 commit into from Sep 27, 2023
Merged

fix(desktop):invite & modify role #4005

merged 1 commit into from Sep 27, 2023

Conversation

xudaotutou
Copy link
Contributor

@xudaotutou xudaotutou commented Sep 27, 2023

🤖 Generated by Copilot at 25e9cca

Summary

✂️📚🔒

This pull request improves the frontend code quality and user experience of the team management features. It fixes a bug in the DissolveTeam component, refactors the props and state types of the ModifyRoleButton and InviteMember components, and restricts the role modification permission to the team owner in the userTable component.

No mercy for the weak, no space for the error
Trim the team name, dissolve the betrayer
Only the owner can change the role
Simplify the props, use the ButtonProps soul

Walkthrough

  • Trim the teamName input before comparing it with the nsid to prevent whitespace errors when dissolving a team (link)
  • Initialize the role state with the UserRole.Developer enum instead of the numeric value 1 for consistency and readability in the InviteMember.tsx file (link)
  • Simplify and clarify the typing and spreading of the props of the ModifyRoleButton component in the ModifyRole.tsx file by using the ButtonProps type imported from @chakra-ui/react (link, link, link)
  • Restrict the modification of other users' roles to the team owner by changing the isDisabled condition of the ModifyRoleButton component in the userTable.tsx file (link)

@sealos-ci-robot
Copy link
Member

🤖 Generated by lychee action

Summary

Status Count
🔍 Total 973
✅ Successful 400
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 572
❓ Unknown 0
🚫 Errors 0

Full action output

Full Github Actions output

@lingdie lingdie merged commit b90a17e into labring:main Sep 27, 2023
26 of 27 checks passed
bxy4543 pushed a commit to bxy4543/sealos that referenced this pull request Oct 13, 2023
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.

None yet

3 participants