mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore(site): replace inline add member form with dialog on <OrganizationMembersPage /> (#24429)
> 🤖 This PR was written by Coder Agent on behalf of Jake Howell Replace the single-select inline UserAutocomplete form with a multi-select Dialog (matching the GroupMembersPage pattern from #24287). Changes: - Replace AddOrganizationMember inline form with AddUsersDialog using MultiUserSelect for multi-user selection in a modal - Batch-add multiple users via Promise.all in the page callback - Remove isAddingMember prop (dialog manages its own loading state) - Update stories to match new interface
This commit is contained in:
@@ -9,7 +9,6 @@ import type {
|
||||
CreateOrganizationRequest,
|
||||
GroupSyncSettings,
|
||||
Organization,
|
||||
PaginatedMembersRequest,
|
||||
PaginatedMembersResponse,
|
||||
RoleSyncSettings,
|
||||
UpdateOrganizationRequest,
|
||||
@@ -28,6 +27,7 @@ import {
|
||||
type WorkspacePermissions,
|
||||
workspacePermissionChecks,
|
||||
} from "#/modules/permissions/workspaces";
|
||||
import { prepareQuery } from "#/utils/filters";
|
||||
import { meKey } from "./users";
|
||||
import { cachedQuery } from "./util";
|
||||
|
||||
@@ -96,16 +96,14 @@ export const organizationMembers = (id: string, req: UsersRequest) => {
|
||||
export const paginatedOrganizationMembers = (
|
||||
id: string,
|
||||
searchParams: URLSearchParams,
|
||||
): UsePaginatedQueryOptions<
|
||||
PaginatedMembersResponse,
|
||||
PaginatedMembersRequest
|
||||
> => {
|
||||
): UsePaginatedQueryOptions<PaginatedMembersResponse, UsersRequest> => {
|
||||
return {
|
||||
searchParams,
|
||||
queryPayload: ({ limit, offset }) => {
|
||||
return {
|
||||
limit: limit,
|
||||
offset: offset,
|
||||
limit,
|
||||
offset,
|
||||
q: prepareQuery(searchParams.get("filter") ?? ""),
|
||||
};
|
||||
},
|
||||
queryKey: ({ payload }) => organizationMembersKey(id, payload),
|
||||
|
||||
Reference in New Issue
Block a user