feat(platform): return service status in vehicle overview

This commit is contained in:
lingniu
2026-07-04 03:00:50 +08:00
parent 8dfbdc83e5
commit 1a86e5d38c
7 changed files with 65 additions and 19 deletions

View File

@@ -31,7 +31,7 @@ export default function App() {
const overview = await api.vehicleServiceOverview(new URLSearchParams({ keyword: lookupKey }));
const nextKey = overview.vin || lookupKey;
const resolved = Boolean(overview.vin);
setCurrentVehicleStatus(serviceStatusFromOverview(overview));
setCurrentVehicleStatus(overview.serviceStatus ?? serviceStatusFromOverview(overview));
setCurrentVehicleLabel(resolved ? [overview.plate, overview.vin || nextKey].filter(Boolean).join(' / ') : lookupKey);
return { resolved, nextKey, overview };
}, []);