From 408a0736c0f062ebe53d9fca76073cccba3fb901 Mon Sep 17 00:00:00 2001
From: Eric Gullickson <16152721+ericgullickson@users.noreply.github.com>
Date: Sat, 8 Nov 2025 15:34:29 -0600
Subject: [PATCH] Almost ready
---
CLAUDE.md | 4 +-
.../stations/domain/stations.service.ts | 18 +++-
docs/README.md | 2 +-
.../features/fuel-logs/pages/FuelLogsPage.tsx | 6 +-
.../components/SubtypeCheckboxGroup.tsx | 84 +++++++++----------
.../maintenance/pages/MaintenancePage.tsx | 10 +--
.../stations/components/StationMap.tsx | 2 +-
7 files changed, 66 insertions(+), 60 deletions(-)
diff --git a/CLAUDE.md b/CLAUDE.md
index 6cfde2a..0a2b2a3 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -25,12 +25,12 @@ Maintain professional documentation standards without emoji usage.
File: `frontend/package.json`
- Add `"{package}": "{version}"` to dependencies
- No npm install needed - handled by container rebuild
-- Testing: `make rebuild` then verify container starts
+- Testing: Instruct user to rebuild the containers and report back build errors
### 2. Container-Validated Development Workflow (Production-only)
```bash
# After each change:
-make rebuild # Rebuilds containers with new dependencies
+Instruct user to rebuild the containers and report back build errors
make logs # Monitor for build/runtime errors
```
diff --git a/backend/src/features/stations/domain/stations.service.ts b/backend/src/features/stations/domain/stations.service.ts
index 9e27fd0..9ed5162 100644
--- a/backend/src/features/stations/domain/stations.service.ts
+++ b/backend/src/features/stations/domain/stations.service.ts
@@ -125,18 +125,32 @@ export class StationsService {
async getUserSavedStations(userId: string) {
const savedStations = await this.repository.getUserSavedStations(userId);
-
+
// Enrich with cached station data
const enriched = await Promise.all(
savedStations.map(async (saved: SavedStation) => {
const station = await this.repository.getCachedStation(saved.stationId);
+
+ // Flatten station data into top level to match frontend SavedStation type
+ // Frontend expects SavedStation to extend Station
return {
...saved,
+ // Merge cached station data at top level (with fallbacks if cache miss)
+ name: station?.name || saved.nickname || 'Saved Station',
+ address: station?.address || '',
+ latitude: station?.latitude || 0,
+ longitude: station?.longitude || 0,
+ rating: station?.rating,
+ photoUrl: station?.photoUrl,
+ priceRegular: station?.priceRegular,
+ pricePremium: station?.pricePremium,
+ priceDiesel: station?.priceDiesel,
+ // Keep nested station for compatibility
station
};
})
);
-
+
return enriched;
}
diff --git a/docs/README.md b/docs/README.md
index e49e701..e7655c2 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -11,7 +11,7 @@ Project documentation hub for the 5-container single-tenant architecture with in
- Testing (containers only): `docs/TESTING.md`
- Database Migration: `docs/DATABASE-MIGRATION.md`
- Admin feature: `docs/ADMIN.md` - Role management, APIs, catalog CRUD, station oversight
-- Development commands: `Makefile`, `docker-compose.yml`
+- Development Environment: `docker-compose.yml`
- Application features (start at each README):
- `backend/src/features/admin/README.md` - Admin role management and oversight
- `backend/src/features/platform/README.md` - Vehicle data and VIN decoding
diff --git a/frontend/src/features/fuel-logs/pages/FuelLogsPage.tsx b/frontend/src/features/fuel-logs/pages/FuelLogsPage.tsx
index 2cfb014..01c4f08 100644
--- a/frontend/src/features/fuel-logs/pages/FuelLogsPage.tsx
+++ b/frontend/src/features/fuel-logs/pages/FuelLogsPage.tsx
@@ -84,14 +84,14 @@ export const FuelLogsPage: React.FC = () => {
- Recent Fuel Logs
+ Summary
+
+ Recent Fuel Logs
- Summary
-
diff --git a/frontend/src/features/maintenance/components/SubtypeCheckboxGroup.tsx b/frontend/src/features/maintenance/components/SubtypeCheckboxGroup.tsx
index 3f8922f..2699838 100644
--- a/frontend/src/features/maintenance/components/SubtypeCheckboxGroup.tsx
+++ b/frontend/src/features/maintenance/components/SubtypeCheckboxGroup.tsx
@@ -1,10 +1,10 @@
/**
- * @ai-summary Reusable checkbox group for maintenance subtype selection
- * @ai-context Responsive grid layout with proper mobile touch targets
+ * @ai-summary Multi-select dropdown for maintenance subtype selection
+ * @ai-context Material-UI Autocomplete with proper mobile touch targets
*/
import React from 'react';
-import { FormGroup, FormControlLabel, Checkbox, Box } from '@mui/material';
+import { Autocomplete, TextField, Chip } from '@mui/material';
import { MaintenanceCategory, getSubtypesForCategory } from '../types/maintenance.types';
interface SubtypeCheckboxGroupProps {
@@ -20,52 +20,44 @@ export const SubtypeCheckboxGroup: React.FC = ({
}) => {
const availableSubtypes = getSubtypesForCategory(category);
- const handleToggle = (subtype: string) => {
- const newSelected = selected.includes(subtype)
- ? selected.filter((s) => s !== subtype)
- : [...selected, subtype];
- onChange(newSelected);
- };
-
return (
-
-
- {availableSubtypes.map((subtype) => (
- handleToggle(subtype)}
- sx={{
- minWidth: 44,
- minHeight: 44,
- '& .MuiSvgIcon-root': {
- fontSize: 24,
- },
- }}
- />
- }
- label={subtype}
+ onChange(newValue)}
+ disableCloseOnSelect
+ renderInput={(params) => (
+
+ )}
+ renderTags={(value, getTagProps) =>
+ value.map((option, index) => (
+
- ))}
-
-
+ ))
+ }
+ sx={{
+ '& .MuiAutocomplete-option': {
+ minHeight: 44,
+ fontSize: { xs: 14, sm: 16 },
+ },
+ }}
+ />
);
};
diff --git a/frontend/src/features/maintenance/pages/MaintenancePage.tsx b/frontend/src/features/maintenance/pages/MaintenancePage.tsx
index 9c1d065..d8fde08 100644
--- a/frontend/src/features/maintenance/pages/MaintenancePage.tsx
+++ b/frontend/src/features/maintenance/pages/MaintenancePage.tsx
@@ -86,14 +86,14 @@ export const MaintenancePage: React.FC = () => {
return (
-
- {/* Left Column: Form */}
-
+
+ {/* Top: Form */}
+
- {/* Right Column: Records List */}
-
+ {/* Bottom: Records List */}
+
Recent Maintenance Records
diff --git a/frontend/src/features/stations/components/StationMap.tsx b/frontend/src/features/stations/components/StationMap.tsx
index 4c861ec..a72237b 100644
--- a/frontend/src/features/stations/components/StationMap.tsx
+++ b/frontend/src/features/stations/components/StationMap.tsx
@@ -46,6 +46,7 @@ export const StationMap: React.FC = ({
const infoWindows = useRef([]);
const currentLocationMarker = useRef(null);
const isInitializing = useRef(false);
+ const mapIdRef = useRef(null);
const [isLoading, setIsLoading] = useState(true);
const [error, setError] = useState(null);
@@ -368,4 +369,3 @@ export const StationMap: React.FC = ({
};
export default StationMap;
- const mapIdRef = useRef(null);