t-paliad-025 Phase 3 — frontend rename pass:
File renames (git mv, preserving history):
frontend/src/
akten.tsx → projects.tsx
akten-neu.tsx → projects-new.tsx
akten-detail.tsx → projects-detail.tsx
fristen.tsx → deadlines.tsx
fristen-neu.tsx → deadlines-new.tsx
fristen-detail.tsx → deadlines-detail.tsx
fristen-kalender.tsx → deadlines-calendar.tsx
termine.tsx → appointments.tsx
termine-neu.tsx → appointments-new.tsx
termine-detail.tsx → appointments-detail.tsx
termine-kalender.tsx → appointments-calendar.tsx
einstellungen.tsx → settings.tsx
checklisten*.tsx → checklists*.tsx
gerichte.tsx → courts.tsx
glossar.tsx → glossary.tsx
frontend/src/client/ — same renames, plus notizen.ts → notes.ts.
Render exports renamed (renderAkten → renderProjects, renderFristen →
renderDeadlines, …). build.ts rewired to new names.
Client-side changes:
* fetch() API paths: /api/projekte → /api/projects, /api/fristen →
/api/deadlines, /api/termine → /api/appointments, /api/notizen →
/api/notes, /api/gerichte → /api/courts, /api/glossar → /api/glossary,
/api/dezernate → /api/departments, /api/parteien → /api/parties,
/api/checklisten → /api/checklists. Legacy /api/akten aliases removed.
* Navigation href/template strings: /akten → /projects, /fristen →
/deadlines, /termine → /appointments, /einstellungen → /settings,
/notizen → /notes, /checklisten → /checklists, /gerichte → /courts,
/glossar → /glossary. Nested paths /neu → /new, /verlauf → /events,
/kinder → /children, /kalender → /calendar, /dokumente → /documents.
* Interface names in client TS: Frist → Deadline, Termin → Appointment,
Notiz → Note, Partei → Party, Akte → Project, ProjektMini → ProjectMini,
Dezernat → Department, DezernatMitglied → DepartmentMember.
* JSON wire-format keys follow backend: projekt_id → project_id, akte_id
→ project_id, frist_id → deadline_id, termin_id → appointment_id,
akten_event_id → project_event_id, dezernat_id → department_id,
termin_type → appointment_type.
Go handlers (projects_pages.go, deadlines_pages.go, appointments_pages.go,
checklists.go, courts.go, glossary.go) serve the correctly-named HTML
files from dist/.
Kept German (user-facing i18n + product names):
* i18n keys/strings (src/client/i18n.ts) — DE labels and their keys
* Product names: fristenrechner, kostenrechner, gebuehrentabellen
Build verified: go build / vet / test clean; bun run build clean;
dist/ contains all 26 English-named HTML pages.
27 lines
976 B
Go
27 lines
976 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/projects.html")
|
|
}
|
|
|
|
func handleProjectsNewPage(w http.ResponseWriter, r *http.Request) {
|
|
http.ServeFile(w, r, "dist/projects-new.html")
|
|
}
|
|
|
|
func handleProjectsDetailPage(w http.ResponseWriter, r *http.Request) {
|
|
http.ServeFile(w, r, "dist/projects-detail.html")
|
|
}
|