Labels: complexity: high
Add getScheduledReleaseCountdown(invoice) that computes the time remaining until a scheduled release fires. Returns a structured object with days, hours, minutes, seconds, and whether the release is overdue.
Acceptance criteria:
- Returns
{ total_seconds: number, days, hours, minutes, seconds, overdue: boolean }
- Returns
null when invoice has no scheduled_release_at
- Pure function, no RPC calls needed
- Exported with full TypeScript types
Labels: complexity: high
Add
getScheduledReleaseCountdown(invoice)that computes the time remaining until a scheduled release fires. Returns a structured object with days, hours, minutes, seconds, and whether the release is overdue.Acceptance criteria:
{ total_seconds: number, days, hours, minutes, seconds, overdue: boolean }nullwhen invoice has noscheduled_release_at