-
Notifications
You must be signed in to change notification settings - Fork 2
feat(company): Implement team member role system and pending invitation handling #328
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
Conversation
…on handling - Replace 'member' role with 'viewer' role across member management APIs - Add usePendingInvitationRedirect hook for handling pending team invitations - Integrate pending invitation redirect logic into analytics, events, and hackathons pages - Add loading states while checking invitation status on company dashboard pages - Update team invitation email template with improved formatting - Enhance TeamManagement component with role-based access controls - Update company member service to support new viewer role permissions - Fix brand name capitalization from "CodeUnia" to "Codeunia" in invitation messaging - Add comprehensive role documentation in company FAQ - Improve company layout with better context management and loading states
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. WalkthroughThis PR updates the company membership system by replacing "member" role terminology with "viewer," changing "invited" status to "pending," introducing a new Changes
Sequence DiagramsequenceDiagram
participant User
participant Dashboard as Dashboard Page
participant Hook as usePendingInvitationRedirect
participant Context as Company Context
participant Router as Next.js Router
User->>Dashboard: Navigate to dashboard page
Dashboard->>Hook: Call usePendingInvitationRedirect()
Hook->>Context: Read currentCompany, userCompanies, loading
alt Loading in progress
Hook->>Dashboard: Return false (still loading)
Dashboard->>User: Render spinner
else Company exists & loaded
Hook->>Hook: Find membership for current company
alt Membership status === 'pending'
Hook->>Router: Redirect to accept-invitation
Hook->>Dashboard: Return true (pending)
Dashboard->>User: Render spinner
Router->>User: Navigate to accept-invitation page
else Membership not pending
Hook->>Dashboard: Return false
Dashboard->>User: Render page content normally
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (17)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Authored by: @akshay0611
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Updates