thunderbird2docuware/dialog/dialog.html
sylyx 73693fc381 Feature: „bereits abgelegt"-Erkennung + Dedup über Message-ID (v0.10.0)
Erster C2O-Parität-Schritt. Die RFC822-Message-ID wird normalisiert ins Feld
EML_ID geschrieben und zur Dubletten-Erkennung genutzt.

- mail.js: rfcMessageId aus den Mail-Headern
- docuware.js: normalizeMessageId, cabinetFieldNames, getSearchDialogId,
  findByMessageId (DialogExpression, Format gem. Postman-Collection), documentViewUrl
- background.js: ✓-Badge am Nachrichten-Button beim Öffnen (Suche im Standard-
  schrank, Cache, archive:done-Refresh); lädt dafür lib/docuware.js
- dialog: EML_ID beim Upload mitschreiben; „bereits abgelegt"-Banner mit
  „Dokument öffnen"; Dubletten-Warnung beim Ablegen (warnen, „Trotzdem ablegen")

UX-Entscheidung: Prüfung beim Öffnen (1 Schrank) + Duplikat warnen/erlauben.
Schema bestätigt (EML_ID existiert). TB-Runtime-Test steht noch aus.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 09:03:48 +02:00

88 lines
3.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<title>In DocuWare ablegen</title>
<link rel="stylesheet" href="dialog.css" />
</head>
<body>
<div class="titlebar">In DocuWare ablegen</div>
<header>
<h1 id="cabHeading">Ablage</h1>
<div class="toolbar">
<button id="cancel" class="link"> Abbrechen</button>
<button id="reset" class="link">↺ Zurücksetzen</button>
<span class="spacer"></span>
<button id="submit" class="primary">Ablegen</button>
</div>
</header>
<main>
<div id="multiNote" class="muted" style="margin-bottom:8px;"></div>
<div id="archivedBanner" class="banner" hidden>
<span class="banner-text">✓ Diese E-Mail ist bereits in DocuWare abgelegt.</span>
<button id="openExisting" class="link">Dokument öffnen</button>
</div>
<div class="target">
<label for="cabinet">Ziel</label>
<select id="cabinet"><option value="">Lade …</option></select>
</div>
<div class="target" id="dialogRow" style="display:none;">
<label for="storeDialog">Ablagedialog</label>
<select id="storeDialog"></select>
</div>
<div id="fields" class="fields"><div class="muted">Ziel wählen …</div></div>
</main>
<!-- Passwort-Abfrage: nur für diese Sitzung, wird nicht gespeichert. -->
<div id="pwOverlay" class="overlay" hidden>
<div class="overlay-box">
<h2>DocuWare-Anmeldung</h2>
<div id="pwWho" class="muted"></div>
<input type="password" id="pwInput" autocomplete="current-password" placeholder="Passwort" />
<div id="pwErr" class="err"></div>
<div class="overlay-actions">
<button id="pwCancel" class="link">Abbrechen</button>
<button id="pwOk" class="primary">Anmelden</button>
</div>
<div class="muted pw-note">Wird nur für diese Sitzung verwendet und nicht gespeichert.</div>
</div>
</div>
<!-- Dubletten-Abfrage beim Ablegen: warnen, aber „Trotzdem ablegen" erlauben. -->
<div id="dupOverlay" class="overlay" hidden>
<div class="overlay-box">
<h2>⚠ Bereits abgelegt</h2>
<div class="muted">Diese E-Mail liegt in DocuWare offenbar schon im gewählten Ziel.</div>
<div class="overlay-actions">
<button id="dupOpen" class="link">Dokument öffnen</button>
<span class="spacer" style="flex:1"></span>
<button id="dupCancel" class="link">Abbrechen</button>
<button id="dupProceed" class="primary">Trotzdem ablegen</button>
</div>
</div>
</div>
<footer>
<section class="options">
<label class="radio"><input type="radio" name="scope" value="both" checked /> E-Mail und Anhänge</label>
<label class="radio"><input type="radio" name="scope" value="att" /> Nur Anhänge</label>
<label class="radio"><input type="radio" name="scope" value="eml" /> Nur E-Mail</label>
<label class="check"><input type="checkbox" id="optPdf" /> Zusätzlich als PDF ablegen</label>
<ul id="attList" class="att-list"></ul>
</section>
<div id="status" class="muted"></div>
</footer>
<script src="../lib/store.js"></script>
<script src="../lib/auth.js"></script>
<script src="../lib/docuware.js"></script>
<script src="../lib/mail.js"></script>
<script src="../lib/pdf.js"></script>
<script src="dialog.js"></script>
</body>
</html>