feature: button and badge components updated.
This commit is contained in:
@@ -16,10 +16,11 @@ import {
|
||||
formatAccessSummary,
|
||||
type FeaturePermState,
|
||||
} from './staff-permission-form';
|
||||
import { UserPlus, Pencil, Trash2, Copy, Check, X, Clock3 } from 'lucide-react';
|
||||
import { Pencil, Trash2, Copy, Check, X } from 'lucide-react';
|
||||
import { useAuth } from '@/lib/hooks/useAuth';
|
||||
import { staffApi, type StaffMemberDto } from '@/lib/api/staff';
|
||||
import { Button } from '@/components/ui/common/Button';
|
||||
import { Badge } from '@/components/ui/common/Badge';
|
||||
import { Input } from '@/components/ui/common/Input';
|
||||
import { Checkbox } from '@/components/ui/common/Checkbox';
|
||||
import type { ApiError } from '@/types/api';
|
||||
@@ -335,7 +336,6 @@ export default function StaffPage() {
|
||||
className="shrink-0"
|
||||
title={!canEdit ? 'Read-only access for this organization.' : undefined}
|
||||
>
|
||||
<UserPlus className="w-4 h-4 mr-2" />
|
||||
Invite member
|
||||
</Button>
|
||||
</div>
|
||||
@@ -410,14 +410,7 @@ export default function StaffPage() {
|
||||
}
|
||||
}}
|
||||
>
|
||||
{copiedInviteMembershipId === lastInviteInfo.membershipId ? (
|
||||
<Check className="w-4 h-4" />
|
||||
) : (
|
||||
<Copy className="w-4 h-4" />
|
||||
)}
|
||||
<span className="ml-1">
|
||||
{copiedInviteMembershipId === lastInviteInfo.membershipId ? 'Copied' : 'Copy link'}
|
||||
</span>
|
||||
{copiedInviteMembershipId === lastInviteInfo.membershipId ? 'Copied' : 'Copy link'}
|
||||
</Button>
|
||||
</div>
|
||||
<p className="text-xs text-text-muted">
|
||||
@@ -438,7 +431,7 @@ export default function StaffPage() {
|
||||
<th className="p-3 font-medium">Name</th>
|
||||
<th className="p-3 font-medium">Email</th>
|
||||
<th className="p-3 font-medium">Role</th>
|
||||
<th className="p-3 font-medium">Status</th>
|
||||
<th className="p-3 font-medium text-center">Status</th>
|
||||
<th className="p-3 font-medium">Access</th>
|
||||
<th className="p-3 font-medium w-28">Actions</th>
|
||||
</tr>
|
||||
@@ -455,20 +448,13 @@ export default function StaffPage() {
|
||||
<span className="text-text-secondary">Staff</span>
|
||||
)}
|
||||
</td>
|
||||
<td className="p-3 align-middle">
|
||||
<td className="p-3 align-middle text-center">
|
||||
{m.isOwner || m.invitationStatus === 'ACTIVE' ? (
|
||||
<span className="inline-flex items-center rounded-full border border-emerald-600/40 bg-emerald-600/15 px-2 py-0.5 text-xs text-emerald-400">
|
||||
Active
|
||||
</span>
|
||||
<Badge variant="success">Active</Badge>
|
||||
) : m.invitationStatus === 'PENDING' ? (
|
||||
<span className="inline-flex items-center gap-1 rounded-full border border-amber-500/40 bg-amber-500/15 px-2 py-0.5 text-xs text-amber-300">
|
||||
<Clock3 className="h-3 w-3" />
|
||||
Pending
|
||||
</span>
|
||||
<Badge variant="warning">Pending</Badge>
|
||||
) : (
|
||||
<span className="inline-flex items-center rounded-full border border-red-500/40 bg-red-500/15 px-2 py-0.5 text-xs text-red-300">
|
||||
Expired
|
||||
</span>
|
||||
<Badge variant="danger">Expired</Badge>
|
||||
)}
|
||||
</td>
|
||||
<td className="p-3 text-text-secondary max-w-md">
|
||||
|
||||
Reference in New Issue
Block a user