🚸 Remember current values as default in create user stepper

This commit is contained in:
Manuel
2023-08-05 15:09:48 +02:00
parent d081ccb9ad
commit 5b1b36eecc
4 changed files with 22 additions and 7 deletions

View File

@@ -73,6 +73,8 @@ const CreateNewUserPage = () => {
description="Create account"
>
<CreateAccountStep
defaultUsername={form.values.account.username}
defaultEmail={form.values.account.eMail}
nextStep={(value) => {
form.setFieldValue('account', value);
nextStep();
@@ -87,6 +89,7 @@ const CreateNewUserPage = () => {
description="Password"
>
<CreateAccountSecurityStep
defaultPassword={form.values.security.password}
nextStep={(value) => {
form.setFieldValue('security', value);
nextStep();
@@ -160,7 +163,15 @@ const CreateNewUserPage = () => {
</tbody>
</Table>
<Flex justify="end" wrap="nowrap">
<Group position="apart" noWrap>
<Button
leftIcon={<IconArrowLeft size="1rem" />}
onClick={prevStep}
variant="light"
px="xl"
>
Previous
</Button>
<Button
onClick={async () => {
await mutateAsync({
@@ -176,7 +187,7 @@ const CreateNewUserPage = () => {
>
Confirm
</Button>
</Flex>
</Group>
</Card>
</Stepper.Step>
<Stepper.Completed>