Skip to content

Commit

Permalink
Merge pull request #313 from kloudlite/fix/user-management
Browse files Browse the repository at this point in the history
🐛 Fixed issue with user management
  • Loading branch information
abdheshnayak authored Oct 8, 2024
2 parents 0d5e47d + f7b94aa commit 359bfc8
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
1 change: 1 addition & 0 deletions gql-queries-generator/doc/queries.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1947,6 +1947,7 @@ query consoleListMembershipsForAccount($accountName: String!) {
name
joined
email
id
}
role
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const Teams = ({ setShowUserInvite, searchText, sortTeamMembers }: ITeams) => {
isLoading && searchResp.length === 0
? placeHolderUsers
: sorted.map((i) => ({
id: i.user.email,
id: i.user.id,
name: i.user.name,
role: i.role,
email: i.user.email,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const UserAccessResources = ({
isPendingInvitation: boolean;
}) => {
const [showDeleteDialog, setShowDeleteDialog] = useState<BaseType | null>(
null,
null
);
const [showUserInvite, setShowUserInvite] = useState<BaseType | null>(null);

Expand Down Expand Up @@ -220,7 +220,7 @@ const UserAccessResources = ({
}
}
reloadPage();
toast.success(`${titleCase(RESOURCE_NAME)} deleted successfully`);
toast.success(`${titleCase(RESOURCE_NAME)} removed successfully`);
setShowDeleteDialog(null);
} catch (err) {
handleError(err);
Expand Down
1 change: 1 addition & 0 deletions src/apps/console/server/gql/queries/access-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export const accessQueries = (executor: IExecutor) => ({
name
joined
email
id
}
role
}
Expand Down
12 changes: 6 additions & 6 deletions src/apps/console/server/gql/queries/account-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const accountQueries = (executor: IExecutor) => ({
{
transformer: (data: ConsoleCreateAccountMutation) =>
data.accounts_createAccount,
vars(_: ConsoleCreateAccountMutationVariables) { },
vars(_: ConsoleCreateAccountMutationVariables) {},
}
),
getAvailableKloudliteRegions: executor(
Expand All @@ -46,7 +46,7 @@ export const accountQueries = (executor: IExecutor) => ({
{
transformer: (data: ConsoleGetAvailableKloudliteRegionsQuery) =>
data.accounts_availableKloudliteRegions,
vars(_: ConsoleGetAvailableKloudliteRegionsQueryVariables) { },
vars(_: ConsoleGetAvailableKloudliteRegionsQueryVariables) {},
}
),

Expand All @@ -68,7 +68,7 @@ export const accountQueries = (executor: IExecutor) => ({
{
transformer: (data: ConsoleListAccountsQuery) =>
data.accounts_listAccounts,
vars(_: ConsoleListAccountsQueryVariables) { },
vars(_: ConsoleListAccountsQueryVariables) {},
}
),
updateAccount: executor(
Expand All @@ -82,7 +82,7 @@ export const accountQueries = (executor: IExecutor) => ({
{
transformer: (data: ConsoleUpdateAccountMutation) =>
data.accounts_updateAccount,
vars(_: ConsoleUpdateAccountMutationVariables) { },
vars(_: ConsoleUpdateAccountMutationVariables) {},
}
),
getAccount: executor(
Expand All @@ -103,7 +103,7 @@ export const accountQueries = (executor: IExecutor) => ({
`,
{
transformer: (data: ConsoleGetAccountQuery) => data.accounts_getAccount,
vars(_: ConsoleGetAccountQueryVariables) { },
vars(_: ConsoleGetAccountQueryVariables) {},
}
),
deleteAccount: executor(
Expand All @@ -115,7 +115,7 @@ export const accountQueries = (executor: IExecutor) => ({
{
transformer: (data: ConsoleDeleteAccountMutation) =>
data.accounts_deleteAccount,
vars(_: ConsoleDeleteAccountMutationVariables) { },
vars(_: ConsoleDeleteAccountMutationVariables) {},
}
),
});
8 changes: 7 additions & 1 deletion src/generated/gql/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3592,7 +3592,13 @@ export type ConsoleListMembershipsForAccountQueryVariables = Exact<{
export type ConsoleListMembershipsForAccountQuery = {
accounts_listMembershipsForAccount?: Array<{
role: Github__Com___Kloudlite___Api___Apps___Iam___Types__Role;
user: { verified: boolean; name: string; joined: any; email: string };
user: {
verified: boolean;
name: string;
joined: any;
email: string;
id: string;
};
}>;
};

Expand Down

0 comments on commit 359bfc8

Please sign in to comment.