- Notifications
You must be signed in to change notification settings - Fork1.1k
feat: manage groups from deployment settings for single-org deployments#14016
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
4c840c75346d8e29dffc57999b9201371ecf29bae021ce3679ed77d4File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -6,18 +6,18 @@ import type { | ||
| PatchGroupRequest, | ||
| } from "api/typesGenerated"; | ||
| type GroupSortOrder = "asc" | "desc"; | ||
| const getGroupQueryKey = (organizationId: string, groupName: string) => [ | ||
| "organization", | ||
| organizationId, | ||
| "group", | ||
| groupName, | ||
| ]; | ||
| export const groups = (organizationId: string) => { | ||
| return { | ||
| queryKey:["organization", organizationId, "groups"], | ||
aslilac marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| queryFn: () => API.getGroups(organizationId), | ||
| } satisfies UseQueryOptions<Group[]>; | ||
| }; | ||
| @@ -97,7 +97,11 @@ export const createGroup = ( | ||
| mutationFn: (request: CreateGroupRequest) => | ||
| API.createGroup(organizationId, request), | ||
| onSuccess: async () => { | ||
| await queryClient.invalidateQueries([ | ||
| "organization", | ||
| organizationId, | ||
| "groups", | ||
| ]); | ||
| }, | ||
| }; | ||
| }; | ||
| @@ -146,7 +150,7 @@ export const invalidateGroup = ( | ||
| groupId: string, | ||
| ) => | ||
| Promise.all([ | ||
| queryClient.invalidateQueries(["organization", organizationId, "groups"]), | ||
| queryClient.invalidateQueries(getGroupQueryKey(organizationId, groupId)), | ||
| ]); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -50,7 +50,7 @@ import { isEveryoneGroup } from "utils/groups"; | ||
| import { pageTitle } from "utils/page"; | ||
| export const GroupPage: FC = () => { | ||
| const { organization = "default", groupName } = useParams() as { | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I see the constant "default" used in multiple places. We should define it in a MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. personally, I really dread adding imports like that which end up being more typing that the thing you could just say directly | ||
| organization: string; | ||
| groupName: string; | ||
| }; | ||
This file was deleted.
Uh oh!
There was an error while loading.Please reload this page.