diff --git a/src/admin/pages/AttendanceLocation.tsx b/src/admin/pages/AttendanceLocation.tsx
index 4c3e3a5..8ece091 100644
--- a/src/admin/pages/AttendanceLocation.tsx
+++ b/src/admin/pages/AttendanceLocation.tsx
@@ -3,8 +3,10 @@ import { useQuery } from "@tanstack/react-query";
import { useAlert } from "../context/AlertContext";
import { useAuth } from "../context/AuthContext";
import Forbidden from "../components/Forbidden";
-import { useNavigate, useParams, Link } from "react-router-dom";
+import { useNavigate, useParams, Link as RouterLink } from "react-router-dom";
import { motion } from "framer-motion";
+import Box from "@mui/material/Box";
+import Typography from "@mui/material/Typography";
import L from "leaflet";
import "leaflet/dist/leaflet.css";
@@ -14,6 +16,20 @@ import {
attendanceLocationOptions,
type LocationRecord,
} from "../lib/queries/attendance";
+import { Button, Card, LoadingState, PageHeader } from "../ui";
+
+const BackIcon = (
+
+);
export default function AttendanceLocation() {
const alert = useAlert();
@@ -167,127 +183,178 @@ export default function AttendanceLocation() {
const month = shiftDateStr.substring(0, 7);
if (isPending) {
- return (
-
- );
+ return ;
}
return (
-
+
+ {/* Header */}
-
-
Poloha záznamu
-
-
-
- ← Zpět na správu
-
-
+
+ Zpět na správu
+
+ }
+ />
+ {/* Info + map card */}
-
-
+
+
{record.user_name} — {formatDate(record.shift_date)}
-
-
-
+
+
+ {/* Leaflet map — kept entirely as-is */}
{hasAnyLocation && (
)}
-
+ {/* Location detail grid */}
+
{/* Arrival */}
-
-
Příchod
-
+
+ Příchod
+
+
{record.arrival_time
? formatDatetimeLocal(record.arrival_time)
: "—"}
-
+
{hasArrivalLocation ? (
<>
-
+
{record.arrival_address || Adresa nezjištěna}
-
-
+
+
GPS: {record.arrival_lat}, {record.arrival_lng}
{record.arrival_accuracy &&
` (přesnost: ${Math.round(Number(record.arrival_accuracy))}m)`}
-
-
+
+
>
) : (
-
+
Poloha nebyla zaznamenána
-
+
)}
-
+
{/* Departure */}
{(hasDepartureLocation || record.departure_time) && (
-
-
Odchod
-
+
+ Odchod
+
+
{record.departure_time
? formatDatetimeLocal(record.departure_time)
: "—"}
-
+
{hasDepartureLocation ? (
<>
-
+
{record.departure_address || Adresa nezjištěna}
-
-
+
+
GPS: {record.departure_lat}, {record.departure_lng}
{record.departure_accuracy &&
` (přesnost: ${Math.round(Number(record.departure_accuracy))}m)`}
-
-
+
+
>
) : (
-
+
Poloha nebyla zaznamenána
-
+
)}
-
+
)}
-
-
+
+
-
+
);
}