Timeline: draw stage-period ranges from activities, milestones on top
Each stage-transition activity now becomes a horizontal range on its lane: start = the activity's date, end = the next activity with a higher stage rank, or extending to today if still in effect. Milestone date-field dots overlay on top of the ranges. Activity dots at each range start carry a tooltip with the activity subject. Added computeStageRanges in lib/stageRank.ts and switched DateTimeline to take activities directly (deriving both the rank resolver and the ranges internally). Wide year-spanning timelines now show their full extent even when no milestone dates have been entered.
This commit is contained in:
@@ -10,7 +10,7 @@ import type {
|
||||
StageSectionConfig,
|
||||
} from "@/types/form";
|
||||
import { STAGE_OPTION_GROUP_ID } from "@/config/form";
|
||||
import { STAGE_RANK, buildStageRankAtDate } from "@/lib/stageRank";
|
||||
import { STAGE_RANK } from "@/lib/stageRank";
|
||||
import { StageIcon } from "./StageIcon";
|
||||
import {
|
||||
FieldHistoryGroup,
|
||||
@@ -121,7 +121,7 @@ export function ReportView({ config, cid, cs }: ReportViewProps) {
|
||||
<DateTimeline
|
||||
sections={config.sections}
|
||||
fieldHistory={data.fieldHistory}
|
||||
stageRankAtDate={buildStageRankAtDate(data.activities)}
|
||||
activities={data.activities}
|
||||
/>
|
||||
|
||||
{sectionsToRender.length === 0 ? (
|
||||
|
||||
Reference in New Issue
Block a user