重构消息通知弹窗

This commit is contained in:
dengqichen 2025-11-28 17:40:41 +08:00
parent f66524bac6
commit 0a10f1def1
2 changed files with 15 additions and 13 deletions

View File

@ -136,8 +136,9 @@ export const TeamApplicationManageDialog: React.FC<
environmentId: editingEnvironment.id,
buildType: data.buildType || undefined,
branch: data.branch,
deploySystemId: data.deploySystemId || undefined,
deployJob: data.deployJob,
// 只有当 buildType 为 JENKINS 时才传递 Jenkins 相关字段
deploySystemId: data.buildType === 'JENKINS' ? (data.deploySystemId || undefined) : undefined,
deployJob: data.buildType === 'JENKINS' ? data.deployJob : '',
workflowDefinitionId: data.workflowDefinitionId || undefined,
codeSourceSystemId: data.codeSourceSystemId || undefined,
codeSourceProjectId: data.codeSourceProjectId || undefined,

View File

@ -241,19 +241,20 @@ const TeamModal: React.FC<TeamModalProps> = ({
control={form.control}
name="enabled"
render={({ field }) => (
<FormItem className="flex items-center justify-between rounded-lg border p-4">
<div className="space-y-0.5">
<FormItem>
<FormLabel></FormLabel>
<div className="text-sm text-muted-foreground">
{field.value ? '启用' : '禁用'}
</div>
</div>
<FormControl>
<div className="flex items-center gap-2 h-10">
<Switch
checked={field.value}
onCheckedChange={field.onChange}
/>
<span className="text-sm text-muted-foreground">
{field.value ? '启用' : '禁用'}
</span>
</div>
</FormControl>
<FormMessage />
</FormItem>
)}
/>