fix(web): portal timeline overlays above stacked panels

This commit is contained in:
2026-03-30 13:18:08 +02:00
parent 58824545fc
commit e20bf64eef
5 changed files with 22 additions and 6 deletions
@@ -2,6 +2,7 @@
import { clsx } from "clsx";
import { useEffect, useRef, useState } from "react";
import { createPortal } from "react-dom";
import { AllocationStatus } from "@capakraken/shared";
import { trpc } from "~/lib/trpc/client.js";
import { useInvalidateTimeline } from "~/hooks/useInvalidatePlanningViews.js";
@@ -88,7 +89,7 @@ export function NewAllocationPopover({
const canCreate = !!selectedProjectId && !!start && !!end && hoursPerDay > 0;
return (
const popover = (
<div
ref={ref}
style={style}
@@ -238,4 +239,6 @@ export function NewAllocationPopover({
</div>
</div>
);
return typeof document === "undefined" ? popover : createPortal(popover, document.body);
}