Fixed extra frame font and small styling issues.
parent
5d0a5ab3c3
commit
7eeca5c3ba
|
|
@ -7,6 +7,7 @@ import type { Kennzahl } from "../types/kpi";
|
|||
import { typeDisplayMapping } from "../types/kpi";
|
||||
import Snackbar from "@mui/material/Snackbar";
|
||||
import MuiAlert from "@mui/material/Alert";
|
||||
import { API_HOST } from "../util/api";
|
||||
|
||||
|
||||
interface KPIFormProps {
|
||||
|
|
@ -92,7 +93,7 @@ export function KPIForm({ mode, initialData, onSave, onCancel, loading = false,
|
|||
localStorage.setItem("spacyData", JSON.stringify(updated));
|
||||
|
||||
// POST Request an das Flask-Backend
|
||||
const response = await fetch("http://localhost:5050/api/spacy/append-training-entry", {
|
||||
const response = await fetch(`${API_HOST}/api/spacy/append-training-entry/`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
|
|
@ -240,17 +241,23 @@ export function KPIForm({ mode, initialData, onSave, onCancel, loading = false,
|
|||
</FormControl>
|
||||
</Box>
|
||||
|
||||
|
||||
{mode === 'add' && (
|
||||
<>
|
||||
<Divider sx={{ my: 3 }} />
|
||||
|
||||
<Box mb={4}>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
checked={formData.active !== false}
|
||||
onChange={(e) => updateField('active', e.target.checked)}
|
||||
sx={{ color: '#383838' }}
|
||||
sx={{
|
||||
color: '#666666',
|
||||
'&.Mui-checked': {
|
||||
color: '#333333',
|
||||
},
|
||||
'&:hover': {
|
||||
backgroundColor: 'rgba(102, 102, 102, 0.04)',
|
||||
}
|
||||
}}
|
||||
/>
|
||||
}
|
||||
label="Aktiv"
|
||||
|
|
@ -265,7 +272,15 @@ export function KPIForm({ mode, initialData, onSave, onCancel, loading = false,
|
|||
<Checkbox
|
||||
checked={formData.mandatory || false}
|
||||
onChange={(e) => updateField('mandatory', e.target.checked)}
|
||||
sx={{ color: '#383838' }}
|
||||
sx={{
|
||||
color: '#666666',
|
||||
'&.Mui-checked': {
|
||||
color: '#333333',
|
||||
},
|
||||
'&:hover': {
|
||||
backgroundColor: 'rgba(102, 102, 102, 0.04)',
|
||||
}
|
||||
}}
|
||||
/>
|
||||
}
|
||||
label="Erforderlich"
|
||||
|
|
@ -274,8 +289,6 @@ export function KPIForm({ mode, initialData, onSave, onCancel, loading = false,
|
|||
Die Kennzahl erlaubt keine leeren Werte
|
||||
</Typography>
|
||||
</Box>
|
||||
</>
|
||||
)}
|
||||
|
||||
<Divider sx={{ my: 3 }} />
|
||||
|
||||
|
|
|
|||
|
|
@ -188,6 +188,10 @@ export default function PDFViewer({
|
|||
);
|
||||
}, []);
|
||||
|
||||
const contentWidth = baseWidth ? baseWidth * 0.98 * zoomLevel : 0;
|
||||
const containerWidth = baseWidth ? baseWidth : 0;
|
||||
const willOverflow = contentWidth > containerWidth;
|
||||
|
||||
return (
|
||||
<Box
|
||||
display="flex"
|
||||
|
|
@ -197,11 +201,6 @@ export default function PDFViewer({
|
|||
width="100%"
|
||||
maxWidth="850px"
|
||||
margin="0 auto"
|
||||
sx={{
|
||||
backgroundColor: "#f5f5f5",
|
||||
borderRadius: 2,
|
||||
boxShadow: 2,
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
ref={containerRef}
|
||||
|
|
@ -213,11 +212,10 @@ export default function PDFViewer({
|
|||
borderRadius: 0,
|
||||
boxShadow: "none",
|
||||
overflow: "auto",
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
marginTop: 2,
|
||||
marginBottom: 2,
|
||||
display: willOverflow ? "block" : "flex",
|
||||
justifyContent: willOverflow ? "flex-start" : "center",
|
||||
alignItems: willOverflow ? "flex-start" : "center",
|
||||
padding: willOverflow ? `${Math.max(0, (500 - (contentWidth * (500 / containerWidth))) / 2)}px ${Math.max(0, (containerWidth - contentWidth) / 2)}px` : 0,
|
||||
}}
|
||||
>
|
||||
<Document
|
||||
|
|
|
|||
Loading…
Reference in New Issue