Add template upload functionality to Schadenprotokoll
- New Templates tab for PDF and Word template management - API endpoints for listing and uploading templates - Automatic backup of old templates before replacement 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,26 +17,23 @@
|
||||
<button class="tab active" data-tab="generate">1. Generieren</button>
|
||||
<button class="tab" data-tab="analyze">2. Auswerten</button>
|
||||
<button class="tab" data-tab="vorbericht">3. Vorbericht</button>
|
||||
<button class="tab" data-tab="admin">⚙️ Templates</button>
|
||||
</div>
|
||||
|
||||
<!-- Tab 1: Generieren -->
|
||||
<div id="generate" class="tab-content active">
|
||||
<div class="info-box">
|
||||
<h4>Schadenlaufzettel → Protokoll PDF</h4>
|
||||
<p>Lädt Daten aus dem Schadenlaufzettel.docx und füllt das Schadenprotokoll-PDF vor.</p>
|
||||
<p>Laedt Daten aus dem Schadenlaufzettel.docx und fuellt das Schadenprotokoll-PDF vor.</p>
|
||||
</div>
|
||||
|
||||
<div class="upload-zone" id="laufzettel-zone">
|
||||
<input type="file" id="laufzettel-input" accept=".docx">
|
||||
<h3>📄 Schadenlaufzettel.docx hochladen</h3>
|
||||
<p>Datei hierher ziehen oder klicken zum Auswählen</p>
|
||||
<p>Datei hierher ziehen oder klicken</p>
|
||||
</div>
|
||||
<div class="file-info" id="laufzettel-info"></div>
|
||||
|
||||
<div class="actions">
|
||||
<button class="btn btn-primary" id="generate-btn" disabled>
|
||||
⚙️ PDF generieren
|
||||
</button>
|
||||
<button class="btn btn-primary" id="generate-btn" disabled>⚙️ PDF generieren</button>
|
||||
</div>
|
||||
<div class="status" id="generate-status"></div>
|
||||
</div>
|
||||
@@ -44,21 +41,17 @@
|
||||
<!-- Tab 2: Auswerten -->
|
||||
<div id="analyze" class="tab-content">
|
||||
<div class="info-box">
|
||||
<h4>Ausgefülltes PDF analysieren</h4>
|
||||
<h4>Ausgefuelltes PDF analysieren</h4>
|
||||
<p>Liest alle Formularfelder und Dropdown-Auswahlen aus dem Schadenprotokoll.</p>
|
||||
</div>
|
||||
|
||||
<div class="upload-zone" id="pdf-zone">
|
||||
<input type="file" id="pdf-input" accept=".pdf">
|
||||
<h3>📋 Schadenprotokoll.pdf hochladen</h3>
|
||||
<p>Das ausgefüllte PDF-Formular</p>
|
||||
<p>Das ausgefuellte PDF-Formular</p>
|
||||
</div>
|
||||
<div class="file-info" id="pdf-info"></div>
|
||||
|
||||
<div class="actions">
|
||||
<button class="btn btn-primary" id="analyze-btn" disabled>
|
||||
🔍 Analysieren
|
||||
</button>
|
||||
<button class="btn btn-primary" id="analyze-btn" disabled>🔍 Analysieren</button>
|
||||
</div>
|
||||
<div class="status" id="analyze-status"></div>
|
||||
<div class="result" id="analyze-result">
|
||||
@@ -71,24 +64,50 @@
|
||||
<div id="vorbericht" class="tab-content">
|
||||
<div class="info-box">
|
||||
<h4>Protokoll → Vorbericht Word</h4>
|
||||
<p>Generiert einen strukturierten Vorbericht aus dem ausgefüllten Schadenprotokoll.</p>
|
||||
<p>Generiert einen strukturierten Vorbericht aus dem ausgefuellten Schadenprotokoll.</p>
|
||||
</div>
|
||||
|
||||
<div class="upload-zone" id="vorbericht-zone">
|
||||
<input type="file" id="vorbericht-input" accept=".pdf">
|
||||
<h3>📋 Ausgefülltes Schadenprotokoll.pdf</h3>
|
||||
<p>Das vollständig ausgefüllte PDF-Formular</p>
|
||||
<h3>📋 Ausgefuelltes Schadenprotokoll.pdf</h3>
|
||||
<p>Das vollstaendig ausgefuellte PDF-Formular</p>
|
||||
</div>
|
||||
<div class="file-info" id="vorbericht-info"></div>
|
||||
|
||||
<div class="actions">
|
||||
<button class="btn btn-primary" id="vorbericht-btn" disabled>
|
||||
📝 Vorbericht erstellen
|
||||
</button>
|
||||
<button class="btn btn-primary" id="vorbericht-btn" disabled>📝 Vorbericht erstellen</button>
|
||||
</div>
|
||||
<div class="status" id="vorbericht-status"></div>
|
||||
</div>
|
||||
|
||||
<!-- Tab 4: Admin/Templates -->
|
||||
<div id="admin" class="tab-content">
|
||||
<div class="info-box">
|
||||
<h4>Template-Verwaltung</h4>
|
||||
<p>Hier kannst du die PDF- und Word-Templates hochladen, die fuer die Generierung verwendet werden.</p>
|
||||
</div>
|
||||
|
||||
<div class="template-list" id="template-list">
|
||||
<h4>Aktuelle Templates:</h4>
|
||||
<div id="templates-container">Lade...</div>
|
||||
</div>
|
||||
|
||||
<div class="template-upload">
|
||||
<h4>Neues Template hochladen:</h4>
|
||||
<div class="upload-row">
|
||||
<div class="upload-zone small" id="pdf-template-zone">
|
||||
<input type="file" id="pdf-template-input" accept=".pdf">
|
||||
<h3>📄 PDF Template</h3>
|
||||
<p>Schadenprotokoll-Vorlage</p>
|
||||
</div>
|
||||
<div class="upload-zone small" id="docx-template-zone">
|
||||
<input type="file" id="docx-template-input" accept=".docx">
|
||||
<h3>📝 Word Template</h3>
|
||||
<p>Vorbericht-Vorlage</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="status" id="admin-status"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<p>Schadenprotokoll Tool v1.0 | artetui.de</p>
|
||||
</footer>
|
||||
|
||||
Reference in New Issue
Block a user