From 0c844a312933e035de2dff8bda769db485d79fe5 Mon Sep 17 00:00:00 2001 From: soryu Date: Thu, 5 Mar 2026 23:13:13 +0000 Subject: feat: soryu-co/soryu - makima: Filter phase orbs by contract type in PhaseProgressBar --- .../src/components/contracts/ContractDetail.tsx | 1 + .../src/components/contracts/ContractList.tsx | 2 +- .../src/components/contracts/PhaseProgressBar.tsx | 19 +++++++++++++------ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/makima/frontend/src/components/contracts/ContractDetail.tsx b/makima/frontend/src/components/contracts/ContractDetail.tsx index 46b2212..02c129e 100644 --- a/makima/frontend/src/components/contracts/ContractDetail.tsx +++ b/makima/frontend/src/components/contracts/ContractDetail.tsx @@ -195,6 +195,7 @@ export function ContractDetail({
diff --git a/makima/frontend/src/components/contracts/ContractList.tsx b/makima/frontend/src/components/contracts/ContractList.tsx index 4388283..1eee6a3 100644 --- a/makima/frontend/src/components/contracts/ContractList.tsx +++ b/makima/frontend/src/components/contracts/ContractList.tsx @@ -153,7 +153,7 @@ export function ContractList({ )}
- +
{contract.fileCount > 0 && ( {contract.fileCount} files diff --git a/makima/frontend/src/components/contracts/PhaseProgressBar.tsx b/makima/frontend/src/components/contracts/PhaseProgressBar.tsx index 5ee7999..9589db9 100644 --- a/makima/frontend/src/components/contracts/PhaseProgressBar.tsx +++ b/makima/frontend/src/components/contracts/PhaseProgressBar.tsx @@ -1,7 +1,9 @@ -import type { ContractPhase } from "../../lib/api"; +import type { ContractPhase, ContractType } from "../../lib/api"; +import { getValidPhases } from "../../lib/api"; interface PhaseProgressBarProps { currentPhase: ContractPhase; + contractType?: ContractType; onPhaseClick?: (phase: ContractPhase) => void; readonly?: boolean; } @@ -46,14 +48,16 @@ const phaseColors: Record - {phases.map((phase, index) => { + {visiblePhases.map((phase, index) => { const isActive = phase === currentPhase; const isCompleted = index < currentIndex; const colors = phaseColors[phase]; @@ -97,7 +101,7 @@ export function PhaseProgressBar({ {/* Connector line */} - {index < phases.length - 1 && ( + {index < visiblePhases.length - 1 && (
- {phases.map((phase, index) => { + {visiblePhases.map((phase, index) => { const isActive = phase === currentPhase; const isCompleted = index < currentIndex; const colors = phaseColors[phase]; -- cgit v1.2.3