From 7e6817b3ffe41fc0a400a36f1f6cf82a1aa25956 Mon Sep 17 00:00:00 2001 From: vladtechno Date: Fri, 5 Jun 2026 14:11:03 +0300 Subject: [PATCH] feat(repairs): street-car entry button + sheet on car select Co-Authored-By: claude-flow --- .../src/pages/repairs/CarSelectPage.tsx | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/mechanic-pwa/frontend/src/pages/repairs/CarSelectPage.tsx b/mechanic-pwa/frontend/src/pages/repairs/CarSelectPage.tsx index 17b3e96..c369415 100644 --- a/mechanic-pwa/frontend/src/pages/repairs/CarSelectPage.tsx +++ b/mechanic-pwa/frontend/src/pages/repairs/CarSelectPage.tsx @@ -18,6 +18,15 @@ export default function CarSelectPage() { const [cars, setCars] = useState([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); + const [extOpen, setExtOpen] = useState(false); + const [extPlate, setExtPlate] = useState(""); + const [extMake, setExtMake] = useState(""); + + const continueExternal = () => { + const plate = extPlate.trim(); + if (!plate) return; + navigate("/repairs/new-external", { state: { plate, make: extMake.trim() || null } }); + }; useEffect(() => { let cancelled = false; @@ -62,6 +71,13 @@ export default function CarSelectPage() {
+ {error && (
{error} @@ -96,6 +112,41 @@ export default function CarSelectPage() { )}
+ {extOpen && ( +
+
+ +

Машина с улицы

+
+
+
+ + setExtPlate(e.target.value)} + placeholder="Х999ХХ199" + className="mt-1" + onKeyDown={(e) => e.key === "Enter" && continueExternal()} + /> +
+
+ + setExtMake(e.target.value)} + placeholder="Toyota Camry" + className="mt-1" + /> +
+ +
+
+ )} ); }