feat(timeline): add pulse animation for in-flight drag mutations
Allocation bars that have active optimistic overrides (post-drag, awaiting server confirmation) now pulse subtly via animate-pulse. The pending set is derived from the existing optimisticAllocations map keys, requiring no additional state. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { rankResources } from "@capakraken/staffing";
|
||||
import { listAssignmentBookings } from "@capakraken/application";
|
||||
import { PermissionKey, type WeekdayAvailability } from "@capakraken/shared";
|
||||
import { PermissionKey, toIsoDateOrNull, type WeekdayAvailability } from "@capakraken/shared";
|
||||
import { z } from "zod";
|
||||
import { findUniqueOrThrow } from "../db/helpers.js";
|
||||
import { loadResourceDailyAvailabilityContexts } from "../lib/resource-capacity.js";
|
||||
@@ -17,10 +17,6 @@ import {
|
||||
} from "./staffing-shared.js";
|
||||
import { buildResourceCapacitySummary } from "./staffing-capacity-summary.js";
|
||||
|
||||
function fmtDate(value: Date | null | undefined): string | null {
|
||||
return value ? value.toISOString().slice(0, 10) : null;
|
||||
}
|
||||
|
||||
type StaffingSuggestionInput = {
|
||||
requiredSkills: string[];
|
||||
preferredSkills?: string[] | undefined;
|
||||
@@ -415,7 +411,7 @@ export const staffingSuggestionsReadProcedures = {
|
||||
});
|
||||
return {
|
||||
project: `${project.name} (${project.shortCode})`,
|
||||
period: `${fmtDate(startDate)} to ${fmtDate(endDate)}`,
|
||||
period: `${toIsoDateOrNull(startDate)} to ${toIsoDateOrNull(endDate)}`,
|
||||
suggestions: suggestions
|
||||
.filter((suggestion) => {
|
||||
if (!normalizedRoleFilter) {
|
||||
|
||||
Reference in New Issue
Block a user