fix: unable to update user privileges

This commit is contained in:
Elias Schneider
2022-12-05 16:17:41 +01:00
parent c795b988df
commit d4a0f1a4f1
3 changed files with 21 additions and 15 deletions

View File

@@ -1,7 +1,6 @@
import {
Button,
Group,
Input,
PasswordInput,
Stack,
Switch,
@@ -51,7 +50,7 @@ const Body = ({
<Stack>
<form
onSubmit={form.onSubmit(async (values) => {
console.log(values)
console.log(values);
userService
.create(values)
.then(() => {
@@ -72,10 +71,12 @@ const Body = ({
label="New password"
{...form.getInputProps("password")}
/>
<Switch labelPosition="left" label="Admin privileges" {...form.getInputProps("isAdmin")} />
<Switch
mt="xs"
labelPosition="left"
label="Admin privileges"
{...form.getInputProps("isAdmin", { type: "checkbox" })}
/>
<Group position="right">
<Button type="submit">Create</Button>
</Group>