diff --git a/backend/static/event-modal.js b/backend/static/event-modal.js index ec210cf..162bced 100644 --- a/backend/static/event-modal.js +++ b/backend/static/event-modal.js @@ -245,6 +245,47 @@ `; } + function _renderReview(s, eventId) { + const rev = s.review || {}; + const ft = !!rev.false_trigger; + const reviewer = rev.reviewer || ''; + const notes = rev.notes || ''; + const reviewedAt = rev.reviewed_at + ? rev.reviewed_at.replace('T', ' ').slice(0, 19) + : null; + return `
+
+ +
+ + +
+
+
+ + +
+
+ + ${reviewedAt ? `Last reviewed ${reviewedAt}` : 'Not yet reviewed.'} + + +
+
`; + } + // ── Waveform / histogram chart helpers ────────────────────────── async function _loadMicUnitPref() { @@ -527,27 +568,47 @@ const src = s.source || {}; const sizeKb = bw.filesize ? (bw.filesize / 1024).toFixed(1) : null; const canDownloadBinary = !!(bw.available && bw.filename && eventId); + const txtFilename = src && src.txt_filename; + const reportPdfUrl = `/api/sfm/db/events/${encodeURIComponent(eventId)}/report.pdf`; + const reportTxtUrl = `/api/sfm/db/events/${encodeURIComponent(eventId)}/ascii_report.txt`; const downloadButtons = `
+ + + + + + Download PDF + ${canDownloadBinary ? ` + class="inline-flex items-center gap-2 px-3 py-2 border border-gray-300 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-lg text-sm transition-colors"> - Download Blastware file - (${_esc(bw.filename)}${sizeKb ? `, ${sizeKb} KB` : ''}) + Blastware binary + ${sizeKb ? `(${sizeKb} KB)` : ''} - ` : ` - + ` : ''} + ${txtFilename ? ` + - + - Blastware file unavailable - - `} + Original .TXT report + + ` : ''}
+