Plan detail
Read one action plan and render its detail view.
useActionPlanDetail reads a single plan. ActionPlanDetailView renders it.
What it is
Pass the plan’s graph IRI. null skips the read. The view shows the plan name, status, optional slots for rules,
changes and the graph, and the run history tab.
@manta-eu/react/ldo-ui also exports a useActionPlanDetail. That one takes an object, planGraphIri, optional
limit and enabled, and returns data, isLoading and error. Import the hooks one below for this detail.
Import
import { useActionPlanDetail } from "@manta-eu/react/hooks/useActionPlanDetail";
import { ActionPlanDetailView } from "@manta-eu/react/components/planning/ActionPlanDetailView";
Example
const { plan, isLoading, error } = useActionPlanDetail(planGraphIri);
return plan ? <ActionPlanDetailView plan={plan} isLoading={isLoading} error={error} /> : null;
Request
The hook takes planGraphIri: string | null.
ActionPlanDetailView takes:
plan,isLoading, anderrorexecution, withisExecuting,isComplete,isFailed,progress, andactivities(id,typeName,entityName,operation,statusofpending,in_progress, orcompleted)graphSlot,rulesSlot,changesSlot,topBarActions, andleadingActionissueCount(default0),isValidating(defaultfalse),isDryRun(defaultfalse)hideTopBar,hideChanges, andfitContent(each defaultfalse)viewMode:overview(default),visual, orhistory, andonViewModeChangeonExecute,onCancel,onRerun, andonModify, each called with the plan IRIonRunClick, called with an activity IRI
plan has iri, hasCurrentFacts, hasExecutionHistory, description, duration, state,
primaryIntegration, createdBy, and optional estimatedCost, estimatedReturn, estimatedROI, and
potentialProfit.
Response
The hook returns plan (or null), graphDocument (the plan graph, or null), isLoading, and error (a
string or null).
plan has iri, hasCurrentFacts, hasExecutionHistory, description, duration, state,
primaryIntegration, createdBy (reason and confidenceScore), and optional estimatedCost, estimatedReturn,
estimatedROI, and potentialProfit.