fix: mobile dashboard navigation for Add Vehicle and Maintenance
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 2m36s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 36s
Deploy to Staging / Verify Staging (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 5s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 2m36s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 36s
Deploy to Staging / Verify Staging (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 5s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
- Add Vehicle now navigates to Vehicles screen and opens add form - Add Maintenance mobile screen with records/schedules tabs - Add 'Maintenance' to MobileScreen type - Wire up onViewMaintenance callback to navigate to Maintenance screen refs #2 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -27,6 +27,7 @@ const StationsMobileScreen = lazy(() => import('./features/stations/mobile/Stati
|
||||
const VehiclesMobileScreen = lazy(() => import('./features/vehicles/mobile/VehiclesMobileScreen').then(m => ({ default: m.VehiclesMobileScreen })));
|
||||
const VehicleDetailMobile = lazy(() => import('./features/vehicles/mobile/VehicleDetailMobile').then(m => ({ default: m.VehicleDetailMobile })));
|
||||
const DocumentsMobileScreen = lazy(() => import('./features/documents/mobile/DocumentsMobileScreen'));
|
||||
const MaintenanceMobileScreen = lazy(() => import('./features/maintenance/mobile/MaintenanceMobileScreen'));
|
||||
|
||||
// Admin pages (lazy-loaded)
|
||||
const AdminUsersPage = lazy(() => import('./pages/admin/AdminUsersPage').then(m => ({ default: m.AdminUsersPage })));
|
||||
@@ -633,7 +634,12 @@ function App() {
|
||||
<DashboardFeature
|
||||
onNavigate={navigateToScreen}
|
||||
onVehicleClick={handleVehicleSelect}
|
||||
onAddVehicle={() => setShowAddVehicle(true)}
|
||||
onViewMaintenance={() => navigateToScreen('Maintenance', { source: 'dashboard-maintenance' })}
|
||||
onAddVehicle={() => {
|
||||
setShowAddVehicle(true);
|
||||
navigateToScreen('Vehicles', { source: 'dashboard-add-vehicle' });
|
||||
navigateToVehicleSubScreen('add', undefined, { source: 'dashboard-add-vehicle' });
|
||||
}}
|
||||
/>
|
||||
</MobileErrorBoundary>
|
||||
</motion.div>
|
||||
@@ -685,6 +691,31 @@ function App() {
|
||||
</MobileErrorBoundary>
|
||||
</motion.div>
|
||||
)}
|
||||
{activeScreen === "Maintenance" && (
|
||||
<motion.div
|
||||
key="maintenance"
|
||||
initial={{opacity:0, y:8}}
|
||||
animate={{opacity:1, y:0}}
|
||||
exit={{opacity:0, y:-8}}
|
||||
transition={{ duration: 0.2, ease: "easeOut" }}
|
||||
>
|
||||
<MobileErrorBoundary screenName="Maintenance">
|
||||
<React.Suspense fallback={
|
||||
<div className="space-y-4">
|
||||
<GlassCard>
|
||||
<div className="p-4">
|
||||
<div className="text-slate-500 py-6 text-center">
|
||||
Loading maintenance screen...
|
||||
</div>
|
||||
</div>
|
||||
</GlassCard>
|
||||
</div>
|
||||
}>
|
||||
<MaintenanceMobileScreen />
|
||||
</React.Suspense>
|
||||
</MobileErrorBoundary>
|
||||
</motion.div>
|
||||
)}
|
||||
{activeScreen === "Settings" && (
|
||||
<motion.div
|
||||
key="settings"
|
||||
|
||||
Reference in New Issue
Block a user