gantt-lib 0.114.0 → 0.115.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -10791,7 +10791,11 @@ function PlanFactRowInner({
10791
10791
  const planValue = task.planByDate?.[dateKey];
10792
10792
  const factValue = task.factByDate?.[dateKey];
10793
10793
  const value = kind === "plan" ? planValue : factValue;
10794
- const factStatus = factValue === void 0 || planValue === void 0 ? null : factValue >= planValue ? "success" : "warning";
10794
+ const isPastReportDate = todayDateIndex !== void 0 && dateIndex < todayDateIndex;
10795
+ const hasPlannedWork = (planValue ?? 0) > 0;
10796
+ const isMissingOrZeroFact = factValue === void 0 || factValue === 0;
10797
+ const isFactBelowPlan = kind === "fact" && factValue !== void 0 && planValue !== void 0 && factValue < planValue;
10798
+ const isPastDueMissingFact = kind === "fact" && isPastReportDate && hasPlannedWork && isMissingOrZeroFact;
10795
10799
  const isActive = activeCell?.taskId === task.id && activeCell.dateIndex === dateIndex && activeCell.kind === kind;
10796
10800
  const isEditing = editingCell?.taskId === task.id && editingCell.dateIndex === dateIndex && editingCell.kind === kind;
10797
10801
  const currentCell = { taskId: task.id, dateIndex, kind };
@@ -10809,8 +10813,7 @@ function PlanFactRowInner({
10809
10813
  `gantt-pf-cell-${kind}`,
10810
10814
  !isParent && planned && kind === "plan" && "gantt-pf-cell-planned",
10811
10815
  !isParent && value !== void 0 && "gantt-pf-cell-hasValue",
10812
- !isParent && kind === "fact" && factStatus === "success" && "gantt-pf-cell-factSuccess",
10813
- !isParent && kind === "fact" && factStatus === "warning" && "gantt-pf-cell-factWarning",
10816
+ !isParent && (isFactBelowPlan || isPastDueMissingFact) && "gantt-pf-cell-factWarning",
10814
10817
  isSelected && "gantt-pf-cell-selected",
10815
10818
  isInRenderedRange && renderedRangeBounds !== null && dateIndex === renderedRangeBounds.fromDateIndex && "gantt-pf-cell-rangeLeft",
10816
10819
  isInRenderedRange && renderedRangeBounds !== null && dateIndex === renderedRangeBounds.toDateIndex && "gantt-pf-cell-rangeRight",