Skip to content

Commit

Permalink
fixed the add new member error
Browse files Browse the repository at this point in the history
  • Loading branch information
kanhaiya04 committed Apr 17, 2024
1 parent 9f54178 commit ec9afbb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/GraphQl/Mutations/mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,15 @@ export const SIGNUP_MUTATION = gql`
$lastName: String!
$email: EmailAddress!
$password: String!
$orgId: ID!
) {
signUp(
data: {
firstName: $firstName
lastName: $lastName
email: $email
password: $password
selectedOrganization: $orgId
}
) {
user {
Expand Down Expand Up @@ -348,7 +350,9 @@ export const ADD_ADMIN_MUTATION = gql`
export const ADD_MEMBER_MUTATION = gql`
mutation CreateMember($orgid: ID!, $userid: ID!) {
createMember(input: { organizationId: $orgid, userId: $userid }) {
_id
organization {
_id
}
}
}
`;
Expand Down
1 change: 1 addition & 0 deletions src/screens/OrganizationPeople/AddMember.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ function AddMember(): JSX.Element {
lastName: createUserVariables.lastName,
email: createUserVariables.email,
password: createUserVariables.password,
orgId: currentUrl,
},
});
const createdUserId = registeredUser?.data.signUp.user._id;
Expand Down
1 change: 1 addition & 0 deletions src/screens/OrganizationPeople/OrganizationPeople.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ const MOCKS: TestMock[] = [
lastName: 'Talreja',
email: '[email protected]',
password: 'dishatalreja',
orgId: 'orgId',
},
},
result: {
Expand Down

0 comments on commit ec9afbb

Please sign in to comment.