lavkach3
1from fastapi import APIRouter, Depends
2from fastapi import Request
3from fastapi.responses import HTMLResponse
4
5from app.front.apps.inventory.views import StoreView
6from app.front.template_spec import templates
7from app.front.utills import BasePermit
8from core.frontend.constructor import ClassView
9
10store_router = APIRouter()
11
12
13@store_router.get("", response_class=HTMLResponse)
14async def store(cls: StoreView = Depends()):
15"""Список складских ордеров"""
16template = f'widgets/list{"" if cls.r.scope["htmx"].hx_request else "-full"}.html'
17return templates.TemplateResponse(cls.r, template, context={'cls': cls})
18
19
20
21