"use client"; /** * Pane 3: 候補者ダッシュボード(ADR-0015 §19 で再設計)。 * * 「人物軸の編集」として、ヘッダー帯(Collapsible)+ 採用条件カード + 選考フローカード * の 3 要素で構成。判断の 3 問い(Q1: 採る価値 / Q2: 採れるか / Q3: 手遅れか)に * スクロールなしで即答できることが目標。 * * セクション順序: ヘッダー帯 → 採用条件 → 選考フロー * * `AxisScoreRow` は Pane 4 モード 2 評価セクションでも使うため引き続き export する。 */ import { useState } from "react"; import { ArrowUpRight, Check, Circle, CircleDot, ChevronDown, Mail, Phone, MapPin, X, Star, StarHalf, } from "lucide-react"; import { cn } from "@/lib/utils"; import { type Profile, type StageStatus, type Scorecard, type SelectedDetail, STAGE_ORDER, } from "@/lib/schema"; import { STAGE_LABELS, PANE3_SECTION, PANE4_SECTION_IDS } from "@/lib/labels"; import { getScorecardsAverageScore, deriveStageStatus, } from "@/lib/computed/scorecards"; import { calculateAge } from "@/lib/computed/profile"; import { Avatar, AvatarFallback } from "@/components/ui/avatar"; import { Badge } from "@/components/ui/badge"; import { Card, CardAction, CardHeader, CardTitle, CardDescription, CardContent, } from "@/components/ui/card"; import { Collapsible, CollapsibleTrigger, CollapsibleContent, } from "@/components/ui/collapsible"; import { ScrollArea } from "@/components/ui/scroll-area"; import { Separator } from "@/components/ui/separator"; import { InlineTextField, InlineDateField, InlineComboboxField, InlineTextareaField, InlineFieldRow, ScoreLabel, SectionLabel, type ComboOption, } from "@/components/primitives"; // ===== AxisScoreRow(Pane 4 モード 2 でも使う、export) ===== export function AxisScoreRow({ label, value, bold = false, editable = false, onChange, onReset, }: { label: string; value: number | null; bold?: boolean; editable?: boolean; onChange?: (value: number) => void; onReset?: () => void; }) { if (value === null && !editable) { return (
{label} 未評価
); } const v = value ?? 0; const floor = Math.floor(v); const hasHalf = !editable && v - floor >= 0.5; return (
{label} {[1, 2, 3, 4, 5].map((n) => { const isFull = n <= floor; const isHalf = hasHalf && n === floor + 1; const StarComp = isHalf ? StarHalf : Star; const filled = isFull || isHalf; const starEl = ( {value !== null ? value.toFixed(1) : "—"} {editable && onReset && value !== null && ( )}
); } // ===== ↗ ジャンプアイコン(ADR-0014 §4、常時表示) ===== function JumpIcon({ selected, className, }: { selected: boolean; className?: string; }) { return (