From fe23207e5a570163e018d08b2f3852f4db0b9377 Mon Sep 17 00:00:00 2001 From: Bhanu Prakash Sai Potteri Date: Fri, 22 May 2026 23:52:25 +0530 Subject: [PATCH] Map rv-screen UUID to its corresponding dv-screen for row clicks --- src/components/AppShell.tsx | 10 +++++++--- src/config.ts | 10 ++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/components/AppShell.tsx b/src/components/AppShell.tsx index 92b63c7..7055def 100644 --- a/src/components/AppShell.tsx +++ b/src/components/AppShell.tsx @@ -10,7 +10,7 @@ import { getHeaderConfig, getScreen, getAuditLog, getInstance, type LayoutElement, type NavItem, type AuditEntry, } from "../api/viewService"; -import { WORKFLOW_ID, ACTIVITY_IDS, STATE_IDS, DETAIL_VIEW_IDS } from "../config"; +import { WORKFLOW_ID, ACTIVITY_IDS, STATE_IDS, DETAIL_VIEW_IDS, RV_TO_DV_SCREEN } from "../config"; // State → contextual action buttons shown above the detail view. const ACTIVITY_META: Record = { @@ -244,10 +244,14 @@ export default function AppShell() { )} - {/* Detail panel — uses the deployed instance detail view */} + {/* Detail panel — picks the dv-screen matching the active rv; + falls back to the shared dv-template UID when no mapping exists. */} diff --git a/src/config.ts b/src/config.ts index 23bc679..4ab0fb4 100644 --- a/src/config.ts +++ b/src/config.ts @@ -29,6 +29,16 @@ export const DETAIL_VIEW_IDS = { INSTANCE_DETAIL: "7865e1d9-9f7c-489e-a12b-98463ebbb5c1", } as const; +// rv-screen source_uuid → dv-screen source_uuid (one dv per nav screen). +// Used until row-click jobs are added on the rv_tables in studio. +export const RV_TO_DV_SCREEN: Record = { + "cffbba09-ec08-4f23-8cc2-a03a7028ea47": "05169c21-b5a5-4aa1-8faa-b0ddc8989c7d", // Active Scheduling + "4b8e47b4-4e00-43dd-b29b-4c5247ddac64": "ca9d2c41-f998-44ae-95d7-299b4c8aa895", // Scheduled Test Drives + "dbed01b6-462b-4208-8d21-81f814a4001c": "1eb72636-f6fc-41b6-9107-775f93de1fa1", // Pending Feedback + "1c29b808-27fa-4b7a-9664-a80ceda232bc": "f9828eb2-2c32-4a87-b7f1-fc0c8c16ac86", // Completed + "e5ad5164-16ea-4a70-96a0-e9f35e49216d": "f07f3a7f-300e-4040-b5ff-dba75493738a", // Leads +}; + // Workflow states export const STATE_IDS = { AWAITING_SCHEDULER_CALL: "9df9c9fa-7222-446c-a9f5-a40c8dbe91c2",