From 80b114b345508741eaa303a9806979e3505423f9 Mon Sep 17 00:00:00 2001 From: Benjamin Randolph <104036158+neb417@users.noreply.github.com> Date: Wed, 15 Nov 2023 08:29:48 -0700 Subject: [PATCH] Update grid-6 to grid-5 (#16) --- app/views/budget/_budget_headings.html.erb | 2 +- .../_federal_tax_bracket.html.erb | 2 +- app/views/federal_tax_brackets/_index.html.erb | 2 +- app/views/fixed_expenses/_fixed_expense.html.erb | 8 +++++--- app/views/fixed_expenses/_index.html.erb | 2 +- app/views/incomes/_income.html.erb | 2 +- app/views/incomes/_index.html.erb | 2 +- app/views/shared/_budget.html.erb | 14 +++++++------- app/views/shared/_taxed_incomes.html.erb | 6 +++--- app/views/shared/_total_costs.html.erb | 2 +- 10 files changed, 22 insertions(+), 20 deletions(-) diff --git a/app/views/budget/_budget_headings.html.erb b/app/views/budget/_budget_headings.html.erb index de6866d..36f8b08 100644 --- a/app/views/budget/_budget_headings.html.erb +++ b/app/views/budget/_budget_headings.html.erb @@ -1,4 +1,4 @@ -
+
Fixed Expense diff --git a/app/views/federal_tax_brackets/_federal_tax_bracket.html.erb b/app/views/federal_tax_brackets/_federal_tax_bracket.html.erb index 81cd23e..64728b6 100644 --- a/app/views/federal_tax_brackets/_federal_tax_bracket.html.erb +++ b/app/views/federal_tax_brackets/_federal_tax_bracket.html.erb @@ -1,5 +1,5 @@ <%= turbo_frame_tag dom_id(federal_tax_bracket) do %> -
+
<% 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| %>
<%= attribute %>
diff --git a/app/views/federal_tax_brackets/_index.html.erb b/app/views/federal_tax_brackets/_index.html.erb index 67f18e8..f8c8f13 100644 --- a/app/views/federal_tax_brackets/_index.html.erb +++ b/app/views/federal_tax_brackets/_index.html.erb @@ -1,4 +1,4 @@ -
+
<% tax_headings = %w[Tier From To Rate Cumulative] %> <% tax_headings.each do |tax_heading| %>
<%= tax_heading %>
diff --git a/app/views/fixed_expenses/_fixed_expense.html.erb b/app/views/fixed_expenses/_fixed_expense.html.erb index 0a523c5..e00cdc3 100644 --- a/app/views/fixed_expenses/_fixed_expense.html.erb +++ b/app/views/fixed_expenses/_fixed_expense.html.erb @@ -1,10 +1,12 @@ <%= turbo_frame_tag dom_id(fixed_expense) do %> -
+
<% 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| %>
<%= attribute %>
<% end %> -
<%= 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" %>
+
+ <%= 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" %> +
<% end %> diff --git a/app/views/fixed_expenses/_index.html.erb b/app/views/fixed_expenses/_index.html.erb index 1eb4107..964ec76 100644 --- a/app/views/fixed_expenses/_index.html.erb +++ b/app/views/fixed_expenses/_index.html.erb @@ -1,4 +1,4 @@ -
+
<% fixed_headings = %w[Expense Annual Monthly Bi-weekly] %> <% fixed_headings.each do |fixed_heading| %>
<%= fixed_heading %>
diff --git a/app/views/incomes/_income.html.erb b/app/views/incomes/_income.html.erb index 27392c3..2924a88 100644 --- a/app/views/incomes/_income.html.erb +++ b/app/views/incomes/_income.html.erb @@ -1,5 +1,5 @@ <%= turbo_frame_tag dom_id(income) do %> -
+
<% attributes = [income.income_type, humanized_money_with_symbol(income.rate), income.hours, humanized_money_with_symbol(income.weekly_income)] %> <% attributes.each do |attribute| %>
<%= attribute %>
diff --git a/app/views/incomes/_index.html.erb b/app/views/incomes/_index.html.erb index 8fb5a82..4321b01 100644 --- a/app/views/incomes/_index.html.erb +++ b/app/views/incomes/_index.html.erb @@ -1,5 +1,5 @@ Net Income -
+
<% income_headings = ["Income Type", "Rate", "Hours", "Weekly Gross"] %> <% income_headings.each do |income_heading| %>
<%= income_heading %>
diff --git a/app/views/shared/_budget.html.erb b/app/views/shared/_budget.html.erb index 9cc30a7..96fb5b9 100644 --- a/app/views/shared/_budget.html.erb +++ b/app/views/shared/_budget.html.erb @@ -1,4 +1,4 @@ -
+
Daily
<%= render partial: "shared/total", locals: { total: totals.total_annual_cost / 365 } %>
0
@@ -8,7 +8,7 @@
-
+
Weekly
<%= render partial: "shared/total", locals: { total: totals.total_bi_weekly_cost / 2 } %>
0
@@ -18,7 +18,7 @@
-
+
Bi-Weekly
<%= render partial: "shared/total", locals: { total: totals.total_bi_weekly_cost } %>
0
@@ -28,7 +28,7 @@
-
+
Monthly
<%= render partial: "shared/total", locals: { total: totals.total_monthly_cost } %>
0
@@ -38,7 +38,7 @@
-
+
Quarterly
<%= render partial: "shared/total", locals: { total: totals.total_annual_cost / 4 } %>
0
@@ -48,7 +48,7 @@
-
+
Biannual
<%= render partial: "shared/total", locals: { total: totals.total_annual_cost / 4 } %>
0
@@ -58,7 +58,7 @@
-
+
Annually
<%= render partial: "shared/total", locals: { total: totals.total_annual_cost } %> diff --git a/app/views/shared/_taxed_incomes.html.erb b/app/views/shared/_taxed_incomes.html.erb index 78a9e22..2e6fe7e 100644 --- a/app/views/shared/_taxed_incomes.html.erb +++ b/app/views/shared/_taxed_incomes.html.erb @@ -1,17 +1,17 @@ Gross Income -
+
<% fixed_headings = ["Income Type", "Federal Tax", "State Tax", "Annual", "Bi-weekly"] %> <% fixed_headings.each do |fixed_heading| %>
<%= fixed_heading %>
<% end %>
-
+
Salary
<%= render partial: "shared/taxed_income", locals: { taxed_income: salary_taxed} %>
-
+
Hourly
<%= render partial: "shared/taxed_income", locals: { taxed_income: hourly_taxed} %>
diff --git a/app/views/shared/_total_costs.html.erb b/app/views/shared/_total_costs.html.erb index 1c28898..95b24aa 100644 --- a/app/views/shared/_total_costs.html.erb +++ b/app/views/shared/_total_costs.html.erb @@ -1,4 +1,4 @@ -
+
Total