In dashboard-shell.tsx ist der Rest-Hinweis unter Neue Ausgabe komplett raus. In budget-column.tsx habe ich den inneren Budget-Streifen auf Desktop technisch umgestellt: kein Stack mehr als Desktop-Scrollcontainer, sondern ein fester Flex-Track mit berechneter Breite plus etwas Reserve. Damit soll innerhalb einer AG nur mobil noch intern gescrollt werden, auf Desktop aber nicht mehr. Der äußere horizontale Scroll der Gesamtübersicht bleibt erhalten.
Das Demo-Zeug ist ebenfalls deutlich zurückgebaut: login-form.tsx hat keine Demo-Chips, keine vorbefüllten Zugangsdaten und keinen Demo-Hinweis mehr. In prisma/seed.ts sind die beiden Muster-Ausgaben raus, und das Seed-Passwort ist jetzt über SEED_INITIAL_PASSWORD steuerbar statt fest auf demo123!. Die sichtbare Doku in README.md ist entsprechend bereinigt.
This commit is contained in:
@@ -156,10 +156,10 @@ export function BudgetColumn({
|
||||
const [expandedRecurringExpenses, setExpandedRecurringExpenses] = useState<Record<string, boolean>>({});
|
||||
|
||||
const budgetCardWidth = 352;
|
||||
const groupCardWidth = Math.max(
|
||||
group.budgets.length * budgetCardWidth + Math.max(group.budgets.length - 1, 0) * 16 + 48,
|
||||
440
|
||||
);
|
||||
const desktopBudgetGap = 16;
|
||||
const desktopBudgetListWidth =
|
||||
group.budgets.length * budgetCardWidth + Math.max(group.budgets.length - 1, 0) * desktopBudgetGap;
|
||||
const groupCardWidth = Math.max(desktopBudgetListWidth + 64, 456);
|
||||
const canEditBudgets = canManageBudgets(viewer.role);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -368,17 +368,19 @@ export function BudgetColumn({
|
||||
</Box>
|
||||
) : null}
|
||||
|
||||
<Stack
|
||||
direction="row"
|
||||
gap={2}
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
gap: 2,
|
||||
overflowX: { xs: "auto", md: "visible" },
|
||||
overflowY: "hidden",
|
||||
pb: { xs: 1.5, md: 0 },
|
||||
alignItems: "stretch",
|
||||
scrollSnapType: { xs: "x proximity", md: "none" },
|
||||
scrollbarGutter: { xs: "stable both-edges", md: "auto" },
|
||||
overscrollBehaviorX: "contain"
|
||||
overscrollBehaviorX: "contain",
|
||||
width: { md: desktopBudgetListWidth },
|
||||
minWidth: { md: desktopBudgetListWidth }
|
||||
}}
|
||||
>
|
||||
{group.budgets.map((budget) => {
|
||||
@@ -529,9 +531,6 @@ export function BudgetColumn({
|
||||
{`Manuell erg\u00e4nzt: ${formatCurrency(budget.releasedAmount)}`}
|
||||
</Typography>
|
||||
) : null}
|
||||
<Typography variant="caption" color="text.secondary" sx={{ fontSize: "0.76rem" }}>
|
||||
{`Auto frei unter ${formatCurrency(approvalThreshold)}.`}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
||||
@@ -860,7 +859,7 @@ export function BudgetColumn({
|
||||
</Box>
|
||||
);
|
||||
})}
|
||||
</Stack>
|
||||
</Box>
|
||||
</Stack>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
@@ -1256,9 +1256,6 @@ export function DashboardShell({
|
||||
<Typography variant="h3" sx={{ fontSize: "1.35rem" }}>
|
||||
Neue Ausgabe
|
||||
</Typography>
|
||||
<Typography variant="body2" color="text.secondary" sx={{ fontSize: "0.92rem" }}>
|
||||
{`Auto frei unter ${currencyFormatter.format(approvalThreshold)}.`}
|
||||
</Typography>
|
||||
</Box>
|
||||
|
||||
<Box component="form" onSubmit={handleCreateExpense}>
|
||||
|
||||
@@ -1,22 +1,15 @@
|
||||
"use client";
|
||||
|
||||
import { Alert, Box, Button, Card, CardContent, Chip, Stack, TextField, Typography } from "@mui/material";
|
||||
import { Alert, Box, Button, Card, CardContent, Stack, TextField, Typography } from "@mui/material";
|
||||
import { signIn } from "next-auth/react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import type { FormEvent } from "react";
|
||||
import { useState } from "react";
|
||||
|
||||
const demoAccounts = [
|
||||
{ label: "Vorstand A", username: "vorstand-a" },
|
||||
{ label: "Vorstand B", username: "vorstand-b" },
|
||||
{ label: "Finanz-AG", username: "finanzen" },
|
||||
{ label: "Deko Mitglied", username: "deko" }
|
||||
];
|
||||
|
||||
export function LoginForm() {
|
||||
const router = useRouter();
|
||||
const [identifier, setIdentifier] = useState("vorstand-a");
|
||||
const [password, setPassword] = useState("demo123!");
|
||||
const [identifier, setIdentifier] = useState("");
|
||||
const [password, setPassword] = useState("");
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
@@ -62,22 +55,6 @@ export function LoginForm() {
|
||||
</Typography>
|
||||
</Box>
|
||||
|
||||
<Stack direction="row" useFlexGap flexWrap="wrap" gap={1}>
|
||||
{demoAccounts.map((account) => (
|
||||
<Chip
|
||||
key={account.username}
|
||||
label={account.label}
|
||||
onClick={() => {
|
||||
setIdentifier(account.username);
|
||||
setPassword("demo123!");
|
||||
}}
|
||||
variant="outlined"
|
||||
/>
|
||||
))}
|
||||
</Stack>
|
||||
|
||||
<Alert severity="info">{"Demo-Passwort f\u00fcr alle Konten: demo123!"}</Alert>
|
||||
|
||||
{error ? <Alert severity="error">{error}</Alert> : null}
|
||||
|
||||
<Box component="form" onSubmit={handleSubmit}>
|
||||
|
||||
Reference in New Issue
Block a user