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,3 +1,16 @@
|
||||
/**
|
||||
* Format a Date for an HTML <input type="date"> value (yyyy-mm-dd, local timezone).
|
||||
* Returns "" for null/undefined.
|
||||
*/
|
||||
export function toDateInputValue(date: Date | string | null | undefined): string {
|
||||
if (!date) return "";
|
||||
const d = typeof date === "string" ? new Date(date) : date;
|
||||
const y = d.getFullYear();
|
||||
const m = String(d.getMonth() + 1).padStart(2, "0");
|
||||
const day = String(d.getDate()).padStart(2, "0");
|
||||
return `${y}-${m}-${day}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format a date as dd/mm/yyyy for display in the UI.
|
||||
* Input date inputs (type="date") still use yyyy-mm-dd — this is for rendered text only.
|
||||
|
||||
Reference in New Issue
Block a user