feat(timetracking): Implement time tracking module with frontend views, HTML templates, and database migrations
- Added FastAPI router for time tracking views including dashboard, wizard, and orders.
- Created HTML templates for the time tracking wizard with responsive design and Bootstrap integration.
- Developed SQL migration script for the time tracking module, including tables for customers, cases, time entries, orders, and audit logs.
- Introduced a script to list all registered routes, focusing on time tracking routes.
- Added test script to verify route registration and specifically check for time tracking routes.
2025-12-09 22:46:30 +01:00
|
|
|
"""
|
|
|
|
|
Frontend Views Router for Time Tracking Module
|
|
|
|
|
===============================================
|
|
|
|
|
|
|
|
|
|
HTML page handlers for time tracking UI.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
import logging
|
|
|
|
|
from fastapi import APIRouter, Request
|
2025-12-13 12:06:28 +01:00
|
|
|
from fastapi.templating import Jinja2Templates
|
|
|
|
|
from fastapi.responses import HTMLResponse
|
feat(timetracking): Implement time tracking module with frontend views, HTML templates, and database migrations
- Added FastAPI router for time tracking views including dashboard, wizard, and orders.
- Created HTML templates for the time tracking wizard with responsive design and Bootstrap integration.
- Developed SQL migration script for the time tracking module, including tables for customers, cases, time entries, orders, and audit logs.
- Introduced a script to list all registered routes, focusing on time tracking routes.
- Added test script to verify route registration and specifically check for time tracking routes.
2025-12-09 22:46:30 +01:00
|
|
|
|
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
|
|
|
|
router = APIRouter()
|
2025-12-13 12:06:28 +01:00
|
|
|
templates = Jinja2Templates(directory="app")
|
feat(timetracking): Implement time tracking module with frontend views, HTML templates, and database migrations
- Added FastAPI router for time tracking views including dashboard, wizard, and orders.
- Created HTML templates for the time tracking wizard with responsive design and Bootstrap integration.
- Developed SQL migration script for the time tracking module, including tables for customers, cases, time entries, orders, and audit logs.
- Introduced a script to list all registered routes, focusing on time tracking routes.
- Added test script to verify route registration and specifically check for time tracking routes.
2025-12-09 22:46:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
@router.get("/timetracking", response_class=HTMLResponse, name="timetracking_dashboard")
|
|
|
|
|
async def timetracking_dashboard(request: Request):
|
|
|
|
|
"""Time Tracking Dashboard - oversigt og sync"""
|
2025-12-13 12:06:28 +01:00
|
|
|
return templates.TemplateResponse("timetracking/frontend/dashboard.html", {"request": request})
|
feat(timetracking): Implement time tracking module with frontend views, HTML templates, and database migrations
- Added FastAPI router for time tracking views including dashboard, wizard, and orders.
- Created HTML templates for the time tracking wizard with responsive design and Bootstrap integration.
- Developed SQL migration script for the time tracking module, including tables for customers, cases, time entries, orders, and audit logs.
- Introduced a script to list all registered routes, focusing on time tracking routes.
- Added test script to verify route registration and specifically check for time tracking routes.
2025-12-09 22:46:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
@router.get("/timetracking/wizard", response_class=HTMLResponse, name="timetracking_wizard")
|
|
|
|
|
async def timetracking_wizard(request: Request):
|
|
|
|
|
"""Time Tracking Wizard - step-by-step approval"""
|
2025-12-13 12:06:28 +01:00
|
|
|
return templates.TemplateResponse("timetracking/frontend/wizard.html", {"request": request})
|
feat(timetracking): Implement time tracking module with frontend views, HTML templates, and database migrations
- Added FastAPI router for time tracking views including dashboard, wizard, and orders.
- Created HTML templates for the time tracking wizard with responsive design and Bootstrap integration.
- Developed SQL migration script for the time tracking module, including tables for customers, cases, time entries, orders, and audit logs.
- Introduced a script to list all registered routes, focusing on time tracking routes.
- Added test script to verify route registration and specifically check for time tracking routes.
2025-12-09 22:46:30 +01:00
|
|
|
|
|
|
|
|
|
2026-01-10 01:37:08 +01:00
|
|
|
@router.get("/timetracking/wizard2", response_class=HTMLResponse, name="timetracking_wizard_v2")
|
|
|
|
|
async def timetracking_wizard_v2(request: Request):
|
|
|
|
|
"""Time Tracking Wizard V2 - simplified approval"""
|
|
|
|
|
return templates.TemplateResponse("timetracking/frontend/wizard2.html", {"request": request})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@router.get("/timetracking/registrations", response_class=HTMLResponse, name="timetracking_registrations")
|
|
|
|
|
async def timetracking_registrations(request: Request):
|
|
|
|
|
"""Time Tracking Registrations - list view"""
|
|
|
|
|
return templates.TemplateResponse("timetracking/frontend/registrations.html", {"request": request})
|
|
|
|
|
|
|
|
|
|
|
2025-12-10 18:29:13 +01:00
|
|
|
@router.get("/timetracking/customers", response_class=HTMLResponse, name="timetracking_customers")
|
|
|
|
|
async def timetracking_customers(request: Request):
|
|
|
|
|
"""Time Tracking Customers - manage hourly rates"""
|
2025-12-13 12:06:28 +01:00
|
|
|
return templates.TemplateResponse("timetracking/frontend/customers.html", {"request": request})
|
2025-12-10 18:29:13 +01:00
|
|
|
|
|
|
|
|
|
feat(timetracking): Implement time tracking module with frontend views, HTML templates, and database migrations
- Added FastAPI router for time tracking views including dashboard, wizard, and orders.
- Created HTML templates for the time tracking wizard with responsive design and Bootstrap integration.
- Developed SQL migration script for the time tracking module, including tables for customers, cases, time entries, orders, and audit logs.
- Introduced a script to list all registered routes, focusing on time tracking routes.
- Added test script to verify route registration and specifically check for time tracking routes.
2025-12-09 22:46:30 +01:00
|
|
|
@router.get("/timetracking/orders", response_class=HTMLResponse, name="timetracking_orders")
|
|
|
|
|
async def timetracking_orders(request: Request):
|
|
|
|
|
"""Order oversigt"""
|
2025-12-13 12:06:28 +01:00
|
|
|
return templates.TemplateResponse("timetracking/frontend/orders.html", {"request": request})
|
2026-02-10 14:40:38 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
@router.get("/timetracking/service-contract-wizard", response_class=HTMLResponse, name="service_contract_wizard")
|
|
|
|
|
async def service_contract_wizard(request: Request):
|
|
|
|
|
"""Service Contract Migration Wizard"""
|
|
|
|
|
return templates.TemplateResponse("timetracking/frontend/service_contract_wizard.html", {"request": request})
|