feat: add home page with search/unassigned tables; center login card
- Add home view as default: search by inv number, unassigned equipment table with auditory assignment, search results (assigned) table - Add inv_number query param to GET /oboruds/ for backend search - Center login card vertically and horizontally via flexbox Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,12 +15,14 @@ def create_oborud(item: schemas.OborudCreate, db: Session = Depends(database.get
|
||||
return obj
|
||||
|
||||
@oboruds.get("/", response_model=list[schemas.OborudRead])
|
||||
def list_oboruds(aud_id: Optional[int] = None, sort_by_inv: bool = False, unassigned: bool = False, db: Session = Depends(database.get_db)):
|
||||
def list_oboruds(aud_id: Optional[int] = None, sort_by_inv: bool = False, unassigned: bool = False, inv_number: Optional[int] = None, db: Session = Depends(database.get_db)):
|
||||
query = db.query(models.Oboruds)
|
||||
if unassigned:
|
||||
query = query.filter(models.Oboruds.aud_id == None)
|
||||
elif aud_id is not None:
|
||||
query = query.filter(models.Oboruds.aud_id == aud_id)
|
||||
if inv_number is not None:
|
||||
query = query.filter(models.Oboruds.invNumber == inv_number)
|
||||
if sort_by_inv:
|
||||
query = query.order_by(models.Oboruds.invNumber.asc())
|
||||
return query.all()
|
||||
|
||||
Reference in New Issue
Block a user