feat: integrar el uso de bottomToolbar en ClientCreate para gestionar la barra inferior
This commit is contained in:
+8
@@ -23,6 +23,7 @@ import { useNavigation } from "@hooks/goto";
|
|||||||
import Switch from "@mui/material/Switch";
|
import Switch from "@mui/material/Switch";
|
||||||
import { ThemeProvider } from "@emotion/react";
|
import { ThemeProvider } from "@emotion/react";
|
||||||
import turnosXpressTheme from "@core/app/theme/turnosXpress";
|
import turnosXpressTheme from "@core/app/theme/turnosXpress";
|
||||||
|
import { useBottomToolbarStore } from "@core/Store/BottomToolbar.Store";
|
||||||
|
|
||||||
dayjs.locale("es");
|
dayjs.locale("es");
|
||||||
|
|
||||||
@@ -40,6 +41,7 @@ export default function ClientCreate() {
|
|||||||
const { goTo } = useNavigation();
|
const { goTo } = useNavigation();
|
||||||
const location = useLocationStore();
|
const location = useLocationStore();
|
||||||
const eventHandler = useEventHandlerStore();
|
const eventHandler = useEventHandlerStore();
|
||||||
|
const bottomToolbar = useBottomToolbarStore();
|
||||||
|
|
||||||
const [validation, setValidation] = useState<boolean>(true);
|
const [validation, setValidation] = useState<boolean>(true);
|
||||||
const [notification, setNotification] = useState<boolean>(true);
|
const [notification, setNotification] = useState<boolean>(true);
|
||||||
@@ -148,6 +150,8 @@ export default function ClientCreate() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
location.clear();
|
location.clear();
|
||||||
|
|
||||||
|
bottomToolbar.set(<></>);
|
||||||
|
|
||||||
location.add({
|
location.add({
|
||||||
url: "/admin/org/profile/" + id,
|
url: "/admin/org/profile/" + id,
|
||||||
title: "Origanizacion",
|
title: "Origanizacion",
|
||||||
@@ -169,6 +173,10 @@ export default function ClientCreate() {
|
|||||||
title: "Crear nuevo turno",
|
title: "Crear nuevo turno",
|
||||||
icon: <ClientsIcon sx={{ fontSize: "32px", mr: "10px" }} />,
|
icon: <ClientsIcon sx={{ fontSize: "32px", mr: "10px" }} />,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
bottomToolbar.clear();
|
||||||
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user