feat: implement communications module with SMTP settings, email logging, and frontend UI

This commit is contained in:
2025-12-12 11:19:25 +01:00
parent dedd4f4e69
commit 9174e75be0
19 changed files with 727 additions and 9 deletions

View File

@@ -0,0 +1,36 @@
import { Outlet, useLocation, useNavigate } from "react-router-dom";
import { Box, Paper, Tab, Tabs } from "@mui/material";
export default function CommunicationsLayout() {
const navigate = useNavigate();
const location = useLocation();
const getActiveTab = () => {
const path = location.pathname;
if (path.includes("/communications/logs")) return "/communications/logs";
return "/communications/settings";
};
const handleChange = (_event: React.SyntheticEvent, newValue: string) => {
navigate(newValue);
};
return (
<Box sx={{ display: "flex", flexDirection: "column", height: "100%" }}>
<Paper sx={{ mb: 2 }}>
<Tabs
value={getActiveTab()}
onChange={handleChange}
indicatorColor="primary"
textColor="primary"
>
<Tab label="Configurazione" value="/communications/settings" />
<Tab label="Logs" value="/communications/logs" />
</Tabs>
</Paper>
<Box sx={{ flex: 1, overflow: "auto" }}>
<Outlet />
</Box>
</Box>
);
}