fix: Navigation bug
All checks were successful
Deploy to Staging / Build Images (push) Successful in 3m41s
Deploy to Staging / Deploy to Staging (push) Successful in 53s
Deploy to Staging / Verify Staging (push) Successful in 9s
Deploy to Staging / Notify Staging Ready (push) Successful in 9s
Deploy to Staging / Notify Staging Failure (push) Has been skipped
All checks were successful
Deploy to Staging / Build Images (push) Successful in 3m41s
Deploy to Staging / Deploy to Staging (push) Successful in 53s
Deploy to Staging / Verify Staging (push) Successful in 9s
Deploy to Staging / Notify Staging Ready (push) Successful in 9s
Deploy to Staging / Notify Staging Failure (push) Has been skipped
This commit is contained in:
@@ -14,6 +14,7 @@ import { GlassCard } from '../../../shared-minimal/components/mobile/GlassCard';
|
|||||||
import { Button } from '../../../shared-minimal/components/Button';
|
import { Button } from '../../../shared-minimal/components/Button';
|
||||||
import { PendingAssociationBanner } from '../../email-ingestion/components/PendingAssociationBanner';
|
import { PendingAssociationBanner } from '../../email-ingestion/components/PendingAssociationBanner';
|
||||||
import { PendingAssociationList } from '../../email-ingestion/components/PendingAssociationList';
|
import { PendingAssociationList } from '../../email-ingestion/components/PendingAssociationList';
|
||||||
|
import { AddFuelLogDialog } from '../../fuel-logs/components/AddFuelLogDialog';
|
||||||
import { MobileScreen } from '../../../core/store';
|
import { MobileScreen } from '../../../core/store';
|
||||||
import { Vehicle } from '../../vehicles/types/vehicles.types';
|
import { Vehicle } from '../../vehicles/types/vehicles.types';
|
||||||
|
|
||||||
@@ -54,10 +55,11 @@ export const DashboardScreen: React.FC<DashboardScreenProps> = ({
|
|||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const isSmall = useMediaQuery(theme.breakpoints.down('sm'));
|
const isSmall = useMediaQuery(theme.breakpoints.down('sm'));
|
||||||
const [showPendingReceipts, setShowPendingReceipts] = useState(false);
|
const [showPendingReceipts, setShowPendingReceipts] = useState(false);
|
||||||
|
const [showAddFuelLog, setShowAddFuelLog] = useState(false);
|
||||||
const { data: roster, vehicles, isLoading, error } = useVehicleRoster();
|
const { data: roster, vehicles, isLoading, error } = useVehicleRoster();
|
||||||
|
|
||||||
const handleAddVehicle = onAddVehicle ?? (() => onNavigate?.('Vehicles'));
|
const handleAddVehicle = onAddVehicle ?? (() => onNavigate?.('Vehicles'));
|
||||||
const handleLogFuel = () => onNavigate?.('Log Fuel');
|
const handleLogFuel = () => setShowAddFuelLog(true);
|
||||||
const handleVehicleClick = (vehicleId: string) => {
|
const handleVehicleClick = (vehicleId: string) => {
|
||||||
const vehicle = vehicles?.find(v => v.id === vehicleId);
|
const vehicle = vehicles?.find(v => v.id === vehicleId);
|
||||||
if (vehicle && onVehicleClick) {
|
if (vehicle && onVehicleClick) {
|
||||||
@@ -188,6 +190,9 @@ export const DashboardScreen: React.FC<DashboardScreenProps> = ({
|
|||||||
<PendingAssociationList />
|
<PendingAssociationList />
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
|
{/* Add Fuel Log Dialog */}
|
||||||
|
<AddFuelLogDialog open={showAddFuelLog} onClose={() => setShowAddFuelLog(false)} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user