Confirm before sending; add address + contact to job offers

"Bewerbung senden" now asks for an extra confirmation (with the
recipient) before dispatching.

Job offers gain adresse and ansprechpartner fields — shown, editable,
and carried through the REST API upsert (Swagger updated). Taking an
offer over now writes the employer address (street, number, city) and
the contact person into the application's AI notes (llm_notizen), so the
LLM can use them for the letter's Anschriftfeld and salutation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-04 17:10:13 +02:00
co-authored by Claude Opus 4.8
parent 6a5bdfa6f8
commit 360e04d677
6 changed files with 65 additions and 7 deletions
+2 -1
View File
@@ -360,7 +360,8 @@
Versand über <code><%= mailFrom %></code>. Empfängeradresse eingeben, Betreff und Text prüfen,
Anhänge auswählen und senden.
</p>
<form action="/bewerbung/<%= application.id %>/email/send" method="POST">
<form action="/bewerbung/<%= application.id %>/email/send" method="POST"
onsubmit="return confirm('Bewerbung jetzt verbindlich an ' + (this.to.value.trim() || 'den Empfänger') + ' senden?');">
<label class="block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1">Empfänger (E-Mail)</label>
<input type="email" name="to" required value="<%= application.email_empfaenger || '' %>"
placeholder="personal@unternehmen.de"
+20
View File
@@ -75,6 +75,18 @@
<% if (j.gehalt) { %><%= j.gehalt %><% } %>
</p>
<% } %>
<% if (j.adresse) { %>
<p class="text-sm mt-1 flex items-start gap-1.5 min-w-0">
<span class="text-gray-500 dark:text-gray-400 shrink-0">Anschrift:</span>
<span class="text-gray-700 dark:text-gray-200 break-words whitespace-pre-line"><%= j.adresse %></span>
</p>
<% } %>
<% if (j.ansprechpartner) { %>
<p class="text-sm mt-1 flex items-start gap-1.5 min-w-0">
<span class="text-gray-500 dark:text-gray-400 shrink-0">Ansprechpartner:</span>
<span class="text-gray-700 dark:text-gray-200 break-words"><%= j.ansprechpartner %></span>
</p>
<% } %>
<% if (j.anzeige_datum) { %>
<p class="text-sm mt-1 flex items-center gap-1.5">
<span class="text-gray-500 dark:text-gray-400 shrink-0">Anzeige:</span>
@@ -179,6 +191,14 @@
<span class="text-gray-500 dark:text-gray-400">Ort</span>
<input name="ort" value="<%= j.ort || '' %>" class="mt-1 w-full rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 px-2 py-1.5 text-sm">
</label>
<label class="block text-xs">
<span class="text-gray-500 dark:text-gray-400">Ansprechpartner</span>
<input name="ansprechpartner" value="<%= j.ansprechpartner || '' %>" class="mt-1 w-full rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 px-2 py-1.5 text-sm">
</label>
<label class="block text-xs sm:col-span-2">
<span class="text-gray-500 dark:text-gray-400">Anschrift <span class="text-gray-400">(Straße, Hausnummer, PLZ, Ort — wird bei „Übernehmen“ in die KI-Notizen übernommen)</span></span>
<input name="adresse" value="<%= j.adresse || '' %>" class="mt-1 w-full rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 px-2 py-1.5 text-sm">
</label>
<label class="block text-xs">
<span class="text-gray-500 dark:text-gray-400">Gehalt</span>
<input name="gehalt" value="<%= j.gehalt || '' %>" class="mt-1 w-full rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 px-2 py-1.5 text-sm">
+12
View File
@@ -64,6 +64,18 @@
<% if (j.gehalt) { %><%= j.gehalt %><% } %>
</p>
<% } %>
<% if (j.adresse) { %>
<p class="text-sm mt-1 flex items-start gap-1.5 min-w-0">
<span class="text-gray-500 dark:text-gray-400 shrink-0">Anschrift:</span>
<span class="text-gray-700 dark:text-gray-200 break-words whitespace-pre-line"><%= j.adresse %></span>
</p>
<% } %>
<% if (j.ansprechpartner) { %>
<p class="text-sm mt-1 flex items-start gap-1.5 min-w-0">
<span class="text-gray-500 dark:text-gray-400 shrink-0">Ansprechpartner:</span>
<span class="text-gray-700 dark:text-gray-200 break-words"><%= j.ansprechpartner %></span>
</p>
<% } %>
<% if (j.quelle_url) { %>
<a href="<%= j.quelle_url %>" target="_blank" rel="noopener noreferrer"
class="inline-flex items-center gap-1 text-xs text-blue-600 dark:text-blue-400 hover:underline mt-2 break-all">