Member management in the Admin Dashboard is divided across three panels rendered inside the two-column grid inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/asubap/website/llms.txt
Use this file to discover all available pages before exploring further.
Admin.tsx: General Members (active roster), Archived Members (soft-deleted), and Alumni Members (read-only). All three share the same GET /users/summary source of truth for active users, but each panel fetches and manages its own slice of data independently. The General Members panel is the most interactive — it supports search, rank filtering, inline profile editing, and soft-archiving. Archived Members supports restore. Alumni is display-only with a search filter. Together they implement a full member lifecycle: onboarding → active → archived → (optionally) permanently deleted.
Rank System
Members carry one of three rank values stored in the database. The frontend capitalizes rank values fromGET /users/summary before displaying them:
| Raw API Value | Display Label | Meaning |
|---|---|---|
pledge | Pledge | Prospective/probationary member |
inducted | Inducted | Full chapter member |
alumni | Alumni | Graduated member |
MemberRank type is exported from src/types/index.ts:
Role Values
In addition to rank, each user has arole that determines system access:
| Value | Description |
|---|---|
e-board | Full admin access to the dashboard |
general-member | Standard chapter member |
sponsor-admin | Sponsor portal access only |
POST /users/update-role.
General Members Panel
The General Members panel renders theEmailList component with userType="member", useArchiveForDelete={true}, and showRankFilter={true}.
Data Loading
fetchMembers() in Admin.tsx calls GET /users/summary and filters to role === "general-member":
{ email: string; name?: string; role: string; rank?: string }.
Search and Filter
EmailList provides a SearchInput that filters on name || email (case-insensitive substring). When showRankFilter={true}, a <select> dropdown appears with options All Ranks, Inducted, and Pledge. Rank filtering compares against the capitalized rank string stored in each member object.
Adding Members
Clicking + New Member opensAddUserModal configured with role="general-member". The modal accepts one or more email addresses — users type an address and press space or comma to stage it as a pending chip. On submit, each email is sent individually to POST /users/add-user:
Promise.allSettled — successful emails are passed to onUserAdded, failed ones generate an error toast. Addition is preceded by a ConfirmDialog:
AddUserModal validates each email against the regex /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/ before staging it. Duplicate emails within the same batch are also rejected.Editing a Member Profile
Click the edit icon (⋯) on any member row
handleEditClick in EmailList calls the parent’s onEdit(email) prop, which triggers handleMemberEdit(email) in Admin.tsx.Admin.tsx fetches full MemberDetail
If the email is not already in the
memberDetails cache (keyed by email.trim().toLowerCase()), GET /member-info/:email is called. The raw API response is normalized into a MemberDetail object:AdminMemberEditModal opens
EmailList renders AdminMemberEditModal with profileData={memberDetails[emailToEdit]}. While profileData is null (still loading), the modal shows a spinner overlay.User edits fields and saves
AdminMemberEditModal delegates its form UI to the shared ProfileEditModal component with showRank={true}. On save, it calls two endpoints sequentially:POST /member-info/edit-member-info/— updates name, phone, major, graduating_year, status, about, rankPOST /users/update-role— only fired ifupdatedData.role !== profileData.role
Editable MemberDetail Fields
| Field | API Key | Notes |
|---|---|---|
name | name | Full display name |
phone | phone | Phone number string |
major | major | Academic major |
graduationDate | graduating_year | Sent as string, stored as year |
status | member_status | e.g., “Looking for Internship” |
about | about | Bio / description |
rank | member_rank | pledge, inducted, or alumni |
role | role | Sent separately to /users/update-role |
Archived Members Panel
The Archived Members panel renders theArchivedMembersList component, which manages its own fetch lifecycle via memberArchiveService.ts.
Archive Flow (Active → Archived)
When a user clicks the delete icon in the General MembersEmailList with useArchiveForDelete={true}, an ArchiveConfirmDialog appears:
handleArchiveMember in Admin.tsx calls the service:
deleted_at to the current timestamp. The member is removed from the active members[] state immediately for responsiveness, then onArchiveSuccess triggers a refresh of the ArchivedMembersList.
Restore Flow (Archived → Active)
ArchivedMembersList fetches from GET /member-info/archived on mount (and re-fetches whenever session changes). Each archived entry shows a RotateCcw (restore) icon. Clicking it opens a RestoreConfirmDialog. On confirm:
- The member is removed from
archivedMembers[]local state. onMemberRestored()prop fires, callingfetchMembers()inAdmin.tsxto re-add the member to the active list.
ArchivedMember Type
Refresh Coordination
Admin.tsx uses a state-stored callback pattern to allow ArchivedMembersList to expose its internal fetchArchivedMembers function to the parent:
Alumni Members Panel
AlumniMembersList is a read-only panel that fetches from a dedicated alumni summary endpoint:
MemberDetail[]. The component provides a SearchInput filtering on ${name} ${email} but does not support editing, archiving, or any write operations from this view.
MemberDetail Type Reference
API Reference
| Operation | Method | Endpoint | Body |
|---|---|---|---|
| List all users | GET | /users/summary | — |
| Get full profile | GET | /member-info/:email | — |
| Edit member info | POST | /member-info/edit-member-info/ | { user_email, name, phone, major, graduating_year, member_status, about, member_rank } |
| Update role | POST | /users/update-role | { user_email, role } |
| Archive member | POST | /member-info/:email/archive | — |
| Restore member | POST | /member-info/:email/restore | — |
| List archived | GET | /member-info/archived | — |
| List alumni | GET | /member-info/alumni/summary | — |
| Add user | POST | /users/add-user | { user_email, role } |
| Delete user | POST | /users/delete-user | { user_email } |