Skip to content

Implement team invitation flow#449

Merged
codeZe-us merged 1 commit into
SafeVault:devfrom
codebestia:feat/drips-pr
Apr 28, 2026
Merged

Implement team invitation flow#449
codeZe-us merged 1 commit into
SafeVault:devfrom
codebestia:feat/drips-pr

Conversation

@codebestia
Copy link
Copy Markdown

Description

This PR implements the frontend invitation flow for team management, allowing administrators to invite new HR managers, Payroll managers, and other roles to the organization. It integrates the frontend components with the /api/v1/invitations backend endpoints.

Key Changes

  • API Layer: Created src/lib/api/team.ts with TeamService to handle invitation-related API calls (create, list, resend, delete).
  • Dashboard UI:
    • Added an "Invitations" tab to the Team Management navigation.
    • Integrated InvitationManagement component into the main dashboard page.
    • Implemented state logic for fetching and managing invitations in src/app/(dashboard)/team-management/page.tsx.
  • User Feedback: Added toast notifications for success and failure states using the project's useToast hook and ToastContainer component.

Features

  • Send Invitations: Invite users via email and assign roles (Admin, HR Manager, Payroll Manager, Employee).
  • Manage Invitations: View pending/accepted/expired invitations.
  • Actions: Resend pending invitations or delete existing ones.
  • Real-time Feedback: Success/Error toasts for all invitation actions.

Files Modified

  • src/lib/api/team.ts (New): API service class for team operations.
  • src/app/(dashboard)/team-management/page.tsx: Main dashboard logic for invitation state.
  • src/components/features/team-management/NavigationTabs.tsx: Added "Invitations" navigation item.

Verification

  • Verified that switching to the "Invitations" tab triggers an API call to list invitations.
  • Verified that submitting the invitation form hits POST /api/v1/invitations.
  • Verified success and error toast notifications appear correctly.

Related Issue

Closes #429

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 26, 2026

@codebestia is attempting to deploy a commit to the vestroll's projects Team on Vercel.

A member of the Team first needs to authorize it.

@codebestia codebestia changed the base branch from main to dev April 27, 2026 13:29
@codeZe-us codeZe-us self-requested a review April 28, 2026 12:18
@codeZe-us codeZe-us merged commit 1ad8a62 into SafeVault:dev Apr 28, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build Team Invitations Flow

2 participants