fix(web): open project demand strips in demand popover
This commit is contained in:
@@ -44,7 +44,7 @@ interface TimelineProjectPanelProps {
|
||||
onRowMouseDown: (e: React.MouseEvent, info: RowMouseDownInfo) => void;
|
||||
onRowTouchStart: (e: React.TouchEvent, info: RowMouseDownInfo) => void;
|
||||
onOpenPanel: (projectId: string) => void;
|
||||
onOpenDemandClick: (demand: OpenDemandAssignment) => void;
|
||||
onOpenDemandClick: (demand: TimelineDemandEntry, anchorX: number, anchorY: number) => void;
|
||||
onAllocationContextMenu: (
|
||||
info: { allocationId: string; projectId: string },
|
||||
anchorX: number,
|
||||
@@ -911,7 +911,7 @@ function renderOpenDemandRow(
|
||||
toLeft: (d: Date) => number,
|
||||
toWidth: (s: Date, e: Date) => number,
|
||||
rowGridLines: React.ReactNode,
|
||||
_onOpenDemandClick: (demand: OpenDemandAssignment) => void,
|
||||
onOpenDemandClick: (demand: TimelineDemandEntry, anchorX: number, anchorY: number) => void,
|
||||
onAllocMouseDown: (e: React.MouseEvent, info: AllocMouseDownInfo) => void,
|
||||
onAllocTouchStart: (e: React.TouchEvent, info: AllocMouseDownInfo) => void,
|
||||
onAllocationContextMenu: (
|
||||
@@ -1056,6 +1056,22 @@ function renderOpenDemandRow(
|
||||
);
|
||||
}}
|
||||
onMouseMove={(e) => onDemandHoverMove(e, alloc)}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onOpenDemandClick(alloc, e.clientX, e.clientY);
|
||||
}}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key !== "Enter" && e.key !== " ") {
|
||||
return;
|
||||
}
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
const rect = e.currentTarget.getBoundingClientRect();
|
||||
onOpenDemandClick(alloc, rect.left + rect.width / 2, rect.top + rect.height / 2);
|
||||
}}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
aria-label={`Open demand details for ${roleName} on ${alloc.project.name}`}
|
||||
>
|
||||
{/* Left resize handle */}
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user