feat(plan): grid renders up to 3 stacked records per cell

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
BOHA
2026-06-08 11:02:13 +02:00
parent 72888bf9cd
commit a146fc26a3
3 changed files with 62 additions and 24 deletions

View File

@@ -17,7 +17,11 @@ import PlanCategoriesModal from "../components/PlanCategoriesModal";
import Forbidden from "../components/Forbidden";
import { Button, Alert, LoadingState, PageEnter } from "../ui";
import { projectListOptions, type Project } from "../lib/queries/projects";
import { planCategoriesOptions, type PlanCategory } from "../lib/queries/plan";
import {
planCategoriesOptions,
type PlanCategory,
type ResolvedCell,
} from "../lib/queries/plan";
// plan.css is imported once globally in AdminApp.tsx — no per-page re-import.
const MONTH_NAMES = [
@@ -202,7 +206,8 @@ export default function PlanWork() {
);
const openCell = useCallback(
(userId: number, date: string) => {
(userId: number, date: string, _cells: ResolvedCell[]) => {
void _cells;
const cell = getCell(grid, userId, date);
// Past-date guard: the server rejects create/edit on past dates with
// a 403 (see assertNotPastDate in plan.service.ts). To keep the user