Phase 2 part 2: prospects, the review screen and the suppression list

Schema 6 adds prospect_companies, prospect_contacts (merged by domain and
email, each with its source, detail and date) and suppressions. Prospects
-> Review lists New, Accepted and Set aside: accepting a company queues an
EspoCRM Account, a person a Lead at their company, with provenance and
why they fit in the description; the page warns about records already in
the CRM as of the last sync, and shows each accepted prospect's CRM
progress. Prospects can be added by hand. The suppression list (emails
and domains) is checked on add and again before queueing, and suppressing
sets matching new prospects aside. Search finds prospects too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-21 16:51:05 -07:00
co-authored by Claude Opus 5.5
parent 1dc5476d43
commit 7633697567
14 changed files with 1667 additions and 5 deletions
+35
View File
@@ -0,0 +1,35 @@
{{define "content"}}{{with .Data}}
<h1>Suppression list</h1>
<p class="lede">People and companies Supermarket must never add to your CRM: someone who asked not to be contacted, existing customers, partners, competitors. It's checked before a prospect is added, and again before anything is queued. A domain covers everyone with an email there.</p>
<form method="post" action="/prospects/suppressed" class="card">
<div class="cols">
<label>Email or domain <input name="value" value="{{.Value}}" placeholder="name@example.com or example.com" required autocomplete="off"></label>
<label>Reason <span class="muted small">(optional)</span> <input name="reason" placeholder="e.g. asked not to be contacted"></label>
</div>
<button type="submit">Add to the list</button>
</form>
{{if .List}}
<table class="list">
<thead><tr><th>Email or domain</th><th>Reason</th><th>Added</th><th></th></tr></thead>
<tbody>
{{range .List}}
<tr>
<td><strong>{{.Value}}</strong> <span class="muted small">{{.Kind}}</span></td>
<td>{{.Reason}}</td>
<td>{{ago .CreatedAt}}</td>
<td class="row-actions">
<form method="post" action="/prospects/suppressed" data-confirm="Take {{.Value}} off the suppression list?">
<input type="hidden" name="kind" value="{{.Kind}}"><input type="hidden" name="value" value="{{.Value}}">
<button type="submit" name="remove" value="1" class="secondary small">Remove</button>
</form>
</td>
</tr>
{{end}}
</tbody>
</table>
{{else}}
<section class="card empty"><p>The list is empty.</p></section>
{{end}}
{{end}}{{end}}