From 3a395fd4074b1fb157baa368e3ac90eb0fdecaba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vikt=C3=B3ria=20Brezinov=C3=A1?= Date: Sun, 12 Nov 2023 14:37:39 +0100 Subject: [PATCH 1/3] add Back button --- src/components/Profile/ProfileForm.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/components/Profile/ProfileForm.tsx b/src/components/Profile/ProfileForm.tsx index de004b03..c9b6879f 100644 --- a/src/components/Profile/ProfileForm.tsx +++ b/src/components/Profile/ProfileForm.tsx @@ -1,3 +1,4 @@ +import {Stack, Typography} from '@mui/material' import {useMutation, useQuery} from '@tanstack/react-query' import axios from 'axios' import {useRouter} from 'next/router' @@ -96,6 +97,10 @@ export const ProfileForm: FC = () => { submitFormData(data) } + const returnBack = () => { + router.push(`/${seminar}/profil`) + } + const requiredRule = {required: '* Toto pole nemôže byť prázdne.'} const phoneRule = { validate: (val?: string) => { @@ -112,9 +117,14 @@ export const ProfileForm: FC = () => {

* takto označéné polia sú povinné

- + + + + ) From a6bcbd6105fb1c4c09e02789057005fc6a48ba12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vikt=C3=B3ria=20Brezinov=C3=A1?= Date: Sun, 12 Nov 2023 14:38:39 +0100 Subject: [PATCH 2/3] add close button --- src/components/Profile/PasswordChangeForm.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/Profile/PasswordChangeForm.tsx b/src/components/Profile/PasswordChangeForm.tsx index 522974c1..99b8417c 100644 --- a/src/components/Profile/PasswordChangeForm.tsx +++ b/src/components/Profile/PasswordChangeForm.tsx @@ -104,9 +104,12 @@ export const PasswordChangeDialog: FC = ({open, close } actions={ - + <> + + + } /> ) From 359a024a2fa824f6e4b31437684f902c11ea5e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vikt=C3=B3ria=20Brezinov=C3=A1?= Date: Thu, 16 Nov 2023 19:12:06 +0100 Subject: [PATCH 3/3] add reset and change order of buttons --- src/components/Profile/PasswordChangeForm.tsx | 7 ++++++- src/components/Profile/ProfileForm.tsx | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/Profile/PasswordChangeForm.tsx b/src/components/Profile/PasswordChangeForm.tsx index 99b8417c..cd3e9d2e 100644 --- a/src/components/Profile/PasswordChangeForm.tsx +++ b/src/components/Profile/PasswordChangeForm.tsx @@ -60,6 +60,11 @@ export const PasswordChangeDialog: FC = ({open, close submitFormData(data) } + const onClose = () => { + reset() + close() + } + const requiredRule = {required: '* Toto pole nemôže byť prázdne.'} return ( @@ -105,10 +110,10 @@ export const PasswordChangeDialog: FC = ({open, close } actions={ <> + - } /> diff --git a/src/components/Profile/ProfileForm.tsx b/src/components/Profile/ProfileForm.tsx index c9b6879f..cd636cce 100644 --- a/src/components/Profile/ProfileForm.tsx +++ b/src/components/Profile/ProfileForm.tsx @@ -118,12 +118,12 @@ export const ProfileForm: FC = () => {

* takto označéné polia sú povinné

- +