- <%= turbo_frame_tag "fixed_expense_header_frame" do %>
-
Fixed Expenses
-
- <%= link_to "New Fixed Expense", new_fixed_expense_path, data: { turbo_frame: :fixed_expenses }, class: "btn btn-primary" %>
-
- <% end %>
-
+
<%= render "fixed_expenses/index" %>
<%= render partial: "shared/total_costs", locals: { total_cost: @total_cost } %>
diff --git a/app/views/fixed_expenses/_index.html.erb b/app/views/fixed_expenses/_index.html.erb
index 23f372b..212f32d 100644
--- a/app/views/fixed_expenses/_index.html.erb
+++ b/app/views/fixed_expenses/_index.html.erb
@@ -1,10 +1,21 @@
<%= turbo_frame_tag :fixed_expenses do %>
-
- <% fixed_headings = %w[Expense Annual Monthly Bi-weekly] %>
- <% fixed_headings.each do |fixed_heading| %>
-
<%= fixed_heading %>
- <% end %>
-
+
+
+ <%= turbo_frame_tag "fixed_expense_header_frame" do %>
+
Fixed Expenses
+
+ <%= link_to "New Fixed Expense", new_fixed_expense_path, data: { turbo_frame: :fixed_expenses }, class: "btn btn-primary" %>
+
+ <% end %>
+
+
+ <% fixed_headings = %w[Expense Annual Monthly Bi-weekly] %>
+ <% fixed_headings.each do |fixed_heading| %>
+
<%= fixed_heading %>
+ <% end %>
+
- <%= render @fixed_expenses %>
+ <%= render @fixed_expenses %>
+
+
<% end %>
diff --git a/app/views/fixed_expenses/index.html.erb b/app/views/fixed_expenses/index.html.erb
index 2268232..75b088e 100644
--- a/app/views/fixed_expenses/index.html.erb
+++ b/app/views/fixed_expenses/index.html.erb
@@ -3,14 +3,5 @@
<%= notice %>
<% end %>
-
- <%= turbo_frame_tag :fixed_expenses do %>
-
Fixed expenses
- <%= link_to 'New fixed expense', new_fixed_expense_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %>
- <% end %>
-
-
-
- <%= render @fixed_expenses %>
-
+ <%= render "fixed_expenses/index" %>
diff --git a/app/views/shared/_total_costs.html.erb b/app/views/shared/_total_costs.html.erb
index cb33c5f..0f11924 100644
--- a/app/views/shared/_total_costs.html.erb
+++ b/app/views/shared/_total_costs.html.erb
@@ -1,25 +1,27 @@
<%= turbo_frame_tag "total_costs" do %>
-
-
- Total
-
+
+
+
+ Total
+
-
-
- <%= render partial: "shared/total", locals: { total: total_cost.annual_cost } %>
-
-
+
+
+ <%= render partial: "shared/total", locals: { total: total_cost.annual_cost } %>
+
+
-
-
- <%= render partial: "shared/total", locals: { total: total_cost.monthly_cost } %>
-
-
+
+
+ <%= render partial: "shared/total", locals: { total: total_cost.monthly_cost } %>
+
+
-
-
- <%= render partial: "shared/total", locals: { total: total_cost.bi_weekly_cost } %>
-
+
+
+ <%= render partial: "shared/total", locals: { total: total_cost.bi_weekly_cost } %>
+
+
<% end %>