feat(plan): resolveCell/resolveGrid return arrays; dashboard shows up to 3
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -327,8 +327,9 @@ export default function PlanWork() {
|
||||
let firstDate: string | null = null;
|
||||
if (grid) {
|
||||
for (const [uidStr, byDate] of Object.entries(grid.cells)) {
|
||||
for (const [date, cell] of Object.entries(byDate)) {
|
||||
if (cell && cell.entryId === id) {
|
||||
for (const [date, cells] of Object.entries(byDate)) {
|
||||
const hit = cells.find((c) => c.entryId === id);
|
||||
if (hit) {
|
||||
userId = Number(uidStr);
|
||||
firstDate = body.date_from ?? date;
|
||||
break;
|
||||
@@ -357,10 +358,11 @@ export default function PlanWork() {
|
||||
let firstDate: string | null = null;
|
||||
if (grid) {
|
||||
for (const [uidStr, byDate] of Object.entries(grid.cells)) {
|
||||
for (const [date, cell] of Object.entries(byDate)) {
|
||||
if (cell && cell.entryId === id) {
|
||||
for (const [date, cells] of Object.entries(byDate)) {
|
||||
const hit = cells.find((c) => c.entryId === id);
|
||||
if (hit) {
|
||||
userId = Number(uidStr);
|
||||
firstDate = cell.rangeFrom ?? date;
|
||||
firstDate = hit.rangeFrom ?? date;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -402,8 +404,9 @@ export default function PlanWork() {
|
||||
let date: string | null = null;
|
||||
if (grid) {
|
||||
for (const [uidStr, byDate] of Object.entries(grid.cells)) {
|
||||
for (const [d, cell] of Object.entries(byDate)) {
|
||||
if (cell && cell.overrideId === id) {
|
||||
for (const [d, cells] of Object.entries(byDate)) {
|
||||
const hit = cells.find((c) => c.overrideId === id);
|
||||
if (hit) {
|
||||
userId = Number(uidStr);
|
||||
date = d;
|
||||
break;
|
||||
@@ -431,8 +434,9 @@ export default function PlanWork() {
|
||||
let date: string | null = null;
|
||||
if (grid) {
|
||||
for (const [uidStr, byDate] of Object.entries(grid.cells)) {
|
||||
for (const [d, cell] of Object.entries(byDate)) {
|
||||
if (cell && cell.overrideId === id) {
|
||||
for (const [d, cells] of Object.entries(byDate)) {
|
||||
const hit = cells.find((c) => c.overrideId === id);
|
||||
if (hit) {
|
||||
userId = Number(uidStr);
|
||||
date = d;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user