// Shared vocabulary and helpers for the opportunity capture screens. The value lists mirror the CHECK // constraints in migration 0070 so the UI never offers a value the server will reject. export const inputCls = 'w-full rounded-lg border border-line/70 bg-navy-900 px-3 py-2 text-sm text-ink outline-none focus:border-blue' export const SOURCE_TYPES: [string, string][] = [ ['sam_gov', 'SAM.gov'], ['agency_forecast', 'Agency forecast'], ['customer', 'Customer'], ['partner', 'Teaming partner'], ['internal', 'Internal'], ['spreadsheet', 'Spreadsheet import'], ['manual', 'Manual entry'], ] export const STATUSES: [string, string][] = [ ['identified', 'Identified'], ['qualifying', 'Qualifying'], ['qualified', 'Qualified'], ['pursuing', 'Pursuing'], ['no_bid', 'No bid'], ['submitted', 'Submitted'], ['won', 'Won'], ['lost', 'Lost'], ['cancelled', 'Cancelled'], ['archived', 'Archived'], ] export const PRIME_OR_SUB: [string, string][] = [ ['', 'Not set'], ['prime', 'Prime'], ['sub', 'Subcontract'], ] export const STATUS_LABEL: Record = Object.fromEntries(STATUSES) export const SOURCE_LABEL: Record = Object.fromEntries(SOURCE_TYPES) export const fmtDeadline = (s: string) => (s ? new Date(s).toLocaleDateString() : 'No deadline') // An needs a bare YYYY-MM-DD; the API returns RFC3339. export const toDateInput = (s: string) => (s ? s.slice(0, 10) : '')