feat: enhance user service with role assignment and frontend scroll-area ref support
- Updated `users.service.ts` to assign user roles dynamically based on RBAC. - Enhanced JWT generation to include the user's role in `auth.service.ts`. - Added `viewportRef` prop support to `ScrollArea` component in the frontend for improved flexibility.
This commit is contained in:
@@ -8,8 +8,11 @@ import { cn } from "@/lib/utils";
|
||||
function ScrollArea({
|
||||
className,
|
||||
children,
|
||||
viewportRef,
|
||||
...props
|
||||
}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
|
||||
}: React.ComponentProps<typeof ScrollAreaPrimitive.Root> & {
|
||||
viewportRef?: React.Ref<HTMLDivElement>;
|
||||
}) {
|
||||
return (
|
||||
<ScrollAreaPrimitive.Root
|
||||
data-slot="scroll-area"
|
||||
@@ -18,6 +21,7 @@ function ScrollArea({
|
||||
>
|
||||
<ScrollAreaPrimitive.Viewport
|
||||
data-slot="scroll-area-viewport"
|
||||
ref={viewportRef}
|
||||
className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
|
||||
>
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user