Skip to content

Commit

Permalink
Update grid-6 to grid-5 (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
neb417 authored Nov 15, 2023
1 parent 60762ee commit 80b114b
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion app/views/budget/_budget_headings.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div id="salary_budget_labels" class="grid grid-cols-6">
<div id="salary_budget_labels" class="grid grid-cols-5">
<div class=""></div>
<div class="px-5 py-4 col-1">
Fixed Expense
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%= turbo_frame_tag dom_id(federal_tax_bracket) do %>
<div class="grid grid-cols-6">
<div class="grid grid-cols-5">
<% attributes = federal_tax_bracket.tier, humanized_money_with_symbol(federal_tax_bracket.bottom_range), humanized_money_with_symbol(federal_tax_bracket.top_range), number_to_percentage(federal_tax_bracket.rate * 100, precision: 1), humanized_money_with_symbol(federal_tax_bracket.cumulative) %>
<% attributes.each do |attribute| %>
<div class="px-5 py-1"><%= attribute %></div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/federal_tax_brackets/_index.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="grid grid-cols-6">
<div class="grid grid-cols-5">
<% tax_headings = %w[Tier From To Rate Cumulative] %>
<% tax_headings.each do |tax_heading| %>
<div class="px-5"><strong><%= tax_heading %></strong></div>
Expand Down
8 changes: 5 additions & 3 deletions app/views/fixed_expenses/_fixed_expense.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<%= turbo_frame_tag dom_id(fixed_expense) do %>
<div class="grid grid-cols-6 pb-1">
<div class="grid grid-cols-5 pb-1">
<% attributes = [fixed_expense.expense_name, humanized_money_with_symbol(fixed_expense.annual_cost), humanized_money_with_symbol(fixed_expense.monthly_cost), humanized_money_with_symbol(fixed_expense.bi_weekly_cost)] %>
<% attributes.each do |attribute| %>
<div class="px-5"><%= attribute %></div>
<% end %>
<div class=""><%= link_to "Edit", edit_fixed_expense_path(fixed_expense), class:"btn btn-primary" %></div>
<div class=""><%= button_to "Delete", fixed_expense_path(fixed_expense), method: :delete, class:"btn btn-danger" %></div>
<div class="flex">
<%= link_to "Edit", edit_fixed_expense_path(fixed_expense), class:"btn btn-primary" %>
<%= button_to "Delete", fixed_expense_path(fixed_expense), method: :delete, class:"btn btn-danger ml-1" %>
</div>
</div>
<% end %>
2 changes: 1 addition & 1 deletion app/views/fixed_expenses/_index.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div id="fixed_expense_labels" class="grid grid-cols-6">
<div id="fixed_expense_labels" class="grid grid-cols-5">
<% fixed_headings = %w[Expense Annual Monthly Bi-weekly] %>
<% fixed_headings.each do |fixed_heading| %>
<div class="px-5 pt-4"><strong><%= fixed_heading %></strong></div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/incomes/_income.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%= turbo_frame_tag dom_id(income) do %>
<div class="grid grid-cols-6 pb-1">
<div class="grid grid-cols-5 pb-1">
<% attributes = [income.income_type, humanized_money_with_symbol(income.rate), income.hours, humanized_money_with_symbol(income.weekly_income)] %>
<% attributes.each do |attribute| %>
<div class="px-5"><%= attribute %></div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/incomes/_index.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<strong>Net Income</strong>
<div class="grid grid-cols-6">
<div class="grid grid-cols-5">
<% income_headings = ["Income Type", "Rate", "Hours", "Weekly Gross"] %>
<% income_headings.each do |income_heading| %>
<div class="px-5"><strong><%= income_heading %></strong></div>
Expand Down
14 changes: 7 additions & 7 deletions app/views/shared/_budget.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="grid grid-cols-6">
<div class="grid grid-cols-5">
<div>Daily</div>
<%= render partial: "shared/total", locals: { total: totals.total_annual_cost / 365 } %>
<div>0</div>
Expand All @@ -8,7 +8,7 @@
</div>
</div>

<div class="grid grid-cols-6">
<div class="grid grid-cols-5">
<div>Weekly</div>
<%= render partial: "shared/total", locals: { total: totals.total_bi_weekly_cost / 2 } %>
<div>0</div>
Expand All @@ -18,7 +18,7 @@
</div>
</div>

<div class="grid grid-cols-6">
<div class="grid grid-cols-5">
<div>Bi-Weekly</div>
<%= render partial: "shared/total", locals: { total: totals.total_bi_weekly_cost } %>
<div>0</div>
Expand All @@ -28,7 +28,7 @@
</div>
</div>

<div class="grid grid-cols-6">
<div class="grid grid-cols-5">
<div>Monthly</div>
<%= render partial: "shared/total", locals: { total: totals.total_monthly_cost } %>
<div>0</div>
Expand All @@ -38,7 +38,7 @@
</div>
</div>

<div class="grid grid-cols-6">
<div class="grid grid-cols-5">
<div>Quarterly</div>
<%= render partial: "shared/total", locals: { total: totals.total_annual_cost / 4 } %>
<div>0</div>
Expand All @@ -48,7 +48,7 @@
</div>
</div>

<div class="grid grid-cols-6">
<div class="grid grid-cols-5">
<div>Biannual</div>
<%= render partial: "shared/total", locals: { total: totals.total_annual_cost / 4 } %>
<div>0</div>
Expand All @@ -58,7 +58,7 @@
</div>
</div>

<div class="grid grid-cols-6">
<div class="grid grid-cols-5">
<div>Annually</div>
<%= render partial: "shared/total", locals: { total: totals.total_annual_cost } %>

Expand Down
6 changes: 3 additions & 3 deletions app/views/shared/_taxed_incomes.html.erb
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<strong>Gross Income</strong>
<div class="grid grid-cols-6">
<div class="grid grid-cols-5">
<% fixed_headings = ["Income Type", "Federal Tax", "State Tax", "Annual", "Bi-weekly"] %>
<% fixed_headings.each do |fixed_heading| %>
<div class="px-5"><strong><%= fixed_heading %></strong></div>
<% end %>
</div>

<div class="grid grid-cols-6">
<div class="grid grid-cols-5">
<div class="px-5">Salary</div>
<%= render partial: "shared/taxed_income", locals: { taxed_income: salary_taxed} %>
</div>

<div class="grid grid-cols-6">
<div class="grid grid-cols-5">
<div class="px-5">Hourly</div>
<%= render partial: "shared/taxed_income", locals: { taxed_income: hourly_taxed} %>
</div>
2 changes: 1 addition & 1 deletion app/views/shared/_total_costs.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="grid grid-cols-6">
<div class="grid grid-cols-5">
<div class="px-5">
<strong>Total</strong>
</div>
Expand Down

0 comments on commit 80b114b

Please sign in to comment.