* feat(budgets): support custom additional spend windows
* fix(budgets): preserve window identity with shared reset helpers
* fix(budgets): normalize request timestamps before window accounting
* fix(budgets): preserve preset periods and daily reset boundaries
* fix(budgets): compare reset boundaries as UTC instants
* refactor(budgets): reuse shared duration validation, reset carry and the reset job for customer windows
Customer budget_limits now keep the submitted duration and validate through
budget_duration_error like user windows. Reset carry on edits goes through one
carry_budget_limit_resets helper shared with group_budget_patch. Customer
budget rows join the reset job's window sources, which only advance reset_at
because their counters are keyed by window start, so the anchor arithmetic in
get_next_standardized_reset_time is removed. budget_duration_error now also
rejects durations whose window start overflows.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix(budgets): type the window reset check and drop the unused overflow expression
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix(budgets): preserve concurrent edits during window resets
* Revert "fix(budgets): preserve concurrent edits during window resets"
This reverts commit 13fb3c3cea.
* fix(budgets): keep reset locals final and freeze reset tests
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix(ui): preserve custom caps during calendar budget edits
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix(ui): show and sort custom customer budget caps
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix(ui): centralize customer budget window policies
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix(ui): avoid uncapped labels for custom organization caps
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* test(budgets): retain custom counter identity across edits
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix(budgets): keep custom daily windows stable through fall back
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* Revert "fix(budgets): keep custom daily windows stable through fall back"
This reverts commit c9f6353494.
* fix(ui): remove custom budget windows edited by a form
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>