- Implemented a new HTML page for generating service contract reports. - Added CSS styles for report layout and components. - Developed JavaScript functionality for loading customers and contracts, fetching report data, and rendering metrics and cases. - Included buttons for downloading reports in PDF and Excel formats. docs: Create Route Auth Audit for route access control - Generated an audit report detailing route access requirements. - Classified routes based on authentication needs and documented them in a markdown file. feat: Introduce buzzwords and mission projects tables in the database - Created `buzzwords` and `sag_buzzwords` tables for managing keywords related to SAG cases. - Established `mission_projects`, `mission_project_milestones`, and `mission_project_blockers` tables for project management. - Updated `sag_sager` table to link with mission projects and milestones, including necessary foreign key constraints.
40 lines
930 B
Python
40 lines
930 B
Python
"""
|
|
Auth Frontend Views - Login page
|
|
"""
|
|
from fastapi import APIRouter, Request
|
|
from fastapi.responses import HTMLResponse
|
|
from fastapi.templating import Jinja2Templates
|
|
|
|
router = APIRouter()
|
|
templates = Jinja2Templates(directory="app")
|
|
|
|
|
|
@router.get("/login", response_class=HTMLResponse)
|
|
async def login_page(request: Request):
|
|
"""
|
|
Render login page
|
|
"""
|
|
return templates.TemplateResponse(
|
|
"auth/frontend/login.html",
|
|
{
|
|
"request": request,
|
|
"hide_top_nav": True,
|
|
"hide_bottom_bar": True,
|
|
}
|
|
)
|
|
|
|
|
|
@router.get("/2fa/setup", response_class=HTMLResponse)
|
|
async def two_factor_setup_page(request: Request):
|
|
"""
|
|
Render 2FA setup page
|
|
"""
|
|
return templates.TemplateResponse(
|
|
"auth/frontend/2fa_setup.html",
|
|
{
|
|
"request": request,
|
|
"hide_top_nav": True,
|
|
"hide_bottom_bar": True,
|
|
}
|
|
)
|