N-FIN-42: add default category selection to form

This commit is contained in:
Markus Thielker 2024-03-17 12:15:28 +01:00
parent 228aa983e0
commit 715ce17e1f
No known key found for this signature in database
4 changed files with 34 additions and 2 deletions

View file

@ -9,6 +9,7 @@ export default async function entityCreateUpdate({
id,
name,
type,
defaultCategoryId,
}: z.infer<typeof entityFormSchema>): Promise<ActionResponse> {
'use server';
@ -32,6 +33,7 @@ export default async function entityCreateUpdate({
data: {
name: name,
type: type,
defaultCategoryId: defaultCategoryId,
},
},
);
@ -47,6 +49,7 @@ export default async function entityCreateUpdate({
userId: user.id,
name: name,
type: type,
defaultCategoryId: defaultCategoryId,
},
});