1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-08 23:15:24 +02:00

Fix budget allocation forms from resetting and clearing data on slow networks (#1804)

* First pass

* Fix null constraint bug for budget category assignment

* Fix autofocus reset when allocating budget

* Lint fix
This commit is contained in:
Zach Gollwitzer 2025-02-05 09:09:38 -05:00 committed by GitHub
parent f498212b2d
commit 5b083c9e33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 56 additions and 53 deletions

View file

@ -21,14 +21,10 @@
</div>
<% else %>
<div class="max-w-md mx-auto">
<% if @budget.available_to_allocate.negative? %>
<%= render "budget_categories/allocation_progress_overage", budget: @budget %>
<% else %>
<%= render "budget_categories/allocation_progress", budget: @budget %>
<% end %>
<%= render "budget_categories/allocation_progress", budget: @budget %>
<div class="space-y-4 mb-4">
<% BudgetCategory::Group.for(@budget.budget_categories).sort_by(&:name).each do |group| %>
<% BudgetCategory::Group.for(@budget_categories).sort_by(&:name).each do |group| %>
<div class="space-y-4">
<%= render "budget_categories/budget_category_form", budget_category: group.budget_category %>