Commit Graph

6 Commits

Author SHA1 Message Date
96d7314317 Move Geofence toggle button to map header next to Export
Relocated the "Show/Hide Geofences" toggle button from floating
position (top-right corner) to the main header toolbar.

**Changes:**
- Moved toggle button to header, positioned between Export and Admin buttons
- Converted showGeofences from local state to prop passed from parent
- Button now matches header design system (same styling as Export/Admin)
- Purple background when active, white when inactive
- Better UX: All controls now in one consistent location

**New Button Position:**
Export | Show/Hide Geofences | Admin | Logout

Much cleaner and more intuitive than the floating button!

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 23:45:27 +00:00
fe3c572ad9 Add Geofence visualization layer on map
Implemented visual representation of geofences on the main map view:

**New Component:**
- GeofenceLayer.tsx - Renders active geofences as circles with:
  - Configurable opacity (15% fill, 80% border)
  - Color matching from geofence settings
  - Interactive popups showing zone details (name, device, radius, coordinates)
  - Auto-refresh every 30 seconds

**Map Integration:**
- Added toggle button to show/hide geofences (top-right corner)
- Purple button when active, white when hidden
- Only displays active geofences (is_active = 1)
- Geofences render below markers for better visibility

**Features:**
- Real-time sync with geofence management
- Responsive to geofence changes (color, radius, status)
- Clean visual hierarchy with location markers on top
- Hover/click popups for detailed zone information

Users can now visually see their geofence zones on the map and
understand the spatial relationship between device locations and zones.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 23:09:53 +00:00
e64a22dee5 Clean up development artifacts and obsolete code
Dependencies:
- Remove unused bcrypt package (only bcryptjs is used)
- Remove @types/bcrypt (only @types/bcryptjs needed)

Scripts cleanup:
- Delete migration scripts (one-time use, already applied):
  - add-mqtt-tables.js
  - add-parent-user-column.js
  - migrate-device-ownership.js
  - fix-acl-topic-patterns.js
  - update-acl-permission.js
- Delete personal test/debug scripts:
  - reset-joachim-password.js
  - test-joachim-password.js
  - check-admin.js
  - check-user-password.js
  - test-password.js
  - test-device-access.js
  - test-user-visibility.js
- Move change-mqtt-admin-password.sh to scripts/ directory

Code cleanup:
- Remove debug console.log statements from:
  - app/api/locations/ingest/route.ts
  - components/map/MapView.tsx (2 debug logs)
  - lib/db.ts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 09:03:18 +00:00
7aab1ab789 Move types to lib directory for better organization
- Move types/location.ts to lib/types.ts
- Update all imports from @/types/location to @/lib/types
- Remove empty types/ directory
- Better aligns with Next.js conventions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 08:56:31 +00:00
b1190e2e50 Edit files 2025-11-24 20:33:15 +00:00
843e93a274 first commit 2025-11-24 16:30:37 +00:00