feat: Improve DynamicPipeline component with enhanced fallback UI and add localization for no stages message

This commit is contained in:
catlog22
2026-03-04 11:51:30 +08:00
parent ffd5282932
commit 91fa594578
4 changed files with 24 additions and 10 deletions

View File

@@ -77,8 +77,8 @@ export function TeamPage() {
[teamData?.role_state]
);
// List view
if (viewMode === 'list' || !selectedTeam) {
// List view (also fallback when selected team data is not available)
if (viewMode === 'list' || !selectedTeam || (viewMode === 'detail' && teams.length > 0 && !teamData)) {
return (
<div className="space-y-6">
<TeamListView />
@@ -163,11 +163,15 @@ export function TeamPage() {
tabs={tabs}
/>
{/* Pipeline Tab */}
{/* Pipeline Tab - shows role details */}
{detailTab === 'pipeline' && (
<Card>
<CardContent className="p-6">
<DynamicPipeline stages={stages} phaseInfo={phaseInfo} />
<TeamRolePanel
members={members}
stages={stages}
roleState={teamData?.role_state}
/>
</CardContent>
</Card>
)}