Pagination Hook (#3494)

* Backend changes for pagination hook + Paginated users table

* Frontend changes for pagination hook

* Fix invited users endpoint

* Fix layout shift & add enter to submit user invites

* mypy

* Cleanup

* Resolve PR concerns & remove UserStatus

* Fix errors

---------

Co-authored-by: hagen-danswer <hagen@danswer.ai>
This commit is contained in:
skylares
2025-01-03 17:32:55 -05:00
committed by GitHub
parent 66f9124135
commit c191e23256
36 changed files with 1237 additions and 644 deletions

View File

@ -6,7 +6,7 @@ from uuid import UUID
from pydantic import BaseModel
from onyx.auth.schemas import UserRole
from onyx.auth.schemas import UserStatus
from onyx.db.models import User
DataT = TypeVar("DataT")
@ -35,7 +35,16 @@ class FullUserSnapshot(BaseModel):
id: UUID
email: str
role: UserRole
status: UserStatus
is_active: bool
@classmethod
def from_user_model(cls, user: User) -> "FullUserSnapshot":
return cls(
id=user.id,
email=user.email,
role=user.role,
is_active=user.is_active,
)
class InvitedUserSnapshot(BaseModel):