feat: integrate ownership-costs UI into vehicle detail pages (refs #15)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 4m43s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 38s
Deploy to Staging / Verify Staging (pull_request) Successful in 7s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 4m43s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 38s
Deploy to Staging / Verify Staging (pull_request) Successful in 7s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
- Add OwnershipCostsList to desktop VehicleDetailPage - Add OwnershipCostsList to mobile VehicleDetailMobile - Users can now view, add, edit, and delete recurring costs directly from the vehicle detail view
This commit is contained in:
@@ -11,6 +11,7 @@ import { FuelLogResponse, UpdateFuelLogRequest } from '../../fuel-logs/types/fue
|
|||||||
import { FuelLogEditDialog } from '../../fuel-logs/components/FuelLogEditDialog';
|
import { FuelLogEditDialog } from '../../fuel-logs/components/FuelLogEditDialog';
|
||||||
import { fuelLogsApi } from '../../fuel-logs/api/fuel-logs.api';
|
import { fuelLogsApi } from '../../fuel-logs/api/fuel-logs.api';
|
||||||
import { VehicleImage } from '../components/VehicleImage';
|
import { VehicleImage } from '../components/VehicleImage';
|
||||||
|
import { OwnershipCostsList } from '../../ownership-costs';
|
||||||
|
|
||||||
interface VehicleDetailMobileProps {
|
interface VehicleDetailMobileProps {
|
||||||
vehicle: Vehicle;
|
vehicle: Vehicle;
|
||||||
@@ -225,6 +226,14 @@ export const VehicleDetailMobile: React.FC<VehicleDetailMobileProps> = ({
|
|||||||
</Card>
|
</Card>
|
||||||
</Section>
|
</Section>
|
||||||
|
|
||||||
|
<Section title="Recurring Costs">
|
||||||
|
<Card>
|
||||||
|
<CardContent>
|
||||||
|
<OwnershipCostsList vehicleId={vehicle.id} />
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
</Section>
|
||||||
|
|
||||||
<Section title="Vehicle Records">
|
<Section title="Vehicle Records">
|
||||||
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 1 }}>
|
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 1 }}>
|
||||||
<Typography variant="body2" color="text.secondary">
|
<Typography variant="body2" color="text.secondary">
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import { FuelLogEditDialog } from '../../fuel-logs/components/FuelLogEditDialog'
|
|||||||
import { FuelLogForm } from '../../fuel-logs/components/FuelLogForm';
|
import { FuelLogForm } from '../../fuel-logs/components/FuelLogForm';
|
||||||
// Unit conversions now handled by backend
|
// Unit conversions now handled by backend
|
||||||
import { fuelLogsApi } from '../../fuel-logs/api/fuel-logs.api';
|
import { fuelLogsApi } from '../../fuel-logs/api/fuel-logs.api';
|
||||||
|
import { OwnershipCostsList } from '../../ownership-costs';
|
||||||
|
|
||||||
const DetailField: React.FC<{
|
const DetailField: React.FC<{
|
||||||
label: string;
|
label: string;
|
||||||
@@ -364,6 +365,11 @@ export const VehicleDetailPage: React.FC = () => {
|
|||||||
|
|
||||||
<Divider sx={{ my: 4 }} />
|
<Divider sx={{ my: 4 }} />
|
||||||
|
|
||||||
|
{/* Recurring Ownership Costs */}
|
||||||
|
<OwnershipCostsList vehicleId={vehicle.id} />
|
||||||
|
|
||||||
|
<Divider sx={{ my: 4 }} />
|
||||||
|
|
||||||
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 2 }}>
|
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 2 }}>
|
||||||
<Typography variant="h6" sx={{ fontWeight: 600 }}>
|
<Typography variant="h6" sx={{ fontWeight: 600 }}>
|
||||||
Vehicle Records
|
Vehicle Records
|
||||||
|
|||||||
Reference in New Issue
Block a user