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.
119 lines
6.3 KiB
TypeScript
119 lines
6.3 KiB
TypeScript
import { h } from "./jsx";
|
|
import { Sidebar } from "./components/Sidebar";
|
|
import { Footer } from "./components/Footer";
|
|
|
|
// Interactive instance page. Loads template + instance JSON, renders
|
|
// checkboxes, PATCHes /api/checklist-instances/{id} on every toggle.
|
|
// Reset button POSTs to .../reset.
|
|
export function renderChecklistsInstance(): string {
|
|
return "<!DOCTYPE html>" + (
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title data-i18n="checklisten.instance.title">Checklisten-Instanz — Paliad</title>
|
|
<link rel="stylesheet" href="/assets/global.css" />
|
|
</head>
|
|
<body className="has-sidebar">
|
|
<Sidebar currentPath="/checklists" />
|
|
|
|
<main>
|
|
<section className="tool-page">
|
|
<div className="container">
|
|
<a href="#" id="instance-back" className="checklist-back">
|
|
<span className="checklist-back-arrow">←</span>
|
|
<span data-i18n="checklisten.instance.back">Zurück zur Vorlage</span>
|
|
</a>
|
|
|
|
<div id="instance-loading" className="akten-loading">
|
|
<p data-i18n="checklisten.instance.loading">Lädt…</p>
|
|
</div>
|
|
|
|
<div id="instance-notfound" className="akten-empty" style="display:none">
|
|
<p data-i18n="checklisten.instance.notfound">Instanz nicht gefunden oder keine Berechtigung.</p>
|
|
</div>
|
|
|
|
<div id="instance-body" style="display:none">
|
|
<div className="tool-header checklist-detail-header">
|
|
<div className="checklist-detail-head-row">
|
|
<div className="checklist-instance-titles">
|
|
<div className="checklist-instance-name-row">
|
|
<h1 id="instance-name-display" />
|
|
<input type="text" id="instance-name-edit" className="akten-title-input" maxLength={200} style="display:none" />
|
|
<button id="instance-rename-btn" className="btn-icon" type="button" aria-label="Umbenennen" data-i18n-title="checklisten.instance.rename" title="Umbenennen">
|
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" />
|
|
<path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" />
|
|
</svg>
|
|
</button>
|
|
<button id="instance-name-save" className="btn-primary btn-cta-lime btn-small" type="button" style="display:none" data-i18n="checklisten.instance.rename.save">Speichern</button>
|
|
</div>
|
|
<p className="tool-subtitle" id="instance-template-title"> </p>
|
|
<dl className="checklist-meta" id="instance-meta" />
|
|
</div>
|
|
<div className="checklist-actions">
|
|
<button type="button" id="btn-print" className="btn-ghost" data-i18n="checklisten.print">Drucken</button>
|
|
<button type="button" id="btn-reset" className="btn-ghost" data-i18n="checklisten.reset">Zurücksetzen</button>
|
|
<button type="button" id="btn-feedback" className="btn-suggest">
|
|
<span data-i18n="checklisten.feedback.btn">Feedback</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div className="checklist-progress">
|
|
<div className="checklist-progress-bar">
|
|
<div className="checklist-progress-fill" id="progress-fill" />
|
|
</div>
|
|
<span className="checklist-progress-label" id="progress-label">0 / 0</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="checklist-groups" className="checklist-groups" />
|
|
|
|
<div className="checklist-print-footer">
|
|
<p className="checklist-disclaimer" data-i18n="checklisten.disclaimer">
|
|
Hinweis: Diese Checklisten dienen als Gedächtnisstütze und ersetzen keine Prüfung im Einzelfall. Maßgeblich sind die jeweils geltenden Verfahrensregeln.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
|
|
{/* Feedback modal */}
|
|
<div className="modal-overlay" id="feedback-modal" style="display:none">
|
|
<div className="modal-card">
|
|
<div className="modal-header">
|
|
<h2 data-i18n="checklisten.feedback.title">Feedback zur Checkliste</h2>
|
|
<button className="modal-close" id="modal-close" type="button">×</button>
|
|
</div>
|
|
<form id="feedback-form">
|
|
<div className="form-field">
|
|
<label htmlFor="feedback-type" data-i18n="checklisten.feedback.type">Art</label>
|
|
<select id="feedback-type" required>
|
|
<option value="error" data-i18n="checklisten.feedback.error">Fehler gefunden</option>
|
|
<option value="missing" data-i18n="checklisten.feedback.missing">Fehlender Punkt</option>
|
|
<option value="suggestion" data-i18n="checklisten.feedback.suggestion">Verbesserungsvorschlag</option>
|
|
<option value="other" data-i18n="checklisten.feedback.other">Sonstiges</option>
|
|
</select>
|
|
</div>
|
|
<div className="form-field">
|
|
<label htmlFor="feedback-message" data-i18n="checklisten.feedback.message">Nachricht</label>
|
|
<textarea id="feedback-message" rows={4} required />
|
|
</div>
|
|
<div className="form-actions">
|
|
<button type="button" className="btn-cancel" id="modal-cancel" data-i18n="checklisten.feedback.cancel">Abbrechen</button>
|
|
<button type="submit" className="btn-submit" data-i18n="checklisten.feedback.submit">Absenden</button>
|
|
</div>
|
|
<p className="form-msg" id="feedback-msg" />
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<Footer />
|
|
<script src="/assets/checklisten-instance.js"></script>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|