Alter schema + add form field

This commit is contained in:
Owen
2026-05-28 20:15:13 -07:00
parent a32acf7c69
commit a9b0bd8b47
5 changed files with 253 additions and 1 deletions

View File

@@ -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"