feat(mui): consistent staggered page entrance across all 43 route pages

Adopt the PageEnter wrapper as every page's outermost render element and remove the ad-hoc per-page entrance motion.div wrappers. Every page now enters the same way — all top-level sections rise+fade in, staggered — so nothing appears instantly and the motion is identical app-wide. Presentation-only: no data/logic/hooks/invalidate/permissions touched. Embedded sub-tabs (CompanySettings, ReceivedInvoices), Login (auth shell) and the dev UiKit are intentionally excluded. Gates: tsc -b --noEmit=0, build=0, vitest 152/152.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
BOHA
2026-06-07 10:13:06 +02:00
parent b273614128
commit 39fe84ce99
43 changed files with 4956 additions and 5709 deletions

View File

@@ -2,7 +2,6 @@ import { useState } from "react";
import { useQuery } from "@tanstack/react-query";
import { useAlert } from "../context/AlertContext";
import { useAuth } from "../context/AuthContext";
import { motion } from "framer-motion";
import Box from "@mui/material/Box";
import Forbidden from "../components/Forbidden";
import { formatDate, formatDatetime } from "../utils/attendanceHelpers";
@@ -15,6 +14,7 @@ import {
ConfirmDialog,
StatusChip,
PageHeader,
PageEnter,
EmptyState,
LoadingState,
type DataColumn,
@@ -237,37 +237,25 @@ export default function LeaveRequests() {
];
return (
<Box>
<motion.div
initial={{ opacity: 0, y: 12 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.25 }}
>
<PageHeader
title="Moje žádosti"
subtitle="Přehled žádostí o nepřítomnost"
/>
</motion.div>
<PageEnter>
<PageHeader
title="Moje žádosti"
subtitle="Přehled žádostí o nepřítomnost"
/>
<motion.div
initial={{ opacity: 0, y: 12 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.25, delay: 0.06 }}
>
<Card>
<DataTable<LeaveRequest>
columns={columns}
rows={requests}
rowKey={(req) => req.id}
empty={
<EmptyState
title="Zatím nemáte žádné žádosti"
description="Novou žádost můžete podat na stránce Docházka"
/>
}
/>
</Card>
</motion.div>
<Card>
<DataTable<LeaveRequest>
columns={columns}
rows={requests}
rowKey={(req) => req.id}
empty={
<EmptyState
title="Zatím nemáte žádné žádosti"
description="Novou žádost můžete podat na stránce Docházka"
/>
}
/>
</Card>
<ConfirmDialog
isOpen={cancelModal.open}
@@ -278,6 +266,6 @@ export default function LeaveRequests() {
confirmText="Zrušit žádost"
loading={cancelMutation.isPending}
/>
</Box>
</PageEnter>
);
}