38686-vm/core/urls.py
Konrad du Plessis 77236dd78f Phase 2B: Enhanced attendance, work history filters, supervisor dashboard
- Attendance form: date range (start+end), Sat/Sun checkboxes, conflict
  detection with Skip/Overwrite, supervisor auto-set, estimated cost card
- Work history: filter by worker/project/payment status, CSV export,
  payment status badges (Paid/Unpaid)
- Supervisor dashboard: stat cards for projects, teams, workers count
- Forms: supervisor filtering (non-admins only see their projects/workers)
- Navbar: History link now works, cleaned up inline styles in base.html
- Management command: setup_groups creates Admin + Work Logger groups
- No model/migration changes — database is untouched

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 16:28:18 +02:00

24 lines
877 B
Python

# === URL ROUTING ===
# Maps URLs to view functions. Each path() connects a web address to
# the Python function that handles it.
from django.urls import path
from . import views
urlpatterns = [
# Dashboard — the home page after login
path('', views.index, name='home'),
# Attendance logging — where supervisors log daily work
path('attendance/log/', views.attendance_log, name='attendance_log'),
# Work history — table of all work logs with filters
path('history/', views.work_history, name='work_history'),
# CSV export — downloads filtered work logs as a spreadsheet
path('history/export/', views.export_work_log_csv, name='export_work_log_csv'),
# AJAX toggle — activates/deactivates workers, projects, teams from dashboard
path('toggle/<str:model_name>/<int:item_id>/', views.toggle_active, name='toggle_active'),
]