mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
fix: Remove card in some forms.
This commit is contained in:
@@ -95,8 +95,6 @@ export const EmailForm = (props: EmailFormProps) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<TooltipProvider>
|
<TooltipProvider>
|
||||||
<Card>
|
|
||||||
<CardContent>
|
|
||||||
<Form
|
<Form
|
||||||
form={form}
|
form={form}
|
||||||
className="flex flex-col gap-4 mt-3"
|
className="flex flex-col gap-4 mt-3"
|
||||||
@@ -182,23 +180,6 @@ export const EmailForm = (props: EmailFormProps) => {
|
|||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<div className="flex justify-between gap-4">
|
<div className="flex justify-between gap-4">
|
||||||
|
|
||||||
{/*{props.defaultValues?.smtpFrom && (*/}
|
|
||||||
{/* <ButtonWithLoading*/}
|
|
||||||
{/* type="button"*/}
|
|
||||||
{/* isPending={mutationSendEmailTest.isPending}*/}
|
|
||||||
{/* onClick={async () => {*/}
|
|
||||||
{/* await mutationSendEmailTest.mutateAsync();*/}
|
|
||||||
{/* }}*/}
|
|
||||||
{/* icon={<Send/>}*/}
|
|
||||||
{/* size="default"*/}
|
|
||||||
{/* className="bg-green-600 hover:bg-green-700 text-white font-medium shadow-sm transition-all"*/}
|
|
||||||
|
|
||||||
{/* >Send email test</ButtonWithLoading>*/}
|
|
||||||
{/*)}*/}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{props.defaultValues?.smtpFrom && (
|
{props.defaultValues?.smtpFrom && (
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
@@ -227,14 +208,13 @@ export const EmailForm = (props: EmailFormProps) => {
|
|||||||
)}
|
)}
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
|
<div className="flex justify-end">
|
||||||
<Button
|
<Button type="submit">
|
||||||
type="submit"
|
Save
|
||||||
>Save</Button>
|
</Button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</TooltipProvider>
|
</TooltipProvider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -57,54 +57,53 @@ export const AgentForm = (props: agentFormProps) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TooltipProvider>
|
<TooltipProvider>
|
||||||
<Card>
|
<Form
|
||||||
<CardContent>
|
form={form}
|
||||||
<Form
|
className="flex flex-col gap-4"
|
||||||
form={form}
|
onSubmit={async (values) => {
|
||||||
className="flex flex-col gap-4 mt-3"
|
await mutation.mutateAsync(values);
|
||||||
onSubmit={async (values) => {
|
}}
|
||||||
await mutation.mutateAsync(values);
|
>
|
||||||
}}
|
<FormField
|
||||||
>
|
control={form.control}
|
||||||
<FormField
|
name="name"
|
||||||
control={form.control}
|
defaultValue=""
|
||||||
name="name"
|
render={({field}) => (
|
||||||
defaultValue=""
|
<FormItem>
|
||||||
render={({field}) => (
|
<FormLabel>Name</FormLabel>
|
||||||
<FormItem>
|
<FormControl>
|
||||||
<FormLabel>Name</FormLabel>
|
<Input placeholder="Agent 1" {...field} />
|
||||||
<FormControl>
|
</FormControl>
|
||||||
<Input placeholder="Agent 1" {...field} />
|
<FormDescription>Your agent project name</FormDescription>
|
||||||
</FormControl>
|
<FormMessage/>
|
||||||
<FormDescription>Your agent project name</FormDescription>
|
</FormItem>
|
||||||
<FormMessage/>
|
)}
|
||||||
</FormItem>
|
/>
|
||||||
)}
|
<FormField
|
||||||
/>
|
control={form.control}
|
||||||
<FormField
|
defaultValue=""
|
||||||
control={form.control}
|
name="description"
|
||||||
defaultValue=""
|
render={({field}) => (
|
||||||
name="description"
|
<FormItem>
|
||||||
render={({field}) => (
|
<FormLabel>Description</FormLabel>
|
||||||
<FormItem>
|
<FormControl>
|
||||||
<FormLabel>Description</FormLabel>
|
<Input placeholder="This agent is for the client exemple.com" {...field}
|
||||||
<FormControl>
|
value={field.value ?? ""}/>
|
||||||
<Input placeholder="This agent is for the client exemple.com" {...field}
|
</FormControl>
|
||||||
value={field.value ?? ""}/>
|
<FormDescription>Enter your project agent description</FormDescription>
|
||||||
</FormControl>
|
<FormMessage/>
|
||||||
<FormDescription>Enter your project agent description</FormDescription>
|
</FormItem>
|
||||||
<FormMessage/>
|
)}
|
||||||
</FormItem>
|
/>
|
||||||
)}
|
<div className="flex justify-end">
|
||||||
/>
|
<Button type="submit">
|
||||||
<Button>{isCreate ? `Create agent` : `Save agent`}</Button>
|
{isCreate ? "Create" : "Update"}
|
||||||
</Form>
|
</Button>
|
||||||
</CardContent>
|
</div>
|
||||||
</Card>
|
</Form>
|
||||||
|
|
||||||
</TooltipProvider>
|
</TooltipProvider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -78,9 +78,6 @@ export const ProjectForm = (props: projectFormProps) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card>
|
|
||||||
<CardHeader></CardHeader>
|
|
||||||
<CardContent>
|
|
||||||
<Form
|
<Form
|
||||||
form={form}
|
form={form}
|
||||||
className="flex flex-col gap-4"
|
className="flex flex-col gap-4"
|
||||||
@@ -124,9 +121,11 @@ export const ProjectForm = (props: projectFormProps) => {
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<Button>{isCreate ? `Create Project` : `Update Project`}</Button>
|
<div className="flex justify-end">
|
||||||
|
<Button type="submit">
|
||||||
|
{isCreate ? "Create" : "Update"}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user