Export: Zusammenfassung-Sektion, Checkbox-Auswahl, neue Reihenfolge
Research-Briefings: - Neue Sektion ZUSAMMENFASSUNG mit Bullet-Points als erstes Element - UEBERBLICK entfernt, durch ZUSAMMENFASSUNG ersetzt - Inkrementelles Briefing ebenfalls angepasst Export-System: - Zusammenfassung wird direkt aus dem Bericht extrahiert (kein separater KI-Aufruf mehr fuer Research-Lagen) - Reihenfolge: Zusammenfassung > Recherchebericht > Faktencheck > Quellen > Timeline - Sections-basiert statt scope-basiert (rueckwaertskompatibel) - Checkbox-Dialog statt Radio-Buttons im Frontend - Bereiche: Zusammenfassung, Recherchebericht, Faktencheck, Quellen, Timeline, Karte - PDF und DOCX Templates angepasst - Backend akzeptiert sections-Parameter (kommagetrennt)
Dieser Commit ist enthalten in:
@@ -237,9 +237,15 @@ const API = {
|
||||
resetTutorialState() {
|
||||
return this._request('DELETE', '/tutorial/state');
|
||||
},
|
||||
exportReport(id, format, scope) {
|
||||
exportReport(id, format, scope, sections) {
|
||||
const token = localStorage.getItem('osint_token');
|
||||
return fetch(`${this.baseUrl}/incidents/${id}/export?format=${format}&scope=${scope}`, {
|
||||
let url = `${this.baseUrl}/incidents/${id}/export?format=${format}`;
|
||||
if (sections && sections.length > 0) {
|
||||
url += `§ions=${sections.join(',')}`;
|
||||
} else if (scope) {
|
||||
url += `&scope=${scope}`;
|
||||
}
|
||||
return fetch(url, {
|
||||
headers: { 'Authorization': `Bearer ${token}` },
|
||||
});
|
||||
},
|
||||
|
||||
@@ -2284,16 +2284,21 @@ async handleRefresh() {
|
||||
|
||||
async submitExport() {
|
||||
if (!this.currentIncidentId) return;
|
||||
const scope = document.querySelector('input[name="export-scope"]:checked').value;
|
||||
const checked = document.querySelectorAll('input[name="export-section"]:checked');
|
||||
const sections = Array.from(checked).map(cb => cb.value);
|
||||
if (sections.length === 0) {
|
||||
UI.showToast('Bitte mindestens einen Bereich ausw\u00e4hlen.', 'warning');
|
||||
return;
|
||||
}
|
||||
const format = document.querySelector('input[name="export-format"]:checked').value;
|
||||
|
||||
const btn = document.getElementById('export-submit-btn');
|
||||
const origText = btn.textContent;
|
||||
btn.disabled = true;
|
||||
btn.textContent = scope === 'summary' ? 'KI generiert Executive Summary...' : 'Wird erstellt...';
|
||||
btn.textContent = 'Wird erstellt...';
|
||||
|
||||
try {
|
||||
const response = await API.exportReport(this.currentIncidentId, format, scope);
|
||||
const response = await API.exportReport(this.currentIncidentId, format, null, sections);
|
||||
if (!response.ok) {
|
||||
const err = await response.json().catch(() => ({}));
|
||||
throw new Error(err.detail || 'Fehler ' + response.status);
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren