Files
paliad/internal/handlers/projects_pages.go
m 49c6bc75ca refactor(rename): handler functions, routes, legacy 301 redirects
Second rename pass closing the backend cleanup:

* handler functions (handleListProjekte, handleCreateFrist, …) renamed
  to English equivalents so every symbol in the handler package matches
  the URL/entity it serves.
* services.FristStatusFilter + filter constants renamed to
  DeadlineStatusFilter / DeadlineFilterOverdue etc.
* services.TerminListFilter / TerminCalDAVPusher / TerminSummaryCounts
  renamed to AppointmentListFilter / AppointmentCalDAVPusher /
  AppointmentSummaryCounts.
* GlossarTerm/GlossarSuggestion/glossarTerms → Glossary*.
* CourtsFeedback/CourtsResponse (formerly Gerichte*).
* handlers.Services.{Projekt,Parteien,Frist,Termin,Notiz,Dezernat} →
  {Project,Party,Deadline,Appointment,Note,Department}; dbServices
  struct + consumers likewise.
* email templates: {{.FristURL}} → {{.DeadlineURL}}, {{.FristenURL}} →
  {{.DeadlinesURL}}.
* links.go category IDs: gerichte → courts.
* cmd/server/main.go local vars: projektSvc/terminSvc/dezernatSvc →
  projectSvc/appointmentSvc/departmentSvc.

Routes:
* removed all /api/akten alias routes (API clients use /api/projects now).
* removed /api/akten/*/deadlines, /*/notes, /*/parties, /*/appointments,
  /*/checklists, /*/events, /*/summary alias variants.
* new internal/handlers/redirects.go registers 301 Moved Permanently
  redirects for every legacy German GET path: /akten, /projekte, /fristen,
  /termine, /notizen, /einstellungen, /checklisten, /dezernate, /parteien,
  /gerichte, /glossar. Sub-paths + query strings are preserved so old
  bookmarks keep working.

Kept in German (product names, per task spec):
* /tools/fristenrechner, /tools/kostenrechner, /tools/gebuehrentabellen
* FristenrechnerService / KostenrechnerService types
* User.Dezernat + paliad.users.dezernat free-text legacy column (separate
  from the new paliad.departments entity).

go build / vet / test clean.
2026-04-20 17:40:55 +02:00

27 lines
967 B
Go

package handlers
import "net/http"
// Server-rendered page endpoints for the Akten UI.
//
// Like the rest of Paliad, pages are statically generated at build time
// (bun run build) and served from disk; per-page client TS bundles call the
// JSON APIs in akten.go to populate the DOM.
//
// Sub-routes (/akten/{id}/events, /deadlines, /appointments, /documents, /parties,
// /notes) all serve the same detail HTML; client JS reads window.location to
// pick the initial tab. Deadlines/Appointments/Dokumente/Notes tabs currently show
// a "Coming Soon — Phase X" panel in the client until later phases land.
func handleProjectsListPage(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "dist/akten.html")
}
func handleProjectsNewPage(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "dist/akten-neu.html")
}
func handleProjectsDetailPage(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "dist/akten-detail.html")
}