Suspects: Vorstufe der Leads als Tabelle

Neuer Menüpunkt über Leads mit Unterpunkt Archiv.

- Tabelle Name, Funktion, Unternehmen, LinkedIn, Website, Notiz,
  Letzter Kontakt, Nächster Impuls; leere Zeile unten, speichert beim
  Verlassen. Links als Symbol mit URL im Tooltip.
- Nächster Impuls: Tage eingeben, Erinnerung über den ReminderWatcher
- Archivieren, Zurückholen, endgültig löschen (nur aus dem Archiv)
- Lead erstellen öffnet die Lead-Karte vorbelegt (LeadModal.initial),
  danach wandert der Suspect mit lead_id ins Archiv

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
schakal00783
2026-09-29 12:11:36 +02:00
co-authored by Claude Opus 5.5
parent e0f6ef06cd
commit 6a452f1510
14 changed files with 1139 additions and 22 deletions
+34
View File
@@ -433,6 +433,40 @@ export const dashboardApi = {
load: () => get<DashboardData>('/dashboard'),
};
/* --------------------------------------------------------------- Suspects */
export interface Suspect {
id: number;
name: string;
role: string | null;
company: string | null;
linkedin: string | null;
website: string | null;
notes: string | null;
/** YYYY-MM-DD */
last_contact_on: string | null;
remind_at: string | null;
archived: boolean;
lead_id: number | null;
lead_title: string | null;
created_at: string;
updated_at: string;
}
export type SuspectInput = Partial<
Pick<Suspect, 'name' | 'role' | 'company' | 'linkedin' | 'website' | 'notes' | 'last_contact_on' | 'archived' | 'lead_id'>
> & { remind_in_days?: number | null };
export const suspectsApi = {
list: (archived = false) => get<{ suspects: Suspect[] }>(`/suspects${query({ archived: archived ? 1 : 0 })}`),
create: (body: SuspectInput) => post<{ suspect: Suspect }>('/suspects', body),
update: (id: number, body: SuspectInput) => patch<{ suspect: Suspect }>(`/suspects/${id}`, body),
remove: (id: number) => del<{ ok: true }>(`/suspects/${id}`),
reminders: () => get<{ due: Suspect[] }>('/suspects/reminders'),
acknowledge: (id: number, snooze_days?: number) =>
post<{ ok: true }>(`/suspects/${id}/acknowledge`, { snooze_days }),
};
/* ---------------------------------------------------------------- Scanner */
export type ScannerSourceId = 'ba' | 'stepstone' | 'karriere' | 'adzuna' | 'freelancermap';