<%- include('partials/head') %> <%- include('partials/header') %>
<% var zeigeDashboard = !(typeof setupWizard !== 'undefined' && setupWizard && setupWizard.aktiv); %> <%- include('partials/bewerbung-favoriten') %> <% if (!zeigeDashboard) { %> <%- include('partials/einrichtung') %> <% } %>
<% if (typeof kommendeTermine !== 'undefined' && kommendeTermine && kommendeTermine.length) { %>

Anstehende Termine

    <% kommendeTermine.forEach(function(t){ var when = t.ganztags ? new Date(t.start).toLocaleDateString('de-DE', { timeZone: caldavTz, weekday: 'short', day: '2-digit', month: '2-digit', year: 'numeric' }) : new Date(t.start).toLocaleString('de-DE', { timeZone: caldavTz, weekday: 'short', day: '2-digit', month: '2-digit', hour: '2-digit', minute: '2-digit' }); %>
  • <%= t.typ === 'vorstellungsgespraech' ? 'Gespräch' : 'Termin' %> <%= t.titel %>

    <%= when %> Uhr<% if (t.bewerbung_firma) { %> · <%= t.bewerbung_firma %><% } %>

    <% if (t.bewerbung_id) { %> Öffnen <% } %>
  • <% }); %>
<% } %> <% // Status-Reihenfolge synchron zu public/js/main.js halten. Steht hier oben, // weil sowohl die Liste als auch die Aktivitäten weiter unten sie brauchen. const statusOrder = ['Entwurf', 'Gesendet', 'Eingangsbestätigung', 'In Bearbeitung', 'Interessiert', 'Warten auf Rückmeldung', 'Warten auf meine Antwort', 'Vorstellungsgespräch', 'Vertragsverhandlung', 'Einstellung', 'Absage', 'Absage von meiner Seite', 'Keine Rückmeldung']; const statusDot = { 'Entwurf': 'bg-purple-500', 'Gesendet': 'bg-indigo-500', 'Eingangsbestätigung': 'bg-blue-500', 'In Bearbeitung': 'bg-teal-500', 'Interessiert': 'bg-pink-500', 'Warten auf Rückmeldung': 'bg-orange-500', 'Warten auf meine Antwort': 'bg-fuchsia-500', 'Vorstellungsgespräch': 'bg-yellow-500', 'Vertragsverhandlung': 'bg-lime-500', 'Einstellung': 'bg-green-500', 'Absage': 'bg-red-500', 'Absage von meiner Seite': 'bg-rose-500', 'Keine Rückmeldung': 'bg-gray-400', 'Ohne Status': 'bg-gray-300' }; %>

Bewerbungen

<%= statistics.total %> <%= statistics.total === 1 ? 'Bewerbung' : 'Bewerbungen' %> gesamt

Datum Firma Stelle Art Status Aktionen
<% if (applications.length > 0) { %> <% const groups = {}; applications.forEach(a => { const key = (a.status && a.status.trim()) ? a.status.trim() : 'Ohne Status'; (groups[key] = groups[key] || []).push(a); }); const orderedKeys = [ ...statusOrder.filter(s => groups[s]), ...Object.keys(groups).filter(k => !statusOrder.includes(k)) ]; %>
<% orderedKeys.forEach(statusKey => { %>
<% groups[statusKey].forEach(app => { %> <% const hatNotizen = app.notizen && app.notizen.trim().length > 0; const hatInterne = app.interne_notizen && app.interne_notizen.trim().length > 0; const hatVerlauf = app.verlauf && app.verlauf.length > 0; const hatDetails = hatNotizen || hatInterne || hatVerlauf; %>
<% if (hatDetails) { %> <% } %> <%= new Date(app.datum).toLocaleDateString('de-DE') %> <%= app.firma %> <%= app.stelle %> <% if (app.labelsArr && app.labelsArr.length) { %> <%- include('partials/labelChips', { labels: app.labelsArr }) %> <% } %> <%= app.art || '-' %> <%= app.status || '-' %> <%- include('partials/favorit-button', { j: app, endpoint: '/api/bewerbungen/' + app.id + '/favorit', compact: true }) %>
<% if (hatDetails) { %>
<% if (hatVerlauf) { %>
Status-Verlauf
    <% app.verlauf.forEach(v => { %>
  1. <%= new Date(v.datum).toLocaleDateString('de-DE') %> <%= v.status %> <% if (v.kommentar && v.kommentar.trim()) { %> – <%= v.kommentar %> <% } %>
  2. <% }); %>
<% } %> <% if (hatNotizen) { %>
Notizen

<%= app.notizen %>

<% } %> <% if (hatInterne) { %>
Interne Notizen · nicht im PDF

<%= app.interne_notizen %>

<% } %>
<% } %>
<% }); %>
<% }); %>
<% } else { %>

Keine Bewerbungen gefunden.

Klicken Sie auf "Bewerbung hinzufügen", um Ihre erste Bewerbung einzutragen.

<% } %>

Letzte Aktivitäten

Alle
<% if (aktivitaet && aktivitaet.length) { %> <% } else { %>
Noch keine Statusänderungen protokolliert.
<% } %>
<%- include('partials/footer') %> <%- include('partials/favorit-script') %>