mirror of
https://codeberg.org/MarkusThielker/finances.git
synced 2025-07-04 20:19:17 +00:00
N-FIN-42: add default category selection to form
This commit is contained in:
parent
228aa983e0
commit
715ce17e1f
4 changed files with 34 additions and 2 deletions
|
@ -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,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue