diff --git a/web/src/views/InterviewsView.vue b/web/src/views/InterviewsView.vue index 0912c5f..5b41980 100644 --- a/web/src/views/InterviewsView.vue +++ b/web/src/views/InterviewsView.vue @@ -62,6 +62,43 @@ async function dismissPreSignal(job: PipelineJob, sig: StageSignal) { await useApiFetch(`/api/stage-signals/${sig.id}/dismiss`, { method: 'POST' }) } +const bodyExpandedMap = ref>({}) + +function toggleBodyExpand(sigId: number) { + bodyExpandedMap.value = { ...bodyExpandedMap.value, [sigId]: !bodyExpandedMap.value[sigId] } +} + +const PRE_RECLASSIFY_CHIPS = [ + { label: '🟡 Interview', value: 'interview_scheduled' as const }, + { label: '✅ Positive', value: 'positive_response' as const }, + { label: '🟢 Offer', value: 'offer_received' as const }, + { label: '📋 Survey', value: 'survey_received' as const }, + { label: '✖ Rejected', value: 'rejected' as const }, + { label: '— Neutral', value: 'neutral' }, +] as const + +async function reclassifyPreSignal(job: PipelineJob, sig: StageSignal, newLabel: StageSignal['stage_signal'] | 'neutral') { + if (newLabel === 'neutral') { + const idx = job.stage_signals.findIndex(s => s.id === sig.id) + if (idx !== -1) job.stage_signals.splice(idx, 1) + await useApiFetch(`/api/stage-signals/${sig.id}/reclassify`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ stage_signal: 'neutral' }), + }) + await useApiFetch(`/api/stage-signals/${sig.id}/dismiss`, { method: 'POST' }) + } else { + const prev = sig.stage_signal + sig.stage_signal = newLabel + const { error } = await useApiFetch(`/api/stage-signals/${sig.id}/reclassify`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ stage_signal: newLabel }), + }) + if (error) sig.stage_signal = prev + } +} + // ── Email sync status ────────────────────────────────────────────────────── interface SyncStatus { state: 'idle' | 'queued' | 'running' | 'completed' | 'failed' | 'not_configured' @@ -323,14 +360,35 @@ function daysSince(dateStr: string | null) { class="pre-signal-banner" :data-color="SIGNAL_META_PRE[sig.stage_signal]?.color" > - 📧 Email suggests: {{ SIGNAL_META_PRE[sig.stage_signal]?.label }} - {{ sig.subject.slice(0, 60) }}{{ sig.subject.length > 60 ? '…' : '' }} -
- - +
+ 📧 {{ SIGNAL_META_PRE[sig.stage_signal]?.label?.replace('Move to ', '') ?? sig.stage_signal }} + {{ sig.subject.slice(0, 60) }}{{ sig.subject.length > 60 ? '…' : '' }} +
+ + + +
+
+ +
+
From: {{ sig.from_addr }}
+
{{ sig.body }}
+
No email body available.
+
+ Re-classify: + +