mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-08 23:15:24 +02:00
fix: subcategories are not properly handled for budget allocations (#1844)
* fix: `allocated_spending` logic * fix: subcategories exceeding parent limit * refactor: budget allocations and max allocation logic * feat: add stream for budget category form validation * feat: update uncategorized value via stream, refactor confirm button with stream * fix: ensure live updates for parent & sibling budgets in Turbo Stream * fix: lint issues
This commit is contained in:
parent
077694bbde
commit
fb6c6fa6bb
7 changed files with 60 additions and 13 deletions
|
@ -45,15 +45,7 @@
|
|||
<%= render "budget_categories/uncategorized_budget_category_form", budget: @budget %>
|
||||
</div>
|
||||
|
||||
<% if @budget.allocations_valid? %>
|
||||
<%= link_to "Confirm",
|
||||
budget_path(@budget),
|
||||
class: "block btn btn--primary w-full text-center" %>
|
||||
<% else %>
|
||||
<span class="block btn btn--secondary w-full text-center text-gray-400 cursor-not-allowed">
|
||||
Confirm
|
||||
</span>
|
||||
<% end %>
|
||||
<%= render "budget_categories/confirm_button", budget: @budget %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue