@@ -72,35 +79,6 @@ export default function RightPanel({
>
{loading ? 'Working…' : 'Remake Schedule'}
-
- {/* Config for tonight */}
-
-
- Config for Today
-
- {tonightConfigRows.length === 0 ? (
-
No STA placement mapping available for tonight.
- ) : (
-
-
-
-
- | STA |
- Testpoint |
-
-
-
- {tonightConfigRows.map((row) => (
-
- | {row.sta} |
- {row.testPoints.join(', ')} |
-
- ))}
-
-
-
- )}
-
)
}
diff --git a/frontend/src/components/TestWindowDetailsPanel.jsx b/frontend/src/components/TestWindowDetailsPanel.jsx
index 2e650f2..fefe262 100644
--- a/frontend/src/components/TestWindowDetailsPanel.jsx
+++ b/frontend/src/components/TestWindowDetailsPanel.jsx
@@ -1,4 +1,10 @@
import { useEffect, useMemo, useState } from 'react'
+import { getDeviceAccentClass } from './TestCard'
+
+const CONFIG_MAP_IMAGE_MODULES = import.meta.glob('../assets/TC*_map/*.png', {
+ eager: true,
+ import: 'default',
+})
const STATUS_STYLES = {
pending: 'bg-gray-700 text-gray-200 border-gray-600',
@@ -90,6 +96,16 @@ function formatConfigEntries(config) {
.filter(Boolean)
}
+function getConfigMapImages(configKey) {
+ if (!configKey) return []
+
+ const folderToken = `/${configKey.toUpperCase()}_map/`
+ return Object.entries(CONFIG_MAP_IMAGE_MODULES)
+ .filter(([path]) => path.includes(folderToken))
+ .sort(([pathA], [pathB]) => pathA.localeCompare(pathB, undefined, { numeric: true }))
+ .map(([, assetUrl]) => assetUrl)
+}
+
function TestRow({ test }) {
const [expanded, setExpanded] = useState(false)
const statusStyle = STATUS_STYLES[test.status] ?? STATUS_STYLES.pending
@@ -103,15 +119,18 @@ function TestRow({ test }) {
className="w-full px-4 py-3 text-left hover:bg-gray-800/80 transition-colors"
>
-
-
{test.test_id}
-
{test.device ?? '—'} · {formatShiftLabel(test)}
+
+
+
+
{test.test_id}
+
{test.device ?? '—'} · {formatShiftLabel(test)}
+
{test.status ?? 'pending'}
- {formatHours(test.estimated_minutes)}
+ {Number.isFinite(test.estimated_minutes) && test.estimated_minutes > 0 ? `${test.estimated_minutes} min` : '—'}
@@ -127,14 +146,6 @@ function TestRow({ test }) {
Rotation
{test.rotation ?? '—'}
-
-
Priority
-
{test.priority ?? '—'}
-
-
-
Sequence
-
{test.sequence_in_shift ?? '—'}
-
@@ -171,7 +182,15 @@ function TestRow({ test }) {
}
export default function TestWindowDetailsPanel({ isOpen, windowDetails, onClose }) {
+ const [showConfigMap, setShowConfigMap] = useState(false)
const windowTestConfig = useMemo(() => getWindowTestConfig(windowDetails), [windowDetails])
+ const windowConfigMapKey = useMemo(
+ () => (windowTestConfig.length > 0 ? String(windowTestConfig[0]).toUpperCase() : null),
+ [windowTestConfig],
+ )
+ const configMapImages = useMemo(() => getConfigMapImages(windowConfigMapKey), [windowConfigMapKey])
+ const hasConfigMapImages = configMapImages.length > 0
+ const showMapPane = showConfigMap && hasConfigMapImages
useEffect(() => {
if (!isOpen) return undefined
@@ -201,11 +220,13 @@ export default function TestWindowDetailsPanel({ isOpen, windowDetails, onClose
/>