Map rv-screen UUID to its corresponding dv-screen for row clicks
This commit is contained in:
parent
e58951b46e
commit
fe23207e5a
@ -10,7 +10,7 @@ import {
|
|||||||
getHeaderConfig, getScreen, getAuditLog, getInstance,
|
getHeaderConfig, getScreen, getAuditLog, getInstance,
|
||||||
type LayoutElement, type NavItem, type AuditEntry,
|
type LayoutElement, type NavItem, type AuditEntry,
|
||||||
} from "../api/viewService";
|
} 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.
|
// State → contextual action buttons shown above the detail view.
|
||||||
const ACTIVITY_META: Record<string, { label: string; icon: React.ReactNode; style: "primary" | "ghost" }> = {
|
const ACTIVITY_META: Record<string, { label: string; icon: React.ReactNode; style: "primary" | "ghost" }> = {
|
||||||
@ -244,10 +244,14 @@ export default function AppShell() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* 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. */}
|
||||||
<DetailViewPanel
|
<DetailViewPanel
|
||||||
key={`dv-${detailInstanceId}-${refreshKey}`}
|
key={`dv-${detailInstanceId}-${refreshKey}`}
|
||||||
viewId={DETAIL_VIEW_IDS.INSTANCE_DETAIL}
|
viewId={
|
||||||
|
(activeScreenId && RV_TO_DV_SCREEN[activeScreenId]) ||
|
||||||
|
DETAIL_VIEW_IDS.INSTANCE_DETAIL
|
||||||
|
}
|
||||||
instanceId={detailInstanceId}
|
instanceId={detailInstanceId}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@ -29,6 +29,16 @@ export const DETAIL_VIEW_IDS = {
|
|||||||
INSTANCE_DETAIL: "7865e1d9-9f7c-489e-a12b-98463ebbb5c1",
|
INSTANCE_DETAIL: "7865e1d9-9f7c-489e-a12b-98463ebbb5c1",
|
||||||
} as const;
|
} 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<string, string> = {
|
||||||
|
"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
|
// Workflow states
|
||||||
export const STATE_IDS = {
|
export const STATE_IDS = {
|
||||||
AWAITING_SCHEDULER_CALL: "9df9c9fa-7222-446c-a9f5-a40c8dbe91c2",
|
AWAITING_SCHEDULER_CALL: "9df9c9fa-7222-446c-a9f5-a40c8dbe91c2",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user