- Added a new column `subscriptions_locked` to the `customers` table to manage subscription access. - Implemented a script to create new modules from a template, including updates to various files (module.json, README.md, router.py, views.py, and migration SQL). - Developed a script to import BMC Office subscriptions from an Excel file into the database, including error handling and statistics reporting. - Created a script to lookup and update missing CVR numbers using the CVR.dk API. - Implemented a script to relink Hub customers to e-conomic customer numbers based on name matching. - Developed scripts to sync CVR numbers from Simply-CRM and vTiger to the local customers database.
41 lines
1.5 KiB
Python
41 lines
1.5 KiB
Python
"""
|
|
Frontend Views Router for Time Tracking Module
|
|
===============================================
|
|
|
|
HTML page handlers for time tracking UI.
|
|
"""
|
|
|
|
import logging
|
|
from fastapi import APIRouter, Request
|
|
from fastapi.templating import Jinja2Templates
|
|
from fastapi.responses import HTMLResponse
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
router = APIRouter()
|
|
templates = Jinja2Templates(directory="app")
|
|
|
|
|
|
@router.get("/timetracking", response_class=HTMLResponse, name="timetracking_dashboard")
|
|
async def timetracking_dashboard(request: Request):
|
|
"""Time Tracking Dashboard - oversigt og sync"""
|
|
return templates.TemplateResponse("timetracking/frontend/dashboard.html", {"request": request})
|
|
|
|
|
|
@router.get("/timetracking/wizard", response_class=HTMLResponse, name="timetracking_wizard")
|
|
async def timetracking_wizard(request: Request):
|
|
"""Time Tracking Wizard - step-by-step approval"""
|
|
return templates.TemplateResponse("timetracking/frontend/wizard.html", {"request": request})
|
|
|
|
|
|
@router.get("/timetracking/customers", response_class=HTMLResponse, name="timetracking_customers")
|
|
async def timetracking_customers(request: Request):
|
|
"""Time Tracking Customers - manage hourly rates"""
|
|
return templates.TemplateResponse("timetracking/frontend/customers.html", {"request": request})
|
|
|
|
|
|
@router.get("/timetracking/orders", response_class=HTMLResponse, name="timetracking_orders")
|
|
async def timetracking_orders(request: Request):
|
|
"""Order oversigt"""
|
|
return templates.TemplateResponse("timetracking/frontend/orders.html", {"request": request})
|