feat: build audit outreach review workspace

This commit is contained in:
Matthias
2026-06-05 16:47:22 +02:00
parent 1feccb9bdf
commit 5a42c637c6
15 changed files with 1786 additions and 38 deletions

View File

@@ -146,6 +146,37 @@ test("groupLeadFunnelCards derives review, follow-up, and deferred columns witho
);
});
test("groupLeadFunnelCards keeps approved unsent outreach in the review-open funnel", () => {
const groups = groupLeadFunnelCards([
{
id: "lead-approved-unsent",
companyName: "Optik Meyer",
city: "Freiburg",
priority: "medium",
contactStatus: "new",
blacklistStatus: "clear",
outreach: {
approvalStatus: "approved",
sendStatus: "not_sent",
responseStatus: "none",
salesStatus: "follow_up_planned",
},
},
]);
assert.deepEqual(
groups.map((group) => [group.stage.id, group.cards.map((card) => card.id)]),
[
["missing_contact", []],
["audit_ready", []],
["review_open", ["lead-approved-unsent"]],
["contacted", []],
["follow_up", []],
["deferred", []],
],
);
});
test("toLeadFunnelCard maps blocked priority to deferred stage with blocker label", () => {
const card = toLeadFunnelCard({
id: "lead-blocked",