2026-02-01 00:34:48 +00:00
|
|
|
import Stack from "@mui/material/Stack";
|
|
|
|
|
import Grid from "@mui/material/Grid";
|
|
|
|
|
import Box from "@mui/material/Box";
|
|
|
|
|
import Divider from "@mui/material/Divider";
|
|
|
|
|
import Typography from "@mui/material/Typography";
|
|
|
|
|
import { BaseBox, ValueLabel } from "@/Components/v2/design-elements";
|
|
|
|
|
|
|
|
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
|
import type { Incident } from "@/Types/Incident";
|
2026-02-01 00:49:35 +00:00
|
|
|
import type { Monitor } from "@/Types/Monitor";
|
2026-02-01 00:34:48 +00:00
|
|
|
import { useTheme } from "@mui/material";
|
|
|
|
|
|
|
|
|
|
interface CardDetailsProps {
|
|
|
|
|
incident: Incident | null;
|
|
|
|
|
monitor: Monitor | null;
|
2026-02-01 00:49:35 +00:00
|
|
|
sx?: object;
|
2026-02-01 00:34:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const CardDetails = ({ incident, monitor, sx }: CardDetailsProps) => {
|
|
|
|
|
const { t } = useTranslation();
|
|
|
|
|
const theme = useTheme();
|
|
|
|
|
|
2026-02-01 00:49:35 +00:00
|
|
|
void monitor; // Will be used in future UI implementation
|
|
|
|
|
|
2026-02-01 00:34:48 +00:00
|
|
|
if (!incident) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
return (
|
2026-02-01 00:49:35 +00:00
|
|
|
<Stack
|
|
|
|
|
gap={theme.spacing(4)}
|
|
|
|
|
sx={sx}
|
|
|
|
|
>
|
2026-02-01 00:34:48 +00:00
|
|
|
<Typography textTransform={"uppercase"}>
|
|
|
|
|
{t("pages.incidents.dialog.details.title")}
|
|
|
|
|
</Typography>
|
|
|
|
|
<BaseBox padding={8}>
|
2026-02-01 00:49:35 +00:00
|
|
|
<Stack gap={theme.spacing(4)}>
|
|
|
|
|
<Typography textTransform={"uppercase"}>
|
|
|
|
|
{t("pages.incidents.dialog.details.overview")}
|
|
|
|
|
</Typography>
|
|
|
|
|
<Divider />
|
2026-02-01 00:34:48 +00:00
|
|
|
|
2026-02-01 00:49:35 +00:00
|
|
|
<Grid
|
|
|
|
|
container
|
|
|
|
|
gap={theme.spacing(4)}
|
|
|
|
|
>
|
|
|
|
|
<Grid size={12}>
|
|
|
|
|
<Box>
|
|
|
|
|
<ValueLabel
|
|
|
|
|
value={incident.status ? "positive" : "negative"}
|
|
|
|
|
text={
|
|
|
|
|
incident.status
|
|
|
|
|
? t("common.labels.active")
|
|
|
|
|
: t("common.labels.resolved")
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
</Box>
|
|
|
|
|
</Grid>
|
|
|
|
|
<Grid size={6}>Test</Grid>
|
|
|
|
|
<Grid size={6}>Test</Grid>
|
2026-02-01 00:34:48 +00:00
|
|
|
</Grid>
|
2026-02-01 00:49:35 +00:00
|
|
|
</Stack>
|
2026-02-01 00:34:48 +00:00
|
|
|
</BaseBox>
|
|
|
|
|
</Stack>
|
|
|
|
|
);
|
|
|
|
|
};
|