1.20
This commit is contained in:
parent
d372f5edfc
commit
1c3c148221
@ -7,6 +7,7 @@ import type { DeployTeam } from '../types';
|
||||
interface TeamSelectorProps {
|
||||
teams: DeployTeam[];
|
||||
currentTeamId: number | null;
|
||||
currentTeamOwnerName?: string; // 当前团队负责人名称
|
||||
pendingApprovalCount: number;
|
||||
showApprovalButton: boolean; // 是否显示待审批按钮(基于当前环境)
|
||||
onTeamChange: (teamId: string) => void;
|
||||
@ -21,6 +22,7 @@ interface TeamSelectorProps {
|
||||
export const TeamSelector: React.FC<TeamSelectorProps> = React.memo(({
|
||||
teams,
|
||||
currentTeamId,
|
||||
currentTeamOwnerName,
|
||||
pendingApprovalCount,
|
||||
showApprovalButton,
|
||||
onTeamChange,
|
||||
@ -31,13 +33,21 @@ export const TeamSelector: React.FC<TeamSelectorProps> = React.memo(({
|
||||
<div className="flex items-center gap-4">
|
||||
{/* 书签按钮 */}
|
||||
{onBookmarkClick && (
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={onBookmarkClick}
|
||||
>
|
||||
<Bookmark className="h-4 w-4 mr-2" />
|
||||
书签
|
||||
</Button>
|
||||
<div className="flex items-center gap-2">
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={onBookmarkClick}
|
||||
>
|
||||
<Bookmark className="h-4 w-4 mr-2" />
|
||||
书签
|
||||
</Button>
|
||||
<span className="text-xs text-muted-foreground">
|
||||
{currentTeamOwnerName
|
||||
? `(请联系团队负责人 "${currentTeamOwnerName}" 来维护)`
|
||||
: '(请联系系统管理员来设置团队负责人)'
|
||||
}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* 待审批按钮 - 只在当前环境需要审批且用户有权限时显示 */}
|
||||
|
||||
@ -145,6 +145,7 @@ const Dashboard: React.FC = () => {
|
||||
<TeamSelector
|
||||
teams={deploymentData.teams}
|
||||
currentTeamId={deploymentData.currentTeamId}
|
||||
currentTeamOwnerName={deploymentData.currentTeam?.ownerName}
|
||||
pendingApprovalCount={approvalData.pendingApprovalCount}
|
||||
showApprovalButton={shouldShowApprovalButton}
|
||||
onTeamChange={deploymentData.handleTeamChange}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user