10000 feat: add warning dialog when removing member from organization by jaaydenh · Pull Request #14695 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: add warning dialog when removing member from organization #14695

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

Merged
merged 5 commits into from
Sep 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: update copy
  • Loading branch information
jaaydenh committed Sep 27, 2024
commit 396d987cd490d18a9a3d028f90b0739f7b44ea97
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { Interpolation, Theme } from "@emotion/react";
import { getErrorMessage } from "api/errors";
import { groupsByUserIdInOrganization } from "api/queries/groups";
import {
Expand Down Expand Up @@ -122,13 +123,13 @@ const OrganizationMembersPage: FC = () => {
<li>Remove the member from all groups in this organization</li>
<li>Remove all user role assignments</li>
<li>
Irreversibly orphan all their workspaces associated with this
Orphan all the member's workspaces associated with this
organization
</li>
</ul>
</p>

<p>
<p css={styles.test}>
Are you sure you want to remove{" "}
<strong>{memberToDelete?.username}</strong>?
Copy link
Member

Choose a reason for hiding this comment

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

any way we could fiddle the types so that memberToDelete isn't optional here? seeing "Are you sure you want to remove ?" would be weird

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I feels difficult to remove the undefined from memberToDelete without restructuring the pattern that ConfirmDialog uses. For now, maybe its safer to just not display the username here.

</p>
Expand All @@ -139,4 +140,10 @@ const OrganizationMembersPage: FC = () => {
);
};

const styles = {
test: {
paddingBottom: 20,
},
} satisfies Record<string, Interpolation<Theme>>;

export default OrganizationMembersPage;
Loading
0