/* ============================================================ pipeline.js — Kanban board (drag & drop) + Talent Pool ============================================================ */ window.Views = window.Views || {}; window.Pipeline = {}; // Stage colours reference CSS tokens so the board re-tints with the theme. const KANBAN_STAGES = [ { name: 'Applied', color: 'var(--stage-1)' }, { name: 'Screening', color: 'var(--stage-2)' }, { name: 'Assessment', color: 'var(--stage-3)' }, { name: 'Interview', color: 'var(--stage-4)' }, { name: 'Offer', color: 'var(--stage-5)' }, { name: 'Hired', color: 'var(--stage-6)' }, { name: 'Rejected', color: 'var(--stage-7)' } ]; Views.pipeline = function () { const jobFilter = { id: '' }; function columns() { const list = jobFilter.id ? DB.candidates.filter(c => c.jobId === jobFilter.id) : DB.candidates; return KANBAN_STAGES.map(st => { const cards = list.filter(c => c.stage === st.name); return `
Drag candidates between stages to update their status
${pool.length} silver-medalists & passive candidates to re-engage