improvement: some new gadgets added to dashboard. some new functionality added to existed gadgets.
This commit is contained in:
20
frontend/src/components/staff/staffRowHighlight.ts
Normal file
20
frontend/src/components/staff/staffRowHighlight.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
export const STAFF_ROW_HIGHLIGHT_CLASS =
|
||||
'relative bg-primary/10 ring-2 ring-inset ring-primary/50 shadow-[0_0_16px_rgba(99,102,241,0.2)]';
|
||||
|
||||
export function parseHighlightMembershipIds(searchParams: URLSearchParams): Set<string> {
|
||||
const raw = searchParams.get('highlightMembershipIds');
|
||||
if (!raw) return new Set();
|
||||
return new Set(
|
||||
raw
|
||||
.split(',')
|
||||
.map((id) => id.trim())
|
||||
.filter(Boolean),
|
||||
);
|
||||
}
|
||||
|
||||
export function isStaffRowHighlighted(
|
||||
membershipId: string,
|
||||
highlightIds: Set<string>,
|
||||
): boolean {
|
||||
return highlightIds.has(membershipId);
|
||||
}
|
||||
Reference in New Issue
Block a user