feat: add all equipment view with sorting, print functionality, and UI improvements
- Add "Всё оборудование" menu item with equipment sorted by inventory number - Add row numbering in all equipment view - Add print functionality for auditory view with "Проверено" column - Hide unnecessary columns (quantity, type, owner) when printing - Make cards full-width and responsive (container-fluid) - Consolidate CSS styles from static/css/index.css to frontend/styles.css - Fix text wrapping in "Расположение" column - Add sort_by_inv parameter to /oboruds/ API endpoint Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,10 +15,12 @@ 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, db: Session = Depends(database.get_db)):
|
||||
def list_oboruds(aud_id: Optional[int] = None, sort_by_inv: bool = False, db: Session = Depends(database.get_db)):
|
||||
query = db.query(models.Oboruds)
|
||||
if aud_id is not None:
|
||||
query = query.filter(models.Oboruds.aud_id == aud_id)
|
||||
if sort_by_inv:
|
||||
query = query.order_by(models.Oboruds.invNumber.asc())
|
||||
return query.all()
|
||||
|
||||
@oboruds.get("/{oborud_id}", response_model=schemas.OborudRead)
|
||||
|
||||
Reference in New Issue
Block a user