Skip to content
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

feat(UI-1107): invite user to organization #875

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

RonenMars
Copy link
Contributor

@RonenMars RonenMars commented Jan 8, 2025

Description

Add feature of inviting users to organizations.

Linear Ticket

https://linear.app/autokitteh/issue/UI-1107/functionality-invite-user-to-organization

What type of PR is this? (check all applicable)

  • 💡 (feat) - A new feature (non-breaking change which adds functionality)
  • 🔄 (refactor) - Code Refactoring - A code change that neither fixes a bug nor adds a feature
  • 🐞 (fix) - Bug Fix (non-breaking change which fixes an issue)
  • 🏎 (perf) - Optimization
  • 📄 (docs) - Documentation - Documentation only changes
  • 📄 (test) - Tests - Adding missing tests or correcting existing tests
  • 🎨 (style) - Styles - Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • ⚙️ (ci) - Continuous Integrations - Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • ☑️ (chore) - Chores - Other changes that don't modify src or test files
  • ↩️ (revert) - Reverts - Reverts a previous commit(s).

@RonenMars RonenMars force-pushed the ronen/feat/invite-members branch from 8b2823e to e4fe793 Compare January 8, 2025 15:37
@RonenMars RonenMars requested a review from J1za January 8, 2025 16:20
src/components/organisms/settings/organization/members.tsx Outdated Show resolved Hide resolved
src/components/organisms/settings/organization/members.tsx Outdated Show resolved Hide resolved
src/enums/userStatus.enum.ts Outdated Show resolved Hide resolved
src/services/users.service.ts Outdated Show resolved Hide resolved
@RonenMars
Copy link
Contributor Author

  1. add error in the form if the email already invited/exist

@RonenMars RonenMars force-pushed the ronen/feat/invite-members branch from e8633a4 to cc49240 Compare January 9, 2025 15:07
@RonenMars RonenMars requested a review from J1za January 10, 2025 09:20
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

after created member and when reopen modal I see
image

const organizationId = get().currentOrganizationId;
if (!organizationId) {
set((state) => ({ ...state, isLoadingMembers: true }));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
set((state) => ({ ...state, isLoadingMembers: true }));
set((state) => ({ ...state, isLoadingMembers: false }));

@@ -92,11 +109,22 @@ const store: StateCreator<OrganizationStore> = (set, get) => ({
}
const { data: members, error } = await OrganizationsService.listMembers(organizationId);

if (error) {
set((state) => ({ ...state, isLoadingMembers: true }));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
set((state) => ({ ...state, isLoadingMembers: true }));
set((state) => ({ ...state, isLoadingMembers: false }));


return error;
}
set((state) => ({ ...state, membersList: members, isLoadingMembers: true }));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
set((state) => ({ ...state, membersList: members, isLoadingMembers: true }));
set((state) => ({ ...state, membersList: members, isLoadingMembers: false }));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants