+
+
- Rejestracja oznacza akceptację{" "}
+ Przeczytałem i akceptuję postanowienia{" "}
handleRegulaminClick(event)}>
- regulaminu
+ regulaminu.
+
sendForm(formData)}
text="Zarejestruj"
/>
@@ -319,4 +479,4 @@ export default function RegisterDialog(props) {
);
-}
+}
\ No newline at end of file
diff --git a/src/components/Dialogs/Settings.js b/src/components/Dialogs/Settings.js
index b108909..60cdfee 100644
--- a/src/components/Dialogs/Settings.js
+++ b/src/components/Dialogs/Settings.js
@@ -83,15 +83,24 @@ export default function Settings() {
});
const history = useHistory();
const style = useStyles();
+ const isRestaurant = useSelector((store) => store.data.userData.isRestaurant)
const data = useSelector((state) => state.data.userData);
- const initialState = {
- firstname: data.firstname,
- lastname: data.lastname,
- email: data.userEmail,
- NIP: data.billing.NIP,
- adress: data.billing.adress,
- companyName: data.billing.companyName,
- };
+ let initialState;
+ if(isRestaurant === true) {
+ initialState = {
+ firstname: data.firstname,
+ lastname: data.lastname,
+ email: data.userEmail,
+ NIP: data.billing.NIP,
+ adress: data.billing.adress,
+ companyName: data.billing.companyName,
+ };
+ } else {
+ initialState = {
+ email: data.userEmail,
+ login: data.login,
+ };
+ }
const [state, setState] = useState(initialState);
return (
);
}
diff --git a/src/components/Output/Footer.js b/src/components/Output/Footer.js
index b9770e2..31424e8 100644
--- a/src/components/Output/Footer.js
+++ b/src/components/Output/Footer.js
@@ -4,7 +4,7 @@ export default class Footer extends React.Component {
render() {
return (
-
Menui (wersja testowa aplikacji)
+
Bankai Software @2021 | Menui (v0.6.0)
);
}
diff --git a/src/components/TopBar.js b/src/components/TopBar.js
index ae3e6ed..e43b0ea 100644
--- a/src/components/TopBar.js
+++ b/src/components/TopBar.js
@@ -39,7 +39,9 @@ const useStyles = makeStyles((theme) => ({
export default function TopBar() {
const classes = useStyles();
const loggedIn = useSelector((state) => state.data.loggedIn);
- const username = useSelector((state) => state.data.userData.firstname);
+ const firstname = useSelector((state) => state.data.userData.firstname);
+ const login = useSelector((state) => state.data.userData.login);
+ const isRestaurant = useSelector((state) => state.data.userData.isRestaurant)
const history = useHistory();
const dispatch = useDispatch();
const handleClick = (button) => {
@@ -95,13 +97,13 @@ export default function TopBar() {
onClick={() => history.push("/")}
/>
-
Food guide (wersja testowa)
+
Food guide