重构消息通知弹窗

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, environmentId: editingEnvironment.id,
buildType: data.buildType || undefined, buildType: data.buildType || undefined,
branch: data.branch, branch: data.branch,
deploySystemId: data.deploySystemId || undefined, // 只有当 buildType 为 JENKINS 时才传递 Jenkins 相关字段
deployJob: data.deployJob, deploySystemId: data.buildType === 'JENKINS' ? (data.deploySystemId || undefined) : undefined,
deployJob: data.buildType === 'JENKINS' ? data.deployJob : '',
workflowDefinitionId: data.workflowDefinitionId || undefined, workflowDefinitionId: data.workflowDefinitionId || undefined,
codeSourceSystemId: data.codeSourceSystemId || undefined, codeSourceSystemId: data.codeSourceSystemId || undefined,
codeSourceProjectId: data.codeSourceProjectId || undefined, codeSourceProjectId: data.codeSourceProjectId || undefined,

View File

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