+
+ ⌕
+ setSearch(e.target.value)}
+ style={{
+ background: 'none', border: 'none', outline: 'none',
+ fontSize: 13, color: PURPLE, fontFamily: 'inherit',
+ flex: 1, opacity: search ? 1 : 0.6,
+ }}
+ />
+
+
+
+ {loading && (
+
+ Loading…
+
+ )}
+ {error && (
+
+ {error}
+
+ )}
+ {!loading && filtered.map((u, i) => {
+ const busy = approvingId === u.id || makingAdminId === u.id || deletingId === u.id;
+ const isLastRow = i === filtered.length - 1;
+
+ return (
+
+ {/* Name */}
+
+
+ {monogram(u.name)}
+
+ {u.name}
+
+
+ {/* Email */}
+ {u.email}
+
+ {/* Role badge */}
+
+
+ {u.isAdmin ? 'admin' : 'employee'}
+
+
+
+ {/* Status */}
+
+
+ {u.isApproved ? 'Active' : 'Pending'}
+
+
+ {/* Actions */}
+
+ {!u.isApproved && (
+ confirmAdminId !== u.id && confirmDeleteId !== u.id && (
+
+ )
+ )}
+
+ {confirmAdminId === u.id ? (
+ <>
+ Make admin?
+
+
+ >
+ ) : confirmDeleteId === u.id ? (
+ <>
+ Delete?
+
+
+ >
+ ) : (
+ <>
+ {!u.isAdmin && (
+
+ )}
+
+ >
+ )}
+
+
+ );
+ })}
+ {!loading && filtered.length === 0 && !error && (
+
+ {search ? 'No users match your search.' : 'No users found.'}
+
+ )}
+