fix: remove 3D Text component to prevent crash
This commit is contained in:
parent
86ad94f812
commit
8136f267bc
2 changed files with 12 additions and 9 deletions
|
|
@ -63,6 +63,14 @@
|
||||||
2. **Verify Walkthrough:** Confirm "Already Completed" status and that "Oops" error is resolved (via re-login).
|
2. **Verify Walkthrough:** Confirm "Already Completed" status and that "Oops" error is resolved (via re-login).
|
||||||
3. **Simplify Layout Tools:** Based on feedback, potentially replace the Drag-and-Drop designer with a "Wizard" style form that populates the 3D view.
|
3. **Simplify Layout Tools:** Based on feedback, potentially replace the Drag-and-Drop designer with a "Wizard" style form that populates the 3D view.
|
||||||
4. **METRC Integration:** Begin Phase 2 (Metrc) based on the audit findings.
|
4. **METRC Integration:** Begin Phase 2 (Metrc) based on the audit findings.
|
||||||
|
|
||||||
|
### Debug Session Update
|
||||||
|
|
||||||
|
- **Fixed API Prefixes:** Removed double `/api/api` prefix from `messagingApi` and `uploadApi`. Verified `documentsApi` and `auditApi` are clean.
|
||||||
|
- **Stabilized 3D Viewer:** Rewrote `Facility3DViewerPage` to be more robust, removing potentially crashing features (shadows) and fixing potential import issues.
|
||||||
|
- **Fixed Build:** Updated `messagingApi` types to match usage in `ShiftNotesWidget`.
|
||||||
|
- **Deployment:** Rebuilt and deployed frontend to `nexus-vector`.
|
||||||
|
|
||||||
sh auth middleware - your choice!
|
sh auth middleware - your choice!
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { useEffect, useState, useRef, Suspense } from 'react';
|
import { useEffect, useState, useRef, Suspense } from 'react';
|
||||||
import { Canvas, useThree } from '@react-three/fiber';
|
import { Canvas, useThree } from '@react-three/fiber';
|
||||||
import { OrbitControls, Text } from '@react-three/drei';
|
import { OrbitControls } from '@react-three/drei';
|
||||||
import { Loader2, Grid, ChevronDown, Building, AlertTriangle } from 'lucide-react';
|
import { Loader2, Grid3X3, ChevronDown, Building, AlertTriangle } from 'lucide-react';
|
||||||
import { layoutApi, Floor3DData, Room3D, Section3D, Position3D } from '../lib/layoutApi';
|
import { layoutApi, Floor3DData, Room3D, Section3D, Position3D } from '../lib/layoutApi';
|
||||||
import * as THREE from 'three';
|
import * as THREE from 'three';
|
||||||
|
|
||||||
|
|
@ -72,12 +72,7 @@ function Room3DBox({ room, onClick, isSelected }: { room: Room3D; onClick: () =>
|
||||||
<lineBasicMaterial attach="material" color={isSelected ? '#ffffff' : color} linewidth={2} />
|
<lineBasicMaterial attach="material" color={isSelected ? '#ffffff' : color} linewidth={2} />
|
||||||
</lineSegments>
|
</lineSegments>
|
||||||
|
|
||||||
{/* Room label */}
|
{/* Room label - Removed for stability debugging */}
|
||||||
{room.code && (
|
|
||||||
<Text position={[x, 0.1, z]} rotation={[-Math.PI / 2, 0, 0]} fontSize={0.3} color="white" anchorX="center" anchorY="middle">
|
|
||||||
{room.code}
|
|
||||||
</Text>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Sections */}
|
{/* Sections */}
|
||||||
{room.sections?.map(section => (
|
{room.sections?.map(section => (
|
||||||
|
|
@ -277,7 +272,7 @@ export default function Facility3DViewerPage() {
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
<div className="flex items-center justify-between p-4 border-b border-default">
|
<div className="flex items-center justify-between p-4 border-b border-default">
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
<h1 className="text-lg font-semibold text-primary flex items-center gap-2"><Grid size={20} className="text-accent" />3D Facility VIew</h1>
|
<h1 className="text-lg font-semibold text-primary flex items-center gap-2"><Grid3X3 size={20} className="text-accent" />3D Facility VIew</h1>
|
||||||
<FloorSelector floors={floors} currentFloorId={currentFloorId} onSelect={setCurrentFloorId} />
|
<FloorSelector floors={floors} currentFloorId={currentFloorId} onSelect={setCurrentFloorId} />
|
||||||
</div>
|
</div>
|
||||||
<StatsPanel stats={floorData.stats} />
|
<StatsPanel stats={floorData.stats} />
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue