Compare commits

..

No commits in common. "511ede4856db307d9b65eac6e873511b7f64dfa2" and "52ed664350be3130276b74fe98481df2ee99e42d" have entirely different histories.

1 changed files with 53 additions and 67 deletions

View File

@ -225,75 +225,61 @@ export default function KennzahlenTable({
</Box> </Box>
</Tooltip> </Tooltip>
) : ( ) : (
<Tooltip <Box
title={hasNoValue ? sx={{
<> border: `2px solid ${borderColor}`,
<b>Problem</b> borderRadius: 1,
<br /> padding: "4px 8px",
Es wurden keine Kennzahlen gefunden. Bitte ergänzen! display: "flex",
</> : "" alignItems: "center",
} justifyContent: "space-between",
placement="bottom" width: "100%",
arrow cursor: "text",
}}
> >
<span> <Box
<Box sx={{
sx={{ display: "flex",
border: `2px solid ${borderColor}`, alignItems: "center",
borderRadius: 1, gap: 1,
padding: "4px 8px", width: "100%",
display: "flex", }}
alignItems: "center", >
justifyContent: "space-between", {hasNoValue && (
width: "100%", <ErrorOutlineIcon fontSize="small" color="error" />
cursor: "text", )}
}} {editingIndex === row.setting.name ? (
> <TextField
<Box value={editValue}
sx={{ onChange={(e) => setEditValue(e.target.value)}
display: "flex", onKeyDown={(e) =>
alignItems: "center", handleKeyPress(e, row.setting.name)
gap: 1, }
width: "100%", onBlur={() => handleSave(row.setting.name)}
}} autoFocus
> size="small"
{hasNoValue && ( fullWidth
<ErrorOutlineIcon fontSize="small" color="error" /> variant="standard"
)} sx={{ margin: "-8px 0" }}
{editingIndex === row.setting.name ? (
<TextField
value={editValue}
onChange={(e) => setEditValue(e.target.value)}
onKeyDown={(e) =>
handleKeyPress(e, row.setting.name)
}
onBlur={() => handleSave(row.setting.name)}
autoFocus
size="small"
fullWidth
variant="standard"
sx={{ margin: "-8px 0" }}
/>
) : (
<span>
{row.extractedValues.at(0)?.entity || "—"}
</span>
)}
</Box>
<EditIcon
fontSize="small"
sx={{ color: "#555", cursor: "pointer" }}
onClick={(e) => {
e.stopPropagation();
startEditing(
row.extractedValues.at(0)?.entity || "",
row.setting.name,
);
}}
/> />
</Box> ) : (
</span> <span>
</Tooltip> {row.extractedValues.at(0)?.entity || "—"}
</span>
)}
</Box>
<EditIcon
fontSize="small"
sx={{ color: "#555", cursor: "pointer" }}
onClick={(e) => {
e.stopPropagation();
startEditing(
row.extractedValues.at(0)?.entity || "",
row.setting.name,
);
}}
/>
</Box>
)} )}
</TableCell> </TableCell>
<TableCell align="center"> <TableCell align="center">