update auth layer and update driver photo loading

also return just active car in create tripe and update tripe
This commit is contained in:
m7amedez5511
2026-07-07 14:51:14 +03:00
parent a7e53f2047
commit 45f5a1dade
9 changed files with 364 additions and 171 deletions

View File

@@ -121,7 +121,7 @@ export function TripFormModal({
),
)
.catch(() => {});
get<{ data: { data: CarOption[] } }>("cars?limit=100&status=Active", token)
get<{ data: { data: CarOption[] } }>("cars?limit=100&currentStatus=Active", token)
.then((res) =>
setCars(
(res as unknown as { data: { data: CarOption[] } }).data?.data ?? [],
@@ -137,7 +137,7 @@ export function TripFormModal({
)
.catch(() => {});
}, []);
//console.log("cars", cars);
// ── Form state ────────────────────────────────────────────────────────────
const [title, setTitle] = useState(editTrip?.title ?? "");
const [driverId, setDriverId] = useState(editTrip?.driverId ?? "");
@@ -338,7 +338,7 @@ export function TripFormModal({
gap: "1rem",
}}
>
{/* ── Section: أساسيات الرحلة ── */}
{/* ── Section:trip management── */}
<p style={sectionHeadingStyle}>أساسيات الرحلة</p>
{/* Title */}