diff --git a/frontend/src/pages/Dashboard/components/DeploymentFormModal.tsx b/frontend/src/pages/Dashboard/components/DeploymentFormModal.tsx index cf3f29a9..67363389 100644 --- a/frontend/src/pages/Dashboard/components/DeploymentFormModal.tsx +++ b/frontend/src/pages/Dashboard/components/DeploymentFormModal.tsx @@ -67,8 +67,9 @@ const DeploymentFormModal: React.FC = ({ }, // 通知信息(使用环境配置的通知设置) notification: { - required: environment.notificationEnabled ? 'true' : 'false', - channelId: environment.notificationChannelId?.toString() || '', + required: environment.notificationConfig?.deployNotificationEnabled ? 'true' : 'false', + channelId: environment.notificationConfig?.notificationChannelId?.toString() || '', + channelName: environment.notificationConfig?.notificationChannelName || '', }, }; }, [app, environment, teamId]); // 只在这些依赖变化时重新生成 diff --git a/frontend/src/pages/Dashboard/types.ts b/frontend/src/pages/Dashboard/types.ts index 886e52fe..2a7c17ba 100644 --- a/frontend/src/pages/Dashboard/types.ts +++ b/frontend/src/pages/Dashboard/types.ts @@ -58,6 +58,14 @@ export interface ApplicationConfig { recentDeployRecords?: DeployRecord[]; } +export interface NotificationConfig { + notificationChannelId: number; + deployNotificationEnabled: boolean; + buildNotificationEnabled: boolean; + buildFailureFileEnabled: boolean; + notificationChannelName: string; +} + export interface DeployEnvironment { environmentId: number; environmentCode: string; @@ -67,8 +75,7 @@ export interface DeployEnvironment { sort: number; requiresApproval: boolean; approvers: Approver[]; - notificationEnabled: boolean; // 🆕 是否启用通知 - notificationChannelId: number; // 🆕 通知渠道ID + notificationConfig?: NotificationConfig; // 🆕 通知配置 requireCodeReview: boolean; // 🆕 是否需要代码审查 canDeploy: boolean; // 🆕 当前用户是否可以发起部署 canApprove: boolean; // 🆕 当前用户是否可以审批部署