mirror of
https://github.com/fosrl/pangolin.git
synced 2026-06-05 23:28:44 +00:00
Alter schema + add form field
This commit is contained in:
@@ -112,6 +112,7 @@ export default function CreateShareLinkForm({
|
||||
resourceId: z.number({ message: t("shareErrorSelectResource") }),
|
||||
resourceName: z.string(),
|
||||
resourceUrl: z.string(),
|
||||
path: z.string().optional(),
|
||||
timeUnit: z.string(),
|
||||
timeValue: z.coerce.number<number>().int().positive().min(1),
|
||||
title: z.string().optional()
|
||||
@@ -172,7 +173,8 @@ export default function CreateShareLinkForm({
|
||||
resource:
|
||||
values.resourceName ||
|
||||
"Resource" + values.resourceId
|
||||
})
|
||||
}),
|
||||
path: values.path
|
||||
}
|
||||
)
|
||||
.catch((e) => {
|
||||
@@ -302,6 +304,22 @@ export default function CreateShareLinkForm({
|
||||
)}
|
||||
/>
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="path"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>
|
||||
{t("sharePathOptional")}
|
||||
</FormLabel>
|
||||
<FormControl>
|
||||
<Input {...field} />
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="title"
|
||||
|
||||
Reference in New Issue
Block a user