/* eslint-disable */
// Seed data for Staffing Partner dashboards

(function () {

// --- Agents (at this SP) -----------------------------------------------
const AGENTS = [
  { id: "ag1", name: "Maya Ostrowski",  initials: "MO", color: "purple" },
  { id: "ag2", name: "Devon Harris",     initials: "DH", color: "blue"   },
  { id: "ag3", name: "Priya Venkatesan", initials: "PV", color: "green"  },
  { id: "ag4", name: "Luis Ortiz",       initials: "LO", color: "yellow" },
  { id: "ag5", name: "Kenji Abe",        initials: "KA", color: "red"    },
];

// --- Clients -----------------------------------------------------------
const CLIENTS = {
  applied: { name: "Applied Intuition",       short: "Applied",     color: "blue"   },
  randstad:{ name: "RK Logistics via Randstad", short: "RK Logistics", color: "purple" },
  waymo:   { name: "Waymo",                   short: "Waymo",       color: "green"  },
  northwind:{ name: "Northwind Labs",         short: "Northwind",   color: "yellow" },
  helix:   { name: "Helix Health",            short: "Helix",       color: "red"    },
  quantico:{ name: "Quantico Bio",            short: "Quantico",    color: "purple" },
  acme:    { name: "Acme Cloud",              short: "Acme",        color: "blue"   },
};

// --- Jobs --------------------------------------------------------------
// daysLeft: days until current HCO end_date
// hcoFilled / hcoTotal: for the CURRENT commitment block
// recurring: if present, describes an ongoing commitment
const JOBS = [
  {
    id: "j1", title: "Vehicle Operator (CDL A)",      req: "9926-11822",
    client: "applied", location: "Mountain View, CA", workStyle: "On-site",
    hours: "Full-time (30+ hrs/wk)",
    payRate: 45.00, payUnit: "USD/hr",
    hcoFilled: 0, hcoTotal: 4, submitted: 9,
    daysLeft: 4,
    status: "Accepting", priority: "high",
    recurring: null,
    sourcing: ["CDL A license (verified)", "Clean MVR 3yrs", "Lives within 50mi of MTV"],
    updated: "2026/04/22",
  },
  {
    id: "j2", title: "Class A CDL Driver (Hazmat)",   req: "12108-14713",
    client: "randstad", location: "Kyle, TX",         workStyle: "On-site",
    hours: "Full-time (30+ hrs/wk)",
    payRate: 34.50, payUnit: "USD/hr", payRange: "34.00 – 35.00",
    hcoFilled: 15, hcoTotal: 15, submitted: 13,
    daysLeft: 6,
    status: "Accepting", priority: "high",
    recurring: { rate: 15, period: "2 weeks", remainingCycles: 12, through: "Oct 2026" },
    sourcing: ["Hazmat + Tanker endorsements", "Pass DOT physical", "2yrs CDL experience"],
    updated: "2026/04/15",
  },
  {
    id: "j3", title: "Warehouse Associate",           req: "8842-20104",
    client: "randstad", location: "Kyle, TX",         workStyle: "On-site",
    hours: "Full-time (30+ hrs/wk)",
    payRate: 22.00, payUnit: "USD/hr",
    hcoFilled: 8, hcoTotal: 20, submitted: 41,
    daysLeft: 12,
    status: "Accepting", priority: "med",
    recurring: { rate: 20, period: "month", remainingCycles: 5, through: "Sept 2026" },
    sourcing: ["Can lift 50lbs", "Reliable transportation", "Pass background check"],
    updated: "2026/04/21",
  },
  {
    id: "j4", title: "Forklift Operator",             req: "6620-08835",
    client: "acme", location: "Reno, NV",             workStyle: "On-site",
    hours: "Full-time (30+ hrs/wk)",
    payRate: 26.00, payUnit: "USD/hr",
    hcoFilled: 2, hcoTotal: 6, submitted: 14,
    daysLeft: 2,
    status: "Accepting", priority: "high",
    recurring: null,
    sourcing: ["Forklift certified", "1yr warehouse experience"],
    updated: "2026/04/23",
  },
  {
    id: "j5", title: "Sr. Backend Engineer",          req: "4410-00911",
    client: "northwind", location: "Remote, US",      workStyle: "Remote",
    hours: "Full-time (30+ hrs/wk)",
    payRate: 110.00, payUnit: "USD/hr", payRange: "100 – 120",
    hcoFilled: 1, hcoTotal: 3, submitted: 6,
    daysLeft: 21,
    status: "Accepting", priority: "med",
    recurring: null,
    sourcing: ["5+ yrs Go/Python", "Distributed systems", "US work auth"],
    updated: "2026/04/18",
  },
  {
    id: "j6", title: "Clinical Data Coordinator",     req: "7720-31412",
    client: "helix", location: "Boston, MA",          workStyle: "Hybrid (2 days)",
    hours: "Full-time (30+ hrs/wk)",
    payRate: 48.00, payUnit: "USD/hr",
    hcoFilled: 0, hcoTotal: 2, submitted: 2,
    daysLeft: 9,
    status: "Accepting", priority: "med",
    recurring: null,
    sourcing: ["EDC systems (Medidata, Veeva)", "FDA regulatory exp."],
    updated: "2026/04/12",
  },
  {
    id: "j7", title: "ML Research Engineer",          req: "3311-00222",
    client: "quantico", location: "Cambridge, MA",    workStyle: "On-site",
    hours: "Full-time (30+ hrs/wk)",
    payRate: 135.00, payUnit: "USD/hr",
    hcoFilled: 0, hcoTotal: 1, submitted: 0,
    daysLeft: 34,
    status: "Paused", priority: "low",
    recurring: null,
    sourcing: ["PyTorch + protein structure prediction", "PhD preferred"],
    updated: "2026/04/05",
  },
  {
    id: "j8", title: "Autonomy QA Tester",            req: "9926-11901",
    client: "applied", location: "Mountain View, CA", workStyle: "On-site",
    hours: "Full-time (30+ hrs/wk)",
    payRate: 38.00, payUnit: "USD/hr",
    hcoFilled: 3, hcoTotal: 8, submitted: 19,
    daysLeft: 7,
    status: "Accepting", priority: "med",
    recurring: { rate: 8, period: "month", remainingCycles: 4, through: "Aug 2026" },
    sourcing: ["Valid driver license", "Comfortable with 8hr shifts in vehicle"],
    updated: "2026/04/20",
  },
  {
    id: "j9", title: "Fleet Mechanic",                req: "9926-12110",
    client: "waymo", location: "Phoenix, AZ",         workStyle: "On-site",
    hours: "Full-time (30+ hrs/wk)",
    payRate: 42.00, payUnit: "USD/hr",
    hcoFilled: 4, hcoTotal: 6, submitted: 22,
    daysLeft: 1,
    status: "Accepting", priority: "high",
    recurring: null,
    sourcing: ["ASE certified", "EV/hybrid experience a plus"],
    updated: "2026/04/23",
  },
  {
    id: "j10", title: "Content Writer (Marketing)",   req: "2215-10033",
    client: "northwind", location: "Remote, US",      workStyle: "Remote",
    hours: "Part-time (< 30 hrs/wk)",
    payRate: 40.00, payUnit: "USD/hr",
    hcoFilled: 0, hcoTotal: 1, submitted: 7,
    daysLeft: 14,
    status: "Accepting", priority: "low",
    recurring: null,
    sourcing: ["B2B SaaS writing samples", "SEO experience"],
    updated: "2026/04/19",
  },
  {
    id: "j11", title: "Operations Lead",              req: "6620-09120",
    client: "acme", location: "Reno, NV",             workStyle: "On-site",
    hours: "Full-time (30+ hrs/wk)",
    payRate: 55.00, payUnit: "USD/hr",
    hcoFilled: 1, hcoTotal: 1, submitted: 5,
    daysLeft: 45,
    status: "Closed", priority: "low",
    recurring: null,
    sourcing: ["5+ yrs warehouse ops management"],
    updated: "2026/03/28",
  },
];

// --- Candidates (in flight) --------------------------------------------
// stage: milestone key — submitted | hireart-qual | client-qual | offer | hired | rejected
// substep: string describing the current sub-step within the milestone
// needsAction: SP must do something (e.g. upload doc, respond)
const CANDIDATES = [
  { id: "c1", name: "Jordan Marek",   initials: "JM", color: "green",
    jobId: "j1", agentId: "ag1",
    stage: "offer", substep: "Offer extended — awaiting response",
    needsAction: false, daysInStage: 2, submitted: "2026/03/14",
    rate: 45.00, nextStep: "Candidate responds by Apr 26" },
  { id: "c2", name: "Priya Sundaram", initials: "PS", color: "blue",
    jobId: "j2", agentId: "ag2",
    stage: "client-qual", substep: "In-person Interview scheduled",
    needsAction: false, daysInStage: 3, submitted: "2026/04/02",
    rate: 34.50, nextStep: "In-person Apr 28 @ Kyle, TX" },
  { id: "c3", name: "Noah Whitaker",  initials: "NW", color: "yellow",
    jobId: "j1", agentId: "ag1",
    stage: "hireart-qual", substep: "MVR pending — SP to upload",
    needsAction: true,  daysInStage: 5, submitted: "2026/04/10",
    rate: 45.00, nextStep: "Upload MVR within 3 days" },
  { id: "c4", name: "Elena Pappas",   initials: "EP", color: "purple",
    jobId: "j4", agentId: "ag3",
    stage: "hired", substep: "Start date set — Apr 29",
    needsAction: false, daysInStage: 1, submitted: "2026/03/22",
    rate: 26.00, nextStep: "Onboarding paperwork auto-sent" },
  { id: "c5", name: "Sam Rivera",     initials: "SR", color: "green",
    jobId: "j8", agentId: "ag2",
    stage: "client-qual", substep: "Online Interview completed",
    needsAction: false, daysInStage: 2, submitted: "2026/04/08",
    rate: 38.00, nextStep: "Awaiting client feedback" },
  { id: "c6", name: "Aiko Tanabe",    initials: "AT", color: "red",
    jobId: "j7", agentId: "ag4",
    stage: "rejected", substep: "Client declined — title mismatch",
    needsAction: false, daysInStage: 6, submitted: "2026/04/01",
    rate: null, nextStep: "—" },
  { id: "c7", name: "Marcus Flint",   initials: "MF", color: "blue",
    jobId: "j3", agentId: "ag5",
    stage: "submitted", substep: "Application in review queue",
    needsAction: false, daysInStage: 1, submitted: "2026/04/22",
    rate: 22.00, nextStep: "HireArt review within 48 hrs" },
  { id: "c8", name: "Chrystal Sanchez",initials: "CS", color: "yellow",
    jobId: "j2", agentId: "ag2",
    stage: "hireart-qual", substep: "Assessment pending — candidate to complete",
    needsAction: true, daysInStage: 4, submitted: "2026/04/09",
    rate: 34.50, nextStep: "Nudge candidate to finish assessment" },
  { id: "c9", name: "Fawn McCully",    initials: "FM", color: "purple",
    jobId: "j9", agentId: "ag1",
    stage: "client-qual", substep: "Client Review",
    needsAction: false, daysInStage: 3, submitted: "2026/04/12",
    rate: 42.00, nextStep: "Client to decide by Apr 26" },
  { id: "c10", name: "Patience Ekpo",  initials: "PE", color: "green",
    jobId: "j3", agentId: "ag5",
    stage: "submitted", substep: "Application in review queue",
    needsAction: false, daysInStage: 0, submitted: "2026/04/23",
    rate: 22.00, nextStep: "HireArt review within 48 hrs" },
  { id: "c11", name: "Colleen Lumsden",initials: "CL", color: "blue",
    jobId: "j10", agentId: "ag3",
    stage: "hireart-qual", substep: "Screening scheduled",
    needsAction: false, daysInStage: 2, submitted: "2026/04/15",
    rate: 40.00, nextStep: "Screening Apr 25" },
  { id: "c12", name: "Daniel Ortiz",   initials: "DO", color: "red",
    jobId: "j1", agentId: "ag1",
    stage: "hireart-qual", substep: "MVR failed — 2 violations",
    needsAction: true, daysInStage: 8, submitted: "2026/04/05",
    rate: null, nextStep: "Replace or dispute MVR" },
  { id: "c13", name: "Rosa Linden",    initials: "RL", color: "green",
    jobId: "j9", agentId: "ag4",
    stage: "offer", substep: "Offer extended — awaiting response",
    needsAction: false, daysInStage: 1, submitted: "2026/04/06",
    rate: 42.00, nextStep: "Candidate responds by Apr 27" },
  { id: "c14", name: "Henry Boateng",  initials: "HB", color: "yellow",
    jobId: "j2", agentId: "ag1",
    stage: "client-qual", substep: "Online Interview scheduled",
    needsAction: false, daysInStage: 2, submitted: "2026/04/11",
    rate: 34.50, nextStep: "Online Apr 26 @ 2pm CT" },
];

// --- Workers (hired + active) ------------------------------------------
// Hours: lastWeek / lastMonth / lastQuarter / ytd
const WORKERS = [
  { id: "w1", name: "Elena Pappas",     initials: "EP", color: "purple",
    jobId: "j4", agentId: "ag3",
    status: "Active", startDate: "2026/01/12", endDate: "2026/12/31",
    spPayRate: 2.50, clientBillRate: 26.00,
    hours: { lastWeek: 40, lastMonth: 168, lastQuarter: 480, ytd: 632 },
    timecard: "Approved" },
  { id: "w2", name: "Tomás Rivera",     initials: "TR", color: "blue",
    jobId: "j2", agentId: "ag2",
    status: "Active", startDate: "2025/11/04", endDate: "2026/11/03",
    spPayRate: 4.25, clientBillRate: 34.50,
    hours: { lastWeek: 42, lastMonth: 172, lastQuarter: 512, ytd: 1612 },
    timecard: "Pending" },
  { id: "w3", name: "Asha Patel",       initials: "AP", color: "green",
    jobId: "j3", agentId: "ag5",
    status: "Active", startDate: "2026/02/24", endDate: "2026/08/24",
    spPayRate: 2.00, clientBillRate: 22.00,
    hours: { lastWeek: 40, lastMonth: 160, lastQuarter: 420, ytd: 478 },
    timecard: "Approved" },
  { id: "w4", name: "Derrick James",    initials: "DJ", color: "yellow",
    jobId: "j9", agentId: "ag4",
    status: "Active", startDate: "2025/08/11", endDate: "2026/08/10",
    spPayRate: 6.50, clientBillRate: 42.00,
    hours: { lastWeek: 38, lastMonth: 152, lastQuarter: 488, ytd: 1912 },
    timecard: "Approved" },
  { id: "w5", name: "Kenji Abe",        initials: "KA", color: "red",
    jobId: "j1", agentId: "ag1",
    status: "On leave", startDate: "2025/06/01", endDate: "2026/06/01",
    spPayRate: 5.75, clientBillRate: 45.00,
    hours: { lastWeek: 0, lastMonth: 80, lastQuarter: 380, ytd: 1420 },
    timecard: "Approved" },
  { id: "w6", name: "Grace Okonkwo",    initials: "GO", color: "purple",
    jobId: "j8", agentId: "ag2",
    status: "Active", startDate: "2026/03/03", endDate: "2026/09/03",
    spPayRate: 4.75, clientBillRate: 38.00,
    hours: { lastWeek: 40, lastMonth: 164, lastQuarter: 432, ytd: 432 },
    timecard: "Pending" },
  { id: "w7", name: "Miguel Santiago",  initials: "MS", color: "blue",
    jobId: "j2", agentId: "ag1",
    status: "Active", startDate: "2025/09/22", endDate: "2026/09/21",
    spPayRate: 4.25, clientBillRate: 34.50,
    hours: { lastWeek: 44, lastMonth: 176, lastQuarter: 524, ytd: 1744 },
    timecard: "Approved" },
  { id: "w8", name: "Harriet Vale",     initials: "HV", color: "green",
    jobId: "j4", agentId: "ag3",
    status: "Active", startDate: "2025/12/15", endDate: "2026/12/15",
    spPayRate: 2.50, clientBillRate: 26.00,
    hours: { lastWeek: 40, lastMonth: 160, lastQuarter: 472, ytd: 718 },
    timecard: "Disputed" },
  { id: "w9", name: "Ravi Chandra",     initials: "RC", color: "yellow",
    jobId: "j3", agentId: "ag5",
    status: "Ended", startDate: "2025/04/10", endDate: "2026/04/10",
    spPayRate: 2.00, clientBillRate: 22.00,
    hours: { lastWeek: 0, lastMonth: 40, lastQuarter: 400, ytd: 472 },
    timecard: "Approved" },
];

Object.assign(window, { AGENTS, CLIENTS, JOBS, CANDIDATES, WORKERS });
})();
