Snapshot: full project state

This commit is contained in:
2026-10-06 23:43:21 -07:00
commit 1551408fc5
37 changed files with 2827 additions and 0 deletions

View File

@@ -0,0 +1,93 @@
{% extends "base.html" %}
{% block title %}Application #{{ application.id }}{% endblock %}
{% block content %}
<h1>Application #{{ application.id }}</h1>
<p class="sub">{{ job.title }} · {{ job.company }} · <span class="badge b-{{ application.status }}">{{ application.status }}</span></p>
<div class="panel">
<h2 style="margin-top:0">Self-Audit (final check before send)</h2>
<table>
<tr><th>Check</th><th>Result</th><th>Detail</th></tr>
{% for c in checks %}
<tr>
<td>{{ c.item }}</td>
<td class="{{ c.result|lower }}">{{ c.result }}</td>
<td class="muted" style="font-size:12px">{{ c.detail }}</td>
</tr>
{% else %}
<tr><td colspan="3" class="muted">No audit run yet.</td></tr>
{% endfor %}
</table>
{% set fails = checks|selectattr('result','equalto','FAIL')|list %}
{% if fails %}<p class="fail" style="margin-top:10px">⚠ {{ fails|length }} check(s) FAILED — fix before sending.</p>{% endif %}
</div>
<div class="panel">
<h2 style="margin-top:0">Email</h2>
<p><strong>Subject:</strong> {{ application.email_subject }}</p>
<p class="muted" style="font-size:12px">Body (plain text):</p>
<pre>{{ application.email_body }}</pre>
</div>
<div class="panel">
<h2 style="margin-top:0">Tailored resume</h2>
{% if application.tailored_pdf %}
<p>
<span class="badge b-sent">One-page PDF</span>
<a class="btn" href="/app/{{ application.id }}/pdf" style="display:inline-block;margin-left:8px">&#8595; Download PDF</a>
</p>
{% endif %}
{% if tailored_text %}
<pre>{{ tailored_text }}</pre>
{% else %}
<p class="muted">No tailored resume generated.</p>
{% endif %}
</div>
<div class="panel">
<h2 style="margin-top:0">Approve &amp; Send</h2>
{% set fails = checks|selectattr('result','equalto','FAIL')|list %}
{% if job.contact_email %}
<p style="margin-top:0">Scraped contact: <strong class="mono">{{ job.contact_email }}</strong></p>
{% else %}
<p class="muted" style="margin-top:0;font-size:12px">No contact email scraped for this job — approving will just mark it approved (open the posting or email manually).</p>
{% endif %}
{% if application.status != 'approved' %}
<form method="post" action="/app/{{ application.id }}/approve" class="inline">
<button class="btn" type="submit" {% if fails %}disabled title="Fix audit FAILs first"{% endif %}>Approve &amp; Auto-Send</button>
</form>
<p class="muted" style="font-size:12px">You review first, then approve. Approving AUTO-SENDS the email to the scraped contact (if found) and marks it Sent.</p>
{% else %}
{% if job.url %}
<div class="panel-inner" style="margin-bottom:14px">
<strong>Apply via the job posting:</strong>
<a class="btn" href="{{ job.url }}" target="_blank" rel="noopener" style="display:inline-block;margin:6px 0">Open Application &#8599;</a>
<form method="post" action="/app/{{ application.id }}/apply" class="inline">
<button class="btn ghost" type="submit">Mark as Applied</button>
</form>
<p class="muted" style="font-size:12px">Most board jobs (Greenhouse/Lever/RemoteOK) are applied through the posting link, not email. Open it, submit there, then hit "Mark as Applied" to track it.</p>
</div>
{% endif %}
<form method="post" action="/app/{{ application.id }}/send" class="flex">
<input name="to_email" placeholder="email a hiring manager directly" value="{{ job.contact_email or '' }}" style="max-width:320px">
<button class="btn ghost" type="submit">Send via Email</button>
</form>
<p class="muted" style="font-size:12px">Email path is optional — only if you have a direct contact. The posting link above is the normal route.</p>
{% endif %}
</div>
<div class="panel">
<h2 style="margin-top:0">Record outcome (self-improvement)</h2>
<form method="post" action="/app/{{ application.id }}/outcome" class="flex">
<select name="stage" style="max-width:180px">
<option value="response">Response received</option>
<option value="interview">Interview scheduled</option>
<option value="offer">Offer</option>
<option value="rejected">Rejected</option>
<option value="no-response">No response</option>
</select>
<input name="notes" placeholder="notes (optional)" style="max-width:320px">
<button class="btn ghost" type="submit">Log</button>
</form>
</div>
{% endblock %}