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