Skip to content

Commit

Permalink
Revert fed_tax turbo. (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
neb417 authored Nov 7, 2024
1 parent 5c1f6c9 commit be79052
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 30 deletions.
4 changes: 0 additions & 4 deletions app/controllers/federal_tax_brackets_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ class FederalTaxBracketsController < ApplicationController
# GET /federal_tax_brackets or /federal_tax_brackets.json
def index
@federal_tax_brackets = FederalTaxBracket.order_by_range
respond_to do |format|
format.turbo_stream
format.html
end
end

# GET /federal_tax_brackets/1 or /federal_tax_brackets/1.json
Expand Down
2 changes: 1 addition & 1 deletion app/views/components/_toolbar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<%= link_to "Budget Calculator", root_path, data: { turbo_stream: true }, class: active_tab == :budget_calculator ? "active-toolbar-tab" : "inactive-toolbar-tab" %>
</li>
<li class="mx-auto">
<%= link_to "Federal Tax Brackets", federal_tax_brackets_path, data: { turbo_stream: true }, class: active_tab == :federal_tax_brackets ? "active-toolbar-tab" : "inactive-toolbar-tab" %>
<%= link_to "Federal Tax Brackets", federal_tax_brackets_path, data: { turbo: false }, class: active_tab == :federal_tax_brackets ? "active-toolbar-tab" : "inactive-toolbar-tab" %>
</li>
<li class="mx-auto">
<%= link_to "Incomes", incomes_path, data: { turbo: false }, class: active_tab == :incomes ? "active-toolbar-tab" : "inactive-toolbar-tab" %>
Expand Down
44 changes: 21 additions & 23 deletions app/views/federal_tax_brackets/_index.html.erb
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
<%= turbo_frame_tag "primary_frame" do %>
<%= turbo_frame_tag :federal_tax_brackets do %>
<div class="min-h-full">
<div class="primary-card">
<div class="mx-auto py-6 sm:px-6 lg:px-8">
<div class="flex flex-row">
<h1 class="font-bold text-4xl mr-4">Federal Tax Brackets</h1>
<%= link_to 'New federal tax bracket', new_federal_tax_bracket_path, class: "rounded-lg p-2 bg-primary-purple inline-block font-medium text-white" %>
</div>
<%= turbo_frame_tag :federal_tax_brackets do %>
<div class="min-h-full">
<div class="primary-card">
<div class="mx-auto py-6 sm:px-6 lg:px-8">
<div class="flex flex-row">
<h1 class="font-bold text-4xl mr-4">Federal Tax Brackets</h1>
<%= link_to 'New federal tax bracket', new_federal_tax_bracket_path, class: "rounded-lg p-2 bg-primary-purple inline-block font-medium text-white" %>
</div>
</div>
</div>

<div class="primary-card">
<div class="mx-auto py-6 sm:px-6 lg:px-8">
<div class="grid grid-cols-7">
<% tax_headings = ["Filing Status", "Tier", "From", "To", "Rate", "Cumulative"] %>
<% tax_headings.each do |tax_heading| %>
<div>
<strong><%= tax_heading %></strong>
</div>
<% end %>
<div> </div>
</div>

<%= render @federal_tax_brackets %>
<div class="primary-card">
<div class="mx-auto py-6 sm:px-6 lg:px-8">
<div class="grid grid-cols-7">
<% tax_headings = ["Filing Status", "Tier", "From", "To", "Rate", "Cumulative"] %>
<% tax_headings.each do |tax_heading| %>
<div>
<strong><%= tax_heading %></strong>
</div>
<% end %>
<div> </div>
</div>

<%= render @federal_tax_brackets %>
</div>
</div>
<% end %>
</div>
<% end %>
2 changes: 0 additions & 2 deletions app/views/federal_tax_brackets/index.turbo_stream.erb

This file was deleted.

0 comments on commit be79052

Please sign in to comment.