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:
2026-04-09 13:28:46 +02:00
parent 7a5e98e2e9
commit 1df208dbcc
386 changed files with 657 additions and 81650 deletions
+37
View File
@@ -1,5 +1,42 @@
import type { WeekdayAvailability } from "../types/resource.js";
export * from "./germanStates.js";
export * from "./publicHolidays.js";
export const MILLISECONDS_PER_DAY = 86_400_000;
export function toIsoDate(value: Date | string): string {
if (typeof value === "string") return value.slice(0, 10);
return value.toISOString().slice(0, 10);
}
export function toIsoDateOrNull(value: Date | string | null | undefined): string | null {
if (!value) return null;
return toIsoDate(value);
}
export function round1(value: number): number {
return Math.round(value * 10) / 10;
}
export function averagePerWorkingDay(totalHours: number, workingDays: number): number {
if (workingDays <= 0) return 0;
return round1(totalHours / workingDays);
}
export const DAY_KEYS: readonly (keyof WeekdayAvailability)[] = [
"sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday",
] as const;
export function normalizeCityName(cityName?: string | null): string | null {
const normalized = cityName?.trim().toLowerCase();
return normalized && normalized.length > 0 ? normalized : null;
}
export function normalizeStateCode(stateCode?: string | null): string | null {
const normalized = stateCode?.trim().toUpperCase();
return normalized && normalized.length > 0 ? normalized : null;
}
export * from "./columns.js";
export * from "./dispo-import.js";
export * from "./data-classification.js";